hi_mpi_isp_set_dciris_attr
Description
Sets the AI control attribute of the DC-Iris. This function can be used to set the parameters of automatic DC-Iris.
Prototype
hi_s32 hi_mpi_isp_set_dciris_attr(hi_vi_pipe vi_pipe, const hi_isp_dciris_attr *dciris_attr)
Constraints
- The proportional-integral-derivative (PID) algorithm is used for controlling the DC-Iris. This algorithm controls the iris size by adjusting the pulse-width modulation (PWM) duty cycle based on the image luminance. When the exposure time and gain reach the minimum target values, the algorithms start iris control. If the iris control meets the requirements of the target luminance, the AE exits directly and the exposure time and gain remain unchanged. If the image luminance is stable and the PWM duty cycle remains at the enabling value for a period of time, the AI algorithm considers that the iris is opened to the maximum size. Then, it exits iris control and returns the control right to the AE. During iris control, if AE algorithm parameters that need to take effect immediately (for example, the maximum/minimum exposure time, maximum/minimum gain, and anti-flicker parameter) are changed, the AE algorithm responds instantaneously. Then the AI algorithm determines whether to start iris control based on the configured parameters and ambient luminance. Starting or ending iris control takes a short period of time. Therefore, you are advised to disable AI when the manual iris is used; otherwise, the AE adjustment speed will be affected. It is recommended that AI be always enabled for the DC-Iris because disabling and enabling AI may result in iris control exceptions. For some long-focus DC-Iris lenses, the default parameter values may cause the iris to be enabled or disabled too quickly. This issue can be solved by adjusting related parameters. For details, see the description of hi_isp_dciris_attr.
- If the AI function is disabled, the DC-Iris will be opened to the maximum size.
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
vi_pipe |
Input |
VI pipe ID Value range: [0, 8) |
dciris_attr |
Input |
Pointer to the AI control attribute of the DC-Iris |
Returns
- 0: success
- Other values: failure. For details, see Error Codes.
Parent topic: AI Control Module