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
FieldsModifier and TypeFieldDescription@org.jetbrains.annotations.Nullable double[]radial distortion parametersdoubletangential distortion parametersdoubletangential distortion parametersFields inherited from class boofcv.struct.calib.CameraModel
height, width -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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[]booleanIf true then distortion parameters are specified.booleanisDistorted(double tol) voidprint()Prints a summary of this model to stdoutvoidreset()Sets all variables to zero.voidsetRadial(double... radial) setTo(CameraPinhole param) setTo(CameraPinholeBrown param) toString()static StringtoStringArray(FancyPrint fp, String name, @org.jetbrains.annotations.Nullable double[] param) Methods inherited from class boofcv.struct.calib.CameraPinhole
fsetK, fsetK, fsetShape, isEquals, isInside, isInsideMethods 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:CameraPinholeSets all variables to zero.- Overrides:
resetin classCameraPinhole
-
fsetK
public CameraPinholeBrown fsetK(double fx, double fy, double skew, double cx, double cy, int width, int height) - Overrides:
fsetKin classCameraPinhole
-
fsetRadial
public CameraPinholeBrown fsetRadial(@Nullable @org.jetbrains.annotations.Nullable double... radial) -
fsetTangential
-
setTo
-
setTo
- Overrides:
setToin 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:CameraModelPrints a summary of this model to stdout- Overrides:
printin classCameraPinhole
-
toString
- Overrides:
toStringin classCameraPinhole
-
toStringArray
public static String toStringArray(FancyPrint fp, String name, @Nullable @org.jetbrains.annotations.Nullable double[] param) -
createLike
Description copied from class:CameraModelCreates a new camera model with zero values of the same type os this one- Overrides:
createLikein classCameraPinhole
-