MatMouse: A Mouse Movements Tracking and Analysis Toolbox for Visual Search Experiments
Abstract
:1. Introduction
2. Materials and Methods
2.1. Mouse Movements Tracking
2.2. Movement Metrics Analysis
2.3. Visualizations and Heatmap Ground Truth Generation
2.4. MatMouse Functions
2.5. Case Study Example
2.5.1. Tracking Data Collection
- DemoExpMap1.png
- DemoExpMap2.png
- DemoExpMap3.png
2.5.2. Analysis and Visualization
- calculate the supported mouse movement metrics, e.g.,:[react,len,uniq,lineq,dstat,charea,curv]=calc_metrics(Data_DemoExpMap1);
- produce mouse data visualizations, e.g.,:show_visualizations(Data_DemoExpMap1,‘DemoExpMap1.png’,‘StimulusFig’,‘CoordinatesFig’,‘CurvatureFig’,‘DurationFig’,1,1);
- produce the grayscale heatmap ground truth and related heatmap visualizations, e.g.,:HeatMap=show_heatmap(Data_DemoExpMap1,‘DemoExpMap1.png’,32,6,‘heatmap.png’,‘Heatmap2D’,‘HeatIsolines’,1,1);
- Data.t = [Data_p1(2).t; Data_p2(2).t; Data_p3(2).t];
- Data.x = [Data_p1(2).x; Data_p2(2).x; Data_p3(2).x];
- Data.y = [Data_p1(2).y; Data_p2(2).y; Data_p3(2).y];
3. Results
4. Discussion and Conclusions
Supplementary Materials
Author Contributions
Funding
Conflicts of Interest
References
- Wolfe, J.M. Visual Attention: The Multiple Ways in which History Shapes Selection. Curr. Biol. 2019, 29, R155–R156. [Google Scholar] [CrossRef] [Green Version]
- Mochizuki, I.; Toyoura, M.; Mao, X. Visual attention prediction for images with leading line structure. Vis. Comput. 2018, 34, 1031–1041. [Google Scholar] [CrossRef]
- Krassanakis, V.; Filippakopoulou, V.; Nakos, B. Detection of moving point symbols on cartographic backgrounds. J. Eye Mov. Res. 2016, 9. [Google Scholar] [CrossRef]
- Hu, Z.; Li, S.; Gai, M. Temporal continuity of visual attention for future gaze prediction in immersive virtual reality. Virtual Real. Intell. Hardw. 2020, 2, 142–152. [Google Scholar] [CrossRef]
- Wolfe, J.M.; Horowitz, T.S. Five factors that guide attention in visual search. Nat. Hum. Behav. 2017, 1, 0058. [Google Scholar] [CrossRef]
- Slanzi, G.; Balazs, J.A.; Velásquez, J.D. Combining eye tracking, pupil dilation and EEG analysis for predicting web users click intention. Inf. Fusion 2017, 35, 51–57. [Google Scholar] [CrossRef]
- Kieslich, P.J.; Schoemann, M.; Grage, T.; Hepp, J.; Scherbaum, S. Design factors in mouse-tracking: What makes a difference? Behav. Res. Methods 2020, 52, 317–341. [Google Scholar] [CrossRef] [Green Version]
- Rheem, H.; Verma, V.; Becker, D.V. Use of Mouse-tracking Method to Measure Cognitive Load. Proc. Hum. Factors Ergon. Soc. Annu. Meet. 2018, 62, 1982–1986. [Google Scholar] [CrossRef] [Green Version]
- Yamauchi, T.; Leontyev, A.; Razavi, M. Mouse Tracking Measures Reveal Cognitive Conflicts Better than Response Time and Accuracy Measures. In Proceedings of the CogSci, Montreal, QC, Canada, 24–27 July 2019; pp. 3150–3156. [Google Scholar]
- Stillman, P.E.; Shen, X.; Ferguson, M.J. How Mouse-tracking Can Advance Social Cognitive Theory. Trends Cogn. Sci. 2018, 22, 531–543. [Google Scholar] [CrossRef]
- Hehman, E.; Stolier, R.M.; Freeman, J.B. Advanced mouse-tracking analytic techniques for enhancing psychological science. Gr. Process. Intergr. Relat. 2015, 18, 384–401. [Google Scholar] [CrossRef] [Green Version]
- Maldonado, M.; Dunbar, E.; Chemla, E. Mouse tracking as a window into decision making. Behav. Res. Methods 2019, 51, 1085–1101. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Yamauchi, T.; Leontyev, A.; Razavi, M. Assessing Emotion by Mouse-cursor Tracking: Theoretical and Empirical Rationales. In Proceedings of the 2019 8th International Conference on Affective Computing and Intelligent Interaction (ACII), Cambridge, UK, 3–6 September 2019; pp. 89–95. [Google Scholar]
- Diego-Mas, J.A.; Garzon-Leal, D.; Poveda-Bautista, R.; Alcaide-Marzal, J. User-interfaces layout optimization using eye-tracking, mouse movements and genetic algorithms. Appl. Ergon. 2019, 78, 197–209. [Google Scholar] [CrossRef] [PubMed]
- Chen, Y.; Liu, Y.; Zhang, M.; Ma, S. User Satisfaction Prediction with Mouse Movement Information in Heterogeneous Search Environment. IEEE Trans. Knowl. Data Eng. 2017, 29, 2470–2483. [Google Scholar] [CrossRef]
- Horwitz, R.; Kreuter, F.; Conrad, F. Using Mouse Movements to Predict Web Survey Response Difficulty. Soc. Sci. Comput. Rev. 2017, 35, 388–405. [Google Scholar] [CrossRef]
- Navalpakkam, V.; Churchill, E. Mouse tracking. In Proceedings of the 2012 ACM Annual Conference on Human Factors in Computing Systems—CHI ’12, Austin, TX, USA, 5–10 May 2012; p. 2963. [Google Scholar]
- Souza, K.E.S.; Seruffo, M.C.R.; De Mello, H.D.; Souza, D.D.S.; Vellasco, M.M.B.R. User Experience Evaluation Using Mouse Tracking and Artificial Intelligence. IEEE Access 2019, 7, 96506–96515. [Google Scholar] [CrossRef]
- Freeman, J.B.; Ambady, N. MouseTracker: Software for studying real-time mental processing using a computer mouse-tracking method. Behav. Res. Methods 2010, 42, 226–241. [Google Scholar] [CrossRef] [PubMed]
- Brainard, D.H. The Psychophysics Toolbox. Spat. Vis. 1997, 10, 433–436. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Kieslich, P.J.; Henninger, F. Mousetrap: An integrated, open-source mouse-tracking package. Behav. Res. Methods 2017, 49, 1652–1667. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Mathôt, S.; Schreij, D.; Theeuwes, J. OpenSesame: An open-source, graphical experiment builder for the social sciences. Behav. Res. Methods 2012, 44, 314–324. [Google Scholar] [CrossRef] [Green Version]
- Kieslich, P.J.; Wulff, D.U.; Henninger, F.; Haslbeck, J.M.B.; Schulte-Mecklenbeck, M. Mousetrap: An R package for processing and analyzing mouse-tracking data. Retrieved From 2016. [Google Scholar] [CrossRef]
- Kieslich, P.J.; Henninger, F.; Wulff, D.U.; Haslbeck, J.M.B.; Schulte-Mecklenbeck, M. Mouse-Tracking. In A Handbook of Process Tracing Methods; Routledge: Abingdon, UK, 2019; pp. 111–130. [Google Scholar]
- Mathur, M.B.; Reichling, D.B. Open-source software for mouse-tracking in Qualtrics to measure category competition. Behav. Res. Methods 2019, 51, 1987–1997. [Google Scholar] [CrossRef] [PubMed]
- Tian, G.; Wu, W. A Review of Mouse-Tracking Applications in Economic Studies. J. Econ. Behav. Stud. 2020, 11, 1–9. [Google Scholar] [CrossRef]
- Chen, M.C.; Anderson, J.R.; Sohn, M.H. What can a mouse cursor tell us more? In Proceedings of the CHI ’01 Extended Abstracts on Human Factors in Computing Systems—CHI ’01, Toronto, ON, Canada, 26 April–1 May 2001; p. 281. [Google Scholar]
- Cooke, L. Is the Mouse a “Poor Man’s Eye Tracker”? In Proceedings of the Annual Conference-Society for Technical Communication, Las Vegas, NV, USA, 7–10 May 2006; Volume 53, p. 252. [Google Scholar]
- Johnson, A.; Mulder, B.; Sijbinga, A.; Hulsebos, L. Action as a Window to Perception: Measuring Attention with Mouse Movements. Appl. Cogn. Psychol. 2012, 26, 802–809. [Google Scholar] [CrossRef]
- Guo, Q.; Agichtein, E. Towards predicting web searcher gaze position from mouse movements. In Proceedings of the 28th International Conference Extended Abstracts on Human Factors in Computing Systems—CHI EA ’10, Atlanta, GA, USA, 10–15 April 2010; p. 3601. [Google Scholar]
- Perrin, A.-F.; Krassanakis, V.; Zhang, L.; Ricordel, V.; Perreira Da Silva, M.; Le Meur, O. EyeTrackUAV2: A Large-Scale Binocular Eye-Tracking Dataset for UAV Videos. Drones 2020, 4, 2. [Google Scholar] [CrossRef] [Green Version]
- Wolfe, J.M. Visual attention. In Seeing; Elsevier: Amsterdam, The Netherlands, 2000; pp. 335–386. [Google Scholar]
- Cornelissen, F.W.; Peters, E.M.; Palmer, J. The Eyelink Toolbox: Eye tracking with MATLAB and the Psychophysics Toolbox. Behav. Res. Methods Instrum. Comput. 2002, 34, 613–617. [Google Scholar] [CrossRef] [Green Version]
- Poole, A.; Ball, L.J. Eye Tracking in HCI and Usability Research. In Encyclopedia of Human Computer Interaction; IGI Global: Hershey, PA, USA, 2006; pp. 211–219. [Google Scholar]
- Ooms, K.; Krassanakis, V. Measuring the Spatial Noise of a Low-Cost Eye Tracker to Enhance Fixation Detection. J. Imaging 2018, 4, 96. [Google Scholar] [CrossRef] [Green Version]
- Wass, S.V.; Smith, T.J.; Johnson, M.H. Parsing eye-tracking data of variable quality to provide accurate fixation duration estimates in infants and adults. Behav. Res. Methods 2013, 45, 229–250. [Google Scholar] [CrossRef] [Green Version]
- Schafer, R.W. What is a savitzky-golay filter? IEEE Signal Process. Mag. 2011, 28, 111–117. [Google Scholar] [CrossRef]
- Krassanakis, V.; Filippakopoulou, V.; Nakos, B. EyeMMV toolbox: An eye movement post-analysis tool based on a two-step spatial dispersion threshold for fixation identification. J. Eye Mov. Res. 2014, 7. [Google Scholar] [CrossRef]
- Michaelidou, E.; Filippakopoulou, V.; Nakos, B.; Petropoulou, A. Designing point map symbols: The effect of preattentive attributes of shape. In Proceedings of the 22th International Cartographic Association Conference, Coruña, Spain, 9–16 July 2005. [Google Scholar]
- Krassanakis, V. Exploring the map reading process with eye movement analysis. In Proceedings of the International Workshop on Eye Tracking for Spatial Research, Scarborough, UK, 2 September 2013; pp. 2–5. [Google Scholar]
- Gitelman, D.R. ILAB: A program for postexperimental eye movement analysis. Behav. Res. Methods Instrum. Comput. 2002, 34, 605–612. [Google Scholar] [CrossRef] [Green Version]
- Berger, C.; Winkels, M.; Lischke, A.; Höppner, J. GazeAlyze: A MATLAB toolbox for the analysis of eye movement data. Behav. Res. Methods 2012, 44, 404–419. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Andreu-Perez, J.; Solnais, C.; Sriskandarajah, K. EALab (Eye Activity Lab): A MATLAB Toolbox for Variable Extraction, Multivariate Analysis and Classification of Eye-Movement Data. Neuroinformatics 2016, 14, 51–67. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Krassanakis, V.; Menegaki, M.; Misthos, L.-M. LandRate toolbox: An adaptable tool for eye movement analysis and landscape rating. In Proceedings of the ETH Zurich, Zurich, Switzerland, 26–29 June 2018. [Google Scholar]
- Brunner, C.; Delorme, A.; Makeig, S. Eeglab—An Open Source Matlab Toolbox for Electrophysiological Research. Biomed. Eng. Biomed. Tech. 2013, 58. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Lawhern, V.; Hairston, W.D.; Robbins, K. DETECT: A MATLAB Toolbox for Event Detection and Identification in Time Series, with Applications to Artifact Detection in EEG Signals. PLoS ONE 2013, 8, e62944. [Google Scholar] [CrossRef] [Green Version]
- Krassanakis, V.; Da Silva, M.P.; Ricordel, V. Monitoring Human Visual Behavior during the Observation of Unmanned Aerial Vehicles (UAVs) Videos. Drones 2018, 2, 36. [Google Scholar] [CrossRef] [Green Version]
Function name movement_track Description Captures mouse movement data and provides the recorded mouse movements along with the corresponding time stamps. Syntax A = movement_track(InpImage,ScreenNum,TxtFilename) Input parameters InpImage: The visual stimulus image filename (e.g., “map.jpg”). All the main image file formats are supported. ScreenNum: The monitor where the stimulus image will be shown. A value of 1 uses the current monitor while a value of 2 (or higher) uses the corresponding extended monitor. If omitted, the default value is 1. TxtFilename: Optional parameter that defines a .TXT filename to save the tracked mouse movements. The text file has the following format [Filename] [Number of points] [time_stamp(1) x(1) y(1)] [time_stamp(2) x(2) y(2)] … [time_stamp(n) x(n) y(n)] Output parameters A: An array that contains the tracked mouse movements. Array A is a structure with 3 fields: A.t: time stamps (in seconds) A.x: points x coordinates (in image pixels) A.y: points y coordinates (in image pixels) Comments The origin of the coordinate system is on the top left corner of the input image. Example A = movement_track(‘map.jpg’,1,’data.txt’) In this example, the image “map.jpg” is shown in the current monitor in order to calculate array A that contains the tracked mouse movements of the trajectory. |
Function name movement_track_seq Description Captures mouse movement data in a set of stimuli images. For each image it provides the recorded mouse movements along with the corresponding time stamps. Syntax A = movement_track_seq(ImagesList,ScreenNum,TxtFilename) Input parameters ImagesList: A text file containing the filenames of the stimuli images. For instance, map1.jpg map2.jpg map3.jpg All the main image file formats are supported. ScreenNum: The monitor where the stimulus image will be shown. A value of 1 uses the current monitor while a value of 2 (or higher) uses the corresponding extended monitor. If omitted, the default value is 1. TxtFilename: Optional parameter that defines a .TXT filename to save the tracked mouse movements. The text file contains the tracked information sequentially for all the stimuli images. The format is [Filename 1] [Number of points] [time_stamp(1) x(1) y(1)] [time_stamp(2) x(2) y(2)] … [time_stamp(n) x(n) y(n)] [Filename 2] [Number of points] [time_stamp(1) x(1) y(1)] [time_stamp(2) x(2) y(2)] … [time_stamp(n) x(n) y(n)] and so on. Output parameters A: An array that contains the tracked mouse movements for all the stimuli images. Array A(i) is a structure with 3 fields containing the tracked movements for the i-th stimulus image, with 1 ≤ I ≤ N where N denotes the number of images in the ImagesList text file. A(i).t: time stamp (in seconds) for the i-th image A(i).x: point’s x coordinate (in image pixels) for the i-th image A(i).y: point’s y coordinate (in image pixels) for the i-th image Comments The origin of the coordinate system is on the top left corner of the input images. Example A = movement_track_seq(‘images_list.txt’,1) In this example, the images whose filenames are given in text file “images_list.txt” are used in the current monitor. As a result, an array A is created that contains the tracked mouse movements for all the stimuli images. |
Function name calc_metrics Description Provides statistics regarding the recorder trajectory as well as its comparison to the optimal trajectory. Syntax [react,len,uniq,lineq,dstat,charea,curv] = calc_metrics(A); Input parameters An array A containing the tracked mouse movements of a trajectory. It can be provided by functions movement_track or movement_track_seq. Output parameters react: total reaction time in sec len: total trajectory length in pixels uniq: structure of unique points. The structure fields are: uniq.d: duration (in seconds) uniq.x: point’s x coordinate (in image pixels) uniq.y: point’s y coordinate (in image pixels) lineq: structure with the coefficients (a, b and c) of the line equation ax + by + c = 0 describing the optimal trajectory. The line is calculated from the starting and ending trajectory points. The structure fields are: lineq.a: line parameter a lineq.b: line parameter b lineq.c: line parameter c dstat: structure of distance-based statistics relevant to the optimal trajectory. The structure fields are: dstat.avg: average dstat.std: standard deviation dstat.min: min value dstat.max: max value dstat.range: range of values charea: convex hull area (in pixels) generated by the recorder trajectory. curv: curvature at each unique trajectory point. Example [react,~,uniq,lineq,dstat,~,curv] = calc_metrics(A) In this example, various statistics are calculated based on the tracked mouse movements array A. Specifically, the calculated values are: the total reaction time react, the unique trajectory points uniq, the parameters lineq of the linear that describes the optimal trajectory, the distance-based statistics dstat as well as the curvature curv at each unique trajectory point. The output parameters len and charea are ignored. |
Function name show_visualizations Description Exports 2D plots of the mouse movement trajectory, the deviations of both horizontal and vertical mouse coordinates over time, the curvature values across the trajectory and the duration of each coordinate point. Syntax function show_visualizations(A,InpImage,StimulusFigName,XYCoordsFigName,CurvatureFigName,DurationFigName,SaveToImage,SaveToFigure) Input parameters A: An array containing the tracked mouse movements of a trajectory. It can be given by functions movement_track or movement_track_seq. InpImage: The visual stimulus image filename (e.g., “map.jpg”). All the main image file formats are supported. StimulusFigName: Filename used to save the mouse movement trajectories as .fig and .png files. XYCoordsFigName: Filename used to save the horizontal and vertical mouse coordinates over time as .fig and .png files. CurvatureFigName: Filename used to save the horizontal and vertical mouse coordinates over time as .fig and .png files. DurationFigName: Filename used to save the spatiotemporal distribution of the collected data as .fig and .png files. SaveToImage: Flag indicating whether the figure(s) will be saved as .png image file(s) or not. SaveToImage: Flag indicating whether the figure(s) will be saved as .fig MATLAB file(s) or not. Output parameters None. Comments The figures are created if a valid filename is provided. In order to omit a particular figure use symbols [] instead of a filename. Example show_visualizations(A,‘map.jpg’,‘StimFig’,[],‘CurvFig’,‘DurFig’,1,0); In this example, the tracked mouse movements variable A is used, that corresponds to image “map.jpg”. Three figures are created as follows:
|
Function name show_heatmap Description Create heatmap images of the mouse movement trajectory. Syntax function Heatmap = show_heatmap(A,InpImage,GaussStdDev,GaussScale,HeatmapFilename, HeatmapFigName,HeatIsolinesFigName,SaveToImage,SaveToFigure) Input parameters A: An array containing the tracked mouse movements of a trajectory. It can be given by functions movement_track or movement_track_seq. InpImage: The visual stimulus image filename (e.g., “map.jpg”). All the main image file formats are supported. GaussStdDev: Standard deviation of Gaussian filter. GaussScale: Integer multiplication factor applied to GaussStdDev parameter that defines the kernel size. HeatmapFilename: Filename used to save the source heatmap values as an image. HeatmapFigName: Filename used to save the heatmap superimposed on the original image as .fig and .png files. HeatIsolinesFigName: Filename used to save the 2.5D isolines surface of the mouse points’ spatial distribution as .fig and .png files. SaveToImage: Flag indicating whether the figure(s) will be saved as .png image file(s) or not. SaveToImage: Flag indicating whether the figure(s) will be saved as .fig MATLAB file(s) or not. Output parameters Heatmap: A 2D array containing the heatmap values. Comments The figures are created if a valid filename is provided. In order to omit a particular figure use symbols [] instead of a filename. Example HeatMap = show_heatmap(A,‘map.jpg’,32,6,‘heatmap.png’,”Heatmap2D’,‘HeatIsolines’,1,1); In this example, the tracked mouse movements variable A is used, that corresponds to image map.jpg. The standard deviation of the Gaussian filter is set to 32 while a multiplication factor of 6 is used for the calculation of the kernel size. The function returns an array HeatMap that contains the calculated heatmap values. The heatmap is also saved as heatmap.png image file. A figure named Heatmap2D is created that depicts the heatmap superimposed on the original image. Additionally, another figure is created, titled HeatIsolines, that shows the spatial distribution of raw data using isolines. Finally, the figures are saved as .png files and as .fig MATLAB files. |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Krassanakis, V.; Kesidis, A.L. MatMouse: A Mouse Movements Tracking and Analysis Toolbox for Visual Search Experiments. Multimodal Technol. Interact. 2020, 4, 83. https://doi.org/10.3390/mti4040083
Krassanakis V, Kesidis AL. MatMouse: A Mouse Movements Tracking and Analysis Toolbox for Visual Search Experiments. Multimodal Technologies and Interaction. 2020; 4(4):83. https://doi.org/10.3390/mti4040083
Chicago/Turabian StyleKrassanakis, Vassilios, and Anastasios L. Kesidis. 2020. "MatMouse: A Mouse Movements Tracking and Analysis Toolbox for Visual Search Experiments" Multimodal Technologies and Interaction 4, no. 4: 83. https://doi.org/10.3390/mti4040083
APA StyleKrassanakis, V., & Kesidis, A. L. (2020). MatMouse: A Mouse Movements Tracking and Analysis Toolbox for Visual Search Experiments. Multimodal Technologies and Interaction, 4(4), 83. https://doi.org/10.3390/mti4040083