File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Python技术 公众号文章代码库
1010
1111## 实例代码
1212
13+ [ 一行代码,生成和读取二维码!] ( https://github.com/JustDoPython/python-examples/tree/master/xianhuan/qrcode ) :一行代码,生成和读取二维码!
14+
1315[ 用 Python 写最简单的摸鱼监控进程,你会吗?] ( https://github.com/JustDoPython/python-examples/tree/master/xianhuan/monitor ) :用 Python 写最简单的摸鱼监控进程,你会吗?
1416
1517[ 用Python对摩斯密码加解密!] ( https://github.com/JustDoPython/python-examples/tree/master/xianhuan/morse ) : 用Python对摩斯密码加解密!
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # -*- coding: utf-8 -*-
3+ """
4+ @author: 闲欢
5+ """
6+ import qrcode
7+ import cv2
8+
9+ img = qrcode .make ('https://www.zhihu.com/people/wu-huan-bu-san' )
10+ img .save ('./pic.jpg' )
11+
12+ d = cv2 .QRCodeDetector ()
13+ val , _ , _ = d .detectAndDecode (cv2 .imread ("pic.jpg" ))
14+ print ("Decoded text is: " , val )
15+
You can’t perform that action at this time.
0 commit comments