-
Notifications
You must be signed in to change notification settings - Fork 33
Capturing still image to memory stream no longer working #200
Comments
In order to debug this more easily, I created the following console application. When run, MMAL throws an exception on the ConfigureCameraSettings() call:
If I comment out the line which sets the resolution, it runs successfully to completion, and I get 5 BMP files, all at the default resolution of 1280 x 720. How do I acquire still images of the max camera resolution? This is a Pi Camera V2.1, so it should be capable of 3280 x 2464, which is what I get when I take a picture using raspistill. Setting the resolution to anything larger than the default 1280 x 20 (e.g. I tried Resolution.As1080p) causes this exception
|
I've received an MMALNoSpaceException before when I've had two processes trying to aceess the camera at the same time. You could try rebooting the Pi, and check that you don't accidentally have two instances of your program running, and that raspistill isn't running at the same time. If that doesn't solve the issue, the first thing I'd try is to change:
to:
Failing that, you could try removing the MMALImageEncoder, and use this method to convert the raw bytes to a bitmap instead:
If you use the method above, ensure you have your encoding set to:
|
I wanted to add dual camera support to MMALSharp, so I cloned the repo, and build it into my application (it was using version 0.6 from nuget before, to successfully capture images from camera 0).
There were a few changes required in my app with the latest version of MMALSharp (mostly the merged properties in MMALCameraConfig), but they seemed straight-forward. However, now when I run it, the very first
await this.Cam.ProcessAsync(this.Cam.Camera.StillPort);
I do never completes.
I've looked at Issue #198 (which is very similar); but I'm never even getting the StillPort.NativeOutputPortCallback call.
I've even looked through all of the diffs from the 0.6 release on, but nothing obvious (to me) jumps out. It's probably something stupid I'm doing (or not doing), that just happened to work on 0.6, but no longer does. Can you point me in the right direction?
I've added logging (using NLog), and here's the log I get:
The text was updated successfully, but these errors were encountered: