Example #1
0
 /// <summary>
 /// Image Processing Unit Constructor
 /// </summary>
 /// <param name="streamer">Streamer to get frames from</param>
 /// <param name="ballTracker">Ball Tracker [default is null - will be created]</param>
 /// <param name="imagingData">Imaging data [default is null - will be created]</param>
 /// <param name="analyzerTool">Statistics Tool [default is null - will be created]</param>
 public FrameProcessingUnit(FramePublisher streamer, Tracker ballTracker = null, IImageData imagingData = null, IDetectionAnalyzer analyzerTool = null)
     : base(streamer, imagingData)
 {
     _ballTracker        = ballTracker ?? new BallTracker(ImagingData, streamer);
     AnalyzerTool        = analyzerTool ?? new DetectionStatisticAnalyzer();
     _lastFrameTimeStamp = DateTime.Now;
 }
Example #2
0
 /// <summary>
 /// Private Constructor for Image Processing Pack to be called in factory method
 /// </summary>
 /// <param name="framePublisher">Frame Publisher (streamer)</param>
 /// <param name="uiMonitor">User Interface Frame monitor to show frames</param>
 /// <param name="imagingProcess">Image Processing Unit</param>
 private ImageProcessPack(FramePublisher framePublisher, FrameUiMonitor uiMonitor, ImagingProcess imagingProcess)
 {
     Streamer = framePublisher;
     UiMonitor = uiMonitor;
     ImageProcessUnit = imagingProcess;
     _isCreated = true;
 }
Example #3
0
 /// <summary>
 /// Private Constructor for Image Processing Pack to be called in factory method
 /// </summary>
 /// <param name="framePublisher">Frame Publisher (streamer)</param>
 /// <param name="uiMonitor">User Interface Frame monitor to show frames</param>
 /// <param name="imagingProcess">Image Processing Unit</param>
 private ImageProcessPack(FramePublisher framePublisher, FrameUiMonitor uiMonitor, ImagingProcess imagingProcess)
 {
     Streamer         = framePublisher;
     UiMonitor        = uiMonitor;
     ImageProcessUnit = imagingProcess;
     _isCreated       = true;
 }
Example #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="imagingData">Common imaging data for all Image Processing Unit</param>
 /// <param name="streamer">Frame Streamer used to check if we received new frames</param>
 /// <param name="preprocessor">Image Preparation unit [default is null - will be created]</param>
 /// <param name="motionInspector">Motion Detection unit [default is null - will be created</param>
 public BallTracker(IImageData imagingData, FramePublisher streamer, IImagePreparation preprocessor = null, IMotionDetector motionInspector = null)
     : base(imagingData, preprocessor, motionInspector)
 {
     _streamer = streamer;
     CannyThreshold = DEFAULT_CANNY_THRESHOLD;
     CircleAccumulator = DEFAULT_CIRCLE_ACCUMULATOR_THRESHOLD;
     InverseRatio = DEFAULT_INVERSE_RATIO;
 }
Example #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="imagingData">Common imaging data for all Image Processing Unit</param>
 /// <param name="streamer">Frame Streamer used to check if we received new frames</param>
 /// <param name="preprocessor">Image Preparation unit [default is null - will be created]</param>
 /// <param name="motionInspector">Motion Detection unit [default is null - will be created</param>
 public BallTracker(IImageData imagingData, FramePublisher streamer, IImagePreparation preprocessor = null, IMotionDetector motionInspector = null)
     : base(imagingData, preprocessor, motionInspector)
 {
     _streamer         = streamer;
     CannyThreshold    = DEFAULT_CANNY_THRESHOLD;
     CircleAccumulator = DEFAULT_CIRCLE_ACCUMULATOR_THRESHOLD;
     InverseRatio      = DEFAULT_INVERSE_RATIO;
 }
Example #6
0
        /// <summary>
        /// Constructor for abstract image processing unit
        /// </summary>
        /// <param name="streamer">Publisher to get frames from</param>
        /// <param name="imagingData">Imaging Data [default is null - will be created inside this class]</param>
        public ImagingProcess(FramePublisher streamer, IImageData imagingData = null) : base(streamer)
        {
            ImagingData         = (imagingData != null) ? imagingData : new ImageData();
            BallLocationUpdater = new BallPublisher(ImagingData);

            //create computer vision monitor to display image processing data
            ImageProcessingMonitorA = new ComputerVisionFramesPublisher();
            ImageProcessingMonitorB = new ComputerVisionFramesPublisher();
            ImageProcessingMonitorC = new ComputerVisionFramesPublisher();
            ImageProcessingMonitorD = new ComputerVisionFramesPublisher();
        }
Example #7
0
        /// <summary>
        /// Constructor for abstract image processing unit
        /// </summary>
        /// <param name="streamer">Publisher to get frames from</param>
        /// <param name="imagingData">Imaging Data [default is null - will be created inside this class]</param>
        public ImagingProcess(FramePublisher streamer, IImageData imagingData = null) : base(streamer) 
        {
            ImagingData = (imagingData != null) ? imagingData : new ImageData();
            BallLocationUpdater = new BallPublisher(ImagingData);

            //create computer vision monitor to display image processing data
            ImageProcessingMonitorA = new ComputerVisionFramesPublisher();
            ImageProcessingMonitorB = new ComputerVisionFramesPublisher();
            ImageProcessingMonitorC = new ComputerVisionFramesPublisher();
            ImageProcessingMonitorD = new ComputerVisionFramesPublisher();
        }
Example #8
0
 /// <summary>
 /// Image Processing Unit Constructor
 /// </summary>
 /// <param name="streamer">Streamer to get frames from</param>
 /// <param name="ballTracker">Ball Tracker [default is null - will be created]</param>
 /// <param name="imagingData">Imaging data [default is null - will be created]</param>
 /// <param name="analyzerTool">Statistics Tool [default is null - will be created]</param>
 public FrameProcessingUnit(FramePublisher streamer, Tracker ballTracker = null, IImageData imagingData = null, IDetectionAnalyzer analyzerTool = null)
     : base(streamer, imagingData) 
 {
     _ballTracker = ballTracker ?? new BallTracker(ImagingData, streamer);
     AnalyzerTool = analyzerTool ?? new DetectionStatisticAnalyzer();
     _lastFrameTimeStamp = DateTime.Now;
 }
Example #9
0
 /// <summary>
 /// Demo Processing Unit Constructor
 /// </summary>
 /// <param name="streamer">Demo frame streamer</param>
 /// <param name="imagingData">Imaging Data</param>
 public DemoProcessingUnit(FramePublisher streamer, IImageData imagingData = null)
     : base(streamer, imagingData)
 {
 }
Example #10
0
        /// <summary>
        /// Demo Processing Unit Constructor
        /// </summary>
        /// <param name="streamer">Demo frame streamer</param>
        /// <param name="imagingData">Imaging Data</param>
        public DemoProcessingUnit(FramePublisher streamer, IImageData imagingData = null)
            : base(streamer, imagingData) 
        {

        }