Finden Sie Konturen in JavaCV oder OPENCV

Ich habe ein Problem, aber ich weiß nicht was! Ich habe den nächsten Code und wenn ich ihn debugge, stoppt der Debugger im

IplImage iplGray = cvCreateImage(cvGetSize(iplUltima), 8, 1 );
CvMemStorage g_storage = null;
CvSeq contours = new CvSeq(iplGray);

opencv_imgproc.cvCvtColor(iplUltima, iplGray, opencv_imgproc.CV_BGR2GRAY);
opencv_imgproc.cvThreshold(iplGray, iplGray, 100, 255, opencv_imgproc.CV_THRESH_BINARY);

//HERE, the next line:
opencv_imgproc.cvFindContours(iplGray, g_storage, contours, CV_C, CV_C, CV_C);
cvZero(iplGray);
if(contours != null){
    opencv_core.cvDrawContours(iplGray, contours, CvScalar.ONE, CvScalar.ONE, CV_C, CV_C, CV_C);             
}
cvShowImage( "Contours", iplGray );

Ich denke, es hängt mit CvSeq-Konturen zusammen = new CvSeq (iplGray); aber ich verstehe nicht warum. Irgendeine hilfreiche Idee?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage