English (English) - Change language

Relative search area

On the Relations tab of an element's Properties dialog box, you can specify a search area relative to other elements.

Show Properties dialog box, Relations tab

The Properties dialog box is displayed when you create a new element.

  • To add a new relation, click the Add button. The Add New Relation... dialog box will open.
  • To edit an earlier created relation, click Edit.
  • Click Duplicate if you want to duplicate a selected relation.
  • To remove a selected relation, use the Remove button.

To open the Properties dialog box for an existing element:

  • Right-click the desired element in the tree of elements and select Properties... on the shortcut menu
    or
  • Double-click the desired element in the tree of elements and select Properties... on the shortcut menu

In the Properties dialog box, click the Relations tab.

Specifying the boundaries of a search area relative to another element

In the dialog of adding or editing relations, specify relation parameters:

  1. In the Type field, select the type of relation: Left of, Right of, Above or Below.
  2. Select a reference element by clicking the button next to the Reference element field and then select the element relative to which you will define the search area boundaries. For instructions on defining a search area relative to subelements of a repeating group, see Using instances of a repeating Group as reference, excluded, or source elements.
  3. In the Reference boundary field, select the boundary of the element's region relative to which you will define the boundary of the search area.
  4. In the Offset field, set the offset value for the boundary of the search area.
  5. Click Add Relation to add a new relation or Save Changes to save the relation after editing. All relations are displayed on the Relations table.

You can also select the type of relation, the element boundary and the offset type (negative, zero or positive) using pictures in the Choose relation parameters by picture dialog box. To open the dialog box, click the Choose... button of the Add New Relation or Edit Relation dialog boxes. On the Left of, Right of, Above and Below tabs you can see the relative position of the element and the search area and how the search area changes depending on the selected boundary and offset types.

Show dialog

Note.The elements used as reference elements and the elements excluded from the search area must be located lower down the tree of elements than the element for which the constraint is being specified.

ABBYY FlexiLayout Studio allows you to have several Properties dialog boxes opened simultaneously. To copy a property that defines the boundary of a search area, select it in the Relations table and drag it into the Properties dialog box of another element. In the same way, you can copy the constraints specified on the Advanced tab.

Visualization of relations

When editing relation properties or selecting a relation in the Relations table, the relation is visualized in the image window. The reference element is enclosed in a thick frame and the search area is highlighted with a green background.

Show dialog

When editing boundary type and offset value, the search area in the image window changes respectively.

In the Reference layout mode you can also drag the offset boundary with the mouse directly in the image window to change the offset value. If the Matched layout is selected, the relation is displayed in read-only mode and offsets cannot be edited in the image window.

When selecting several relations, the intersection of the selected relations is displayed. The intersection area is highlighted with a green background, while the areas out of the intersection borders are highlighted blue.

Show example

Selecting the element closest to a certain object

The Nearest property tells the program that, all other things being equal, it must look for a hypothesis located closest to certain element or point on the image. Specify the closest element, point, or coordinate axis in the Nearest property of the element.

To instruct the program to select the element that is closest to a certain object on the image, select the Nearest option and then select the desired object from the To drop-down list: Element, X coordinate, Y coordinate, Point, Page top edge, Page bottom edge, Page left edge, Page right edge. If you select Element, enter the name of the element in the Reference element field. If you select X coordinate or Y coordinate, specify the corresponding coordinate. If you select Point, specify the coordinates of the point. The Minimum quality parameter specifies the minimum quality of element hypothesis. By default its value is set to equal the null hypothesis.

Note.The element closest to the given element is selected based on the shortest distance between element centers.

See also Using Nearest and FuzzyQuality to search for elements.

More:

Specifying the absolute search area

Additional search constraints

12/1/2020 7:03:59 AM


Please leave your feedback about this article