cools commited on
Commit
2b1c910
·
1 Parent(s): 5b63bc4

Update Tagger.py

Browse files
Files changed (1) hide show
  1. Tagger.py +1 -1
Tagger.py CHANGED
@@ -77,7 +77,7 @@ def draw_line_above_sent(folderpath, sent, para_ind, color=(0,0,0)):
77
  line_data = eval(data_df[data_df['Pg Ind'] == pg_ind]['Lines'].tolist()[0])[line_ind]
78
  line_bbox = line_data[0:-1]
79
  image = cv2.imread(folderpath + '/' + str(pg_ind) + '-processed.png')
80
- image = cv2.line(image, (line_bbox[0] - 10, line_bbox[1]), (line_bbox[2] + 10, line_bbox[1]), thickness=2)
81
  cv2.imwrite(folderpath + '/' + str(pg_ind) + '-processed.png', image)
82
 
83
  def process_file(folderpath, draw=False):
 
77
  line_data = eval(data_df[data_df['Pg Ind'] == pg_ind]['Lines'].tolist()[0])[line_ind]
78
  line_bbox = line_data[0:-1]
79
  image = cv2.imread(folderpath + '/' + str(pg_ind) + '-processed.png')
80
+ image = cv2.line(image, (line_bbox[0] - 10, line_bbox[1]), (line_bbox[2] + 10, line_bbox[1]), color=color, thickness=2)
81
  cv2.imwrite(folderpath + '/' + str(pg_ind) + '-processed.png', image)
82
 
83
  def process_file(folderpath, draw=False):