Home why cv2.imshow() results in error in my python compiler?
Reply: 0

why cv2.imshow() results in error in my python compiler?

user717
1#
user717 Published in July 16, 2018, 6:52 am

Hi friends i just now installed opencv and checking the basic code but it results in error. The code is

import numpy as np
import cv2
img=cv2.imread('C:\Users\Pravin\Desktop\a.jpeg',1)
cv2.namedWindow('img',cv2.WINDOW_NORMAL)
cv2.Waitkey(10000)
cv2.imshow('cv2.WINDOW_NORMAL',img)
cv2.destoryAllWindows()

The error for cv2.imshow() is

Traceback (most recent call last):
 File "<pyshell#3>", line 1, in <module>
cv2.imshow('image',img)
error: ..\..\..\src\opencv\modules\highgui\src\window.cpp:261: error: (-215)
size.width>0 && size.height>0

It was very helpful to me with your answer. Thanks in advance

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.423588 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO