opencv python版 在图片上画矩形

import cv2
import matplotlib.pyplot as plt
import numpy

im = cv2.imread('image_2.jpg')

square = numpy.array([ [(1827, 695), (1827, 1873), (695, 1873), (695, 714)] ])
cv2.fillPoly(im, square, (169,169,169,0.2))
plt.imshow(im)
plt.axis('off')
plt.show()

  

posted @ 2018-06-16 11:38  even.ctit  阅读(4868)  评论(0编辑  收藏  举报