White Gap
White Gap is an element of a FlexiLayout which describes a rectangular area on the image which contains almost no objects of the specified type.
To look for White Gaps, the program creates histograms for objects. When creating histograms fro 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.
Building a histogram for a vertical gap |
For more about histograms, see White Gap hypotheses.
The search area may contain accidental objects. The maximum allowed number of such objects is specified in the properties of the element.
White Gap elements are marked with in the FlexiLayout tree.
The properties of a White Gap element
Click the White Gap tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.
Show Properties dialog box, White Gap tab
- Orientation
sets the orientation of a White Gap: - Vertical White Gaps have top and bottom boundaries coinciding with the top and bottom boundaries of the search area. The left and right boundaries must be detected. An example of a vertical White Gap is the space between two text columns.
- Horizontal White Gaps have left and right boundaries coinciding with the left and right boundaries of the search area. The top and bottom boundaries must be detected. An example of a horizontal White Gap is the space between two paragraphs of text.
- Min width/height sets the minimum width/height of a White Gap in the direction perpendicular to Orientation. Gaps of smaller width/height will be ignored. Measured in the user-defined units of measurement. The default value is 20dot.
- The Search among objects of type property sets the type of objects among which to look for the White Gap. Select the desired objects by checking the boxes next to them.
The properties of the histograms of objects which may occur in the search area
- Lower threshold limit sets the minimum level of the histogram. This property allows other objects in the search area. If the height of the histogram of the objects is greater than the number specified in this field, the program will consider the search area to contain no gaps. Measured in the user-defined units of measurement. The default value is 37dot.
- Upper threshold limit sets the maximum level of the histogram. This property allows excluding false histogram maximums which may be caused by large numbers of vertically arranged accidental objects in the search area when looking for a vertical gap or horizontally arranged objects when looking for a horizontal gap. Measured in the user-defined units of measurement. The default value is 150dot.
- Threshold coefficient (%) sets the maximum relative level of the histogram. The relative level of the histogram is calculated as [level of histogram]/[histogram maximum in search area]. The default value is 20.
Note.
- The values of Lower threshold limit, Upper threshold limit and Threshold coefficient (%) can only be selected by trial and error. We recommend starting with the default values. If the results are unsatisfactory, try finding the values enabling 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 will be used. If the Threshold coefficient (%) is greater than the Upper threshold limit, the Upper threshold limit (i.e. the program will use the most strict criterion).
See also:
Creating and deleting elements
An overview of element properties
12.04.2024 18:16:02