Not really a bug, but something that may need to be better documented.
In this driver, the camera grab mode is set to CAMERA_GRAB_WHEN_EMPTY. When we run camera.capture(), it retrieves the last captured image from the framebuffer (...which might be a long time ago), and triggers a new image capture (...which will be retrieved on the next camera.capture()).
This has a notable impact when using RGB or YUV mode. If you run...
I'm guessing that the first image was captured on init at the default framesize of VGA (614400 bytes), while the FRAME_240X240 size is 115200 bytes, and this leads to an incorrect framebuffer size.
If you set the framesize in init, things works (...sorta[1]) fine.
Not really a bug, but something that may need to be better documented.
In this driver, the camera grab mode is set to
CAMERA_GRAB_WHEN_EMPTY
. When we runcamera.capture()
, it retrieves the last captured image from the framebuffer (...which might be a long time ago), and triggers a new image capture (...which will be retrieved on the nextcamera.capture()
).This has a notable impact when using RGB or YUV mode. If you run...
...it will fail with the error message...
I'm guessing that the first image was captured on
init
at the default framesize of VGA (614400 bytes), while theFRAME_240X240
size is 115200 bytes, and this leads to an incorrect framebuffer size.If you set the framesize in
init
, things works (...sorta[1]) fine.[1] I'm getting a greenish hue on the first couple of images, but the rest looks good.