Home Image-Pro General Discussions

Dynamic height measurement

Hi,
How can I measure the height of an object that is increasing in size? I am really new in ImagePro and I will highly appreciate any help. I need to create a macro to measure a specific height through a defined line. If you need any more information please let me know.

Thanks
Juan

Best Answers

  • Answer ✓
    JuanMartin,

    Another option would be to use Line profile tool (Measure tab).
    Merge all your images to a sequence, draw line profile as on your screenshot, add Edge detector that locates your point of interest (e.g. Falling Edge). 
    Then you just click the Collect button on Line profile tab and measurements from the origin of the edge point will be collected for all frames.

    Yuri
     
  • Answer ✓
    Do you have Excel on your computer? If not, you can save the data to TXT file: open Data Collector data table and save the data to a file from there.

    Yuri
     

Answers

  • Here is an example of what I am trying to do. I set a rectangle to reduce the area of the frames, created a baseline (which will always stay in the same position) and a vertical line, where I want to measure the distance from the baseline, to the place where the pixels turn from white to black i.e. the top of the moving object. 
  • 2018-02-06-170644

    JuanMarin --

    I believe I understand your problem.

    I believe that you would like to measure the lowest point in the upper edge of a moving feature.

    There look to be some complicating factors but here is an example which may give you some ideas.

    I took an image of a SAW BLADE and turned it so that the UNKNOWN EDGE was on the right.  I did this for two reasons.  1)  It fits my screen better.  2) The measurement will be in order from TOP to BOTTOM rather than from the TALLEST TOOTH to the SHORTEST TOOTH.

    After I turned the image (AA), I created a MASK of the BLADE (BB).

    I then made a GRID IMAGE (CC) that would give me a SAMPLING MECHANISM.

    I then did an AND between BB and CC to create DD which is very thin samples of the BLADE.

    I then THRESHOLDED and MEASURED the BOUNDING BOX WIDTH for the SAMPLES in DD.

    Please see the first SCREEN CAPTURE below.

    I then saved the MEASUREMENTS in an IQM FILE using the MEASUREMENT TABLE and recalled them into AA and I called this image EE.

    Please see the second SCREEN CAPTURE below.

    This same type of operation could be run on a single sample line on a time series or the time series could be tiled and sampled in an appropriate manner.

    I hope this is helpful and gives you some ideas.

    -- Matt

    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

    FIRST SCREEN CAPTURE with AA, BB, CC, and DD (and DATA)


    SECOND SCREEN CAPTURE with EE (and DATA)


  • 2018-02-06-180422

    JuanMartin

    I agree with YURI that the LINE PROFILE TOOL is a great tool for this challenge if the IMAGES will cooperate.

    Here are some SCREEN CAPTURES that might give you an idea about how to tackle this challenge with that tool.

    I hope this information is helpful.

    -- Matt








  • Thank you all for the help.
    I believe edge detector is what I was thinking about. 
    I already have all the images in one single AVI file, but how can I draw the line profile that always stays there?, And how can I save all the results from the edge detector? 
    Thanks again
  • JuanMartin,

    If you open a sequence and draw line profile - it will always stay there (when you change frame or play through the sequence).
    If you want the same profile to be used on other sequences, you can put it to the Features Manager (even save to a file from there) and restore it to another sequence.

    About collecting measurements:
    1. Be sure you added the right measurement in the Measurements group. On the screenshot below I added Rising to Falling edge measurement:

    2. In the Colect button dropdown ensure that All Frames is checked,  click the Collect button

    3. The result measurements will be in the Data Collector. Check the table or Graph for Rising-Falling measure:


    You may check other posts on the forum that describe using Line Profile tool, like this:
    http://forums.mediacy.com/discussion/comment/2773#Comment_2773 

    Yuri
  • Thanks again for the help,

    Now I can measure it for all the frames and get the plot as seen in the picture. But, when I right click on it and say export to excel, this error message is appearing.  What can I do to export it an get all the points? 
     

Sign In or Register to comment.