// Toggles Between Bgr And Hsv Color Formats
 public void ChangeColorFormat(bool isBgr)
 {
     if (isBgr && !(imgProcessor is BgrImageProcessor))
         imgProcessor = new BgrImageProcessor();
     if (!isBgr && !(imgProcessor is HsvImageProcessor))
         imgProcessor = new HsvImageProcessor();
 }
        public Stream(bool isBgr, UpdateGuiOnNewFrameFunction UpdateGuiOnNewFrameFunction = null)
        {
            this.updateGuiFunction = UpdateGuiOnNewFrameFunction;

            ChangeResolution(DefaultResolution);

            delayStopWatch = new System.Diagnostics.Stopwatch();

            if (isBgr) imgProcessor = new BgrImageProcessor();
            else imgProcessor = new HsvImageProcessor();
        }