Code covered by the BSD License  

Highlights from
Fast mutual information, joint entropy, and joint histogram calculation for N-D images

Be the first to rate this file! 46 Downloads (last 30 days) File Size: 1.76 KB File ID: #41714

Fast mutual information, joint entropy, and joint histogram calculation for N-D images

by

 

13 May 2013 (Updated )

Built for 'highest possible' speed. Can handle any number of dimensions, given sufficient memory.

| Watch this File

File Information
Description

This uses no for-loops - only index manipulation. Intended use is for iterative programs where increased speed pays off, but works just fine for individually controlled use as well - though in this case the user may want to adjust the function to include various parameters as input variables (for iterative programs these are usually constant, so they are set to typical values within the function).

No error checking is used, as that could slow things down and is generally unnecessary for an iterative program presumably using fixed image sizes and pixel values.

Returns joint histogram, mutual information, and joint entropy. It is expected that no one will need all three, so instructions on how to remove that which is not needed is included.

Required Products Image Processing Toolbox
MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Updates
09 Sep 2013

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.

11 Sep 2013

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

13 Sep 2013

Now also returns mutual information.

19 Sep 2013

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

25 Sep 2013

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

16 Oct 2013

Found that using array multiplication instead of meshgrid indexing increased the MI calculation slightly.

Contact us