overlapping blobs with opencv
in
Contributed Library Questions
•
1 year ago
hi, I'm trying to do blob tracking using multiple kinects. it runs fine. I draw images from each Kinect side by side, I applied opencv.threshold() on each, and everything's fine.
however, I figured that when I do blob detection, the blobs are overlapped on the image from the first Kinect. it seems that the blobs are drawn only in (0,0) coordinate. whereas, I want the blobs to be drawn for each images. is there any way to solve this?
here's the snippet of the code that I use
- for (int i = 0; i < device_count; i++) {
- assignPixels( depth_frame_[i], kinect_depth_[i]);
- opencv[i].copy(depth_frame_[i]);
- opencv[i].threshold(100);
- image (opencv[i].image(), 640*i, 0); //no problem up to this point
- Blob[] blobs = opencv[i].blobs(10, width*height/2, 100, true);
- fill (240, 0, 0);
- for (int k = 0; k < blobs.length; k++) {
- beginShape();
- for (int l = 0; l < blobs[k].points.length; l++) {
- vertex (blobs[k].points[l].x, blobs[k].points[l].y);
- }
- endShape(CLOSE);
- }
- }
Cheers,
1