1

I'm currently trying to develop image tracking using color in Python 3 and OpenCV. But i am facing problem in PiCamera. At the moment, i've done some method to fix white balance, shutter speed, and other stuff. But i can't get something fixed yet. i assume it was a white balance that drift. this is my setting:

resch=[(640,480),(320,240)]
res=resch[0]
camera = PiCamera()
camera.resolution = res
camera.framerate = 32
camera.awb_mode='off'
camera.awb_gains=Fraction(8,5)
camera.exposure_mode='backlight'
camera.shutter_speed=31098
camera.brightness = 50
camera.ISO = 400
camera.meter_mode = 'spot'
camera.contrast= 0
camera.drc_strength= 'off'

but when a color change in front of camera, the whole picture is changing too like this example:

normal image

and this is the picture when the red band goes center slight red in overall image

i've changed the metering mode to 'spot' dunno if that make a different but the effect seems more predictable in this mode. i already change it to all of it's available option but the white balance? is still drifted in one or other way.

  • You probably want to change exposure mode to "off", but you want to do that after setting ISO and then waiting a second or so for the gains to stabilise. – Dave Jones Mar 31 '17 at 9:45
  • setting exposure mode to off after setting ISO then delay few seconds did not solve the problem – aji Apr 1 '17 at 0:19
  • @aji did you find a solution to this? If so it would be helpful to others if you post the answer here. – pufferfish Aug 20 '17 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.