iCub-main
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PinholeCalibTool Class Reference

Class to calibrate input image based on camera's internal parameters
Configuration: See PinholeCalibTool::configure. More...

#include <PinholeCalibTool.h>

+ Inheritance diagram for PinholeCalibTool:

Public Member Functions

 PinholeCalibTool ()
 
virtual ~PinholeCalibTool ()
 
virtual bool open (yarp::os::Searchable &config)
 open() passes on to configure()
 
virtual bool close ()
 
virtual bool configure (yarp::os::Searchable &config)
 The PinholeCalibTool expects a configuration file as show below.
 
void stopConfig (std::string val)
 Stop module if there is a wrong value.
 
void apply (const yarp::sig::ImageOf< yarp::sig::PixelRgb > &in, yarp::sig::ImageOf< yarp::sig::PixelRgb > &out)
 Apply calibration, in = rgb image, out = calibrated rgb image.
 
 PinholeCalibTool ()
 
virtual ~PinholeCalibTool ()
 
virtual bool open (yarp::os::Searchable &config)
 open() passes on to configure()
 
virtual bool close ()
 
virtual bool configure (yarp::os::Searchable &config)
 The PinholeCalibTool expects a configuration file as show below.
 
void stopConfig (std::string val)
 Stop module if there is a wrong value.
 
void apply (const yarp::sig::ImageOf< yarp::sig::PixelRgb > &in, yarp::sig::ImageOf< yarp::sig::PixelRgb > &out)
 Apply calibration, in = rgb image, out = calibrated rgb image.
 
 PinholeCalibTool ()
 
virtual ~PinholeCalibTool ()
 
virtual bool open (yarp::os::Searchable &config)
 open() passes on to configure()
 
virtual bool close ()
 
virtual bool configure (yarp::os::Searchable &config)
 The PinholeCalibTool expects a configuration file as show below.
 
void stopConfig (std::string val)
 Stop module if there is a wrong value.
 
void apply (const yarp::sig::ImageOf< yarp::sig::PixelRgb > &in, yarp::sig::ImageOf< yarp::sig::PixelRgb > &out)
 Apply calibration, in = rgb image, out = calibrated rgb image.
 

Detailed Description

Class to calibrate input image based on camera's internal parameters
Configuration: See PinholeCalibTool::configure.

Definition at line 38 of file PinholeCalibTool.h.

Constructor & Destructor Documentation

◆ PinholeCalibTool() [1/3]

PinholeCalibTool::PinholeCalibTool ( )

Definition at line 16 of file PinholeCalibTool.cpp.

◆ ~PinholeCalibTool() [1/3]

PinholeCalibTool::~PinholeCalibTool ( )
virtual

Definition at line 27 of file PinholeCalibTool.cpp.

◆ PinholeCalibTool() [2/3]

PinholeCalibTool::PinholeCalibTool ( )

◆ ~PinholeCalibTool() [2/3]

virtual PinholeCalibTool::~PinholeCalibTool ( )
virtual

◆ PinholeCalibTool() [3/3]

PinholeCalibTool::PinholeCalibTool ( )

◆ ~PinholeCalibTool() [3/3]

virtual PinholeCalibTool::~PinholeCalibTool ( )
virtual

Member Function Documentation

◆ apply() [1/3]

void PinholeCalibTool::apply ( const yarp::sig::ImageOf< yarp::sig::PixelRgb > &  in,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  out 
)
virtual

Apply calibration, in = rgb image, out = calibrated rgb image.

If necessary the output image is resized to match the size of the input image.

Implements ICalibTool.

◆ apply() [2/3]

void PinholeCalibTool::apply ( const yarp::sig::ImageOf< yarp::sig::PixelRgb > &  in,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  out 
)
virtual

Apply calibration, in = rgb image, out = calibrated rgb image.

If necessary the output image is resized to match the size of the input image.

Implements ICalibTool.

◆ apply() [3/3]

void PinholeCalibTool::apply ( const yarp::sig::ImageOf< yarp::sig::PixelRgb > &  in,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  out 
)
virtual

Apply calibration, in = rgb image, out = calibrated rgb image.

If necessary the output image is resized to match the size of the input image.

Implements ICalibTool.

◆ close() [1/3]

bool PinholeCalibTool::close ( )
virtual

