1
0
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:
David Forrest
2021-05-20 15:22:29 -04:00
committed by GitHub
parent e0cfc9208e
commit b7cd3fd515

View File

@@ -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;
}
}