Channel filtering

Channel filtering is a process when the user sets up a minimum and a maximum which can not be overextended by any color coordinates. The coordinates above the maximum will be converted to the limit such as those what are below the minimum. In this tutorial you will learn how to create your own color filter including a an image filter that sets the main theme of the image to further improve the capabilities of this filter using Ozeki Camera SDK.

Important: you should study this article in order to find out how to setup your Windows Forms Application correctly.

Properties

In addition to the previously explained fuctions, channel filtering has it's own functions as well.

RedFillOutsideRange: This function sets the filling red coordinate values for the pixels which have their red coordinate value outside the limitations.

GreenFillOutsideRange:This function sets the filling green coordinate values for the pixels which have their green coordinate value outside the limitations.

BlueFillOutsideRange:This function sets the filling blue coordinate values for the pixels which have their blue coordinate value outside the limitations.

FillRed: This function sets the filling red coordinate values for the pixels which have their red coordinate value inside the limitations.

FillGreen:This function sets the filling green coordinate values for the pixels which have their green coordinate value inside the limitations.

FillBlue:This function sets the filling blue coordinate values for the pixels which have their blue coordinate value inside the limitations.

before channel filtering
Figure 1 - Original image

after channel filtering
Figure 2 - Modified image with channel filtering

Windows Form  

Windows forms version

MainForm.cs

using System;
using System.Windows.Forms;
using Ozeki.Camera;
using Ozeki.Media;

namespace MainForm
{
    public partial class MainForm : Form
    {
        private ICamera _camera;
        private DrawingImageProvider _imageProvider;
        private MediaConnector _connector;

        #region Initialize manipulation and filter
        private ImageManipulation _manipulation;
        private OzChannelFiltering _filter;
        #endregion

        public MainForm()
        {
            InitializeComponent();

            _connector = new MediaConnector();
            _imageProvider = new DrawingImageProvider();
            // Create video viewer UI control

            // Bind the camera image to the UI control
            videoViewer.SetImageProvider(_imageProvider);

            _manipulation = new ImageManipulation();
            _manipulation.Start();

            _filter = new OzChannelFiltering();
        }

        private void btn_Connect_Click(object sender, EventArgs e)
        {
            _camera = new WebCamera();

            if (_camera == null) return;

            _connector.Connect(_camera.VideoChannel, _manipulation);
            _connector.Connect(_manipulation, _imageProvider);

            _camera.Start();
            videoViewer.Start();
        }

        private void btn_Add_Click(object sender, EventArgs e)
        {
            _manipulation.Add(_filter);
        }

        private void btn_Remove_Click(object sender, EventArgs e)
        {
            _manipulation.Remove(_filter);
        }

        // CHECKBOXES
 
        private void chk_event_or1(object sender, EventArgs e)
        {
            var chk_or1 = sender as CheckBox;
            var isOrc = (bool)chk_or1.Checked;
            _filter.RedFillOutsideRange = isOrc;
        }

        private void chk_event_or2(object sender, EventArgs e)
        {
            var chk_or2 = sender as CheckBox;
            var isOrc2 = (bool)chk_or2.Checked;
            _filter.GreenFillOutsideRange = isOrc2;
        }

        private void chk_event_or3(object sender, EventArgs e)
        {
            var chk_or3 = sender as CheckBox;
            var isUpy = (bool)chk_or3.Checked;
            _filter.BlueFillOutsideRange = isUpy;
        }

        // FILLCOLOR SLIDERS

        private byte r;
        private byte g;
        private byte b;
        private void fc1_TrackScroll(object sender, EventArgs e)
        {
            var tb_fc1 = sender as TrackBar;
            if (tb_fc1 != null)
            {
                var value = (byte)(tb_fc1.Value);
                r = value;
                _filter.FillRed = r;
                lb_fc1.Text = @"Fill color : " + value;
            }   
        }

        private void fc2_TrackScroll(object sender, EventArgs e)
        {
            var tb_fc2 = sender as TrackBar;
            if (tb_fc2 != null)
            {
                var value = (byte)(tb_fc2.Value);
                g = value;
                _filter.FillGreen = g;
                lb_fc2.Text = @"Fill color : " + value;
            }   
        }

