Class SimulatedCamera


  • public class SimulatedCamera
    extends SimulatedSensor
    The SimulatedCamera class makes it posible to use virtual camera
    sensors by using different framegrapper implementations.

    The SimulatedCamera implements the camera interface though the setting of
    framerate has no meaning to the virtual camera since no timing is done in
    this implementation.
    • Constructor Detail

      • SimulatedCamera

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

        public SimulatedCamera​(java.lang.String name,
                               double fov,
                               FramePtr frame,
                               FrameGrabberPtr frameGrabber)
        creates a simulated pinhole camera,
        Parameters:
        name - [in] name of sensor
        fov - [in] field of view for the camera.
        frame - [in] frame to which the camera is attached
        frameGrabber - [in] the frameGrabber from which this Camera should grab images
      • SimulatedCamera

        public SimulatedCamera​(CameraModelPtr model,
                               FrameGrabberPtr frameGrabber)
        constructor
        Parameters:
        model - [in] the model and info of the camera
        frameGrabber - [in] the frameGrabber from which this Camera should grab
        images.
    • Method Detail

      • initialize

        public boolean initialize()
      • start

        public boolean start()
      • stop

        public void stop()
      • acquire

        public void acquire()
      • isImageReady

        public boolean isImageReady()
      • getImage

        public Image getImage()
      • getFrameRate

        public double getFrameRate()
      • setFrameRate

        public void setFrameRate​(double framerate)
      • getWidth

        public long getWidth()
      • getHeight

        public long getHeight()
      • update

        public void update​(Simulator.UpdateInfo info,
                           State state)
        Description copied from class: SimulatedSensor
        steps the the SimulatedSensor with time dt and saves any state
        changes in state.
        Overrides:
        update in class SimulatedSensor
        Parameters:
        info - [in] update information related to the time step.
        state - [out] changes of the SimulatedSensor is saved in state.
      • reset

        public void reset​(State state)
        Description copied from class: SimulatedSensor
        Resets the state of the SimulatedSensor to that of state
        Overrides:
        reset in class SimulatedSensor
        Parameters:
        state - [in] the state that the sensor is reset too.
      • getCameraSensor

        public CameraPtr getCameraSensor()
        Get the camera sensor.
        Returns:
        the sensor.