Package org.robwork.sdurw_sensor
Class CameraModel
- java.lang.Object
-
- org.robwork.sdurw_kinematics.Stateless
-
- org.robwork.sdurw_sensor.SensorModel
-
- org.robwork.sdurw_sensor.CameraModel
-
public class CameraModel extends SensorModel
The CameraModel class defines a generel pinhole camera model where
camera parameters and state values are stored.
-
-
Constructor Summary
Constructors Constructor Description CameraModel(long cPtr, boolean cMemoryOwn)CameraModel(ProjectionMatrix projection, java.lang.String name, FramePtr frame)constructorCameraModel(ProjectionMatrix projection, java.lang.String name, FramePtr frame, java.lang.String modelInfo)constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()static longgetCPtr(CameraModel obj)doublegetFarClippingPlane()get far clipping planedoublegetFieldOfViewX()get horisontal field of view.doublegetFieldOfViewY()get Vertical field of view.ImagePtrgetImage(State state)returns the image if it has been saved in the State.doublegetNearClippingPlane()get near clipping planeProjectionMatrixgetProjectionMatrix()get the camera projection matrixvoidsetImage(ImagePtr img, State state)set the image in the state-
Methods inherited from class org.robwork.sdurw_sensor.SensorModel
attachTo, getCPtr, getDescription, getFrame, getName, getPropertyMap, setDescription, setName
-
Methods inherited from class org.robwork.sdurw_kinematics.Stateless
getCPtr, getStateStructure, isRegistered, registerIn, registerIn, unregister
-
-
-
-
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 modelname- [in] name of cameraframe- [in] frame that camera is attached/referenced tomodelInfo- [in] text description of the camera
-
CameraModel
public CameraModel(ProjectionMatrix projection, java.lang.String name, FramePtr frame)
constructor- Parameters:
projection- [in] pinhole projection modelname- [in] name of cameraframe- [in] frame that camera is attached/referenced to
-
-
Method Detail
-
getCPtr
public static long getCPtr(CameraModel obj)
-
delete
public void delete()
- Overrides:
deletein classSensorModel
-
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 statestate- [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.
-
-