machinevisiontoolbox.Image.true

property Image.true

True value for logical image

Returns:

Value used as true

Return type:

int or float

The true value is 1.0 for a floating point image and maximum integer value for an integer value.

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Zeros(20, dtype='float32')
>>> img.true
1.0
>>> img = Image.Zeros(20, dtype='uint8')
>>> img.true
255
Seealso:

false maxval