Class 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 CameraPinholeBrown except that there is a change in reference frame which allows it to model wider FOV.

    Forward Projection
    1. Given a 3D point X=(x,y,z) in camera (mirror) coordinates
    2. Project onto unit sphere Xs=X/||X||
    3. Change reference frame X'=(x',y',z') = (xs,ys,zs + ξ)
    4. Compute normalized image coordinates (u,v)=(x'/z', y'/z')
    5. Apply radial and tangential distortion (see below)
    6. 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 Detail

      • mirrorOffset

        public double mirrorOffset
        Mirror offset distance. ξ
      • radial

        public double[] radial
        radial distortion parameters: k1,...,kn
      • t1

        public double t1
        tangential distortion parameters
      • t2

        public double t2
        tangential distortion parameters
    • 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

      • 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: CameraModel
        Creates a new camera model with zero values of the same type os this one
        Overrides:
        createLike in class CameraPinhole
      • 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)