将 C:\OpenCV2.1\Python2.6\Lib\site-packages 加入 sys.path 路径
讲 opencv bin 目录加入系统路径
import cv
即可
附视频处理的框架:
import cv im = cv.LoadImageM("../sandymandy.jpg") print type(im) #cv.SaveImage("foo.png", im) capture = cv.CaptureFromFile('../sandy.avi') cv.NamedWindow("sandy") while True: img=cv.QueryFrame(capture) if img == None: break cv.ShowImage("sandy",img) cv.WaitKey(30) cv.DestroyWindow("sandy")
0 comments:
Post a Comment