I am using python 2.7 on 64 bit win7 and have opencv 2.4.x.
When I write cv2.imread ('pic'), it opens pic in my python path by default, which is equal C:\Users\Myname
. But how do I manage to browse another directory to open images? those. D:\MyPicLib
.
Meanwhile, I don't want to change the default directory, because all my python modules are stored in C:\Users\Myname
. I just want to control the connection of images inD:\MyPicLib
After this part, you can also help me view not one, but several images (in a specific format, for example, just .jpg in the directory) for the while / while loop?
Thanks in advance, the problem seems easy, but despite all my efforts, I have not found a solution to change the python path by default.
talha source
share