Home > freetb4matlab > image > imshear.m

imshear

PURPOSE ^

% Applies a shear to the image @var{M}.

SYNOPSIS ^

function g = imshear(m, axis, alpha, bbox, noshift)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} imshear (@var{M}, @var{axis}, @var{alpha}, @var{bbox})
% Applies a shear to the image @var{M}.
%
% The argument @var{M} is either a matrix or an RGB image.
%
% @var{axis} is the axis along which the shear is to be applied, and can
% be either 'x' or 'y'.
% For example, to shear sideways is to shear along the 'x' axis. Choosing
% 'y' causes an up/down shearing.
%
% @var{alpha} is the slope of the shear. For an 'x' shear, it is the 
% horizontal shift (in pixels) applied to the pixel above the 
% center. For a 'y' shear, it is the vertical shift (in pixels)
% applied to the pixel just to the right of the center pixel.
%
% NOTE: @var{alpha} does NOT need to be an integer.
%
% @var{bbox} can be one of 'loose', 'crop' or 'wrap'.
% 'loose' allows the image to grow to accomodate the new transformed image.
% 'crop' keeps the same size as the original, clipping any part of the image
% that is moved outside the bounding box.
% 'wrap' keeps the same size as the original, but does not clip the part 
% of the image that is outside the bounding box. Instead, it wraps it back 
% into the image.
%
% If called with only 3 arguments, @var{bbox} is set to 'loose' by default.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003