-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get consistent manual exposures #2322
Comments
Could you please reproduce the issue with the native tools? The point is that the Camera binding is just a wrapper over the native utilities. You can use any of the command line arguments to control the camera from the binding. Thanks |
Same result using command-line tools. Also same result if I tried ExposureType.Auto. I did notice (after copying the images to my Windows machine, and then looking at the Details tab of the Properties for the JPG files) that the darker images had lower values for the "ISO Speed" setting. Since the camera binding doesn't have a property for ISO, I set the ISO by running this:
Which got me an ISO of 800 on all the images I captured (which is actually what the old code used to do when using the MMALSharp package with Mono). That seemed to do the trick; now the images are much more consistent in brightness. So I guess I should change this to a feature request to add an ISO property? How do I do that? Just open a new thingy? |
@mkj-stonehill The following link highlight the relationship between the With regards to the feature request for the ISO property, I am not sure this makes sense in the camera binding for a couple of reasons:
Does this make sense to you as well? |
My understanding was that I had to enable enable Legacy Camera support, and that means libcamera won't work (instead, it's using the v4l driver). Have I got the wrong end of the stick? Maybe Legacy Camera Support means something different? Or, should we not be enabling that anymore? Just when I thought I had it all figured out... --mkj |
As written in this doc libcamera and the old raspicam tools are mutually exclusive. The legacy support refers to the old raspicam/raspivid tools while the new support refers to libcamera-still and libcamera-vid tools. I strongly suggest you to read the document linked above. In general, libcamera is the one providing the better options but it may happen for some option to have a better support on the legacy stack. You should just try the two modalities and see what is the best for you, preferring libcamera as this is the newest and most supported stack. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
I have an application in C# using .NET6 running on a Raspberry Pi (a Compute Module 4, in case it makes a difference). The Pi camera is in an enclosure with LEDs to light the target. I want to control the exposure so I get consistent images; however, there is a lot of variation. If I take 20 images in succession, most of them will be fine; about 25% of them will be noticeably darker (all the darker ones are similar to each other).
Normally I am capturing images to memory (so I can work with them); however, if I instead Capture to a JPEG file, when I look at the properties the "normal" images show an ISO speed of ISO-400, whereas the darker ones show ISO-320. There is no ISO setting that I've seen (there used to be one in the old MMAL-Sharp library). Perhaps if there was someway I could control that...? Maybe the Gain setting? But what are the units...?
I set manual exposure like this:
Expected behavior
All the images should be the same brightness.
Actual behavior
Most image are the same brightness; about 25% of them (although it varies) will be darker.
Versions used
Build machine (Windows 11, using Visual Studio 2022):
Execution Environment (Raspberry Pi CM4, Bullseye):
Version of
System.Device.Gpio
package: 3.1.0Version of
Iot.Device.Bindings
package (not needed if bug is inSystem.Device.Gpio
) : 3.1.0The text was updated successfully, but these errors were encountered: