porespy.tools.all_to_uniform#
- porespy.tools.all_to_uniform(im, scale=None)#
Take an image with some distribution of greyscale values and convert it to a uniform (i.e. flat) distribution.
- Parameters:
im (ndarray) – The image with the greyscale values distribution to be converted.
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 themaxandminof the original image as the the lower and upper bounds, but another common option might be [0, 1].
- Returns:
image – A copy of
imwith uniformly distributed greyscale values spanning the specified range, if given.- Return type:
ndarray
Examples
Click here to view online example.