Regions/Areas of Interest for 360 Video

To add regions of interest, first you must run a session, enable “screen record”  and look at the objects/areas you want to measure (so that the gaze point is on them at the time they appear). You can toggle on the gaze point to more easily see where you are looking by pressing the ‘p’ key. 


Next, open up your recording (in the recordings folder) and your tracking data file (idNumber_360_video_photo_tracking_data.txt in the data folder). 


Go to the point in the video recording where you are looking at your region or object of interest and note the time. 


In the tracking_data.txt file go to that same time and look for the x,y,z coordinates of your gaze point. 

Now you will open up the settings.py file in the Vizard editor and update the x,y,z coordinates in the code on line 53 with the numbers you got from the tracking_data.txt file by copying and pasting the values. 

Next, you just need to toggle on or off the fixation regions in the GUI. You can also choose to view/debug the regions to make sure they are placed correctly (you will want to turn this off when running with a participant). 

Optionally, you can change the color of the fixation (when you are viewing it for debugging and increase the radius (or size) of the sphere. 

If you wish to use a different shape other than a sphere, change the code after “vizshape.”. If you start typing in “add”, you’ll see a list of shape options to choose from. If you are not using the sphere, also remove the code referring to “radius”, and for a cube you would use “size = “ instead). 

Adjusting the time a fixation object/region becomes active


You can adjust at what time a fixation object/region is active by adding this line of code in the “experiment” function directly above where you turn the visibility of the fixation objects/regions on, where “4” is the number of seconds to wait after the experiment starts. To turn them off use the same code, but change “viz.ON” to “viz.OFF”. 

Animating/Moving a fixation region to track a moving object

To track a moving object, use the same process, but make sure to keep your eyes on the moving target, then note the x,y,z position at the start of the movement and at the end. You can then animate the movement of the fixation shape by using Vizard’s built in actions with the vizact library (such as “moveTo”). See this page in the documentation for more information on how to use that. 


import vizact

 #Use a moveTo action to move to the point [0,0,25] at 2 meters per second

moveToPoint = vizact.moveTo([0,0,25],speed=2)

fixation1.addAction(moveToPoint)


To change the fixation threshold (the time at which it designates a fixation happened when you are viewing that region), change line 69, where the number after “threshold” is the amount of time in milliseconds of a fixation. 

 gazeTime = eye_tracker_utils.GazeTime(gazeObjectsDict, threshold=0.5)


To make only some of the fixation regions visible with debug on: 


Simply go into the SightLab_VR_360.py file and take out (or comment out) the lines associated with whatever regions you wish to not have seen (around line 544). 


    if alpha1:   

        fixation1.alpha(1.0)

        fixation2.alpha(1.0)

        fixation3.alpha(1.0)

        fixation4.alpha(1.0)