如图接好摄像头
进入树莓派系统,打开终端
输入
sudo raspi-config(开启摄像头)
测试摄像头
raspistill -v -o test.jpg
安装摄像头软件
sudo apt-get upgrade
sudo apt install motion
sudo nano /etc/motion/motion.conf(配置相关文件)
#根据情况,更改配置文件内容
stream_port 8081 (看端口)
stream_localhost off(no改为off)
width(Image width)
height(改分辨率)
daemon on (后台运行)
sudo systemctl start motion
sudo systemctl enable motion (设置开机启动)
sudo kil