Home > Software engineering >  Issue with detecting chessboard corners of an IR image for calibration
Issue with detecting chessboard corners of an IR image for calibration

Time:10-20

enter image description here

Unfortunately I know the quality isn't the best for cv.findChessboardCorners to be able to detect corners, but I am trying to identify corners detectors that will find corners in ROI (chessboard). I tried Harris Corner Detector but it didn't detect Chessboard corners but it detected corners in character corners.

What possible can I do to detect the corners of the square ? Note this is an IR image, which is like a gray image ( 1 channel )

CodePudding user response:

I don't really know how opencv find chessboad. So maybe it doesn't care that much. But that is not a chessboard. It has 9 columns and 7 rows.

Well, in fact, I've just googled it, and, yes, that is very important. Opencv wants to know the dimensions of the chessboard.

In your case, you have to specify patternSize=(8,6); (8,6), not (9,7), because patternSize is the number of internal corners (so, for a real chessboard, it is (7,7)). Maybe you already did. We wouldn't know, since you haven't posted any code.

CodePudding user response:

About findChessboardCorners() failur :

For findChessboardCorners(), the OpenCV's manual say:

The function requires white space (like a square-thick border, the wider the better) around the board to make the detection more robust in various environments. Otherwise, if there is no border and the background is dark, the outer black squares cannot be segmented properly and so the square grouping and ordering algorithm fails.

Your image doesn't meet the function's requirements.


For unuse the findChessboardCorners() :

If I want to find the corners by own algorithm...

I'll not try Harris etc, because I don't want to find all thing that can be called as "corner".

Since I want to detect only the corners of the chessboard pattern, I'll consider requirements to exclude other unnecessary corners. i.e. I'll consider "what is the feature of the corner image?".

e.g.

  • When binarize the local area centered on the corner point, the area of white and black becomes almost the same.
  • the corner point is a point where 4 straight edges converge, and those 4 edges almostly construct only 2 straight lines.
  • In addition, the relationship of the intensity gradient direction between those edges may be used.

and then, construct the detector based on them.

  • Related