findbounds
找到空间变换的输出边界
语法
Outbounds = findbounds(tform,inbounds)
描述
例子
输入参数
输出参数
算法
findbounds
首先创建一个输入空间点的网格。这些点位于图像中每条边的中心、角和中间。I = imread('rice.png');h = imshow(I);集(h, AlphaData, 0.3);轴打开,网格打开in_points =[…]0.5000 0.5000 0.5000 256.5000 256.5000 256.5000 256.5000 0.5000 128.5000 128.5000 128.5000 128.5000 128.5000 256.5000 256.5000 128.5000;hold on plot(in_points(:,1),in_points(:,2),'.','MarkerSize',18
输入空间点网格
接下来,
findbounds
将输入空间点的网格转换为输出空间。如果tform
包含正向转换(非空forward_fcn
字段),然后findbounds
使用转换输入空间点tformfwd
.例如:Tform =仿射的,...[1.1067 -0.2341 0;0.5872 1.1769 0;1000 -300 1]);Out_points = tformfwd(tform, in_points)
Out_points = 1.0e+03 * 1.0008 -0.2995 1.1512 0.0018 1.2842 -0.3595 1.4345 -0.0582 1.0760 -0.1489 1.1425 -0.3295 1.2177 -0.1789 1.2928 -0.0282
如果
tform
不包含正变换,那么findbounds
使用Nelder-Mead优化函数估计输出边界fminsearch
.最后,
findbounds
计算转换后的点网格的边界框。
另请参阅
R2006a之前介绍
这个话题有用吗?