Package boofcv.struct.calib
Class CameraPinholeBrown
java.lang.Object
boofcv.struct.calib.CameraModel
boofcv.struct.calib.CameraPinhole
boofcv.struct.calib.CameraPinholeBrown
- All Implemented Interfaces:
Serializable
Adds radial and tangential distortion to the intrinsic parameters of a pinhole camera
.
Radial and Tangential Distortion:
xd = xn + xn[k1 r2 + ... + kn r2n] + dx
dxu = [ 2t1 u v + t2(r2 + 2u2)]
dxv = [ t1(r2 + 2v2) + 2 t2 u v]
r2 = u2 + v2
where xd is the distorted coordinates, xn=(u,v) is undistorted normalized image coordinates.
Pixel coordinates are found x = K*[u;v]
- See Also:
-
Field Summary
Modifier and TypeFieldDescription@org.jetbrains.annotations.Nullable double[]
radial distortion parametersdouble
tangential distortion parametersdouble
tangential distortion parametersFields inherited from class boofcv.struct.calib.CameraModel
height, width
-
Constructor Summary
ConstructorDescriptionDefault constructor.CameraPinholeBrown
(double fx, double fy, double skew, double cx, double cy, int width, int height) CameraPinholeBrown
(int numRadial) -
Method Summary
Modifier and TypeMethodDescription<T extends CameraModel>
TCreates a new camera model with zero values of the same type os this onefsetK
(double fx, double fy, double skew, double cx, double cy, int width, int height) fsetRadial
(@org.jetbrains.annotations.Nullable double... radial) fsetTangential
(double t1, double t2) @org.jetbrains.annotations.Nullable double[]
boolean
If true then distortion parameters are specified.boolean
isDistorted
(double tol) void
print()
Prints a summary of this model to stdoutvoid
reset()
Sets all variables to zero.void
setRadial
(double... radial) setTo
(CameraPinhole param) setTo
(CameraPinholeBrown param) toString()
static String
toStringArray
(FancyPrint fp, String name, @org.jetbrains.annotations.Nullable double[] param) Methods inherited from class boofcv.struct.calib.CameraPinhole
fsetK, fsetK, fsetShape, isEquals, isInside, isInside
Methods inherited from class boofcv.struct.calib.CameraModel
getDimension, getHeight, getWidth, isSameShape, isSameShape, setHeight, setWidth
-
Field Details
-
radial
@Nullable public @org.jetbrains.annotations.Nullable double[] radialradial distortion parameters -
t1
public double t1tangential distortion parameters -
t2
public double t2tangential distortion parameters
-
-
Constructor Details
-
CameraPinholeBrown
public CameraPinholeBrown()Default constructor. flipY is false and everything else is zero or null. -
CameraPinholeBrown
public CameraPinholeBrown(int numRadial) -
CameraPinholeBrown
-
CameraPinholeBrown
public CameraPinholeBrown(double fx, double fy, double skew, double cx, double cy, int width, int height)
-
-
Method Details
-
reset
public void reset()Description copied from class:CameraPinhole
Sets all variables to zero.- Overrides:
reset
in classCameraPinhole
-
fsetK
public CameraPinholeBrown fsetK(double fx, double fy, double skew, double cx, double cy, int width, int height) - Overrides:
fsetK
in classCameraPinhole
-
fsetRadial
public CameraPinholeBrown fsetRadial(@Nullable @org.jetbrains.annotations.Nullable double... radial) -
fsetTangential
-
setTo
-
setTo
- Overrides:
setTo
in classCameraPinhole
-
isDistorted
public boolean isDistorted()If true then distortion parameters are specified. -
isDistorted
public boolean isDistorted(double tol) -
getRadial
@Nullable public @org.jetbrains.annotations.Nullable double[] getRadial() -
setRadial
public void setRadial(double... radial) -
print
public void print()Description copied from class:CameraModel
Prints a summary of this model to stdout- Overrides:
print
in classCameraPinhole
-
toString
- Overrides:
toString
in classCameraPinhole
-
toStringArray
public static String toStringArray(FancyPrint fp, String name, @Nullable @org.jetbrains.annotations.Nullable double[] param) -
createLike
Description copied from class:CameraModel
Creates a new camera model with zero values of the same type os this one- Overrides:
createLike
in classCameraPinhole
-