Пример #1
0
 private void MorphologyOpenClose(MorphologyArgs e, Point anchor, Mat element)
 {
     if (e.IsOpenOrNot)
     {
         ConstantFlags.OPEN_CLOSE_NAME = "开操作图";
         CvInvoke.MorphologyEx(mCurrentImage, mTempImage, MorphOp.Open, element, anchor, 1, BorderType.Default, new Emgu.CV.Structure.MCvScalar(0));
     }
     else
     {
         ConstantFlags.OPEN_CLOSE_NAME = "闭操作图";
         CvInvoke.MorphologyEx(mCurrentImage, mTempImage, MorphOp.Close, element, anchor, 1, BorderType.Default, new Emgu.CV.Structure.MCvScalar(0));
     }
 }
Пример #2
0
 private void MorphologyErodeDilate(MorphologyArgs e, Point anchor, Mat element)
 {
     if (e.IsErodeOrNot)
     {
         ConstantFlags.ERODE_DILATE_NAME = "腐蚀图";
         CvInvoke.Erode(mCurrentImage, mTempImage, element, anchor, 1, BorderType.Default, new Emgu.CV.Structure.MCvScalar(0));
     }
     else
     {
         ConstantFlags.ERODE_DILATE_NAME = "膨胀图";
         CvInvoke.Dilate(mCurrentImage, mTempImage, element, anchor, 1, BorderType.Default, new Emgu.CV.Structure.MCvScalar(0));
     }
 }
Пример #3
0
 private void MorphologyOthers(MorphologyArgs e, Point anchor, Mat element)
 {
     CvInvoke.MorphologyEx(mCurrentImage, mTempImage, (MorphOp)e.OtherMorphologyType, element, anchor, 1, BorderType.Default, new Emgu.CV.Structure.MCvScalar(0));
 }