Ejemplo n.º 1
0
        public MainViewModel(IDialogService dialogService, IFeedbackService feedbackService, IWindowManager windowManager, FramePanelViewModel framePanel, ControlPanelViewModel controlPanel, StatusBarViewModel statusBar)
        {
            DisplayName = "WebcamMouseController";

            DialogService = dialogService;
            FeedbackService = feedbackService;
            WindowManager = windowManager;

            FramePanel = framePanel;
            ControlPanel = controlPanel;
            StatusBar = statusBar;
        }
Ejemplo n.º 2
0
 public static Configuration SaveConfiguration(ControlPanelViewModel controlPanel)
 {
     return new Configuration
     {
         FrameHistorySize = controlPanel.BackgroundSubstractionOptions.FrameHistorySize,
         BackgroundSubstractionAlgorithms = new List<BackgroundSubstractionAlgorithmViewModel>(controlPanel.BackgroundSubstractionOptions.Items),
         BackgroundSubstractionAlgorithm = controlPanel.BackgroundSubstractionOptions.ActiveItem,
         CannyThreshold = controlPanel.ForegoundExtractionOptions.CannyThreshold,
         CannyLinkingThreshold = controlPanel.ForegoundExtractionOptions.CannyLinkingThreshold,
         CannyLinesColor = controlPanel.ForegoundExtractionOptions.CannyLinesColor.Name,
         CannyLinesThickness = controlPanel.ForegoundExtractionOptions.CannyLinesThickness,
         RectangleColor = controlPanel.ForegoundExtractionOptions.RectangleColor.Name,
         RectangleLinesThickness = controlPanel.ForegoundExtractionOptions.RectangleLinesThickness,
         RectangleHeightScale = controlPanel.ForegoundExtractionOptions.RectangleHeightScale,
         RectangleWidthScale = controlPanel.ForegoundExtractionOptions.RectangleWidthScale,
         HoughTransformationAlgorithm = controlPanel.ForegoundExtractionOptions.ActiveItem,
         HoughTransformationAlgorithms = new List<HoughtTransformationAlgorithmViewModel>(controlPanel.ForegoundExtractionOptions.Items),
         OperationStack = controlPanel.MorphologicalFilteringOptions.OperationStack,
         ApproxMethod = controlPanel.FingerTrackingOptions.ApproxMethod,
         PerimeterScalingFactor = controlPanel.FingerTrackingOptions.PerimeterScalingFactor,
         MinContourArea = controlPanel.FingerTrackingOptions.MinContourArea,
         ConvexHullCW = controlPanel.FingerTrackingOptions.ConvexHullCW,
         ConvexHullColor = controlPanel.FingerTrackingOptions.ConvexHullColor.Name,
         ContourHighlightColor = controlPanel.FingerTrackingOptions.ContourHighlightColor.Name,
         DefectStartPointHighlightColor = controlPanel.FingerTrackingOptions.DefectStartPointHighlightColor.Name,
         DefectEndPointHighlightColor = controlPanel.FingerTrackingOptions.DefectEndPointHighlightColor.Name,
         DefectDepthPointHighlightColor = controlPanel.FingerTrackingOptions.DefectDepthPointHighlightColor.Name,
         DefectLinesColor = controlPanel.FingerTrackingOptions.DefectLinesColor.Name,
         TrackOnlyControlPoint = controlPanel.FingerTrackingOptions.TrackOnlyControlPoint,
         MouseSensitive = controlPanel.MouseControlOptions.MouseSensitive,
         SkinFilter = controlPanel.SkinFilteringOptions.ActiveItem,
         SkinFilters = new List<SkinFilterViewModel>(controlPanel.SkinFilteringOptions.Items),
         ApplyFilter = controlPanel.SmoothFilteringOptions.ApplyFilter,
         SmoothFilter = controlPanel.SmoothFilteringOptions.ActiveItem,
         SmoothFilters = new List<SmoothFilterViewModel>(controlPanel.SmoothFilteringOptions.Items)
     };
 }
Ejemplo n.º 3
0
 private void LoadDesignTimeData()
 {
     FramePanel = new FramePanelViewModel();
     ControlPanel = new ControlPanelViewModel();
 }