1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-25 21:33:04 +04:00

core: deprecate MatCommaInitializer_

This commit is contained in:
Maksim Shabunin
2026-05-19 06:11:12 +03:00
parent cd4d732442
commit 201381e019
24 changed files with 324 additions and 337 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ static Point3f image2plane(Point2f imgpt, const Mat& R, const Mat& tvec,
{
Mat R1 = R.clone();
R1.col(2) = R1.col(2)*Z + tvec;
Mat_<double> v = (cameraMatrix*R1).inv()*(Mat_<double>(3,1) << imgpt.x, imgpt.y, 1);
Mat_<double> v = (cameraMatrix*R1).inv()*(Mat_<double>({3,1}, {imgpt.x, imgpt.y, 1}));
double iw = fabs(v(2,0)) > DBL_EPSILON ? 1./v(2,0) : 0;
return Point3f((float)(v(0,0)*iw), (float)(v(1,0)*iw), (float)Z);
}