I want to import the raw, DNG image sensor data into python without any mosaicing. I have tried the following code using pyraw:
with rawpy.imread(path) as raw:
rgb = raw.postprocess(output_bps=8,demosaic_algorithm=None,output_color = rawpy.ColorSpace.Adobe)
But I am noticing a problem:
The camera I am using has a RGGB bayer filter and is 10 bits per pixel, so we should only expect red data from every second pixel in every row starting at row 0 column 0. When I look at rgb[:,:,0] (red channel), I am seeing data in adjacent rows and columns, indicating some sort of post processing I assume. I have used the possprocess function in rawpy, however, I assumed that as I specified no demosaic algorithm we shouldn’t have adjacent red pixels.
Any thoughts?