<> === 结构元素的分解 === 膨胀运算满足结合律:{{{#!latex $$A\oplus (B \oplus C) = (A \oplus B) \oplus C$$ }}} 如果一个结构元素B可以分解成两个结构元素B1和B2的膨胀{{{#!latex $$B=B_1\oplus B_2$$ }}}那么{{{#!latex $$A\oplus B = A \oplus (B_1 \oplus B_2) = (A \oplus B_1) \oplus B_2$$ }}} 计算膨胀所需要的时间正比于结构元素中非零像素的个数。如果分解后非零像素减少,那就可以节省计算时间。例如 {{{#!latex $$\left[\begin{array}{ccccc} 1 &1& 1& 1& 1\\ 1 &1& 1& 1& 1\\ 1 &1& \boxed{1}& 1& 1\\ 1 &1& 1& 1& 1\\ 1 &1& 1& 1& 1 \end{array}\right] $$ }}} 可以分解为{{{#!latex $$[1\ 1\ \boxed{1}\ 1\ 1] \oplus \left[ \begin{array}{c}1\\1\\\boxed{1}\\1\\1\end{array}\right]$$ }}} <>