smoothed gaze coordinates in pix

Forum for development in the C++ programming language.

smoothed gaze coordinates in pix

Postby mingxinbit » 26 Feb 2014, 21:23

I have run this code (provided in the website) and captured the gaze data.

I encounter a problem.

Code: Select all
gtl::Point2D const & smoothedCoordinates = gaze_data.avg;


return values of x and y coordinates always are -107374176.

Others lefteye, righteye, raw, etc are normal.

How to handle?

The smoothed gaze coordinate value is calculated from center value between lefteye.avg and righteye.avg?
gaze_data.avg=(lefteye.avg+righteye.avg)/2??

Thank you.
mingxinbit
 
Posts: 19
Joined: 22 Jan 2014, 05:59

Re: smoothed gaze coordinates in pix

Postby MastaLomaster » 05 Mar 2014, 15:07

The same for me.

In debugger (MSVS 10) I have the gaze_data.avg values constantly the same ( -1.0737418e+008), while the other members of gaze_data are changing.
MastaLomaster
 
Posts: 37
Joined: 03 Mar 2014, 16:35

Re: smoothed gaze coordinates in pix

Postby Martin » 05 Mar 2014, 17:36

We're looking into this right now. Will get back to you once we've located the bug and have a solution. Won't take long.
Martin
 
Posts: 567
Joined: 29 Oct 2013, 15:20

Re: smoothed gaze coordinates in pix

Postby Martin » 05 Mar 2014, 18:04

Turns out there is a small typo in the C++ client parsing.

Row 125 in gazeapi_parser.cpp should be:

Code: Select all
parse_point2d(gaze_data.avg, frame->get_child("avg"));


Github repository to be updated with changes soon.
Martin
 
Posts: 567
Joined: 29 Oct 2013, 15:20

Re: smoothed gaze coordinates in pix

Postby ryklin » 18 Dec 2014, 04:57

A small discrepancy has come to my attention regarding smoothed versus raw gaze data:

if averaging you have two variables:
gazedata_avg.x
gazedata_avg.y

But with raw data:

gazedata.lefteye.raw.x
gazedata.lefteye.raw.y
gazedata.rifghteye.raw.x
gazedata.rifghteye.raw.y

So, when averaging, we can not distinguished between left and right eye data. It might be useful to update the SDK to give us:
gazedata.lefteye.avg.x
gazedata.lefteye.avg.y
gazedata.rifghteye.avg.x
gazedata.rifghteye.avg.y

This would be useful for application that need to use just one eye.
ryklin
 
Posts: 65
Joined: 08 Apr 2014, 19:02

Re: smoothed gaze coordinates in pix

Postby Martin » 18 Dec 2014, 13:15

You have the average for each eye inside the left/right JSON object. Will check the C++ SDK.

Code: Select all
"frame":
{   
   "timestamp": "2014-12-18 11:58:53.730" 
   "state": 7,   
   "fix": false,
   "time": 487384226, 
   "raw": {"x": 584.057,"y": 440.2673 },
   "avg": {"x": 584.057,"y": 440.2673 },   
   "lefteye":
   {
      "avg": {  "x": 583.9083,  "y": 458.1152},
      "pcenter": {  "x": 0.3541,  "y": 0.532},
      "psize": 22.211,
      "raw": {"x": 583.9083, "y": 458.1152}
   },
      "righteye":
   {
      "avg": {  "x": 584.2057,  "y": 422.4195},
      "pcenter": {  "x": 0.5084,  "y": 0.504},
      "psize": 22.7543,"raw": {  "x": 584.2057,  "y": 422.4195}   
      },     
}
Martin
 
Posts: 567
Joined: 29 Oct 2013, 15:20


Return to C++



cron