Question

So in openFrameworks (and I am new to it), using ofxOpenCV, I am trying to track blobs (done) and use the information as a mask, to fill each blob with a different image/video (not done). Looking through the documentation for ofxCVContourFinder, I don't seem to see any methods related to making a mask or filling that blob space. I was wondering, does anyone have any advice on continuing? Does anyone have any advice on how I might be looking at this wrong?(http://www.openframeworks.cc/documentation/ofxOpenCv/ofxCvContourFinder.html#show_blobs)

for (int i = 0; i < contourFinder.nBlobs; i++){
    contourFinder.blobs[i].draw(360,100);
    //some sort of blobs[i].fill();?
}

Thanks!

Was it helpful?

Solution

Getting this together was definitely at the limits of what I am capable of, but I did get it working. First thing is that I used Kyle McDonald's ofxCv addon

With this, I used the (much simpler) contour tracking to get the shapes, created shader fbos for each shape, and assigned videos to those as an alpha mask. I apologize if this isn't in detail, it has been a while and I haven't touched ofxCv since. If you need help with it though, get ahold of me and I'll share what I have.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top