public MorphologyFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.Morphology;
            SourceType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            IntPropertys["Kern"] = new NumProperty <int>()
            {
                Value = 1, MaxVal = 7, MinVal = 1
            };

            IntPropertys["Count"] = new NumProperty <int>()
            {
                Value = 1, MaxVal = 7, MinVal = 1
            };


            EnumPropertys["Type"] = new EnumProperty(typeof(MorphologyEnum));
            EnumPropertys["Type"].Set("Erode");

            EnumPropertys["KernType"] = new EnumProperty(typeof(ElementShape));
            EnumPropertys["KernType"].Set("Ellipse");
        }
Beispiel #2
0
        public GradientFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.Gradient;
            SourceType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };


            EnumPropertys["Type"] = new EnumProperty(typeof(GradientEnum));
            EnumPropertys["Type"].Set("Sobel");

            IntPropertys["Kern"] = new NumProperty <int>()
            {
                Value = 1, MaxVal = 7, MinVal = 1
            };

            IntPropertys["Low"] = new NumProperty <int>()
            {
                Value = 0, MaxVal = 255, MinVal = 0
            };
            IntPropertys["Hight"] = new NumProperty <int>()
            {
                Value = 255, MaxVal = 255, MinVal = 0
            };
        }
        public MergeInSrcFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.Merge;
            SourceType = new DataType()
            {
                Source = true, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                Source = true, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            FloatPropertys["Src1"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = -10, Value = 0.5
            };
            FloatPropertys["Src2"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = -10, Value = 0.5
            };
            FloatPropertys["Gamma"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = -10, Value = 0
            };

            IntPropertys["Src1ID"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 0, Value = 0
            };
            IntPropertys["Src2ID"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 0, Value = 1
            };
        }
Beispiel #4
0
        public RectShiftFilter(GraphFilter graph, string name) : base(graph, name)
        {
            Type = FilterType.RectShift;
            EnumPropertys["DrawOn"] = new EnumProperty(typeof(FilterDrawMode));
            IntPropertys["Color"]   = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 255, Value = 0
            };

            IntPropertys["ShiftX"] = new NumProperty <int>()
            {
                MinVal = -2048, MaxVal = 2048, Value = 0
            };
            IntPropertys["ShiftY"] = new NumProperty <int>()
            {
                MinVal = -2048, MaxVal = 2048, Value = 0
            };

            if (graph != null)
            {
                var names = graph.GetAddedNames();
                EnumPropertys["DrawSource"] = new EnumProperty(names);

                if (names.Length > 0)
                {
                    EnumPropertys["DrawSource"].Set(names[names.Length - 1]);
                }
            }
        }
Beispiel #5
0
        public RectDataAddFilter(GraphFilter graph, string name) : base(graph, name)
        {
            Type = FilterType.AddRect;
            EnumPropertys["DrawOn"] = new EnumProperty(typeof(FilterDrawMode));
            IntPropertys["Color"]   = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 255, Value = 0
            };

            IntPropertys["x"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };
            IntPropertys["y"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };

            IntPropertys["width"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };
            IntPropertys["height"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };

            EnumPropertys["PixelSumCenter"] = new EnumProperty(typeof(FilterLogicMode));
            EnumPropertys["PixelSumCenter"].Set("Off");
        }
