opencv/samples/python/minidemo.py

14 lines
322 B
Python
Raw Normal View History

#! /usr/bin/env python
2011-07-12 20:56:03 +08:00
import cv2.cv as cv
cap = cv.CreateFileCapture("../c/tree.avi")
img = cv.QueryFrame(cap)
print "Got frame of dimensions (", img.width, " x ", img.height, ")"
cv.NamedWindow("win", cv.CV_WINDOW_AUTOSIZE)
cv.ShowImage("win", img)
cv.MoveWindow("win", 200, 200)
cv.WaitKey(0)
2012-03-19 07:07:39 +08:00
cv.DestroyAllWindows()