Co-localization per object / measuring specific overlap

So I’ve gotten as far as determining the amount of “Class A” objects that at least touch “Class B” of objects but I want to get more specific than that. What I want to do is actually measure how much of each A objects overlap with each of B objects. It would be nice if the MaskObjects module could do something like “Keep only Overlapping Regions” so I could have something of a before and after measure of area ( = Amount of area of n object A’s that overlap with B’s / Total amount of area of n object A’s that at least touch object B’s ). I’m assuming there’s some sophisticated method of doing this but I can’t figure it out. Help?

[Attached is my current pipeline with two example images]

Analyzing_Colocal_per_object.cp (8.43 KB)

In MaskObjects, you can change the option “Handling of objects…” from “Remove” to “Keep overlapping objects.” Is this what you are looking for? If so, you can then change “Numbering of resulting objects” from “Renumber” to “Retain” to make measurements that correspond to the original objects.


Not exactly, I want a way to “cut out” the parts that only have overlap and just figured out that MaskImage will do just that. :smiley: