Exemple #1
0
        void 膨張(ref Mat src)
        {
            if (マスク元画像 != null)
            {
                src = マスク元画像.Clone();
                src = src.Threshold(254, 255, ThresholdTypes.Binary);

                Mat element = Cv2.GetStructuringElement(MorphShapes.Rect, new OpenCvSharp.Size(trackBar_mask.Value, trackBar_mask.Value), new OpenCvSharp.Point(trackBar_mask.Value / 2, trackBar_mask.Value / 2));
                src = src.MorphologyEx(MorphTypes.DILATE, element);
                pictureBoxIpl1.ImageIpl = src;
            }
        }