创建 滑动窗口
//创建 滑动窗口
IplConvKernel *element=0;
int values[16]={
0,0,0,0,
0,0,1,0,
0,1,1,0,
0,0,0,0
};
int cols=4,rows=4,anchor_x=2,anchor_y=2;
element=cvCreateStructuringElementEx(cols,rows,anchor_x,anchor_y,CV_SHAPE_CUSTOM,values);
cvErode(src,dst,element,1);//最后一个参会:腐蚀的次数