        private void fc3_TrackScroll(object sender, EventArgs e)
        {
            var tb_fc3 = sender as TrackBar;
            if (tb_fc3 != null)
            {
                var value = (byte)(tb_fc3.Value);
                b = value;
                _filter.FillBlue = b;
                lb_fc3.Text = @"Fill color : " + value;
            }   
        }

        // RED MIN-MAX

        int rMin, rMin2, rMin3;
        int rMax, rMax2, rMax3;
        private void min1_TrackScroll(object sender, EventArgs e)
        {
            var tb_min1 = sender as TrackBar;
            if (tb_min1 != null)
            {
                var value = tb_min1.Value;
                rMin = value;
                _filter.Red = new OzIntRange (rMin, rMax);
                lb_min1.Text = @"Minimum : " + value;
            }
        }

        private void max1_TrackScroll(object sender, EventArgs e)
        {
            var tb_max1 = sender as TrackBar;
            if (tb_max1 != null)
            {
                var value = tb_max1.Value;
                rMax = value;
                _filter.Red = new OzIntRange(rMin, rMax);
                lb_max1.Text = @"Maximum : " + value;
            }
        }

        // GREEN MIN-MAX

        private void min2_TrackScroll(object sender, EventArgs e)
        {
            var tb_min2 = sender as TrackBar;
            if (tb_min2 != null)
            {
                var value = tb_min2.Value;
                rMin2 = value;
                _filter.Green = new OzIntRange(rMin2, rMax2);
                lb_min2.Text = @"Minimum : " + value;
            }
        }

        private void max2_TrackScroll(object sender, EventArgs e)
        {
            var tb_max2 = sender as TrackBar;
            if (tb_max2 != null)
            {
                var value = tb_max2.Value;
                rMax2 = value;
                _filter.Green = new OzIntRange(rMin2, rMax2);
                lb_max2.Text = @"Maximum : " + value;
            }
        }

        // BLUE MIN-MAX

        private void min3_TrackScroll(object sender, EventArgs e)
        {
            var tb_min3 = sender as TrackBar;
            if (tb_min3 != null)
            {
                var value = tb_min3.Value;
                rMin3 = value;
                _filter.Blue = new OzIntRange(rMin3, rMax3);
                lb_min3.Text = @"Minimum : " + value;
            }
        }

        private void max3_TrackScroll(object sender, EventArgs e)
        {
            var tb_max3 = sender as TrackBar;
            if (tb_max3 != null)
            {
                var value = tb_max3.Value;
                rMax3 = value;
                _filter.Blue = new OzIntRange(rMin3, rMax3);
                lb_max3.Text = @"Maximum : " + value;
            }
        }        
    }
}
		

Code 1 - Channel filtering in C#

GUI

MainForm.Designer.cs

namespace MainForm
{
    partial class MainForm
    {
        /// 
        /// Required designer variable.
        /// 
        private System.ComponentModel.IContainer components = null;

