示例#1
0
        public MatchedImagesTab()
        {
            InitializeComponent();

            _camImageFirst.ImageSourceChanged += (s, e) =>
            {
                _imgLeft = new MaskedImage();
                _imgLeft.FromBitmapSource(e.NewImage);
            };

            _camImageSec.ImageSourceChanged += (s, e) =>
            {
                _imgRight = new MaskedImage();
                _imgRight.FromBitmapSource(e.NewImage);
            };

            _featureDetector = new FeatureDetectionAlgorithmController();
            _featureDetector.StatusChanged += _featureDetector_StatusChanged;
        }
示例#2
0
        public FeatureImagesTab()
        {
            InitializeComponent();

            _camImageFirst.ImageSourceChanged += (s, e) =>
            {
                ImageLeft = new MaskedImage();
                ImageLeft.FromBitmapSource(e.NewImage);
            };

            _camImageSec.ImageSourceChanged += (s, e) =>
            {
                ImageRight = new MaskedImage();
                ImageRight.FromBitmapSource(e.NewImage);
            };

            _matcher = new FeatureMatchingAlgorithm();
            _matcher.StatusChanged += _matcher_StatusChanged;

            _camImageFirst.SelectedPointChanged += OnSelectedPointChanged;
            _camImageSec.SelectedPointChanged += OnSelectedPointChanged;
        }
示例#3
0
        // Finds automatically calibration points on standard calibration image
        // (that is big black dots on white background )
        // In point managment one still have to set correct grid number for each point
        private void FindCalibrationPoints(object sender, RoutedEventArgs e)
        {
            if(_imageControl.ImageSource == null)
                return;

            _finderChooseWindow.ShowDialog();
            if(_finderChooseWindow.Accepted)
            {
                _currentImagePointFinder = (CalibrationPointsFinder)
                    _finderChooseWindow.GetSelectedProcessor("Calibration Points Finder");
                _currentImagePointFinder.PrimaryShapeChecker = (ShapeChecker)
                    _finderChooseWindow.GetSelectedProcessor("Primary CalibShape Qualifier");

                MaskedImage img = new MaskedImage();
                img.FromBitmapSource(_imageControl.ImageSource);
                _currentImagePointFinder.Image = img;
                _currentImagePointFinder.FindCalibrationPoints();

                if(_currentImagePointFinder.Points != null)
                {
                    _currentImagePointFinder.LinesExtractor.ExtractLines();

                    _currentImageGrid = _currentImagePointFinder.Points;
                    RefreshCalibrationPoints();

                    _butAcceptGrid.IsEnabled = true;
                }
            }
        }