Package boofcv.struct.calib
Class CameraPinhole
java.lang.Object
boofcv.struct.calib.CameraModel
boofcv.struct.calib.CameraPinhole
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CameraDivision
,CameraKannalaBrandt
,CameraPinholeBrown
,CameraUniversalOmni
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:
-
Field Summary
Modifier and TypeFieldDescriptiondouble
image center (units: pixels)double
image center (units: pixels)double
focal length along x and y axis (units: pixels)double
focal length along x and y axis (units: pixels)double
skew parameter, typically 0 (units: pixels)Fields inherited from class boofcv.struct.calib.CameraModel
height, width
-
Constructor Summary
ConstructorDescriptionCameraPinhole
(double fx, double fy, double skew, double cx, double cy, int width, int height) CameraPinhole
(CameraPinhole param) Copy constructor -
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) fsetK
(double fx, double fy, double skew, double cx, double cy, int width, int height) fsetK
(DMatrixRMaj K) fsetShape
(int width, int height) boolean
isEquals
(CameraPinhole param, double tol) boolean
isInside
(double x, double y) Is the pixel coordinate inside the image.boolean
isInside
(int x, int y) Returns true if the pixel coordinate is inside the imagevoid
print()
Prints a summary of this model to stdoutvoid
reset()
Sets all variables to zero.setTo
(CameraPinhole param) toString()
Methods inherited from class boofcv.struct.calib.CameraModel
getDimension, getHeight, getWidth, isSameShape, isSameShape, setHeight, setWidth
-
Field Details
-
fx
public double fxfocal length along x and y axis (units: pixels) -
fy
public double fyfocal length along x and y axis (units: pixels) -
skew
public double skewskew parameter, typically 0 (units: pixels) -
cx
public double cximage center (units: pixels) -
cy
public double cyimage center (units: pixels)
-
-
Constructor Details
-
CameraPinhole
public CameraPinhole() -
CameraPinhole
Copy constructor -
CameraPinhole
public CameraPinhole(double fx, double fy, double skew, double cx, double cy, int width, int height)
-
-
Method Details
-
reset
public void reset()Sets all variables to zero. -
fsetK
-
fsetK
-
fsetK
public CameraPinhole fsetK(double fx, double fy, double skew, double cx, double cy, int width, int height) -
fsetShape
-
setTo
-
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()Description copied from class:CameraModel
Prints a summary of this model to stdout- Overrides:
print
in classCameraModel
-
createLike
Description copied from class:CameraModel
Creates a new camera model with zero values of the same type os this one- Specified by:
createLike
in classCameraModel
-
toString
-
isEquals
-