Search code examples
pythonimage-processinglibraw

Understanding the output of raw_pattern in rawpy


I have the following two examples when loading 2 different raw images (one with Nikon and another with Sony Both having Bayer filters):

Nikon RAW image

Sony RAW image

Can someone please explain the meaning of the output of the raw_pattern here along with difference in the outputs of the examples provided.


Solution

  • The Nikon (NEF) pattern means "GBRG" and the Sony (ARW) pattern means "RGGB", assuming that a.color_desc == "RGBG". So the integers in raw_pattern are indices to color_desc.