Page 1 of 1

Strane gaze points on different screen

PostPosted: 11 Mar 2016, 11:15
by venom1988
Dear all,
I recently develop a little and simple WPF application with a Canvas and an Ellipse. Basically I want move the ellipse in function of the gaze points (x;y). This is my code:

Code: Select all
public void OnGazeUpdate(GazeData gazeData)
        {
            if (GazeManager.Instance.IsCalibrated)
            {
               

                double gXs =gazeData.SmoothedCoordinates.X;
                double gYs =gazeData.SmoothedCoordinates.Y;
                Dispatcher.Invoke(() =>
                {
                    Canvas.SetLeft(ellisse, gXs);
                    Canvas.SetTop(ellisse, gYs); ;
                });
            }
        }


On my PC this code work fine and I have very good Gaze Point driving the ellipse. (display resolution 1280 x 1024). When I install my app on another PC with better screen resolution (I think 4K ) the gaze points (and the ellipse) are not good, the position of the ellipse is drastically different from the point that the user is watching.

What is the problem? Is the display resolution?

Thank you.

Re: Strane gaze points on different screen

PostPosted: 12 Mar 2016, 02:16
by Martin
Sounds like a DPI scaling issue. I use it on my 4K display to make text on icons readable which otherwise are way too small.

Try multiplying coordinates of the ellipse position with DPI scale factor. We have some code for accessing DPI on Github.