Class GLFrameGrabber25D


  • public class GLFrameGrabber25D
    extends FrameGrabber25D
    An implementation of the FrameGrabber interface. The GLFrameGrabber25D
    grabs images from a OpenGL scene using a simple pinhole camera model.

    a framethe opengl rendering to
    take pictures of the scene.

    The most basic parameter of a camera is its Field of view. This
    can be used as an initial camera model. Field of view can be
    calculated from the focal length and the size of the CCD
    typically (1/2, 1/3, 1/4) inch.
    If a more realistic camera model is
    required the perspective transform of a specific camera can be added
    • Constructor Summary

      Constructors 
      Constructor Description
      GLFrameGrabber25D​(int width, int height, double fov)
      constructor
      GLFrameGrabber25D​(int width, int height, double fov, double mindepth)
      constructor
      GLFrameGrabber25D​(int width, int height, double fov, double mindepth, double maxdepth)
      constructor
      GLFrameGrabber25D​(long cPtr, boolean cMemoryOwn)  
    • Constructor Detail

      • GLFrameGrabber25D

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

        public GLFrameGrabber25D​(int width,
                                 int height,
                                 double fov,
                                 double mindepth,
                                 double maxdepth)
        constructor
        Parameters:
        width - [in] width of image
        height - [in] height of image
        fov - [in] the vertical field of view angle in degree
        mindepth - [in] the minimum depth of camera.
        maxdepth - [in] the maximum depth of camera.
      • GLFrameGrabber25D

        public GLFrameGrabber25D​(int width,
                                 int height,
                                 double fov,
                                 double mindepth)
        constructor
        Parameters:
        width - [in] width of image
        height - [in] height of image
        fov - [in] the vertical field of view angle in degree
        mindepth - [in] the minimum depth of camera.
      • GLFrameGrabber25D

        public GLFrameGrabber25D​(int width,
                                 int height,
                                 double fov)
        constructor
        Parameters:
        width - [in] width of image
        height - [in] height of image
        fov - [in] the vertical field of view angle in degree

    • Method Detail

      • init

        public boolean init​(SWIGTYPE_p_rw__core__PtrT_rw__graphics__SceneViewer_t drawer)
        initialize the grabber with a scene viewer. This registers the grabber
        as a camera in the scene and enables rendering.
        Parameters:
        drawer - [in] the scene viewer
        Returns:
        true if initialization succeeded, false otherwise (depends on the capabilities of
        the SceneViewer).
      • setMaxDepth

        public void setMaxDepth​(double depth)
        set the maximum depth that is percieved by this frame grabber.
        If min and max depth are too far apart the resolution of the depth
        perception will become bad. Hence keep the range realistic.
        Parameters:
        depth - [in] max depth
      • setMinDepth

        public void setMinDepth​(double depth)
        set the minimum depth that is percieved by this frame grabber.
        If min and max depth are too far apart the resolution of the depth
        perception will become bad. Hence keep the range realistic.
        Parameters:
        depth - [in] min depth
      • grab

        public void grab​(FramePtr frame,
                         State state)
        Description copied from class: FrameGrabber25D
        this function grabs a image from the specialized source and
        copies it to the FrameGrabber25D image.
        Overrides:
        grab in class FrameGrabber25D
      • getMaxDepth

        public double getMaxDepth()
        Description copied from class: FrameGrabber25D
        maximum depth that this framegrabber can handle
        Overrides:
        getMaxDepth in class FrameGrabber25D
        Returns:
        maximum depth in meter
      • getMinDepth

        public double getMinDepth()
        Description copied from class: FrameGrabber25D
        minimum depth that this framegrabber can handle
        Overrides:
        getMinDepth in class FrameGrabber25D
        Returns:
        minimum depth in meter
      • getFieldOfViewY

        public double getFieldOfViewY()
        Description copied from class: FrameGrabber25D
        Returns the field of view measured around the y-axis.
        Overrides:
        getFieldOfViewY in class FrameGrabber25D
        Returns:
        Field of view measured around y-axis in radians