Both PSNR and SNR are used to measure the quality of the signal. In specific, mostly the PSNR is used to measure the quality of the images while the SNR used for measuring the quality of the signals or power.
Best of my knowledge,
In most cases, the PSNR (quality of the image) depends on only the denominator (Dr) i.e. MSE because of the numerator (Nr) is a fixed (maximum possible value of the signal).
In the case of SNR, both Dr and Nr might vary.
In your problem,
In the case of PSNR: the MSE value in algorithm B is larger than the algorithm A, if you use different datasets for algorithms A and B. or the MSE value is less than 1 in both cases, if you use same dataset in algorithms A and B.
In the case of SNR: the Dr (noise) value greatly increases or slowly decreases than the Nr (original signal) in algorithm A than the algorithm B, if you use different datasets in algorithms A and B. or the Dr (noise) is decreases in algorithm B than the algorithm A, if you use same dataset in algorithms A and B.
Algorithm A has higher PSNR and slightly lower SNR. Therefore, I would assume that Algorithm A could be better than Algorithm B for that particular experiment (not sure if that is a single image compression you are experimenting on or a data set and you reported the average values for those metrics).
If that is just an experiment on a single image then you cannot conclude anything yet as you need more data to generalize your findings.
I have used the same data set for both the Algorithms.
Algorithm A
MSE=57.17
Algorithm B
MSE=82.28.
The confusion here is, SNR is high for algorithm B and low in A, similarly, PSNR is high fro Algo A and low in B. what conclusion or interaction can be drawn for A n B
If you get seemingly contradicting measurments, try to support the conclusion by having an additional or a more robust metric such as SSIM or its weighted version.
The MSE you are showing would follow the PSNR trend as the latter is calculated based on the MSE as pointed out earlier by Dr. K. Seetharaman
Vishwaraj B Manur MSE and PSNR are somewhat inversely proportional. Which means, PSNR will increase with decreasing MSE and vice-versa (In my opinion, SNR should also follow this relationship with MSE). You said you got MSE = 57.17, and MSE = 82.28 from Algorithm A and B, respectively. Therefore, it is expected that the PSNR will be higher for Algorithm A than that of Algorithm B.
Which means Algorithm A has done a better job at compressing the image than Algorithm B.
But it is confusing how Algorithm B achieved a higher SNR than Algorithm A despite of having a lower MSE.
' But it is confusing how Algorithm B achieved a higher SNR than Algorithm A despite of having a lower MSE. " even this made me to ask this question! This is same for different image data sets as well. and Thanks well explained
snr(_) function from the Signal Processing Toolbox is not appropriate for SNR calculation of images. Use the second output argument of psnr(__) to get the SNR values like below.
[psnrVal, snrVal] = psnr(img1, img2)
mseVal = immse(img1, img2)
This was probably the reason why you were getting suspicious results. Now, you should get the PSNR and SNR values which will be inversely proportional to MSE.
The standards measured by the PSNR and SNR values are used in image processing to measure and evaluate the performance of systems that deal with improving image quality as in image distortion and noise removal systems ...