Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Tutorial Exercises » Measure Objects

Measure Objects

Aim:

Devise an algorithm that measures the width of an object depicted in the provided images.

The measured width should be presented in a human-readable format and depicted on an input image.

Assume that the camera is calibrated and the pixels-to-millimeters scale equals 18,00.

Input:

The set of images with a single mount depicted.

Images are stored in the measure_objects directory.

Output:

The image of the measured object with its width drawn on the input image.

The measured value should be presented in millimeters.

Hints:

This exercise can be solved using the two most frequently used techniques: 1D Edge detection and Template Matching. In the first part, the object should be found, and after that, the calculated object's alignment should be used to perform measurements.

Create a template matching model for one of the selected images. The template matching model does not have to include the entire object. It is recommended that the model contains only the object's characteristic part to make the matching process faster.

The prepared model should be used to locate the object in the image. Use LocateSingleObject_Edges1 because only one object is always depicted in the image.

To measure the object width, use MeasureObjectWidth which uses the 1D Edge Detection technique.

Labeling connections is explained in this article.

You can learn how to turn on sections here.

Solution (FIS)

►Click here to show the solution.

Further Readings