machinevisiontoolbox.Image.__floordiv__

Image.__floordiv__(other)[source]

Overloaded // operator

Returns:

elementwise floored division of images

Return type:

Image

Compute the integer quotient of an Image with another image or a scalar. Supports:

  • image // image

  • scalar // image

  • image // scalar

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image([[1, 2], [3, 4]])
>>> z = img / 2
>>> z.image
array([[0.5, 1. ],
       [1.5, 2. ]])
>>> z = img // 2
>>> z.image
array([[0, 1],
       [1, 2]], dtype=uint8)