You are here : matlabImage Processingfindbounds

findbounds() - Image Processing

outbounds = findbounds(TFORM,inbounds) estimates
the output bounds corresponding to a given spatial transformation
and a set of input bounds. TFORM, as returned by maketform,
is a spatial transformation structure. inbounds is
a 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 might not completely contain the transformed
input rectangle.


Syntax

outbounds = findbounds(TFORM,inbounds)


Example

I = imread('rice.png');
h = imshow(I);
set(h,'AlphaData',0.3);
axis on, grid on
in_points = [ ...
    0.5000    0.5000
    0.5000  256.5000
  256.5000    0.5000
  256.5000  256.5000
    0.5000  128.5000
  128.5000    0.5000
  128.5000  128.5000
  128.5000  256.5000
  256.5000  128.5000];
hold on
plot(in_points(:,1),in_points(:,2),'.','MarkerSize',18)
hold off


Output / Return Value


Limitations


Alternatives / See Also


Reference