Blobs.blob_frame#

Blobs.blob_frame() SE2[source]#

Transformation from blob coordinate frame to image frame

Returns:

Homogeneous transformation

Return type:

SE2

Returns the SE(2) transformation that maps point coordinates in the blob coordinate frame (origin at the centroid, x- and y-axes aligned with the major and minor ellipse axes) to their coordinate in the image coordinate frame.

Example:

>>> from machinevisiontoolbox import Image
>>> im = Image.Read('sharks.png')
>>> blobs = im.blobs()
>>> blobs.blob_frame()
SE2([
array([[  0.9998,   0.0175, 245.5517],
       [ -0.0175,   0.9998, 425.9469],
       [  0.    ,   0.    ,   1.    ]]),
array([[  0.8583,   0.5131, 502.2674],
       [ -0.5131,   0.8583, 183.9448],
       [  0.    ,   0.    ,   1.    ]]),
array([[  0.8751,  -0.484 ,  82.9368],
       [  0.484 ,   0.8751, 159.5699],
       [  0.    ,   0.    ,   1.    ]]),
array([[ -0.097 ,   0.9953, 297.0064],
       [ -0.9953,  -0.097 , 179.9724],
       [  0.    ,   0.    ,   1.    ]]) ])
Seealso:

centroid orientation