TSPS or opencv+osc how to

i am a beginner in openframeworks
but i am creating a project where i need to track deferents things at the same time , and send the positions (and other data) to vvvv

for now ,i have been able to decode osc from the addon oscSenderExample in vvvv ;
then i have been able to receive osc from TSPS , here is the vvvv forum page if you are interested in downloading the .v4p file

the problem i got with TSPS is that it is sending only one blob trough osc + i can choose what webcam to run + i cant compile it
the first time it worked like it was building , now i got this error

WARNING: Can't read file's timestamp: C:\Program Files\CodeBlocks\of_preRelease_v0061_win_cb_FAT\addons\ofxFileDialog\src\ofxFileDialog.cpp  
Linking executable: bin\openTSPS.exe  
mingw32-g++.exe: obj\release\addons\ofxFileDialog\src\ofxFileDialog.o: No such file or directory  
Process terminated with status 1 (0 minutes, 0 seconds)  
0 errors, 0 warnings  

the other solution is learning opencv and oscsend addons then copy the source from TSPS for the blob cleaning interface

what will the easiest knowing i am beginner ?



i think TSPS will most likely be the easiest way to set this up quickly. sorry that you are having errors compiling! can you try downloading a fresh copy of the source and re-compiling? you could also try downloading the binary instead of compiling it yourself.

TSPS is set up to send a large number of blobs, so if you are only getting one blob it is most likely because of your settings. have you tried tweaking the minimum and maximum sizes of the blob thresholding? that is most likely the cause. also, try changing whether or not you are finding holes in the blobs. (all of these are sliders or checkboxes in the gui).

hope that helps!

to robotconscience

yes i have been using the TSPS binary , but i can t choose my eyeps3 as the video input so that s my main problem

are you sure TSPS is sending all the blob data?
i can get only the number one

but if you re sure , i m on my way to work more on it

i ll post my results


i am sorry
you made it , am i right ?

if so , could you give me the address to decode the others blobs ?

and i don t know why the win binary version is sending the osc with this osc address


but in the processing exemple ; you put on the comment that the address was /TSPS/person/0

and it is not working

, plus the processing example has a wrong port number :
12000 insted of 1200

my apologies on the discrepancies in the processing example. the comments in the library are inaccurate…
The messages are event based; so, to track each time something enters the field of view, listen for “TSPS/personEntered/”; to listen for objects as they move (which is I think what you’re going to want), listen for “TSPS/personMoved/”. Did you see the parameters in the src? The OSC message is structured like this:

0 - int - blob ID
1 - int - blob age
2 - float - blob center x
3 - float - blob center y
4 - float - blob velocity x
5 - float - blob velocity y
6 - float - blob bounding rectangle x (e.g. the top left corner of the blob)
7 - float - blob bounding rectangle y
8 - float - blob bounding rectangle width
9 - float - blob bounding rectangle height
10 - float - average optical flow at center x
11 - float - average optical flow at center y

if you are sending contours, the rest of the osc message is filled with contour
arguments, starting at message[12] + message[13] and continuing until the end

12 - float - contour[0] x
13 - float - contour[0] y

hope that helps! basically, what we’ve done in the examples is a process like this:

1 - create an array to put TSPSPerson objects in
2 - listen for “TSPS/personEntered/” to add a new object to the array

  • keep track of the blob ID, x and y, etc
    3 - listen for "TSPS/personMoved/ to update your objects
  • look them up in the array via their IDs
    4 - listen for “TSPS/personWillLeave/” to delete objects from the array

edit: you can change the OSC host + port if you’re having troubles. these variables are in the “communication” tab. here, you must set the IP address to the IP of whatever computer you’re sending to (or to localhost if the apps are on the same computer), and the OSC port to whatever port your TSPS catcher is on.

Thanks Brett

i am going to update the vvvv file with what s in the osc message for TSPS/personMoved/ address
it is not finished yet because i don t know how to go further with the TSPS/personEntered/ and TSPS/personWillLeave/

can i link your answer in the vvvv forum for getting more help ?

for now , i can get the vvvv oscdecode node to decode only one blob data

if vvvv community can make a file with all blobs data , i will link it , and you could put it on the TSPS s web site if you d like

i wanted to ask you if you could recompile TSPS with



it would help so much , thanks

just if you are interested in the current state of the vvvv patch i uploaded a screenshot

i can upload the file if you need me to .


![](http://forum.openframeworks.cc/uploads/default/812/tsps vvvv.jpg)

here you go:


hope that works for you! go ahead and post the info to vvvv. i don’t have any experience with vvvv, so sorry I can’t be of direct assistance with that aspect.

thank you Brett !!
you can t imagine how helpfull this is

i am still working on the vvvv patch though

the thing is in vvvv
we can put many OSCdecoders but only one address at the time , everything come in a spread (a little like packing data in max msp) (as long that i am not really an expert please consider that i might be wrong)

it seamed that i couldn’t get any data from
TSPS/personEntered/ and TSPS/personWillLeave

i am going to try again

and i am still working on a tread with Joreg on vvvv forum to get all the help

thanks again for the recompiled bin , you re a life savior !

Brett , the final vvvv help file is almost finished

i am waiting for the final correction from Joreg

can you check the credits and tell me if you agree with what s wrote ?



Hi Brett
here is the final file


you can upload it to TSPS’s website (if you need a link to vvvv website , you ll have to wait untill it gona be posted on the final page )

and if if you can put vvvv in the list on the TSPS s website:

The basic structure is a server client model with the server sending OSC, TUIO, or TCP info to a client which could be in oF, Processing, Flash, PD, Max, etc. (anything that can listen to OSC).

it would look more vvvv user friendly .

thank you so much for this amazing cross platform software
from now on i really think you opened any software programmer to Body-gesture related installation
and we are all thankful for this
thank you for your time

thank you Lab rockwellgroup
thank you Brett (& thank you robotconscience)

ask me anything you would like to know about the patch


thank you OF.

Glad you were able to put TSPS to use! We’ll plan on setting up a method for selecting a different capture devices, sorry we overlooked that. Thanks for the vvvv patch! How would you like to be credited for it?



hi Brett

i glad i could help for the community

no need for credits
i already put a small line in the bottom right corner of the patch
a little bit like you can see on the last image i uploaded
but i put my website instead

as i wrote , if you need me to change your credits just tell me what to write



final vvvv.org page