picamera2 icon indicating copy to clipboard operation
picamera2 copied to clipboard

[BUG] Saturation error

Open dechuansun opened this issue 1 year ago • 3 comments

Hi,

I found a strange issue. I'm using an ov9281 sensor and a pi3 board. When I run the app_full.py, I got the error below. However, all other capture and recording .py files worked. Everything worked well previously when I used an earlier version with pi4. Any ideas? Traceback (most recent call last): File "/home/dechuan/Downloads/picamera2-main/apps/app_full.py", line 1191, in img_tab = IMGTab() ^^^^^^^^ File "/home/dechuan/Downloads/picamera2-main/apps/app_full.py", line 772, in init self.reset() File "/home/dechuan/Downloads/picamera2-main/apps/app_full.py", line 796, in reset self.saturation.setValue(picam2.camera_controls["Saturation"][2], emit=True) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ KeyError: 'Saturation'

Many thanks, Dechuan

dechuansun avatar Oct 11 '23 13:10 dechuansun

Can you just confirm:

  • Are you running Raspberry Pi's version of libcamera and Picamera2? (installed via apt, not a third party version)
  • Is this a mono sensor?

Thanks!

davidplowman avatar Oct 11 '23 14:10 davidplowman

Yes, I'm running Raspberry Pi's version of libcamera and Picamera2. This is a mono sensor. After I commented the error line, I saw another error saying "Control Saturation is not advertised by libcamera"

dechuansun avatar Oct 12 '23 01:10 dechuansun

The apps that we provide are only examples, and we test them against various official Raspberry Pi cameras, none of which are mono. You're very welcome to edit the application to work with a 3rd party mono sensor. If you can modify the app so that it works with both colour and mono sensors, then we'd be very happy to receive a pull request to our repository!

davidplowman avatar Oct 12 '23 08:10 davidplowman