I am doing complement of an image using open-cv python, while writing the image, open-cv is not writing the header information in the complemented image. my image data are in TIFF format.
i am doing like this...
import cv2 img = cv2.imread("image.tiff", -1) for i in xrange(0, len(img)): for j in xrange(0, len(i)): img[i][j] = 65535-img[i][j] cv2.imwrite("complemented.tif", img)