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:



