I have stumbled upon some good explanations on how to get the entropy of an RGB image using matlab. Matlab provides a built in function that allows as to get the entropy of a grayscale image using -sum(p.*log2(p)). One answer provides a way on how to get the entropy of an rgb image given in this link ---> https://stackoverflow.com/a/28239789/3995148
How Matlab explains the function :
E = entropy(I) returns E, a scalar value representing the entropy of grayscale image I. Entropy is a statistical measure of randomness that can be used to characterize the texture of the input image.
Entropy is defined as -sum(p.*log2(p))
where p contains the histogram counts returned from imhist. By default, entropy uses two bins for logical arrays and 256 bins for uint8, uint16, or double arrays.
I can be a multidimensional image. If I has more than two dimensions, the entropy function treats it as a multidimensional grayscale image and not as an RGB image.
Questions :
Does entropy consider or detects image irregularities? For example, if variable A contains the entropy of IMAGE AA, and variable B contains the entropy of the Alter(IMAGE AA). Where Alter is a function that swaps random pixels inside the image. Does Variable A and Variable B contains the entropy value? Given that both images contains the same pixels but differs only on their position in the image. I need to clarify because I am new to this topic,
Does entropy need to consider image irregularities, why? What entropy implementation do I need to cover image irregularities? Is it available as built in function in python or other image processing programs?