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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user