Image.__le__#

Image.__le__(other: Image | ndarray | int | float | bool) → Image[source][source]#

Overloaded <= operator

Returns:

element-wise comparison of images

Return type:

bool Image

Compute the inequality between an Image and another image or a scalar. Supports:

  • image <= image

  • scalar <= image

  • image <= scalar

Examples

>>> from machinevisiontoolbox import Image
>>> img = Image([[1, 2], [3, 4]])
>>> (img <= 2).print()
   1 1
   0 0
>>> (img <= Image([[0, 2], [3, 4]])).print()
   0 1
   1 1

See also

true false