How to extract bayer pattern #181
Replies: 2 comments
-
rawpy (LibRaw that is) and RawTherapee might be providing you with different crops of the raw array in the file, so "first pixel" is a relative term here. Does Run e.g. Another thing: LibRaw/rawpy should show you the real raw pixel value in In any case, I don't see any issues here w/ rawpy. Perhaps you might want to close this and move it over to discussions. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the pointers. Didn't manage to get exactly the same histograms pr channel using |
Beta Was this translation helpful? Give feedback.
-
Is it possible to split the raw data up into its red, green, and blue components before demosaicing?
It seems like that raw data is available using
raw_image
(docs)Provided that the sensor data is on the format RGGB, then
img[0,0]
would correspond to the first red pixel of the sensor data.Goal: Extract the value of the first red pixel
Method 1)
Using
rawpy
, the value ofimg[0,0]
is158
.Method 2)
Using
RawTherapee
(docs) to read the same image, it suggests that the first red pixel (before demosaicing) is 57 as seen below.Example RAW image:
sample1.dng
found (here: google drive)I'm probably missing some basic logic here, but is it possible to obtain the same value using
rawpy
? Thanks in advance for any pointers.Beta Was this translation helpful? Give feedback.
All reactions