图像处理:
一般来说,图像处理算子是带有一幅或多幅输入图像、产生一幅输出图像的函数。
图像变换可分为以下两种:
点算子(像素变换)
邻域(基于区域的)算子
像素变换:
在这一类图像处理变换中,仅仅根据输入像素值(有时可加上某些全局信息或参数)计算相应的输出像素值。
这类算子包括 亮度 和 对比度
调整,以及颜色校正和变换。
亮度和对比度调整:
两种常用的点过程(即点算子),是用常数对点进行 乘法 和 加法 运算:
两个参数 α>0和β 一般称作 增益 和 偏置
参数。我们往往用这两个参数来分别控制 对比度 和 亮度 。
用到的函数:
void Mat::convertTo(OutputArray m, int
rtype, double alpha=1, double
beta=0 )
const¶
Parameters:
m – Destination matrix. If it does not have a
proper size or type before the operation, it is reallocated.
rtype – Desired destination matrix type or,
rather, the depth si