PiCamera

Installation

$ sudo apt-get update
$ sudo apt-get install python-picamera

Example

>>> import picamera
>>> camera = picamera.PiCamera()
>>> camera.start_preview()
>>> camera.stop_preview()

Funktions for the Camera Preview:

brightness (0<u<100)

camera.brightness = u

color effects (0 < u < 255 and 0 < v < 255)
The default value is None

camera.color_effects = (u, v)

contrast (-100 < u < 100)

camera.contrast = -i

crop (0.0 - 1.0)

for i in range(100):
  zoom = i / 100.0
  zoom1 = 1.0 - zoom
  camera.crop = (zoom, zoom, zoom1, zoom1)
  

framerate

hflip (False, True)

camera.vflip = False

image_effect
Image effect mode options:
none, negative, sketch, denoise, emboss, hatch, gpen, pastel, film, blur, saturation, washedout, posterise, cartoon
These effects don't work:
solarise, oilpaint, watercolour, colourswap, colourpoint, colourbalance

camera.image_effect = 'posterise'

preview_alpha

camera.preview_alpha = 100

preview_fullscreen (False, True)

camera.preview_fullscreen = True

preview_window (X,Y,width,hight)

camera.preview_fullscreen = False
camera.preview_window = (100, 100, 1000, 500)

rotation (0, 90, 180, 270)

camera.rotation = 90

saturation (-100 < u < 100)

camera.saturation = u

sharpness (-100 < u < 100)

camera.sharpness = u

vflip (False, True)

camera.vflip = False

exposure

cam.exposure_mode = 'off'

AWB

cam.awb_mode = 'auto'