I have done some pre processing for dft , and i am trying to save this image by imwrite.
My cropped image has this information
output.type()
A Python solution for those who come here from Google
import numpy as np import cv2 frame_normed = 255 * (frame - frame.min()) / (frame.max() - frame.min()) frame_normed = np.array(frame_normed, np.int) cv2.imwrite("path/to/out/file", frame_normed)