Detection of Tiny Blobs from QQVGA

Discussion related to "under the hood" OpenMV topics.
User avatar
Raj
Posts: 21
Joined: Wed Jun 05, 2019 2:14 am

Detection of Tiny Blobs from QQVGA

Postby Raj » Fri Jun 21, 2019 5:57 pm

Hi,

I run the following code on my QQVGA Grayscale image:
img.mean(1, threshold=True, offset=5, invert=False)
blobs = img.find_blobs([(0,64)], pixels_threshold= 1)

Unfortunately, only the blobs marked with "Red-Arrows" are detected.
There are at least 35 tiny-blobs left undetected, in each image.

Am I missing something?
Kindly provide some guidance, please.

Thanks,
Regards
Attachments
find_blobsFromQQVGA-02.png
find_blobsFromQQVGA-02.png (1.79 KiB) Viewed 8531 times
find_blobsFromQQVGA-01.PNG
find_blobsFromQQVGA-01.PNG (1.95 KiB) Viewed 8531 times
User avatar
kwagyeman
Posts: 3837
Joined: Sun May 24, 2015 2:10 pm

Re: Detection of Tiny Blobs from QQVGA

Postby kwagyeman » Fri Jun 21, 2019 6:05 pm

Hi, you need to set the area_threshold argument to a low value too. It defaults to non zero to ignore those tiny blobs.
Nyamekye,
User avatar
Raj
Posts: 21
Joined: Wed Jun 05, 2019 2:14 am

Re: Detection of Tiny Blobs from QQVGA

Postby Raj » Fri Jun 21, 2019 6:08 pm

Wonderful!
Works like a charm.
Had been struggling throughout the night.
Thanks a Ton !!
User avatar
Raj
Posts: 21
Joined: Wed Jun 05, 2019 2:14 am

Re: Detection of Tiny Blobs from QQVGA

Postby Raj » Thu Jul 04, 2019 7:57 am

Hi,

However, blobs of 1pixel wide X 1 pixel Height (single pixel Blobs) are not getting detected when I set: pixels_threshold= 1, area_threshold=1
Tried with setting "pixels_threshold= 0, area_threshold" too.
Any suggestion would be of great help, please.

Thanks,
Regards.
User avatar
kwagyeman
Posts: 3837
Joined: Sun May 24, 2015 2:10 pm

Re: Detection of Tiny Blobs from QQVGA

Postby kwagyeman » Sat Jul 06, 2019 8:33 pm

Hi, that's because of the default x and y stride. The algorithm doesn't sample all pixels to go faster. Set the x_stride and y_stride to 1.

As a note... I heavily recommend to read the API when you have issues... You've asked two questions now that would have been answered by reading the API for find blobs. You'll save time on yourself by looking at the method documentation. ;)
Nyamekye,
User avatar
Raj
Posts: 21
Joined: Wed Jun 05, 2019 2:14 am

Re: Detection of Tiny Blobs from QQVGA

Postby Raj » Sun Jul 07, 2019 12:53 am

Truly said.
Will definitely follow your kind suggestion henceforth.
Thank you very much for indicating solution for the problem.

However, the efforts you are putting on a day-to-day basis into this endevour is commendable.
God bless you.

Thanks,
Regards.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests