Exemple #1
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]);
                }
            }
        }
 public AppendSourceFilter(GraphFilter graph = null, string name = null) : base(graph, name)
 {
     Type = FilterType.Append;
     if (graph != null)
     {
         EnumPropertys["AppendSource"] = new EnumProperty(graph.GetAddedNames());
     }
 }
Exemple #3
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());
            }
        }
        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("");
        }
 public SourceSwipeFilter(GraphFilter graph, string name = null) : base(graph, name)
 {
     Type = FilterType.SourceSwipe;
     EnumPropertys["FromSource"] = new EnumProperty(graph.GetAddedNames());
 }
Exemple #6
0
 public MergeWithMaskContourFilter(GraphFilter graph, string name = null) : base(graph, name)
 {
     Type = FilterType.ContourMaskMerge;
     EnumPropertys["DrawSource"] = new EnumProperty(graph.GetAddedNames());
     EnumPropertys["Exchange"]   = new EnumProperty(typeof(FilterLogicMode));
 }