更全面的在Draw rectangles with matplotlib
import matplotlib.patches as patches
import matplotlib.pyplot as plt
import cv2
img=cv2.imread("images/1.jpg")
plt.figure(8)
plt.imshow(imgSrc)
currentAxis=plt.gca()
rect=patches.Rectangle((200, 600),550,650,linewidth=1,edgecolor='r',facecolor='none')
currentAxis.add_patch(rect)