在图片上绘制线框

import matplotlib.pyplot as plt

from matplotlib.patches import Rectangle

%matplotlib inline

 

plt.imshow(img.numpy())
rect = Rectangle((xmin, ymin), (xmax-xmin), (ymax-ymin), fill=False, color=’red’)
ax = plt.gca()
ax.axes.add_patch(rect)
plt.show()

Comments

No comments yet. Why don’t you start the discussion?

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注