619观察网,西安大追捕高清全集,过境小兵下载
1、扩图
import cv2 import numpy as np img=cv2.imread('test2.jpg',1) width=img.shape[0] height=img.shape[1] dst=np.zeros((200,200,3),np.uint8) for i in range(200): for j in range(200): if i>30 and j>30 and i<190 and j<120: print(i,j) dst[i,j]=img[i-30,j-30] else: dst[i,j]=(111,111,111) cv2.imshow('dst',dst) cv2.imshow('src',img) redst=cv2.resize(dst,(64,128)) cv2.imwrite('34.jpg',redst,[cv2.imwrite_jpeg_quality,100]) cv2.waitkey(0)
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Python 实现将numpy中的nan和inf,nan替换成对应的均值
python爬虫把url链接编码成gbk2312格式过程解析
网友评论