Merge branch 'master' of code.dev.sbb.berlin:qurator/mono-repo

pull/1/head
Gerber, Mike 5 years ago
commit 103cfa0565

@ -51,7 +51,7 @@ class textlineerkenner:
self.model_region_dir = dir_models + '/model_strukturerkennung.h5' self.model_region_dir = dir_models + '/model_strukturerkennung.h5'
self.model_textline_dir = dir_models + '/model_textline.h5' self.model_textline_dir = dir_models + '/model_textline.h5'
def find_polugons_size_filter(self, contours, median_area, scaler_up=1.2, scaler_down=0.8): def find_polygons_size_filter(self, contours, median_area, scaler_up=1.2, scaler_down=0.8):
found_polygons_early = list() found_polygons_early = list()
for c in contours: for c in contours:
@ -992,7 +992,7 @@ class textlineerkenner:
contours, hirarchy = cv2.findContours(thresh.copy(), cv2.cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) contours, hirarchy = cv2.findContours(thresh.copy(), cv2.cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
contours_slope = contours # self.find_polugons_size_filter(contours,median_area=median_area,scaler_up=100,scaler_down=0.5) contours_slope = contours # self.find_polygons_size_filter(contours,median_area=median_area,scaler_up=100,scaler_down=0.5)
if len(contours_slope) > 0: if len(contours_slope) > 0:
for jv in range(len(contours_slope)): for jv in range(len(contours_slope)):

Loading…
Cancel
Save