Add new comment

1) Yes, COLOR(r,c) gives you

1) Yes, COLOR(r,c) gives you the color of (bayer) pixels. All other components in this location are zeroes.

2) The raw2image() call prepares imgdata->image[][4] structure with 4-components for each pixels (only one is non-zero). Please note, that two different greens are handled as different colors, because some cameras (e.g. Olympus E-520) have different color filters on two green channels.

Please note, that imgdata->image[] does not contains "masked pixels" (black frame without image around image data), so sizes of image[][4] is imgdata.sizes.iheight and imgdata.sizes.iwidth

-- Alex Tutubalin