def make_img(self,size):
c_w ,c_h = max(1,size[0]/30),max(1,size[1]/30)
coarse = np.random.randint(0,200,size=(int(c_h),int(c_w),3)).astype(np.uint8)
# coarse[:,:,1] /=5
# coarse[:,:,2] *=0
# coarse[:,:,1] /=30
# self._img = np.ones((size[1],size[0],3),dtype=np.uint8)
self._img = cv2.resize(coarse,size,interpolation=cv2.INTER_LANCZOS4)
评论列表
文章目录