Click here to Skip to main content
13,045,566 members (70,388 online)
Rate this:
Please Sign up or sign in to vote.
Hello all,
I'm working on a project to move the mouse cursor using the fingertip which is tracked by kinect using Depth Image. I'm albe to do the tracking but the problem is in moving the mouse in a smooth way. In my program, when I move the mouse it doesn't move in a smooth way , but instead it just jumps from pixel to pixel. My question is , Is there a way to use something like the smooth parameters of the skeletal tracking inorder to smooth my cursor's movement ?
Posted 4-Jun-12 5:23am
Updated 5-Jun-12 21:35pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 23 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100