Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

smoothing mouse movement

I'm developing a software to move the mouse based on certain coordinates which i get from a depth image from kinect. but I have 30 frames/second(images/second) and those coordinates changes with every frame so the mouse keeps moving. My question is,Is there a way to smooth the movement of the mouse ?

like image 703
Makram Bg Avatar asked May 25 '12 15:05

Makram Bg


People also ask

How do I make my mouse movement smoother?

To change how the mouse pointer works , and then clicking Control Panel. In the search box, type mouse, and then click Mouse. Click the Pointer Options tab, and then do any of the following: To change the speed at which the mouse pointer moves, under Motion, move the Select a pointer speed slider toward Slow or Fast.

What is smoothing on mouse sensor?

Smoothing happens when a mouse sensor averages out the two captures instead of sharing the latest position, resulting in a more delayed response on-screen to hand movement.


1 Answers

Yes you can start tracking with some parameters that allows you to make move smoother.
Below is an example code:

        var parameters = new TransformSmoothParameters
        {
            Smoothing = 0.2f,
            Correction = 0.0f,
            Prediction = 0.0f,
            JitterRadius = 1.0f,
            MaxDeviationRadius = 0.5f
        };

        this._sensor.SkeletonStream.Enable(parameters);

You can change Smoothing, Correction, Prediction, JitterRadius, and MaxDeviationRadius to whatever numbers you want.

like image 77
Fixus Avatar answered Sep 18 '22 22:09

Fixus