Sample 3. Step 11: Detecting the right border of the Delivery Address field with a wgAddressRight element
To specify the right boundary of the search area of the DeliveryAddress element, we need to describe the corresponding vertical white gap.
To create the wgAddressRight element:
- In the InvoiceHeader.grAddress element, create an element of type White Gap nd name it wgAddressRight.
- Click the White Gap tab.
- In the Orientation group, choose Vertical. Set Min width to 100.
Note.Prior to setting values for height or width of white gaps, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Values for the noise threshold in the white gap area are selected by trial and error. - Set Lower threshold limit: and Threshold coefficient (%): to 10.
Note.The values of Lower threshold limit, Upper threshold limit, and Threshold coefficient (%) are selected by method of trial and error.
For more information, see White Gap. - Leave the default values for the other parameters of the element.
Show me...
- Click the Relations tab.
- Since the sought white gap can only be located to the right of the keywords of the name kwDeliveryAddress, set the following search constraint:
- Right of the element kwDeliveryAddress, Offset = 0
- Click the Advanced tab.
- Since the Delivery Address field is optional on the images but whenever it occurs it has a name, set the following additional search constraint in the Advanced pre-search relations field: Look for the object only if the kwDeliveryAddress element has been detected.In the FlexiLayout language:
If InvoiceHeader.kwDeliveryAddress.IsNull Then DontFind; - Since the sought white gap is adjacent to the Invoice Number field, set the following additional search constraint in the Advanced pre-search relations field: Look for the object on the image which is nearest to the kwInvoiceNumber element.In the FlexiLayout language:
Nearest: InvoiceHeader.kwInvoiceNumber;
Note.The Nearest constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Element and specify kwInvoiceNumber as the Reference element. - Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where the Delivery Address field occurs.
12.04.2024 18:16:02