JeVois
1.21
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/Core/CameraCalibration.H>
Helper class for camera calibration, which allows some modules to compute 3D locations of objects.
This code heavily derived from calibrate_camera.cpp in the OpenCV source tree. Keep it updated as OpenCV is updated.
Definition at line 28 of file CameraCalibration.H.
Public Member Functions | |
void | load (std::string const &fname) |
Load from file. | |
void | save (std::string const &fname) const |
Save to file. | |
Public Attributes | |
jevois::CameraSensor | sensor = jevois::CameraSensor::any |
Camera sensor. | |
jevois::CameraLens | lens = jevois::CameraLens::standard |
Camera lens. | |
int | w = 0 |
int | h = 0 |
Image width and height (camera resolution) | |
cv::Mat | camMatrix = cv::Mat::eye(3, 3, CV_64F) |
3x3 camera matrix | |
cv::Mat | distCoeffs = cv::Mat::zeros(5, 1, CV_64F) |
5x1 distortion coefficients | |
double | avgReprojErr = 0.0 |
Average reprojection error. | |
void jevois::CameraCalibration::load | ( | std::string const & | fname | ) |
Load from file.
Throws std::runtime_error if file not found
Definition at line 23 of file CameraCalibration.C.
References avgReprojErr, camMatrix, distCoeffs, h, lens, sensor, and w.
Referenced by jevois::Engine::loadCameraCalibration().
void jevois::CameraCalibration::save | ( | std::string const & | fname | ) | const |
Save to file.
Throws std::runtime_error if file cannot be written
Definition at line 38 of file CameraCalibration.C.
References h, and jevois::to_string().
Referenced by jevois::Engine::saveCameraCalibration().
double jevois::CameraCalibration::avgReprojErr = 0.0 |
Average reprojection error.
Definition at line 36 of file CameraCalibration.H.
Referenced by load().
cv::Mat jevois::CameraCalibration::camMatrix = cv::Mat::eye(3, 3, CV_64F) |
cv::Mat jevois::CameraCalibration::distCoeffs = cv::Mat::zeros(5, 1, CV_64F) |
5x1 distortion coefficients
Definition at line 35 of file CameraCalibration.H.
Referenced by load().
int jevois::CameraCalibration::h = 0 |
Image width and height (camera resolution)
Definition at line 33 of file CameraCalibration.H.
Referenced by load(), jevois::Engine::loadCameraCalibration(), and jevois::Engine::saveCameraCalibration().
jevois::CameraLens jevois::CameraCalibration::lens = jevois::CameraLens::standard |
Camera lens.
Definition at line 32 of file CameraCalibration.H.
Referenced by load(), jevois::Engine::loadCameraCalibration(), and jevois::Engine::saveCameraCalibration().
jevois::CameraSensor jevois::CameraCalibration::sensor = jevois::CameraSensor::any |
Camera sensor.
Definition at line 31 of file CameraCalibration.H.
Referenced by load(), jevois::Engine::loadCameraCalibration(), and jevois::Engine::saveCameraCalibration().
int jevois::CameraCalibration::w = 0 |
Definition at line 33 of file CameraCalibration.H.
Referenced by load(), jevois::Engine::loadCameraCalibration(), and jevois::Engine::saveCameraCalibration().