There is a problem if you want to keep the same resolution and document size as the original image.
With a 180dpi image and 7 x 7cm size
export_fig image -tif -native
Image exported is 96dpi and 13 x 13cm size (same overall resolution but different dimensions)
If I use -r180
Image exported is 180dpi but 13 x 13cm and double pixel size (again, same overall resulution but image dimensions are wrong).
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.
Comment only