我试图找到一种方法将窗口内容从 matplotlib 直接复制到内存中 - 我想避免将其保存到中间 PNG 文件中,只是为了将其读回内存,如下所示。有什么建议吗?谢谢。from matplotlib import pyplot as plt# draw into window with detected objects bounding boxesax = utils.viz.plot_bbox(img, bbox, scores=scores, labels=labels, thresh=ARGS.thresh, class_names=CLASSNAMES, absolute_coordinates=False)plt.show(block=False)# capture contents of window to diskplt.savefig ('out.png') # read from disk for use down streamimg2 = cv2.imread('out.png')# use img2 down stream
添加回答
举报
0/150
提交
取消