Image.name#

property Image.name: str | None[source]#

Set/get image name

An image has a string-valued name that can be read and written. The name is shown by the Image repr and when images are displayed graphically.

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Read('flowers1.png')
>>> img.name[-70:]
'/3.12.13/x64/lib/python3.12/site-packages/mvtbdata/images/flowers1.png'
>>> img.name = 'my image'
>>> img.name
'my image'

Note

Images loaded from a file have their name initially set to the full file pathname.

Seealso:

Read