FindChessboardCorners cannot detect chessboard on very large resoluction images (Bug #2831)
Description
I posted the same problem on stackoverflow, [[http://stackoverflow.com/questions/15018620/findchessboardcorners-cannot-detect-chessboard-on-very-large-images]], you can find the test image there.
The bug appears like above a certain resolution, it cannot detect chessboard patter (return false).
Associated revisions
Merge pull request #2831 from alalek:android_examples
History
Updated by Tom Guo about 12 years ago
Just here to clarify. I think the algorithm works on large image resolution, but it fails when the chessboard occupy larger proportion of the image.
For example, when I use a 50mm fixed lens on the same camera position, FindChessboardCorners never fails. After I change it to 100mm fixed lens, the function starts to stop detecting the pattern. I think it relates to the proportion or the focal length.
Updated by Tom Guo about 12 years ago
Obviously, there's some hard coded stuff in FindChessboardCorners, now I'm able to use a sharpen filter beforehand, then it starts working.
For a very high resolution image, I have to use a gaussian filter size more than 55.
@ if (viewGray.cols > 1500)
{
Mat temp ;
GaussianBlur(viewGray,temp, Size(0,0), 55) ;
addWeighted(viewGray, 1.5, temp, -0.5,0,viewGray) ; //hardcoded weight, to be tested.
imwrite("test"+ imageList[k][i], viewGray) ;
}
found = findChessboardCorners( viewGray, boardSize, ptvec,
CV_CALIB_CB_ADAPTIVE_THRESH + CV_CALIB_CB_FILTER_QUADS + CV_CALIB_CB_NORMALIZE_IMAGE + CV_CALIB_CB_FAST_CHECK);@
Updated by Vadim Pisarevsky about 12 years ago
- Target version set to Next Hackathon
- Assignee set to Vadim Pisarevsky
- Category set to calibration, 3d
- Priority changed from High to Normal
Updated by Vadim Pisarevsky almost 10 years ago
thanks for the test image! Indeed, such an image can not be processed as-is by findChessboardCorners. When the image is downscaled to 1000x1500, the function works correctly. For the current camera calibration algorithm huge resolution is overkill. It's better to provide multiple views of a pattern with many corners.
the test has been added in https://github.com/Itseez/opencv/pull/4053
- Status changed from Open to Done
- Target version changed from Next Hackathon to 3.0
- HW Platform set to Any
- Operating System set to Any
- Affected version changed from branch 'master' (2.4.9) to branch '2.4' (2.4-dev)