1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.internal.image_processing.video_file_frame_generator</title>
4<meta charset="utf-8">
5</head><body bgcolor="#f0f0f8">
6
7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
8<tr bgcolor="#7799ee">
9<td valign=bottom>&nbsp;<br>
10<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.image_processing.html"><font color="#ffffff">image_processing</font></a>.video_file_frame_generator</strong></big></big></font></td
11><td align=right valign=bottom
12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/image_processing/video_file_frame_generator.py">telemetry/internal/image_processing/video_file_frame_generator.py</a></font></td></tr></table>
13    <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
14#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
15#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
16<p>
17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
18<tr bgcolor="#aa55cc">
19<td colspan=3 valign=bottom>&nbsp;<br>
20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
21
22<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cv2.html">cv2</a><br>
24</td><td width="25%" valign=top><a href="telemetry.internal.util.external_modules.html">telemetry.internal.util.external_modules</a><br>
25</td><td width="25%" valign=top><a href="telemetry.internal.image_processing.frame_generator.html">telemetry.internal.image_processing.frame_generator</a><br>
26</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
27<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
28<tr bgcolor="#ee77aa">
29<td colspan=3 valign=bottom>&nbsp;<br>
30<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
31
32<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
33<td width="100%"><dl>
34<dt><font face="helvetica, arial"><a href="telemetry.internal.image_processing.frame_generator.html#FrameGenerator">telemetry.internal.image_processing.frame_generator.FrameGenerator</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
35</font></dt><dd>
36<dl>
37<dt><font face="helvetica, arial"><a href="telemetry.internal.image_processing.video_file_frame_generator.html#VideoFileFrameGenerator">VideoFileFrameGenerator</a>
38</font></dt></dl>
39</dd>
40</dl>
41 <p>
42<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
43<tr bgcolor="#ffc8d8">
44<td colspan=3 valign=bottom>&nbsp;<br>
45<font color="#000000" face="helvetica, arial"><a name="VideoFileFrameGenerator">class <strong>VideoFileFrameGenerator</strong></a>(<a href="telemetry.internal.image_processing.frame_generator.html#FrameGenerator">telemetry.internal.image_processing.frame_generator.FrameGenerator</a>)</font></td></tr>
46
47<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
48<td colspan=2><tt>Provides&nbsp;a&nbsp;Frame&nbsp;Generator&nbsp;for&nbsp;a&nbsp;video&nbsp;file.<br>
49&nbsp;<br>
50Sample&nbsp;Usage:<br>
51&nbsp;&nbsp;generator&nbsp;=&nbsp;<a href="#VideoFileFrameGenerator">VideoFileFrameGenerator</a>(sys.argv[1]).GetGenerator()<br>
52&nbsp;&nbsp;for&nbsp;frame&nbsp;in&nbsp;generator:<br>
53&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Do&nbsp;something<br>
54&nbsp;<br>
55Attributes:<br>
56&nbsp;&nbsp;_capture:&nbsp;The&nbsp;openCV&nbsp;video&nbsp;capture.<br>
57&nbsp;&nbsp;_frame_count:&nbsp;The&nbsp;number&nbsp;of&nbsp;frames&nbsp;in&nbsp;the&nbsp;video&nbsp;capture.<br>
58&nbsp;&nbsp;_frame_index:&nbsp;The&nbsp;frame&nbsp;number&nbsp;of&nbsp;the&nbsp;current&nbsp;frame.<br>
59&nbsp;&nbsp;_timestamp:&nbsp;The&nbsp;timestamp&nbsp;of&nbsp;the&nbsp;current&nbsp;frame.<br>
60&nbsp;&nbsp;_dimensions:&nbsp;The&nbsp;dimensions&nbsp;of&nbsp;the&nbsp;video&nbsp;capture.<br>&nbsp;</tt></td></tr>
61<tr><td>&nbsp;</td>
62<td width="100%"><dl><dt>Method resolution order:</dt>
63<dd><a href="telemetry.internal.image_processing.video_file_frame_generator.html#VideoFileFrameGenerator">VideoFileFrameGenerator</a></dd>
64<dd><a href="telemetry.internal.image_processing.frame_generator.html#FrameGenerator">telemetry.internal.image_processing.frame_generator.FrameGenerator</a></dd>
65<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
66</dl>
67<hr>
68Methods defined here:<br>
69<dl><dt><a name="VideoFileFrameGenerator-__init__"><strong>__init__</strong></a>(self, video_filename, start_frame_index<font color="#909090">=0</font>)</dt><dd><tt>Initializes&nbsp;the&nbsp;<a href="#VideoFileFrameGenerator">VideoFileFrameGenerator</a>&nbsp;object.<br>
70&nbsp;<br>
71Args:<br>
72&nbsp;&nbsp;video_filename:&nbsp;str,&nbsp;The&nbsp;path&nbsp;to&nbsp;the&nbsp;video&nbsp;file.<br>
73&nbsp;&nbsp;start_frame_index:&nbsp;int,&nbsp;The&nbsp;number&nbsp;of&nbsp;frames&nbsp;to&nbsp;skip&nbsp;at&nbsp;the&nbsp;start&nbsp;of&nbsp;the<br>
74&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file.<br>
75&nbsp;<br>
76Raises:<br>
77&nbsp;&nbsp;FrameReadError:&nbsp;A&nbsp;read&nbsp;error&nbsp;occurred&nbsp;during&nbsp;initialization.</tt></dd></dl>
78
79<hr>
80Data descriptors defined here:<br>
81<dl><dt><strong>CurrentFrameNumber</strong></dt>
82</dl>
83<dl><dt><strong>CurrentTimestamp</strong></dt>
84</dl>
85<dl><dt><strong>Dimensions</strong></dt>
86</dl>
87<hr>
88Data and other attributes defined here:<br>
89<dl><dt><strong>__abstractmethods__</strong> = frozenset([])</dl>
90
91<hr>
92Data descriptors inherited from <a href="telemetry.internal.image_processing.frame_generator.html#FrameGenerator">telemetry.internal.image_processing.frame_generator.FrameGenerator</a>:<br>
93<dl><dt><strong>Generator</strong></dt>
94<dd><tt>Returns:<br>
95A&nbsp;reference&nbsp;to&nbsp;the&nbsp;created&nbsp;generator.</tt></dd>
96</dl>
97<dl><dt><strong>__dict__</strong></dt>
98<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
99</dl>
100<dl><dt><strong>__weakref__</strong></dt>
101<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
102</dl>
103<hr>
104Data and other attributes inherited from <a href="telemetry.internal.image_processing.frame_generator.html#FrameGenerator">telemetry.internal.image_processing.frame_generator.FrameGenerator</a>:<br>
105<dl><dt><strong>__metaclass__</strong> = &lt;class 'abc.ABCMeta'&gt;<dd><tt>Metaclass&nbsp;for&nbsp;defining&nbsp;Abstract&nbsp;Base&nbsp;Classes&nbsp;(ABCs).<br>
106&nbsp;<br>
107Use&nbsp;this&nbsp;metaclass&nbsp;to&nbsp;create&nbsp;an&nbsp;ABC.&nbsp;&nbsp;An&nbsp;ABC&nbsp;can&nbsp;be&nbsp;subclassed<br>
108directly,&nbsp;and&nbsp;then&nbsp;acts&nbsp;as&nbsp;a&nbsp;mix-in&nbsp;class.&nbsp;&nbsp;You&nbsp;can&nbsp;also&nbsp;register<br>
109unrelated&nbsp;concrete&nbsp;classes&nbsp;(even&nbsp;built-in&nbsp;classes)&nbsp;and&nbsp;unrelated<br>
110ABCs&nbsp;as&nbsp;'virtual&nbsp;subclasses'&nbsp;--&nbsp;these&nbsp;and&nbsp;their&nbsp;descendants&nbsp;will<br>
111be&nbsp;considered&nbsp;subclasses&nbsp;of&nbsp;the&nbsp;registering&nbsp;ABC&nbsp;by&nbsp;the&nbsp;built-in<br>
112issubclass()&nbsp;function,&nbsp;but&nbsp;the&nbsp;registering&nbsp;ABC&nbsp;won't&nbsp;show&nbsp;up&nbsp;in<br>
113their&nbsp;MRO&nbsp;(Method&nbsp;Resolution&nbsp;Order)&nbsp;nor&nbsp;will&nbsp;method<br>
114implementations&nbsp;defined&nbsp;by&nbsp;the&nbsp;registering&nbsp;ABC&nbsp;be&nbsp;callable&nbsp;(not<br>
115even&nbsp;via&nbsp;super()).</tt></dl>
116
117</td></tr></table></td></tr></table>
118</body></html>