mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 21:40:49 +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;
|
return false;
|
||||||
fs["camera_matrix"] >> camMatrix;
|
fs["camera_matrix"] >> camMatrix;
|
||||||
fs["distortion_coefficients"] >> distCoeffs;
|
fs["distortion_coefficients"] >> distCoeffs;
|
||||||
return true;
|
return (camMatrix.size() == cv::Size(3,3)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void createBoard()
|
void createBoard()
|
||||||
@@ -161,4 +161,4 @@ int main(int argc, char* argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user