基于python的图像运算(算术)
1、图像加载:img=cv2.imread('a.png')进行乘法运算:a = 坡纠课柩img*2

3、分离色彩,也可以用乘法实现:a = img*[0,1,0]a = img*[1,1,0]

4、这样,可以加深某一种颜色,减弱另一种颜色:a = img*[0.9,3,2]

6、看看img和img0能不能相加:a = img+img0结果报错:ValueError: operands could not be broadcast together with shapes (572,765,3) (546,726,3)原因是两幅图片的尺寸不同。

8、此时的a+d是可以实现的。


声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:65
阅读量:91
阅读量:73
阅读量:43
阅读量:91