Exemplo n.º 1
0
 private void trackBarGreen_Scroll(object sender, EventArgs e)
 {
     green_color_min = new Gray((double)trackBarGreen.Value - _surrounding);
     green_color_max = new Gray((double)trackBarGreen.Value + _surrounding);
     labelGreen.Text = "Green:" + green_color_min.ToString() + " - " + green_color_max.ToString();
 }
Exemplo n.º 2
0
 private Image<Gray, byte> RGBFilter(Image<Bgr, byte> input, //разбиваем на каналы и фильтруем по цвету
                                     Gray Rmin, Gray Rmax,
                                     Gray Gmin, Gray Gmax,
                                     Gray Bmin, Gray Bmax)
 {
     Image<Gray, byte>[] channels = input.Split();
     channels[0] = channels[0].InRange(Bmin, Bmax);
     channels[1] = channels[1].InRange(Gmin, Gmax);
     channels[2] = channels[2].InRange(Rmin, Rmax);
     Image<Gray, byte> result = channels[0].And(channels[1]);
     result = result.And(channels[2]);
     return result;
 }
Exemplo n.º 3
0
 private void trackBarBlue_Scroll(object sender, EventArgs e)
 {
     blue_color_min = new Gray((double)trackBarBlue.Value - _surrounding);
     blue_color_max = new Gray((double)trackBarBlue.Value + _surrounding);
     labelBlue.Text = "Blue:" + blue_color_min.ToString() + " - " + blue_color_max.ToString();
 }
Exemplo n.º 4
0
 public void trackBarRed_Scroll(object sender, EventArgs e)
 {
     red_color_min = new Gray((double)trackBarRed.Value - _surrounding);
     red_color_max = new Gray((double)trackBarRed.Value + _surrounding);
     labelRed.Text = "Red:" + red_color_min.ToString() + " - " + red_color_max.ToString();
 }