Region corners

Region corners

Calculates the corners of regions defined by frames and sizes.

Inputs

frame
A coordinate frame for the rectangular region of interest. A 4*N-by-4 matrix.
size
The size of the region of interest. A N-by-4 matrix.

Outputs

topLeft
Top-left corner of the region. A Calculated as \( F (0, 0, 0, 1)^T \), where F one of the frames in the frame input.
topRight
Top-right corner of the region. Calculated as \( F (size[0], 0, 0, 1)^T \), where F one of the frames in the frame input.
bottomRight
Bottom-right corner of the region. Calculated as \( F (size[0], size[1], 0, 1)^T \), where F one of the frames in the frame input.
bottomLeft
Bottom-left corner of the region. Calculated as \( F (0, size[1], 0, 1)^T \), where F one of the frames in the frame input.
center
Center of the region. Calculated as \( F (size[0]/2, size[1]/2, 0, 1)^T \), where F one of the frames in the frame input.

The calculations are made using homogeneous coordinates, and the results are given as three-dimensional points (N-by-3 matrices without the trailing 1).