-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the picamera wiki!
PiCamera Basic and Advanced Recipes adapted from "official" documentation for training purposes. The purpose of this document to record my experience in following the documentation prepared by Dave Jones.
- Capturing to a file
This example is a basic use of the capture
method in the PiCamera classs. The capture
method has the following parameters:
-
output: the value can a string (i.e. filename) or an object that has a
write
method; if this parameter is omitted then the image data is written to a buffer where overflow constraints are the responsibility of the client code. -
format: the value can a string or a MIME-type; if this parameter is omitted then the format is deduced from the filetype extension otherwise an exception,
PiCameraValueError
is raised. The supported formats are JPEG, PNG, GIF, BMP, YUV, RGB, RGBA, BGR, BGRA and RAW. -
use_video_port: the value is boolean and defaults to
False
whereby the higher quality image port is used. -
resize: a two element tuple specifying the width and height of the image if the default value None needs to be overriden
-
splitter_port: see PiCamera documentation if you really need to use this parameter
-
bayer: if the value is
True
then the Exif metadata receives the raw bayer data from the camera's sensor -
options: if the format is "jpeg" then the addtional parameters are:
-
quality: an integer from 1 to 100 representing the quality of the image; the default value is 85.
-
restart: the restart intervval for the encoder.
-
thumbnail: the size and quality of the thumbnail image as a tuple
(width, height, quality)
with the default being(64,48,35)
; if the value isNone
then no thumbnail is prepared.
-
Capturing to a stream
-
Capturing to a PIL Image
-
Capturing resized images
-
Capturing consistent images
-
Capturing time-lapse sequences
-
Capturing in low light
-
Capturing to a network stream
-
Recording video to a file
-
Recording video to a stream
-
Recording over multiple files
-
Recording to a circular stream
-
Recording to a network stream
-
Overlaying images on the preview
-
Overlaying text on the output
-
Controlling the LED
-
Capturing to a numpy array
-
Capturing to an OpenCV object
-
Unencoded image capture in YUV format
-
Unencoded image capture in RGB format
-
Custom outputs
-
Unconventional file outputs
-
Rapid capture and processing
-
Unencoded video capture
-
Rapid capture and streaming
-
Web streaming
-
Capturing images whilst recording
-
Recording at multiple resolutions
-
Recording motion vector data
-
Splitting to/from a circular stream
-
Custom encoders
-
Raw Bayer data captures
-
Using a flash with the camera
- PiCamera release 1.13, Dave Jones https://picamera.readthedocs.io/en/release-1.13/index.html
Prepared for self-paced learning use only.