Use “2D Model Editor” to Generate and Edit Models

In 2D Model Editor, you can use tools to select 2D regions of interest (ROIs) on the depth map or intensity image. The points in the ROIs will be used as the feature points to generate a 2D model for matching. The Alignment Step will align the input image to the model, thus correcting the image so that the position of the target object remains consistent across all images.

The selected feature points should satisfy the following requirements:

  • Common to all images: If the selected feature points are not common to all images, matching between input images and the model may fail.

  • Representative: The selected feature points should be representative to ensure that the matching results are unique and accurate; otherwise, the matching results may be incorrect.

  • Moderate quantity: Generally, the more feature points selected, the higher the matching accuracy. However, if there are too many feature points, the matching speed may be reduced.

Preparation

  1. Make sure that the Alignment Step has valid input.

  2. Under Parameters in the parameter configuration panel of the Alignment Step, click the Edit Model button to open the 2D Model Editor. This tool will automatically obtain the input image of the Step.

  • Click the Get Step input button in the editor’s parameter panel on the right to update the input image.

  • When the X-axis resolution and the Y-axis resolution of an image differ, the software will automatically adjusts the image so that its resolution ratio is 1:1. After returning to the home interface, you can view the normal image.

resolution change for image

Usage Workflow

  1. Rename the default model or click + New to create a new model.

    After selecting a model from in the model list, right-click and select the Rename option, enter a custom name, and click OK to modify the model name.
    2d template rename 1
  2. Select feature points. The selected feature points should be representative, and the quantity should be appropriate.

    Instruction: Click the icon on the toolbar to the right of the Model list to select the appropriate ROI drawing tools and create ROIs to cover feature points in the image.

    • In the ROI list section at the bottom left of the interface, right-click an ROI and select Enable, Disable, etc., to set the drawn ROI.

    • For overlapping areas, Disable has priority over Enable. In other words, when two regions are set to Enable and Disable separately, the actual status of the overlapped region is Disable, and the feature points in the overlapped region do not take effect and will not be used for model generation.

      overlap region status
  1. Set the center point. The center point determines the position of the model in the image to be matched, thus determining the search range for model matching.

  2. Set Feature parameters.

  3. Click the Generate model button in the lower-right corner to generate and preview the model.

    generated model
  4. Click the Save button in the lower-right corner to save the generated model.

    If you only clicked Save in the lower-right corner and did not generate a model, the edited model would be saved but would not work.

After configuration, close the editor. Click under the Edit Model button in the Parameters section of the Alignment Step and then select the corresponding model in the drop-down menu.

ROI Drawing Tools

The usage instructions on ROI drawing tools are shown in the table below.

Icon Tool Instructions

circle roi

Circle ROI Tool

Use the Circle ROI Tool to draw a circular ROI.

  1. Click circle roi on the toolbar to the right of the Model list.

  2. Press and hold the left mouse button and drag the crosshair cursor in the drawing area to draw a circle.

  3. Release the left mouse button to finish the drawing.

rectangle roi

Rectangle ROI Tool

Use the Rectangle ROI Tool to draw a rectangular ROI.

  1. Click rectangle roi on the toolbar to the right of the Model list.

  2. Press and hold the left mouse button and drag the crosshair cursor in the drawing area to draw a rectangle.

  3. Release the left mouse button to finish the drawing.

polygon roi

Polygon ROI Tool

Use the Polygon ROI Tool to draw a polygonal ROI.

  1. Click polygon roi on the toolbar to the right of the Model list.

  2. Click the first position (vertex) in the drawing area, then click the second one, etc., to draw the polygon. (At least three vertices are required.)

  3. Right-click to finish.

roi eraser

ROI Eraser Tool

Use the ROI Eraser Tool to erase the drawn ROI, and the points in the erased parts will not be used to generate the model.

  1. Click roi eraser on the toolbar to the right of the Model list.

  2. In the upper-left corner of the ROI drawing area, drag the slider or change the pixel value to adjust the eraser size.

  3. Press and hold the left mouse button and drag in any direction in the drawing area to determine the drawn regions to be erased.

  4. Release the left mouse button to finish the drawing.

select tool

Select Tool

Use the Select Tool to select and edit the drawn ROI.

  1. Click select tool on the toolbar to the right of the Model list.

  2. Select an ROI from ROI list, or click an ROI in the drawing area. Vertices will appear on the edges of the ROI, and the cursor will turn to hand icon when it is placed over the ROI.

  3. Press and hold the left mouse button and drag the ROI to change its location, during which hand icon turns into fist icon. Release the left mouse button to finish.

  4. Place the cursor over the vertex, and when the cursor is displayed as point icon, press and hold the left mouse button and drag the vertex to change the shape or size of the ROI. Release the left mouse button to finish.

  • After drawing an ROI, click the Select Tool select tool on the toolbar to edit the ROI.

  • The Select Tool cannot be used to edit the regions erased by the ROI Eraser Tool.

Feature Parameters

Parameter Description

Gradient magnitude threshold

Points with gradient magnitude greater than the threshold will be considered feature points. Set this parameter to filter out feature points with small gradient magnitude.

When a high threshold is set, only points with large gradient magnitude, i.e., points that vary significantly in the image, will be kept. When a low threshold is set, some noise or insignificant feature points may be kept.

Number of feature points

The expected number of feature points extracted from the model image. A greater value means a larger feature point count.

  • Adding more feature points can improve the matching accuracy, but also increase the calculation complexity and reduce the matching speed.

  • If the number of feature points in the generated model is smaller than the set one, the number of feature points in the model is subject to the actual one.

Kernel Size of NMS

The kernel size of non-maximum suppression (NMS). This parameter is used to regulate the distribution density of the feature points. The larger the value, the sparser the feature points.

Set Angle

Set the angle-related parameters to define the allowable rotation angle range of the image to be aligned.

  • Range (°): Set this parameter to determine the possible rotation angle range of the target object in the image relative to the model during model matching.

  • Step (°): The angle interval during matching. Setting a small step size will improve the search accuracy but slow down the search process.

  • Attempt count: The number of matching attempts within the given angle range.

Set scale

Set the scale-related parameters to define the allowable scale range of the image to be aligned.

  • Set this parameter to determine the scale range that the target object will appear in the image during model matching.

  • Step: The scale interval during matching. Setting a small step size will improve the search accuracy but slow down the search process.

  • Attempt count: the number of matching attempts within the given scale range.

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.