在下面的图片中找不到ChessboardCorners

我尝试按照以下代码在附带的棋盘图片中找到方形框的角,但不幸的是找不到它。您能告诉我在这种情况下我该怎么做才能检测棋盘的角...非常感谢..:)

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);

}

在下面的图片中找不到ChessboardCorners

lxg1201 回答:在下面的图片中找不到ChessboardCorners

它不起作用有很多原因。

首先,在此数量的角处,图像似乎分辨率较低。因此,很难检测到它们。

其次,图像边缘处的对比度较低,因此更加困难。较暗的图像更难检测。

最后,尝试捕获更清晰的图像。这个有点模糊。

本文链接:https://www.f2er.com/3137158.html

大家都在问