กล้อง ( camera ) 5 ล้านพิกเซล สำหรับ Raspberry Pi
กดเพื่อขยายขนาด |
|
กล้อง ( camera ) สำหรับ Raspberry Pi
ความละเอียด 5 ล้านพิกเซล
วิธีการเปิดใช้งานกล้อง
1. เปิด terminal แล้วใช้คำสั่ง sudo apt-get update
2. ใช้คำสั่ง sudo apt-get upgrade
3. enable camera โดยใช้คำสั่ง sudo raspi-config
การใช้คำสั่งพื้นฐาน เพื่อใช้งาน camera
How to use the Raspberry Pi camera software
raspivid is a command line application that allows you to capture video with the camera module, while the applicationraspistill allows you to capture images.
-o or -output specifies the output filename and -t or -timeout specifies the amount of time that the preview will be displayed in milliseconds. Note that this set to 5s by default and that raspistill will capture the final frame of the preview period.
-d or -demo runs the demo mode that will cycle through the various image effects that are available.
Example commands
Capture an image in jpeg format:
raspistill -o image.jpg
Capture a 5s video in h264 format:
raspivid -o video.h264
Capture a 10s video:
raspivid -o video.h264 -t 10000
Capture a 10s video in demo mode:
raspivid -o video.h264 -t 10000 -d
To see a list of possible options for running raspivid or raspistill, you can run:
raspivid | less
raspistill | less
Use the arrow keys to scroll and type q to exit.
Extended documentation is available.
Note that we recommend that you change SSH password if you are using a camera, in order to prevent unwanted access.
How to stream video from the Raspberry Pi camera over a network
To view the feed on Linux
Install the dependencies by running the following in a terminal:
sudo apt-get install mplayer netcat
Find your IP address by running ifconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).
Run the following command in a terminal to view the feed using MPlayer:
nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
To view the feed on Windows
Install and run Linux instead.
Find your IP address by running ipconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).
Download MPlayer.
Download Netcat.
Note that your browser may complain that these files are malicious, as they are unsigned executables.
Press the Windows key and the ‘r' key simultaneously to bring up the “Run” dialog. Enter cmd.exe into the dialog and press enter/return to open a DOS prompt.
Enter the following command at the prompt to view the feed using MPlayer:
[Path to nc.exe]\nc.exe -L -p 5001 | [Path to mplayer.exe]\mplayer.exe -fps 31 -cache 1024 -
To view the feed on OS X
Download MPlayer.
Alternatively, you can download mplayer using Brew, which we recommend.
Find your IP address by running ifconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).
Run the following command in Terminal to view the feed using MPlayer:
nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
To view the feed on a Raspberry Pi:
Find your IP address by running ifconfig. (Your IP address will be listed in the console output and will probably be of the form 192.168.1.XXX).
Run the following commands in a terminal on the receiving Pi:
mkfifo buffer
nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer
To transmit the feed from the Pi with camera module attached
After setting up the “receiving” machine as per the instructions above, run the following commands in a terminal on the “transmitting” Pi:
raspivid -t 999999 -o - | nc [insert the IP address of the client] 5001
You can then use the commands listed in the “How to use the Raspberry Pi camera software” section above to change the capture time or to add a video effect.
Share
GPIO Extension Board + Cable 40 Pin GPIO And Cable Board 125.00 บาท |
Raspberry Pi 3 Model B+ Pi 3 Model B+ 1,480.00 บาท |
Camera For Raspberry Pi 640*480 Pixel Camera Raspberry Pi 190.00 บาท |
Orange Pi Zero H3 + Wifi Ram 512MB Orange Pi Zero + Wifi 950.00 บาท |
Adapter Power Supply 110-220VAC TO 5VDC 2.5A Micro USB มีสวิตช์ Adapter 5V 2.5A MB 100.00 บาท |
Raspbery PI 3 Case (กล่องสำหรับ raspberry pi)) Raspbery PI 3 Case 95.00 บาท |
Wireless Keyboard + Air Mouse Wireless Keyboard Pocket 270.00 บาท |
จอ 7 Inch 1024x600 HDMI TFT LCD Touch Screen for Raspberry PI 7 1024x600 Touch 1,500.00 บาท |
Raspberry Pi Zero V 1.3 Board 1GHz CPU 512MB Raspberry Pi Zero V 1.3 650.00 บาท |
Orange Pi Lite 512MB DDR3 with Quad Core 1.2GHz WiFi Orange Pi Lite 850.00 บาท |
ความคิดเห็น: คำแนะนำ: HTML จะไม่ถูกแปลง!
ความนิยม: แย่ ดี
ป้อนรหัสในกล่องข้างล่างนี้: