Hi folks 👋

I know there's feature requests for blob-tracker, ala https://vuo.org/node/2135

However, pending that—I'm working on something where I want to find the first non-transparent pixels in the top left. I need to export the .app, so connecting some other tools is a no-go for this particular question. Basically a cheap 'blob tracker'. 😃

A shader would be a nice efficient way to do this, but I can't work out how I'd get the 2D coordinates out of the shader

Another approach might be to somehow use the Resize Image node with Proportional mode, but I'm yet to find a way to make this work.

Any ideas/strategies would be really appreciated! 💡

Comments

I Forget tu e ce on iCal way

useful design's picture
Submitted by

I Forget if there’s a canonical way to get a 2D value out of a shader but couldn’t you export an image of 1x 1 pixels and code the Red and Green values to be X and Y oair?

Or export an image of X,Y dimensions so that the bottom right pixel in image is your target pixel?

In QC we had the OpenCL node and another one for image processing and tracking blobs for computation on the GPU. Maybe there’s something open source that can be written in C to be co-opted here?

Thanks Jean Marie. I figured

keithlang's picture
Submitted by

Thanks Jean Marie. I figured out it was just trying to describe how it was cropping, not doing anything that had awareness of opacity values 🙂 I am working on some other approaches. **Sample Color from Image ** is what I'm using at the moment, but it would be great to know what makes that patch run under the hood. ie—how is it getting a single value from many pixels.

Thanks Jean Marie. I didn't

keithlang's picture
Submitted by

Thanks Jean Marie. I didn't realize it's all Open Source. Very, very cool. I might just have to write some C.

Thanks also Alastair. I did build something like this in my first pass—made a gradient with blue on x, red on y axis. It would be perfect for blobs, but I'm hoping for the top left corner for my particular need. Since I'm looking at basically a stroked shape, created by frame diffs, this also is a little wonky. I'm working on using an iterative divide-and-conquer approach to get some efficiency, rather than simply scanning every pixel.

Basic blob tracking of sorts could be terribly handy for many people I assume. If I come up with anything generically useful I will try to share.