//яркость private void button7_Click(object sender, EventArgs e) { if (!int.TryParse(textBox1.Text, out b)) { b = 1; } if (sourceImage == null) { MessageBox.Show("Выберите изображение", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { imageBox2.Image = Bright.Brig(b, sourceImage).Resize(320, 240, Inter.Linear); } }
public static Image <Bgr, byte> Wclr(string br, string co, string kk1, string kk2, Image <Bgr, byte> sourceImage, Image <Bgr, byte> sourceImage2) { var Imag1 = sourceImage.Copy().Resize(320, 240, Inter.Linear); var Imag2 = sourceImage2.Copy().Resize(320, 240, Inter.Linear); int b = int.Parse(br); double c = double.Parse(co); double k1 = double.Parse(kk1); double k2 = double.Parse(kk2); Imag1 = Bright.Brig(b, Imag1).Resize(320, 240, Inter.Linear); Imag1 = Contrast.Contr(c, Imag1).Resize(320, 240, Inter.Linear); Imag1 = Blur.BlurImg(Imag1).Resize(320, 240, Inter.Linear); Imag1 = Add.AddImg(k1, k2, Imag1, Imag2).Resize(320, 240, Inter.Linear); return(Imag1); }