Skip to content

Instantly share code, notes, and snippets.

@joelthelion
Created September 6, 2010 12:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joelthelion/566965 to your computer and use it in GitHub Desktop.
Save joelthelion/566965 to your computer and use it in GitHub Desktop.
#perform histogram equalization with numpy, without explicitly computing the histogram
#im is a numpy array, of any dimension
im2 = numpy.sort(im.ravel()).searchsorted(im)