Loading [MathJax]/extensions/tex2jax.js

You are here: Start » Tutorial Exercises » Shape Fitting: Measuring holes (shape_fitting)

Shape Fitting: Measuring holes (shape_fitting)

Aim

Devise an algorithm that finds the radius of the inspected part.

Input

A set of images depicting a single element. The radius and the number of holes are variable.

Images are stored in shape_fitting directory.

Output

The calculated radius length and the count of smaller holes around the main mount.

Hints

The object under inspection is always located in a single position.

Use FitCircleToEdges filter to find inner and outer borders of the object under inspection. The sizes of circles in the image are variable. Prepare some margin for detection of the circle radius.

Calculate the radius of an element using CircleToCircleDistance filter.

Solution (FIS)

►Click here to show the solution.

Additional Tasks

  • Calculate holes count using Blob analysis technique,
  • Calculate holes number using 1D Edge Detection technique.