Esempio n. 1
0
        public SetRecogLine(HanlderNoParams refreshImageShow)
        {
            this.refreshImageShow = refreshImageShow;

            InitializeComponent();

            this.InitialInfo();
        }
Esempio n. 2
0
        public SetColorLabel(HanlderNoParams refreshImageShow)
        {
            this.refreshImageShow = refreshImageShow;

            InitializeComponent();

            this.InitialInfo();
        }
Esempio n. 3
0
        private void InitialInfo()
        {
            this.fileDialog        = new OpenFileDialog();
            this.fileDialog.Title  = "请选择待分析的文件(视频在video,图片在image)";
            this.fileDialog.Filter = "待分析文件(*.*)|*.*";

            this.imgBox.Location       = new Point(12, 31);
            this.imgBox.FunctionalMode = Emgu.CV.UI.ImageBox.FunctionalModeOption.Minimum;

            this.pnNetLine          = new UcPanel(this.ShowLineAngle);
            this.pnNetLine.Location = this.imgBox.Location;
            this.imgScale           = this.pnNetLine.ImageScale;
            this.Controls.Add(this.pnNetLine);
            this.pnNetLine.BringToFront();
            //this.lbAngle.BackColor =

            this.delegateDrawInfo        = new HanlderNoParams(this.DrawRecognizedInfo);
            this.delegateDrawNet         = new HanlderNoParams(this.DrawNetLine);
            this.delegateVideoScroll     = new HanlderNoParams(this.moveVideoScroll);
            this.delegateChangeShowScale = new Action <double>(childSetImgShowScale);

            this.videoFrame  = new Mat();
            this.testFrame   = new Mat();
            this.algoHandler = new Algorithm();

            Constants.MinRecogRectArea    = int.Parse(Ini.GetItemValue("general", "minLabelArea"));
            Constants.MaxRecogRectArea    = int.Parse(Ini.GetItemValue("general", "maxLabelArea"));
            Constants.MinRecogRectWHRatio = float.Parse(Ini.GetItemValue("general", "minLabelWHRatio"));
            Constants.MaxRecogRectWHRatio = float.Parse(Ini.GetItemValue("general", "maxLabelWHRatio"));
            Constants.AutoRecogColorFlag  = bool.Parse(Ini.GetItemValue("general", "autoColorRecog"));
            Constants.LabelColor          = int.Parse(Ini.GetItemValue("general", "labelColor"));

            Constants.ShowNetFlag          = bool.Parse(Ini.GetItemValue("general", "showNet"));
            Constants.NetLineWidth         = int.Parse(Ini.GetItemValue("general", "netLineWidth"));
            Constants.LineSeperationHeight = int.Parse(Ini.GetItemValue("general", "netHeight"));
            Constants.LineSeperationWidth  = int.Parse(Ini.GetItemValue("general", "netWidth"));
            Constants.ColorNetLine         = Color.FromArgb(int.Parse(Ini.GetItemValue("general", "netLineColor")));

            Constants.RecogCircleWidthInner = int.Parse(Ini.GetItemValue("general", "selectedLineWidth"));
            Constants.RecogCircleColorInner = Color.FromArgb(int.Parse(Ini.GetItemValue("general", "selectedLineColor")));

            Constants.RecogCircleRadiusBK    = int.Parse(Ini.GetItemValue("general", "recogPointRadius"));
            Constants.RecogCircleRadiusInner = int.Parse(Ini.GetItemValue("general", "recogPointLineRadius"));
            Constants.RecogCircleWidthInner  = int.Parse(Ini.GetItemValue("general", "recogPointLineWidth"));
            Constants.RecogCircleColorBK     = Color.FromArgb(int.Parse(Ini.GetItemValue("general", "recogPointColor")));
            Constants.RecogCircleColorInner  = Color.FromArgb(int.Parse(Ini.GetItemValue("general", "recogPointLineColor")));
        }