CamCalib
- The correct title of this article is camCalib. The initial letter is shown capitalized due to technical restrictions.
Author: Jonas Ruesch, Alexandre Bernardino
Undistort input image stream according to intrinsic camera parameters. Additionally a projection operation can be specified (currently pinhole and spherical projection).
This module will perform a geometic spatial warping / rectification (e.g. to allow simple stereo matching) based on the intrinsic camera parameters recovered by camCalibConf.
Webpage for this module: http://eris.liralab.it/iCub/main/dox/html/group__icub__camCalib.html
Back to iCub YARP module specifications
Compiler & Linker Dependencies
Include files
#include <iCub/CamCalibModule.h> #include <iCub/PinholeCalibTool.h> #include <iCub/SphericalCalibtool.h>
Libraries
YARP OpenCV spmap
spmap is an iCub library containing functions to convert to and from spherical coordinates and map images to the egosphere. Right now it is basically used by the egosphere module, but in the future it may be used by other modules to represent orientations in a standard way.
Run-time Dependencies
Module arguments
If desired, command line arguments can be moved to a configuration file by specifying
--file <filename.ini>
. This is useful for complicated configurations.
Here is an example ini file (documentation on module webpage):
projection pinhole drawCenterCross 1 w 320 h 240 fx 221.607 fy 221.689 cx 174.29 cy 130.528 k1 -0.397161 k2 0.180303 p1 4.08465e-005 p2 0.000456613
Ports accessed
Ports that are assumed to exist prior to instantiation of the module (i.e. some other module must create them)
Ports created
Ports that are instantiated by the module and are then available for other modules to use (using yarp connect)
Input ports
/camcalib/image // Input image to calibrate (from camera grabber) (rgb)
Output ports
/camcalib/image // Calibrated output image (rgb)
DV Note: this 'overloading' of the ports may not be desirable. As a general principle, it's good to try to make software cohesive, with each component (module, parameter, file, port ... ) having a unique unambigous function or purpose. It may be desirable to use two distinct ports here, one input, one output.
Input data files
Configuration file created by camcalibconf module as specified in #Module arguments above.
Output data files
None.
Configuration files
Configuration file created by camcalibconf module as specified in #Module arguments above.
An example configuration file is available in iCub repository: iCub/conf/chica_eyes.ini
User interface mechanism
Run-time modification of module parameters None.
OS on which the module was developed
Windows, Linux.
OS on which the module was tested
Windows, Linux.
Operating system dependencies
None known.
Example instantiation of the module
Run & port connection commands
The following is a simple example instantiation.
REM Copyright (C) 2007 Jonas Ruesch REM CopyPolicy: Released under the terms of the GNU GPL v2.0. REM Simple example instantiation. REM You need to adapt values between <> according to your environment in order to make this work. REM The module configuration is loaded from a file specified by the --file option. To create this file REM have a look at the default terminal output of the module. A module reports it's option keys REM and default values on startup. Some modules require an additional option --group which specifies REM the name of the configuration group within the configuration file (specify without []). REM We assume you compiled in release mode. :: Start module start <ICUB_DIR>\bin\release\camCalib.exe --name /iCub/camCalib --file <x:/path/to/config.ini> --group <GROUP_NAME_IN_CONFIG_FILE> :: Start viewer start yarpview --RefreshTime 29 --name /view/camCalib :: Connect input ports yarp wait /iCub/camCalib/image yarp connect </camera> /iCub/camCalib/image :: Connect viewers yarp wait /view/camCalib yarp connect /iCub/camCalib/image /view/camCalib
See also iCub/scripts/startChicaRightEye.bat
iCub Capabilities
iCub capability code
None.
Other Yarp modules required to effect this capability
Example instantiation
Not applicable.
Back to iCub YARP module specifications