hi_isp_dciris_attr

Description

Defines the attribute of the AI algorithms for the DC-Iris.

Definition

typedef struct {     
    hi_s32 kp;      
    hi_s32 ki;     
    hi_s32 kd;     
    hi_u32 min_pwm_duty;      
    hi_u32 max_pwm_duty;      
    hi_u32 open_pwm_duty;
} hi_isp_dciris_attr;

Members

Member

Description

kp

Proportional gain, used for adjusting the speed of enabling/disabling the iris. A larger value indicates a higher speed. If the value is too small, oscillation may occur during the convergence when the light greatly varies. If the value is too large, oscillation may occur due to overshoot. This member needs to be set to an appropriate value based on the circuit characteristics and lens. The recommended value is 7000.

Value range: [0,100000]

ki

Integral gain, used for adjusting the speed of enabling/disabling the iris. A larger value indicates a higher speed. If the value is too small, the image luminance is low after convergence due to the highlight. If the value is too large, the iris may fail to be disabled in the highlight scenario. This member needs to be set to an appropriate value based on the circuit characteristics and lens. The recommended value is 100 (the value does not to be changed).

Value range: [0,1000]

kd

Derivative gain, used for limiting the speed of enabling/disabling the iris when the light greatly varies. A larger value indicates a lower speed. If the value is too large, the sensitivity to the instantaneous luminance change is too high. As a result, the image luminance oscillates when the luminance in the scenario changes rapidly. This member needs to be set to an appropriate value based on the circuit characteristics and lens. The recommended value is 3000.

Value range: [0,100000]

min_pwm_duty

Minimum PWM duty cycle. A smaller value indicates a higher speed of disabling the iris when overexposure occurs. However, the iris may oscillate in this case. This member needs to be set to an appropriate value based on the circuit characteristics and lens. The recommended value is 250.

Value range: [0,1000]

max_pwm_duty

Maximum PWM duty cycle. A larger value indicates a higher speed of enabling the iris when the entire image is dark. If the value is too small, the iris size may not reach the maximum value when iris control ends. As a result, image noise may be obvious. This member needs to be set to an appropriate value based on the circuit characteristics and lens. The recommended value is 950.

Value range: [0,1000]

open_pwm_duty

PWM duty cycle when the iris is enabled. Iris control ends after the image luminance becomes stable and the PWM duty cycle is greater than the value of this member for a period. Therefore, the value cannot be too small. Otherwise, iris control ends before the iris size reaches the maximum value, causing obvious image noise. This member needs to be set to an appropriate value based on the circuit characteristics and lens. The recommended value is 800.

Value range: [0,1000]

Restrictions

  • If oscillation occurs when the iris is disabled, the speed of disabling the iris is too high. You can solve this issue by properly decreasing kp and increasing min_pwm_duty.
  • The value of open_pwm_duty must be between min_pwm_duty and max_pwm_duty. You need to set open_pwm_duty to an appropriate value to ensure that the iris can be quickly enabled.