% -*- texinfo -*- % @deftypefn {Function File} @var{warped} = imremap(@var{im}, @var{XI}, @var{YI}) % @deftypefnx{Function File} @var{warped} = imremap(@var{im}, @var{XI}, @var{YI}, @var{interp}, @var{extrapval}) % @deftypefnx{Function File} [@var{warped}, @var{valid} ] = imremap(...) % Applies any geometric transformation to the image @var{im}. % % The arguments @var{XI} and @var{YI} are lookup tables that define the resulting % image % @example % @var{warped}(y,x) = @var{im}(@var{YI}(y,x), @var{XI}(y,x)) % @end example % where @var{im} is assumed to be a continuous function, which is achieved % by interpolation. Note that the image @var{im} is expressed in a (X, Y)-coordinate % system and not a (row, column) system. % % The argument @var{interp} selects the used interpolation method, and most be one % of the following strings % @table @code % @item 'nearest' % Nearest neighbor interpolation. % @item 'linear' % @itemx 'bilinear' % Bilinear interpolation. This is the default behavior. % @item 'cubic' % @itemx 'bicubic' % Bicubic interpolation. % @end table % % All values of the result that fall outside the original image will % be set to @var{extrapval}. For images of class @code{double} @var{extrapval} % defaults to @code{NA} and for other classes it defaults to 0. % % The optional output @var{valid} is a matrix of the same size as @var{warped} % that contains the value 1 in pixels where @var{warped} contains an interpolated % value, and 0 in pixels where @var{warped} contains an extrapolated value. % @seealso{imperspectivewarp, imrotate, imresize, imshear, interp2} % @end deftypefn