Robotics StackExchange | Archived questions

How can I possibly optimize kinect hand_detection

Hi,

I was wondering if there are some optimizations that might make handdetection faster or publish data at a higher rate. When i run the handdetection demo and look at the publishing rates using "rostopic hz" I get the following:

I added the finger norms for completeness sake as I checked with finger_detection demo as well. However as i expected the first two publishing rates are the same. Thus i think there is a bottleneck in the hand detection.

At first I tried launching required the nodes individual instead of using the launch file, and doing so I figured out that the dynamicreconfigure had no effect. Thereafter I used rosparam to change the depthmode of openni (as was said in another post), but this had no effect.

Next i went on a search in the source code (in particular detecthandswskel.cpp) and stumbled upon a fault in messageSync function. There is an if structure to check the time difference, which should be below 15ms (16ms when considering Nyquist actually) but in the comparison 0.15 is used instead of 0.015. After changing this I figured this was done because otherwise no hand data would be published at all. In the end I just removed the if structure as its influence is very low.

After this I have been trying to comment other parts of the code and adding printf statements for testing purposes, and now I am clueless about what more I can try to increase the publishing rate of hands.

As a side note: I need more data in a short time period as I want to use it for hand gesture recognition.

I hope anyone can help me with this or point me in the right direction. Thanks for taking the time to read this and hopefully type a response.

Asked by Joery on 2012-11-04 05:47:24 UTC

Comments

Answers