TUIO client
Posted: 17 July 2008 05:32 AM   [ Ignore ]
Rank
Joined  2008-07-17
Total Posts:  4
New Member

Hi,
I am building an FTIR display. All of the image processing is performed in the IP camera which I am using. I have written the source code in C. The only problem that I have now is that I cant make a working TUIO client to send the information about the detected blobs.
The packet of messages which I send is a bundle which contains time stamp (it is always equal to 1 in order to process the message immediately), set messages for every detected blob, then alive message with as many arguments as the count of blobs and the arguments themselves are the ids of the blobs and the final message is fseq and its argument increases by one every next bundle.

This is a packet which i have created:

#  23|b  62|u  75|n  6e|d  64|l  6c|e  65|    0|
    0|    0|    0|    0|    0|    0|    01|
    
0|    0|    0|,  2c|/  2f|t  74|u  75|i  69|
o  6f|/  2f|2  32|D  44|c  63|u  75|r  72|    0|
,  
2c|s  73|i  69|f  66|f  66|f  66|f  66|    0|
s  73|e  65|t  74|    0|    0|    0|    0|    0|
>  
3e|¾  be|£  a3|g  67|>  3e|€  80|    0|    0|
?  
3f|€  80|    0|    0|?  3f|€  80|    0|    0|
    
0|    0|    0|,  2c|/  2f|t  74|u  75|i  69|
o  6f|/  2f|2  32|D  44|c  63|u  75|r  72|    0|
,  
2c|s  73|i  69|f  66|f  66|f  66|f  66|    0|
s  73|e  65|t  74|    0|    0|    0|    01|
>  
3e|ª  aa|6  36|x  78|>  3e|   a0|    0|    0|
?  
3f|€  80|    0|    0|?  3f|€  80|    0|    0|
    
0|    0|    0|,  2c|/  2f|t  74|u  75|i  69|
o  6f|/  2f|2  32|D  44|c  63|u  75|r  72|    0|
,  
2c|s  73|i  69|f  66|f  66|f  66|f  66|    0|
s  73|e  65|t  74|    0|    0|    0|    02|
?  
3f2|  b9|1  31|>  3e|¦  a6|f  66|f  66|
?  
3f80|    0|    0|?  3f|€  80|    0|    0|
    
0|    0|    0|,  2c|/  2f|t  74|u  75|i  69|
o  6f|/  2f|2  32|D  44|c  63|u  75|r  72|    0|
,  
2c|s  73|i  69|f  66|f  66|f  66|f  66|    0|
s  73|e  65|t  74|    0|    0|    0|    03|
>  
3e|¨  a8|Ù  d9|ß  df|>  3e|¹  b9|™  99|š  9a|
?  
3f|€  80|    0|    0|?  3f|€  80|    0|    0|
    
0|    0|    0|,  2c|/  2f|t  74|u  75|i  69|
o  6f|/  2f|2  32|D  44|c  63|u  75|r  72|    0|
,  
2c|s  73|i  69|f  66|f  66|f  66|f  66|    0|
s  73|e  65|t  74|    0|    0|    0|    04|
>  
3e|·  b7|   d4|m  6d|>  3e|   ea|   aa|«  ab|
?  
3f|€  80|    0|    0|?  3f|   80|    0|    0|
    
0|    0|    0|0  30|/  2f|t  74|u  75|i  69|
o  6f|/  2f|2  32|D  44|c  63|u  75|r  72|    0|
,  
2c|s  73|i  69|i  69|i  69|i  69|i  69|    0|
a  61|l  6c|i  69|v  76|e  65|    0|    0|    0|
    
0|    0|    0|    0|    0|    0|    01|
    
0|    0|    02|    0|    0|    0|    3|
    
0|    0|    04|    0|    0|    0|  1c|
   
2f|t  74|u  75|i  69|   6f|/  2f|2  32|D  44|
c  63|u  75|r  72|    0|,  2c|s  73|i  69|    0|
f  66|s  73|e  65|q  71|    0|    0|    0|    0|
    
0|    0|    0|    0|

and the tuio_demo doesn’t work with it.
I would appreciate any help.
Thanks in advance!

