6월, 2021의 게시물 표시

Image + bbox using matplotlib / cv2

이미지
import matplotlib.pyplot as plt from matplotlib import patches fig, ax = plt.subplots(1) ax.imshow(IMAGE) ax.add_patch(patches.Rectangle((LEFT_TOP_X_Y), WIDTH, HEIGHT, fill=False, edgecolor='blue') 출처: https://www.delftstack.com/ko/howto/matplotlib/how-to-draw-rectangle-on-image-in-matplotlib/ img = cv2 . rectangle ( img , ( 384 , 0 ), ( 510 , 128 ), ( 0 , 255 , 0 ), 3 ) 출처: https://opencv-python.readthedocs.io/en/latest/doc/03.drawShape/drawShape.html

matplotlib marker 추가/제거

fig = plt.Figure() ax = fig.add_subplot(111) ax.plot(list(range(10)), marker="o") ax.lines[0].set_marker(None) ax.lines[0].set_markevery([5, 7])