题目内容
下面的代码是实现图像毛玻璃,在划线处填入适当的代码,将程序补充完整。import cv2 import numpy as np import random img = cv2.imread('123.png', 1) #读取图像 cv2.imshow("image01",img)#获取图像高度信息#获取图像宽度信息 dst = np.zeros((height, width, 3), np.uint8) # 遍历当前图片 for i in range(height - m):for j in range(width - m):index = int(random.random() * 8)(r, g, b) = img[i + index, j + index]dst[i, j] = (r, g, b) cv2.imshow('image', dst) cv2.waitKey(0) cv2.destroyAllWindows()
查看答案
搜索结果不匹配?点我反馈