Class CameraUniversalOmni
- All Implemented Interfaces:
Serializable
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
CameraPinholeBrown
except 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:
-
Field Summary
Modifier and TypeFieldDescriptiondouble
Mirror offset distance.double[]
radial distortion parameters: k1,...,kndouble
tangential distortion parametersdouble
tangential distortion parametersFields inherited from class boofcv.struct.calib.CameraModel
height, width
-
Constructor Summary
ConstructorDescriptionCameraUniversalOmni
(int numRadial) Constructor for specifying number of radial distortionCameraUniversalOmni
(CameraUniversalOmni original) Copy constructor -
Method Summary
Modifier and TypeMethodDescription<T extends CameraModel>
TCreates a new camera model with zero values of the same type os this onefsetMirror
(double mirrorOffset) fsetRadial
(double... radial) fsetTangential
(double t1, double t2) double
double[]
double
getT1()
double
getT2()
void
print()
Prints a summary of this model to stdoutvoid
setMirrorOffset
(double mirrorOffset) void
setRadial
(double[] radial) void
setT1
(double t1) void
setT2
(double t2) void
setTo
(CameraUniversalOmni original) Assigns this model to be identical to the passed in modeltoString()
Methods inherited from class boofcv.struct.calib.CameraPinhole
fsetK, fsetK, fsetK, fsetShape, isEquals, isInside, isInside, reset, setTo
Methods inherited from class boofcv.struct.calib.CameraModel
getDimension, getHeight, getWidth, isSameShape, isSameShape, setHeight, setWidth
-
Field Details
-
mirrorOffset
public double mirrorOffsetMirror offset distance. ξ -
radial
public double[] radialradial distortion parameters: k1,...,kn -
t1
public double t1tangential distortion parameters -
t2
public double t2tangential distortion parameters
-
-
Constructor Details
-
CameraUniversalOmni
public CameraUniversalOmni(int numRadial) Constructor for specifying number of radial distortion- Parameters:
numRadial
- Number of radial distortion parameters
-
CameraUniversalOmni
Copy constructor- Parameters:
original
- Model which is to be copied
-
-
Method Details
-
fsetMirror
-
fsetRadial
-
fsetTangential
-
setTo
Assigns this model to be identical to the passed in model- Parameters:
original
- Model which is to be copied
-
createLike
Description copied from class:CameraModel
Creates a new camera model with zero values of the same type os this one- Overrides:
createLike
in 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) -
toString
- Overrides:
toString
in classCameraPinhole
-
print
public void print()Description copied from class:CameraModel
Prints a summary of this model to stdout- Overrides:
print
in classCameraPinhole
-