machinevisiontoolbox.Image.center

property Image.center

Coordinate of center pixel

Returns:

Coordinate (u,v) of the centre pixel

Return type:

tuple

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Zeros((50,50))
>>> img.center
(24.5, 24.5)
>>> img = Image.Zeros((51,51))
>>> img.center
(25.0, 25.0)
Note:
  • If the image has an even dimension the centre will lie between pixels.

  • Same as centre, just US spelling

Seealso:

center_int