        /// 
        /// Clean up any resources being used.
        /// 
        /// true if managed resources should be disposed; otherwise, false.
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// 
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// 
        private void InitializeComponent()
        {
            this.videoViewer = new Ozeki.Media.VideoViewerWF();
            this.btn_Connect = new System.Windows.Forms.Button();
            this.btn_add = new System.Windows.Forms.Button();
            this.btn_remove = new System.Windows.Forms.Button();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.tb_min1 = new System.Windows.Forms.TrackBar();
            this.lb_min1 = new System.Windows.Forms.Label();
            this.tb_fc1 = new System.Windows.Forms.TrackBar();
            this.tb_max1 = new System.Windows.Forms.TrackBar();
            this.lb_max1 = new System.Windows.Forms.Label();
            this.lb_fc1 = new System.Windows.Forms.Label();
            this.chk_or1 = new System.Windows.Forms.CheckBox();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.lb_max2 = new System.Windows.Forms.Label();
            this.tb_min2 = new System.Windows.Forms.TrackBar();
            this.lb_fc2 = new System.Windows.Forms.Label();
            this.tb_max2 = new System.Windows.Forms.TrackBar();
            this.lb_min2 = new System.Windows.Forms.Label();
            this.tb_fc2 = new System.Windows.Forms.TrackBar();
            this.chk_or2 = new System.Windows.Forms.CheckBox();
            this.lb_fc3 = new System.Windows.Forms.Label();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.lb_max3 = new System.Windows.Forms.Label();
            this.lb_min3 = new System.Windows.Forms.Label();
            this.tb_max3 = new System.Windows.Forms.TrackBar();
            this.tb_min3 = new System.Windows.Forms.TrackBar();
            this.tb_fc3 = new System.Windows.Forms.TrackBar();
            this.chk_or3 = new System.Windows.Forms.CheckBox();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tb_min1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_fc1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_max1)).BeginInit();
            this.groupBox2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tb_min2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_max2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_fc2)).BeginInit();
            this.groupBox3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tb_max3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_min3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_fc3)).BeginInit();
            this.SuspendLayout();
            // 
            // videoViewer
            // 
            this.videoViewer.BackColor = System.Drawing.Color.Black;
            this.videoViewer.FlipMode = Ozeki.Media.FlipMode.None;
            this.videoViewer.FrameStretch = Ozeki.Media.FrameStretch.Uniform;
            this.videoViewer.FullScreenEnabled = true;
            this.videoViewer.Location = new System.Drawing.Point(12, 57);
            this.videoViewer.Name = "videoViewer";
            this.videoViewer.RotateAngle = 0;
            this.videoViewer.Size = new System.Drawing.Size(471, 334);
            this.videoViewer.TabIndex = 0;
            this.videoViewer.Text = "videoViewerWF1";
            // 
            // btn_Connect
            // 
            this.btn_Connect.Location = new System.Drawing.Point(12, 12);
            this.btn_Connect.Name = "btn_Connect";
            this.btn_Connect.Size = new System.Drawing.Size(152, 26);
            this.btn_Connect.TabIndex = 14;
            this.btn_Connect.Text = "Connect to WebCamera";
            this.btn_Connect.UseVisualStyleBackColor = true;
            this.btn_Connect.Click += new System.EventHandler(this.btn_Connect_Click);
            // 
            // btn_add
            // 
            this.btn_add.Location = new System.Drawing.Point(315, 14);
            this.btn_add.Name = "btn_add";
            this.btn_add.Size = new System.Drawing.Size(75, 23);
            this.btn_add.TabIndex = 21;
            this.btn_add.Text = "Add";
            this.btn_add.UseVisualStyleBackColor = true;
            this.btn_add.Click += new System.EventHandler(this.btn_Add_Click);
            // 
            // btn_remove
            // 
            this.btn_remove.Location = new System.Drawing.Point(408, 14);
            this.btn_remove.Name = "btn_remove";
            this.btn_remove.Size = new System.Drawing.Size(75, 23);
            this.btn_remove.TabIndex = 22;
            this.btn_remove.Text = "Remove";
            this.btn_remove.UseVisualStyleBackColor = true;
            this.btn_remove.Click += new System.EventHandler(this.btn_Remove_Click);
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.tb_min1);
            this.groupBox1.Controls.Add(this.lb_min1);
            this.groupBox1.Controls.Add(this.tb_fc1);
            this.groupBox1.Controls.Add(this.tb_max1);
            this.groupBox1.Controls.Add(this.lb_max1);
            this.groupBox1.Controls.Add(this.lb_fc1);
            this.groupBox1.Controls.Add(this.chk_or1);
            this.groupBox1.Location = new System.Drawing.Point(525, 14);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(265, 192);
            this.groupBox1.TabIndex = 24;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Red channel";
            // 
            // tb_min1
            // 
            this.tb_min1.Location = new System.Drawing.Point(95, 94);
            this.tb_min1.Maximum = 255;
            this.tb_min1.Name = "tb_min1";
            this.tb_min1.Size = new System.Drawing.Size(164, 45);
            this.tb_min1.TabIndex = 4;
            this.tb_min1.Scroll += new System.EventHandler(this.min1_TrackScroll);
            // 
            // lb_min1
            // 
            this.lb_min1.AutoSize = true;
            this.lb_min1.Location = new System.Drawing.Point(12, 94);
            this.lb_min1.Name = "lb_min1";
            this.lb_min1.Size = new System.Drawing.Size(48, 13);
            this.lb_min1.TabIndex = 3;
            this.lb_min1.Text = "Minimum";
            // 
            // tb_fc1
            // 
            this.tb_fc1.Location = new System.Drawing.Point(95, 43);
            this.tb_fc1.Maximum = 255;
            this.tb_fc1.Name = "tb_fc1";
            this.tb_fc1.Size = new System.Drawing.Size(164, 45);
            this.tb_fc1.TabIndex = 3;
            this.tb_fc1.Scroll += new System.EventHandler(this.fc1_TrackScroll);
            // 
            // tb_max1
            // 
            this.tb_max1.Location = new System.Drawing.Point(95, 145);
            this.tb_max1.Maximum = 255;
            this.tb_max1.Name = "tb_max1";
            this.tb_max1.Size = new System.Drawing.Size(164, 45);
            this.tb_max1.TabIndex = 1;
            this.tb_max1.Scroll += new System.EventHandler(this.max1_TrackScroll);
            // 
            // lb_max1
            // 
            this.lb_max1.AutoSize = true;
            this.lb_max1.Location = new System.Drawing.Point(12, 145);
            this.lb_max1.Name = "lb_max1";
            this.lb_max1.Size = new System.Drawing.Size(51, 13);
            this.lb_max1.TabIndex = 2;
            this.lb_max1.Text = "Maximum";
            // 
            // lb_fc1
            // 
            this.lb_fc1.AutoSize = true;
            this.lb_fc1.Location = new System.Drawing.Point(12, 43);
            this.lb_fc1.Name = "lb_fc1";
            this.lb_fc1.Size = new System.Drawing.Size(45, 13);
            this.lb_fc1.TabIndex = 1;
            this.lb_fc1.Text = "Fill color";
            // 
            // chk_or1
            // 
            this.chk_or1.AutoSize = true;
            this.chk_or1.Location = new System.Drawing.Point(7, 19);
            this.chk_or1.Name = "chk_or1";
            this.chk_or1.Size = new System.Drawing.Size(92, 17);
            this.chk_or1.TabIndex = 0;
            this.chk_or1.Text = "Outside range";
            this.chk_or1.UseVisualStyleBackColor = true;
            this.chk_or1.CheckedChanged += new System.EventHandler(this.chk_event_or1);
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.lb_max2);
            this.groupBox2.Controls.Add(this.tb_min2);
            this.groupBox2.Controls.Add(this.lb_fc2);
            this.groupBox2.Controls.Add(this.tb_max2);
            this.groupBox2.Controls.Add(this.lb_min2);
            this.groupBox2.Controls.Add(this.tb_fc2);
            this.groupBox2.Controls.Add(this.chk_or2);
            this.groupBox2.Location = new System.Drawing.Point(525, 212);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(265, 206);
            this.groupBox2.TabIndex = 25;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Green channel";
            // 
            // lb_max2
            // 
            this.lb_max2.AutoSize = true;
            this.lb_max2.Location = new System.Drawing.Point(9, 146);
            this.lb_max2.Name = "lb_max2";
            this.lb_max2.Size = new System.Drawing.Size(51, 13);
            this.lb_max2.TabIndex = 4;
            this.lb_max2.Text = "Maximum";
            // 
            // tb_min2
            // 
            this.tb_min2.Location = new System.Drawing.Point(95, 95);
            this.tb_min2.Maximum = 255;
            this.tb_min2.Name = "tb_min2";
            this.tb_min2.Size = new System.Drawing.Size(164, 45);
            this.tb_min2.TabIndex = 4;
            this.tb_min2.Scroll += new System.EventHandler(this.min2_TrackScroll);
            // 
            // lb_fc2
            // 
            this.lb_fc2.AutoSize = true;
            this.lb_fc2.Location = new System.Drawing.Point(9, 44);
            this.lb_fc2.Name = "lb_fc2";
            this.lb_fc2.Size = new System.Drawing.Size(45, 13);
            this.lb_fc2.TabIndex = 4;
            this.lb_fc2.Text = "Fill color";
            // 
            // tb_max2
            // 
            this.tb_max2.Location = new System.Drawing.Point(95, 146);
            this.tb_max2.Maximum = 255;
            this.tb_max2.Name = "tb_max2";
            this.tb_max2.Size = new System.Drawing.Size(164, 45);
            this.tb_max2.TabIndex = 2;
            this.tb_max2.Scroll += new System.EventHandler(this.max2_TrackScroll);
            // 
            // lb_min2
            // 
            this.lb_min2.AutoSize = true;
            this.lb_min2.Location = new System.Drawing.Point(9, 95);
            this.lb_min2.Name = "lb_min2";
            this.lb_min2.Size = new System.Drawing.Size(48, 13);
            this.lb_min2.TabIndex = 3;
            this.lb_min2.Text = "Minimum";
            // 
            // tb_fc2
            // 
            this.tb_fc2.Location = new System.Drawing.Point(95, 44);
            this.tb_fc2.Maximum = 255;
            this.tb_fc2.Name = "tb_fc2";
            this.tb_fc2.Size = new System.Drawing.Size(164, 45);
            this.tb_fc2.TabIndex = 1;
            this.tb_fc2.Scroll += new System.EventHandler(this.fc2_TrackScroll);
            // 
            // chk_or2
            // 
            this.chk_or2.AutoSize = true;
            this.chk_or2.Location = new System.Drawing.Point(7, 20);
            this.chk_or2.Name = "chk_or2";
            this.chk_or2.Size = new System.Drawing.Size(92, 17);
            this.chk_or2.TabIndex = 0;
            this.chk_or2.Text = "Outside range";
            this.chk_or2.UseVisualStyleBackColor = true;
            this.chk_or2.CheckedChanged += new System.EventHandler(this.chk_event_or2);
            // 
            // lb_fc3
            // 
            this.lb_fc3.AutoSize = true;
            this.lb_fc3.Location = new System.Drawing.Point(12, 40);
            this.lb_fc3.Name = "lb_fc3";
            this.lb_fc3.Size = new System.Drawing.Size(45, 13);
            this.lb_fc3.TabIndex = 2;
            this.lb_fc3.Text = "Fill color";
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.lb_max3);
            this.groupBox3.Controls.Add(this.lb_min3);
            this.groupBox3.Controls.Add(this.tb_max3);
            this.groupBox3.Controls.Add(this.tb_min3);
            this.groupBox3.Controls.Add(this.tb_fc3);
            this.groupBox3.Controls.Add(this.lb_fc3);
            this.groupBox3.Controls.Add(this.chk_or3);
            this.groupBox3.Location = new System.Drawing.Point(525, 424);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(265, 207);
            this.groupBox3.TabIndex = 26;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Blue channel";
            // 
            // lb_max3
            // 
            this.lb_max3.AutoSize = true;
            this.lb_max3.Location = new System.Drawing.Point(12, 160);
            this.lb_max3.Name = "lb_max3";
            this.lb_max3.Size = new System.Drawing.Size(51, 13);
            this.lb_max3.TabIndex = 6;
            this.lb_max3.Text = "Maximum";
            // 
            // lb_min3
            // 
            this.lb_min3.AutoSize = true;
            this.lb_min3.Location = new System.Drawing.Point(12, 99);
            this.lb_min3.Name = "lb_min3";
            this.lb_min3.Size = new System.Drawing.Size(48, 13);
            this.lb_min3.TabIndex = 5;
            this.lb_min3.Text = "Minimum";
            // 
            // tb_max3
            // 
            this.tb_max3.Location = new System.Drawing.Point(95, 160);
            this.tb_max3.Maximum = 255;
            this.tb_max3.Name = "tb_max3";
            this.tb_max3.Size = new System.Drawing.Size(164, 45);
            this.tb_max3.TabIndex = 3;
            this.tb_max3.Scroll += new System.EventHandler(this.max3_TrackScroll);
            // 
            // tb_min3
            // 
            this.tb_min3.Location = new System.Drawing.Point(95, 99);
            this.tb_min3.Maximum = 255;
            this.tb_min3.Name = "tb_min3";
            this.tb_min3.Size = new System.Drawing.Size(164, 45);
            this.tb_min3.TabIndex = 2;
            this.tb_min3.Scroll += new System.EventHandler(this.min3_TrackScroll);
            // 
            // tb_fc3
            // 
            this.tb_fc3.Location = new System.Drawing.Point(95, 38);
            this.tb_fc3.Maximum = 255;
            this.tb_fc3.Name = "tb_fc3";
            this.tb_fc3.Size = new System.Drawing.Size(164, 45);
            this.tb_fc3.TabIndex = 1;
            this.tb_fc3.Scroll += new System.EventHandler(this.fc3_TrackScroll);
            // 
            // chk_or3
            // 
            this.chk_or3.AutoSize = true;
            this.chk_or3.Location = new System.Drawing.Point(7, 20);
            this.chk_or3.Name = "chk_or3";
            this.chk_or3.Size = new System.Drawing.Size(92, 17);
            this.chk_or3.TabIndex = 0;
            this.chk_or3.Text = "Outside range";
            this.chk_or3.UseVisualStyleBackColor = true;
            this.chk_or3.CheckedChanged += new System.EventHandler(this.chk_event_or3);
            // 
            // MainForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.SystemColors.Control;
            this.ClientSize = new System.Drawing.Size(802, 644);
            this.Controls.Add(this.groupBox3);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.btn_remove);
            this.Controls.Add(this.btn_add);
            this.Controls.Add(this.btn_Connect);
            this.Controls.Add(this.videoViewer);
            this.Name = "MainForm";
            this.Text = "Channel filtering";
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tb_min1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_fc1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_max1)).EndInit();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tb_min2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_max2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_fc2)).EndInit();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.tb_max3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_min3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tb_fc3)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private Ozeki.Media.VideoViewerWF videoViewer;
        private System.Windows.Forms.Button btn_Connect;
        private System.Windows.Forms.Button btn_add;
        private System.Windows.Forms.Button btn_remove;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.TrackBar tb_min1;
        private System.Windows.Forms.TrackBar tb_fc1;
        private System.Windows.Forms.Label lb_max1;
        private System.Windows.Forms.Label lb_fc1;
        private System.Windows.Forms.CheckBox chk_or1;
        private System.Windows.Forms.GroupBox groupBox2;
        private System.Windows.Forms.TrackBar tb_min2;
        private System.Windows.Forms.Label lb_min2;
        private System.Windows.Forms.Label lb_fc3;
        private System.Windows.Forms.TrackBar tb_max1;
        private System.Windows.Forms.CheckBox chk_or2;
        private System.Windows.Forms.GroupBox groupBox3;
        private System.Windows.Forms.Label lb_max2;
        private System.Windows.Forms.Label lb_min1;
        private System.Windows.Forms.TrackBar tb_max2;
        private System.Windows.Forms.TrackBar tb_fc2;
        private System.Windows.Forms.CheckBox chk_or3;
        private System.Windows.Forms.Label lb_fc2;
        private System.Windows.Forms.Label lb_max3;
        private System.Windows.Forms.Label lb_min3;
        private System.Windows.Forms.TrackBar tb_max3;
        private System.Windows.Forms.TrackBar tb_min3;
        private System.Windows.Forms.TrackBar tb_fc3;
    }
}
		

Code 2 - Channel filtering GUI in C#

Related Pages

Conclusion

With the help of this lecture you can successfully implement channel filtering with your C# camera application using the Ozeki Camera SDK.

FAQ

Below you can find the answers for the most frequently asked questions related to this topic:

  1. What kind of developer environment is needed?

    • Microsoft Visual Studio 2010
    • Microsoft .Net Framework 4.0
    • Internet connection
  2. How can I get the URL of the camera?

    You can get the URL from the producer of the camera.

  3. I have not managed to build the solution. How to solve it?

    • Please set the Target framework property of the project to .NET 4.0.
    • You should add the OzekiSDK.dll to the references of the solution.
    • Please import the missing classes.

More information