This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Parallelized k-means module. | |
| By David Warde-Farley, February 2012. Licensed under the 3-clause BSD. | |
| """ | |
| cimport cython | |
| from cython.parallel import prange | |
| import numpy as np | |
| cimport numpy as np | |
| from numpy.random import normal |