View source: R/pipeline-confounds.R
normalize_gaze_coords | R Documentation |
Transforms raw gaze coordinates (in pixels) to normalized coordinates where:
(0,0) represents the center of the screen
Coordinates are scaled to [-1,1] range
Also calculates the normalized distance from screen center
normalize_gaze_coords(pupil_df, screen_width, screen_height)
pupil_df |
A data frame containing raw gaze
coordinates ( |
screen_width |
The screen width in pixels |
screen_height |
The screen height in pixels |
A data frame with added columns:
eye_x_norm
: Normalized x coordinate [-1,1]
eye_y_norm
: Normalized y coordinate [-1,1]
gaze_dist_from_center
: Normalized distance from screen center
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.