Example #1
0
        public FrameShooterShape()
        {
            try
            {
                mc = new MessageClient();
                curDir = Directory.GetCurrentDirectory();
                //img2 = Image.FromFile(String.Format("{0}/Resources/ImageStop/HexagonRed.jpg", Directory.GetCurrentDirectory()));
                stopDetector = new ShapeDetector();                                
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            InitializeComponent();

        }
Example #2
0
        public FrameShooterColor()
        {
            try
            {
                mc = new MessageClient();
                curDir = Directory.GetCurrentDirectory();
                //img2 = Image.FromFile(String.Format("{0}/Resources/ImageStop/hexagon.png", Directory.GetCurrentDirectory()));
                DisDetector = new PointDetector();                                
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            InitializeComponent();

        }
Example #3
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();

        }
Example #4
0
        public FrameShooterSURF()
        {
            try
            {
                mc = new MessageClient();
                curDir = Directory.GetCurrentDirectory();
                img2 = Image.FromFile(String.Format("{0}/Resources/Feature.jpg", Directory.GetCurrentDirectory()));
                modelImage = new Image<Gray, byte>(new Bitmap(img2));
                                            
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            InitializeComponent();

        }
Example #5
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");            

        }
        /// <summary>
        /// Ensures the disposing of the capture device
        /// </summary>
        /// <param name="e"></param>
        protected override void OnClosing(CancelEventArgs e)
        {
            if (useWebCam)
            {
                _Capture.Stop();
                _Capture.Dispose();
            }
            else if (useNao)
            {
                mc = null;
            }

        }