Problem with finger detection

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with finger detection

rabsafari
Hi,

I'm trying to detect fingers using the hand_interaction package. When I place a callback inside of detect_hands_wskel.cpp and check the hand array (and then the fingers array), it keeps reading zero. Any idea what I'm doing wrong here? This is what the callback looks like:

void handcb(const body_msgs::HandsConstPtr &hands){

      printf(" hands size %d \n ",hands->hands.size());
      if(!hands->hands.size()) return;
      printf(" fingers size %d \n ",hands->hands[0].fingers.size());
         
}

//output: fingers size 0


THANKS!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with finger detection

cricfactor
Hi, I am having the same problem.  Were you able to fix the problem?  Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with finger detection

i4110017
Hi everyone,

I still have the same problem with you guys.
Have you fixed this problem yet?

Let me describe my problem again. (I have already post it on answer.ros.org)

Hi there,

I followed the instruction on finger detection HERE. For my experiment, the skeleton tracking and hand detection did work well, but I had problems on finger detection.

According to this video http://www.youtube.com/watch?v=haCyDo7y3BE. The result suppose to be like in the vdo, but not for me.

 

I have already looked through the code and found that on ~/kinect_demos/mit-ros-pkg/kinect_utils/hand_interaction/src/analyze_hands.cpp which is my clusters is always 0.

Here is a piece of my console.


dist:  0.710981  palm: 124  digits: 0 219.509
got hand 0.06, -0.116754, 0.684308 open
dist:  0.701354  palm: 115  digits: 5 224.323
clusters: 0
got hand 0.06, -0.115469, 0.660131 open
dist:  0.684888  palm: 120  digits: 5 232.556
clusters: 0
got hand 0.06, -0.117159, 0.642459 open
dist:  0.671496  palm: 128  digits: 48 239.252
clusters: 0
got hand 0.06, -0.117360, 0.636094 open
dist:  0.648688  palm: 118  digits: 0 250.656
got hand 0.06, -0.119665, 0.617218 open

I stuck on what's wrong with my configuration? Can anyone point me out of this problem?

Thanks in advance.

Mintra.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with finger detection

se7oluti0n
I have had the same problem before but I have solved it by edit some value in this piece of code :


in function void radiusFilter(int nnthresh, double tol) of analyze_hands.cpp :

  for(uint i=0;i<full.points.size();++i){
        if(inds2[i]==0) continue;
          sc2.NNN(full.points[i],searchinds,tol);
          //TODO: this is good for face-on, but not great for tilted hands
         if(searchinds.size()>(530-500*distfromsensor)){
             inds.push_back(i);

           if(searchinds.size()>(570-500*distfromsensor))
                label=0;
             else
                label=1;
             for(uint j=0;j<searchinds.size();++j)
                inds2[searchinds[j]]=label;
          }

       }

this functions will separate palm and digits by look at each point of the hand point cloud, If number of points around that point ( within radius tol</b> ( 2nd parameters )) is bigger than (530-500*distfromsensor), this point will belong to palm and vice versa.
 
replace 530 and 570 with your value ( may be the size of the cluster depends on people ) or edit radius tol
my case is 830 and 870 and it worked.


Hope that helps..
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with finger detection

i4110017
se7oluti0n wrote
.........
 
replace 530 and 570 with your value ( may be the size of the cluster depends on people ) or edit radius tol
my case is 830 and 870 and it worked.


Hope that helps..

It does work for me as well.
Thanks you so much for your help, se7oluti0n!

Cheers,
Mintra.
Loading...