hi_isp_iris_attr
Description
Defines the ISP iris attribute.
Definition
typedef struct {
hi_bool enable;
hi_op_mode op_type;
hi_isp_iris_type iris_type;
hi_isp_iris_status iris_status;
hi_isp_mi_attr mi_attr;
} hi_isp_iris_attr;
Members
Member |
Description |
|---|---|
enable |
AI enable |
op_type |
Iris mode (AI mode or MI mode) |
iris_type |
Iris type (DC-Iris or P-Iris) |
iris_status |
Iris status |
mi_attr |
MI attribute |
Restrictions
- Before testing the iris by using the AI algorithm, you are advised to check whether the AI circuit characteristics meet the requirements of the Ascend Internet Protocol camera (IPC).
- For the DC-Iris, the AI algorithm control the iris by adjusting the 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.
- The P-Iris is controlled by using the AE allocation route. To ensure that the P-Iris works properly, you need to correctly set the lens parameters and AE allocation route for P-Iris connection. For details, see hi_isp_piris_attr and hi_mpi_isp_set_ae_route_attr. The driving mode may differ according to the specifications of the P-Iris. You can modify the P-Iris driving mode to adapt to different lenses.
- When the AI is disabled, the iris is opened to the maximum size for the DC-Iris lens. For the P-Iris lens, the iris is opened to the position of the stepper motor corresponding to the maximum iris target value. However, in this case, the exposure allocation is still performed based on the AE route, which may cause abnormal image luminance. Therefore, if you do not want to enable AI when the P-Iris lens is connected, switch the iris type to HI_ISP_IRIS_DC_TYPE to ensure normal exposure.
- Before the iris is switched from a DC-Iris to a P-Iris, parameters related to the P-Iris need to be configured and the iris status needs to be set to HI_ISP_IRIS_KEEP.
- When the DC-Iris test is performed on the Ascend demo board or reference board, the following two registers need to be configured when the .ko driver is loaded to configure the pin multiplexing and clock: himm 0x102F0078 0x12F5 and himm0x11014590 0x0010.
- When the P-Iris test is performed on the Ascend demo board or reference board, the following register need to be configured when the .ko driver is loaded to configure the pin multiplexing and clock: himm 0x102F0108 0x1101.
Note: when the Ascend AE library is used, the AE_init enables the default PWM3 signal for one time. If you need the PWM3 signal for other purposes, you need to specify the PWM number of AI as another value.
Parent topic: Data Types