Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Python & OpenCV

$
0
0
Dears, I try to use OpenCV in Python, and running example such as import numpy as np import cv2 img = cv2.imread('messi5.jpg',0) cv2.namedWindow('image', cv2.WINDOW_NORMAL) cv2.imshow('image',img) cv2.waitKey(0) cv2.destroyAllWindows()import numpy as np import cv2 img = cv2.imread('messi5.jpg',0) cv2.namedWindow('image', cv2.WINDOW_NORMAL) cv2.imshow('image',img) cv2.waitKey(0) cv2.destroyAllWindows() Unfortunately I'm not able to dislpay image and getting errors such as Traceback (most recent call last): File "", line 1, in runfile('C:/Python27/Scripts/untitled1.py', wdir='C:/Python27/Scripts') File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile execfile(filename, namespace) File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 71, in execfile exec(compile(scripttext, filename, 'exec'), glob, loc) File "C:/Python27/Scripts/untitled1.py", line 14, in cv2.imshow('image',img) error: ..\..\..\modules\highgui\src\window.cpp:269: error: (-215) size.width>0 && size.height>0 in function cv::imshow what;s the propoer way to handle images and displaying hem in python? Thank you. Peter

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>