# BlobToBlob

Measures the minimum or maximum distance between the boundaries of two blobs.

Example

In this example, the BlobToBlob 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 minimum distance between the boundaries of two blobs.

Inputs

Parameter | Description
Blobs 0 | This argument must reference a spreadsheet cell that contains a valid Blobs data structure.
Index 0 | This argument references a zero-based index in the Blobs data structure.
Blobs 1 | This argument must reference a spreadsheet cell that contains a valid Blobs data structure.
Index 1 | This argument references a zero-based index in the Blobs data structure.
Find By | Specifies how the distance is measured.
0 = Minimum Distance | Finds the distance between the closest points of the boundaries of two blobs. Example
1 = Maximum Distance | Finds the distance between the furthest points of the boundaries of two blobs. Example
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 two blobs are displayed at all times.
2 = input and result graphics | The two blobs, and the line segment between them, are displayed at all times.

Outputs

Returns | A Dist data structure containing the directed 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. and the nearest or furthest point on another blob boundary.
Results | When the function is initially inserted into a cell, the following Dist Vision Data Access functions are automatically inserted into the spreadsheet to create a result table:
Label | Function | Description
X0 | GetX(Dist, 0) | The X coordinate of the nearest or furthest point on the boundary of the first blob, depending on the setting of the Find By parameter.
Y0 | GetY(Dist, 0) | The Y coordinate of the nearest or furthest point on the boundary of the first blob, depending on the setting of the Find By parameter.
X1 | GetX(Dist, 1) | The X coordinate of the nearest or furthest point on the boundary of the second blob, depending on the setting of the Find By parameter.
Y1 | GetY(Dist, 1) | The Y coordinate of the nearest or furthest point on the boundary of the second blob, depending on the setting of the Find By parameter.
Angle | GetAngle(Dist) | The angle between the boundary points of the first blob and second blob.
Distance | GetDistance(Dist) | The distance between the boundary points of the first blob and second blob.