machinevisiontoolbox.Image.min
- Image.min(*args, **kwargs)[source]
Minimum value of all pixels
- Parameters:
args – additional positional arguments to
numpy.min
kwargs – additional keyword arguments to
numpy.min
- Returns:
minimum value
Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Read('flowers1.png') >>> img.min() 0 >>> img = Image.Read('flowers1.png', dtype='float32') >>> img.min(axis=2) array([[0.0667, 0.0627, 0.1529, ..., 0.698 , 0.6353, 0.8667], [0.0627, 0.0667, 0.149 , ..., 0.7529, 0.8 , 0.9961], [0.0667, 0.0627, 0.1412, ..., 0.5804, 0.9294, 0.9843], ..., [0.2039, 0.1608, 0.1529, ..., 0.2627, 0.2549, 0.2627], [0.2078, 0.1725, 0.1412, ..., 0.2549, 0.2471, 0.2549], [0.2039, 0.1765, 0.1686, ..., 0.2275, 0.2314, 0.251 ]], dtype=float32)
- Note:
The return value type is the same as the image type.
By default the result is a scalar computed over all pixels, if the
axis
option is given the results is a 1D or 2D NumPy array.
- Seealso:
numpy.min