I am getting an error when I run the following sample display image program in my Dell Inspiron 15R windows 8.1 64 bit system
import numpy as np
import cv2
img = cv2.imread('G:/space.jpg',0)
cv2.imshow('image',img)
cv2.waitKey(0) & 0xFF
cv2.destroyAllWindows()
And the error which I am getting at the command prompt is:
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\Ankit>python G:/messi.py
OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in unknown function, file C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\array.cpp, line 2482
Traceback (most recent call last):
File "G:/messi.py", line 5, in
cv2.imshow('image',img)cv2.error: C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\array.cpp:2
482: error: (-206) Unrecognized or unsupported array type
Please help! I am a novice in opencv.
print imgto check if it's valid. See theimreaddocumentation for more information. - Falko