Search code examples
rmatlabeye-tracking

Analysis of eye and head motion data obtained from a mobile eye tracker


I want to analyze the head movements data obtained from Pupil invisible mobile eye tracker. The experiment was a free viewing task in which the participants supposed to look at the images projecting on a big wall projection (via beam projector) and they were free to move their eye and head to explore the screen. The output from each experiment is a .csv file with below structure.

The data contains: Timestamps of every single recorded head movement in seconds (frequency) regarding to each trial as well as the horizontal and vertical rotations on the surface I defined (i.e., projected screen). for more clarification: each trial has a duration of 33 seconds and each timestamp (e.g., timestamp 78) has a frequency ranging from 0 to 30 per second.

Types of analysis I would need: To plot the proportion of the head movements on the surface (i.e., how are the head movements distributed on the surface? and to find out if participants looked more toward left, right or the middle of the surface.

My question is: Is there any kind of packages in R or MATLAB which can help me pre-process and analyze such data I have? Or which kinds of analysis I can do with such data?

Any hint or idea would be appreciated!

Thanks! Parishad

timestamp_round TrialNumber rotation_x  rotation_y
       78           1       -2.775360   -0.09515636
       78           1       -2.771998   -0.08347747
       78           1       -2.773954   -0.08524439
       78           1       -2.775184   -0.08556455
       78           1       -2.771402   -0.08559406
       78           1       -2.769031   -0.08830722

Reproducible example code:

structure(list(X = 2205:2210, timestamp_round = c(78L, 78L, 78L, 78L, 78L, 78L), TrialNumber = c(1L, 1L, 1L, 1L, 1L, 1L), rotation_x = c(-2.77536,-2.771998, -2.773954, -2.775184, -2.771402, -2.769031), rotation_y = c(-0.09515636, -0.08347747, -0.08524439, -0.08556455, -0.08559406, -0.08830722)), row.names = c(NA, 6L), class = "data.frame")

Solution

  • No there is no specific package as far as i know.

    • To plot the proportion of the head movements on the surface: https://www.r-graph-gallery.com/79-levelplot-with-ggplot2.html

    • To find out if participants looked more toward left, right or the middle of the surface: This should be quite simple if you define what's "the center" etc. While there might be more involved methods to do it i would suggest:

    df$direction_x <- ifelse(df$rotation_x > 0, "right", "left")
    df$direction_y <- ifelse(df$rotation_y > 0, "up", "down")
    table(df$direction_x,df$direction_y)
    

    Did you define saccades vs fixations you probably have to filter for that.