Skip to main content
White Gap is an element of a FlexiLayout that describes a rectangular area on the image that contains almost no objects of the specified type. To look for White Gaps, the program creates histograms for objects. When creating histograms for the objects in the search area, the program calculates the sum of the projections of all the objects on the horizontal axis (to look for a vertical gap) or on the vertical axis (to look for a horizontal gap). If the sum of the projections is smaller than the specified threshold, the program considers the area to be a White Gap.
Diagram showing the first stage of building a histogram for a vertical White Gap in ABBYY FlexiLayout Studio.Diagram showing the resulting histogram for a vertical White Gap in ABBYY FlexiLayout Studio.

Building a histogram for a vertical gap

For more information about histograms, see Hypotheses for White Gap elements. The search area can contain stray objects. The maximum allowed number of such objects is specified in the properties of the element. White Gap elements are marked with White Gap element icon in the FlexiLayout tree.

White Gap element properties

To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties… on the shortcut menu. To describe the corresponding object, click the White Gap tab.
Screenshot of the White Gap tab of a White Gap element's Properties dialog box in ABBYY FlexiLayout Studio.
The Orientation property has two values:

Histogram properties for objects in the search area

The values of Lower threshold limit, Upper threshold limit, and Threshold coefficient (%) can only be selected by trial and error. Start with the default values. If the results are unsatisfactory, try to find values that enable the program to detect the White Gap on all of the test images.
If the value of the Threshold coefficient (%) is smaller than the value of the Lower threshold limit, the Lower threshold limit is used. If the Threshold coefficient (%) is greater than the Upper threshold limit, the Upper threshold limit is used (that is, the program uses the strictest criterion).