Beispiel #6
0
        public SelectSingleContourFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.ContourSingleSelect;
            EnumPropertys["DrawOn"]       = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["BoundingRect"] = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["SelectMode"]   = new EnumProperty(typeof(FilterSelectMode));

            IntPropertys["X"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
            IntPropertys["Y"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };


            EnumPropertys["FillMode"] = new EnumProperty(typeof(FillDrawModeEnum));
            IntPropertys["Red"]       = new NumProperty <int>()
            {
                MaxVal = 255, MinVal = 0, Value = 0
            };
            IntPropertys["Green"] = new NumProperty <int>()
            {
                MaxVal = 255, MinVal = 0, Value = 0
            };
            IntPropertys["Blue"] = new NumProperty <int>()
            {
                MaxVal = 255, MinVal = 0, Value = 0
            };
        }
        private List <double[, ]> histogramsResults = new List <double[, ]>(); // чтобы не пересчитывать гистограммы на каждый чих, буду делать это
                                                                               // только на bReqFullUpdate

        public HistogramFilter(GraphFilter graph, string name) : base(graph, name)
        {
            Type = FilterType.Histogram;

            IntPropertys["x_show"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };
            IntPropertys["y_show"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
            FloatPropertys["scaleX"] = new NumProperty <double>()
            {
                MinVal = 0.1, MaxVal = 5, Value = 1
            };
            FloatPropertys["scaleY"] = new NumProperty <double>()
            {
                MinVal = 0.001, MaxVal = 1, Value = 0.1
            };

            EnumPropertys["MovingType"] = new EnumProperty(typeof(MovingPredictType));
            IntPropertys["MovingRange"] = new NumProperty <int>()
            {
                MinVal = 1, MaxVal = 10, Value = 1
            };
        }
        public CreateBgrFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type       = FilterType.BGRBlank;
            SourceType = new DataType()
            {
                Source = true
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            EnumPropertys["FreeMode"] = new EnumProperty(typeof(FilterLogicMode));

            IntPropertys["Width"] = new NumProperty <int>()
            {
                MaxVal = 4096, MinVal = 0, Value = 320
            };
            IntPropertys["Height"] = new NumProperty <int>()
            {
                MaxVal = 4096, MinVal = 0, Value = 240
            };

            IntPropertys["Red"] = new NumProperty <int>()
            {
                MaxVal = 255, MinVal = 0, Value = 0
            };
            IntPropertys["Green"] = new NumProperty <int>()
            {
                MaxVal = 255, MinVal = 0, Value = 0
            };
            IntPropertys["Blue"] = new NumProperty <int>()
            {
                MaxVal = 255, MinVal = 0, Value = 0
            };
        }
        public ThresholdFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.Threshold;
            SourceType = new DataType()
            {
                channels = 1, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                channels = 1, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            EnumPropertys["Type"] = new EnumProperty(typeof(ThresholdEnum));
            EnumPropertys["Type"].Set("Binary");

            IntPropertys["Threshold"] = new NumProperty <int>()
            {
                Value = 0, MaxVal = 255, MinVal = 0
            };
            IntPropertys["ValueSet"] = new NumProperty <int>()
            {
                Value = 0, MaxVal = 255, MinVal = 0
            };

            IntPropertys["Kern"] = new NumProperty <int>()
            {
                Value = 1, MaxVal = 7, MinVal = 1
            };
            IntPropertys["SubtractedFromMean"] = new NumProperty <int>()
            {
                Value = 0, MaxVal = 255, MinVal = 0
            };
        }
        public ResizeAbsFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.ResizeAbs;
            SourceType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            IntPropertys["Width"] = new NumProperty <int>()
            {
                MaxVal = 4096, MinVal = 0, Value = 320
            };
            IntPropertys["Height"] = new NumProperty <int>()
            {
                MaxVal = 4096, MinVal = 0, Value = 240
            };

            FloatPropertys["fx"] = new NumProperty <double>()
            {
                MaxVal = 4096, MinVal = 0, Value = 0
            };
            FloatPropertys["fy"] = new NumProperty <double>()
            {
                MaxVal = 4096, MinVal = 0, Value = 0
            };

            EnumPropertys["Inter"] = new EnumProperty(typeof(Inter));
            EnumPropertys["Inter"].Set("Area");
        }
 public AppendSourceFilter(GraphFilter graph = null, string name = null) : base(graph, name)
 {
     Type = FilterType.Append;
     if (graph != null)
     {
         EnumPropertys["AppendSource"] = new EnumProperty(graph.GetAddedNames());
     }
 }
        public BgrLUTFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.LUT;


            EnumPropertys["Blue"]  = new EnumProperty(typeof(LutType));
            EnumPropertys["Green"] = new EnumProperty(typeof(LutType));
            EnumPropertys["Red"]   = new EnumProperty(typeof(LutType));
        }
 public Gray2BgrFilter(GraphFilter graph, string name = null) : base(graph, name)
 {
     Type       = FilterType.Gray2Bgr;
     SourceType = new DataType()
     {
         channels = 1, depth = Emgu.CV.CvEnum.DepthType.Cv8U
     };
     DestinationType = new DataType()
     {
         channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
     };
 }
