English (English) - Change language

Sample 1. Step 20: Describing the YOUR PHOTO IN FANCY DRESS field

As has been noted in Step 6, not all the parts of the photo on images 1 and 6 were recognized as image objects of type Picture.

to get a full photo, the program needs to find all the types of Image Object located in the photo area.

For the sake of convenience, group all the photo elements in one compound Photo element. This will also limit the number of formulated hypotheses.

Show me…

The Group element " Photo " will include:

  • a PhotoPicture  element of type Object Collection corresponding to the photo;
  • a PhotoHeader element of type Static Text corresponding to the name YOUR PHOTO IN FANCY DRESS;
  • four separators around the photo which are required for finding the PhotoPicture element.

As the text of the name (namely, YOUR PHOTO IN FANCY DRESS) occurs nowhere else in this document, we added the corresponding element first and will search for the separators relative to this element.

Since the name YOUR PHOTO IN FANCY DRESS is unique on the document, add it to the Group element and use it to look for the separators.

To create an element corresponding to the field name:

  1. Create an element of type Static Text and name it PhotoHeader.
  2. The properties of the element are set similarly to the other field names as described above.

Try matching the FlexiLayout with the images. You will see that the program reliably detects the name on all the images.

Create Separator elements for the four separators around the photo and give them the following names:

  • USeparator - upper separator
  • BSeparator - lower separator
  • LSeparator - left separator
  • RSeparator - right separator

On the Separator tab in the Properties dialog box, specify the orientation of each of the 4 separators (Vertical or Horizontal). Do not change the other properties.

Show me...

Now use the test images to specify the search area for each of the separators.

Upper separator (USeparator element):

  • below the photo caption but not farther than 100 dots from its top boundary (Below the PhotoHeader element and Above the PhotoHeader, Offset = -100).
  • within the area which is not longer than the length of the caption by more than 80 dots on each side (Left of the right boundary of the PhotoHeader element, Offset = -80, Reference boundary = right and Right of the left boundary of the PhotoHeader element, Offset = -80, Reference boundary = left).

Lower separator (BSeparator element):

  • below the name of the NAME field (Below the NameHeader element),
  • above bottom of IdentityNumber (Above the IdentityNumber element, ElementBoundary = bottom).
  • within the area which is not longer than the length of the name by more than 80 dots on each side (Left of the right boundary of the PhotoHeader element, Offset = -80, Reference boundary = right and Right of the left boundary of the PhotoHeader element, Offset = -80, Reference boundary = left).

Left separator (LSeparator element):

  • within the area which is not wider than the distance between the upper and lower separators by more than 50 dots on each side (Below the USeparator element, Offset = -50, and Above the BSeparator element, Offset = -50).
  • the separator is located not far from the left boundary of the upper separator, the distance cannot exceed 40 dots (Right of the left boundary of the USeparator element, Offset = -20, Reference boundary = left, and Left of the left boundary of the USeparator element, Offset = -20, Reference boundary = left).

Right separator (RSeparator element):

  • within the area which is not wider than the distance between the upper and lower separators by more than 50 dots on each side (Below the USeparator element, Offset = -50, and Above the BSeparator element, Offset = -50).
  • the separator is located not far from the right boundary of the upper separator, the distance cannot exceed 40 dots (Right of the right boundary of the USeparator element, Offset = -20, Reference boundary = right, and Left of the right boundary of the USeparator element, Offset = -20, Reference boundary = right).

Now if you try matching the FlexiLayout with the images you will see that the program can detect these areas. In the Tree of Hypotheses, right-click a hypothesis and select Show Search Area in the shortcut menu. If the search criteria are wrong and the program failed to locate the search area properly, you will immediately notice this. You may also see that even the search area of a correct hypothesis needs some adjustment, e.g. it may be too small.

The maximum size of all the separators was detected by trial and error while studying the properties of Separator objects during pre-recognition.

To describe the YOUR PHOTO IN FANCY DRESS field:

  1. Create an element of type Object Collection and name it PhotoPicture.
  2. On the Relations tab, specify the search area for the PhotoPicture element:
    • below the upper separator (Below the USeparator element)
    • above the lower separator (Above the BSeparator element)
    • to the right of the left separator (Right of the LSeparator element)
    • to the left of the right separator (Left of the RSeparator element)

Then create the PhotoPicture block and specify the Photo Picture element as the source element.

9/25/2020 9:24:45 AM


Please leave your feedback about this article