Using merge_cb to only merge blobs aligned in Y-axis

Discussion related to "under the hood" OpenMV topics.
Jensu
Posts: 9
Joined: Mon Feb 18, 2019 6:20 am

Using merge_cb to only merge blobs aligned in Y-axis

Postby Jensu » Mon Feb 18, 2019 6:55 am

Hi.

I'm doing some blob tracking, to pick out human silhouettes, and would like to only merge smaller blobs, if they are aligned in Y, ie. human shapes.

It looks like the merge_cb callback would be good for this, but I can't fin any documentation for it.

Is there someone who could write a little example, just containing the img.find_blobs() and the callback function.

All the best.

/Jens
User avatar
kwagyeman
Posts: 3441
Joined: Sun May 24, 2015 2:10 pm

Re: Using merge_cb to only merge blobs aligned in Y-axis

Postby kwagyeman » Mon Feb 18, 2019 12:23 pm

See the examples -> Pixy Emulation. You basically just pass the python function name that takes two blob arguments and then return True or False.
Nyamekye,
Jensu
Posts: 9
Joined: Mon Feb 18, 2019 6:20 am

Re: Using merge_cb to only merge blobs aligned in Y-axis

Postby Jensu » Mon Feb 18, 2019 12:34 pm

Amazing! Thank you, makes sense now.
Jensu
Posts: 9
Joined: Mon Feb 18, 2019 6:20 am

Re: Using merge_cb to only merge blobs aligned in Y-axis

Postby Jensu » Mon Feb 18, 2019 12:57 pm

And it works!

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests