mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-14 22:59:53 +02:00
simplify
This commit is contained in:
parent
a1068ff2eb
commit
9d61acf173
2 changed files with 4 additions and 8 deletions
|
@ -4084,10 +4084,8 @@ 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
|
||||
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
|
||||
ind_ins = [jj] * len(contours[jj])
|
||||
indexes_of_textline_tot = indexes_of_textline_tot + ind_ins
|
||||
|
||||
M_main_tot = [cv2.moments(contours_txtline_of_all_textregions[j])
|
||||
for j in range(len(contours_txtline_of_all_textregions))]
|
||||
|
|
|
@ -237,10 +237,8 @@ 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=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)]
|
||||
remained_sep_indexes_without_mother = remained_sep_indexes[mother==0]
|
||||
remained_sep_indexes_with_child_without_mother = remained_sep_indexes[(mother==0) & (child==1)]
|
||||
#print(remained_sep_indexes_without_mother,'remained_sep_indexes_without_mother')
|
||||
#print(remained_sep_indexes_without_mother,'remained_sep_indexes_without_mother')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue