Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import cv2
  2.  
  3. template_path = 'C:/Users/37533/Desktop/template.png'
  4. template = cv2.imread(template_path)
  5. cv2.imshow('Window', template)
  6. cv2.waitKey()
  7.  
  8. #Error
  9.  
  10. Traceback (most recent call last):
  11.   File "C:/Users/37533/PycharmProjects/bot/try.py", line 5, in <module>
  12.     cv2.imshow('Window', template)
  13. cv2.error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement