mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Update Samples
This commit is contained in:
committed by
sturkmen72
parent
9ef5373776
commit
f73395122c
@@ -52,8 +52,8 @@ void computeC2MC1(const Mat &R1, const Mat &tvec1, const Mat &R2, const Mat &tve
|
||||
void decomposeHomography(const string &img1Path, const string &img2Path, const Size &patternSize,
|
||||
const float squareSize, const string &intrinsicsPath)
|
||||
{
|
||||
Mat img1 = imread(img1Path);
|
||||
Mat img2 = imread(img2Path);
|
||||
Mat img1 = imread( samples::findFile( img1Path) );
|
||||
Mat img2 = imread( samples::findFile( img2Path) );
|
||||
|
||||
vector<Point2f> corners1, corners2;
|
||||
bool found1 = findChessboardCorners(img1, patternSize, corners1);
|
||||
@@ -69,7 +69,7 @@ void decomposeHomography(const string &img1Path, const string &img2Path, const S
|
||||
vector<Point3f> objectPoints;
|
||||
calcChessboardCorners(patternSize, squareSize, objectPoints);
|
||||
|
||||
FileStorage fs(intrinsicsPath, FileStorage::READ);
|
||||
FileStorage fs( samples::findFile( intrinsicsPath ), FileStorage::READ);
|
||||
Mat cameraMatrix, distCoeffs;
|
||||
fs["camera_matrix"] >> cameraMatrix;
|
||||
fs["distortion_coefficients"] >> distCoeffs;
|
||||
@@ -154,9 +154,9 @@ void decomposeHomography(const string &img1Path, const string &img2Path, const S
|
||||
|
||||
const char* params
|
||||
= "{ help h | | print usage }"
|
||||
"{ image1 | ../data/left02.jpg | path to the source chessboard image }"
|
||||
"{ image2 | ../data/left01.jpg | path to the desired chessboard image }"
|
||||
"{ intrinsics | ../data/left_intrinsics.yml | path to camera intrinsics }"
|
||||
"{ image1 | left02.jpg | path to the source chessboard image }"
|
||||
"{ image2 | left01.jpg | path to the desired chessboard image }"
|
||||
"{ intrinsics | left_intrinsics.yml | path to camera intrinsics }"
|
||||
"{ width bw | 9 | chessboard width }"
|
||||
"{ height bh | 6 | chessboard height }"
|
||||
"{ square_size | 0.025 | chessboard square size }";
|
||||
|
||||
Reference in New Issue
Block a user