[BUG]: Camera washed out white after a few hours of use
Setup:
- TerrariumPI version: 4.12.2
- Install: [Manual]
- Raspberry PI: 4b
- OS: Bullseys
Describe the bug I've been using a USB webcam for about a year now. More recently - I've noticed it around 5 months ago - the camera quality turns from normal to washed out after about 12-24h of usage. Unplugging and plugging back in the camera fixes that, a raspberry restart does too. After some time it returns to the same washed out look. I unfortunately only have one camera here to test this so I'm not sure if this might be a camera hardware issue.
Washed out picture:
Normal picture (after unplugging camera)
Hmm, seems that the white balance is getting whiter? Not sure how to explain. But I get the feeling that the white balance is doing something strange.
I need to look into this.
After some testing, I cannot find anything that looks to fix this. But if you a bit handy with an editor, we can change some code on your side, to see if it does something for you.
Edit the file /home/pi/TerrariumPI/hardware/webcam/usb_webcam.py and change
after line 32 add: camera.set(cv2.CAP_PROP_AUTO_WB, 1.0) Make sure the spacing is the same as the line above. This should force auto white balancing.
And you can change the line sleep(self._WARM_UP) to sleep(self._WARM_UP*2) to increase the warmup time, which could help the white balance.
More I cannot find.
Did you had time to test the above code change?
Another option could be to try to use https://commandmasters.com/commands/v4l2-ctl-linux/
Or replace the webcam with a different one to see if it is broken.
But I am unable to fix this in code.
Closing due to no response