| Customize Help

Interfacing with Geometric Model Finder

The MIL Model Finder module allows you to define models from an Edge Finder result buffer or find model occurrences in an Edge Finder result buffer. If you want to use Model Finder, and are also familiar with Edge Finder, you can perform specialized edge selections, which can reduce the unnecessary geometric complexity in both the model and/or the target image. For example, if you want to find model occurrences in an Edge Finder result buffer, you can use MedgeSelect() to select which edges to include in the buffer, based on one of several criteria. As a result, Model Finder will have much less information to analyze, thereby potentially speeding up the search for the model(s).

Another way to speed up the search for model(s) in the result of an edge extraction is to specify a lower scale for the edge extraction, using M_EXTRACTION_SCALE in MedgeControl(). M_EXTRACTION_SCALE must be set before calling MedgeCalculate(). Be aware that reducing the extraction scale can result in less reliable results, including, the loss of important details and/or can reduce the accuracy of the search result. Note that M_EXTRACTION_SCALE sets or returns the scale of the image at which to do the edge extraction. Once the extraction is complete, the results are scaled to the original scale of the image.

To have further control over the edges that Model Finder uses, you can allocate an Edge Finder result buffer and add the required edge chains to the result buffer, using MedgePut(). This allows you to combine results from multiple result buffers, or create a target that contains user-defined edge chains. Note that you do not need to call MedgeCalculate() after adding edge chains to a result buffer. For more information on adding edge chains, see the Putting data into an Edge Finder result buffer subsection of the Advanced edge extraction section earlier in this chapter.

Models and target images should use the same edge types (object contours or line crests). Therefore, if the target edges are object contours, the model edges must be object contours; if the target edges are line crests, the model edges must be line crests.

If you expect to use an Edge Finder result buffer with Model Finder, you must enable M_MODEL_FINDER_COMPATIBLE in MedgeControl() before the initial call to MedgeCalculate(). To add models defined from an Edge Finder result buffer to a Model Finder context, use M_EDGE_RESULT in MmodDefine().

To set the sensitivity with which edgels are detected, Edge Finder users can use MedgeControl() with either M_THRESHOLD_MODE or M_DETAIL_LEVEL. M_DETAIL_LEVEL helps users already familiar with Model Finder and should only be used when interfacing with Model Finder. In MedgeControl(), the M_DETAIL_LEVEL setting overrides the M_THRESHOLD_MODE setting.

The following is an example of a typical Edge Finder/Model Finder application:

For more information on Model Finder, see the Geometric Model Finder module section of Chapter 8: Geometric Model Finder.