In openCV2 been several changes:
import cv
ll = "/home/pavan/Desktop/iff pics/out0291.tif"
img = cv.LoadImage(ll)
cv.NamedWindow("Example", cv.CV_WINDOW_AUTOSIZE )
cv.ShowImage("Example", img )
cv.WaitKey(10000)
cv.DestroyWindow("Example")
This is a simpler, pretty clean syntax!
In addition, you do not need to pull ;à-la-matlab. Finally, be careful with the quotation marks that you use.
For the new OpenCV3 API, you should see a different answer to this question.
source
share