def subplots(img,row_count,col_count,crop_img):
gs = gridspec.GridSpec(2, 2, width_ratios=[4, 3])
plt.subplot(gs[0])
imshow(plt, img)
plt.subplot(gs[1])
plt.plot(np.array(row_count))
plt.subplot(gs[2])
plt.plot(np.array(col_count))
plt.subplot(gs[3])
plt.imshow(crop_img)
plt.show()
#crops an image from both dark and light background
#works best on a single color background
评论列表
文章目录