Ask Your Question

combining small white blobs to one blob..

asked 2015-04-02 15:27:58 -0500

215 gravatar image

I have this binary image, which have contours.. I am looking for method which fill out the contours, such that when i draw a Rect around the contour, i will not draw multiple small rect to cover the same person...


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-02 16:14:57 -0500

Witek gravatar image

Use morphological operations like dilation or closing to merge small adjacent blobs.

edit flag offensive delete link more



The downside is that you can never know how many closing or dilation operations you need to perform to reach the desired result. You could make it dependant on center distances of blobs. If the distance between two centers is smaller than a threshold that you select, then perform merging and closing to bring them together basing the amount of iterations on the distance between the centers. Do this for each combination of close blobs! However you will notice that this will still yield problems!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-03 04:54:55 -0500 )edit

Question Tools

1 follower


Asked: 2015-04-02 15:27:58 -0500

Seen: 1,182 times

Last updated: Apr 02 '15