Drawing on an image using the gaze Coordinates

Forum for development in the Java programming language.

Drawing on an image using the gaze Coordinates

Postby pbawa1509 » 05 Nov 2016, 17:19

Hi,

I was trying to draw the fixations on the image with a "X" to see the accuracy and the jitter but i was wondering how can I convert the gaze coordinates into the coordinates that java uses to draw? Or am I mistaken and they both are essentially the same?
I am trying something like
g.drawString("x", 409, 74);
These are one of the fixations I got but it doesnt seem to draw on the image.
Would be grateful if someone could point me in the right direction.

Thanks
pbawa1509
 
Posts: 4
Joined: 16 Jul 2016, 20:05

Re: Drawing on an image using the gaze Coordinates

Postby Anders » 07 Nov 2016, 10:13

I was trying to draw the fixations on the image with a "X" to see the accuracy and the jitter but i was wondering how can I convert the gaze coordinates into the coordinates that java uses to draw? Or am I mistaken and they both are essentially the same?
I am trying something like
g.drawString("x", 409, 74);


The EyeTribe API gives you screen coordinates in pixels. This is explained in detail in the API. Sounds like you are having trouble using the Java graphics system. You have not shared what Java libraries you are using, so I can't give you any package specific advice. Note that Java offers several presentation layers.

I would advice you to write a test program that draws lines or points in areas defined by hardcoded coordinates in your code. Once that works, then try to incorporate gaze coordinates. You could also start by writing a program that draws using the mouse and then add gaze coordinates afterwards.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23


Return to Java



cron