8

Python实现调用摄像头并拍照发邮箱

 3 years ago
source link: https://blog.csdn.net/A_7878520/article/details/117421132
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

项目地址:

https://github.com/flygaga/camera

1、通过opencv调用摄像头拍照保存图像到本地

2、用email库构造邮件内容,保存图片以附件形式插入邮件内容

3、用smtplib库发送邮件到指定邮箱

4、生成 .exe 文件

5、设置开机自启(每次开机自动运行,启动相机,拍下照片发送到指定邮箱)

系统:Windows10

软件:Miniconda3-latest-Windows-x86_64

模块:opencv-python smtplib numpy email pyinstaller

生成exe文件

pyinstaller -F -w path/camera.py

设置开机自启

1.右击exe 创建快捷方式

2.win+r 输入以下命令 shell:startup 点击确定打开一个文件夹

3.将生成的快捷文件复制到打开的文件中,下次开机exe程序就会自动启动

python代码实现调用摄像头,并拍照发送邮件

camera.py

以上就是python实现调用摄像头并拍照发邮箱的详细内容啦

感谢各位大佬的观看,小编这边准备了一个既能学习交流的也能接单的qq群聊 :222020937【代码也准备好了】 欢迎加入《广告勿加,不然你做啥啥不赚钱》最后祝大家技术能力能越来越好收入越来越多


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK