Hello,
i want to do some OpenCV Basic Operations using Python. My Problem is that the Pythoninterpreter says that the file i want to open with cv.LoadImage() dont exists. But as you can see in my code and the and the Interpreter Output this file exists and the Program should be able to read it.
Likly the answer is simple (im new at Python Programming!). Thanks for answers!
Here my Code:
import cv, sys, os
print sys.argv[1]
print os.getcwd()
print os.access(sys.argv[1], os.F_OK)
img = cv.LoadImage(sys.argv[1], 1)
cv.NamedWindow("orginal", CV_WINDOW_AUTOSIZE)
cv.ShowImage("orginal", img)
cv.waitKey(0)
here is the Pythoninterpreter Output:
dennis@Powertux:~/opencv/showPicture$ python2.5 showPicture.py google-de02.jpg google-de02.jpg
/home/steffke/opencv/showPicture
True
Traceback (most recent call last):
File "showPicture.py", line 7, in <module>
img = cv.LoadImage(sys.argv[1], 1)
IOError: [Errno 2] No such file or directory: 'google-de02.jpg'