NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NvMediaLensDistortion Struct Reference

Detailed Description

Holds distortion coefficients for the lens model.

Distortion coefficients is defined in the following way: k1, k2, k3, k4, k5, k6 are radial distortion coeffcients. p1 and p2 are tangential distortion coeffcients. Setting any of the coefficients to 0 implies that it is not used in computation.

If we denote a point without distortion as [x, y, 1] and the corresponding point with distortion as [xd, yd, 1], then the distortion model is defined as follows:

When NvMediaLensModel is NVMEDIA_LDC_MODEL_POLYNOMIAL_DISTORTION The control parameters are k1, k2, k3, k4, k5, k6, p1, p2.

r = sqrt (x ^ 2 + y ^ 2)
kr = (1 + k1 * r^2 + k2 * r^4 + k3 * r^6) / (1 + k4 * r^2 + k5 * r^4 + k6 * r^6)
xd = x * kr + p1 * (2 * x * y) + p2 * (r^2 + 2 * x^2)
yd = y * kr + p1 * (r^2 + 2 * y^2) + p2 * (2 * x * y)

When NvMediaLensModel is NVMEDIA_LDC_MODEL_FISHEYE_EQUIDISTANT or NVMEDIA_LDC_MODEL_FISHEYE_EQUISOLID or NVMEDIA_LDC_MODEL_FISHEYE_ORTHOGRAPHIC or NVMEDIA_LDC_MODEL_FISHEYE_STEREOGRAPHIC The control parameters are k1, k2, k3, k4.

r = sqrt (x ^ 2 + y ^ 2)
theta = atan(r)
theta_d = theta * (1 + k1 * theta^2 + k2 * theta^4 + k3 * theta^6 + k4 * theta^8)

Definition at line 166 of file nvmedia_ldc.h.

Data Fields

float_t k1
 Specifies radial distortion coefficient. More...
 
float_t k2
 Specifies radial distortion coefficient. More...
 
float_t k3
 Specifies radial distortion coefficient. More...
 
float_t k4
 Specifies radial distortion coefficient. More...
 
float_t k5
 Specifies radial distortion coefficient. More...
 
float_t k6
 Specifies radial distortion coefficient. More...
 
float_t p1
 Specifies tangential distortion coefficient. More...
 
float_t p2
 Specifies tangential distortion coefficient. More...
 

Field Documentation

float_t NvMediaLensDistortion::k1

Specifies radial distortion coefficient.

Definition at line 168 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::k2

Specifies radial distortion coefficient.

Definition at line 171 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::k3

Specifies radial distortion coefficient.

Definition at line 174 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::k4

Specifies radial distortion coefficient.

Definition at line 177 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::k5

Specifies radial distortion coefficient.

Definition at line 180 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::k6

Specifies radial distortion coefficient.

Definition at line 183 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::p1

Specifies tangential distortion coefficient.

Definition at line 186 of file nvmedia_ldc.h.

float_t NvMediaLensDistortion::p2

Specifies tangential distortion coefficient.

Definition at line 189 of file nvmedia_ldc.h.


The documentation for this struct was generated from the following file: