EditPolygon

Inserts an interactive polygon control into the spreadsheet. When first inserted into a cell, the function's property sheet will be displayed. Go to the Points tab to enable the Edit Graphics menu option and enter Interactive Graphics Mode. For more information, see Interactive Graphics Mode.

Note: To access the property sheet for the EditPolygon function after it has been configured, right-click the Polygon data structure and select Edit Function. Double-clicking the Polygon data structure switches the display to Interactive Graphics Mode, where the polygon can be graphically modified.

EditPolygon Inputs

Syntax: EditPolygon(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Add Points,Remove Points,Move Points,Move Entire Polygon,Scale,Rotate,Name,Show)

General Tab

Parameter Description

Image

This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. For more information, see Image or Coordinate Transforms Functions.

Fixture

Specifies the image coordinate system in which the input polygon is defined.

Row

The row offset in image coordinates.

Column

The column offset in image coordinates.

Theta

The orientation in image coordinates.

Add Points

If checked, points can be added to the polygon during graphical editing.

Remove Points

If checked, points can be removed from the polygon during graphical editing.

Note: To remove the point, press and hold the Shift key while clicking on the point you want to delete.

Move Points

If checked, points can be moved within the polygon during graphical editing.

Move Entire Polygon

If checked, the entire polygon can be moved during graphical editing.

Scale

If checked, the polygon can be scaled during graphical editing.

Rotate

If checked, the polygon can be rotated during graphical editing.

Name

Specifies a text label for the EditPolygon control element in the spreadsheet.

Show

Specifies the display mode for the EditPolygon graphics overlay on the image.

0 = hide all

The polygon will be hidden, except when the cell containing the EditPolygon function is highlighted in the spreadsheet.

2 = input graphics only

The polygon will be displayed at all times.

Points Tab

The Points tab of the EditPolygon function is comprised of a table that lists the number of points, and their Row/Column location, which can be manually specified using the Row and Column edit controls to the right of the table. Press the Insert button to add points.

By default, the polygon shape is comprised of three points. The Remove button is enabled if there are more than three points, and is used to remove a point from the polygon.

EditPolygon Outputs

Results

A Polygon data structure.