I'm performing measurements using the picamera to test its sensor ov5647. But whenever I took images, it seemed there were adjustments. Gain, white balance and etc. Could I turn off all the adjustment function and just take raw image data? I know there is a bayer format, but I'm not sure if it is the data without adjusted.

1 Answer 1


Bayer format captures contain the data prior to almost the entire image processing pipeline (demosaic, auto-gain, auto-white-balance, lens-shading, denoise, etc. etc.). The one exception is flips; if you've set vflip or hflip you need to account for the Bayer pattern being flipped accordingly, but that's it. Other than, it's the raw (10-bit) data straight from the sensor. See the bayer capture recipe for information on unpacking the 10-bit format and a rudimentary de-mosaic algorithm.

  • Thank you so much for the clear answer. But if you don't mind, I'd like to ask one more thing. Could I avoid auto-gain adjustment by fixing ISO speed? I'm considering using RGB565 format and wondering if I can still disable the auto adjustments.
    – Nownuri
    Commented Jul 9, 2015 at 5:21
  • No - I'm not exactly certain what fixing the ISO setting does, but I can say it doesn't fix the automatic gains. Fixing the gains can be done by setting exposure_mode to 'off'. However, be aware that this will simply fix the gains (which can be queried with analog_gain and digital_gain where they are); at the moment the firmware provides no means of setting the gains to specific values.
    – Dave Jones
    Commented Jul 9, 2015 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.