apply_homography

PURPOSE ^

Applies the homography defined by H on the image I.

SYNOPSIS ^

function IR = apply_homography( I, H, method, bbox, show )

DESCRIPTION ^

 Applies the homography defined by H on the image I.  

 Takes the center of the image as the origin, not the top left corner.  Also, the
 coordinate system is row/ column format, so H must be also.  

 The bounding box of the image is set by the BBOX argument, a string that can be 'loose'
 (default) or 'crop'. When BBOX is 'loose', IR includes the whole transformed image,
 which generally is larger than I. When BBOX is 'crop' IR is cropped to include only the
 central portion of the transformed image and is the same size as I.  Preserves I's type.

 INPUTS
   I       - input black and white image (2D double or unint8 array)
   H       - 3x3 nonsingular homography matrix
   method  - [optional] parameter for interp2 ('nearest',{'linear'},'spline','cubic');
   bbox    - [optional] see above for meaning of bbox ({'loose'},'crop')
   show    - [optional] figure to use for display (no display if == 0)

 OUTPUTS
   IR -  result of applying H to I.

 EXAMPLE
   load trees; I=X;
   R = rotation_matrix2D( pi/4 ); T = [1; 3]; H = [R T; 0 0 1];
   IR = apply_homography( I, H, [], 'crop', 1 );

 DATESTAMP
   29-Sep-2005  2:00pm

 See also TEXTURE_MAP, IMROTATE2

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-May-2006 23:48:50 by m2html © 2003