Scilab-Branch-6.1-GIT
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
convol2d
離散 2-D 畳み込み, fftを使用.
呼び出し手順
C = convol2d(A,B)
パラメータ
- A
実数または複素数二次元配列.
- B
実数または複素数二次元配列.
- C
実数または複素数二次元配列.
説明
convol2d
は
完全な二次元離散畳み込みを計算するためにfftを使用します.
結果 C
の次元は
size(A)+size(B)-1
で指定されます.
B
の中心要素の添字は
floor((size(B)+1)/2)
で定義されます.
例
s = [1 2 1; 0 0 0; -1 -2 -1] // Sobel horizontal edge kernel A = zeros(10,10); A(3:7,3:7) = 1 C = convol2d(s, A); clean(C)
--> s = [1 2 1; 0 0 0; -1 -2 -1] // Sobel horizontal edge kernel s = 1. 2. 1. 0. 0. 0. -1. -2. -1. --> A = zeros(10,10); A(3:7,3:7) = 1 A = 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. --> C = convol2d(s, A); --> clean(C) ans = 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 3. 4. 4. 4. 3. 1. 0. 0. 0. 0. 0. 1. 3. 4. 4. 4. 3. 1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. -1. -3. -4. -4. -4. -3. -1. 0. 0. 0. 0. 0. -1. -3. -4. -4. -4. -3. -1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
参照
履歴
バージョン | 記述 |
5.4.0 | 関数convol2dが導入されました. |
Report an issue | ||
<< convol | Correlation Convolution | corr >> |