文档帮助中心文档
翻译结构元素
se2 =翻译(se,v)
例子
SE2=翻译(SE,v)翻译结构元素SE在一天的空间。v是一个包含所需平移在每个维度上的偏移量的n元素向量。
SE2=翻译(SE,v)
SE2
SE
v
全部折叠
将图像读入工作区。
我= imread (“cameraman.tif”);
创建一个结构化元素并将其转换为25像素。
Se = translate(strel(1), [25 25]);
使用翻译的结构元素放大图像。
J = imdilate(我,se);
显示原始图像和翻译图像。
图imshow (I)、标题(“原始”)
图imshow(j),标题(“翻译”);
创建偏移结构元素。
SE = offsetstrel (“球”,5,6.5)
SE = offsetstrel是一种球形偏移结构元素,其属性为
SE。抵消
ans =11×11负负0 0.8123 1.6246 2.4369 1.6246 0.8123 0负负负0.8123 1.6246 2.4369 3.2492 3.2492 3.2492 2.4369 1.6246 0.8123负0 0 1.6246 2.4369 3.2492 4.0615 4.0615 4.0615 3.2492 2.4369 1.6246 0.8123 2.4369 3.2492 4.0615 4.8738 4.8738 4.8738 4.0615 3.2492 2.4369 0.8123 1.6246 3.2492 4.0615 4.8738 5.6861 5.6861 5.6861 4.8738 4.0615 3.24921.6246 2.4369 3.2492 4.0615 4.8738 5.6861 6.4984 5.6861 4.8738 4.0615 3.2492 2.4369 1.6246 3.2492 4.0615 4.8738 5.6861 5.6861 5.6861 4.8738 4.0615 3.2492 1.6246 0.8123 2.4369 3.2492 4.0615 4.8738 4.8738 4.8738 4.0615 3.2492 2.4369 0.8123 0 1.6246 2.4369 3.2492 4.0615 4.0615 4.0615 0.8123 1.6246 2.4369 3.2492 3.2492 3.2492 2.4369 1.6246 0负3.2492 2.4369 1.6246 0.8123 -Inf⋮
翻译结构元素。
V = [2 2];SE2 =翻译(SE, V)
SE2 = offsetstrel是一种球形偏移结构元素,具有以下属性
SE2。抵消
ans =15×15-inf-inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf-inf-inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf-inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf -inf 0 0.8123 1.6246 2.4369 1.6246 0.8123 0-inf -inf -inf -inf -inf -INF -Inf 0.8123 1.6246 2.4369 3.2492 3.2492 3.2492 2.4369 1.6246 0.8123 -Inf -Inf -Inf -Inf -Inf 0 1.6246 2.4369 3.2492 4.0615 4.0615 4.0615 3.2492 2.4369 1.6246 0 -Inf -Inf -Inf -Inf 0.8123 2.4369 3.2492 4.0615 4.8738 4.8738 4.8738 4.0615 3.24922.4369 0.8123 -Inf -Inf -Inf -Inf 1.6246 3.2492 4.0615 4.8738 5.6861 5.6861 5.6861 4.8738 4.0615 3.2492 1.6246 -Inf -Inf -Inf -Inf 2.4369 3.2492 4.0615 4.8738 5.6861 6.4984 5.6861 4.8738 4.0615 3.2492 2.4369⋮
strel
offsetstrel
结构元素,指定为strel或者offsetstrel目的。
转换偏移量,指定为数字向量。每个元素指定相应维度中所需的平移量。
转换的结构元素,返回为strel或者offsetstrel目的。
反映
您有这个示例的修改版本。您想打开这个示例与您的编辑吗?
你点击一个链接对应于这个MATLAB命令:
通过在MATLAB命令窗口中输入命令来运行命令。Web浏览器不支持MATLAB命令。金宝app
选择一个网站,在那里获得翻译的内容,并看到当地的活动和优惠。根据您的位置,我们建议您选择:.
你也可以从以下列表中选择一个网站:
选择中国网站(中文或英文)以获得最佳网站性能。其他MathWorks国家站点没有针对您所在位置的访问进行优化。
与当地办事处联系