Beispiel #14
0
        public ContourSortFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.ContourSort;

            EnumPropertys["DrawOn"]   = new EnumProperty(typeof(FilterDrawMode));
            IntPropertys["Thickness"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 0, Value = 3
            };
            EnumPropertys["BoundingRect"]   = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["CenterDrawMode"] = new EnumProperty(typeof(CenterDrawMode));
            EnumPropertys["FillMode"]       = new EnumProperty(typeof(FillDrawModeEnum));

            EnumPropertys["Histogram"] = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["Histogram"].Set("Hide");

            FloatPropertys["MinArea"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 50000, Value = 0
            };
            FloatPropertys["MaxArea"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 50000, Value = 50000
            };

            FloatPropertys["MinPerimeter"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 50000, Value = 0
            };
            FloatPropertys["MaxPerimeter"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 50000, Value = 50000
            };

            IntPropertys["MinHeight"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };
            IntPropertys["MaxHeight"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 4096
            };

            IntPropertys["MinWidth"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 0
            };
            IntPropertys["MaxWidth"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 4096
            };
        }
Beispiel #15
0
        private static BaseFilter CreateFilter(string type, GraphFilter graph = null, string name = null)
        {
            string[] names  = Enum.GetNames(typeof(FilterType));
            var      values = (int[])Enum.GetValues(typeof(FilterType));

            for (int n = 0; n < values.Length; n++)
            {
                if (names[n] == type)
                {
                    return(CreateFilter((FilterType)values[n], graph, name));
                }
            }
            return(null);
        }
Beispiel #16
0
        public ContourShiftFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.ContourShift;
            EnumPropertys["DrawOn"]       = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["BoundingRect"] = new EnumProperty(typeof(FilterDrawMode));

            IntPropertys["ShiftX"] = new NumProperty <int>()
            {
                MinVal = -2048, MaxVal = 2048, Value = 0
            };
            IntPropertys["ShiftY"] = new NumProperty <int>()
            {
                MinVal = -2048, MaxVal = 2048, Value = 0
            };
        }
        public BaseFilter(GraphFilter graph, string name = null)
        {
            this.m_name = name;
            this.Graph  = graph;
            Sources     = new List <BaseFilter>();
            Children    = new List <BaseFilter>();

            IntPropertys   = new Dictionary <string, NumProperty <int> >();
            FloatPropertys = new Dictionary <string, NumProperty <double> >();
            TablePropertys = new Dictionary <string, TableProperty <double> >();
            EnumPropertys  = new Dictionary <string, EnumProperty>();
            FilePropertys  = new Dictionary <string, FileInfo>();
            DataPropertys  = new Dictionary <string, object>();

            m_out = new List <DataSrc>();
        }
        public SplitFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type       = FilterType.Split;
            SourceType = new DataType()
            {
                Source = true
            };
            DestinationType = new DataType()
            {
                Source = true
            };

            IntPropertys["Count"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 1, Value = 1
            };
        }
        public LoadBgrFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.File;
            SourceType = new DataType()
            {
                Source = true
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            FilePropertys["Path"] = new FileInfo("img.jpg");

            EnumPropertys["ImgGroup"] = new EnumProperty(typeof(FilterLogicMode));
            EnumPropertys["ImgGroup"].Set(FilterLogicMode.Off.ToString());
        }
        public BlurFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.Blur;
            SourceType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            IntPropertys["Kern"] = new NumProperty <int>()
            {
                Value = 1, MaxVal = 7, MinVal = 1
            };
            EnumPropertys["Type"] = new EnumProperty(typeof(BlurEnum));
            EnumPropertys["Type"].Set("Gaussian");
        }
        public ResizeFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type       = FilterType.Resize;
            SourceType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                channels = 3, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            FloatPropertys["Scale"] = new NumProperty <double>()
            {
                MaxVal = 1000, MinVal = 0, Value = 1
            };

            EnumPropertys["Inter"] = new EnumProperty(typeof(Inter));
            EnumPropertys["Inter"].Set("Area");
        }
        public SelectFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type       = FilterType.Select;
            SourceType = new DataType()
            {
                Source = true
            };
            DestinationType = new DataType()
            {
                Source = true
            };

            IntPropertys["SourcesID"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 0, Value = 0
            };
            IntPropertys["OutID"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 0, Value = 0
            };
        }
