|
stereo-vision
|
The base class defining a simple camera. More...
#include <camera.h>
Public Member Functions | |
| Camera (string intrinsicFilePath) | |
| Costructor for initialization from file. More... | |
| Camera () | |
| Default Constructor. More... | |
| void | calibrate (vector< string > imageList, int boardWidth, int boardHeight) |
| It performs the camera calibration. More... | |
| bool | saveCalibration (string intrinsicFilePath) |
| It saves the calibration. More... | |
| Mat | undistortImage (Mat image) |
| It undistorts an image using the intrinsic parameters. More... | |
| Mat | getCameraMatrix () |
| It returns the 3x3 camera matrix. More... | |
| Mat | getDistVector () |
| It returns the 4x1 distortion coefficients. More... | |
| void | setCameraMatrix (Mat &K) |
| It sets the camera parameters. More... | |
| void | setDistCoefficients (Mat &Dist) |
| It sets the distortion parameters. More... | |
The base class defining a simple camera.
It allows to calibrate the camera and to undistort a pair of images.
| Camera::Camera | ( | string | intrinsicFilePath | ) |
Costructor for initialization from file.
| intrisicFileName | the path of the intrinsic parameters file. |
Definition at line 25 of file camera.cpp.
|
inline |
| void Camera::calibrate | ( | vector< string > | imageList, |
| int | boardWidth, | ||
| int | boardHeight | ||
| ) |
It performs the camera calibration.
| imageList | is the list containing the paths of the images with the chessboard patterns. |
| boardWidth | the number of inner corners in the width direction of the chess board pattern (see stereoCalibration module) |
| boardHeight | the number of inner corners in the height direction of the chess board pattern (see stereoCalibration module) |
Definition at line 53 of file camera.cpp.
| Mat Camera::getCameraMatrix | ( | ) |
It returns the 3x3 camera matrix.
Definition at line 264 of file camera.cpp.
Referenced by StereoCamera::StereoCamera().
| Mat Camera::getDistVector | ( | ) |
It returns the 4x1 distortion coefficients.
Definition at line 267 of file camera.cpp.
Referenced by StereoCamera::StereoCamera().
| bool Camera::saveCalibration | ( | string | intrinsicFilePath | ) |
It saves the calibration.
| intrinsicFilePath | the path of the intrinsic parameters file |
Definition at line 237 of file camera.cpp.
| void Camera::setCameraMatrix | ( | Mat & | K | ) |
It sets the camera parameters.
| K | 3x3 camera matrix. |
Definition at line 277 of file camera.cpp.
| void Camera::setDistCoefficients | ( | Mat & | Dist | ) |
It sets the distortion parameters.
| D | 4x1 camera distortion parameters. |
Definition at line 281 of file camera.cpp.
| Mat Camera::undistortImage | ( | Mat | image | ) |
It undistorts an image using the intrinsic parameters.
| image | the input distorted image. |
Definition at line 271 of file camera.cpp.