English (English) - Change language

Group elements

Group is a collection of several elements (termed subelements). Subelements, in turn, can be Group elements.

Group elements are marked with in the FlexiLayout tree.

Note.Group elements also include: Header, Footer, First Found and Repeating Group. Use Header and Footer elements to detect the beginning and the end of a document. Header and Footer elements may each occur in a document only once. Repeating Group is a recurring Group element. A Labeled Field element may also be represented as a compound element.

If required, you can specify the minimum number of subelements to be detected. If applying the FlexiLayout detects fewer elements, the compound element will be deemed not detected.

A Group element, just like a simple element, can be required, optional, or prohibited. If an optional Group element includes a required element, the failure to match this element with an object will result in a null hypothesis for the Group element and the program will continue trying to match the FlexiLayout.

Be sure not to keep empty compound elements (i.e. compound elements without any subelements). If the program encounters an empty compound element when compiling a FlexiLayout, it will display a warning message. If you FlexiLayout makes no use of the compound Header and Footer elements, which are added by default, delete these redundant elements.

Group elements are useful in the following cases:

  • to make testing independent parts of a FlexiLayout easier. For example, a FlexiLayout made up of 100 elements may include only 3 Group elements - the title, the body, and the bottom of the document. Each of the three Group elements will contain Group elements describing smaller portions of the document. This approach both limits the number of possible variants to consider and makes debugging the FlexiLayout easier, as each group can be edited and tested independently.
  • to make navigation in the FlexiLayout tree easier.
  • to reduce the number of possible element hypotheses, thereby speeding up the formulation of the final hypothesis. Grouping elements together allows the program to consider a set of elements as one whole, for which a single hypothesis has been formulated (albeit consisting of the hypotheses for subelements) and for which the quality can be calculated. Considering various combinations of subelement hypothesis goes inside the group and only a set number of the best group hypotheses are used in the search down the tree. The default number of best hypotheses for a Group element is 1.
    Note.We do not recommend increasing the maximum number of hypotheses, as this may lead to an uncontrollable growth of the tree and failure to match the FlexiLayout with the images.
  • A Group element allows you to specify a search constraint common to all of the subelements. The search area for a particular element will be calculated as an intersection of the search area specified in the subelement and the search area of the entire group.
    Note.Sometimes, the intersection of the search area of a Group element and one of its subelements may be empty, and the program will fail to find the subelement. Try to specify only simpler relations for Group elements, e.g. "Above: PageRect.Top + PageRect.Height/2;" (i.e. "look for the element in the upper half of the image"), or not specify any relations at all.

See also:

Creating and deleting elements

An overview of element properties

Search area

Additional search constraints

25.09.2020 9:24:45


Please leave your feedback about this article