Beispiel #23
0
        public ContourSearchFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.ContourSearch;
            EnumPropertys["DrawOn"]   = new EnumProperty(typeof(FilterDrawMode));
            IntPropertys["Thickness"] = new NumProperty <int>()
            {
                MaxVal = 10, MinVal = 0, Value = 3
            };
            EnumPropertys["BoundingRect"]   = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["CenterDrawMode"] = new EnumProperty(typeof(CenterDrawMode));
            EnumPropertys["FillMode"]       = new EnumProperty(typeof(FillDrawModeEnum));

            EnumPropertys["Histogram"] = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["Histogram"].Set("Hide");


            EnumPropertys["SourceMode"] = new EnumProperty(typeof(SourceDrawModeEnum));
            if (graph != null)
            {
                EnumPropertys["DrawSource"] = new EnumProperty(graph.GetAddedNames());
            }
        }
        private List <double> pixelSumResults = new List <double>(); // пересчитывается только на bReqFullUpdate = !m_isSelfClearOut || (pixelSumResults.Count == 0)

        public PixelSumFilter(GraphFilter graph, string name) : base(graph, name)
        {
            Type = FilterType.PixelSum;
            EnumPropertys["Draw"] = new EnumProperty(typeof(FilterDrawMode));
            IntPropertys["y"]     = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 255, Value = 30
            };

            IntPropertys["r"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 255, Value = 255
            };
            IntPropertys["g"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 255, Value = 0
            };
            IntPropertys["b"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 255, Value = 0
            };
        }
        public RotationFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type = FilterType.Rotation;
            FloatPropertys["Deg"] = new NumProperty <double>()
            {
                MaxVal = 360, MinVal = 0, Value = 0
            };
            FloatPropertys["Scale"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = 0, Value = 1
            };

            FloatPropertys["xc"] = new NumProperty <double>()
            {
                MaxVal = 1, MinVal = 0, Value = 0.5
            };
            FloatPropertys["yc"] = new NumProperty <double>()
            {
                MaxVal = 1, MinVal = 0, Value = 0.5
            };


            IntPropertys["NewSize"] = new NumProperty <int>()
            {
                MaxVal = 1, MinVal = 0, Value = 0
            };
            IntPropertys["Width"] = new NumProperty <int>()
            {
                MaxVal = 4096, MinVal = 0, Value = 320
            };
            IntPropertys["Height"] = new NumProperty <int>()
            {
                MaxVal = 4096, MinVal = 0, Value = 240
            };

            EnumPropertys["Inter"] = new EnumProperty(typeof(Inter));
            EnumPropertys["Inter"].Set("Area");
        }