Profile
 
 
Posted: 17 July 2008 11:50 AM   [ Ignore ]   [ # 1 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  314
Sr. Member

Hey,
this sounds exciting, tell us more about your IP camera ...

Regarding your Tuio imlementation, I do not know how to deal with the information you posted.
What are you using (platform, programming language) to implement TUIO on your IP camera?

cheers,
Martin.K

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
Posted: 17 July 2008 12:54 PM   [ Ignore ]   [ # 2 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2294
Moderator

Yeah, I think we’d all be interested in knowing about your IP camera and what the above information means.

 Signature 

Follow me on:
My Website - Youtube - Twitter - Linkedin

Profile
 
 
Posted: 17 July 2008 03:51 PM   [ Ignore ]   [ # 3 ]
Rank
Joined  2008-07-17
Total Posts:  4
New Member

The IP camera has a blackfin processor, which runs at 600MHz under uClinux, 32MB SDRAM and 2 megapixels photosensor.The source which I have written for the image filtration, blob detection and tracking is in plane C and runs on the camera. The only thing which has left is the TUIO implementation. I was impatient and wrote down small C# program that reads the data over the UDP port and displays circles at the blobs’ coordinates. So the UDP communication works, too. Just the TUIO is a bit of a probem. I want to write it in C (this is not a problem as far as I have enough info). The info which I have posted represents an OSC bundle. Every byte is represented by its corresponding char, then space and then its value in hex and then it is separeted from the following by |.
model: char hexValue|
example: 35 is represented by # 23|
This formatting is just for better visualisaation, i send just the bytes over the UDP smile If there are any other questions feel free to ask smile

Profile
 
 
Posted: 17 July 2008 05:11 PM   [ Ignore ]   [ # 4 ]
Rank
Joined  2007-07-10
Total Posts:  35
New Member

Please tell us the manufacturer and reference of your camera. I’m very interested.

Profile
 
 
Posted: 18 July 2008 01:05 AM   [ Ignore ]   [ # 5 ]
Rank
Joined  2008-07-17
Total Posts:  4
New Member

The camera is designed by the company that I work for PIXEYE and is due to be on the market in the early autumn.
I am glad to see that you are interested in my display, but can anyone help me with the TUIO problem ?

Profile
 
 
Posted: 18 July 2008 02:27 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2007-10-06
Total Posts:  55
New Member

Hi, this is a code i wrote to see how it works, so it’s not really what would had been done to do that but it may help you.
Assuming liste_alive[] is an array with your blobs at a time :
(I’m using http://liblo.sourceforge.net/ here)

void remove_alive(int s_id){
liste_alive[s_id] 
0
}

void add_alive
(int s_id){
liste_alive[s_id] 
1
}

void add_CurSet
(long s_idfloat xfloat yfloat Xfloat Yfloat m){
  
//Set
  
lo_message set lo_message_new();
  
lo_message_add_string(set,"set");
  
lo_message_add_int32(set,s_id);
  
//printf("x : %f y: %f\n", x,y);
  
lo_message_add_float(set,x);
  
lo_message_add_float(set,y);
  
lo_message_add_float(set,X);
  
lo_message_add_float(set,Y);
  
lo_message_add_float(set,m);
  
lo_bundle_add_message(bundle_cur"/tuio/2Dcur"set);
}

void add_CurFseq
(){
  
//Sequence Number for the bundle
  
lo_message seq lo_message_new();
  
lo_message_add_string(seq"fseq");
  
lo_message_add_int32(seqfseq);
  
lo_bundle_add_message(bundle_cur"/tuio/2Dcur"seq); 
}

void envoie
(){
  lo_message msg_alive 
lo_message_new();
  
lo_message_add_string(msg_alive,"alive");
  
int g;
//I had four blolbs max
  
for(04g++){
    
if(liste_alive[g]==1)
        
lo_message_add_int32(msg_alive,g);
  
}
  lo_bundle_add_message
(bundle_cur"/tuio/2Dcur"msg_alive);
    
  
//On envoie le bundle et on ajoute 1 au numero de sequence.
  
add_CurFseq();
  
lo_send_bundle(addrbundle_cur);
    
//---------------------    
    //écrase.
    
bundle_cur lo_bundle_new(LO_TT_IMMEDIATE);  
    
fseq ++;
}

//For each blob
if(!present){
    remove_alive
(i);
}
else{
    add_alive
(i);
    
add_CurSet(i,wiiir[i][0],wiiir[i][1]0.00.00.0);    
}

This is really basic but i remember all TUIO listeners worked with that. (A few seconds indeed :D)
my 2cents.

Profile
 
 
Posted: 22 July 2008 09:53 AM   [ Ignore ]   [ # 7 ]
Rank
Joined  2008-07-22
Total Posts:  4
New Member

on the reactable website are some code examples how to create and receive TUIO packets. In your case you should get the tuio simulator (it’s java, but you should be able to figuere out how it works wink

Profile
 
 
Posted: 23 July 2008 09:50 AM   [ Ignore ]   [ # 8 ]
Rank
Joined  2008-07-21
Total Posts:  21
New Member

According to the TUIO spec at http://reactable.iua.upf.edu/?tuio, the /tuio/2Dcur set message takes and int and 5 floats:
/tuio/2Dcur set s x y X Y m
Yours is giving an int and 4 floats:
/tuio/2Dcur set s x y X Y

The fifth float (m) represents the acceleration. I’m not sure, but tuio_demo may require it in order to function properly.

Profile