我试图实现这段代码
import glob
import cv2
images = [cv2.imread(file) for file in glob.glob("C:\\Users\\DELL\\OneDrive\\Desktop\\New folder\\*.jpg")]
cv2.imshow(images,mat=0)
但它显示了这个错误:
Traceback (most recent call last):
File "C:\Users\DELL\PycharmProjects\pythonProject\learn\project3.py", line 5, in <module>
cv2.imshow(images,mat=0)
TypeError: Can't convert object of type 'list' to 'str' for 'winname'
有人能帮我解决这个问题吗。
1条答案
按热度按时间polkgigr1#
希望这能奏效!