>>help findbounds
FINDBOUNDS Find output bounds for spatial transformation.
OUTBOUNDS = FINDBOUNDS(TFORM,INBOUNDS) estimates the output bounds
corresponding to a given spatial transformation and a set of input
bounds. TFORM is a spatial transformation structure as returned by
MAKETFORM or CP2TFORM. INBOUNDS is 2-by-NUM_DIMS matrix. The first row
of INBOUNDS specifies the lower bounds for each dimension, and the
second row specifies the upper bounds. NUM_DIMS has to be consistent
with the ndims_in field of TFORM.
OUTBOUNDS has the same form as INBOUNDS. It is an estimate of the
smallest rectangular region completely containing the transformed
rectangle represented by the input bounds. Since OUTBOUNDS is only an
estimate, it may not completely contain the transformed input rectangle.
Notes
-----
IMTRANSFORM uses FINDBOUNDS to compute the 'OutputBounds' parameter
if the user does not provide it.
If TFORM contains a forward transformation (a nonempty forward_fcn
field), then FINDBOUNDS works by transforming the vertices of the input
bounds rectangle and then taking minimum and maximum values of the
result.
If TFORM does not contain a forward transformation, then FINDBOUNDS
estimates the output bounds using the Nelder-Mead optimization
function FMINSEARCH. If the optimization procedure fails, FINDBOUNDS
issues a warning and returns OUTBOUNDS=INBOUNDS.
Example
-------
inbounds = [0 0; 1 1]
tform = maketform('affine',[2 0 0; .5 3 0; 0 0 1])
outbounds = findbounds(tform, inbounds)
See also cp2tform, imtransform, maketform, tformarray, tformfwd, tforminv.
Reference page in Help browser
doc findbounds
Saturday, November 24, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment