This function extracts (x_min, x_max, y_min, y_max) from the region file
get_xybounds(region_file, trial_num, image_width = 1280, image_height = 1024)
region file name (csv file)
the trial number of the current start_pts
default x_max boundary (1280)
default y_max boundary (1024)
A matrix recording the eye-movement recording boundary in the trial trial_num. Each row has five columns:
x_min: Minimum x value across all text lines.
x_max: Maximum x value across all text lines.
y_min: Minimum y value across all text lines.
y_max: Maximum y value across all text lines.
trial_num: Integer indicating the trial number of the current start_pts.
This function reads region_file and gets (x_min, x_max, y_min, y_max) of all text lines. Then, it bounds (x_min, x_max, y_min, y_max) with trail_num into a list, and return it.