提交 5635385c 编写于 作者: qq_25193841's avatar qq_25193841

increase font sizes

increase font sizes
上级 975975d3
...@@ -2335,10 +2335,7 @@ class MainWindow(QMainWindow): ...@@ -2335,10 +2335,7 @@ class MainWindow(QMainWindow):
bbox = np.array(region['res']['boxes'][i]) bbox = np.array(region['res']['boxes'][i])
rec_text = region['res']['rec_res'][i][0] rec_text = region['res']['rec_res'][i][0]
# polys to rectangles rext_bbox = [[bbox[0], bbox[1]], [bbox[2], bbox[1]], [bbox[2], bbox[3]], [bbox[0], bbox[3]]]
x1, y1 = np.min(bbox[0::2]), np.min(bbox[::1])
x2, y2 = np.max(bbox[0::2]), np.max(bbox[::1])
rext_bbox = [[x1, y1], [x2, y1], [x2, y2], [x1, y2]]
# save bbox to shape # save bbox to shape
shape = Shape(label=rec_text, line_color=DEFAULT_LINE_COLOR, key_cls=None) shape = Shape(label=rec_text, line_color=DEFAULT_LINE_COLOR, key_cls=None)
......
...@@ -627,7 +627,7 @@ class Canvas(QWidget): ...@@ -627,7 +627,7 @@ class Canvas(QWidget):
# adaptive BBOX label & index font size # adaptive BBOX label & index font size
if self.pixmap: if self.pixmap:
h, w = self.pixmap.size().height(), self.pixmap.size().width() h, w = self.pixmap.size().height(), self.pixmap.size().width()
fontszie = int(max(h, w) / 96) fontszie = int(max(h, w) / 48)
for s in self.shapes: for s in self.shapes:
s.fontsize = fontszie s.fontsize = fontszie
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册