Win8Metro(C#)数字图像处理--2.24二值图像闭运算

来源:互联网 发布:淘宝如何设置好评返现 编辑:程序博客网 时间:2024/06/12 23:59


[函数名称]

二值图像闭运算函数CloseOperateProcess(WriteableBitmap src)

[算法说明]

 闭运算就是先进性一次膨胀后进行一次腐蚀。算法过程如公式2-(28)

[函数代码]

       ///<summary>

       /// Close operate process.

       ///</summary>

       ///<param name="src">The source image(It should be the binary image).</param>

       ///<returns></returns>

       publicstaticWriteableBitmap CloseOperateProcess(WriteableBitmap src)////24图像闭运算

       {

           if (src !=null)

           {

               WriteableBitmap temp = CorrosionProcess(DilationProcess(src));

               return temp;

           }

           else

           {

               returnnull;

           }

       }

[图像效果]

0 0