1 2
__author__ = 'chunk'
3
# import mjsteg
4
import numpy as np
5
6
# a = mjsteg.Jsteg("res/test2.jpg")
7
# compY,compCr,compCb = a.coef_arrays
8
#
9 10 11 12 13 14 15 16
# res = np.array([np.split(arr,arr.shape[1]/8, axis=1) for arr in np.split(compY,compY.shape[0]/8)]) # # print res.shape # # print res[0,0:20] import jpegObj
17
b = jpegObj.Jpeg("res/test2.jpg")
18
c = b.getCoefBlocks(channel='Y')
19 20 21
print c print c.shape