OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
cv::xphoto::GrayworldWB 类参考抽象类

灰度世界白平衡算法。 更多...

#include <opencv2/xphoto/white_balance.hpp>

cv::xphoto::GrayworldWB 的协作图

公共成员函数

virtual float getSaturationThreshold () const =0
 包含在灰度世界假设中的像素的最大饱和度。
 
virtual void setSaturationThreshold (float val)=0
 包含在灰度世界假设中的像素的最大饱和度。
 
- 继承自 cv::xphoto::WhiteBalancer 的公共成员函数
virtual void balanceWhite (InputArray src, OutputArray dst)=0
 将白平衡应用于输入图像。
 
- 继承自 cv::Algorithm 的公共成员函数
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 清除算法状态。
 
virtual bool empty () const
 如果 Algorithm 为空(例如,在最开始或在不成功的读取之后),则返回 true。
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 从文件存储中读取算法参数。
 
virtual void save (const String &filename) const
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 
virtual void write (FileStorage &fs) const
 将算法参数存储到文件存储中。
 
void write (FileStorage &fs, const String &name) const
 

附加的继承成员

- 继承自 cv::Algorithm 的静态公共成员函数
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 从文件中加载算法。
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 从字符串加载算法。
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 从文件节点读取算法。
 
- 继承自 cv::Algorithm 的保护成员函数
void writeFormat (FileStorage &fs) const
 

详细描述

灰度世界白平衡算法。

此算法基于灰度世界假设缩放像素值,该假设声明所有通道的平均值应产生灰度图像。

它添加了一个修改,该修改基于像素的饱和度值对像素进行阈值处理,并且仅使用低于提供的阈值的像素来查找平均像素值。

对于每个像素 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 意味着不使用任何像素。 较低的阈值在白平衡饱和图像中很有用。

当前支持 CV_8UC3CV_16UC3 类型的图像。

成员函数文档

◆ getSaturationThreshold()

virtual float cv::xphoto::GrayworldWB::getSaturationThreshold ( ) const
纯虚函数
Python
cv.xphoto.GrayworldWB.getSaturationThreshold() -> retval

包含在灰度世界假设中的像素的最大饱和度。

另请参见
setSaturationThreshold

◆ setSaturationThreshold()

virtual void cv::xphoto::GrayworldWB::setSaturationThreshold ( float val)
纯虚函数
Python
cv.xphoto.GrayworldWB.setSaturationThreshold(val) ->

包含在灰度世界假设中的像素的最大饱和度。

另请参见
getSaturationThreshold

此类文档从以下文件生成