RobWorkProject
24.12.4-
|
The CameraModel class defines a generel pinhole camera model where camera parameters and state values are stored. More...
#include <CameraModel.hpp>
Inherits SensorModel.
Classes | |
class | CameraModelCache |
CameraModelCache that define data to store in the State. More... | |
Public Types | |
typedef rw::core::Ptr< CameraModel > | Ptr |
smart pointer type to this class | |
typedef rw::core::Ptr< const CameraModel > | CPtr |
smart pointer type to this const class | |
Public Types inherited from SensorModel | |
typedef rw::core::Ptr< SensorModel > | Ptr |
smart pointer type | |
Public Types inherited from Stateless | |
typedef rw::core::Ptr< Stateless > | Ptr |
Smart pointer type for Stateless. | |
Public Member Functions | |
CameraModel (const rw::math::ProjectionMatrix &projection, const std::string &name, rw::core::Ptr< rw::kinematics::Frame > frame, const std::string &modelInfo="") | |
virtual | ~CameraModel () |
destructor | |
Image::Ptr | getImage (const rw::kinematics::State &state) |
returns the image if it has been saved in the State. Else null is returned. More... | |
void | setImage (Image::Ptr img, rw::kinematics::State &state) |
set the image in the state More... | |
rw::math::ProjectionMatrix | getProjectionMatrix () const |
get the camera projection matrix | |
double | getFieldOfViewX () const |
get horisontal field of view. More... | |
double | getFieldOfViewY () const |
get Vertical field of view. More... | |
double | getFarClippingPlane () const |
get far clipping plane More... | |
double | getNearClippingPlane () const |
get near clipping plane More... | |
Public Member Functions inherited from SensorModel | |
SensorModel (const std::string &name, rw::core::Ptr< kinematics::Frame > frame) | |
constructor More... | |
SensorModel (const std::string &name, rw::core::Ptr< kinematics::Frame > frame, const std::string &description) | |
constructor More... | |
virtual | ~SensorModel () |
destructor | |
void | setName (const std::string &name) |
sets the name of this sensor More... | |
void | setDescription (const std::string &description) |
sets the description of this sensor More... | |
const std::string & | getName () const |
returns the name of this sensor More... | |
const std::string & | getDescription () const |
returns a description of this sensor More... | |
kinematics::Frame * | getFrame () const |
The frame to which the sensor is attached. More... | |
virtual void | attachTo (rw::core::Ptr< kinematics::Frame > frame) |
Sets the frame to which the sensor should be attached. More... | |
rw::core::PropertyMap & | getPropertyMap () |
gets the propertymap of this sensor | |
const rw::core::PropertyMap & | getPropertyMap () const |
gets the propertymap of this sensor | |
Public Member Functions inherited from Stateless | |
virtual | ~Stateless () |
destructor | |
virtual void | registerIn (State &state) |
initialize this stateless data to a specific state More... | |
virtual void | registerIn (StateStructure::Ptr state) |
register this stateless object in a statestructure. | |
virtual void | unregister () |
unregisters all state data of this stateless object | |
StateStructure::Ptr | getStateStructure () |
Get the state structure. More... | |
const StateStructure::Ptr | getStateStructure () const |
Get the state structure. More... | |
bool | isRegistered () |
Check if object has registered its state. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Stateless | |
Stateless () | |
constructor | |
template<class T > | |
void | add (StatelessData< T > &data) |
implementations of sensor should add all their stateless data on initialization | |
void | add (StateData *data) |
Add data. More... | |
void | add (rw::core::Ptr< StateData > data) |
implementations of sensor should add all their state data on initialization | |
Protected Attributes inherited from Stateless | |
bool | _registered |
True if object has registered its state. | |
std::vector< rw::core::Ptr< StateData > > | _datas |
Data. | |
StateStructure::Ptr | _stateStruct |
The state structure. | |
The CameraModel class defines a generel pinhole camera model where camera parameters and state values are stored.
CameraModel | ( | const rw::math::ProjectionMatrix & | projection, |
const std::string & | name, | ||
rw::core::Ptr< rw::kinematics::Frame > | frame, | ||
const std::string & | modelInfo = "" |
||
) |
constructor
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 |
double getFarClippingPlane | ( | ) | const |
get far clipping plane
double getFieldOfViewX | ( | ) | const |
get horisontal field of view.
double getFieldOfViewY | ( | ) | const |
get Vertical field of view.
Image::Ptr getImage | ( | const rw::kinematics::State & | state | ) |
returns the image if it has been saved in the State. Else null is returned.
state | [in] the state in which the image is taken. |
double getNearClippingPlane | ( | ) | const |
get near clipping plane
void setImage | ( | Image::Ptr | img, |
rw::kinematics::State & | state | ||
) |
set the image in the state
img | [in] image to set in state |
state | [in/out] the state in which to set the image. |