MATLAB: Normalize image from -0.5 – 1.3 to 0 – 1

image processingImage Processing ToolboxMATLAB

Hello,
I am processing an image through some filters and get the image with min value =-0.5014 and max=1.38. I would like to normalize it between 0-1 for comparative analysis using SSIM PSNR. The mat2gray function distorts the image. Please suggest how to work around this problem.
Thanks

Best Answer

Try this
im_nrom = (im - min_val)./(max_val - min_val)
Related Question