Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
picamera [2014/07/23 00:05] admin |
picamera [2016/12/11 14:23] (current) admin [Funktions for the Camera Preview:] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ---- | + | ===== PiCamera===== |
| - | **PiCamera**\\ | + | |
| - | ---- | + | |
| [[http:// | [[http:// | ||
| - | ---- | + | ==== Installation ==== |
| - | **Install: | + | |
| $ sudo apt-get update | $ sudo apt-get update | ||
| $ sudo apt-get install python-picamera | $ sudo apt-get install python-picamera | ||
| + | |||
| + | ==== Example ==== | ||
| + | |||
| + | >>> | ||
| + | >>> | ||
| + | >>> | ||
| + | >>> | ||
| ---- | ---- | ||
| - | **Funktion | + | ====Funktions |
| + | __brightness__ (0< | ||
| + | camera.brightness = u | ||
| __color effects__ (0 < u < 255 and 0 < v < 255)\\ | __color effects__ (0 < u < 255 and 0 < v < 255)\\ | ||
| + | The default value is //None//\\ | ||
| camera.color_effects = (u, v) | camera.color_effects = (u, v) | ||
| + | |||
| __contrast__ (-100 < u < 100) | __contrast__ (-100 < u < 100) | ||
| Line 26: | Line 35: | ||
| __framerate__ | __framerate__ | ||
| - | __hflip__ | + | __hflip__ |
| camera.vflip = False | camera.vflip = False | ||
| - | __image_effect__ | + | __image_effect__\\ |
| - | Image Effect | + | Image effect |
| none, negative, sketch, denoise, emboss, hatch, gpen, pastel, film, blur, saturation, washedout, posterise, cartoon\\ | none, negative, sketch, denoise, emboss, hatch, gpen, pastel, film, blur, saturation, washedout, posterise, cartoon\\ | ||
| - | These don't work:\\ | + | These effects |
| solarise, oilpaint, watercolour, | solarise, oilpaint, watercolour, | ||
| camera.image_effect = ' | camera.image_effect = ' | ||
| - | | + | |
| - | | + | __preview_alpha__ |
| - | | + | camera.preview_alpha |
| - | | + | |
| - | | + | __preview_fullscreen__ (False, True) |
| - | | + | camera.preview_fullscreen |
| - | | + | |
| + | __preview_window__ (X, | ||
| + | camera.preview_fullscreen = False | ||
| + | camera.preview_window | ||
| + | | ||
| + | __rotation__ (0, 90, 180, 270) | ||
| + | | ||
| + | | ||
| + | __saturation__ (-100 < u < 100) | ||
| + | | ||
| - | ---- | + | __sharpness__ (-100 < u < 100) |
| - | **Example: | + | camera.sharpness = u |
| + | |||
| + | __vflip__ | ||
| + | camera.vflip = False | ||
| + | |||
| + | __exposure__ | ||
| + | cam.exposure_mode = ' | ||
| + | |||
| + | __AWB__ | ||
| + | | ||
| - | import time | ||
| - | import picamera | ||
| - | with picamera.PiCamera() as camera: | ||
| - | camera.start_preview() | ||
| - | try: | ||
| - | for j in range(100): | ||
| - | camera.preview_fullscreen = False | ||
| - | camera.preview_window = (100-j, 100-j, 1000, 500) | ||
| - | time.sleep(0.2) | ||
| - | finally: | ||
| - | camera.stop_preview() | ||
| ---- | ---- | ||