imread() of opencv in python is not working for any image -


i trying read images using imread() function of opencv, , thereby trying show read. unable read anything.

import cv import sys  # user supplied values imagepath = sys.argv[1] cascpath = sys.argv[2]  # create haar cascade facecascade = cv2.cascadeclassifier(cascpath)  # read image image = cv2.imread(imagepath) cv2.imshow("image read", image) 

thats code in python, using command prompt execution , thereby:

c:\> c:\python27\python.exe c:\users\divy\desktop\facedetectmaster\face_detect.py c:\\users\\divy\\deskop\\facedetect-master\\abba.png c:\\users\\divy\\desktop\ \facedetect-master\\haarcascade_frontalface_default.xml  opencv error: assertion failed (size.width>0 && size.height>0) in cv::imshow, file c:\builds\master_packslaveaddon-win32-vc12-static\opencv\modules\highgui\src\window.cpp, line 271 traceback (most recent call last):   file "c:\users\divy\desktop\facedetect-master\face_detect.py", line 13, in <mo dule>     cv2.imshow("images read", image) cv2.error: c:\builds\master_packslaveaddon-win32-vc12-static\opencv\modules\high gui\src\window.cpp:271: error: (-215) size.width>0 && size.height>0 in function cv::imshow 


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -