Home > other >  Issue of opencv chessboard corner detection
Issue of opencv chessboard corner detection

Time:09-17

This is a program, no problem, basic can run online to find the chessboard figure, but you take the board pictures why undetectable corner?

# include
# include

using namespace std;
Using the namespace CV;

Int main ()
{
Mat srcimage;
Mat viewGray;
VectorThe Size PatSize;

PatSize. Width=9;
PatSize. Height=6;

Srcimage=imread (" C:/Users/ASUS/Desktop/project/new folder/1/SAN Antonio pg ");
CvtColor (srcimage viewGray, COLOR_BGR2GRAY);
Bool ret=findChessboardCorners (viewGray PatSize, corners).
if (! Ret)
{
Cout & lt; <"Can not find the corners." & lt; }



CornerSubPix (viewGray, corners, the Size (11, 11),
The Size (1, 1), TermCriteria (EPS + TermCriteria TermCriteria: : : : COUNT, 40, 0.04));

DrawChessboardCorners (srcimage PatSize, Mat (corners), ret);
NamedWindow (" chessboard corners ");
Imshow (" chessboard corners, "srcimage);


WaitKey (0);
}

CodePudding user response:

PatSize. Width=8
Have a try

CodePudding user response:

reference 1st floor Monet66 response:
PatSize. Width=8
Try

Should not, get an odd one even

CodePudding user response:

refer to the second floor Algorithm - the engine response:
Quote: refer to 1st floor Monet66 response:
PatSize. Width=8
Try

Should not, get an odd one even

Your checkerboard corners is 8 * 6, not 9 * 6

CodePudding user response:

reference Monet66 reply: 3/f
Quote: refer to the second floor Algorithm - the engine response:
Quote: refer to 1st floor Monet66 response:
PatSize. Width=8
Try

Should not, get an odd one even

Your checkerboard corners is 8 * 6, not 9 * 6

Line, I try, but again big checkerboard, opencv corner detection board function should be set up in corner detection much!!!!

CodePudding user response:

reference Monet66 reply: 3/f
Quote: refer to the second floor Algorithm - the engine response:
Quote: refer to 1st floor Monet66 response:
PatSize. Width=8
Try

Should not, get an odd one even

Your checkerboard corners is 8 * 6, not 9 * 6

Thank you very much, successfully solved
  • Related