Class CameraUniversalOmni
- java.lang.Object
-
- boofcv.struct.calib.CameraModel
-
- boofcv.struct.calib.CameraPinhole
-
- boofcv.struct.calib.CameraUniversalOmni
-
- All Implemented Interfaces:
java.io.Serializable
public class CameraUniversalOmni extends CameraPinhole
Camera model for omnidirectional single viewpoint sensors [1]. Designed to work with parabolic, hyperbolic, wide-angle, and spherical sensors. The FOV that this model can describe is dependent on the mirror parameter ξ. See [1] for details, but for example ξ=0 is a pinhole camera, ξ=1 can describe fisheye cameras, but a value larger than 1 is limited to 180 degrees due to multiple points on the unit sphere intersecting the same projection line. This is the same model as
Forward ProjectionCameraPinholeBrownexcept that there is a change in reference frame which allows it to model wider FOV.- Given a 3D point X=(x,y,z) in camera (mirror) coordinates
- Project onto unit sphere Xs=X/||X||
- Change reference frame X'=(x',y',z') = (xs,ys,zs + ξ)
- Compute normalized image coordinates (u,v)=(x'/z', y'/z')
- Apply radial and tangential distortion (see below)
- Convert into pixels p = K*distort([u;v])
Camera Projection [ fx skew cx ] K = [ 0 fy cy ] [ 0 0 1 ]Radial and Tangential Distortion:
xd = xn + xn[k1 r2 + ... + kn r2n]
dxu = [ 2t1 u v + t2(r2 + 2u2)]
dxv = [ t1(r2 + 2v2) + 2 t2 u v]
r2 = u2 + v2
where xd is the distorted normalized image coordinates, xn=(u,v) is undistorted normalized image coordinates.NOTE: The only difference from [1] is that skew is used instead of fx*alpha.
[1] Christopher Mei, and Patrick Rives. "Single view point omnidirectional camera calibration from planar grids." ICRA 2007.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description doublemirrorOffsetMirror offset distance.double[]radialradial distortion parameters: k1,...,kndoublet1tangential distortion parametersdoublet2tangential distortion parameters-
Fields inherited from class boofcv.struct.calib.CameraModel
height, width
-
-
Constructor Summary
Constructors Constructor Description CameraUniversalOmni(int numRadial)Constructor for specifying number of radial distortionCameraUniversalOmni(CameraUniversalOmni original)Copy constructor
-
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 oneCameraUniversalOmnifsetMirror(double mirrorOffset)CameraUniversalOmnifsetRadial(double... radial)CameraUniversalOmnifsetTangental(double t1, double t2)doublegetMirrorOffset()double[]getRadial()doublegetT1()doublegetT2()voidprint()voidset(CameraUniversalOmni original)Assigns this model to be identical to the passed in modelvoidsetMirrorOffset(double mirrorOffset)voidsetRadial(double[] radial)voidsetT1(double t1)voidsetT2(double t2)-
Methods inherited from class boofcv.struct.calib.CameraPinhole
fsetK, isEquals, isInside, isInside, set, toString
-
Methods inherited from class boofcv.struct.calib.CameraModel
getHeight, getWidth, setHeight, setWidth
-
-
-
-
Constructor Detail
-
CameraUniversalOmni
public CameraUniversalOmni(int numRadial)
Constructor for specifying number of radial distortion- Parameters:
numRadial- Number of radial distortion parameters
-
CameraUniversalOmni
public CameraUniversalOmni(CameraUniversalOmni original)
Copy constructor- Parameters:
original- Model which is to be copied
-
-
Method Detail
-
fsetMirror
public CameraUniversalOmni fsetMirror(double mirrorOffset)
-
fsetRadial
public CameraUniversalOmni fsetRadial(double... radial)
-
fsetTangental
public CameraUniversalOmni fsetTangental(double t1, double t2)
-
set
public void set(CameraUniversalOmni original)
Assigns this model to be identical to the passed in model- Parameters:
original- Model which is to be copied
-
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- Overrides:
createLikein classCameraPinhole
-
getRadial
public double[] getRadial()
-
setRadial
public void setRadial(double[] radial)
-
getT1
public double getT1()
-
setT1
public void setT1(double t1)
-
getT2
public double getT2()
-
setT2
public void setT2(double t2)
-
getMirrorOffset
public double getMirrorOffset()
-
setMirrorOffset
public void setMirrorOffset(double mirrorOffset)
-
print
public void print()
- Overrides:
printin classCameraPinhole
-
-