OpenCv学习笔记(三):使用addweighted函数将两幅图像叠加

      在图像处理的操作中经常会遇到将图像叠加的问题,这在opencv中提供了极好的支持,如addweighted函数,下面将该函数的帮助部分略微说一下:

C++: void addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray
dst, int dtype=-1)

Parameters
src1 – First source array.
alpha – Weight for the first array elements.
src2 – Second source array of the same size and channel number as src1 .
beta – Weight for the second array elements.
dst – Destination array that has the same size and number of channels as the input arrays.
gamma – Scalar added to each sum.
dtype – Optional depth of the destination array. When both input arrays have the same
depth, dtype can be set to -1, which will be equivalent to src1.depth().
The function addWeighted calculates the weighted sum of two arrays as follows:
dst(I) = saturate(src1(I) alpha + src2(I) beta + gamma)
where I is a multi-dimensio

  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值