How to Calculate Gears

Hello,

As shown in the attached image, I am working with a gear and would like to automatically calculate:
The tooth-to-root distance (the distance from the tooth tip to the bottom of the groove, passing through the gear's geometric center)
My questions are:
Are there any existing algorithms or established methods to automatically measure these gear tooth dimensions?
Are there any tools or libraries that can easily implement this functionality through macros or image processing?
I should note that the macro I've currently written only works for this specific gear image, but what I need is a solution that can be applied to images of any gear.
Attached is the macro I generated and the IQO file used.
Thank you very much for your assistance!

Answers

  • 2025-09-11-142940

    Howard --

    This is an interesting challenge.

    I have downloaded and reviewed the contents of the file named 

        GEAR.ZIP 

    that you posted here on the forum.

    I would like to run YOUR MACRO on a copy of YOUR IMAGE that does not include the IMAGE-PRO MEASUREMENT LINES.  Will you amend this POST to include an ORIGINAL FULL SIZED COPY of one or more ORIGINAL SAMPLE IMAGES please.

    Thank you.

    -- Matt

    Matthew M. Batchelor
    Alces Imaging and Automation, LLC
  • Matt--
    Here is the original image
    Thank you.

    --Howard