Blob Detection in vb.net

I wrote a simple recursive function for detecting blobs in vb.net. The intention of the script was to allow users to ‘paint’ nurbs geometry into grasshopper, as opposed to simply grid data from an image.  The script runs reasonably efficiently (500ms for 13000 pixels) and might be usable for finger tracking and other interactivity within grasshopper directly if it weren’t for the metaball component taking such a long time.

The definition works by iterating through all pixels in an image, creating some dataTree structure and calling a recursive function if the pixels brightness is below a threshold .  The function just loops through neighbours. If it finds a neighbour with a brightness value smaller than a threshold, the function is called again on that pixel. Pixels that have already been ‘found’ are set to a value of 1, saving a little processing time. Some images of outputs  below, definition here:

Blob Detection

~ by ledatomica on June 17, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: