Home Image-Pro Automation (Macros, Apps, Reports)

How to find max/min diameter through object's center?

As shown in the attached image, I have an irregular-shaped object. I'd like to automatically calculate:

  • The maximum diameter (the longest distance across the object passing through its geometric center, labeled "CPT5" in the image).
  • The minimum diameter (the shortest distance across the object passing through its geometric center).

My questions are:

  1. Are there any existing algorithms or established methods to achieve this automatically?
  2. Are there any tools or libraries that can easily implement this functionality?
Thank you very much for your assistance!

Answers

  • Hi DavidLin,

    Yes, these measurements are available in Image-Pro, they are called Diameter Min and Diameter Max:



    Yuri
  • Hi YuriG,

    Thank you for your response! I see that Image-Pro provides the Diameter Min and Diameter Max measurements. That’s great!

    However, I would also like to visualize these diameter lines on the image itself. Is there a way to automatically display them as overlay annotations? If not, is there a way to extract the coordinates of these diameters so that I can manually draw them?

    I appreciate your help!

    Best regards,
    DavidLin

  • Hi DavidLin,

    There is no direct way to visualize Diameters. You can display "Longest Line" or equivalent ellipse by activating corresponded count option:


    Also, if you want detailed report of diameters at 1 degree step, you can add Diameters measure with 180 number of angles and see it in the Object window or Data Table:


    Yuri
Sign In or Register to comment.