Fill holes in identify prim objcts doesn't work

That’s pretty much it.
I was trying to get the outlines fullfiled enabling that option in identify_primary_objects but it doesn’t seem to work.
Thanks :smile:

Hole-filling is only applied on the identified objects themselves, not on the outlines. If you want to fill the outlines, you’ll have to use IdentifyPrimObjs and use the outline image as input, and use a very low manual threshold (something like 0.2), uncheck the selection by size and border touching, set declumping to None, and then enable hole-filling. Keep in mind that the touching outlines will be identified as one contiguous object using these settings.

Regards,
-Mark

Hummm…

Yep I know what you mean about finding touching objects as a single one :frowning:

I tried that and well, yep, got what you said.

I also tried using this as a mask to join objects identified in different channels to meassure them in both channels but as the background turns black it fails to identify the objects it did identify before which is pretty frustrating :frowning:

To join objects, I would suggest using ConvertToImage on both sets of objects to get two new binary images, and then use ImageMath to add the two images together, setting anything above 1 to 1. The resultant image should combine the two and can be used as a mask.
-Mark

I didn’t explain it very well.

I did exactly what you just said, but when I try to identify the objects using that mask, as everything outside the mask is black I don’t know why but it fails to identify the objects again :frowning:

I think I understand. Are you re-identifying the objects using one of the per-object thresholding methods? Those take advantage of any masks applied.

If you are using one of the global methods, then I’m not sure whether I would expect it to work with the same settings as when you identified the objects the first time. At least, not without some tweaking.

On the other hand, if you think you have an actual bug on your hands, upload the pipeline plus some images so we can take a look.
-Mark

Hi!

Nope it wasn’t a bug.

It was just that I didn’t understand what fillholes meant in a first instance (I though it refered to fill the outlines).

I got it to identify the objects it was about choosing the appropiate thresholdin method playing with the minimun threshold and using the imagemath as mask.

Thanks a lot!