Beispiel #1
0
        /// <summary>
        /// Create new Camera object.
        /// </summary>
        /// <param name="source">Video source.</param>
        /// <param name="imageProcess">The image process system.</param>
        /// <param name="output">To where output results.</param>
        /// <param name="graphicalOutput">How to change the graphical output.</param>
        /// <param name="pictureBox">Where to display the final image.</param>
        public Camera(IVideoSource source, IImageProcess imageProcess, IOutput output,
                      GraphicalOutputDelegate graphicalOutput, PictureBox pictureBox)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (imageProcess == null)
            {
                throw new ArgumentNullException("imageProcess");
            }
            if (output == null)
            {
                throw new ArgumentNullException("output");
            }
            if (graphicalOutput == null)
            {
                throw new ArgumentNullException("graphicalOutput");
            }
            if (pictureBox == null)
            {
                throw new ArgumentNullException("pictureBox");
            }

            videoSource           = source;
            videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);
            this.imageProcess     = imageProcess;
            this.output           = output;
            this.graphicalOutput  = graphicalOutput;
            this.pictureBox       = pictureBox;
        }
Beispiel #2
0
		/// <summary>
		/// Create new Camera object.
		/// </summary>
		/// <param name="source">Video source.</param>
		/// <param name="imageProcess">The image process system.</param>
		/// <param name="output">To where output results.</param>
		/// <param name="graphicalOutput">How to change the graphical output.</param>
		/// <param name="pictureBox">Where to display the final image.</param>
		public Camera(IVideoSource source, IImageProcess imageProcess, IOutput output, 
			GraphicalOutputDelegate graphicalOutput, PictureBox pictureBox)
		{
			if (source == null) throw new ArgumentNullException("source");
			if (imageProcess == null) throw new ArgumentNullException("imageProcess");
			if (output == null) throw new ArgumentNullException("output");
			if (graphicalOutput == null) throw new ArgumentNullException("graphicalOutput");
			if (pictureBox == null) throw new ArgumentNullException("pictureBox");

			videoSource = source;
			videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);
			this.imageProcess = imageProcess;
			this.output = output;
			this.graphicalOutput = graphicalOutput;
			this.pictureBox = pictureBox;
		
		}