Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

this is stolen from the cv2 deconvolution sample ;)

img = cv2.imread(fn, 0)      # 1 chan, grayscale!
imf = np.float32(img)/255.0  # float conversion/scale
dst = cv2.dct(imf)           # the dct
img = np.uint8(imgf)*255.0   # convert back

this is stolen from the cv2 deconvolution sample ;)

img = cv2.imread(fn, 0)      # 1 chan, grayscale!
imf = np.float32(img)/255.0  # float conversion/scale
dst = cv2.dct(imf)           # the dct
img = np.uint8(imgf)*255.0 np.uint8(dst)*255.0    # convert back