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)

Arguments

region_file

region file name (csv file)

trial_num

the trial number of the current start_pts

image_width

default x_max boundary (1280)

image_height

default y_max boundary (1024)

Value

A matrix recording the eye-movement recording boundary in the trial trial_num. Each row has five columns:

  1. x_min: Minimum x value across all text lines.

  2. x_max: Maximum x value across all text lines.

  3. y_min: Minimum y value across all text lines.

  4. y_max: Maximum y value across all text lines.

  5. trial_num: Integer indicating the trial number of the current start_pts.

Details

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.

Author

Tao Gong gtojty@gmail.com