Class CameraModel


  • public class CameraModel
    extends SensorModel
    The CameraModel class defines a generel pinhole camera model where
    camera parameters and state values are stored.
    • Constructor Detail

      • CameraModel

        public CameraModel​(long cPtr,
                           boolean cMemoryOwn)
      • CameraModel

        public CameraModel​(ProjectionMatrix projection,
                           java.lang.String name,
                           FramePtr frame,
                           java.lang.String modelInfo)
        constructor
        Parameters:
        projection - [in] pinhole projection model
        name - [in] name of camera
        frame - [in] frame that camera is attached/referenced to
        modelInfo - [in] text description of the camera
      • CameraModel

        public CameraModel​(ProjectionMatrix projection,
                           java.lang.String name,
                           FramePtr frame)
        constructor
        Parameters:
        projection - [in] pinhole projection model
        name - [in] name of camera
        frame - [in] frame that camera is attached/referenced to
    • Method Detail

      • getCPtr

        public static long getCPtr​(CameraModel obj)
      • getImage

        public ImagePtr getImage​(State state)
        returns the image if it has been saved in the State. Else null is
        returned.
        Parameters:
        state - [in] the state in which the image is taken.
        Returns:
        last image captured from camera.
      • setImage

        public void setImage​(ImagePtr img,
                             State state)
        set the image in the state
        Parameters:
        img - [in] image to set in state
        state - [in/out] the state in which to set the image.
      • getProjectionMatrix

        public ProjectionMatrix getProjectionMatrix()
        get the camera projection matrix
      • getFieldOfViewX

        public double getFieldOfViewX()
        get horisontal field of view.
        Returns:
        field of view in degrees
      • getFieldOfViewY

        public double getFieldOfViewY()
        get Vertical field of view.
        Returns:
        field of view in degrees
      • getFarClippingPlane

        public double getFarClippingPlane()
        get far clipping plane
        Returns:
        distance to far clipping plane in meters.
      • getNearClippingPlane

        public double getNearClippingPlane()
        get near clipping plane
        Returns:
        distance to near clipping plane in meters.