运行实验程序所需资料

图像形态学处理(1.膨胀)_VC

图像形态学处理(1.膨胀)_图像_02

图像形态学处理(1.膨胀)_图像_03图像形态学处理(1.膨胀)_数字_04

#include"matrix.h"
voidmain(void)
{
         grayimag A;
         A.GetGray("D:\\grayimag_test\\原图\\文字.bmp");
         A.ViewImag();
 
         grayimag B(3,3);
         B(0,1)=B(1,0)=B(1,1)=B(1,2)=B(2,1)=255;      
 
         grayimag C;
         C.Inflate01(A,B);
         C.ViewImag();
}

图像形态学处理(1.膨胀)_数字_05

#include"matrix.h"
voidmain(void)
{
         grayimag A;
         A.GetGray("D:\\grayimag_test\\原图\\间隙.bmp");
         A.ViewImag();
 
         grayimag B(3,3);
         B(0,1)=B(1,0)=B(1,1)=B(1,2)=B(2,1)=255;      
 
         grayimag C;
         C.Inflate01(A,B);
         C.ViewImag();
}