Blobs.polar#

Blobs.polar(**kwargs: Any) Any#

Boundary in polar coordinate form

Parameters:

N (int, optional) – number of points around perimeter, defaults to 400

Returns:

Contour, one point per column

Return type:

ndarray(2,N)

Returns a polar representation of the boundary with respect to the centroid. Each boundary point is represented by a column \((r, \theta)\). The polar profile can be used for scale and orientation invariant matching of shapes.

Example:

>>> from machinevisiontoolbox import Image
>>> im = Image.Read('shark2.png')
>>> blobs = im.blobs()
>>> p = blobs[0].polar()
>>> p[0].shape
(400,)

Note

The points are evenly spaced around the perimeter but are not evenly spaced in subtended angle.

Seealso:

polarmatch perimeter