Welcome! Log In Create A New Profile

Advanced

Calculate raw eye-tracker input values from the degree data recorded in the bhv2 file

Posted by xiaoxu1107 
Hi, everyone
I have to calculate the raw eye-tracker input values according to the transformed data recorded in the bhv2 file. I haven't found a similar question in this forum. I guess I need to use the parameters (offset and gain) in the MonkeyLogic ISCAN eye tracker panel and a transformed matrix that the 2D eye calibration yield to. But I don't know the specific calculation formula. Thanks in advance!
Re: Calculate raw eye-tracker input values from the degree data recorded in the bhv2 file
September 10, 2023 06:29PM
Update your NIMH ML to the latest version. Then you can calculate the raw voltage values as below.

1. Load data.
[data,MLConfig] = mlread;

2.Initialize the calibration object.
EyeCal = mlcalibrate('eye', MLConfig, 1);  % 'eye' or 'joy'; 1 means Eye#1
If an error occurs, refer to the following link, fill in the missing screen size information and retry.
https://monkeylogic.nimh.nih.gov/board/read.php?3,1078,1081#msg-1081

3. Get raw values.
deg_xy = data(1).AnalogData.Eye;  % Trial 1
raw_xy = EyeCal.deg2sig(deg_xy);

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.