Version (2.06 KB) by ja
Built for 'highest possible' speed. Can handle any number of dimensions, given sufficient memory.
Updated 1 Mar 2018

View License

Uses notsum written here: https://www.mathworks.com/matlabcentral/fileexchange/66242-notsum-a-dim-
This uses no for loops for its computations - only index manipulation. For loops are only employed to accommodate for multiple images, but there is only one iteration per image (as opposed to per pixel per image). Built for highest possible speed.

There is no error checking, but if there were it would be to check that all input images are of the same dimensions and all images have real, non-decimal pixel values ranging from 0 - 255.

Cite As

ja (2024). ent(varargin) (https://www.mathworks.com/matlabcentral/fileexchange/41714-ent-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Histograms in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Cleaned some comments.
changed version and cleaned description

Now computes joint metrics for a variable number of input images.
Found that using array multiplication instead of meshgrid indexing increased the MI calculation slightly.
included link to notsum function

fixed a silly mistake that needlessly increased the MI calculation time by about 10%

condensed the comments in the code to only what is necessary to modify the function..

Now also returns mutual information.

updated description
included 'example data' in the comments
added a variable for slightly higher indexing speed

Now returns joint histogram and joint entropy by default (can be changed easily by user).
Changed the 'find' function to logical indexing for increased speed.
Removed the dimensional dependencies, so it now works for any image dimensions.