How can I possibly optimize kinect hand_detection [closed]
Hi,
I was wondering if there are some optimizations that might make hand_detection faster or publish data at a higher rate. When i run the hand_detection demo and look at the publishing rates using "rostopic hz" I get the following:
- skeletons -> 30Hz
- hands -> 2.5 - 3Hz
- finger_norms -> 1.7 - 2.5 Hz
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 dynamic_reconfigure had no effect. Thereafter I used rosparam to change the depth_mode 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 detect_hands_wskel.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.