CameraParameters Class Reference

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

Functions

float fx (self)
 Focal length in pixels along x axis.
 
float fy (self)
 Focal length in pixels along y axis.
 
float cx (self)
 Optical center along x axis, defined in pixels (usually close to width / 2).
 
float cy (self)
 Optical center along y axis, defined in pixels (usually close to height / 2).
 
list[float] disto (self)
 Distortion factor : [k1, k2, p1, p2, k3, k4, k5, k6, s1, s2, s3, s4]. More...
 
None set_disto (self, float value1, float value2, float value3, float value4, float value5)
 Sets the elements of the disto array. More...
 
float v_fov (self)
 Vertical field of view, in degrees.
 
float h_fov (self)
 Horizontal field of view, in degrees.
 
float d_fov (self)
 Diagonal field of view, in degrees.
 
Resolution image_size (self)
 Size in pixels of the images given by the camera.
 
float focal_length_metric (self)
 Real focal length in millimeters.
 
None set_up (self, float fx_, float fy_, float cx_, float cy_)
 Setups the parameters of a camera. More...
 
CameraParameters scale (self, Resolution resolution)
 Return the sl.CameraParameters for another resolution. More...
 

Detailed Description

Class containing the intrinsic parameters of a camera.

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

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

◆ disto()

list[float] disto (   self)

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.

◆ set_disto()

None set_disto (   self,
float  value1,
float  value2,
float  value3,
float  value4,
float  value5 
)

Sets the elements of the disto array.

Parameters
value1: k1
value2: k2
value3: p1
value4: p2
value5: k3

◆ set_up()

None set_up (   self,
float  fx_,
float  fy_,
float  cx_,
float  cy_ 
)

Setups the parameters of a camera.

Parameters
fx_: Horizontal focal length
fy_: Vertical focal length
cx_: Horizontal optical center
cx_: Vertical optical center.

◆ scale()

CameraParameters scale (   self,
Resolution  resolution 
)

Return the sl.CameraParameters for another resolution.

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