hi_mpi_isp_set_ccm_attr

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

×

Atlas A3 training products/Atlas A3 inference products

×

Atlas A2 training products/Atlas A2 inference products

×

Atlas 200I/500 A2 inference products

√

Atlas inference products

×

Atlas training products

×

Description

Sets the CCM.

Prototype

hi_s32 hi_mpi_isp_set_ccm_attr(hi_vi_pipe vi_pipe, const hi_isp_color_matrix_attr *ccm_attr)

Parameters

Parameter

Input/Output

Description

vi_pipe

Input

VI pipe ID

Value range: [0, 12)

ccm_attr

Input

CCM attribute

Returns

  • 0: success
  • Other values: failure. For details, see Error Codes.

Constraints

  • The data format of the CCM must be the same as that of the correction tool.
  • The CCM can be configured based on the current color temperature, implementing better color reproduction at both high and low color temperatures.
  • This MPI supports a maximum of seven CCMs at three color temperatures. The CCMs must be configured in descending order of color temperatures. That is, groups 0–6 CCMs are configured from high color temperatures to low color temperatures. The typical three groups of CCMs are those under illuminants D50, TL84, and A, while the typical five groups of CCMs are those under illuminants 10K, D65, D50, TL84, and A. The color temperature of the previous group and that of the next group must comply with the following condition: Tpre × (100 – 6.25) > Tpost × (100 + 6.25).
  • In manual mode, the configured CCM takes effect in the ISP system, which facilitates CCM fine-tuning. Therefore, it is recommended that a CCM be manually corrected under illuminants at different color temperatures. After multiple groups of corrected CCMs are obtained and written by using the MPI, the combination result of CCMs under multiple illuminants can be verified. The saturation adjustment is valid in manual CCM mode. Before fine-tuning a CCM under a specific illuminant, ensure that the saturation meets the expectation.