mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 00:01:17 +08:00
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
This commit is contained in:
@@ -21,7 +21,7 @@ static bool readCameraParameters(std::string filename, cv::Mat& camMatrix, cv::M
|
||||
return false;
|
||||
fs["camera_matrix"] >> camMatrix;
|
||||
fs["distortion_coefficients"] >> distCoeffs;
|
||||
return true;
|
||||
return (camMatrix.size() == cv::Size(3,3)) ;
|
||||
}
|
||||
|
||||
void createBoard()
|
||||
@@ -161,4 +161,4 @@ int main(int argc, char* argv[])
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user