mutual information -histogram tabulation
===

Have a query on mutual information for registration. I have tried to register one image to one reference via translating the image around and mapped the image pixel onto the reference coordinate. From the mapped pixel that falls within the reference boundary, I have computed the mutual information value from the 2D histogram (256 x 256 bins)  I have build from the overlapped region pixel's intensity value.

However, the returned mutual information value always hit zero. I suspect that it is due to that the bin value is too low and the calculated probability value is too low ( bin value / total pixel count ~0). I have used float variables in the MI calculation.

Understand that one work around is to reduce the number of bins and aggregate up the bin value count. Is there any other possible method I could do the overcome this problem? 

Any comments on my approach to MI image registration? Hope I am getting the algorithm right.

Regards