Rank: 1973 based on 60 downloads (last 30 days) and 3 files submitted
photo

ja

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by ja View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Jul 2014 General 2D hough transform Performs hough transform with any inputs Author: ja hough, image analysis, greyscale 6 0
16 Oct 2013 Fast mutual information, joint entropy, and joint histogram calculation for N-D images Built for 'highest possible' speed. Can handle any number of dimensions, given sufficient memory. Author: ja joint histogram, joint entropy, nd, 2d, registration, mutual information 47 2
16 Oct 2013 Max Path for grayscale 2D image max path using dynamic programming Author: ja min path, max path, dynamic programming, 2d 7 0
Comments and Ratings by ja
Updated File Comments Rating
08 May 2014 Fast mutual information, joint entropy, and joint histogram calculation for N-D images Built for 'highest possible' speed. Can handle any number of dimensions, given sufficient memory. Author: ja

That error means that at least one value in at least one of your images is not a non-negative integer value.

I have not added error checking, as the point of this is speed. But if you wanted to ensure that you do not get this error, you can add the following lines to the top of this function:
J = J - min(J(:));
K = K - min(K(:));
J = round(255.4*J/(max(J(:)));
K = round(255.4*J/(max(J(:)));

All this does is recast the image into the 0-255 range. This should avoid the error you were getting, as long as you don't have any NaN or complex pixel values. Again, I didn't want to add this to the code, as I suspect the main use for this will be for iterative programs, and recasting is usually handled well in advance of any attempt to obtain MI or joint entropy..

But, if you add these lines and it continues not to work, please let me know, and if possible include the data you are using.

Comments and Ratings on ja 's Files View all
Updated File Comment by Comments Rating
08 May 2014 Fast mutual information, joint entropy, and joint histogram calculation for N-D images Built for 'highest possible' speed. Can handle any number of dimensions, given sufficient memory. Author: ja ja

That error means that at least one value in at least one of your images is not a non-negative integer value.

I have not added error checking, as the point of this is speed. But if you wanted to ensure that you do not get this error, you can add the following lines to the top of this function:
J = J - min(J(:));
K = K - min(K(:));
J = round(255.4*J/(max(J(:)));
K = round(255.4*J/(max(J(:)));

All this does is recast the image into the 0-255 range. This should avoid the error you were getting, as long as you don't have any NaN or complex pixel values. Again, I didn't want to add this to the code, as I suspect the main use for this will be for iterative programs, and recasting is usually handled well in advance of any attempt to obtain MI or joint entropy..

But, if you add these lines and it continues not to work, please let me know, and if possible include the data you are using.

08 May 2014 Fast mutual information, joint entropy, and joint histogram calculation for N-D images Built for 'highest possible' speed. Can handle any number of dimensions, given sufficient memory. Author: ja Nicolas Yu

have you tested your code?
There is a bug that when calculating h(x,y).

Bug information:
Subscript indices must either be real positive integers or logicals.

Error in ent (line 39)
jhist(yy) = xx;

Error in testENT (line 6)
[jhist, jent, MI] = ent(imgA,imgB);

Contact us