Home Image-Pro General Discussions

How to filter out objects that do NOT touch the boundary?

I know I can filter out the objects that touch the boundary in Measurements Options by selecting the clean borders. However, for my application, I am interested in the objects that do touch the boundary of the image. Would this be possible in Image-Pro?

Best Answers

  • Answer ✓
    2022-02-22-150317

    Amirafshar --

    I do not believe that there is an OPTION to achieve your goal but you can achieve your goal in a couple of steps.

    Please see the image below where:

    AA = ORIGINAL IMAGE
    BB = ORIGINAL IMAGE WITH DARK OBJECTS COUNTED AND NO BORDERS CLEANED
    CC = ORIGINAL IMAGE WITH DARK OBJECTS COUNTED AND ALL BORDERS CLEANED
    DD = MASK OF BB
    EE = MASK OF CC
    FF = DD XOR WITH EE WITH BRIGHT OBJECTS COUNTED AND NO BORDERS CLEANED
    GG = ORIGINAL IMAGE + OBJECTS FROM FF (TRANSFERRED USING DATA TABLE IQM FILE)

    I have attached AA.TIF and GG.TIF for you to use to follow this example.

    I hope this information is helpful.

    -- Matt






    aa.tif 414.5K
    gg.tif 457.3K
  • Answer ✓
    2022-02-22-173421

    Amir --

    After you COUNT in FF, the MEASUREMENTS for the OBJECTS can be seen in the DATA TABLE.

    In the DATA TABLE, you have the SAVE MEASUREMENTS TO FILE as shown here



    Now if you activate your ORIGINAL IMAGE (AA), you can use the LOAD MEASUREMENTS FROM FILE as shown here.



    The result will be that the OBJECTS found in FF will be displayed in AA that I designated GG.

    You can also transfer objects from one image to another using the FEATURES MANAGER.  The FEATURES MANAGER is very powerful and very flexible but there are more CLICKS to get from START to FINISH for the task that you are attempting.

    I hope this information is helpful.

    -- Matt

Answers

  • Thank you very much Matt for the prompt response. I will try this approach and let you know how it goes.
  • 2022-02-22-153948

    amirafshar --

    You are welcome.

    Good luck.

    -- Matt


  • Matt,
    I have manged to reach step FF and count only the objects that are touching the boundary. I was wondering if you could elaborate on the last step, how to get GG image? I don't know where I can find the DATA TABLE IQM FILE and how to use it to transfer the objects from FF image to the original image. Thank you.

    -Amir

  • Matt,
    Thank you for the detailed work flow. This is super helpful.
    Amir
  • 2022-02-22-180821

    Amir --

    You are very welcome.

    This forum has been very helpful to me and I am glad to help others.

    Have a great day.

    -- Matt


Sign In or Register to comment.