JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
jevois::CameraCalibration Class Reference

#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.
 
bool fisheye
 True for fisheye lens, requires different correction.
 
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.
 

Member Function Documentation

◆ load()

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, fisheye, h, lens, sensor, and w.

Referenced by jevois::Engine::loadCameraCalibration().

◆ save()

void jevois::CameraCalibration::save ( std::string const &  fname) const

Save to file.

Throws std::runtime_error if file cannot be written

Definition at line 39 of file CameraCalibration.C.

References h, and jevois::to_string().

Referenced by jevois::Engine::saveCameraCalibration().

Member Data Documentation

◆ avgReprojErr

double jevois::CameraCalibration::avgReprojErr = 0.0

Average reprojection error.

Definition at line 37 of file CameraCalibration.H.

Referenced by load().

◆ camMatrix

cv::Mat jevois::CameraCalibration::camMatrix = cv::Mat::eye(3, 3, CV_64F)

3x3 camera matrix

Definition at line 35 of file CameraCalibration.H.

Referenced by load().

◆ distCoeffs

cv::Mat jevois::CameraCalibration::distCoeffs = cv::Mat::zeros(5, 1, CV_64F)

5x1 distortion coefficients

Definition at line 36 of file CameraCalibration.H.

Referenced by load().

◆ fisheye

bool jevois::CameraCalibration::fisheye

True for fisheye lens, requires different correction.

Definition at line 33 of file CameraCalibration.H.

Referenced by load().

◆ h

int jevois::CameraCalibration::h = 0

Image width and height (camera resolution)

Definition at line 34 of file CameraCalibration.H.

Referenced by load(), jevois::Engine::loadCameraCalibration(), and jevois::Engine::saveCameraCalibration().

◆ lens

jevois::CameraLens jevois::CameraCalibration::lens = jevois::CameraLens::standard

◆ sensor

jevois::CameraSensor jevois::CameraCalibration::sensor = jevois::CameraSensor::any

◆ w

int jevois::CameraCalibration::w = 0

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