# PairsToEdges

Converts arrays of edge pairs into arrays of edges. The function averages the row and column coordinates of evenly-indexed edges with the corresponding row and column coordinates of oddly-indexed edges to convert pairs of edges into single edges.

## PairsToEdges Inputs

Parameter | Description
Edges | A reference to a spreadsheet cell containing anEdge data structure, which must consist of multiple straight-line edges. The function expects the input Edge data structure to be sorted by pairs, such that evenly-indexed edges contain the first edge of an edge pair, and oddly-indexed edges contain the second edge of an edge pair.
Number of Pairs | Specifies the number of edge pairs to convert into edges. (0 to 80; default = 1)
Show | Specifies the display mode for PairsToEdges graphical overlays on top of the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the PairsToEdges function is the active cell in the spreadsheet.
1 = result graphics only | The edge pairs will be displayed at all times.

## PairsToEdges Outputs

Returns | An Edge data structure containing edges derived from edge pairs, or #ERR if any of the input parameters are invalid.
Results | When PairsToEdges is initially inserted into a cell, a result table is created in the spreadsheet. The following Edges Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:
Label | Function | Description
X0 | GetX(Edges, Edge Index, 0) | The x-coordinate of the first endpoint.
Y0 | GetY(Edges, Edge Index, 0) | The y-coordinate of the first endpoint.
X1 | GetX(Edges, Edge Index, 1) | The x-coordinate of the second endpoint.
Y1 | GetY(Edges, Edge Index, 1) | The y-coordinate of the second endpoint.
Score | GetScore(Edges, Edge Index) | The edge contrast score.