#include"matrix.h"
voidmain(void)
{
grayimag A;
A.GetGray("D:\\grayimag_test\\原图\\圆环.bmp");
A.ViewImag();
grayimag B(21,21);
for(int j=0;j<21;j++)
{
B(10,j)=255;
B(j,10)=255;
}
grayimag C;
C.Corrode01(A,B);
C.ViewImag();
}
#include"matrix.h"
voidmain(void)
{
grayimag A;
A.GetGray("D:\\grayimag_test\\原图\\毛刺.bmp");
A.ViewImag();
grayimag B(17,17);
for(int i=0;i<17;i++)
for(int j=0;j<17;j++)
if((i-8)*(i-8)+(j-8)*(j-8)<=64)
B(i,j)=255;
grayimag C;
C.Corrode01(A,B);
C.ViewImag();
}