Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)
edited by

I'm using OpenCV 2.4.2, python 2.7 The following simple code created a window of the correct name, but its content is just blank and doesn't show the image:

import cv2 

img=cv2.imread('C:/Python27/03323_HD.jpg') cv2.imshow('ImageWindow',img)

does anyone know about this issue?

2 Answers

0 votes
by (106k points)
edited by

You can use the imshow() which will work properly with waitKey()see the code below:-

import cv2 

img = cv2.imread('C:/Python27/03323_HD.jpg')

cv2.imshow('ImageWindow', img) cv2.waitKey()

0 votes
by
Yes even i face the same issue....

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Oct 14, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
asked Mar 21, 2021 in Python by laddulakshana (16.4k points)
0 votes
1 answer

Browse Categories

...