Package boofcv.alg.distort.kanbra
Class KannalaBrandtPtoS_F32
java.lang.Object
boofcv.alg.distort.kanbra.KannalaBrandtPtoS_F32
- All Implemented Interfaces:
Point2Transform3_F32
,VerbosePrint
@Generated("boofcv.alg.distort.kanbra.KannalaBrandtPtoS_F64")
public class KannalaBrandtPtoS_F32
extends Object
implements Point2Transform3_F32, 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
float
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
(float x, float y, Point3D_F32 out) Applies transformationCreates a copy of this transform for use in concurrent application.protected void
jacobianOfDistorted
(float theta, float cosphi, float sinphi, FMatrix2x2 gradient) Computes the Jacobian of the distorted coordinates [dx, dy].protected void
newtonsMethodUpdateThetaphi
(float theta, float phi, float r) Invert the function using Newton's method.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
realNumberTol
public float 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_F32
-
-
Method Details
-
compute
Description copied from interface:Point2Transform3_F32
Applies transformation- Specified by:
compute
in interfacePoint2Transform3_F32
- Parameters:
x
- x-coordinate of pointy
- y-coordinate of pointout
- Transformed point location.
-
newtonsMethodUpdateThetaphi
protected void newtonsMethodUpdateThetaphi(float theta, float phi, float 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_F32
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_F32.compute(float, float, georegression.struct.point.Point3D_F32)
is not passed to the 'copied' output. Expensive to compute models might be passed in as a reference.- Specified by:
copyConcurrent
in interfacePoint2Transform3_F32
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-