EditMaskedRegion

Inserts a region control into the spreadsheet. When the control is clicked, the display switches to Interactive Graphics Mode, where the composite region can be modified. A masked region within the ROI is used to indicate an area of the image that should not be processed. For more information, see Interactive Graphics Mode.

Note:
  • To access the property sheet for EditMaskedRegion, right-click the EditMaskedRegion control and select Edit Function.
  • A right-click menu is available in the Interactive Graphics Mode, which allows you to add or delete a region.

EditMaskedRegion Inputs

Syntax: EditMaskedRegion(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Add Mask,Remove Masks,Edit Masks,Move,Size,Rotate,Curve,Name,Show)

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 composite region is defined.

Row

The row offset in image coordinates.

Column

The column offset in image coordinates.

Theta

The orientation in image coordinates.

Add Masks

If checked, additional masks can be added in the Interactive Graphics Mode.

Remove Masks

If checked, masks can be removed in the Interactive Graphics Mode.

Edit Masks

If checked, masks can be modified in the Interactive Graphics Mode.

Move

If checked, the entire composite region can be moved in the Interactive Graphics Mode.

Size If checked, the region can be re-sized in the Interactive Graphics Mode.
Rotate If checked, the region can be rotated in the Interactive Graphics Mode.
Bend If checked, the region can be bent in the Interactive Graphics Mode.

Name

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

Show

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

0 = hide all

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

2 = input graphics only

The region will be displayed at all times.

EditMaskedRegion Outputs

Results

An EditRegion control.

EditMaskedRegion Interactive Graphics Mode

 
Item Controls Description
1 Resizable Endpoint Boundary (x4) Defines the four corners of the rectangular region. Click on an end-point boundary to resize the ROI from one of its corners.
2 Mask

Defines the area of the image that will not undergo image analysis. The mask can be moved and resized within the ROI. A total of 99 masks may be added to a ROI. When a mask is added, it will be added to beginning of the ROI (if no other masks have been added), or behind the previously added mask.

Note: Masks may not overlap. If they are configured to overlap, a 1 pixel buffer will automatically be inserted to prevent them from overlapping.
3 Scan Direction Indicator (x2) Defines which direction the ROI will scan for features.
4 Edge Detection Indicator Defines the area within the ROI where edge transitions will be detected; also enables adding new masks to the ROI.
5 Rotation Handle Allows the ROI to be rotated 360°.
6 Bend Handle Allows the ROI to be bent into an arc or annular shape.

EditMaskedRegion Mouse Actions

By placing the mouse cursor over various parts of the ROI, the mouse cursor will automatically transform, enabling the following actions:

Mouse Icon Description
Allows you to drag the ROI anywhere within the image.
Allows you to resize the ROI horizontally or vertically; also used to resize the mask.
Allows two separate actions, depending on where the mouse cursor is placed. When the mouse cursor is placed on the Rotation Handle, you can rotate the ROI 360° from its current orientation. When the mouse cursor is placed on the Bend Handle, you can reshape the ROI into an arc or annular shape.
Allows you to drag the mask within the ROI.
Allows you to add or delete a mask from the ROI. When this icon appears, right-click the mouse to open a menu with two options: Add Mask or Delete Mask.