Use the Caliper Tool

Using the Caliper tool requires the following steps:

  1. Opening the Caliper dialog
  2. Setting the Caliper Tool Inputs
  3. Setting the Image Region
  4. Setting the Contrast Scoring Method
  5. Setting the Size Scoring Method
  6. Set the Straddle Scoring Method
  7. Set the Position Scoring Method

In this example, the caliper tool will be used to find an edge pair that is high contrast, near the center of the image region, straddles the center of the image region, and has an edge distance close to the expected distance.

  1. Opening the Caliper Dialog

    1. Right-click an empty cell in the spreadsheet and select Insert Function to open the Insert Function dialog.
    2. In the left side of the Insert Function dialog, expand the Vision Tools list of tool categories.
    3. Select the Edge tool category.
    4. Select the Caliper function from the Function List and press the OK button or double-click on the function.

    5. The Caliper dialog will appear.

  2. Setting the Caliper Tool Inputs

    1. Set the Edge Mode to Edge Pair.
    2. For this example, we set Edge: First polarity to black-to-white.
    3. Set Edge: Second polarity to white-to-black.
    4. Set the Edge Distance to the expected distance between the edges in the edge pair.
    5. Change Show to input and result graphics.
    6. Click the OK button.

  3. Setting the Image Region

    1. Right-click on the Caliper Edges structure that you previously inserted into the spreadsheet.
    2. Select Cell Graphic.
    3. Adjust the region until it includes the edge pair that you want to examine.
    4. Double-click in the region to return to the spreadsheet.

  4. Setting the Contrast Scoring Method

    1. Double-click on the Caliper Edges structure in the spreadsheet.
    2. Click on the Scoring Methods tab, which shows the default Contrast scoring method editor.
    3. Set the top slider to below the expected edge contrast, which is the average of the edge pair as shown in the following figure. You can adjust the other sliders to create a scoring calculation the fits your needs. The setting shown here gives a 100 score for any edge pair with an average contrast greater than 84 and a score that drops as the contrast approaches zero.
    4. Click OK.
    5. Notice the score for the edge pair. The score is dependent only on the contrast scoring method.

  5. Setting the Size Scoring Method

    1. Double-click on the Caliper Edges structure in the spreadsheet.
    2. Click on the Scoring Methods tab.
    3. Select Size in the Add Scoring Function drop-down list and click the Add button, which displays the Size scoring method editor.
    4. In this case, we only want to focus on the difference between the expected edge size and not whether the size is larger or smaller than the Edge Distance setting. Click the Use Symmetric Distance check-box.
    5. Adjust the slider so that edge pairs with a difference of 5 pixels get a score of 100 and the score diminishes as the difference increases up to 25 pixels, at which point, the score is zero.
    6. Click the OK button.
    7. Notice the score for the edge pair. The score is now dependent on the geometric mean of contrast and size scoring methods.

  6. Setting the Straddle Scoring Method

    1. Double-click on the Caliper Edges structure in the spreadsheet.
    2. Click on the Scoring Methods tab.
    3. Select Straddle in the Add Scoring Function drop-down list and click the Add button, which displays a note that there are no editable parameters.
    4. Leave the Caliper dialog open.

    The straddle scoring method scores 100 if the edge pair straddle the center of the image region and 0 if they do not.

    The score is now dependent on the geometric mean of the contrast, straddle and size scoring methods.

  7. Setting the Position Scoring Method

    1. Select Position in the Add Scoring Function drop-down list and click the Add button, which displays the Position scoring method editor.
    2. In this case, we only want to focus on the position of the center of the edge pair in the image region. We don't expect a need to deal with scaling. Make certain that Centered Edges and Region Centered are selected.
    3. Adjust the slider so that edge pairs within 5 pixels of the center receive a high score and the score diminishes as the edge pairs move away from the center up to 20 pixels, at which point the score is zero.
    4. Click the OK button.
    5. Notice the score for the edge pair. The score is now dependent on the geometric mean of contrast and size scoring methods.

    The score for this example is the geometric mean of the contrast, size, position, and straddle scores (4th root of contrast score X size score X position score X straddle score).