Skip to content
Snippets Groups Projects
Commit fa2de474 authored by Luis Salamanca's avatar Luis Salamanca
Browse files
parents 4e0b062b a0d77ab6
No related branches found
No related tags found
No related merge requests found
Pipeline #1695 passed
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -168,7 +168,17 @@ def plot_labelled_boxes(img,label_textlines, list_allcoords_textlines, thick_l =
color_vec = 'yellow', thick_line = thick_l)
for ind_t in label_textlines['notidentified']:
img_boxes = lines_box(img_boxes, list_allcoords_textlines[:,ind_t].astype(np.uint32),
color_vec = 'yellow', thick_line = thick_l)
color_vec = [0.5, 0, 0.7], thick_line = thick_l)
groups = ['Footnote', 'Header', 'Header of single col', 'Page number', '1st column',
'2nd column', 'Text in header', 'Not Identified']
colors = ['red', 'blue', 'black', 'green', 'magenta', 'cyan', 'yellow', [0.5, 0, 0.7]]
coords = [30, 30, 40, 40]
inc_page = img_boxes.shape[1]/len(groups)
for ind_g, i_g in enumerate(groups):
legend_toppage(i_g, colors[ind_g], xin, yin)
coords[0] += inc_page
coords[1] += inc_page
return img_boxes
def plot_margins(img, side_margins, topb_margins, gap_line = 2, thick_l = 6):
......@@ -254,4 +264,10 @@ def plot_save_parallel(folder_pickles):
format_fig = 'png'
name_fig = full_filename[:-3] + format_fig
fig.savefig(name_fig, format = format_fig, dpi = 200)
plt.close(fig)
\ No newline at end of file
plt.close(fig)
def legend_toppage(text_l, color_l, coord, img):
lines_box(img, coord, color_l, thick_line = 6)
#plt.Circle((x, y), 3, color = color_l)
plt.text(coord[0] + 4, coord[1], text_l, fontsize = 7, va = 'bottom', ha = 'left')
pass
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment