Forums > Jitter

OpenCV, cv.jit.features, what now?

April 14, 2009 | 12:59 am

Hi all.

I’m checking out OpenCV for a motion-capture program. I can see in features.draw that I’m getting the detection I want, but what I can’t figure out is, well, now what? I know cv.jit.features outputs as a 2-plane, single row, float32 matrix, which obviously I can jit.iter or whatever. But what I want to do is, in essence, use the detected coordinates, or just the outside border of the shape, as a selection, where I can take that chunk of the image and wrest enough control to manipulate it separate from the rest. Any ideas?

Also, I’ll take any pointers in re: any part of the patch below, for instance if you know a better or different way to simply separate the moving object being detected and the (generally static) background. I’m still new and learning.

– Pasted Max Patch, click to expand. –

April 14, 2009 | 12:40 pm

hi Garbageman14,

below is a patch which does a very simple background substraction which is the most used way to separate a moving object and a static background, I am not sure you still need to do frame substraction

if you want to take the bounding box of the silhouette check, i am not sure that features detection is the best way, try to extract the silhouette first by removing the background and thresholding the image and you could use cv.jit.blob.bounds to get the bounding box

good luck

best

antoine

– Pasted Max Patch, click to expand. –

April 14, 2009 | 8:12 pm

Thanks for the timely reply! I’m checking out blobs.bounds right now, and I get what it’s doing, but I’m still not sure what to do with the output once I have it, i.e. to use those coords as a bounding box on the video image, so I can, for instance, perform transforms on parts of them (say, just the head).


Viewing 3 posts - 1 through 3 (of 3 total)