blob detection in glsl shader

edited November 2016 in GLSL / Shaders


For an installation, I use a kinect V2 to obtain a deep map of a space. I need to calculate some blob centroid from that deep map. I try with BlobDetection, blobscanner or openCV libraries and it was very slow, not usable. At the moment the best solution is to send 2 preprocessed depth image to Isadora via Syphon, use 2 Eyes++ actors in Isadora (blob detector actors) and send the result via OSC to processing to finally use fragment shader to process the final image.

It's complicated but it works at 30 f/s in processing and Isadora with very acceptable lag.

I search a way to do the blob decoding in GLSL shader via processing.

Is any one with an idea how to do that?

Thank you in advance. Jacques



  • I found this at shadertoy :

    This may help you

  • edited January 2018

    I have no idea of BlobDetection aurelian24 seems more familiar with the topic.

    If you have a specific question write an MCVE

    This may help you too

    Look also at the source code, the answer is somewhere out their

  • I programmed a glsl blobscanner in 2015 but never released it. I can dig it up and release it. It might need some patching up. It looks really nice, crazy colors :D It still need to use loadPixels() which is the biggest problem cause sending data over the bus is slow. The good thing is that once the pixels are loaded it can process the pixels crazy fast cause it can skip a lot of pixels.

    Before I release it I want to reprogram it cause I learned a lot the last 3 years and i'm not happy with some of the things in it.

    I also worked on a CPU blobscanner that is a crazy lot faster then the other libraries for processing. I'm nearly done but I wanted to remake it so it knows when something is an inner contour so you can use processing's beginContour and endContour with it.

    How fast do you need it? Maybe I can find some time this week. Else it will be after the 21th of Januari.

    Also did you consider making a thread for the blobscan?

Sign In or Register to comment.