findChessboardCorners returing false boolean value?
I am using findChessboardCorners function to find the corners in a chessboard image.
When I am executing the function on this image, I am getting an array of detected corners but the bool value returned by the function is zero. Shouldn't it be one since I'm getting an array of detected corners?
Code-
Mat inImage;
inImage = imread("left01.jpg");
//-> Output
vector<Point2f> corners; // This will be filled by the detected corners
bool found = findChessboardCorners( inImage, Size(8,6), corners, CV_CALIB_CB_ADAPTIVE_THRESH );
cout<<"found::"<<found<<endl;
cout<<"number of corners detected:"<<corners.size()<<endl;
You get false because you use wrong pattern size 8x6 instead 9x6.