machinevisiontoolbox.Image.__truediv__

Image.__truediv__(other)[source]

Overloaded / operator

Returns:

elementwise division of images

Return type:

Image

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

  • image / image, elementwise

  • scalar / image

  • image / scalar

Example:

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

The resulting values are floating point.