其他分享
首页 > 其他分享> > 18_马赛克效果

18_马赛克效果

作者:互联网

import cv2
img = cv2.imread('ruonan.jpg',1)
Info = img.shape
height = Info[0]
width = Info[1]
for m in range(100,300):
 for n in range(100,200):
  if m%10==0 and n%10==0:
   for k in range(0,10):
    for p in range(0,10):
        img[m+k,n+p] = img[m,n]
cv2.imshow('mskImg',img)
cv2.waitKey(0) 

标签:Info,10,效果,img,18,cv2,range,马赛克,100
来源: https://blog.51cto.com/u_14229365/2923895