示例#1
0
        public FrameShooterSign()
        {
            try
            {
                mc = new MessageClient();
                curDir = Directory.GetCurrentDirectory();
                img2 = Image.FromFile(String.Format("{0}/Resources/ImageStop/HexagonRed.jpg", Directory.GetCurrentDirectory()));
                stopDetector = new SignDetector(new Image<Bgr, byte>(new Bitmap(img2)).Resize(320, 240, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC));                                
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            InitializeComponent();

        }
示例#2
0
        public FormStopSignDetector()
        {
            try
            {
                mc = new MessageClient();
                curDir = Directory.GetCurrentDirectory();
                img2 = Image.FromFile(String.Format("{0}/Resources/ImageStop/StopSignNorthAmerican.png", Directory.GetCurrentDirectory()));
                stopDetector = new SignDetector(new Image<Bgr, byte>(new Bitmap(img2)).Resize(320, 240, Emgu.CV.CvEnum.INTER.CV_INTER_CUBIC));                                
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            InitializeComponent();
            //Load haarcascades for face detection
            
            //eye = new HaarCascade("haarcascade_eye.xml");            

        }