Picam v0.2.0 Picam.FakeCamera
A fake version of Picam.Camera that can be used in test and development
when a real Raspberry Pi Camera isn’t available.
All the normal configuration commands are accepted and silently ignored, except that:
sizecan be set to one of 1920x1080, 1280x720, or 640x480. This will result in a static image of that size being displayed on each frame.fpscan be set, which will result in the static images being displayed at roughtly the requested rate.
In addition, a custom image can be set using set_image/1, which is be
displayed on each frame until a new image is set or the size is changed.
Summary
Functions
Set the image that is being displayed by the fake camera on each frame. This is intended for development or testing things that depend on the content of the image seen by the camera
Functions
Set the image that is being displayed by the fake camera on each frame. This is intended for development or testing things that depend on the content of the image seen by the camera.
jpg should be a JPEG-encoded binary, for example:
"image.jpg"
|> File.read!()
|> Picam.FakeCamera.set_image()