Mouse movement smoothing

I am developing software to move the mouse based on the specific coordinates that I get from the depth image from kinect. but I have 30 frames per second (images / second), and these coordinates change with each frame, so the mouse continues to move. My question is: is there a way to smooth out mouse movement?

+5
source share
2 answers

Yes, you can start tracking with some parameters that will make the movement smoother.
The following is sample 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 the Smoothing, Correction, Prediction, JitterRadiusand MaxDeviationRadiusto any number you want.

+5
source

" " , DepthImageFrame MapToSkeletonPoint(), X Y , SkeletonPoint. :

 SkeletonPoint point = depthFrame.MapToSkeletonPoint(x, y);

, !

+3

All Articles