类 GrayworldWB
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.xphoto.WhiteBalancer
-
- org.opencv.xphoto.GrayworldWB
-
public class GrayworldWB extends WhiteBalancer
灰度世界白平衡算法。该算法基于灰度世界假设来缩放像素值,该假设指出所有通道的平均值应生成灰度图像。它添加了一个修改,该修改根据像素的饱和度值对像素进行阈值处理,并且仅使用低于提供的阈值的像素来查找平均像素值。对于每个像素 I 的 3 通道 RGB 图像,使用以下公式计算饱和度,范围为 [0, 1]:\( \texttt{Saturation} [I] = \frac{\textrm{max}(R,G,B) - \textrm{min}(R,G,B) }{\textrm{max}(R,G,B)} \) 阈值为 1 表示使用所有像素进行白平衡,而阈值为 0 表示不使用任何像素。较低的阈值在白平衡饱和图像中很有用。目前支持 REF: CV_8UC3 和 REF: CV_16UC3 类型的图像。
-
-
构造函数摘要
构造函数 修饰符 构造函数 描述 保护GrayworldWB(long addr)
-
方法摘要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 描述 static GrayworldWB__fromPtr__(long addr)protected voidfinalize()floatgetSaturationThreshold()像素包含在灰度世界假设中的最大饱和度。另见:setSaturationThresholdvoidsetSaturationThreshold(float val)getSaturationThreshold 参见:getSaturationThreshold-
从类继承的方法 org.opencv.xphoto.WhiteBalancer
balanceWhite
-
从类继承的方法 org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
方法详细信息
-
__fromPtr__
public static GrayworldWB __fromPtr__(long addr)
-
getSaturationThreshold
public float getSaturationThreshold()
像素包含在灰度世界假设中的最大饱和度。另见:setSaturationThreshold- 返回
- 自动生成
-
setSaturationThreshold
public void setSaturationThreshold(float val)
getSaturationThreshold 参见:getSaturationThreshold- 参数
val- 自动生成
-
finalize
protected void finalize() throws java.lang.Throwable- 重写
finalize在类中WhiteBalancer- 抛出
java.lang.Throwable
-
-