h_remap - remaps an image using a homography matrix
h_remap [-H matrix] [-xm val] [-xM val] [-ym val] [-yM val] [-b|--get-box] [-?|-h|--help] input_image [output_image]
h_remap creates an homographic projection of input_image using the matrix of the transformation H. The old pixel coordinates o are transformed to new pixel coordinates n (both in homogeneous form), following the formula n = Ho. By default the size of the output_image is adjusted to fit the mapping, but a bounding box can also be specified (options -xm, -xM, -ym, -yM). The matrix H (3x3) can be computed from expected point correspondances using h_compute(1). A homography is a bijection that maps lines to lines. This program can be used for image rectification. In that case, consider using homography.tcl, a GUI using pixelpos(1) to measure image point coordinates, h_compute(1) to compute the homography matrix and h_remap(1) to produce the rectified image.
Returns the manual page
STRING is the name of the file containing the homography matrix H (compulsory option). The matrix H is 3x3 and the format of the file is: 3 3 H11 H12 H13 H21 H22 H23 H31 H32 H33
returns the minimum bounding box (xm xM ym yM) necessary to fit all the mapped pixels from the input image to an output image. If this option is selected, no mapping is done and not output_image file has to be given.
INTEGER is the minimum x coordinate of output_image. Note that this number may be negative: the mapped value on the x component of a pixel of the input image may be negative. In that case, the option needs to adopt the format '-xm=-val'. If the number is positive, it can be either '-xm val' or '-xm=val'.
INTEGER is the maximum x coordinate of output_image.
INTEGER is the minimum y coordinate of output_image.
INTEGER is the maximum y coordinate of output_image.
Written by Pierre Smars (first version: 2008)
Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.
Copyright (C) 2018 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
h_compute(1), pixelpos(1), homography.tcl