machinevisiontoolbox.Image.abs

Image.abs()[source]

Absolute value of image

Returns:

elementwise absolute value of image

Return type:

Image

Return elementwise absolute value of pixel values.

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image([[-1, 2], [3, -4]], dtype='int8')
>>> z = img.abs()
>>> z.image
array([[1, 2],
       [3, 4]], dtype=int8)