基于python的图像运算(算术)

 时间:2024-10-19 20:15:29

1、图像加载:img=cv2.imread('a.png')进行乘法运算:a = img*2

基于python的图像运算(算术)

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

基于python的图像运算(算术)

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

基于python的图像运算(算术)

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

基于python的图像运算(算术)

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

基于python的图像运算(算术)基于python的图像运算(算术)
  • 在Typora中怎么表示求和符号?
  • ArcEngine开发[2]:创建要素Feature
  • 在vs2012中用opencv显示图像
  • python eval如何批量生成变量
  • 初步认识WinForm 窗体应用程序开发
  • 热门搜索
    云计算什么意思 vlog是什么意思 敝帚自珍的意思 什么东西越擦越小 琳的意思 中山有什么好玩的 同归于尽的意思 无与伦比的意思 什么是期货交易 头发染什么颜色显白