Skip to content

Commit b7cd3fd

Browse files
authored
Merge pull request #2950 from drf5n:patch-1
* Sanity check tutorial_charuco_create_detect.cpp::readCameraParameters() * check both camMatrix and distCoeffs sizes * check only widths of camMatrix and distCoeffs matrixes * check sizes of camMatrix and distCoeffs matrixes * check size of only camMatrix
1 parent e0cfc92 commit b7cd3fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/aruco/samples/tutorial_charuco_create_detect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static bool readCameraParameters(std::string filename, cv::Mat& camMatrix, cv::M
2121
return false;
2222
fs["camera_matrix"] >> camMatrix;
2323
fs["distortion_coefficients"] >> distCoeffs;
24-
return true;
24+
return (camMatrix.size() == cv::Size(3,3)) ;
2525
}
2626

2727
void createBoard()
@@ -161,4 +161,4 @@ int main(int argc, char* argv[])
161161
break;
162162
}
163163
return 0;
164-
}
164+
}

0 commit comments

Comments
 (0)