當前位置: 首頁>>代碼示例>>Python>>正文


Python video.create_capture方法代碼示例

本文整理匯總了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) 
開發者ID:makelove,項目名稱:OpenCV-Python-Tutorial,代碼行數:10,代碼來源:feature_homography.py

示例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 
開發者ID:makelove,項目名稱:OpenCV-Python-Tutorial,代碼行數:8,代碼來源:lk_track.py

示例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) 
開發者ID:makelove,項目名稱:OpenCV-Python-Tutorial,代碼行數:11,代碼來源:plane_ar.py

示例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 
開發者ID:makelove,項目名稱:OpenCV-Python-Tutorial,代碼行數:12,代碼來源:camshift.py

示例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 
開發者ID:makelove,項目名稱:OpenCV-Python-Tutorial,代碼行數:9,代碼來源:mosse.py

示例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) 
開發者ID:fatcloud,項目名稱:PyCV-time,代碼行數:10,代碼來源:feature_homography.py

示例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) 
開發者ID:fatcloud,項目名稱:PyCV-time,代碼行數:11,代碼來源:plane_ar.py

示例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 
開發者ID:fatcloud,項目名稱:PyCV-time,代碼行數:12,代碼來源:camshift.py

示例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 
開發者ID:fatcloud,項目名稱:PyCV-time,代碼行數:6,代碼來源:lk_homography.py


注:本文中的video.create_capture方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。