GDC Introduction
Overview
The geometric distortion correction (GDC) subsystem implements fisheye correction (including 360° panoramic, 180° panoramic, and normal correction modes) and lens distortion correction (LDC). For details about the APIs and parameters related to the GDC, see the API description in "Media Data Processing V2".
- hi_mpi_vi_set_chn_ldc_attr
- hi_mpi_vi_get_chn_ldc_attr
- hi_mpi_vpss_set_grp_fisheye_cfg
- hi_mpi_vpss_get_grp_fisheye_cfg
- hi_mpi_vpss_set_chn_fisheye
- hi_mpi_vpss_get_chn_fisheye
The following figures show the correction process.
Mount and Correction Modes of Fisheye Correction
The fisheye camera supports three installation modes: floor mount, ceiling mount, and wall mount. The floor mount mode applies to the look-up scenario where the camera is installed on the desk or floor. The ceiling mount mode applies to the look-down scenario where the camera is installed on the ceiling. The wall mount mode applies to the scenario where the camera is installed on vertical planes such as the wall.
Fisheye correction supports 360° panoramic, 180° panoramic, and normal correction modes.
You can select the appropriate correction mode based on the installation scenario to achieve the optimal effect. The fisheye selects the correction region by setting the pan-tilt-zoom (PTZ) parameters in each correction mode, implementing the electronic PTZ function. The following table describes the PTZ parameters and correction models in each correction mode in typical scenarios.
|
Correction Mode |
Typical Scenario |
Parameter Description |
Correction Model |
|---|---|---|---|
|
360° panoramic correction |
Ceiling mount and floor mount |
|
|
|
180° panoramic correction |
Wall mount |
|
|
|
Normal correction |
Wall mount, ceiling mount, and floor mount |
|
|
- Wall mount in 360° panoramic correction mode is not supported. Ceiling mount and floor mount in 180° panoramic correction mode are not supported.
- The outside radius parameter (out_radius) of the fisheye is used to limit the boundary of the original image content for the fisheye. The parts that exceed out_radius are considered to be invalid (black). out_radius should be set to the actual radius of the original image for the fisheye. The inner radius parameter (in_radius) is valid only in 360° panoramic correction mode. This parameter and out_radius determine the range of the correction region in the radius direction. out_radius must be set to the radius of the original image regardless of the correction mode, and the correction region is determined by the PTZ parameters.
LDC Modes
LDC supports two correction modes: barrel distortion correction and pincushion distortion correction, as shown below.
|
Parameter |
Configuration Scope |
Description |
|---|---|---|
|
center_x_offset |
–511 to +511 |
Horizontal offset of the image center point relative to the physical center point |
|
center_y_offset |
–511 to +511 |
Vertical offset of the image center point relative to the physical center point |
|
distortion_ratio |
[-300, 500] |
Correction strength. A negative value indicates the pincushion distortion correction mode, and a positive value indicates the barrel distortion correction mode. |
|
aspect |
bool |
Whether to reserve the aspect ratio during FoV adjustment |
|
xy_ratio |
0 to 100 |
FoV parameter, which is valid only when aspect is set to 1. |
|
x_ratio |
0 to 100 |
Horizontal FoV parameter, which is valid only when aspect is set to 0. |
|
y_ratio |
0 to 100 |
Vertical FoV parameter, which is valid only when aspect is set to 0. |
You are advised to use the checkerboard for correction and calibration.
FoV Introduction


