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: [11×11 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
-Inf -Inf 0 0.8123 1.6246 2.4369 1.6246 0.8123 0 -Inf -Inf
⋮
構造化要素を平行移動させます。
V = [2 2]; SE2 = translate(SE,V)
SE2 = offsetstrel is a ball shaped offset structuring element with properties: Offset: [15×15 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
-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 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 0 1.6246 2.4369 3.2492 4.0615 4.0615 4.0615 3.2492 2.4369 1.6246 0
-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 -Inf -Inf 0 0.8123 1.6246 2.4369 1.6246 0.8123 0 -Inf -Inf
⋮
入力引数
構造化要素。strel
または offsetstrel
オブジェクトとして指定します。
平行移動のオフセット。数値ベクトルとして指定します。各要素は、対応する次元内における目的の平行移動の量を指定します。
出力引数
平行移動した構造化要素。strel
または offsetstrel
オブジェクトとして返されます。
バージョン履歴
R2006a より前に導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)