norm_to_uniform#
- norm_to_uniform(im, scale=None)[source]#
Take an image with normally distributed greyscale values and convert it to a uniform (i.e. flat) distribution.
- Parameters:
im (ndarray) – The image containing the normally distributed scalar field
scale ([low, high]) – A list or array indicating the lower and upper bounds for the new randomly distributed data. The default is
None
, which uses themax
andmin
of the original image as the the lower and upper bounds, but another common option might be [0, 1].
- Returns:
image – A copy of
im
with uniformly distributed greyscale values spanning the specified range, if given.- Return type:
ndarray
Examples
Click here to view online example.