# BlobToRadian

Measures the distance between a blob A blob is a group of pixels on the image that form a distinct pattern, typically used to represent objects, features, or areas of interest in object detection and segmentation tasks. boundary and a point at a specified angle.

Example

In this example, the BlobToRadian function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. is measuring the distance between the third blob and a point, at a user-specified angle.

Note: The user-specified angle must be set such that the point intersects the blob, or the function returns #ERR.

Inputs

Parameter | Description
Blobs | This argument must reference a spreadsheet cell that contains a valid Blobs data structure.
Index | This argument references a zero-based index in the Blobs data structure.
Point | Specifies the coordinates of the point, and the angle of the intersection.
X | The X coordinate of the point.
Y | The Y coordinate of the point.
Angle | The angle of the intersection between the point and the blob. Note: If the point and blob boundary are parallel, the function returns #ERR. The point and blob boundary must intersect.
Show | Specifies the display mode for the graphical overlays of the function on top of the image.
0 = hide all (default) | All graphics are hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum or maximum distance between the blob and the radial line is displayed at all times.
2 = input and result graphics | The blob and the radial line, and the line segment between them, are displayed at all times.

Outputs

Returns | A Dist data structure containing the directed distance between the radial line and the furthest point on the blob boundary.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet. The following Dist Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:
Label | Function | Description
X0 | GetX(Dist, 0) | The X coordinate of the furthest point on the blob boundary.
Y0 | GetY(Dist, 0) | The Y coordinate of furthest point on the blob boundary.
X1 | GetX(Dist, 1) | The X coordinate specified in the Point parameter.
Y1 | GetY(Dist, 1) | The Y coordinate specified in the Point parameter.
Angle | GetAngle(Dist) | The angle between the blob boundary point and the radial line point.
Distance | GetDistance(Dist) | The distance between the blob boundary point and the radial line point.