Ask Your Question
0

Image path

asked 2014-04-13 20:27:01 -0600

ashecheerios gravatar image

updated 2015-09-25 14:56:35 -0600

How do I know what is the image path to this lcode (last line)

import numpy as np import cv2 img = cv2.imread('messi5.jpg',0)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
-1

answered 2014-04-14 00:09:16 -0600

Firechin gravatar image

updated 2014-04-14 00:19:28 -0600

I need help on this as well. But from scouring different sources on the internet they said if you look in Solution Explorer and right click your project go to properties and under Configuration Properties/Debugging => The working directory is where the image.jpg should be read from. Which is technically your project directory where your program files(code) file is.

But I have placed an image in almost every folder in my project file and none of my images have been a hit. The program should be straight forward as with everyone else who wrote the image display, but mine just pops up a gray window with no image. If what I suggested works could you tell me how you set up yours because I am pulling hair just to display an image while using video cams and everything else is a cinch for me. Or you could do a specified path in imread() "C:/path"

P.S: From the amount of view we are getting I assume there are many of us who are figuring this out. If possible an expert user that pass by could you please help us out. Even OpenCV's documentation is vague regarding location.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-04-13 20:27:01 -0600

Seen: 218 times

Last updated: Apr 14 '14