Package boofcv.alg.distort.kanbra
Class KannalaBrandtPtoS_F64
java.lang.Object
boofcv.alg.distort.kanbra.KannalaBrandtPtoS_F64
- All Implemented Interfaces:
Point2Transform3_F64
,VerbosePrint
Backwards project from a distorted 2D pixel to 3D unit sphere coordinate using the
CameraKannalaBrandt
model.
Newton's method is used to invert the distorted coordinates [dx, dy] (Eq. 10). This is different from the original
paper which uses a taylor series to approximate the function and no iteration.-
Field Summary
Modifier and TypeFieldDescriptionfinal ConfigConverge
Specifies convergence criteriaprotected final CameraKannalaBrandt
double
A complex number is considered real if the imaginary component has a magnitude ≤ this valueUsed to solve for theta -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compute
(double x, double y, Point3D_F64 out) Applies transformationCreates a copy of this transform for use in concurrent application.protected void
jacobianOfDistorted
(double theta, double cosphi, double sinphi, DMatrix2x2 gradient) Computes the Jacobian of the distorted coordinates [dx, dy].protected void
newtonsMethodUpdateThetaphi
(double theta, double phi, double r) Invert the function using Newton's method.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
realNumberTol
public double realNumberTolA complex number is considered real if the imaginary component has a magnitude ≤ this value -
converge
Specifies convergence criteria -
model
-
rootFinder
Used to solve for theta
-
-
Constructor Details
-
KannalaBrandtPtoS_F64
-
-
Method Details
-
compute
Description copied from interface:Point2Transform3_F64
Applies transformation- Specified by:
compute
in interfacePoint2Transform3_F64
- Parameters:
x
- x-coordinate of pointy
- y-coordinate of pointout
- Transformed point location.
-
newtonsMethodUpdateThetaphi
protected void newtonsMethodUpdateThetaphi(double theta, double phi, double r) Invert the function using Newton's method. This is different from the original paper which approximated the original function using multiple taylor series expansions and no iteration. This function can only improve the estimate of theta and phi. If the answer ever gets worse it aborts. -
jacobianOfDistorted
Computes the Jacobian of the distorted coordinates [dx, dy]. -
copyConcurrent
Description copied from interface:Point2Transform3_F64
Creates a copy of this transform for use in concurrent application. What that means is that any variable which might be modified by a concurrent call toPoint2Transform3_F64.compute(double, double, georegression.struct.point.Point3D_F64)
is not passed to the 'copied' output. Expensive to compute models might be passed in as a reference.- Specified by:
copyConcurrent
in interfacePoint2Transform3_F64
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-