Following tracked objects (n>1)

First of all, hi to all, i’m new here.

So, sitting on a project, i think about realising a tracked object (human in front of a cam). Is there any patch or idea how to follow a human as long as he is on cam? as by now i did a simple motionrecognition/tracking with contour/trautner - thats simple, but how would you give them an unique id - as long as they are seen?

regards and thx for all your help (if :))

try DetectObject (Freeframe)

if you are talking about humans…

thx for the first hints, i’ll try DetectObject tomorrow.

i think, i hadnt explained well. its just about to follow a human in front of a cam - trautner/contour will find some data - if he stands still, nothing will happen (and i patchcode, ‘wait for movement and then follow’) - But what about two people or more? How to say vvvv, this is human with ID0, that one with ID1 etc… I dont need any skeleton-recognition…

tomorrow i’ll upload my example-patch

regards chmee

chmee the last kinect plugin by hierro can just show different colors on each person under the camera, so it should be pretty easy and reliable to track them with color tracker. the primesense software will also handle temporary disappearings of the person, keeping the track as soon as he comes back. this should get you an idea

sapo (& hierro), thanks, its lookin’ awesome, but i can’t work with kinect. i have to track with webcams (and more than one). furthermore i think, the plugin won’t work with simple webcams, because of the z-depth its using, right?

here’s the simple tracking with a smoothing (EXPR+FRAMEDELAY) of movement (maybe theres a better way?). Now picture yourself, i want to track and hold more than one person…

simple tracking of a 16:9 webcam (31.3 kB)

ok ok - my smoothening is working but why if theres a Damper (Animation). finally :

if using contour as main tracker i get a lot of blobs/contours. some are near each other, other contours describe another “object” with more than one ‘blob’. now i try to merge contours (their positions) depending on its distances.

(1) try to do it mathematical way - sorting by area and distance - i think more accurate, but i dont know by now, how to realise (in vvvv :))
(2) easing the videosource by blurring massively and/or setting down the resolution - less accurate because of some accidently blips/streaks.

regards chmee

Hi Chmee
Attached patches could be helpful…

However let me know when you’ll find a solution.
I faced on the same problem and I solved with the colorized OpenNi technique with kinect.


Grouping (8.1 kB)

Your Group(2d) is party. thx. i’ll try with this and after success i will post the patch.

regards chmee

ok, Sample&Hold behaves now a little bit strange, because of NIL.
but i will figure it out :D

p.p.s.: found the thread with the discussion, where group(2d) was made by kalle, thx!

Hey, here’s the first try in c#. For now it’s just like Group(2d) BUT someone with knowledge could help. Why do i get only one Slice in the outputnodes? I expected to get all slices with >MinPTS… (see inside)

Connect the X and Y nodes of Contour to the Inputs, and check the outputs via IOBoxes. (Sorry, i tried to do this help-patch, but i have to learn a lot :D)

regards and thx for all help.

Group SH v0.3 alpha (14.2 kB)

ok, its my first time i code something for vvvv. please be gentle in criticising. all hints are welcome…

video here -
code later…

regards chmee

Hi Chmee,
I’m sorry I can’t help you, I’m not so skilled in vvvv.
I found the Group(2d) patch in a folder on my hd where I put all the stuff useful to treat contour data, but never tried to integrate.

I forgot was made by kalle (I’ll put this in the module\kalle dir)

If you want some feedback from advanced user I suggest you to share the code.

If you have a working beta version you could add it to the Contribution.

PS: This post will put this thread to the top of the list.
VVVVpros, Please take into consideration


ok, now here the v0.6 - its not that bad, but there are some more things to do.

(1) Indexing of the points, so you can identify really one trackpoint.
(2) under some circumstances it throws index-exceptions for the lists - have to hunt it down :D

(3) i built the help patch from kalles group(2d)-help… sorry.

Contribution, if the first two things will be solved. All hints, tipps and ideas are highly appreciated.


regards chmee

plugin - Group_SH v0.6 (zip) (6.3 kB)

hi chmee, i’m triyng your group_sh, and really love the idea. tried in a real situation and seems vvvveryuseful. for me is ready for the contributions ;))) anyway hope the 2 things will be resolved too :D

@robe: Give me some practical info on solving with kinect. Is that so easy as it looks on youtubevideos? Do you’ve got some experiences on using more than one kinect?

@screamer: Things are solved, it seems, its working now fine - but in my case its not that robust and insensitive i hoped. i think, i’ll try a well known algorithm as DBSCAN. but ->

Tomorrow i’ll put Group_SH v0.8 into contribution (And i’ll find a better name because of

How do i set a picture for a contribution?

regards chmee

I stay in this Thread with this question, because its directly depending on the problem itself…

If I got more than one tracking Point, it happends (logically) if the tracking point (slice 1) from the spread get lost, the rest of slices will go up…

3 human tracked [ x, y ]( x, y )
(1) -0.55, 0
(2) 0.45, 0
(3) 0.9, 0

Tracking point (1) “dies”, the slices will wander up.
(1) 0.45, 0
(2) 0.9, 0

Logically the jointed quads will make a strange jump. In fact quad3 dies and the 2 living quads will jump to the positions of slice (1) and (2)

How would you solve this?

regards chmee

solved it by extending Cluster-Plugin (v1.1 comes next hours :D)

Its named Reset-Mode

Reset Mode = 0
A Point will disappear from Spreadlist after life-count has dropped to 0

Reset-Mode = 1
Whole Spreadlist will be erased after (life)last point has dropped to 0

ToDo For v1.2:

Reset-Mode = 2
Spreadlist-Size will be changeable fix, and new points replace the died-one

regards chmee

Hi Chmee,

I uploaded a patch where you can extract contours by it ID. Even if one shape is out of range you’ll recognize and turn it off to remove a double.
Its taking the IDs of Contournode (where unique ID should be switched on), sort this Ids and take the sort order to reorder bins, xy, and ID. In the end you can choose which ID you want to see by geslice and getspead nodes.
It wont work with overlapping shapes as they will merge into one ID. And later a new ID pops up.

ContourSeparateByID.v4p (46.9 kB)