To analyse or not to analyse conected components

So to figure out the location of independent blobs one has to first figure out which pixels belong to what blob.  This is usually reffered to as connected component analysis/labeling.  The standard algorithm do do this starts in one corner of an image and then looks at the next pixel until it reaches opposite corner (connected component labeling)This doesn’t really work on the gpu, because everything happens in parallel.

I have been playing around with a couple ideas of how to cope with this.  Some of which use alternative algorithm to label the individual components  Here is a screenshot of a really naive approach that actually works better than i thought it would.  It marks the horizontal and vertical middle pixel red and green respectively for each row/column.  The center point becomes yellow.  The idea is that if i have an image with just single pixels representing the center of each blob I can find them quickly on the gpu by processing e.g. each 10×10 block by a separate geometry shader thread.  Then I could easily produce variable length output to store the coordinates and only transfer back to the cpu what is really needed.

I’m pretty convinced that this approach is too naiive to work well, but it kind of looked cool.  We’ll see what else we can come up with.

This entry was posted in gpuTracker. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash