CameraParameters Struct Reference

Structure containing the intrinsic parameters of a camera. More...

Functions

CameraParameters scale (sl::Resolution const &output_resolution) const
 Return the sl::CameraParameters for another resolution. More...
 

Attributes

float fx
 Focal length in pixels along x axis. More...
 
float fy
 Focal length in pixels along y axis. More...
 
float cx
 Optical center along x axis, defined in pixels (usually close to width / 2). More...
 
float cy
 Optical center along y axis, defined in pixels (usually close to height / 2). More...
 
double disto [12]
 Distortion factor : [k1, k2, p1, p2, k3, k4, k5, k6, s1, s2, s3, s4]. More...
 
float v_fov
 Vertical field of view, in degrees. More...
 
float h_fov
 Horizontal field of view, in degrees. More...
 
float d_fov
 Diagonal field of view, in degrees. More...
 
Resolution image_size
 Size in pixels of the images given by the camera. More...
 
float focal_length_metric
 Real focal length in millimeters. More...
 

Detailed Description

Structure containing the intrinsic parameters of a camera.

That information about the camera will be returned by sl::Camera.getCameraInformation().

Note
Similar to the sl::CalibrationParameters, those parameters are taken from the settings file (SNXXX.conf) and are modified during the sl::Camera.open() call when running a self-calibration).
Those parameters given after sl::Camera.open() call, represent the camera matrix corresponding to rectified or unrectified images.
When filled with rectified parameters, fx, fy, cx, cy must be the same for left and right camera once sl::Camera.open() has been called.
Since distortion is corrected during rectification, distortion should not be considered on rectified images.

Functions

◆ scale()

CameraParameters scale ( sl::Resolution const &  output_resolution) const
inline

Return the sl::CameraParameters for another resolution.

Parameters
output_resolution: Resolution in which to get the new sl::CameraParameters.
Returns
The sl::CameraParameters for the resolution given as input.

Referenced by CalibrationParameters::scale().

Variables

◆ fx

float fx

Focal length in pixels along x axis.

Referenced by CameraParameters::scale().

◆ fy

float fy

Focal length in pixels along y axis.

Referenced by CameraParameters::scale().

◆ cx

float cx

Optical center along x axis, defined in pixels (usually close to width / 2).

Referenced by CameraParameters::scale().

◆ cy

float cy

Optical center along y axis, defined in pixels (usually close to height / 2).

Referenced by CameraParameters::scale().

◆ disto

double disto[12]

Distortion factor : [k1, k2, p1, p2, k3, k4, k5, k6, s1, s2, s3, s4].

Radial (k1, k2, k3, k4, k5, k6), Tangential (p1,p2) and Prism (s1, s2, s3, s4) distortion.

Referenced by CameraParameters::scale().

◆ v_fov

float v_fov

Vertical field of view, in degrees.

◆ h_fov

float h_fov

Horizontal field of view, in degrees.

◆ d_fov

float d_fov

Diagonal field of view, in degrees.

◆ image_size

Resolution image_size

Size in pixels of the images given by the camera.

Referenced by CameraParameters::scale().

◆ focal_length_metric

float focal_length_metric

Real focal length in millimeters.