There is an error in joint_h. If the data class of the image is uint8, then a value higher than 255 for "image_1(i,j) + 1" is not possible. Cast both images to 'int16' before calculating the joint histogram.
I faced this error when using the image_registr_MI code:
??? Undefined function or variable "h".
Error in ==> image_registr_MI at 115
[a, b] = max(h(:));% finding the max of MI and indecises
Error in ==> run at 74
What should i do? Thanks!