From 2eec6876fa45f01cbdcaadb248e8bf3418bb4265 Mon Sep 17 00:00:00 2001 From: Konstantin Baierer Date: Fri, 16 Oct 2020 11:01:11 +0200 Subject: [PATCH] Append "binarized" to AlternativeImage/comments Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> --- sbb_binarize/ocrd_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbb_binarize/ocrd_cli.py b/sbb_binarize/ocrd_cli.py index 7500bac..398fa6c 100644 --- a/sbb_binarize/ocrd_cli.py +++ b/sbb_binarize/ocrd_cli.py @@ -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,