Introduction
The Raspberry Pi Camera V2 board is a high quality 8 megapixel Sony IMX219 image sensor custom designed add-on board for Raspberry Pi, featuring a fixed focus lens. It's capable of 3280 x 2464 pixel static images, and also supports 1080p30, 720p60 and 640x480p60/90 video. It attaches to Pi by way of one of the small sockets on the board upper surface and uses the dedicated CSi interface, designed especially for interfacing to cameras.Â
In this guide, you will learn to set up and get started with the Raspberry Pi Camera V2 using Python and picamera.
After this, you will be able to work on more advanced projects such as a time-lapse camera, a home security system, motion detection, time lapse photography, slow-motion video and much more!
Tools
-
-
-
from picamera import PiCamera from time import sleep camera = PiCamera() camera.start_preview() sleep(30) camera.stop_preview()
-
camera.rotation = 180 camera.start_preview() sleep(10) camera.stop_preview()
-
from picamera import PiCamera from time import sleep camera = PiCamera() camera.start_preview(alpha=200) sleep(10) camera.stop_preview()
-
camera.start_preview() sleep(5) camera.capture('/home/pi/Desktop/image.jpg') camera.stop_preview()
-
camera.start_preview() for i in range(5): sleep(5) camera.capture('/home/pi/Desktop/image%s.jpg' % i) camera.stop_preview()
-
camera.start_preview() camera.start_recording('/home/pi/video.h264') sleep(10) camera.stop_recording() camera.stop_preview()
-
omxplayer video.h264
-