Current libraw snapshot can run user-specified demosaic routine, just set interpolate_bayer pointer to point to your function.
Look into other demosaic functions code (e.g. lin_interpolate()) to see how to loop through all pixels.
To get bayer pattern, use imgdata.idata.filters variable, or COLOR(r,c) call.
Current libraw snapshot can run user-specified demosaic routine, just set interpolate_bayer pointer to point to your function.
Look into other demosaic functions code (e.g. lin_interpolate()) to see how to loop through all pixels.
To get bayer pattern, use imgdata.idata.filters variable, or COLOR(r,c) call.