Inherited by opentl::input::FirewireCamera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.
Public Types | |
Public Member Functions | |
virtual void | captureNext () |
capture the next image from the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class | |
virtual void | captureStart () |
start the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class | |
virtual void | captureStop () |
stop the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class | |
virtual std::size_t | height () const |
Returns the height of the captured image. | |
virtual const opentl::core::cvdata::Image & | image () |
returns current frame | |
ImageSensor () | |
const opentl::math::SquareMatrix & | k_3x3 () const |
Get calibration/intrinsic transformation matrix K as 3x3. | |
const opentl::math::Matrix & | k_3x4 () const |
Get calibration/intrinsic transformation matrix K as 3x4. | |
void | perspectiveProjection (const math::Vector4 &srcSensorP, math::Vector2 &dstScreenP, opentl::math::Vector3 &dstScreenP3d) const |
Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix. | |
void | perspectiveProjection (const math::Vector4 &srcSensorP, math::Vector2 &dstScreenP) const |
Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix. | |
void | projectionLayerSize (int &rx, int &ry, double &focus) const |
Get projection layer size of sensor (= camera image dimensions). | |
void | projectionLayerSize (int &rx, int &ry) const |
Get projection layer size of sensor (= camera image dimensions). | |
const math::Matrix & | projectionMatrix () const |
Get the projection matrix of the sensor ==> Intrinsic Matrix * Extrinsic Matrix return value is then the projection matrix of this sensor (3 x 4). | |
void | setK (double f, double rx, double ry, double sigma=0) |
Set calibration / intrinsic transformation matrix K for 2D and 3D case. | |
void | setK_3x3 (const math::SquareMatrix &k3x3) |
(For convenience) this method sets the 3x3 k-matrix directly | |
void | setK_FxFy (double fx, double fy, double rx, double ry, double sigma=0) |
Set calibration / intrinsic transformation matrix K for 2D and 3D case. | |
virtual std::size_t | width () const |
Returns the width of the captured image. | |
virtual | ~ImageSensor () |
Protected Attributes | |
opentl::core::cvdata::Image * | mFrame |
std::size_t | mHeight |
math::SquareMatrix | mK_3x3 |
math::Matrix | mK_3x4 |
math::Matrix | mP |
std::size_t | mWidth |
opentl::input::ImageSensor::ImageSensor | ( | ) |
virtual opentl::input::ImageSensor::~ImageSensor | ( | ) | [virtual] |
virtual void opentl::input::ImageSensor::captureNext | ( | ) | [virtual] |
capture the next image from the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class
Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.
virtual void opentl::input::ImageSensor::captureStart | ( | ) | [virtual] |
start the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class
Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.
virtual void opentl::input::ImageSensor::captureStop | ( | ) | [virtual] |
stop the capturing process of the image sensor (e.g. a camera) IMPORTANT: implement this method in your sensor class
Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.
virtual std::size_t opentl::input::ImageSensor::height | ( | ) | const [virtual] |
Returns the height of the captured image.
virtual const opentl::core::cvdata::Image& opentl::input::ImageSensor::image | ( | ) | [virtual] |
returns current frame
Reimplemented in opentl::input::LinuxDC1394Camera, opentl::input::OpenCVCamera, and opentl::input::VideoFile.
const opentl::math::SquareMatrix& opentl::input::ImageSensor::k_3x3 | ( | ) | const |
Get calibration/intrinsic transformation matrix K as 3x3.
const opentl::math::Matrix& opentl::input::ImageSensor::k_3x4 | ( | ) | const |
Get calibration/intrinsic transformation matrix K as 3x4.
void opentl::input::ImageSensor::perspectiveProjection | ( | const math::Vector4 & | srcSensorP, | |
math::Vector2 & | dstScreenP, | |||
opentl::math::Vector3 & | dstScreenP3d | |||
) | const |
Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix.
srcSensorP | Homog. coordinate of Point in 3D sensor (camera) space | |
dstScreenP | 2D coordinate of projected point | |
dstScreenP3d | 3D coordinate of projected point (not homogeneous!) |
void opentl::input::ImageSensor::perspectiveProjection | ( | const math::Vector4 & | srcSensorP, | |
math::Vector2 & | dstScreenP | |||
) | const |
Perspective projection from sensor space to screen (intrinsic transformation) with homogeneous coordinates using K matrix.
srcSensorP | Homog. coordinate of Point in 3D sensor (camera) space | |
dstScreenP | 2D coordinate of projected point |
void opentl::input::ImageSensor::projectionLayerSize | ( | int & | rx, | |
int & | ry, | |||
double & | focus | |||
) | const |
Get projection layer size of sensor (= camera image dimensions).
rx | X-direction resolution | |
ry | Y-direction resolution | |
focus | Distance to focal point |
void opentl::input::ImageSensor::projectionLayerSize | ( | int & | rx, | |
int & | ry | |||
) | const |
Get projection layer size of sensor (= camera image dimensions).
rx | X-direction resolution | |
ry | Y-direction resolution |
const math::Matrix& opentl::input::ImageSensor::projectionMatrix | ( | ) | const |
Get the projection matrix of the sensor ==> Intrinsic Matrix * Extrinsic Matrix return value is then the projection matrix of this sensor (3 x 4).
void opentl::input::ImageSensor::setK | ( | double | f, | |
double | rx, | |||
double | ry, | |||
double | sigma = 0 | |||
) |
Set calibration / intrinsic transformation matrix K for 2D and 3D case.
f | focus of uncalibrated camera, ATTENTION: in orthogonal projection case (for 2D poses) this value is set internally to 1.0 | |
rx | width of projectionlayer | |
ry | height of projectionlayer | |
sigma | sigma (for pinhole = 0) |
void opentl::input::ImageSensor::setK_3x3 | ( | const math::SquareMatrix & | k3x3 | ) |
(For convenience) this method sets the 3x3 k-matrix directly
void opentl::input::ImageSensor::setK_FxFy | ( | double | fx, | |
double | fy, | |||
double | rx, | |||
double | ry, | |||
double | sigma = 0 | |||
) |
Set calibration / intrinsic transformation matrix K for 2D and 3D case.
fx | focus of uncalibrated camera (x-direction), ATTENTION: in orthogonal projection case (for 2D poses) this value is set internally to 1.0 | |
fy | focus of uncalibrated camera (y-direction), ATTENTION: in orthogonal projection case (for 2D poses) this value is set internally to 1.0 | |
rx | width of projectionlayer | |
ry | height of projectionlayer | |
sigma | sigma (for pinhole = 0) |
virtual std::size_t opentl::input::ImageSensor::width | ( | ) | const [virtual] |
Returns the width of the captured image.
std::size_t opentl::input::ImageSensor::mHeight [protected] |
math::SquareMatrix opentl::input::ImageSensor::mK_3x3 [protected] |
math::Matrix opentl::input::ImageSensor::mK_3x4 [protected] |
math::Matrix opentl::input::ImageSensor::mP [protected] |
std::size_t opentl::input::ImageSensor::mWidth [protected] |