Package boofcv.alg.geo.bundle.cameras
Class BundlePinholeSimplified
- java.lang.Object
-
- boofcv.alg.geo.bundle.cameras.BundlePinholeSimplified
-
- All Implemented Interfaces:
BundleAdjustmentCamera
- Direct Known Subclasses:
BundlePinholeSnavely
public class BundlePinholeSimplified extends java.lang.Object implements BundleAdjustmentCamera
A pinhole camera with radial distortion that is fully described using three parameters. Focal length and two radial distortion parameters. Assumptions:- Zero skew
- fx and fy is the same, e.g. square pixels
- No tangential distortion
- Image center is at coordinate (0,0)
-
-
Constructor Summary
Constructors Constructor Description BundlePinholeSimplified()BundlePinholeSimplified(double f, double k1, double k2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BundlePinholeSimplifiedcopy()voidgetIntrinsic(double[] parameters, int offset)Copies the intrinsic camera into the array.intgetIntrinsicCount()Returns the number of intrinsic parameters for this model.voidjacobian(double X, double Y, double Z, double[] inputX, double[] inputY, boolean computeIntrinsic, double[] calibX, double[] calibY)Computes the gradient for the projected pixel coordinate with partials for the input 3D point in camera reference frame and camera intrinsic parameters.voidproject(double camX, double camY, double camZ, georegression.struct.point.Point2D_F64 output)Project the 3D point in the camera reference frame onto the camera's image plane.voidset(BundlePinholeSimplified c)voidsetIntrinsic(double[] parameters, int offset)Specifies the intrinsic camera parameters.java.lang.StringtoString()
-
-
-
Method Detail
-
setIntrinsic
public void setIntrinsic(double[] parameters, int offset)Description copied from interface:BundleAdjustmentCameraSpecifies the intrinsic camera parameters.- Specified by:
setIntrinsicin interfaceBundleAdjustmentCamera- Parameters:
parameters- Array containing the parametersoffset- Location of first index in the array which the parameters are stored
-
getIntrinsic
public void getIntrinsic(double[] parameters, int offset)Description copied from interface:BundleAdjustmentCameraCopies the intrinsic camera into the array.- Specified by:
getIntrinsicin interfaceBundleAdjustmentCamera- Parameters:
parameters- Array containing the parametersoffset- Location of first index in the array which the parameters are stored
-
project
public void project(double camX, double camY, double camZ, georegression.struct.point.Point2D_F64 output)Description copied from interface:BundleAdjustmentCameraProject the 3D point in the camera reference frame onto the camera's image plane.- Specified by:
projectin interfaceBundleAdjustmentCamera- Parameters:
camX- 3D point in camera reference framecamY- 3D point in camera reference framecamZ- 3D point in camera reference frameoutput- Storage for projected point.
-
jacobian
public void jacobian(double X, double Y, double Z, double[] inputX, double[] inputY, boolean computeIntrinsic, double[] calibX, double[] calibY)Description copied from interface:BundleAdjustmentCameraComputes the gradient for the projected pixel coordinate with partials for the input 3D point in camera reference frame and camera intrinsic parameters.[x',y']is the projected pixel coordinate of the 3D point in camera reference frame.- Specified by:
jacobianin interfaceBundleAdjustmentCamera- Parameters:
X- (Input) 3D point in camera reference frameY- (Input) 3D point in camera reference frameZ- (Input) 3D point in camera reference frameinputX- (Output) Partial of projected x' relative to input camera point.[@x'/@camX, @ x' / @ camY, @ x' / @ camZ]length 3inputY- (Output) Partial of projected y' relative to input camera point.[@y'/@camX, @ y' / @ camY, @ y' / @ camZ]length 3computeIntrinsic- If true the calibX and calibY is computed. Otherwise they are ignored and can be nullcalibX- (Output) Partial of projected x' relative to calibration parameters. length NcalibY- (Output) Partial of projected y' relative to calibration parameters. length N
-
getIntrinsicCount
public int getIntrinsicCount()
Description copied from interface:BundleAdjustmentCameraReturns the number of intrinsic parameters for this model. If the camera is known then the number of parameters is zero- Specified by:
getIntrinsicCountin interfaceBundleAdjustmentCamera- Returns:
- number of intrinsic parameters.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
set
public void set(BundlePinholeSimplified c)
-
copy
public BundlePinholeSimplified copy()
-
-