mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-08 11:49:55 +02:00
typo: s,teil,tile,g
This commit is contained in:
parent
b1b0e97945
commit
e332da34f6
2 changed files with 11 additions and 11 deletions
|
@ -1584,21 +1584,21 @@ def find_number_of_columns_in_document(region_pre_p, num_col_classifier, pixel_l
|
|||
num_col_fin=0
|
||||
peaks_neg_fin_fin=[]
|
||||
|
||||
for iteils in args_big_parts:
|
||||
for itiles in args_big_parts:
|
||||
|
||||
|
||||
regions_without_seperators_teil=regions_without_seperators[int(spliter_y_new[iteils]):int(spliter_y_new[iteils+1]),:,0]
|
||||
#image_page_background_zero_teil=image_page_background_zero[int(spliter_y_new[iteils]):int(spliter_y_new[iteils+1]),:]
|
||||
regions_without_seperators_tile=regions_without_seperators[int(spliter_y_new[iteils]):int(spliter_y_new[iteils+1]),:,0]
|
||||
#image_page_background_zero_tile=image_page_background_zero[int(spliter_y_new[iteils]):int(spliter_y_new[iteils+1]),:]
|
||||
|
||||
#print(regions_without_seperators_teil.shape)
|
||||
##plt.imshow(regions_without_seperators_teil)
|
||||
#print(regions_without_seperators_tile.shape)
|
||||
##plt.imshow(regions_without_seperators_tile)
|
||||
##plt.show()
|
||||
|
||||
#num_col, peaks_neg_fin=self.find_num_col(regions_without_seperators_teil,multiplier=6.0)
|
||||
#num_col, peaks_neg_fin=self.find_num_col(regions_without_seperators_tile,multiplier=6.0)
|
||||
|
||||
#regions_without_seperators_teil=cv2.erode(regions_without_seperators_teil,kernel,iterations = 3)
|
||||
#regions_without_seperators_tile=cv2.erode(regions_without_seperators_teil,kernel,iterations = 3)
|
||||
#
|
||||
num_col, peaks_neg_fin=find_num_col(regions_without_seperators_teil,multiplier=7.0)
|
||||
num_col, peaks_neg_fin=find_num_col(regions_without_seperators_tile,multiplier=7.0)
|
||||
|
||||
if num_col>num_col_fin:
|
||||
num_col_fin=num_col
|
||||
|
|
|
@ -968,7 +968,7 @@ def separate_lines_vertical(img_patch, contour_text_interest, thetha):
|
|||
|
||||
return peaks, textline_boxes_rot
|
||||
|
||||
def separate_lines_new_inside_teils2(img_patch, thetha):
|
||||
def separate_lines_new_inside_tiles2(img_patch, thetha):
|
||||
|
||||
(h, w) = img_patch.shape[:2]
|
||||
center = (w // 2, h // 2)
|
||||
|
@ -1183,7 +1183,7 @@ def separate_lines_new_inside_teils2(img_patch, thetha):
|
|||
img_patch = cv2.erode(img_patch, kernel, iterations=1)
|
||||
return img_patch
|
||||
|
||||
def separate_lines_new_inside_teils(img_path, thetha):
|
||||
def separate_lines_new_inside_tiles(img_path, thetha):
|
||||
(h, w) = img_path.shape[:2]
|
||||
center = (w // 2, h // 2)
|
||||
M = cv2.getRotationMatrix2D(center, -thetha, 1.0)
|
||||
|
@ -1555,7 +1555,7 @@ def separate_lines_new2(img_path, thetha, num_col, slope_region, plotter=None):
|
|||
img_line_rotated = rotate_image(img_resized, slopes_tile_wise[i])
|
||||
img_line_rotated[:, :][img_line_rotated[:, :] != 0] = 1
|
||||
|
||||
img_patch_separated = separate_lines_new_inside_teils2(img_line_rotated, 0)
|
||||
img_patch_separated = separate_lines_new_inside_tiles2(img_line_rotated, 0)
|
||||
|
||||
img_patch_separated_returned = rotate_image(img_patch_separated, -slopes_tile_wise[i])
|
||||
img_patch_separated_returned[:, :][img_patch_separated_returned[:, :] != 0] = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue