# BlobToLine

Measures the minimum or maximum distance between a blob boundary and a line.

Example

In this example, the BlobToLine function is measuring the maximum distance between the boundary of the second blob and a line.

## BlobToLine 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.
Line | Specifies the coordinates of the line.
X 0 | The X coordinate of the first endpoint of the line.
Y 0 | The Y coordinate of the first endpoint of the line.
X 1 | The X coordinate of the second endpoint of the line.
Y 1 | The Y coordinate of the second endpoint of the line.
Find By | Specifies how the distance is measured.
0 = Minimum Distance | Finds the distance between the closest point of the boundary of the blob and the line.
1 = Maximum Distance | Finds the distance between the furthest point of the boundary of the blob and the line.
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 line is displayed at all times.
2 = input and result graphics | The blob and the line, and the line segment between them, are displayed at all times.

## BlobToLine Outputs

Returns | A Dist data structure containing the directed distance between the line and the nearest or 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 nearest or furthest point on the blob boundary.
Y0 | GetY(Dist, 0) | The Y coordinate of the nearest or furthest point on the blob boundary.
X1 | GetX(Dist, 1) | The X coordinate of the nearest or furthest point on the line.
Y1 | GetY(Dist, 1) | The Y coordinate of the nearest or furthest point on line.
Angle | GetAngle(Dist) | The angle between the blob boundary point and the line.
Distance | GetDistance(Dist) | The distance between the blob boundary point and the line.