#include #include #define nr 300 #define nc 300 typedef unsigned char BYTE; //------------------------------------------------------- // f10.cpp // Convolution filtering using Maximum fiter // MIAT Lab, Kaohsiung, Taiwan // CHEN Ching-Han, 2001.10.09 //------------------------------------------------------- void Maximum(int WinSize, BYTE **InIm, BYTE **OutIm); BYTE ** array2D(int nnr,int nnc); void main() { ifstream in1("01.raw",ios::binary); ofstream out1("test.raw",ios::binary); BYTE **ima1,**ima2; ima1=array2D(nr,nc); ima2=array2D(nr,nc); for(int i=0;i>ima1[i][j]; Maximum(5, ima1, ima2); for(int i=0;i> 1; Area = (2*n+1) * (2*n+1); for (r=0; r Max) Max = InIm [r+y] [c+x]; OutIm [r][c] = Max; } } } BYTE ** array2D(int nnr,int nnc) { BYTE **m; m=new BYTE*[nnr]; for(int i=0;i