Image.clip#
- Image.clip(min: int | float, max: int | float) Image[source]#
Clip pixel values
- Parameters:
min (int or float) – minimum value
max (int or float) – maximum value
- Returns:
transformed image
- Return type:
Pixels in the returned image will have values in the range [
min,max] inclusive.Example:
>>> from machinevisiontoolbox import Image >>> img = Image([[1, 2], [3, 4]]) >>> img.clip(2, 3).A array([[2, 2], [3, 3]], dtype=uint8)
- Seealso: