use of boofcv.alg.distort.PointTransformHomography_F64 in project BoofCV by lessthanoptimal.
the class ImplRectifyImageOps_F64 method transformPixelToRect.
public static Point2Transform2_F64 transformPixelToRect(CameraPinholeBrown param, DMatrixRMaj rectify) {
Point2Transform2_F64 remove_p_to_p = narrow(param).undistort_F64(true, true);
PointTransformHomography_F64 rectifyDistort = new PointTransformHomography_F64(rectify);
return new SequencePoint2Transform2_F64(remove_p_to_p, rectifyDistort);
}
use of boofcv.alg.distort.PointTransformHomography_F64 in project BoofCV by lessthanoptimal.
the class ImplRectifyImageOps_F64 method transformRectToPixel.
public static Point2Transform2_F64 transformRectToPixel(CameraPinholeBrown param, DMatrixRMaj rectify) {
Point2Transform2_F64 add_p_to_p = narrow(param).distort_F64(true, true);
DMatrixRMaj rectifyInv = new DMatrixRMaj(3, 3);
CommonOps_DDRM.invert(rectify, rectifyInv);
PointTransformHomography_F64 removeRect = new PointTransformHomography_F64(rectifyInv);
return new SequencePoint2Transform2_F64(removeRect, add_p_to_p);
}
use of boofcv.alg.distort.PointTransformHomography_F64 in project BoofCV by lessthanoptimal.
the class ImplRectifyImageOps_F64 method fullViewLeft.
public static void fullViewLeft(int imageWidth, int imageHeight, DMatrixRMaj rectifyLeft, DMatrixRMaj rectifyRight) {
Point2Transform2_F64 tranLeft = new PointTransformHomography_F64(rectifyLeft);
Point2D_F64 work = new Point2D_F64();
RectangleLength2D_F64 bound = DistortImageOps.boundBox_F64(imageWidth, imageHeight, new PointToPixelTransform_F64(tranLeft), work);
double scaleX = imageWidth / bound.width;
double scaleY = imageHeight / bound.height;
double scale = Math.min(scaleX, scaleY);
adjustUncalibrated(rectifyLeft, rectifyRight, bound, scale);
}
Aggregations