Wolfram Language

Use Contours to Count Gear Teeth

Using the new contour properties in ImageMeasurements and ComponentMeasurements, develop a convex hullbased algorithm in order to identify and analyze the shape of gears and use it to count their teeth.

Build a small utility to get the ConvexHullMesh of the contours and compute the defects. Using PeakDetect, you can also find the point of minimal indentation.

show complete Wolfram Language input

The precomputed contour properties can be displayed in a vector graphic for easier visual inspection.

Write a utility function to show the sequence of distances of pixels on the contour to its convex hull.

Combine all the previous visualizations together with the estimated number of teeth.

Show the summary for the test gear.

Apply the function to a more complex image.

Group the gears by their approximate teeth count.

Inspect multiple coins.

Related Examples

de es fr ja ko pt-br zh