There is an interesting algorithm called contrast enhanced adaptive histogram equalization that does histogram equalization on small segments of an image (and then pastes them back together). I know Mathematica has the HistogramTransform function to do equalization on the whole image. It also has a local method of binarizing, but I don't believe I have seen a local (adaptive) equalization. Has anyone implemented this (or similar) algorithms?
bins = 256; blocksz = 64; levmap = Map[ N@Accumulate@ImageLevels[#, bins][[All, 2]]/(blocksz^2) &, ImagePartition[img, 64], {2}];
. For examplelevmap[[2,3]]
would get a CDF (in list form) of the (2,3) block. Then I presume you interpolate the resulting array and to get CDF's for all pixels. $\endgroup$ – Histograms May 29 '15 at 13:58ImageAssemble@ Map[HistogramTransform, ImagePartition[img, blocksize], {2}]
and then somebody would need to figure out how to interpolate those grey values, I can't work that bit out. $\endgroup$ – Histograms May 29 '15 at 15:30HistogramTransformInterpolation
, sectionApplications > Locally adaptive histogram equalization
. Is this what you're after? $\endgroup$ – shrx May 29 '15 at 21:26