The official Raspberry Pi camera Module, capable of shooting 5 million megapixel images and recording 1080p video, uses the CSI interface on the Raspberry Pi board.
Installing the Camera
First make sure that the Raspberry Pi system is a newer version and that the camera function is turned on. Enter a command: sudo raspi-config
and tick the 5th Enable camera feature. Such as:
Physically install the camera to the Raspberry Pi, this feeling is easy to look like, no, look at this video tutorial: Video teaches you how to install the camera
Capture a Picture: Raspistill
The Raspistill command is a tool for capturing images provided by the Raspberry Pi, enter the following command to get an image saved to Image.jpg
Raspistill-o Image.jpg-rot 180
Parameter o is the output to the meaning of the file; parameter rot is rotated picture 180 degrees, because the camera I was to let him line up, so need to rotate a bit. After the command input, you will find the LED on the camera on, about 7 seconds to go off, and the command completed. Look at the picture, found that the image is very clear, much better than the USB camera, which is a more expensive reason for it.
Then there is a question, why take a picture for 7 seconds?
Increase the-v parameter to view debug information:raspistill -o image.jpg -rot 80 -v
You can see a line of information inside: Time Delay:5000
. Then look at the command document and find that the default-t parameter equals 5000, which will wait 5 seconds before taking the picture.
Then increase the speed of the-t parameter set a little bit faster, it is true, but in the test found that there is not enough light to wait for the length of time no difference, in the light is poor, the shorter waiting time screen is yellow.
Raspistill commonly used parameters
-V: Debug Information view.
-W: Image width
-H: Image height
-rot: Image rotation angle, only supports 0, 90, 180, 270 degrees
-O: Image output address, e.g. Image.jpg, if file name is "-", send output to standard output device
-T: Gets the image before the wait time, the default is 5000, that is, 5 seconds
-TL: How often to perform an image crawl.
For example:
Raspistill-o Image%d.jpg-rot 180-w 1024-h 768-t 20000-tl 5000-v
This command means to intercept a picture with a width of 1024px, a height of 768px, a rotation of 180 degrees, a total fetch of 20 seconds, and a fetch for every 5 seconds, the saved file name is image1.jpg,image2.jpg and so on.
Raspberry Pi Webcam Use