1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.util.color_histogram</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.util.html"><font color="#ffffff">util</font></a>.color_histogram</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/util/color_histogram.py">telemetry/util/color_histogram.py</a></font></td></tr></table>
13    <p><tt>Color&nbsp;Histograms&nbsp;and&nbsp;implementations&nbsp;of&nbsp;functions&nbsp;operating&nbsp;on&nbsp;them.</tt></p>
14<p>
15<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
16<tr bgcolor="#aa55cc">
17<td colspan=3 valign=bottom>&nbsp;<br>
18<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
19
20<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
21<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="collections.html">collections</a><br>
22</td><td width="25%" valign=top><a href="telemetry.internal.util.external_modules.html">telemetry.internal.util.external_modules</a><br>
23</td><td width="25%" valign=top><a href="numpy.html">numpy</a><br>
24</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
25<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
26<tr bgcolor="#ee77aa">
27<td colspan=3 valign=bottom>&nbsp;<br>
28<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
29
30<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
31<td width="100%"><dl>
32<dt><font face="helvetica, arial">ColorHistogram(<a href="__builtin__.html#tuple">__builtin__.tuple</a>)
33</font></dt><dd>
34<dl>
35<dt><font face="helvetica, arial"><a href="telemetry.util.color_histogram.html#ColorHistogram">ColorHistogram</a>
36</font></dt></dl>
37</dd>
38</dl>
39 <p>
40<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
41<tr bgcolor="#ffc8d8">
42<td colspan=3 valign=bottom>&nbsp;<br>
43<font color="#000000" face="helvetica, arial"><a name="ColorHistogram">class <strong>ColorHistogram</strong></a>(ColorHistogram)</font></td></tr>
44
45<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
46<td width="100%"><dl><dt>Method resolution order:</dt>
47<dd><a href="telemetry.util.color_histogram.html#ColorHistogram">ColorHistogram</a></dd>
48<dd>ColorHistogram</dd>
49<dd><a href="__builtin__.html#tuple">__builtin__.tuple</a></dd>
50<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
51</dl>
52<hr>
53Methods defined here:<br>
54<dl><dt><a name="ColorHistogram-Distance"><strong>Distance</strong></a>(self, other)</dt></dl>
55
56<hr>
57Static methods defined here:<br>
58<dl><dt><a name="ColorHistogram-__new__"><strong>__new__</strong></a>(cls, r, g, b, default_color<font color="#909090">=None</font>)</dt></dl>
59
60<hr>
61Data descriptors defined here:<br>
62<dl><dt><strong>__dict__</strong></dt>
63<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
64</dl>
65<hr>
66Methods inherited from ColorHistogram:<br>
67<dl><dt><a name="ColorHistogram-__getnewargs__"><strong>__getnewargs__</strong></a>(self)</dt><dd><tt>Return&nbsp;self&nbsp;as&nbsp;a&nbsp;plain&nbsp;tuple.&nbsp;&nbsp;Used&nbsp;by&nbsp;copy&nbsp;and&nbsp;pickle.</tt></dd></dl>
68
69<dl><dt><a name="ColorHistogram-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Exclude&nbsp;the&nbsp;OrderedDict&nbsp;from&nbsp;pickling</tt></dd></dl>
70
71<dl><dt><a name="ColorHistogram-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;nicely&nbsp;formatted&nbsp;representation&nbsp;string</tt></dd></dl>
72
73<dl><dt><a name="ColorHistogram-_asdict"><strong>_asdict</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;new&nbsp;OrderedDict&nbsp;which&nbsp;maps&nbsp;field&nbsp;names&nbsp;to&nbsp;their&nbsp;values</tt></dd></dl>
74
75<dl><dt><a name="ColorHistogram-_replace"><strong>_replace</strong></a>(_self, **kwds)</dt><dd><tt>Return&nbsp;a&nbsp;new&nbsp;<a href="#ColorHistogram">ColorHistogram</a>&nbsp;object&nbsp;replacing&nbsp;specified&nbsp;fields&nbsp;with&nbsp;new&nbsp;values</tt></dd></dl>
76
77<hr>
78Class methods inherited from ColorHistogram:<br>
79<dl><dt><a name="ColorHistogram-_make"><strong>_make</strong></a>(cls, iterable, new<font color="#909090">=&lt;built-in method __new__ of type object&gt;</font>, len<font color="#909090">=&lt;built-in function len&gt;</font>)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Make&nbsp;a&nbsp;new&nbsp;<a href="#ColorHistogram">ColorHistogram</a>&nbsp;object&nbsp;from&nbsp;a&nbsp;sequence&nbsp;or&nbsp;iterable</tt></dd></dl>
80
81<hr>
82Data descriptors inherited from ColorHistogram:<br>
83<dl><dt><strong>b</strong></dt>
84<dd><tt>Alias&nbsp;for&nbsp;field&nbsp;number&nbsp;2</tt></dd>
85</dl>
86<dl><dt><strong>default_color</strong></dt>
87<dd><tt>Alias&nbsp;for&nbsp;field&nbsp;number&nbsp;3</tt></dd>
88</dl>
89<dl><dt><strong>g</strong></dt>
90<dd><tt>Alias&nbsp;for&nbsp;field&nbsp;number&nbsp;1</tt></dd>
91</dl>
92<dl><dt><strong>r</strong></dt>
93<dd><tt>Alias&nbsp;for&nbsp;field&nbsp;number&nbsp;0</tt></dd>
94</dl>
95<hr>
96Data and other attributes inherited from ColorHistogram:<br>
97<dl><dt><strong>_fields</strong> = ('r', 'g', 'b', 'default_color')</dl>
98
99<hr>
100Methods inherited from <a href="__builtin__.html#tuple">__builtin__.tuple</a>:<br>
101<dl><dt><a name="ColorHistogram-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__add__">__add__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+y</tt></dd></dl>
102
103<dl><dt><a name="ColorHistogram-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__contains__">__contains__</a>(y)&nbsp;&lt;==&gt;&nbsp;y&nbsp;in&nbsp;x</tt></dd></dl>
104
105<dl><dt><a name="ColorHistogram-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>
106
107<dl><dt><a name="ColorHistogram-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>
108
109<dl><dt><a name="ColorHistogram-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
110
111<dl><dt><a name="ColorHistogram-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
112
113<dl><dt><a name="ColorHistogram-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
114&nbsp;<br>
115Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
116
117<dl><dt><a name="ColorHistogram-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>
118
119<dl><dt><a name="ColorHistogram-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>
120
121<dl><dt><a name="ColorHistogram-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__iter__">__iter__</a>()&nbsp;&lt;==&gt;&nbsp;iter(x)</tt></dd></dl>
122
123<dl><dt><a name="ColorHistogram-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>
124
125<dl><dt><a name="ColorHistogram-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>
126
127<dl><dt><a name="ColorHistogram-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>
128
129<dl><dt><a name="ColorHistogram-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__mul__">__mul__</a>(n)&nbsp;&lt;==&gt;&nbsp;x*n</tt></dd></dl>
130
131<dl><dt><a name="ColorHistogram-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>
132
133<dl><dt><a name="ColorHistogram-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#ColorHistogram-__rmul__">__rmul__</a>(n)&nbsp;&lt;==&gt;&nbsp;n*x</tt></dd></dl>
134
135<dl><dt><a name="ColorHistogram-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>T.<a href="#ColorHistogram-__sizeof__">__sizeof__</a>()&nbsp;--&nbsp;size&nbsp;of&nbsp;T&nbsp;in&nbsp;memory,&nbsp;in&nbsp;bytes</tt></dd></dl>
136
137<dl><dt><a name="ColorHistogram-count"><strong>count</strong></a>(...)</dt><dd><tt>T.<a href="#ColorHistogram-count">count</a>(value)&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;number&nbsp;of&nbsp;occurrences&nbsp;of&nbsp;value</tt></dd></dl>
138
139<dl><dt><a name="ColorHistogram-index"><strong>index</strong></a>(...)</dt><dd><tt>T.<a href="#ColorHistogram-index">index</a>(value,&nbsp;[start,&nbsp;[stop]])&nbsp;-&gt;&nbsp;integer&nbsp;--&nbsp;return&nbsp;first&nbsp;index&nbsp;of&nbsp;value.<br>
140Raises&nbsp;ValueError&nbsp;if&nbsp;the&nbsp;value&nbsp;is&nbsp;not&nbsp;present.</tt></dd></dl>
141
142</td></tr></table></td></tr></table><p>
143<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
144<tr bgcolor="#eeaa77">
145<td colspan=3 valign=bottom>&nbsp;<br>
146<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
147
148<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
149<td width="100%"><dl><dt><a name="-HistogramDistance"><strong>HistogramDistance</strong></a>(hist1, hist2, default_color<font color="#909090">=None</font>)</dt><dd><tt>Earth&nbsp;mover's&nbsp;distance.<br>
150<a href="http://en.wikipedia.org/wiki/Earth_mover's_distance">http://en.wikipedia.org/wiki/Earth_mover's_distance</a></tt></dd></dl>
151</td></tr></table><p>
152<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
153<tr bgcolor="#55aa55">
154<td colspan=3 valign=bottom>&nbsp;<br>
155<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
156
157<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
158<td width="100%"><strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)</td></tr></table>
159</body></html>