|
|
@ -80,7 +80,7 @@ class SbbBinarizeProcessor(Processor):
|
|
|
|
file_id + '.IMG-BIN',
|
|
|
|
file_id + '.IMG-BIN',
|
|
|
|
page_id=input_file.pageId,
|
|
|
|
page_id=input_file.pageId,
|
|
|
|
file_grp=self.output_file_grp)
|
|
|
|
file_grp=self.output_file_grp)
|
|
|
|
page.add_AlternativeImage(AlternativeImageType(filename=bin_image_path, comment="binarized"))
|
|
|
|
page.add_AlternativeImage(AlternativeImageType(filename=bin_image_path, comment=page_xywh['features']+",binarized"))
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
regions = page.get_AllRegions(['Text', 'Table'])
|
|
|
|
regions = page.get_AllRegions(['Text', 'Table'])
|
|
|
@ -98,7 +98,7 @@ class SbbBinarizeProcessor(Processor):
|
|
|
|
page_id=input_file.pageId,
|
|
|
|
page_id=input_file.pageId,
|
|
|
|
file_grp=self.output_file_grp)
|
|
|
|
file_grp=self.output_file_grp)
|
|
|
|
region.add_AlternativeImage(
|
|
|
|
region.add_AlternativeImage(
|
|
|
|
AlternativeImageType(filename=region_image_bin_path, comments='binarized'))
|
|
|
|
AlternativeImageType(filename=region_image_bin_path, comments=region_xywh['features']+',binarized'))
|
|
|
|
|
|
|
|
|
|
|
|
elif oplevel == 'line':
|
|
|
|
elif oplevel == 'line':
|
|
|
|
lines = region.get_TextLine()
|
|
|
|
lines = region.get_TextLine()
|
|
|
@ -113,7 +113,7 @@ class SbbBinarizeProcessor(Processor):
|
|
|
|
page_id=input_file.pageId,
|
|
|
|
page_id=input_file.pageId,
|
|
|
|
file_grp=self.output_file_grp)
|
|
|
|
file_grp=self.output_file_grp)
|
|
|
|
line.add_AlternativeImage(
|
|
|
|
line.add_AlternativeImage(
|
|
|
|
AlternativeImageType(filename=line_image_bin_path, comments='binarized'))
|
|
|
|
AlternativeImageType(filename=line_image_bin_path, comments=line_xywh['features']+',binarized'))
|
|
|
|
|
|
|
|
|
|
|
|
self.workspace.add_file(
|
|
|
|
self.workspace.add_file(
|
|
|
|
ID=file_id,
|
|
|
|
ID=file_id,
|
|
|
|