This document describes the use of the three Raspberry Pi
camera applications as of July 2013.
There are three applications provided: raspistill, raspivid
and raspistillyuv. Both raspistill and raspistillyuv
are very similar and are intended for capturing images, while
raspivid is for capturing video.
All the applications are command-line driven, written to take
advantage of the mmal API which runs over OpenMAX. The
mmal API provides an easier to use system than that presented
by OpenMAX. Note that mmal is a Broadcom specific API used
only on Videocore 4 systems.
The applications use up to four OpenMAX(mmal) components -
camera, preview, encoder and null_sink. All applications
use the camera component: raspistill uses the Image
Encode component, raspivid uses the Video Encode
component, and raspistillyuv does not use an encoder, and
sends its YUV or RGB output direct from camera component to
The preview display is optional, but can be used full screen or
directed to a specific rectangular area on the display. If preview
is disabled, the null_sink component is used to 'absorb' the
preview frames. It is necessary for the camera to produce
preview frames even if not required for display, as they are used
for calculating exposure and white balance settings.
In addition it is possible to omit the filename option, in which
case the preview is displayed but no file is written, or to redirect
all output to stdout.
Command line help is available by typing just
the application name in on the command line.
Please note that camera modules are static-sensitive. Earth
yourself prior to handling the PCB: a sink tap/faucet or similar
should suffice if you don’t have an earthing strap.
The camera board attaches to the Raspberry Pi via a 15-way
ribbon cable. There are only two connections to make: the ribbon
cable need to be attached to the camera PCB and the Raspberry
Pi itself. You need to get it the right way round, or the camera will
not work. On the camera PCB, the blue backing on the cable
should be facing away from the PCB, and on the Raspberry Pi it
should be facing towards the Ethernet connection (or where the
Ethernet connector would be if you are using a model A).
Although the connectors on the PCB and the Pi are different,
they work in a similar way. On the Raspberry Pi, pull up the tabs
on each end of the connector. It should slide up easily, and be
able to pivot around slightly. Fully insert the ribbon cable into the
slot, ensuring it is straight, then gently press down the tabs to
clip it into place. The camera PCB itself also requires you to pull
the tabs away from the board, gently insert the cable, then push
the tabs back. The PCB connector is a little more awkward than
the one on the Pi itself. You can watch a video showing you how
to attach the connectors at www.raspberrypi.org/archives/3890
(scroll down for the video).
Execute the following instructions on the command line to
download and install the latest kernel, GPU firmware and
applications. You will need an internet connection for this to work
sudo apt-get update
sudo apt-get upgrade
Now you need to enable camera support, using the raspi-
config program you will have used when you first set up your
Use the cursor keys to move to the camera option and select
enable. On exiting raspi-config it will ask to reboot. The
enable option will ensure that on reboot the correct GPU
firmware will be running (with the camera driver and tuning), and
the GPU memory split is sufficient to allow the camera to acquire
enough memory to run correctly.
To test that the system is installed and working, try the following
raspistill -v -o test.jpg
The display should show a 5-second preview from the camera
and then take a picture, saved to the file test.jpg, while displaying
various informational messages.
C# Word - Word Conversion in C#.NET
independently, without using other external third-party dependencies like Adobe Acrobat. Word to PDF Conversion. This page will tell you how to use XDoc.Word adding page numbers pdf file; add pages to pdf reader
If the camera is not working correctly, there are number of things
• Are the ribbon connectors all firmly seated and the right way
round? They must be straight in their sockets.
• Is the camera module connector firmly attached to the
camera PCB? This is the connection from the smaller black
camera module itself to the camera PCB. Sometimes this
connection can come loose. Using a fingernail, flip up the
connector on the PCB, then reseat it with gentle pressure, it
engages with a very slight click.
• Have sudo apt-get update and sudo apt-get
upgrade been run?
• Has raspi-config been run and the camera enabled?
If things are still not working, try the following:
Error : raspistill/raspivid not found. This probably means your
update/upgrade failed in some way. Try it again.
Error : ENOMEM displayed. Camera is not starting up. Check all
Error : ENOSPC displayed. Camera is probably running out of
GPU memory. Check config.txt in the /boot/ folder. The
gpu_mem option should be at least 128.
If, after all the above, the camera is still not working, it may have
a defect (most likely because it has suffered static shock). Try
posting on the Raspberry Pi forum in the camera board section
to see if there is any more help available there.
Preview window settings <'x,y,w,h'>
Allows the user to define the size and location on the screen that
the preview window will be placed. Note this will be
superimposed over the top of any other windows/graphics.
Fullscreen preview mode
Forces the preview window to use the whole screen. Note that
the aspect ratio of the incoming image will be retained, so there
may be bars on some edges.
Do not display a preview window
Disables the preview window completely. Note that even though
the preview is disabled, the camera will still be producing frames,
so will be using power.
Set preview window opacity
Sets the opacity of the preview windows. 0 = invisible, 255 = fully
Camera Control Options
Set image sharpness (-100 to 100)
Set the sharpness of the image, 0 is the default.
Set image contrast (-100 to 100)
Set the contrast of the image, 0 is the default
--brightness, -br Set image brightness (0 to 100)
Set the brightness of the image, 50 is the default. 0 is black, 100
--saturation, -sa Set image saturation (-100 to 100)
Set the colour saturation of the image. 0 is the default.
Set capture ISO
Sets the ISO to be used for captures. Range is 100 to 800.
Turn on video stabilization
In video mode only, turn on video stabilization.
Set EV compensation
Set the EV compensation of the image. Range is -10 to +10,
default is 0.
C# Excel - Excel Conversion & Rendering in C#.NET
independently, without using other external third-party dependencies like Adobe Acrobat. Excel to PDF Conversion. This page will tell you how to use XDoc.Excel add a page to a pdf online; add page number to pdf preview
Set exposure mode
Possible options are:
Use automatic exposure mode
Select setting for night shooting
Select setting for back-lit subject
Select setting for sports (fast shutter etc.)
Select setting optimized for snowy scenery
Select setting optimized for beach
Select setting for long exposures
Constrain fps to a fixed value
Select setting optimized for fireworks
Note that not all of these settings may be implemented,
depending on camera tuning.
Set automatic white balance (AWB)
Turn off white balance calculation
Automatic mode (default)
shade Cloudy mode
Tungsten lighting mode
fluorescent Fluorescent lighting mode
incandescent Incandescent lighting mode
Set image effect
Produces a negative image
Solarise the image
Denoise the image
Oil paint-style effect
Cross-hatch sketch style
Graphite sketch style
watercolour Watercolour effect
Grainy film effect
Blur the image
Colour-saturate the image
colourswap Not fully implemented
Not fully implemented
Not fully implemented
Not fully implemented
colourbalance Not fully implemented
Not fully implemented
Set colour effect <U:V>
The supplied U and V parameters (range 0 to 255) are applied to
the U and Y channels of the image. For example, --colfx 128:128
should result in a monochrome image.
Set metering mode
Specify the metering mode used for the preview and capture.
Average the whole frame for metering
Assume a backlit image
Set image rotation (0-359)
Sets the rotation of the image in viewfinder and resulting image.
This can take any value from 0 upwards, but due to hardware
constraints only 0, 90, 180 and 270-degree rotations are
Set horizontal flip
Flips the preview and saved image horizontally.
Set vertical flip
Flips the preview and saved image vertically.
Set sensor region of interest
Allows the specification of the area of the sensor to be used as
the source for the preview and capture. This is defined as x,y for
the top left corner, and a width and height, all values in
normalised coordinates (0.0-1.0). So to set a ROI at half way
across and down the sensor, and an width and height of a
quarter of the sensor use :
Set image width <size>
Set image height <size>
Set jpeg quality <0 to 100>
Quality 100 is almost completely uncompressed. 75 is a good all-
Add raw Bayer data to jpeg metadata
This option inserts the raw Bayer data from the camera in to the
Output filename <filename>
Specify the output filename. If not specified, no file is saved. If
the filename is '-', then all output is sent to stdout.
Output verbose information during
Outputs debugging/information messages during the program
Time before capture and shut down
The program will run for this length of time, then take the capture
(if output is specified). If not specified, this is set to 5 seconds.
Documents you may be interested
Documents you may be interested