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

Need help with overlapping measurement areas

Hi,

An overlapping measurement should be changed by programming so that one measurement does not overlap the other.

 

I want to explain this case by a simple example:



Draw in the first measurement with the polygon tool (grey area, Class 1 – outline in blue color)



Draw in the second overlapping measurement with the polygon tool (green area, Class 2 – outline in red color)



The second measurement should be changed with a programming so that there is no overlap with the first measurement.



How can I solve this programmatically?

 

Thanks in advance

fsup

Comments

  • 2018-08-22-104033

    There is an OPTION in IMAGE-PRO that you may be overlooking.

    This OPTION is the

        XOR ROI OPTION

    that is found

        SELECT RIBBON + REGIONS OF INTEREST + OPTIONS + XOR ROI

    as shown here



    In the examples from 111 to 444 below the top square is 64 intensity, the middle square is 128, the bottom squares are an additive overlap with some 64, some 128, and some 192.

    In the 3rd picture you can see that the area where the ROIs overlap is included in the HISTOGRAM.  In the 4th picture you can see that the area where the ROIs overla is not included in the HISTOGRAM.

    I hope this information is helpful.

    -- Matt










  • Hi mbatchelor,

    thank you for reply. This was also my first intention to solve this requirement with the XOR ROI option. But it's not sufficient for the requirement.

    It's a little tricky to explain this.

    The procedure:
    1.) The operator defines the whole region with the first measurement (P1 in the screenshot).
    2.) With the second measurement the operator defines a region that has to be discarded (P2 in the screenshot).

    For example, if I consider the area of the two ROIs (P1, P2) with the XOR ROI option I get as a result the red and blue outlined regions (histogram). However, the blue-framed region may not be included in the calculation. Only the red bordered region should be the result. It get the same result when I try to calculate the area with the measurement table results (P1-P2).




    I hope I could explain the problem as well as possible.

    Thanks in advance.
    fsup




  • Fsup --

    I am sorry that I did not understand your challenge better.

    Please see below.

    I have attached the TIF IMAGE FILES so that you can play with this.

    I hope this information helps.

    -- Matt

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



    AAA = ORIGINAL INCLUDE IMAGE
    BBB = ORIGINAL EXCLUDE IMAGE
    CCC = MASK OF BRIGHT OBJECTS IN AAA
    DDD = MASK OF BRIGHT OBJECTS IN BBB
    EEE = CCC MINUS DDD
    FFF = AAA PLUS BBB WITH BRIGHT OBJECTS IN EEE
    MEASUREMENT TABLE = AREAS OF OBJECTS IN FFF
  • Hi mbatchelor,

    your hint to solve this requirement with masks is great. :):)

    Thank you very much.
    fsup


  • 2018-08-31-104953

    FSUP --

    I am glad to be able to help.

    Many folks have done the same for me.

    Have a good day.

    -- MMB

Sign In or Register to comment.