Operator Library: Filter
The operator NumberOfHits counts the number of matches in the binary image of kernel size N x M in the input link I and in the matching matrix. The result is output at the link O. The matching matrix is defined using parameter StructElement. An entry of '1' in the StructElement indicates that the pixel must contain the value '1' in the kernel to be included in the counting. A value '0' in the structuring element indicates that the pixel must be value '0' to be included in the counting. An entry '-1' marks don't care kernel pixels. Such pixels will be ignored during counting.
例を見てみましょう。次のような構造化要素が与えられています。
以下の画像 I にオペレーターを適用します。
結果として得られる出力 O は以下のようになります。
パラメータ EdgeHandling = EdgeMirrored を指定して、オペレーター FIRkernelNxM を使用してカーネルが生成されたと仮定します。
| StructElement | |
|---|---|
| タイプ | static パラメータ |
| Default | -1 |
| 範囲 | {-1, 0, 1} |
|
このパラメータは、構造化要素の形状を定義します。
オペレーターの入力カーネルサイズが変更されると、係数も変更されます。 入力カーネルサイズの変更後に係数を確認してください。 |
|
オペレーター NumberOfHits の使用例を以下に示します。


前へ

