动植物标本制作大赛 需要制作一个关于植物标本的二维码 存放采集植物的视频
笑了
pip install qrcode
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
新建文件贴入代码如下:
import qrcode
import cv2
# 视频链接
video_url = "https://www.bilibili.com/video/BV1Kh411n7qN/?spm_id_from=333.337.search-card.all.click"
# 生成二维码
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
qr.add_data(video_url)
qr.make(fit=True)
img = qr.make_image(fill_color="black", back_color="white")
img.save("vide1_qr.png")
cv2.destroyAllWindows()
print("Video processing complete.")
二维码
标签:视频,qr,python,编程,pip,二维码,video,qrcode From: https://blog.csdn.net/Pythonliu7/article/details/142061464