cv::findChessBoardCorners behaves differently in different opencv versions
there's a fisheye chessboard distorted image from which its needed to remove the distortion. I wrote the program that do that successfully on opencv 3.2.0 where this piece of code works perfectly fine on linux with the above mentioned cv version (the sizes are 8 and 5 for which it detects the corners)
bool patternFound = false;
std::vector<cv::Point2f> corners;
for (int i = 7; i <= 30; ++i)
{
int w = i;
int h = i-3;
patternFound = cv::findChessboardCorners(image, cv::Size(w, h), corners,
cv::CALIB_CB_ADAPTIVE_THRESH | cv::CALIB_CB_NORMALIZE_IMAGE);
}
but on Mac with opencv 3.1.0.2 it does not find the corners and this
cv::findChessboardCorners(image, cv::Size(w, h), corners,
cv::CALIB_CB_ADAPTIVE_THRESH | cv::CALIB_CB_NORMALIZE_IMAGE);
always returns false
Why is that happening ?
is this a bug and how to fix it ?
please check the comments where I added a link to image because (karma is not enough to paste a link in a question)
the https://ibb.co/gEPFWF (distorted image)
because opencv 3.1.0.2 is not opencv 3.2.0 as you can see in file history
how to modify the code to make it work on both versions correctly ?
git clone https://github.com/opencv/opencv.git and of course rebuild opencv : delete cmakecache.txt and generate again
you mean just building on a same opencv version ?