Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize camera trial in Raspberry Pie

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the raspberry pie how to achieve camera trial, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to know it.

Install the camera

First of all, make sure that the raspberry pie system is a newer version and turn on the camera function. Enter the command: sudo raspi-config and check the fifth enable camera function. As shown below:

Physically install the camera on the raspberry pie, which feels easy. If not, take a look at this video tutorial: the video teaches you how to install the camera.

Capture a picture: raspistill

The raspistill command is a tool for capturing an image provided by raspberry pie. Enter the following command to get an image and save it to image.jpg

Raspistill-o image.jpg-rot 180

The parameter o means output to the file; the parameter rot rotates the image 180 degrees, because I asked him to line up the camera, so I need to rotate it. After entering the command, you will find that the led light on the camera goes out for about 7 seconds, and the command has been executed. Look at the picture and find that the image is very clear, which is much better than the usb camera, which is one of the reasons why it is more expensive.

At this time, there is a question, why does it take 7 seconds to take a picture?

Add the-v parameter to view the debug information: raspistill-o image.jpg-rot 80-v

You can see that there is a message inside: Time Delay:5000. Then look at the command document and find that the default-t parameter is equal to 5000, that is, you will wait 5 seconds before taking a picture.

So it would be faster to set the-t parameter smaller, but during the test, it was found that there was no difference in the waiting time when the light was sufficient, and when the light was poor, the shorter waiting time was yellow.

Parameters commonly used in raspistill

-v: check the debugging information.

-w: image width

-h: image height

-rot: image rotation angle. Only 0,90,180,270 degrees are supported.

-o: image output address, such as image.jpg, if the file name is "-", send the output to the standard output device

-t: wait time before obtaining an image. Default is 5000, that is, 5 seconds.

-tl: how often do you perform image capture.

For example:

Raspistill-o image%d.jpg-rot 1024-h 768-t 20000-tl 5000-v

This command means to intercept a wide 1024px, high 768px, rotate a 180-degree image, grab a total of 20 seconds, and grab one every 5 seconds, save the file named image1.jpg,image2.jpg, and so on.

Thank you for reading this article carefully. I hope the article "how to realize camera trial of raspberry pie" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report