Ask Your Question

Revision history [back]

imshow opens window to be grey and freezes

I'm new to opencv and starting by reading in an image, and trying to display. from the command prompt:

cd to the project directory, then:

import cv2

Load a color image in grayscale

img = cv2.imread('oyster.jpg',0) cv2.imshow('img', image) cv2.waitKey(0)

it opens a windows10 window which is just grey and freezes.

Any pointers would be appreciated.

click to hide/show revision 2
None

updated 2020-01-31 06:50:27 -0600

berak gravatar image

imshow opens window to be grey and freezes

I'm new to opencv and starting by reading in an image, and trying to display. from the command prompt:

cd to the project directory, then:

import cv2

cv2

# Load a color image in grayscale

grayscale img = cv2.imread('oyster.jpg',0) cv2.imshow('img', image) cv2.waitKey(0)

cv2.waitKey(0)

it opens a windows10 window which is just grey and freezes.

Any pointers would be appreciated.

click to hide/show revision 3
retagged

updated 2020-01-31 06:51:06 -0600

berak gravatar image

imshow opens window to be grey and freezes

I'm new to opencv and starting by reading in an image, and trying to display. from the command prompt:

cd to the project directory, then:

import cv2

# Load a color image in grayscale
img = cv2.imread('oyster.jpg',0)
cv2.imshow('img', image)
cv2.waitKey(0)

it opens a windows10 window which is just grey and freezes.

Any pointers would be appreciated.