图像运算(五)——混合(blending)

本文介绍了一种图像混合技术,通过将两幅图像按特定比例(P)进行混合,公式为O(i,j) = P * I1(i,j) + (1-P) * I2(i,j)。当P设为0.5时,两幅图像各占一半。这种运算产生的视觉效果激发了作者对图像处理的兴趣。" 41940101,4825401,手动安装Eclipse MAVEN插件步骤,"['maven', 'java开发', 'eclipse插件', '软件安装']
摘要由CSDN通过智能技术生成

描述:两幅图像各占一定比例的进行混合成一个图像,但是两个占的百分比等于1,

公式描述:O(i,j) = P * I1(i,j) + (1-P) * I2(i,j), 其中P就是混合比(blending ratio)


Code:

  /**
   *Applies the image Blend operator on the specified image arrays,
   *with the specified offset and scale value
   *@param src1_1d The first source image as a pixel array
   *@param src2_1d The second source image as a pixel array
   *@param blend The blending factor a float from 0..1
   *@param width width of the destination image in pixels
   *@param height height of the destination image in pixels
   *@param oset The offset value
   *@param scale The scale value
   *@return A pixel array containing the blended image
   */


public int [] DoBlend(int [] src1_1d, int [] src2_1d, float blend,
			int width, int height, float oset, floa
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值