OpenCV 学习笔记——cv.addWeighted

OpenCV 学习笔记——cv.addWeighted

addWeighted()函数

addWeighted()函数:用来将两个图片进行融合。

dst	=	cv.addWeighted(	src1, alpha, src2, beta,gamma, dst, dtype)

官方文档解释为

  • src1 first input array.
  • alpha weight of the first array elements.
  • src2 second input array of the same size and channel number as src1.
  • beta weight of the second array elements.
  • gamma scalar added to each sum.
  • dst output array that has the same size and number of channels as the input arrays.
  • dtype optional depth of the output array; when both input arrays have the same depth, dtype can be set to -1, which will be equivalent
    to src1.depth().

大致意思如下

  • src1:插入的第一个图片;
  • src2:插入的第二个图片;
  • alpha:double类型,加权系数,是src1图片的融合占比 ;
  • beta:double类型,加权系数,是src2图片的融合占比;
  • gamma:double类型,加权后图像的偏移量;
  • dst:输出图像;
  • dtype:默认为-1。

该函数的计算公式为

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值