このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
translate
構造化要素の平行移動
説明
例
構造化要素の平行移動
イメージをワークスペースに読み取ります。
I = imread('cameraman.tif');
構造化要素を作成し、下および右に 25 ピクセル平行移動させます。
se = translate(strel(1), [25 25]);
平行移動した構造化要素を使用してイメージを膨張します。
J = imdilate(I,se);
元のイメージと平行移動したイメージを表示します。
figure
imshow(I), title('Original')
figure
imshow(J), title('Translated');
オフセット構造化要素の平行移動
オフセット構造化要素を作成します。
SE = offsetstrel('ball', 5, 6.5)
SE = offsetstrel is a ball shaped offset structuring element with properties: Offset: [11x11 double] Dimensionality: 2
SE.Offset
ans = 11×11
-Inf -Inf 0 0.8123 1.6246 2.4369 1.6246 0.8123 0 -Inf -Inf
-Inf 0.8123 1.6246 2.4369 3.2492 3.2492 3.2492 2.4369 1.6246 0.8123 -Inf
0 1.6246 2.4369 3.2492 4.0615 4.0615 4.0615 3.2492 2.4369 1.6246 0
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.2492 1.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 3.2492 2.4369 1.6246 0
-Inf 0.8123 1.6246 2.4369 3.2492 3.2492 3.2492 2.4369 1.6246 0.8123 -Inf
⋮
構造化要素を平行移動させます。
V = [2 2]; SE2 = translate(SE,V)
SE2 = offsetstrel is a ball shaped offset structuring element with properties: Offset: [15x15 double] Dimensionality: 2
SE2.Offset
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 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.2492 2.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
⋮
入力引数
SE
— 構造化要素
strel
または offsetstrel
オブジェクト
構造化要素。strel
または offsetstrel
オブジェクトとして指定します。
v
— 平行移動のオフセット
数値ベクトル
平行移動のオフセット。数値ベクトルとして指定します。各要素は、対応する次元内における目的の平行移動の量を指定します。
出力引数
SE2
— 平行移動した構造化要素
strel
または offsetstrel
オブジェクト
平行移動した構造化要素。strel
または offsetstrel
オブジェクトとして返されます。
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)