I have two grayscale images, say A and B, and I want to determine, which one is more contrast. For that I'm calculating an RMS contrast as it is described in Wikipedia. The results are about RMS_A = 0.4
and RMS_B = 0.1
. Does it mean that image A is more contrast as its gray pixels are nearer to black/white values? How should I interpreter RMS value to determine contrast?
-
$\begingroup$ Are the images of the same scene or can be totally different? $\endgroup$– RoyiCommented Aug 4, 2020 at 5:12
-
$\begingroup$ Are you after local or global contrast? $\endgroup$– RoyiCommented Dec 2, 2020 at 5:16
1 Answer
You defined to compute an RMS. I don't know why you choose it, but OK. How can we probe it as a contrast measure? If you are considering images with positive pixel values, and consider that multiplying them by a scale factor $a>1$, you extend the range, hence the contrast, or if $a>1$, you shrink the range, hence the contrast again. How does the RMS behave? A quick computation should give you an answer.
Indeed, those are hypotheses. Honestly, I would not consider RMS as a proper measure, as it does change with a value offset, which to be is substantially iso-constrast.
-
$\begingroup$ Source images are grayscale, values are in [0,255], and before calculating RMS I do normalize them in [0, 1] as needed. I guess the maximum contrast is 0.5 when image has only black and white pixels, so multiplying won't affect it. If picture has gray pixels, say of value 128, multiplying will bring them to be just white, making image more contrast. Or am I mistaken? $\endgroup$– ansCommented Mar 7, 2020 at 9:55
-
$\begingroup$ It depends on what you mean by contrast. To me, contrast is a quantity aimed at summarizing the span between brighter and darker zones. So a full-gray or a full-white (or full-black) image have the same (non-existent) constrast. But how you preporcess them can affect the result $\endgroup$ Commented Mar 8, 2020 at 16:19