import cv2
import numpy as np
# #读取图片
# src = cv2.imread('../111/a.png', cv2.IMREAD_UNCHANGED)
# blur=cv2.blur(src,(5,5))
# cv2.imshow("original", src)
# cv2.imshow("opening", blur)
#等待显示
img=cv2.imread('../素材/a.jpg')
cv2.imshow('a',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
[ WARN:0@0.010] global loadsave.cpp:244 cv::findDecoder imread_('图像处理\a1.jpg'): can't open/read file: check file path/integrity
Traceback (most recent call last):
File "D:/PyCharm Community Edition 2021.2.3/Project/Calculate/机器视觉/test.py", line 4, in <module>
cv2.imshow('a',img)
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:971: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
在进行学习的时候,遇到了这个问题文章来源:https://www.toymoban.com/news/detail-504330.html
原因是:imread读取路径中不能带中文字符文章来源地址https://www.toymoban.com/news/detail-504330.html
到了这里,关于[ WARN:0@0.010] : can‘t open/read file: check file path/integrity错误的一种解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!