Findchessboardcorners Cannot Detect Chessboard on Very Large Images by Long Focal Length Lens

FindChessboardCorners cannot detect chessboard on very large images by long focal length lens

A few points.

  1. Down-sizing, as you noticed, helps the detector. That is because the corner-detection filters used in OpenCV to find the corners have fixed size, and that size of convolution mask may be too small to detect your corners - the full-size image may actually look "smooth" at that scale, particularly where it is slightly blurry. However, by downscaling you throw away some corner location accuracy.
  2. For the same reason, sharpening helps too. However, it also goes against accuracy, because it adds bias to the subpixel positions of the corners - even in the ideal case with no noise. To convince yourself that this is the case, consider the 1D analogue: the intensity of the image around a corner (in 1D, a sharp black-white transition) looks ideally like a sigmoid curve (a ramp with smooth corners), and you want to find the location of its inflection point. Sharpening makes the curve steeper, which in general will move that point's location. Things get worse when you take into account that sharpening generally amplifies noise.
  3. The likely correct way to proceed is to start at a lower resolution (i.e. downsizing), then scale up the positions of the corners thus found, and use them as the initial estimates for a run of cvFindCornersSubpix at full resolution.

cv2 findChessboardCorners does not detect corners

Finally I could do it. I had to set chessboard_size = (12,7) then it worked. I had to count the internal number of horizontal and vertical corners.

findChessboardCorners is unable to find chessboard beyond 3x3

As Nullman says, you are defining the size of the chessboard inner corners as 3x3. In the sample image you provided, the inner corner size is 14x6. Therefore, the code would be:

ret, corners = cv2.findChessboardCorners(gray, (14,6),None)

Opencv cv::findchessboardCorners

I think the main problem is that you would have ambiguities since it is easily possible to find different smaller chessboards in a larger one.

If you do corner detection on an image consisting of a chessboard, you will find a regular grid of corners.
Then findChessboardCorners needs to find a structur which is very similar to the given chessboard of size (x,y). It will rate the different possibilities to map the chessboard to the regular grid found by the corner detection and these ratings are very similar.
So it is difficult to decide which is THE CHESSBOARD, you are looking for.



Related Topics



Leave a reply



Submit