7.3.3.9   The Tab Creation

The tab Creation allows you to create or load a matching model. It consists of different sections.

  • Model

    Determine the source type for your model.

    Menu Entry Description

    Create from Image Create a new model from an image.

    Load Load an already existing model, for more information see the menu entry Load Model Image.

  • Model Source

    Determine the source for your model.

    Menu Entry Description

    Graphics Window Use the image currently shown in the graphics window.

    File Load a model (see the menu item Load Model or a model image (see the menu item Load Model Image from file.
    The following settings are available for loaded models:
    Scale:  
    Scale the model by the specified factor.
    Use Image:  
    Tick this option to load a reference image for the model polarity. The reference image is loaded from

    Note that when you load the model from a file, the loaded model cannot be changed and contains no information about the image from which it was created. As a consequence, all the menu items, buttons, and dialogs that would enable you to change the model parameters or display the model image will not be selectable.

    Acquisition Assistant Open a new acquisition assistant session and use the resulting image.

  • Model ROI

    Depending on the source type, you can draw an ROI. Next to the options explained in the The Menu ROI, you have the following option.

    Menu Entry Description

    Show List of ROI Shapes View the region shapes and therewith refine the ROI you have drawn. A table then shows you your ROI data and lets you adapt the values. Remember that for polygons and free-form ROIs, values cannot be adapted.

  • Modify Model Image

    Modify your model image such that only “wanted” contours are left or existing contours are improved.

    Enable the menu item Modify Model Image by activating the checkbox.

    Restriction: Only 8-bit (byte) model images can be modified! To modify images of another bit depth, a prior conversion is required.

    Menu Entry Description

    Drop-down menu: Inpaint Regions Remove unwanted structures by smoothing the area within the ROI.
    Select the shape of the modification ROI using the buttons on the right. You can draw the ROIs by positioning the mouse cursor as explained in the section about the menu ROI. Use the right mouse button to conclude the choice and view the effects of the inpainting. The shape should not only cover the area that is to be removed but also some of the “good” area around.

    Drop-down menu: Inpaint Regions Smooth Smooth the area within the ROI without completely removing structures.
    Select the shape of the modification ROI using the buttons on the right. You can draw the ROIs by positioning the mouse cursor as explained in the section about the menu ROI. Use the right mouse button to conclude the choice and view the effects of the inpainting. The shape should not only cover the area that is to be removed but also some of the “good” area around.

    Drop-down menu: Remove Contours Delete selected contours from your model.
    • Remove edges by selection: Remove edges by clicking on a contour with your mouse cursor in the image.
    • Delete all modification ROIs
    • Show list of modification ROIs
    • Load modification ROIs used to modify the model image
    • Save modification ROIs used to modify the model image

    Note: The model will automatically adapt to the modified image and it may happen that the deleted contour is found again after the automatical adaption.
    Strength determines the strength of the removal, that is, the smoothing width.


    Drop-down menu: Repair Edges Draw a linear Modification ROI that connects the two ends of the existing contour. Use Edge Thickness to determine the edge thickness either by directly adjusting the values in the box or by using the slider.

    Display unmodified Model Image Display the image as it was before it was modified.

    Save Image Save the modified image.

    Display modification ROIs Display all modification ROIs.

  • Display Image Pyramid Level

    Inspect the model image pyramid. This means, you can display the model image and the model (overlaid on the model image) on a selected pyramid level.

    See the Solution Guide II-B: Matching for more information on the image pyramid.
    Note that the highest available pyramid level is determined automatically by the Matching Assistant based on the size of the model ROI; depending on the selected Contrast and Min. Component Size, higher pyramid levels may not contain any model points.

    Menu Entry Description

    Image Select the pyramid level of the displayed image using the sliders.

    Model Select the pyramid level of the displayed model contours using the sliders.

    Lock/unlock button Enforce the same level for the model image and the model or to enable different level selections.

  • Calibration Source

    Select a calibration source.

    Menu Entry Description

    None No calibration data is used.

    Calibration Files Load your data files (files that end with .cal or .dat)

    Calibration Assistant Use the 标定助手 for a guided calibration.

  • The Tab Parameters

    The tab Parameters allows you to adapt various model parameters so the model suits your matching application.

    Menu Entry Description

    Standard Model Parameters Set the basic model parameters. An overview is given in the part Standard Model Parameters

    Advanced Model Parameters Set additional parameters that let you handle special cases and further optimize the model. An overview is given in the part Advanced Model Parameters

    Note: The supported parameters depend on the matching method.
    For shape-based matching, the results of the generated code may vary from the generated results shown for the Test Images in the tab Usage due to automatic value determination.

  • Standard Model Parameters

    The following table gives you an overview over the available standard model parameters for each matching method: The abbreviations used are SBM for shape-based matching, CBM for correlation-based matching, DBM for descriptor-based matching, and DM for deformable matching.

    Menu Entry Description

    Contrast (High/Low) SBM: ❌, CBM: ✓, DBM: ✓, DM: ❌
    The two parameters Contrast (Low) and Contrast (High) for shape-based matching and Contrast for deformable matching determine which pixels in the selected ROI are included in the model.
    When you select a value, either by using the sliders or by entering a value in the text fields next to them, the included pixels are marked in the displayed image.
    For information on the functionality of these parameters see their documentation in set_generic_shape_model_param (shape-based matching) and create_planar_uncalib_deformable_model (deformable matching), respectively.
    Auto Select: The Matching Assistant selects a suitable value automatically based on the model image. It selects the value by trying to obtain many long and straight contour segments.
    Note: You may need to set the value manually if certain model components should be included or suppressed because of application-specific reasons or if the object contains several different contrasts.

    Min. Component Size SBM: ❌, CBM: ✓, DBM: ✓, DM: ✓
    Specify the minimum size, that is, number of pixels, which contour parts must have to be included in the model.
    For information on the functionality of the parameter see its documentation in set_generic_shape_model_param.
    Auto Select: The Matching Assistant selects a suitable value automatically based on the model image.

    Pyramid Levels SBM: ❌, CBM: ❌, DBM: ✓, DM: ❌
    Select the number of pyramid levels. You can enter the value directly in the text field or by using the slider next to it.
    See the Solution Guide II-B: Matching for more information about the image pyramid and its levels.
    See also Display Image Pyramid for information how to inspect the model image pyramid.
    Auto Select: The Matching Assistant selects a suitable value automatically based on the model image.
    Please note that in rare cases the automatic selection will yield a too low value and thereby slow down the search process, or a too high value, resulting in failures to recognize the object. In such a case we recommend that you inspect the model image pyramid and select a suitable value manually.

    Starting Angle SBM: ✓, CBM: ❌, DBM: ✓, DM: ❌
    Specify the starting angle of the allowed range of rotation (unit: °).
    Example: To allow model rotations up to +/-5 °, for example, you should set the starting angle to -5 ° and the angle extent to 10 ° or angle end to 5 °.
    Note: The range of rotation is defined relative to the created model, that is, for a model created from an image a starting angle of 0 ° corresponds to the orientation the object has in the model image.

    Angle Extent SBM: ✓, CBM: ❌, DBM: ✓, DM: ❌
    Specify how much the object is allowed to rotate (unit: °).
    Example: To allow model rotations of up to 10 °, for example, you should set the angle extent to 10 °.

    Min./Max. Angle SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Define the range for the angle of rotation around the normal vector of the model.
    For further information see create_uncalib_descriptor_model, part “Simulation parameters” 'min_rot' and 'max_rot'.

    Min./Max. Column/Row Scale SBM: ❌, CBM: ✓, DBM: ✓, DM: ❌
    Define the allowed scaling range.
    The allowed range of scale is defined separately in row and column direction. Thus, it is described by the parameters:
    • Min. Column Scale
    • Max. Column Scale
    • Min. Row Scale
    • Max. Row Scale

    The model template has scaling values of 1.0. This means, if the model was generated from a model image, the scaling values of the model instance in this image are 1.0.
    Depending on the specified parameters, the most efficient scaling method is used. This means:

    • Unscaled matching: This method is used if all four scale factors are equal to 1.0.
    • Isotropically scaled matching: This method is used if rows and columns have the same scaling factors (but not all are equal to 1.0).
    • Anisotropically scaled matching: This method is used if rows and columns have different scaling factors.


    Min./Max. Scale SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify the scale range of the model.
    For further information see create_uncalib_descriptor_model, part “Simulation parameters” 'min_scale' and 'max_scale'.

    Model Type SBM: ✓, CBM: ✓, DBM: ✓, DM: ❌
    Select between two model types, depending on the expectations concerning the deformation of the object:
    • local deformable
    • planar


    Detector Type SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify the type of detector. The detector is used for the extraction of stable interest points within the image. Available types:
    • lepetit
    • harris
    • harris_binomial

    For more information on the detector types see create_uncalib_descriptor_model.


    Radius SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the radius of the circle in the Lepetit method.
    For further information see create_uncalib_descriptor_model and points_lepetit.
    Restriction: Only for detectors of type lepetit.

    Min. Score SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify the minimum score a potential match must have to be returned as match.
    For more information and recommendations see Solution Guide II-B: Matching.
    Restriction: Only for detectors of type lepetit.

    Gradient Sigma SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the amount of smoothing used for the gradient calculation.
    For further information see create_uncalib_descriptor_model and SigmaGrad in points_harris.
    Restriction: Only for detectors of type harris.

    Gradient Mask Size SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the amount of smoothing used for the gradient calculation.
    For further information see create_uncalib_descriptor_model and MaskSizeGrad in points_harris_binomial.
    Restriction: Only for detectors of type harris_binomial.

    Threshold. SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the minimum filter response for the points.
    For further information see create_uncalib_descriptor_model and Threshold in points_harris and points_harris_binomial.
    Restriction: Only for detectors of type harris and harris_binomial.

    Fern Depth SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify the depth of the classification fern.
    For more information see the explanation of the 'depth' in Solution Guide II-B: Matching.

    Fern Number SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify the number of used fern structures.
    For more information see the explanation of the 'number_ferns' in Solution Guide II-B: Matching.

  • Advanced Model Parameters

    The following table gives you an overview over the available advanced model parameters for each matching method: The abbreviations used are SBM for shape-based matching, CBM for correlation-based matching, DBM for descriptor-based matching, and DM for deformable matching.

    Menu Entry Description

    Angle Step SBM: ❌, CBM: ❌, DBM: ✓, DM: ❌
    Determine the step length within the selected range of angles.
    For further information see Solution Guide II-B: Matching (shape-based matching), create_ncc_model (correlation-based matching), and find_planar_uncalib_deformable_model (deformable matching).
    Note: Each time you create a model ROI or change the parameter Contrast, the Matching Assistant automatically selects a suitable value for Angle Step to obtain the highest possible accuracy.
    Auto Select: The Matching Assistant selects a suitable value automatically.

    Row/Column Scale Step SBM: ❌, CBM: ✓, DBM: ✓, DM: ❌
    Determine the step length within the selected scaling in row and column direction.
    For further information see Solution Guide II-B: Matching (shape-based matching) and find_planar_uncalib_deformable_model (deformable matching).
    Note: Each time you create a model ROI or change the parameter Contrast, the Matching Assistant automatically selects a suitable value for Row Scale Step and Column Scale Step to obtain the highest possible accuracy.
    Auto Select: The Matching Assistant selects a suitable value automatically.

    Metric SBM: ❌, CBM: ❌, DBM: ✓, DM: ❌
    Specify how pixels are compared with the model, more precisely whether and how the polarity must be observed.
    For information on the functionality of the parameter and its possible values see Solution Guide II-B: Matching (shape-based matching) Solution Guide II-B: Matching (correlation-based matching), and Solution Guide II-B: Matching (deformable matching).

    Optimization SBM: ❌, CBM: ✓, DBM: ✓, DM: ❌
    Determine the number of points by which the model is reduced.
    For further information see Solution Guide II-B: Matching (shape-based matching) and Solution Guide II-B: Matching (deformable matching).
    Auto Select: The Matching Assistant selects a suitable value automatically based on the model image.

    Min. Contrast SBM: ❌, CBM: ✓, DBM: ✓, DM: ❌
    Determine the minimal contrast (gray value difference to neighboring pixels) a point in a search image must at least have in order to be compared with the model during the matching process.
    For information on the functionality of the parameter see set_generic_shape_model_param (shape-based matching) and Solution Guide II-B: Matching (deformable matching).
    Auto Select: The Matching Assistant selects a suitable value automatically based on the model image.

    Check Neighbor SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the number of checked neighbors in the circle when using the Lepetit method.
    For further information see create_uncalib_descriptor_model and CheckNeighbor in points_lepetit.
    Restriction: Only for detectors of type lepetit.

    Neighbor Diff. Threshold SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the threshold of gray value difference to each circle point when using the Lepetit method.
    For further information see create_uncalib_descriptor_model and MinCheckNeighborDiff in points_lepetit.
    Restriction: Only for detectors of type lepetit.

    Subpixel SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Turn the refinement for subpixel accuracy on or off.
    For further information see create_uncalib_descriptor_model and SubPixel in points_lepetit and points_harris_binomial.
    Restriction: Only for detectors of type lepetit and harris_binomial.

    Patch Size SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify the side length of the quadratic neighborhood that is used to describe the individual interest point.
    For more information see the explanation of the 'patch_size' in Solution Guide II-B: Matching.

    Tilt SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Specify whether the projective transformations are used during the simulation.
    For more information see the explanation of the 'tilt' in Solution Guide II-B: Matching.

    Smoothing Sigma SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the amount of smoothing used for the integration of the gradients.
    For further information see create_uncalib_descriptor_model and SigmaSmooth in points_harris.
    Restriction: Only for detectors of type harris.

    Alpha SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the weight of the squared trace of the squared gradient matrix.
    For further information see create_uncalib_descriptor_model and Alpha in points_harris and points_harris_binomial.
    Restriction: Only for detectors of type harris and harris_binomial.

    Smoothing Mask Size SBM: ✓, CBM: ✓, DBM: ❌, DM: ✓
    Determine the amount of smoothing used for the integration of the gradients.
    For further information see create_uncalib_descriptor_model and MaskSizeSmooth in points_harris_binomial.
    Restriction: Only for detectors of type harris_binomial.

    Min. Size SBM: ✓, CBM: ✓, DBM: ✓, DM: ❌
    Suppress small connected components of the model contours.
    For more information see the explanation of the 'min_size' in Solution Guide II-B: Matching.

    Part Size SBM: ✓, CBM: ✓, DBM: ✓, DM: ❌
    Adjust the size of the model sub-parts.
    For more information see the explanation on the 'part_size' in Solution Guide II-B: Matching.