Image mutual information

Version 1.0.0 (2,6 ko) par Jess Sia
Fast mutual information calculation for images with consistent results to MATLAB built-in entropy() function.
53 téléchargements
Mise à jour 8 juin 2023
MATLAB mutualInfo function
Fast MATLAB function to calculate the mutual information of two images. Designed specifically for speed and to emulate functionality of MATLAB native entropy function. For details on usage, see function docstring or execute help mutualInfo. Based on the mi function created by J. Delpiano.
Requirements and compatibility:
  • Developed and tested in MATLAB 2023a.
  • At least 2021a is required for the name=value syntax function arguments. Replace these with comma-separated syntax (lines 39-43) if you are using a version older than 2021a.
  • At least 2015b is required for the histcounts and histcounts2 functions.
  • Requires the im2uint8 function from the Image Processing Toolbox (lines 30-31.) If this toolbox is not available to you, replace those lines with code that will scale the gray-levels of your image to values in the range of 0 to 255, then cast the images to uint8.
Theory
The mutual information I of two images A and B is given by [1]:
Where is the joint probability density function of the gray-levels of the images, and and are the probability density functions of the gray-levels of images A and B, respectively. It is assumed that .
The information entropy H of an image A is given by [2]:
Where p is the probability density function of the gray-levels of A. The joint entropy of two images A and B is then given by [2]:
And the conditional entropy accordingly by [2]:
The mutual information of the images can then be expressed in terms of entropy by [2]:
The mutual information of an image with itself is then [2]:
Therefore, the mutual information of an image with itself is equal to its entropy. For a given image A in MATLAB, mutualInfo(A, A) will yield a numerical result that is close to but not exactly identical to the result of entropy(A) due to floating point error.
References
[1] F. Maes, D. Loeckx, D. Vandermeulen, and P. Suetens, “Image registration using mutual information,” in Handbook of Biomedical Imaging: Methodologies and Clinical Research, N. Paragios, J. Duncan, and N. Ayache, Eds., Boston, MA: Springer US, 2015, pp. 295–308. doi:10.1007/978-0-387-09749-7_16.
[2] T. M. Cover and J. A. Thomas, “Entropy, Relative Entropy, and Mutual Information,” in Elements of Information Theory, 2nd ed.Hoboken, NJ: Wiley-Interscience, 2006, pp. 13–55.

Citation pour cette source

Jess Sia (2024). Image mutual information (https://github.com/jessthespacer/mutual-info-matlab/releases/tag/v1.0.0), GitHub. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2023a
Compatible avec les versions R2021a et ultérieures
Plateformes compatibles
Windows macOS Linux
Remerciements

Inspiré par : Fast mutual information of two images or signals

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0

Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.
Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.