Hi, I'm trying to make a script that extracts pixel values from an image to analyze the presence of noise reduction algorithms in DSLRs.
I need to be able to read the raw ADU values for each channel, and what I've done is importing the RAW file as a "rawBayer CFA image" in order to have an RGB image with each pixel's channels being either 0 or the single color value.
I then read the value with the
So far so good, I get the values of the pixels but I have doubts about the data I'm getting.
First of all: am I really seeing the sensor ADUs? I'm pretty sure not, because I tried with different cameras and I'm always getting the classic 0,#### values in the viewer, even in 8bit jpg files.
Second, when I try to plot the pixel values using
So... what's the best way to read actual ADUs from the sensor if possible?
I need to be able to read the raw ADU values for each channel, and what I've done is importing the RAW file as a "rawBayer CFA image" in order to have an RGB image with each pixel's channels being either 0 or the single color value.
I then read the value with the
image.sample
function targeting the window of the imported image.So far so good, I get the values of the pixels but I have doubts about the data I'm getting.
First of all: am I really seeing the sensor ADUs? I'm pretty sure not, because I tried with different cameras and I'm always getting the classic 0,#### values in the viewer, even in 8bit jpg files.
Second, when I try to plot the pixel values using
console.write("ADU: ",image.sample(x,y,0))
the values I aren't 0,#### but something like a 0 followed by 16 digits (which I guess are either random or stuff already in the memory that is just added as it is) that probably needs to be truncated to 4th decimal place to have a meaninful value.So... what's the best way to read actual ADUs from the sensor if possible?