mirror of
https://github.com/opencv/opencv.git
synced 2026-07-26 13:53:03 +04:00
core: deprecate MatCommaInitializer_
This commit is contained in:
@@ -92,7 +92,7 @@ void decomposeHomography(const string &img1Path, const string &img2Path, const S
|
||||
//! [compute-camera-displacement]
|
||||
|
||||
//! [compute-plane-normal-at-camera-pose-1]
|
||||
Mat normal = (Mat_<double>(3,1) << 0, 0, 1);
|
||||
Mat normal = Mat_<double>({3,1}, {0, 0, 1});
|
||||
Mat normal1 = R1*normal;
|
||||
//! [compute-plane-normal-at-camera-pose-1]
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ void homographyFromCameraDisplacement(const string &img1Path, const string &img2
|
||||
//! [compute-camera-displacement]
|
||||
|
||||
//! [compute-plane-normal-at-camera-pose-1]
|
||||
Mat normal = (Mat_<double>(3,1) << 0, 0, 1);
|
||||
Mat normal = Mat_<double>({3,1}, {0, 0, 1});
|
||||
Mat normal1 = R1*normal;
|
||||
//! [compute-plane-normal-at-camera-pose-1]
|
||||
|
||||
|
||||
+17
-11
@@ -14,23 +14,29 @@ void basicPanoramaStitching(const string &img1Path, const string &img2Path)
|
||||
Mat img2 = imread( samples::findFile( img2Path ) );
|
||||
|
||||
//! [camera-pose-from-Blender-at-location-1]
|
||||
Mat c1Mo = (Mat_<double>(4,4) << 0.9659258723258972, 0.2588190734386444, 0.0, 1.5529145002365112,
|
||||
0.08852133899927139, -0.3303661346435547, -0.9396926164627075, -0.10281121730804443,
|
||||
-0.24321036040782928, 0.9076734185218811, -0.342020183801651, 6.130080699920654,
|
||||
0, 0, 0, 1);
|
||||
Mat c1Mo = Mat_<double>({4,4}, {
|
||||
0.9659258723258972, 0.2588190734386444, 0.0, 1.5529145002365112,
|
||||
0.08852133899927139, -0.3303661346435547, -0.9396926164627075, -0.10281121730804443,
|
||||
-0.24321036040782928, 0.9076734185218811, -0.342020183801651, 6.130080699920654,
|
||||
0, 0, 0, 1
|
||||
});
|
||||
//! [camera-pose-from-Blender-at-location-1]
|
||||
|
||||
//! [camera-pose-from-Blender-at-location-2]
|
||||
Mat c2Mo = (Mat_<double>(4,4) << 0.9659258723258972, -0.2588190734386444, 0.0, -1.5529145002365112,
|
||||
-0.08852133899927139, -0.3303661346435547, -0.9396926164627075, -0.10281121730804443,
|
||||
0.24321036040782928, 0.9076734185218811, -0.342020183801651, 6.130080699920654,
|
||||
0, 0, 0, 1);
|
||||
Mat c2Mo = Mat_<double>({4,4}, {
|
||||
0.9659258723258972, -0.2588190734386444, 0.0, -1.5529145002365112,
|
||||
-0.08852133899927139, -0.3303661346435547, -0.9396926164627075, -0.10281121730804443,
|
||||
0.24321036040782928, 0.9076734185218811, -0.342020183801651, 6.130080699920654,
|
||||
0, 0, 0, 1
|
||||
});
|
||||
//! [camera-pose-from-Blender-at-location-2]
|
||||
|
||||
//! [camera-intrinsics-from-Blender]
|
||||
Mat cameraMatrix = (Mat_<double>(3,3) << 700.0, 0.0, 320.0,
|
||||
0.0, 700.0, 240.0,
|
||||
0, 0, 1);
|
||||
Mat cameraMatrix = Mat_<double>({3,3}, {
|
||||
700.0, 0.0, 320.0,
|
||||
0.0, 700.0, 240.0,
|
||||
0, 0, 1
|
||||
});
|
||||
//! [camera-intrinsics-from-Blender]
|
||||
|
||||
//! [extract-rotation]
|
||||
|
||||
@@ -53,7 +53,7 @@ void perspectiveCorrection(const string &img1Path, const string &img2Path, const
|
||||
hconcat(img1, img2, img_draw_matches);
|
||||
for (size_t i = 0; i < corners1.size(); i++)
|
||||
{
|
||||
Mat pt1 = (Mat_<double>(3,1) << corners1[i].x, corners1[i].y, 1);
|
||||
Mat pt1 = Mat_<double>({3,1}, {corners1[i].x, corners1[i].y, 1});
|
||||
Mat pt2 = H * pt1;
|
||||
pt2 /= pt2.at<double>(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user