I want to track a black line using ROIS, which works fine. However, I also want to detect green rectangles along the line, this is where the problem lies. It detects green rectangles but it counts too many as you can see below. I save the c-coordinates of every green blob in a list and want to get the amount of green blobs in the picture (which should be three in the picture below). The output always says there are 8 green blobs.
I already tried to adjust the green Threshold (currently: green = [(15, 45, -50, -10, 0, 40)] ) but no matter what I choose, it either sees no green or too many.
Please update your firmware because that behavior shouldn’t happen with the newest code. Then set the “merge=True” flag for find_blobs. This will merge overlapping blobs. If you’re still having issues increase the merge “margin=”.
Thank your for your answer. Updating the firmware helped, thank you very much! I wonder why the firmware was outdated, I didn’t buy the Cam that long ago…
Mmm, not sure, but, from my own testing I know trying to handle SPI data via a CS interrupt callback doesn’t really work. The CS line and clocked data starts too quickly. See the Arduino SPI example. I put a lot of notes together on this.