Commit 774baa70cd4a110f09e5a7500ef54a7d2c1497c8

Authored by Chunk
1 parent 5426d9db
Exists in refactor

staged.

mjpeg/__init__.py
... ... @@ -12,7 +12,6 @@ __all__ = ['Jpeg', 'colorMap', 'diffblock', 'diffblocks']
12 12 import numpy.random as rnd
13 13 from numpy import shape
14 14 import numpy as np
15   -import pylab as plt
16 15  
17 16 import base
18 17 from dct import bdct, ibdct
... ... @@ -177,17 +176,6 @@ class Jpeg(Jsteg):
177 176 E = [-np.inf] + [i for i in range(-T, T + 2)] + [np.inf]
178 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 180 def nzcount(self, *a, **kw):
193 181 """Number of non-zero AC coefficients.
... ...
mjpeg/compress.py
1 1 ## -*- coding: utf-8 -*-
2 2  
3 3  
4   -from pylab import *
  4 +from numpy import array
5 5  
6 6 # The standard quantisation tables for JPEG::
7 7  
... ...
test/test_steg.py
1 1 __author__ = 'chunk'
2 2  
3 3 import numpy as np
4   -import pylab as P
5   -import pylab as plt
6 4  
7 5 from .. import mjpeg
8 6 from ..msteg.steganography import LSB, F3, F4, F5
... ...