Combining of two identified objects to one


Hi all,

I was wondering whether a module exists that allows combining two objects to one.



Hi Max,

Yes - check out the module ReassignObjectNumbers with the “Unify” option.

Hope that helps,


Hi David,

thanks a lot for your reply. Definitely helped, I actually have a different problem though - sorry for being so unspecific.
I was wondering whether it is possible to combine two object types to one, for example running two identfyprimaryobjects modules and combining both object types to one afterwards.



Oh I see. Hmm, there is no straightforward way to do this that I can think of. However if you really want, you could try this method:
(1) IDPrim #1
(2) IDPrim #2
(3) ExpandOrShrinkObjects > Shrink #1 by one pixel (This is a hack to keep touching objects separate)
(4) ExpandOrShrinkObjects > Shrink #2 by one pixel
(5) ConvertObjectsToImage > Binary #1
(6) ConvertObjectsToImage > Binary #2
(7) ImageMath > Add. Add the two new binary images
(8) IDPrimary on the new added binary image with a manual threshold of 0.5. This is your new object class.

You could re-expand your new object class when you are done if necessary, to compensate for the shrinking done earlier.

Hope that helps!


Hi David,

works like a charm! Thanks a lot for your help!

Best wishes,


Great! Let us know if you think your use case is a common one and we here could think about coding a more straightforward way to combine defined object types.