0
点赞
收藏
分享

微信扫一扫

如何用cv2.imread()读取falsk接收的图片

念川LNSC 2023-05-18 阅读 29

file = request.files['file']
img = file.read()
img = cv2.imdecode(np.frombuffer(img, np.uint8), cv2.IMREAD_COLOR)


请注意如果这里用

cv2.imread()
则会报错

SystemError: <built-in function imread> returned NULL without setting an error

参考https://www.jianshu.com/p/cafbeec49674 

举报

相关推荐

0 条评论