Opencv框选黑色字体进行替换(涉及知识点:selectROI,在控制台输入字体大小,颜色,内容替换所选择的区域)
importcv2fromPILimportImage,ImageDraw,ImageFontimportnumpyasnpimg_path='../img/'img_clean_path='../img_clean/'name='xiao_ben'suf='.png'img=cv2.imread(img_path+name+suf)cv2.imshow('original',img)#选择ROI