protected void stream_NewDepthFrame(object sender, Bitmap colorImage, DepthMap depthMap)
        {
            //Restart The Stopwatch To Calculate How Much Time Does It Take To Process The Image
            delayStopWatch.Restart();

            Image depthImage = depthMap.GetImage();
            Thread.Sleep(20);
            OriginalCurrentFrame = new VisionImage(colorImage, depthMap);
            ProccessedCurrentFrame = imgProcessor.ProcessImage((Bitmap)OriginalCurrentFrame.colorImage.Clone(), ToteDetectionMethod, detectBins, OriginalCurrentFrame.depthMap.Copy());

            updateGuiFunction(OriginalCurrentFrame.colorImage, ProccessedCurrentFrame.colorImage,
                depthImage);

            newData = true;
            fpsCounter++;
            delayStopWatch.Stop();
            delayCounter += (int)delayStopWatch.ElapsedMilliseconds;
        }
        // Called For Each Frame Received
        protected void stream_NewFrame(object sender, NewFrameEventArgs eventArgs)
        {
            //Restart The Stopwatch To Calculate How Much Time Does It Take To Process The Image
            delayStopWatch.Restart();



            OriginalCurrentFrame = new VisionImage((Image)eventArgs.Frame.Clone(), null);
            try {
                ProccessedCurrentFrame = imgProcessor.ProcessImage((Bitmap)OriginalCurrentFrame.colorImage.Clone(), ToteDetectionMethod, detectBins, OriginalCurrentFrame.depthMap.Copy());
            }
            catch
            {
                ProccessedCurrentFrame = imgProcessor.ProcessImage((Bitmap)OriginalCurrentFrame.colorImage.Clone(), ToteDetectionMethod, detectBins);
            }
            updateGuiFunction(OriginalCurrentFrame.colorImage, ProccessedCurrentFrame.colorImage, null);

            newData = true;
            fpsCounter++;
            delayStopWatch.Stop();
            delayCounter += (int)delayStopWatch.ElapsedMilliseconds;
        }