-
-
Save hewumars/d165a82c00df13e4eb7d314e0d513a3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
# Needed before pyplot import for matplotlib to work properly. | |
# matplotlib.use('Agg') | |
import matplotlib.image as mpimg | |
import matplotlib.pyplot as plt | |
from matplotlib.widgets import RectangleSelector | |
from matplotlib.patches import Circle,Rectangle | |
fig = plt.figure() # make a new plotting range | |
im = mpimg.imread(query_image_paths[idx]) # HxWxC | |
plt.imshow(im) | |
currentAxis = plt.gca() | |
#画圆 | |
cir = plt.Circle(xy=(100,100), radius=10) | |
currentAxis.add_patch(cir) | |
#画框 | |
rect=patches.Rectangle(xy=(200, 600),550,650,linewidth=1,edgecolor='r',facecolor='none') | |
currentAxis.add_patch(rect) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment