Difference between revisions of "Rpi Camera Module"

From eLinux.org
Jump to: navigation, search
(Link to forum post)
(Known Issues)
Line 145: Line 145:
 
* Some users have noted that images are 'flipped', this can be corrected by use of the -hf and -vf command line flags.  This behaviour may be addressed in future foundation releases.
 
* Some users have noted that images are 'flipped', this can be corrected by use of the -hf and -vf command line flags.  This behaviour may be addressed in future foundation releases.
 
* Correct EXIF data (including user supplied tags) are not being written to the output files.
 
* Correct EXIF data (including user supplied tags) are not being written to the output files.
* The -? (--help) and -n (--nopreview) command-line options currently don't work, but should be fixed in a future release of the camera apps.
+
* The -? (--help) and -n (--nopreview) command-line options currently don't work, but should be fixed in a future release of the camera apps. Try ''-p '0,0,0,0''' as a workaround while -n doesn't work.
  
 
Also, see this forum [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=44879 post] which summarises the issues as at 24th May 2013
 
Also, see this forum [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=44879 post] which summarises the issues as at 24th May 2013

Revision as of 13:53, 27 May 2013


RaspPi.png Back to the Hub


Hardware & Peripherals:

Hardware - detailed information about the Raspberry Pi boards.

Hardware History - guide to the Raspberry Pi models.

Low-level Peripherals - using the GPIO and other connectors.

Expansion Boards - GPIO plug-in boards providing additional functionality.

Screens - attaching a screen to the Raspberry Pi.

Cases - lots of nice cases to protect the Raspberry Pi.

Other Peripherals - all sorts of peripherals used with the Raspberry Pi.


Introduction

The Raspberry Pi Camera board was released for sale on 14th May 2013. It contains a 5MPixel sensor and connects via a ribbon cable to the CSI connector on the board.

Sample Programs

Sample programs using the camera for taking stills and video have been developed for the Foundation and the source for these is available on github.

Forum user M1M1 published instructions on compiling the sample programs here

The command line parameters for the programs are as follows:

RaspiVid Camera App   
===================  
  
Display camera output to display, and optionally saves an H264 capture at requested bitrate   
  
  
usage:  RaspiVid [options]   
  
Image  parameter commands   
  
‐?,  ‐‐ help      :  This  help  information   
‐w,  ‐‐ width     :  Set image  width <size>.  Default  1920  
‐h,  ‐‐ height    :  Set image  height  <size>.  Default  1080  
‐b,  ‐‐ bitrate   :  Set bitrate. Use bits per second  (e.g.   10MBits/ s would be ‐ b 10000000)  
‐o,  ‐‐ output    :  Output  filename  <filename>  (to write to  stdout,  use '‐o  ‐ ')   
‐v,  ‐‐ verbose   :  Output   verbose information  during  run   
‐t,  ‐‐ timeout   :  Time (in ms) before  takes picture  and  shuts down.   If  not specified,  set to  5s   
‐d,  ‐‐ demo      :  Run  a  demo mode (cycl e  through range of  camera options, no capture)   
‐fps,  ‐‐ framerate        :  Specify  the  frames  per second  to  record   
‐e,  ‐‐ penc      :  Display  preview image  *after*  encoding  (shows  compression artifacts)   
  
Preview parameter commands   
  
‐p,  ‐‐ preview   :  Preview window settings <'x,y,w,h'>  
‐f,  ‐‐ fullscreen:  Fullscreen preview mode  
‐n,  ‐‐ nopreview :  Do not  display  a  preview window  
  
Image  parameter commands   
  
‐sh, ‐‐ sharpness :  Set image  sharpness ( ‐100  to  100)   
‐co, ‐‐ contrast  :  Set image  contrast ( ‐100  to  100)   
‐br, ‐‐ brightness:  Set image  brightness (0  to   100)   
‐sa, ‐‐ saturation:  Set image  saturation ( ‐100  to  100)   
‐ISO,  ‐‐ ISO     :  Set capture ISO   
‐vs, ‐‐ vstab     :  Turn  on  video stablisation   
‐ev, ‐‐ ev        :  Set EV com pensation  
‐ex, ‐‐ exposure  :  Set exposure  mode (see  Notes)   
‐awb,  ‐‐ awb     :  Set AWB mode (see  Notes)   
‐ifx, ‐‐ imxfx    :  Set image  effect (see  Notes)   
‐cfx, ‐‐ colfx    :  Set colour  effect (U:V)  
‐mm,  ‐‐ metering :  Set metering  mode (see  Notes)   
‐rot,  ‐‐ rotation:  Set image  rotation (0 ‐359)   
‐hf, ‐‐ hflip     :  Set horizontal flip  
‐vf, ‐‐ vflip     :  Set vertical  flip  
  
  
Notes  
  
Exposure  mode options  :   
off,auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks   
  
AWB mode options :   
off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon   
  
Image  Effect mode options :   
none,negative,solarise,sketch,denoise,emboss,oilpaint,h atch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon  
  
Metering Mode options  :   
average,spot,backlit,matrix 
 
RaspiStill Camera App  
===================== 
 
Runs camera for specific time, and take JPG capture at end if requested 
 
usage:  RaspiStill  [options]  
 
Image  parameter commands  
 
‐?,  ‐‐ help      :  This  help  information  
‐w,  ‐‐ width     :  Set image  width <size>  
‐h,  ‐‐ height    :  Set image  height  <size>  
‐q,  ‐‐ quality   :  Set jpeg  quality  <0 to  100> 
‐r,  ‐‐ raw       :  Add  raw  bayer data  to  jpeg  metadata 
‐o,  ‐‐ output    :  Output  filename  <filename>  (to write to  stdout,  use '‐o  ‐ ').  If  not specified,  no file is  saved 
‐v,  ‐‐ verbose   :  Output   verbose information  during  run  
‐t,  ‐‐ timeout   :  Time (in ms) before  takes picture  and  shuts down (if  not specified,  set to  5s) 
‐th, ‐‐ thumb     :  Set thumbnail parameters  (x:y:quality)  
‐d,  ‐‐ demo      :  Run  a  demo mode (cycle  through range of  camera options, no capture)  
‐e,  ‐‐ encoding  :  Encoding  to  use for output  file (jpg,  bmp, gif, png)  
‐x,  ‐‐ exif      :  EXIF  tag to   apply to  captures  (forma t as  'key=value')  
‐tl,  ‐‐ timelapse:   Timelapse mode. Takes a  picture  every <t>ms  
 
Preview parameter commands  
 
‐p,  ‐‐ preview   :  Preview window settings <'x,y,w,h'> 
‐f,  ‐‐ fullscreen:  Fullscreen preview mode 
‐n,  ‐‐ nopreview :  Do not  display  a  preview window 
 
Image  parameter commands  
 
‐sh, ‐‐ sharpness :  Set image  sharpness ( ‐100  to  100)  
‐co, ‐‐ contrast  :  Set imag e  contrast ( ‐100  to  100)  
‐br, ‐‐ brightness:  Set image  brightness (0  to   100)  
‐sa, ‐‐ saturation:  Set image  saturation ( ‐100  to  100)  
‐ISO,  ‐‐ ISO     :  Set capture ISO  
‐vs, ‐‐ vstab     :  Turn  on  video stablisation  
‐ev, ‐‐ ev        :  Set EV com pensation 
‐ex, ‐‐ exposure  :  Set exposure  mode (see  Notes)  
‐awb,  ‐‐ awb     :  Set AWB mode (see  Notes)  
‐ifx, ‐‐ imxfx    :  Set image  effect (see  Notes)  
‐cfx, ‐‐ colfx    :  Set colour  effect (U:V) 
‐mm,  ‐‐ metering :  Set metering mode (see  Notes)  
‐rot,  ‐‐ rotation:  Set image  rotation (0 ‐359)  
‐hf, ‐‐ hflip     :  Set horizontal flip 
‐vf, ‐‐ vflip     :  Set vertical  flip 
 
 
Notes 
 
Exposure  mode options  :  
off,auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks  
 
AWB mode options :  
off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon  
 
Image  Effect mode options :  
none,negative,solarise,sketch,denoise,emboss,oilpaint,h atch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon 
 
Metering Mode options  :  
average,spot,backlit,matrix 

Known Issues

  • It is believed that still captures are not using the full sensor.
  • Some users have noted that images are 'flipped', this can be corrected by use of the -hf and -vf command line flags. This behaviour may be addressed in future foundation releases.
  • Correct EXIF data (including user supplied tags) are not being written to the output files.
  • The -? (--help) and -n (--nopreview) command-line options currently don't work, but should be fixed in a future release of the camera apps. Try -p '0,0,0,0' as a workaround while -n doesn't work.

Also, see this forum post which summarises the issues as at 24th May 2013

Troubleshooting

Customizing

Changing the ribbon cable

The ribbon cable that connects the camera board to the Pi is 15-core 1mm pitch ribbon cable. In the UK they can be sourced from http://www.toby.co.uk/content/catalogue/products.aspx?series=FFCx-xx-A-xx-xx where the required type is FFC1-15-B150105160MM[1]. Other suppliers have been noted on eBay.

The Foundation has noted that the operation of the camnera is only reliable with ribbon cable lengths up to 15cm although longer cables could be tried.[2]

Macro lenses

References