This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP35xx: ISP CFA Coefficients

Other Parts Discussed in Thread: OMAP3530, TMS320DM6437

Hello everyone,

 

i recently connected a bayer sensor (R Gr Gb B) to the camera interface of OMAP3530 and managed to read in raw data just fine.

I then configured the CCDC output to be forwarded to the previewer module, who currently only has CFA interpolation enabled which gives me an output image.

The strange thing there is that every bottom right pixel of a 2x2pixel block seems to have an incorrect color (mostly too dark, see example output picture).

The coefficients from isp/cfa_coef_table.h are loaded into the previewers memory correctly and the RGB2YCbCr matrix looks like this:

           64,  127,  23,
          -38,  -75, 110,
         110, -94 ,  -18

(when i set the last two rows of this matrix to zero, giving me only a black and white image, this also results in these faulty pixel values)

while the RGB2RGB matrix does not do any conversion at all, meaning it is:

          0x100, 0x0,      0x0,
          0x0,      0x100, 0x0,
          0x0,      0x0,      0x100

Since this seems correct to me, i wonder what the CFA coefficients do and whether they are correct to manage the demosaicing step. The documentation on these values also seems really poor.

 

From the technical reference manual:

In the generic mode, CFA interpolation is implemented using programmable filter coefficients that operate
on a 5x5 grid:
· Each coefficient is coded in S8Q6 format.
· Each output color , G, and B) has its own set of coefficients.
· There are 4 phases. Each pixel is associated with a phase.
· Different sets of filter coefficients are provided, depending on the tendency (gradient in the data:
horizontal, vertical, or neutral).
· So there are 3 color x 4 phase x 3 tendencies x 16 taps = 576 coefficients (each coefficient is 8 bits
wide).
Note: Coefficients are based on sensor type. However, users can use a different methods of
defining an optimal coefficient set.

 

My question now would be: can anyone provide me with information on how these coefficients are composed and what their purpose is? And if the given values are meant to demosaic a bayer image, what could me my mistake here?

 

Best regards,

Matthias

.