#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.Open01(A,B);
C.ViewImag();
}
#include"matrix.h"
voidmain(void)
{
grayimag A;
A.GetGray("D:\\grayimag_test\\原图\\杂乱.bmp");
A.ViewImag();
grayimag B(11,11);
B.Const(255);
grayimag C;
C.Open01(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.Close01(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.Close01(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,D;
C.Open01(A,B);
D.Close01(C,B);
D.ViewImag();
C.Close01(A,B);
D.Open01(C,B);
D.ViewImag();
}
#include"matrix.h"
voidmain(void)
{
grayimag A;
A.GetGray("D:\\grayimag_test\\原图\\污染条纹.bmp");
A.ViewImag();
grayimag B1(3,3),B2(3,11);
B1.Const(255);
B2.Const(255);
grayimag C,D;
C.Open01(A,B1);
C.ViewImag();
D.Close01(C,B2);
D.ViewImag();
}