You are here: Start » Tutorial Exercises » Shape Fitting: Gasket
Shape Fitting: Gasket
Aim:
Your task is to create a program that can measure the distance between two holes in a gasket.
Input:
Images of a gasket with variable location and rotation.
The input images are stored in the gasket_inspection directory.
Output:
The distance between the centers of two holes.
Hints:
Start the program as in the "Edge-based Template Matching: Gasket" tutorial. Then use the FitCircleToEdges filters to precisely detect the holes and PointToPointDistance to measure the distance between their centers.
Labeling connections is explained in this article.
Solution (FIS):
►Click here to show the solution.
Further Readings
- Shape Fitting - This article presents usage of the Shape Fitting technique.
- Template Matching - Most detailed description of the Template Matching technique.