Ask Your Question

YogeshDV's profile - activity

2016-06-01 05:43:18 -0600 asked a question assertion error 215 (s>=0) when dataset extended above a certain limit

i m storing database image elements on drive itself to compare with other big image for pattern matching, but when database is increased as elements of other images are added, it gives wrong output or this error related to mat function of opencv. Is there any limit on how much data it can handle at a time?:

OpenCV Error: Assertion failed (s >= 0) in cv::setSize, file ........\opencv\modules\core\src\matrix.cpp, line 116 Exception in thread "AWT-EventQueue-0" CvException [org.opencv.core.CvException: cv::Exception: ........\opencv\modules\core\src\matrix.cpp:116: error: (-215) s >= 0 in function cv::setSize ] at org.opencv.core.Mat.n_Mat(Native Method) at org.opencv.core.Mat.<init>(Mat.java:477) at ClassLib.TemplateMatching.run(TemplateMatching.java:92)

2016-06-01 05:22:23 -0600 received badge  Editor (source)
2016-05-30 12:33:38 -0600 asked a question I'm using opencv for Image Processign, but getting one error when dataset is expanded after a certain level

OpenCV Error: Assertion failed (s >= 0) in cv::setSize, file ........\opencv\modules\core\src\matrix.cpp, line 116 Exception in thread "AWT-EventQueue-0" CvException [org.opencv.core.CvException: cv::Exception: ........\opencv\modules\core\src\matrix.cpp:116: error: (-215) s >= 0 in function cv::setSize

Please Help!!

JAVA, Pattern Matching, NetBeans

Pattern Matching done for 8 elements:

if (!element_six)
{ 
    if (templateFile1.getName().startsWith("six_")) 
    { 
        if ((matchLoc.x > (img.width() / 2)) && (matchLoc.x < (img.width() / 2)+200))
        {
           element_six = true;
           System.out.println("Element six Is Present");
           match_count += 1;
           Core.rectangle(img, matchLoc, new Point(matchLoc.x + templ.cols(), matchLoc.y + templ.rows()), new Scalar(0, 255, 0), 8);
       }
       else
       {
           element_six = false; 
           System.out.println("Element six Is Not Present");
       }
    }
}

for (File templateFile1 : templateFile) 
{ 
    Mat templ = Highgui.imread(templateFile1.toString()); // / Create the result matrix 
    int result_cols = img.cols() - templ.cols() + 1; 
    int result_rows = img.rows() - templ.rows() + 1; 
    Mat result = new Mat(result_rows, result_cols, CvType.CV_32FC1);
    ORB algorithm is used and function used is 
    Core.normalize(result, result, 0, 1, Core.NORM_MINMAX, -1, new Mat());
}