Limiting find_blobs behavior when merging partially connected blobs

Is there a recommended technique for separating these blobs into separate objects so we may target the blocks? They are touching (partially), which is causing them to merge. We have the Merge parameter set false. Is it possible to set a max detection size or something that prefers a “mostly” connected region with no gaps?

Ah… that’s a challenge. When those blocks are touching they basically are the same object. Color tracking doesn’t have any understanding other than there’s a region of color connected.

That said, given the rects of blobs you get back from find_blobs() you can then call it again on those regions of interest using the ROI parameter and you can use other vision library functions like a tensorflow model on the ROI or you could use find_line_segments() to get a list of edges.

Is you goal to count the number of blocks? If so, I’d recommend just using EdgeImpulse to train a FOMO model. That will solve this in one shot. You can specify with edge impulse to have the FOMO model centroid grid to have a higher resolution. Then it will just tell you the centroid of all blocks. You can then train the model to to output a different class for the color of the blob so you can track the color too.

The goal is to output the simple x,y (screen pixel) distance from the center of a block that is nearest the center of the frame. It will be used to guide a robot for FTC) that is designed to grab at that specific location. It works great when blocks are recognized separately but not when it gets a group in one blob.