Like MSE, SNR and PSNR are the measure to tell the difference between two images similarly if we have two images of the same scene and we want to compare the contrast of the two images, what can be the possible ways?
Well, I think that Haralick & Shapiro published several handbooks about computer vision and image processing. They discuss the algorithms in details. For example, one contrast approach can be: K = sum( [i - Mean]*p[i] ) where p[i] is the probability of occurrence of intensity i.
According to your question maybe this is not what you are looking for. I would try to compare the histograms of the images with Chi-square test (similarity of distributions). To make it more accurate, maybe both intensity histograms and differences (edges) could be utilized. On the other hand, I can recommend to browse the patents because image similarity measurement, also considering scale differences, is typically used to protect copyrighted pictures (find unauthorized copies).
Like MSE, SNR and PSNR we have contrast to noise ratio (CNR) to measure the contrast of the image, whcih can be used to compate images. C=(GA-GB)/σ0
where GA and GB are intensities (gray levels) for contrast producing structures A and B in the region of interest and σo is the standard deviation of the pure image noise.
i wanted to attach an image for ur reference but sorry, I was not able to do, if u let me know how to attach here, i will surely do it.
@Arunmuthu Krishanan . Considering noise as a source fro contrast variation is very great and should be considered in case of scientific image analysis. But I wonder how the contrast variation arising due to noise be differed from other contrast variation especially when it comes to non programming people.
and where you comment or reply, there is an ADD ATTACHMENT text below the text box, on Left at the level of ADD button.
I am very grateful to all contributors, I found these comments very interesting and learned more out of them.
@Yuri Rzhanov
I read the attached paper:
"Photographic Tone Reproduction for Digital Images"
// Erik Reinhard, Mike Stark, Peter Shirley and Jim Ferwerda
// ACM Transactions on Graphics, 21, 3, 267-276, 2002.
In the paper authors explained some terminologies of Zone system and mapping between scene zone and print zone, I got that to measure (contrast of) two images of the same scene we can utilize these terminologies etc. AM I right? Because rest of the paper tries to make enhancement in the image using these terms.
Dear Mohsin Bilal, I am encountering same issue which you have asked in this thread. I wonder if you have got any solution to the stated problem. i.e. how to measure and compare the contrast of two same scene images.
Chen, Jia, Weiyu Yu, Jing Tian, Li Chen, and Zhili Zhou. "Image contrast enhancement using an artificial bee colony algorithm." Swarm and Evolutionary Computation 38 (2018): 287-294.
They have divided the entire image into non-overlapping blocks. The contrast of each block is measured using a low-pass and a band-pass Gaussian filter. Finally the local contrasts are summed to retrieve the overall contrast of the entire image.
I do not know much about images processing. For this question, I only have two personal opinions. My opinions may be wrong. So my opinions are for reference only.
Firstly, for the similarity in traditional tasks including standard clustering task, there are many definitions of distances or similarities, such as cosine similarity. These distances and similarities may hep you to some extent. Secondly, in paper "Improving Unsupervised Defect Segmentation by Applying Structural Similarity To Autoencoders", it mentions a metric called Structural Similarity (SSIM). In that paper, SSIM is used as a loss function to measure the similarity between the original images and reconstructed images. In the definition of SSIM, Equation (6) in that paper is a contrast measure. Maybe SSIM can help you to some extent. Full information of that paper from Google Scholar is listed as follows. (Bergmann P, Löwe S, Fauser M, et al. Improving Unsupervised Defect Segmentation by Applying Structural Similarity to Autoencoders[J]. arXiv preprint arXiv:1807.02011, 2018. )