telemetry.internal.image_processing.video_file_frame_generator
index
telemetry/internal/image_processing/video_file_frame_generator.py

# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

 
Modules
       
cv2
telemetry.internal.util.external_modules
telemetry.internal.image_processing.frame_generator

 
Classes
       
telemetry.internal.image_processing.frame_generator.FrameGenerator(__builtin__.object)
VideoFileFrameGenerator

 
class VideoFileFrameGenerator(telemetry.internal.image_processing.frame_generator.FrameGenerator)
    Provides a Frame Generator for a video file.
 
Sample Usage:
  generator = VideoFileFrameGenerator(sys.argv[1]).GetGenerator()
  for frame in generator:
    # Do something
 
Attributes:
  _capture: The openCV video capture.
  _frame_count: The number of frames in the video capture.
  _frame_index: The frame number of the current frame.
  _timestamp: The timestamp of the current frame.
  _dimensions: The dimensions of the video capture.
 
 
Method resolution order:
VideoFileFrameGenerator
telemetry.internal.image_processing.frame_generator.FrameGenerator
__builtin__.object

Methods defined here:
__init__(self, video_filename, start_frame_index=0)
Initializes the VideoFileFrameGenerator object.
 
Args:
  video_filename: str, The path to the video file.
  start_frame_index: int, The number of frames to skip at the start of the
      file.
 
Raises:
  FrameReadError: A read error occurred during initialization.

Data descriptors defined here:
CurrentFrameNumber
CurrentTimestamp
Dimensions

Data and other attributes defined here:
__abstractmethods__ = frozenset([])

Data descriptors inherited from telemetry.internal.image_processing.frame_generator.FrameGenerator:
Generator
Returns:
A reference to the created generator.
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from telemetry.internal.image_processing.frame_generator.FrameGenerator:
__metaclass__ = <class 'abc.ABCMeta'>
Metaclass for defining Abstract Base Classes (ABCs).
 
Use this metaclass to create an ABC.  An ABC can be subclassed
directly, and then acts as a mix-in class.  You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as 'virtual subclasses' -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function, but the registering ABC won't show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).