nekhtiari / image-similarity-measures

:chart_with_upwards_trend: Implementation of eight evaluation metrics to access the similarity between two images. The eight metrics are as follows: RMSE, PSNR, SSIM, ISSM, FSIM, SRE, SAM, and UIQ.
MIT License
589 stars 68 forks source link

What's "the value is set to 12 bits (4095) "mean? #64

Open grapemaidaa opened 8 months ago

grapemaidaa commented 8 months ago

the value is set to 12 bits (4095) I can't understand it. Where should I set this in the code?

kiki81524 commented 6 months ago

In quality_metrics.py, you can set the max_p into 255, and then you will get normal value. for example: def rmse(org_img: np.ndarray, pred_img: np.ndarray, max_p: int = 4095) change into: def rmse(org_img: np.ndarray, pred_img: np.ndarray, max_p: int = 255)

nekhtiari commented 6 months ago

12bits represent physical units such as spectral radiance for instances in case of SPOT satellites. So in your case if you are working with RGB images, you can set it, as mentioned above, to 255.