smoothing mouse movement

前端 未结 2 999
无人共我
无人共我 2021-01-18 22:43

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 co

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 23:07

    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.

提交回复
热议问题