Image.__add__#

Image.__add__(other) Image[source][source]#

Overloaded + operator

Returns:

element-wise addition of images

Return type:

Image

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

  • image + image, element-wise

  • scalar + image

  • image + scalar

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image([[1, 2], [3, 4]])
>>> z = img + img
>>> z.array
array([[2, 4],
       [6, 8]], dtype=uint8)
>>> z = 10 + img
>>> z.array
array([[11, 12],
       [13, 14]], dtype=uint8)
..warning:: Values will be wrapped not clipped to the range of the

pixel datatype.