摘要:
1 import cv2 as cv 2 img = cv.imread('C:/Users/87823/Desktop/Aaron_Ecke.jpg') 3 print('原来图片的形状:',img.shape) 4 #resize_img = cv.resize(img,dsize=(150,2 阅读全文
摘要:
1 import cv2 as cv 2 # 读取图片 3 img = cv.imread('C:/Users/87823/Desktop/Aaron_Ecke.jpg') 4 # 显示图片 5 cv.imshow(' BGR_img',img) 6 7 # 将图片进行灰度转换 8 gray_img 阅读全文
摘要:
1 # 导入模块 2 import cv2 as cv 3 # 读取图片 4 img = cv.imread('C:/Users/87823/Desktop/tree.png') 5 # 显示图片 6 cv.imshow('r',img) 7 # 等待键盘输入 8 cv.waitKey(0) 9 # 阅读全文
摘要:
1 from PIL import ImageDraw,Image 2 img = Image.open(r'C:\Users\87823\Desktop\warning.jfif') 3 draw_obj = ImageDraw.Draw(img) 4 w,h = img.size 5 # 创建图 阅读全文
摘要:
1 from PIL import Image,ImageDraw 2 width,height = 300,300 3 img = Image.new('RGB',(width,height),(255,255,255)) 4 draw_obj = ImageDraw.Draw(img) 5 6 阅读全文
摘要:
1 from PIL import Image,ImageFont,ImageDraw 2 import random 3 width,height = 100,100 4 img = Image.new('RGB',(width,height),(255,255,255)) 5 # 获取draw_ 阅读全文
摘要:
1 from PIL import Image,ImageDraw 2 img = Image.open(r'C:\Users\87823\Desktop\tree.png') 3 draw_obj = ImageDraw.Draw(img) 4 w,h = img.size 5 draw_obj. 阅读全文