from matplotlib import pyplot as pyl
import cv2
import numpy
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
img_BGR = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
img_gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
cv2.imshow("IMage",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
cv2.imwrite("mytime2.jpg",img)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
cv2.imshow("IMage",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
cv2.imwrite("mytime2.jpg",img)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
cv2.imshow("IMage",img[:100,:200])
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
b,g,r = cv2.split(img)
img = cv2.merge(b,g,r)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
img_2 = numpy.copy(img)
print(img[:3,:3,0]+img_2[:3,:3,0] )
print(cv2.add(img[:3,:3,0],img_2[:3,:3,0]))
img_cat = cv2.imread("C:/Users/xpp/Desktop/time.png")
img_dog = cv2.imread("C:/Users/xpp/Desktop/time1.png")
ret = cv2.addWeighted(img_cat,0.2,img_dog,0.8,0)
cv2.imshow("IMage",ret)
cv2.waitKey(0)
cv2.destroyAllWindows()
from matplotlib import pyplot as pyl
import cv2
import numpy
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
img_BGR = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
img_gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
cv2.imshow("IMage",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
cv2.imwrite("mytime2.jpg",img)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
cv2.imshow("IMage",img)
cv2.waitKey(0)
cv2.destroyAllWindows()
cv2.imwrite("mytime2.jpg",img)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
cv2.imshow("IMage",img[:100,:200])
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
b,g,r = cv2.split(img)
img = cv2.merge(b,g,r)
img = cv2.imread("C:/Users/xpp/Desktop/time2.jpg")
img_2 = numpy.copy(img)
print(img[:3,:3,0]+img_2[:3,:3,0] )
print(cv2.add(img[:3,:3,0],img_2[:3,:3,0]))
img_cat = cv2.imread("C:/Users/xpp/Desktop/time.png")
img_dog = cv2.imread("C:/Users/xpp/Desktop/time1.png")
ret = cv2.addWeighted(img_cat,0.2,img_dog,0.8,0)
cv2.imshow("IMage",ret)
cv2.waitKey(0)
cv2.destroyAllWindows()
本文分享自 图像处理与模式识别研究所 微信公众号,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!