Posts
Wiki

Webcam

Webcams are a great choice; they're easy to use, come pre-packaged in all sorts of styles and product ranges including microscopes, night-vision and waterproof designs.

Any webcam that works on linux will work with the raspberry pi, and that's almost all of them. In some situations such as using a raspberry pi zero or very energy intensive webcam then you might have to use a powered usb hub to make it work.

Simply plug in the webcam and go to the 'camera config' tab, press '...' to search for cameras then select your camera from the dropdown list, select either uvccapture or fswebcam as the capture tool and press 'take using cam default' this will take a photo and display it on the screen, change the settings on the top-right pressing 'take using local settings' to view test images, when you're happy with the image press 'save to pi' to write your config file.

Once your camera is set up you're ready to start filming your timelapse, select the 'cron timing' tab and press 'add a new cron job'

select 'timing method' 'repeating' and '~/Pigrow/scripts/cron/' as the path, select the 'camcap.py' script for the task and choose how often you want to take a photo.

-- if the config file path isn't ~/Pigrow/config/camera_settings.txt' then you'll need to supply it by adding 'settings_file=home/[pi username]/Pigrow/config/[name of config file] in the 'Extra args' textbox.

Picam

Picam's plug into the raspberry pi's special camera port using a ribbon cable.

To configure a picam you must first ensure the pi's camera port is turned on and the camera is wired in correctly.

To test and config the picam in the remote gui first select the 'camera config' tab them press the '...' button next to the camera selection tab to search for cameras selecting 'picam 0' from the list.

Next select 'picamcap' as the capture tool, at the moment this is the only method that works correctly with the picam.

Now press the 'take using cam default' this will take a photo using your picam, download it to your local computer and display it on the screen.

Change the settings on the top of the right hand window pressing 'take using local settings' to test your settings then when you're happy with the image press 'save to pi' to write your config file.

camera settings

Settingoptionsdefaultexplanation
resolution(800,600) (1280, 720) (3280, 2464)depends on picam model
brightness0 to 1000
contrast-100 to 1000
analog_gain??
digital gain??
iso0, 100, 200, 320, 400, 500, 640, 8000 (auto)When set, the property adjusts the sensitivity of the camera (by adjusting the analog_gain and digital_gain)
saturation-100 to 1000colour saturation
sharpness-100 to 1000post-processing to add or decrease sharpness
drc_strength'off' 'low' 'medium' 'high'offdynamic range compression
exposure_compensation-25 to 250larger values result in brighter images, each represents 1/6th of a stop.
exposure_mode'off' 'auto' 'night' 'nightpreview' 'backlight' 'spotlight' 'sports' 'snow' 'beach' 'verylong' 'fixedfps' 'antishake' 'fireworks'autospecial exposure modes
shutter_speed0 (auto), 1 to ?0 (auto)shutter speed of the camera in microseconds.
hflipTrue or FalseFalseFlip image Horizontally
vflipTrue or FalseFalseFlip image Vertically
rotation0, 90, 180, 2700Rotation of the image
meter_mode'average' 'spot' 'backlit' 'matrix''average'
image_denoise'True' 'False''False'remove noise from the image with post-processing
image_effect'none' 'negative' 'solarize' 'sketch' 'denoise' 'emboss' 'oilpaint' 'hatch' 'gpen' 'pastel' 'watercolor' 'film' 'blur' 'saturation' 'colorswap' 'washedout' 'posterise' 'colorpoint' 'colorbalance' 'cartoon' 'deinterlace1' 'deinterlace2''none'
image_effect_paramsdepends on image_effectNonesee https://picamera.readthedocs.io/en/release-1.13/api_camera.html
awb_mode'off' 'auto' 'sunlight' 'cloudy' 'shade' 'tungsten' 'fluorescent' 'incandescent' 'flash' 'horizon''auto'auto-white balance mode

not yet settable ;

flash_mode - 'off' 'auto' 'on' 'redeye' 'fillin' 'torch' - You must define which GPIO pins the camera is to use for flash and privacy indicators. This is done within the Device Tree configuration which is considered an advanced topic.

awb_gains

color_effect - (0-255, 0-255) (128, 128) = black and white, default = None

sensor_mode - advanced setting https://picamera.readthedocs.io/en/release-1.13/fov.html#camera-modes

starting time lapse

Once your camera is set up you're ready to start filming your timelapse, select the 'cron timing' tab and press 'add a new cron job'

select 'timing method' 'repeating' and '~/Pigrow/scripts/cron/' as the path, select the 'picamcap.py' script for the task and choose how often you want to take a photo.

-- if the config file path isn't ~/Pigrow/config/picam_settings.txt' then you'll need to supply it by adding 'settings_file=home/[pi username]/Pigrow/config/[name of config file] in the 'Extra args' textbox.