Beispiel #26
0
        public ContourAreaSelectFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.ContourAreaSelect;
            EnumPropertys["DrawOn"]       = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["BoundingRect"] = new EnumProperty(typeof(FilterDrawMode));

            IntPropertys["X"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
            IntPropertys["Y"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
            IntPropertys["SizeX"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
            IntPropertys["SizeY"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
        }
Beispiel #27
0
        public RectExportFilter(GraphFilter graph, string name) : base(graph, name)
        {
            Type = FilterType.RectExport;
            EnumPropertys["DrawOn"]     = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["ExportMode"] = new EnumProperty(typeof(RectExportMode));

            IntPropertys["AbsWidth"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };
            IntPropertys["AbsHeight"] = new NumProperty <int>()
            {
                MinVal = 0, MaxVal = 4096, Value = 100
            };

            FloatPropertys["ScaleWidth"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 20, Value = 1
            };
            FloatPropertys["ScaleHeight"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 20, Value = 1
            };
        }
Beispiel #28
0
        public ToAraundContourFilter(GraphFilter graph, string name = null) : base(graph, name)
        {
            Type = FilterType.ContourAraund;
            EnumPropertys["DrawOn"]       = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["BoundingRect"] = new EnumProperty(typeof(FilterDrawMode));
            EnumPropertys["FillMode"]     = new EnumProperty(typeof(FillDrawModeEnum));

            EnumPropertys["CenterMode"] = new EnumProperty(typeof(CenterDrawMode));
            IntPropertys["HScale"]      = new NumProperty <int>()
            {
                MinVal = 1, MaxVal = 50, Value = 1
            };
            FloatPropertys["RScale"] = new NumProperty <double>()
            {
                MinVal = 0, MaxVal = 2, Value = 1
            };


            EnumPropertys["MovingType"] = new EnumProperty(typeof(MovingPredictType));
            IntPropertys["MovingRange"] = new NumProperty <int>()
            {
                MinVal = 1, MaxVal = 10, Value = 1
            };
        }
        public MergeFilter(GraphFilter graph = null, string name = null) : base(graph, name)
        {
            Type       = FilterType.Merge;
            SourceType = new DataType()
            {
                Source = true, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };
            DestinationType = new DataType()
            {
                Source = true, depth = Emgu.CV.CvEnum.DepthType.Cv8U
            };

            FloatPropertys["Alpha"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = -10, Value = 0.5
            };
            FloatPropertys["Beta"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = -10, Value = 0.5
            };
            FloatPropertys["Gamma"] = new NumProperty <double>()
            {
                MaxVal = 10, MinVal = -10, Value = 0
            };


            if (graph != null)
            {
                EnumPropertys["BetaSource"] = new EnumProperty(graph.GetAddedNames());
            }

            //IntPropertys["SourcesID"] = new NumProperty<int>() { MaxVal = 10, MinVal = 0, Value = 0 };
            //IntPropertys["OutID"] = new NumProperty<int>() { MaxVal = 10, MinVal = 0, Value = 0 };

            FilePropertys["BetaFileImg"] = new FileInfo("");
        }
Beispiel #30
0
        private static BaseFilter CreateFilter(FilterType type, GraphFilter graph = null, string name = null)
        {
            switch (type)
            {
            case FilterType.Source: return(new MatSourceFilter(graph, name));

            case FilterType.BGRBlank: return(new CreateBgrFilter(graph, name));

            case FilterType.File: return(new LoadBgrFilter(graph, name));

            case FilterType.SourceSwipe: return(new SourceSwipeFilter(graph, name));

            case FilterType.Split: return(new SplitFilter(graph, name));

            case FilterType.Select: return(new SelectFilter(graph, name));

            case FilterType.Append: return(new AppendSourceFilter(graph, name));

            case FilterType.Merge: return(new MergeFilter(graph, name));

            case FilterType.MergeInSrc: return(new MergeInSrcFilter(graph, name));

            case FilterType.Negative: return(new NegativeFilter(graph, name));

            case FilterType.Bgr2Gray: return(new Bgr2GrayFilter(graph, name));

            case FilterType.Gray2Bgr: return(new Gray2BgrFilter(graph, name));

            case FilterType.ResizeAbs: return(new ResizeAbsFilter(graph, name));

            case FilterType.Resize: return(new ResizeFilter(graph, name));

            case FilterType.Rotation: return(new RotationFilter(graph, name));

            case FilterType.Blur: return(new BlurFilter(graph, name));

            case FilterType.Morphology: return(new MorphologyFilter(graph, name));

            case FilterType.Threshold: return(new ThresholdFilter(graph, name));

            case FilterType.Gradient: return(new GradientFilter(graph, name));

            case FilterType.Conv2D3K: return(new Conv2DFilter(graph, name, 3)
                {
                    Type = FilterType.Conv2D3K
                });

            case FilterType.Conv2D5K: return(new Conv2DFilter(graph, name, 5)
                {
                    Type = FilterType.Conv2D5K
                });;

            case FilterType.Conv2D7K: return(new Conv2DFilter(graph, name, 7)
                {
                    Type = FilterType.Conv2D7K
                });;

            case FilterType.PixelSum: return(new PixelSumFilter(graph, name));

            case FilterType.AddRect: return(new RectDataAddFilter(graph, name));

            case FilterType.RectShift: return(new RectShiftFilter(graph, name));

            case FilterType.CropRect: return(new CropRectFilter(graph, name));

            case FilterType.RectExport: return(new RectExportFilter(graph, name));

            case FilterType.Histogram: return(new HistogramFilter(graph, name));

            case FilterType.ContourSearch: return(new ContourSearchFilter(graph, name));

            case FilterType.ContourSort: return(new ContourSortFilter(graph, name));

            case FilterType.ContourAreaSelect: return(new ContourAreaSelectFilter(graph, name));

            case FilterType.ContourSingleSelect: return(new SelectSingleContourFilter(graph, name));

            case FilterType.ContourAraund: return(new ToAraundContourFilter(graph, name));

            case FilterType.ContourShift: return(new ContourShiftFilter(graph, name));

            case FilterType.ContourMaskMerge: return(new MergeWithMaskContourFilter(graph, name));

            case FilterType.LUT: return(new BgrLUTFilter(graph, name));
            }
            return(null);
        }