How to remove this error in javacv.... [closed]

asked 2018-02-07 15:21:32 -0500

aditya gravatar image

OpenCV Error: Assertion failed (s >= 0) in unknown function, file ......\src\opencv\modules\core\src\matrix.cpp, line 116 Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: ......\src\opencv\modules\core\src\matrix.cpp:116: error: (-215) s >= 0

code is:- if(imageFiles.size()==0) { empty=true; } if(!empty) { images = new MatVector(imageFiles.size()); System.out.println(imageFiles.size()); labels = new int[imageFiles.size()];

    for (int x=0;x<imageFiles.size();x++) {
        File image=imageFiles.get(x);
        img = cvLoadImage(image.getAbsolutePath(),CV_LOAD_IMAGE_GRAYSCALE);

        images.put(counter, img);

        labels[counter] = counter;

        counter++;
    }
    faceRecognizer = createLBPHFaceRecognizer(1, 8, 8, 8, 100);//50
    **faceRecognizer.train(images, labels);**(THIS IS THE LINE WHERE I AM GETTING THAT ERROR )
edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2018-02-13 05:19:58.587826

Comments

sorry, but we cannot help you with unsupported 3rdparty wrappers like javacv emgu, etc.

berak gravatar imageberak ( 2018-02-13 05:20:58 -0500 )edit