When matching each layout alternative with an image, FlexiLayout Studio successively generates hypotheses for each of the elements. Hypotheses for the elements are generated one by one: from the first (topmost) element in the tree to the last (bottom) element. From the generated hypotheses, a tree of hypotheses is built.
If the layout alternative is successfully matched with the image, the tree of hypotheses is displayed in the Hypotheses window. If more than one layout alternative matches the image, or if none of the alternatives can match it, the tree of hypotheses for the first alternative is displayed.
The number of hypotheses created for an element may exceed the number set in the Number of surviving hypotheses field. In this case, only the user-defined number of the best hypotheses will make it into the tree of hypotheses.
Best path
In the tree of hypotheses, FlexiLayout Studio then looks for the best path, that is, the best-quality path to the hypotheses of the last element. The quality of the path is calculated by multiplying the qualities of the hypotheses for the elements in this path.
The hypotheses in the best path are used to detect the blocks.
View the tree of hypotheses
The tree of hypotheses is displayed in the Hypotheses window.
Match the FlexiLayout with the image
Select Match from the FlexiLayout menu or from the shortcut menu.
To view the hypotheses for elements which are part of a Group element, select the hypothesis for the Group element, and then press Enter or select the Show Details command from the shortcut menu.
To go one level up, press Ctrl+Enter or select the Go One Level Up command from the shortcut menu.
The tree of hypotheses built for the current image is deleted when you close that image. The best path (the chain of hypotheses that was used to build the Matched Layout) is preserved. You can view these hypotheses when you open the image again. FlexiLayout Studio does not store the entire tree of hypotheses, because it may take up too much memory.
Parts of the tree of hypotheses
The left-hand column contains the elements of the first nesting level in the order in which they appear in the FlexiLayout tree.
The right-hand column contains hypotheses generated for each of the elements. Each hypothesis is marked with an icon. The hypotheses are joined by thin lines which show the order in which they were generated. The hypotheses in the best path are joined by green lines. Other hypotheses are joined by gray lines.