Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,
I'm working on a project to move the mouse cursor using righthand which is tracked by kinect using Depth Image. I am controlling mouse movement from right hand palm joint. I'm able to do the tracking but when i am keeping the hand stationary the mouse jumps from one place to another. as joints is visible continus it is visible in discreate, so mouse is jumping, Is there a way to use something like the smooth parameters of the skeletal tracking inorder to smooth my cursor's stability ?


i this solution in some article but don't know how to do this.

You could use the skeletal smoothing, and that should help a bit. The best way I've found is with a moving average of your desired target (in your case, the mouse location). So instead of simply moving the cursor every time you have a movement in your fingertip point, use a queue to store the last N number of points (anywhere from 5 to 12 seems to work well). You then average the values in the queue, and apply that to your cursor. The next cycle, you will remove the oldest point, and add the new point to the queue, then average again. You just keep repeating this. You can get higher or lower smoothing by adjusting the number of points you keep in your queue.

how should i do this.

thanks!!
Posted

The reason your mouse jumps is that you update the position upon event...So a moment before you mouse was at position X1:Y1 and now you update it to X2:Y2 - in flick of the eye...
What you can do is run a look between X1:Y1 and X2:Y2 and move the mouse with a fraction of the total movement in every iteration...
 
Share this answer
 
sorry i didnt get you. how can i run a look between X1:Y1 and X2:Y2 and move the mouse with a fraction of the total movement in every iteration.

is there any sample code available.

thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900