use of boofcv.struct.distort.Point3Transform2_F64 in project BoofCV by lessthanoptimal.
the class GeneralLensDistortionWideFOVChecks method pixel_unit_pixel_F64.
@Test
public void pixel_unit_pixel_F64() {
LensDistortionWideFOV alg = create();
Point2Transform3_F64 undistort = alg.undistortPtoS_F64();
Point3Transform2_F64 distort = alg.distortStoP_F64();
Point3D_F64 middle = new Point3D_F64();
Point2D_F64 found = new Point2D_F64();
undistort.compute(240, 260, middle);
distort.compute(middle.x, middle.y, middle.z, found);
assertEquals(240, found.x, pixel_tol_F64);
assertEquals(260, found.y, pixel_tol_F64);
}
use of boofcv.struct.distort.Point3Transform2_F64 in project BoofCV by lessthanoptimal.
the class GeneralLensDistortionWideFOVChecks method blowup_extreme_angle_F64.
/**
* Give it spherical coordinate pointing slightly behind. See if it blows up when converting into pixels
*/
@Test
public void blowup_extreme_angle_F64() {
LensDistortionWideFOV alg = create();
Point3Transform2_F64 distort = alg.distortStoP_F64();
Point2D_F64 found = new Point2D_F64();
double x = 1.0;
double z = -0.001;
double r = Math.sqrt(x * x + z * z);
distort.compute(x / r, 0, z / x, found);
assertTrue(!UtilEjml.isUncountable(found.x));
assertTrue(!UtilEjml.isUncountable(found.y));
}
Aggregations