#include "las.h"
FUNCTION c_file_corner (in_proj_corners, ls_corners, window, out_proj_corners)
double in_proj_corners[8]; double ls_corners[8]; long window[4]; double out_proj_corners[8];
Input projection corners. The corner values of the known projection coordinates. The order of the coordinates is:
in_proj_corners[UPLEFT_Y] = Upper left corner y value in_proj_corners[UPLEFT_X] = Upper left corner x value in_proj_corners[UPRIGHT_Y] = Upper right corner y value in_proj_corners[UPRIGHT_X] = Upper right corner x value in_proj_corners[LOLEFT_Y] = Lower left corner y value in_proj_corners[LOLEFT_X] = Lower left corner x value in_proj_corners[LORIGHT_Y] = Lower right corner y value in_proj_corners[LORIGHT_X] = Lower right corner x value
Line/sample corners. The known line and sample values that correspond to in_proj_corners. The order of the line/sample corner values is:
ls_corners[UPLEFT_Y] = Upper left corner line value ls_corners[UPLEFT_X] = Upper left corner sample value ls_corners[UPRIGHT_Y] = Upper right corner line value ls_corners[UPRIGHT_X] = Upper right corner sample value ls_corners[LOLEFT_Y] = Lower left corner line value ls_corners[LOLEFT_X] = Lower left corner sample value ls_corners[LORIGHT_Y] = Lower right corner line value ls_corners[LORIGHT_X] = Lower right corner sample value
Input window. Array containing the image window specification for which the projection corners are to be calculated. This four element array must contain SL, SS, NL, NS.
Output projection corners. The projection corner values of the window as specified in window. The order of the projection values is the same as in_proj_corners.
This routine is used to find the projection coordinates of a corresponding to the lines and samples specified in window. The output corners are calculated by QR decomposition (see usernote 5) given image corners in both projection space and line/sample space.
As an example, points a, b, c, and d in the figure below represent the valid image corners. The area outside of figure abdc and inside figure WXZY consists of fill values. Points W, X, Y, and Z represent the file corners generated from window. The input values of in_proj_corners represent the projection coordinates of points a, b, c, and d. The line and sample coordinates of a, b, c, and d are entered as ls_corners. The projection coordinates of points W, X, Y, and Z will be returned in the array out_proj_corners.
![]()
RETURN VALUE
c_file_corner() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed