我尝试按照以下代码在附带的棋盘图片中找到方形框的角,但不幸的是找不到它。您能告诉我在这种情况下我该怎么做才能检测棋盘的角...非常感谢..:)
int main() {
cv::Mat imgOriginal; // input image
Size boardSizeTopChessBoard;
boardSizeTopChessBoard.width = 144;
boardSizeTopChessBoard.height = 3;
vector<Point2f> pointBufTopChessBoard;
bool topChessBoardCornersFound = false;
imgOriginal = cv::imread("topChessBoard.jpg");
imshow("Original Image ",imgOriginal);
topChessBoardCornersFound = findChessboardCornersSB(imgOriginal,boardSizeTopChessBoard,pointBufTopChessBoard,0);
if (topChessBoardCornersFound)
{
cout << "Corners found in top chess baord" << endl;
}
else
{
cout << "Corners not found in top chess baord" << endl;
}
waitKey(0);
return(0);