Ejemplo n.º 1
0
        private void cam_NewFrame(object sender, EventArgs e)
        {
            curr_c = new Bitmap((Bitmap)source.Frame().Clone(), preBox.Size);
            if (light)
            {
                curr_br = L_brownFilter.Apply(curr_c);
            }
            else
            {
                curr_br = D_brownFilter.Apply(curr_c);
            }
            curr_gs = gs.Apply(curr_c);

            Action action = () =>
            {
                processed       = ProcessCurrentFrame();
                postBox.Image   = processed;
                preBox.Image    = curr_c;
                backBox.Image   = back;
                colourBox.Image = curr_br;
            };

            if (!this.IsDisposed && !this.Disposing)
            {
                this.Invoke(action);
            }
        }
Ejemplo n.º 2
0
        private void cam_NewFrame(object sender, EventArgs e)
        {
            Bitmap frame  = new Bitmap((Bitmap)cam.Frame().Clone(), currentViewBox.Size);
            Action action = () =>
                            currentViewBox.Image = frame;

            this.Invoke(action);
        }