79572459

Date: 2025-04-14 06:22:05
Score: 1
Natty:
Report link

In addition to @fepegar answer - you probably don't want to save the images as .jpg format, since .jpg is a lossy-compression type, which means it losses important information. You should save the images to a lossless compression file types, such as .pgm for a single channel image, .png for 3 channels image, or .tiff (using python's package tifffile) for any other number of channels - which is probably what you'd want in this case.

pip install tifffile

import tifffile as tiff
tiff.imwrite(file_path, image, dtype=np.float32)  # Save the image as a TIFF file as FP32
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @fepegar
  • Low reputation (1):
Posted by: Call Saul