20.5 消除小对象

下面的形态学操作可以消除小的图像对象,并平滑剩余对象的边界:

  ...
  segmentation(Image,&Seg);
  gen_circle(&Mask,100.0,100.0,3.5);
  opening(Seg,Mask,&Res);