for images, it's too slow, use better steepest descent. this figure isn't 'noisy' at all. try to pluck an image out of the 'dirt' where the SN is about 12dB
how are these any different that inbuit functions? there is already a histogram equalization function as well as adaptive histogram. code needs to be vectorized, get rid of loops and use LU or SVD decomp. doesn't handle uint16.
forgot to rate. wow this code is brutally fast and accurate, if you define a ROI even faster. this code needs some kind of award. how much faster would it be if it was compiled in to a mex?