Fix missing parenthesis

This commit is contained in:
Pradana AUMARS 2021-07-13 16:36:35 +02:00
parent b005e36fcd
commit 09f5098e19
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ class Video:
color_mask = cv2.inRange(hsv, (0, 0, 190), (179, 20, 255))
# apply mask, inverse image so it's black text on white background, add borders to top and bottom
img = cv2.copyMakeBorder(cv2.bitwise_not(cv2.bitwise_and(img, img, mask=color_mask)), 10, 10, 0, 0, cv2.BORDER_CONSTANT, None, (255,255,255)
img = cv2.copyMakeBorder(cv2.bitwise_not(cv2.bitwise_and(img, img, mask=color_mask)), 10, 10, 0, 0, cv2.BORDER_CONSTANT, None, (255,255,255))
config = '--tessdata-dir "{}" --psm 7 -c preserve_interword_spaces=1'.format(constants.TESSDATA_DIR)
try:
return pytesseract.image_to_data(img, lang=self.lang, config=config)