Ejemplo n.º 1
0
 public override void CreateFilteredMat()
 {
     FilteredMat = CaptureSource.Clone();
     ImageFilterHelper.whiteToDarkPixel(FilteredMat, 150);
     ImageFilterHelper.killDarkPixel(FilteredMat, 40);
     ImageFilterHelper.saturation(FilteredMat, 0, 255, 1);
 }
Ejemplo n.º 2
0
        public override void CreateFilteredMat()
        {
            if (UseCastableDetection())
            {
                CasteableDetection = new Mat(this.CaptureSource, this.CastableDetectionArea);
                CasteableDetection = CasteableDetection.Resize(new Size(1, 1), 0, 0, InterpolationFlags.Cubic);
                ImageFilterHelper.reduceColor(CasteableDetection, 64);
            }

            FilteredMat = CaptureSource;
            if (this.IsCastable() || !UseCastableDetection())
            {
                FilteredMat = new Mat(this.CaptureSource, new Rect(this.BorderCut, this.BorderCut, this.CaptureSource.Width - this.BorderCut * 2, this.CaptureSource.Height - this.BorderCut * 2));
                FilteredMat = FilteredMat.Blur(new Size(5, 5), new Point(-1, -1));
                ImageFilterHelper.killDarkPixel(FilteredMat, 60);
                // ImageFilterHelper.KillGrayPixel(ref image, 60);
                ImageFilterHelper.saturation(FilteredMat, 0, 2, 50);
            }
        }