# SegmentFromLines

Computes a new line segment by averaging two input lines. The function averages the first endpoint of the first line with the first endpoint of the second line. Similarly, it averages the second endpoint of the first line with the second endpoint of the second line; the result is a mean line segment.

## SegmentFromLines Inputs

Parameter | Description
Line 0 | Specifies the coordinates of the first line.
X 0 | The x-coordinate of the first endpoint of the first line.
Y 0 | The y-coordinate of the first endpoint of the first line.
X 1 | The x-coordinate of the second endpoint of the first line.
Y 1 | The y-coordinate of the second endpoint of the first line.
Line 1 | Specifies the coordinates of the second line.
X 0 | The x-coordinate of the first endpoint of the second line.
Y 0 | The y-coordinate of the first endpoint of the second line.
X 1 | The x-coordinate of the second endpoint of the second line.
Y 1 | The y-coordinate of the second endpoint of the second line.
Show | Specifies which graphical overlays are displayed on top of the image.
0 = hide all | The available graphics items will be hidden except when the cell containing the function is the active cell in the spreadsheet.
1 = result graphics only | The graphics items associated with the returned data structure will be displayed at all times. Other graphics items will only be displayed when the function is the active cell in the spreadsheet.
2 = input and result graphics | The graphics items associated with the returned data structure and input image region will be will be displayed at all times.

## SegmentFromLines Outputs

Returns | A Line data structure containing the mean line segment.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

## SegmentFromLines Vision Data Access Functions

The following Structures Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:

X0 | GetX(Line, 0) | The x-coordinate of the first endpoint.
Y0 | GetY(Line, 0) | The y-coordinate of the first endpoint.
X1 | GetX(Line, 1) | The x-coordinate of the second endpoint.
Y1 | GetY(Line, 1) | The y-coordinate of the second endpoint.