Implements ICalibTool.

Definition at line 31 of file PinholeCalibTool.cpp.

◆ close() [2/3]

virtual bool PinholeCalibTool::close ( )
virtual

Implements ICalibTool.

◆ close() [3/3]

virtual bool PinholeCalibTool::close ( )
virtual

Implements ICalibTool.

◆ configure() [1/3]

virtual bool PinholeCalibTool::configure ( yarp::os::Searchable &  config)
virtual

The PinholeCalibTool expects a configuration file as show below.

The calibration parameters for a specific camera setup can be extracted easily by using the camcalibconf module.
fx, fy = focal length (Matlab toolbox: fc) (OpenCV fx, fy)
cx, cy = principal point (Matlab toolbox: cc) (OpenCV cx, cy)
k1, k2, p1, p2 = distortion (Matlab toolbox: First 4 components of vector kc (4th order only))
(OpenCV: k1, k2, p1, p2 where k's are radial and p's are tangential distortion coefficients. )
Example configuration for a specific camera setup with resolution 320 x 240:
[CAMERA_CALIBRATION]
projection pinhole
w 320
h 240
fx 325.42
fy 332.31
cx 177.29
cy 127.3
k1 -0.4153
k2 0.2467
p1 -0.00195
p2 0.00185

Implements ICalibTool.

◆ configure() [2/3]

virtual bool PinholeCalibTool::configure ( yarp::os::Searchable &  config)
virtual

The PinholeCalibTool expects a configuration file as show below.

The calibration parameters for a specific camera setup can be extracted easily by using the camcalibconf module.
fx, fy = focal length (Matlab toolbox: fc) (OpenCV fx, fy)
cx, cy = principal point (Matlab toolbox: cc) (OpenCV cx, cy)
k1, k2, p1, p2 = distortion (Matlab toolbox: First 4 components of vector kc (4th order only))
(OpenCV: k1, k2, p1, p2 where k's are radial and p's are tangential distortion coefficients. )
Example configuration for a specific camera setup with resolution 320 x 240:
[CAMERA_CALIBRATION]
projection pinhole
w 320
h 240
fx 325.42
fy 332.31
cx 177.29
cy 127.3
k1 -0.4153
k2 0.2467
p1 -0.00195
p2 0.00185

Implements ICalibTool.

◆ configure() [3/3]

virtual bool PinholeCalibTool::configure ( yarp::os::Searchable &  config)
virtual

The PinholeCalibTool expects a configuration file as show below.

The calibration parameters for a specific camera setup can be extracted easily by using the camcalibconf module.
fx, fy = focal length (Matlab toolbox: fc) (OpenCV fx, fy)
cx, cy = principal point (Matlab toolbox: cc) (OpenCV cx, cy)
k1, k2, p1, p2 = distortion (Matlab toolbox: First 4 components of vector kc (4th order only))
(OpenCV: k1, k2, p1, p2 where k's are radial and p's are tangential distortion coefficients. )
Example configuration for a specific camera setup with resolution 320 x 240:
[CAMERA_CALIBRATION]
projection pinhole
w 320
h 240
fx 325.42
fy 332.31
cx 177.29
cy 127.3
k1 -0.4153
k2 0.2467
p1 -0.00195
p2 0.00185

Implements ICalibTool.

◆ open() [1/3]

virtual bool PinholeCalibTool::open ( yarp::os::Searchable &  config)
virtual

open() passes on to configure()

Implements ICalibTool.

◆ open() [2/3]

virtual bool PinholeCalibTool::open ( yarp::os::Searchable &  config)
virtual

open() passes on to configure()

Implements ICalibTool.

◆ open() [3/3]

virtual bool PinholeCalibTool::open ( yarp::os::Searchable &  config)
virtual

open() passes on to configure()

Implements ICalibTool.

◆ stopConfig() [1/3]

void PinholeCalibTool::stopConfig ( std::string  val)

Stop module if there is a wrong value.

Definition at line 48 of file PinholeCalibTool.cpp.

◆ stopConfig() [2/3]

void PinholeCalibTool::stopConfig ( std::string  val)

Stop module if there is a wrong value.

◆ stopConfig() [3/3]

void PinholeCalibTool::stopConfig ( std::string  val)

Stop module if there is a wrong value.


The documentation for this class was generated from the following files: