import matplotlib.pyplot as plt import matplotlib.patches as mpatches # draw rectangles on the original image fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(6, 6)) ax.imshow(img) for x, y, w, h in candidates: print(x, y, w, h) rect = mpatches.Rectangle( (x, y), w, h, fill=False, edgecolor=‘red‘, linewidth=1) ax.add_patch(rect)
原文地址:https://www.cnblogs.com/yuehouse/p/12177887.html
时间: 2024-10-12 05:29:44