mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-14 22:59:53 +02:00
resolved 2 errors
This commit is contained in:
parent
335aa273a1
commit
25116a2c79
2 changed files with 9 additions and 4 deletions
|
@ -4074,8 +4074,10 @@ class Eynollah:
|
|||
|
||||
ind_textline_inside_tr = list(range(len(contours[jj])))
|
||||
index_textline_inside_textregion = index_textline_inside_textregion + ind_textline_inside_tr
|
||||
ind_ins = [0] * len(contours[jj]) + jj
|
||||
indexes_of_textline_tot = indexes_of_textline_tot + ind_ins
|
||||
#ind_ins = [0] * len(contours[jj]) + jj
|
||||
ind_ins = np.zeros( len(contours[jj]) ) + jj
|
||||
list_ind_ins = list(ind_ins)
|
||||
indexes_of_textline_tot = indexes_of_textline_tot + list_ind_ins
|
||||
|
||||
M_main_tot = [cv2.moments(contours_txtline_of_all_textregions[j])
|
||||
for j in range(len(contours_txtline_of_all_textregions))]
|
||||
|
|
|
@ -237,8 +237,11 @@ def return_x_start_end_mothers_childs_and_type_of_reading_order(
|
|||
if len(remained_sep_indexes)>1:
|
||||
#print(np.array(remained_sep_indexes),'np.array(remained_sep_indexes)')
|
||||
#print(np.array(mother),'mother')
|
||||
remained_sep_indexes_without_mother = remained_sep_indexes[mother==0]
|
||||
remained_sep_indexes_with_child_without_mother = remained_sep_indexes[mother==0 & child==1]
|
||||
##remained_sep_indexes_without_mother = remained_sep_indexes[mother==0]
|
||||
##remained_sep_indexes_with_child_without_mother = remained_sep_indexes[mother==0 & child==1]
|
||||
remained_sep_indexes_without_mother=np.array(list(remained_sep_indexes))[np.array(mother)==0]
|
||||
remained_sep_indexes_with_child_without_mother=np.array(list(remained_sep_indexes))[(np.array(mother)==0) & (np.array(child)==1)]
|
||||
#print(remained_sep_indexes_without_mother,'remained_sep_indexes_without_mother')
|
||||
#print(remained_sep_indexes_without_mother,'remained_sep_indexes_without_mother')
|
||||
|
||||
x_end_with_child_without_mother = x_end[remained_sep_indexes_with_child_without_mother]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue