mirror of
				https://github.com/qurator-spk/sbb_binarization.git
				synced 2025-10-31 01:24:14 +01:00 
			
		
		
		
	fix region level
This commit is contained in:
		
							parent
							
								
									5d5579957d
								
							
						
					
					
						commit
						8a12d40769
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -124,7 +124,7 @@ class SbbBinarizeProcessor(Processor): | ||||||
|                     LOG.warning("Page '%s' contains no text/table regions", page_id) |                     LOG.warning("Page '%s' contains no text/table regions", page_id) | ||||||
|                 for region in regions: |                 for region in regions: | ||||||
|                     region_image, region_xywh = self.workspace.image_from_segment(region, page_image, page_xywh, feature_filter='binarized') |                     region_image, region_xywh = self.workspace.image_from_segment(region, page_image, page_xywh, feature_filter='binarized') | ||||||
|                     region_image_bin = cv2pil(binarizer.run(image=pil2cv(region_image))) |                     region_image_bin = cv2pil(self.binarizer.run(image=pil2cv(region_image))) | ||||||
|                     region_image_bin_path = self.workspace.save_image_file( |                     region_image_bin_path = self.workspace.save_image_file( | ||||||
|                             region_image_bin, |                             region_image_bin, | ||||||
|                             "%s_%s.IMG-BIN" % (file_id, region.id), |                             "%s_%s.IMG-BIN" % (file_id, region.id), | ||||||
|  | @ -139,7 +139,7 @@ class SbbBinarizeProcessor(Processor): | ||||||
|                     LOG.warning("Page '%s' contains no text lines", page_id) |                     LOG.warning("Page '%s' contains no text lines", page_id) | ||||||
|                 for region_id, line in region_line_tuples: |                 for region_id, line in region_line_tuples: | ||||||
|                     line_image, line_xywh = self.workspace.image_from_segment(line, page_image, page_xywh, feature_filter='binarized') |                     line_image, line_xywh = self.workspace.image_from_segment(line, page_image, page_xywh, feature_filter='binarized') | ||||||
|                     line_image_bin = cv2pil(binarizer.run(image=pil2cv(line_image))) |                     line_image_bin = cv2pil(self.binarizer.run(image=pil2cv(line_image))) | ||||||
|                     line_image_bin_path = self.workspace.save_image_file( |                     line_image_bin_path = self.workspace.save_image_file( | ||||||
|                             line_image_bin, |                             line_image_bin, | ||||||
|                             "%s_%s_%s.IMG-BIN" % (file_id, region_id, line.id), |                             "%s_%s_%s.IMG-BIN" % (file_id, region_id, line.id), | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue