学习图像处理知识---EmguCV3.4图像白平衡操作(新版本不一样)

新版EmguCV3.4图像白平衡跟以前版本不一样,现在单独成立一个类进行。

public class GrayworldWB : WhiteBalancer
public class LearningBasedWB : WhiteBalancer

Namespace:  Emgu.CV.XPhoto Assembly:  Emgu.CV.World (in Emgu.CV.World.dll)

public int RangeMaxVal { get; set; }

public int HistBinNum { get; set; }

public float SaturationThreshold { get; set; }  //用于设定参数
主要函数:
public void BalanceWhite(IInputArray src,IOutputArray dst)//输入和输出的图像

实际应用:

 a2 = new Image<Bgr, byte>((Bitmap)pictureBox4.Image);
            GrayworldWB kb = new GrayworldWB();
            kb.SaturationThreshold =(float) numericUpDown1.Value; //设定参数
            kb.BalanceWhite(a2, a2);  //执行

            pictureBox5.Image = a2.Bitmap;

参数为零时


参数有值时:




猜你喜欢

转载自blog.csdn.net/tuto7534/article/details/80256177