Commit 774baa70cd4a110f09e5a7500ef54a7d2c1497c8
1 parent
5426d9db
Exists in
refactor
staged.
Showing
3 changed files
with
1 additions
and
15 deletions
Show diff stats
mjpeg/__init__.py
@@ -12,7 +12,6 @@ __all__ = ['Jpeg', 'colorMap', 'diffblock', 'diffblocks'] | @@ -12,7 +12,6 @@ __all__ = ['Jpeg', 'colorMap', 'diffblock', 'diffblocks'] | ||
12 | import numpy.random as rnd | 12 | import numpy.random as rnd |
13 | from numpy import shape | 13 | from numpy import shape |
14 | import numpy as np | 14 | import numpy as np |
15 | -import pylab as plt | ||
16 | 15 | ||
17 | import base | 16 | import base |
18 | from dct import bdct, ibdct | 17 | from dct import bdct, ibdct |
@@ -177,17 +176,6 @@ class Jpeg(Jsteg): | @@ -177,17 +176,6 @@ class Jpeg(Jsteg): | ||
177 | E = [-np.inf] + [i for i in range(-T, T + 2)] + [np.inf] | 176 | E = [-np.inf] + [i for i in range(-T, T + 2)] + [np.inf] |
178 | return np.histogram(A, E) | 177 | return np.histogram(A, E) |
179 | 178 | ||
180 | - def plotHist(self, mask=base.acMaskBlock, T=8): | ||
181 | - """ | ||
182 | - Make a histogram of the jpeg coefficients. | ||
183 | - The mask is a boolean 8x8 matrix indicating the | ||
184 | - frequencies to be included. This defaults to the | ||
185 | - AC coefficients. | ||
186 | - """ | ||
187 | - A = self.rawsignal(mask).tolist() | ||
188 | - E = [i for i in range(-T, T + 2)] | ||
189 | - plt.hist(A, E, histtype='bar') | ||
190 | - plt.show() | ||
191 | 179 | ||
192 | def nzcount(self, *a, **kw): | 180 | def nzcount(self, *a, **kw): |
193 | """Number of non-zero AC coefficients. | 181 | """Number of non-zero AC coefficients. |
mjpeg/compress.py
test/test_steg.py