Package boofcv.struct.calib
Class CameraPinhole
- java.lang.Object
-
- boofcv.struct.calib.CameraModel
-
- boofcv.struct.calib.CameraPinhole
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
CameraPinholeBrown,CameraUniversalOmni
public class CameraPinhole extends CameraModel
Intrinsic camera parameters for a pinhole camera. Specifies the calibration matrix K and distortion parameters.
[ fx skew cx ] K = [ 0 fy cy ] [ 0 0 1 ]- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description doublecximage center (units: pixels)doublecyimage center (units: pixels)doublefxfocal length along x and y axis (units: pixels)doublefyfocal length along x and y axis (units: pixels)doubleskewskew parameter, typically 0 (units: pixels)-
Fields inherited from class boofcv.struct.calib.CameraModel
height, width
-
-
Constructor Summary
Constructors Constructor Description CameraPinhole()Default constructor.CameraPinhole(double fx, double fy, double skew, double cx, double cy, int width, int height)CameraPinhole(CameraPinhole param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CameraModel>
TcreateLike()Creates a new camera model with zero values of the same type os this oneCameraPinholefsetK(double fx, double fy, double skew, double cx, double cy, int width, int height)booleanisEquals(CameraPinhole param, double tol)booleanisInside(double x, double y)Is the pixel coordinate inside the image.booleanisInside(int x, int y)Returns true if the pixel coordinate is inside the imagevoidprint()voidset(CameraPinhole param)java.lang.StringtoString()-
Methods inherited from class boofcv.struct.calib.CameraModel
getHeight, getWidth, setHeight, setWidth
-
-
-
-
Field Detail
-
fx
public double fx
focal length along x and y axis (units: pixels)
-
fy
public double fy
focal length along x and y axis (units: pixels)
-
skew
public double skew
skew parameter, typically 0 (units: pixels)
-
cx
public double cx
image center (units: pixels)
-
cy
public double cy
image center (units: pixels)
-
-
Constructor Detail
-
CameraPinhole
public CameraPinhole()
Default constructor. flipY is false and everything else is zero or null.
-
CameraPinhole
public CameraPinhole(CameraPinhole param)
-
CameraPinhole
public CameraPinhole(double fx, double fy, double skew, double cx, double cy, int width, int height)
-
-
Method Detail
-
fsetK
public CameraPinhole fsetK(double fx, double fy, double skew, double cx, double cy, int width, int height)
-
set
public void set(CameraPinhole param)
-
isInside
public boolean isInside(double x, double y)Is the pixel coordinate inside the image. For floating points numbers a pixel is inside the image if it is less than width or height. Justification for this is if you converted it to an int it would round down and be inside.- Parameters:
x- pixel location x-axisy- pixel location y-axis- Returns:
- true if inside or false if not
-
isInside
public boolean isInside(int x, int y)Returns true if the pixel coordinate is inside the image- Parameters:
x- pixel location x-axisy- pixel location y-axis- Returns:
- true if inside or false if not
-
print
public void print()
-
createLike
public <T extends CameraModel> T createLike()
Description copied from class:CameraModelCreates a new camera model with zero values of the same type os this one- Specified by:
createLikein classCameraModel
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isEquals
public boolean isEquals(CameraPinhole param, double tol)
-
-