本文整理汇总了Python中video.create_capture方法的典型用法代码示例。如果您正苦于以下问题:Python video.create_capture方法的具体用法?Python video.create_capture怎么用?Python video.create_capture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类video
的用法示例。
在下文中一共展示了video.create_capture方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, src):
self.cap = video.create_capture(src, presets['book'])
self.frame = None
self.paused = False
self.tracker = PlaneTracker()
cv2.namedWindow('plane')
self.rect_sel = common.RectSelector('plane', self.on_rect)
示例2: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, video_src):
self.track_len = 10
self.detect_interval = 5
self.tracks = []
self.cam = video.create_capture(video_src)
self.frame_idx = 0
示例3: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, src):
self.cap = video.create_capture(src, presets['book'])
self.frame = None
self.paused = False
self.tracker = PlaneTracker()
cv2.namedWindow('plane')
cv2.createTrackbar('focal', 'plane', 25, 50, common.nothing)
self.rect_sel = common.RectSelector('plane', self.on_rect)
示例4: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, video_src):
self.cam = video.create_capture(video_src, presets['cube'])
ret, self.frame = self.cam.read()
cv2.namedWindow('camshift')
cv2.setMouseCallback('camshift', self.onmouse)
self.selection = None
self.drag_start = None
self.show_backproj = False
self.track_window = None
示例5: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, video_src, paused = False):
self.cap = video.create_capture(video_src)
_, self.frame = self.cap.read()
cv2.imshow('frame', self.frame)
self.rect_sel = RectSelector('frame', self.onrect)
self.trackers = []
self.paused = paused
示例6: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, src):
self.cap = video.create_capture(src)
self.frame = None
self.paused = False
self.tracker = PlaneTracker()
cv2.namedWindow('plane')
self.rect_sel = common.RectSelector('plane', self.on_rect)
示例7: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, src):
self.cap = video.create_capture(src)
self.frame = None
self.paused = False
self.tracker = PlaneTracker()
cv2.namedWindow('plane')
cv2.createTrackbar('focal', 'plane', 25, 50, common.nothing)
self.rect_sel = common.RectSelector('plane', self.on_rect)
示例8: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, video_src):
self.cam = video.create_capture(video_src)
ret, self.frame = self.cam.read()
cv2.namedWindow('camshift')
cv2.setMouseCallback('camshift', self.onmouse)
self.selection = None
self.drag_start = None
self.tracking_state = 0
self.show_backproj = False
示例9: __init__
# 需要导入模块: import video [as 别名]
# 或者: from video import create_capture [as 别名]
def __init__(self, video_src):
self.cam = video.create_capture(video_src)
self.p0 = None
self.use_ransac = True