SPRUJB3 March 2024 AM67 , AM67A , TDA4AEN-Q1 , TDA4VEN-Q1
The PCID block enables subtraction of scaled IR signal value from generated 2x2 Bayer CFA pattern as
R’ = R –Xr * Ir
G’ = G –Xg * IR
B’ = B –Xb * Ir
Where IR subtraction scales {Xr, Xg or Xb } used for a
pixels are calculated in a two-step process involving the calculation of pixel level
IR subtraction factors and optional spatial smoothening of the calculated IR
subtraction factors to suppress noise and obtain smooth transitions.
To avoid subtraction of the IR signal from clipped/saturated pixels and in-turn introduction of color artifacts in the created Bayer pattern, HW allows user to define a cut-off value for R, G and B pixels over which the IR subtraction is disabled. Further to have smoother transition of the IR decontamination scales immediately below the cut-off value HW allows programming of the transition range over which the IR subtraction range gradually increases from no IR subtraction at the cut-off threshold to maximum programmed IR subtraction factor. To enable calculation of IR subtraction factor for Bayer output value at at IR locations in the input CFA (where no R/G/B value is natively available) HW uses nearest maximum R/G/B pixel value for the location to calculate the IR subtraction factor based on this value especially if it is above cut-off or just below it within the transition range. For this user can configure the influence of the nearest maximum R/G/B pixel as function of the L1 distance with values in range [0,1]. When the maximum R/G/B pixel values in a neighborhood are in ranges close to the cut-off value the HW allows user to spatially smoothen the calculated IR subtraction factors in 5x5 region before performing IR subtraction.
Figure 7-47 shows the calculated IR subtraction scale values with regard to the maximum neighborhood value as a function of user-defined cut-off threshold (T)), transition range TBW and the desired maximum IR subtraction factor for the output Bayer channel.
The PCID block when outputting the interpolated IR image allows user to apply a tone curve on the output to compress the bitdepth from 16bit to 16/12/10/8 bits. The Tone curve can be defined using an IR remap LUT defined using 609 16bit knee points stored in32bit containers.