Help with the basics

asked 2016-02-15 22:14:31 -0600

I'm really new to Open CV and could really use some guidance. I'm not even able to load an image to open cv, I'm using python.

edit retag flag offensive close merge delete

Comments

3

have a look at the tutorials ,

e.g. here

then come back ?

berak gravatar imageberak ( 2016-02-16 01:01:00 -0600 )edit

Maybe you can watch this video first: opencv-python. Then you can try to understand this tutorial

Aj-611 gravatar imageAj-611 ( 2016-02-16 02:55:27 -0600 )edit

Ok Thank you. For loading the image, what should be the Image location? It isn't loading images at the desktop and download folder (OS X)

Sanyam Bhutani gravatar imageSanyam Bhutani ( 2016-02-16 06:52:32 -0600 )edit

if you're trying to do something like this

img = cv2.imread('messi5.jpg')

than the image location is where your Python script is. Otherwise you should specify path to image

strann gravatar imagestrann ( 2016-02-16 07:48:24 -0600 )edit

Ok. How do I load an image at a custom path. Say my desktop?

Sanyam Bhutani gravatar imageSanyam Bhutani ( 2016-02-17 04:48:41 -0600 )edit

img = cv2.imread('/home/user/Desktop/messi5.jpg')

strann gravatar imagestrann ( 2016-02-17 07:26:55 -0600 )edit

I get this error. OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file

Sanyam Bhutani gravatar imageSanyam Bhutani ( 2016-02-17 10:39:30 -0600 )edit

check if the path is correct

strann gravatar imagestrann ( 2016-02-18 03:45:44 -0600 )edit

It is, double checked it. I'm using OPENCV-3.1.0, on OS X

Sanyam Bhutani gravatar imageSanyam Bhutani ( 2016-02-18 11:29:16 -0600 )edit