Add new comment

Access raw color data

I want to access color data from a raw image in dng format.
I need to compute different statics about color in a certain area of images like mean value and etc.

I tried that consequence of actions:

LibRaw processor;
processor.open_file(path);
processor.unpack();

As I understand I can expect data in processor.imgdata.raw_image and processor.imgdata.raw_image.color3_image after that consequence
But they are empty.
After dcraw_process() and dcraw_make_mem_image(), I receive a picture, but there is something like a purple filter on it. (i expected a green picture from a raw image)

Also, I use a phone which is not supported by the library(Redmi Note 9 Pro)
I am a beginner in image analysis and don't understand a lot(

So, my question is: which consequence is necessary to access unmodified color data. (after de-mosaic for example)
Also, I red advice about using libtiff instead of libraw.

I'm sorry about my question because it is unclear, but I hope that somebody will help me
Best regards, Michael

Forums: