Append "binarized" to AlternativeImage/comments

Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
pull/5/head
Konstantin Baierer 4 years ago committed by GitHub
parent ee82d188bf
commit 2eec6876fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,7 +80,7 @@ class SbbBinarizeProcessor(Processor):
file_id + '.IMG-BIN',
page_id=input_file.pageId,
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:
regions = page.get_AllRegions(['Text', 'Table'])
@ -98,7 +98,7 @@ class SbbBinarizeProcessor(Processor):
page_id=input_file.pageId,
file_grp=self.output_file_grp)
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':
lines = region.get_TextLine()
@ -113,7 +113,7 @@ class SbbBinarizeProcessor(Processor):
page_id=input_file.pageId,
file_grp=self.output_file_grp)
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(
ID=file_id,

Loading…
Cancel
Save