Skip to content

Commit

Permalink
segment: use binarized input only if use_legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Jul 13, 2022
1 parent 9c052df commit b85e147
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ocrd_kraken/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def process(self):
pcgts = page_from_file(self.workspace.download_file(input_file))
self.add_metadata(pcgts)
page = pcgts.get_Page()
page_image, page_coords, page_info = self.workspace.image_from_page(page, page_id, feature_selector="binarized")
page_image, page_coords, page_info = self.workspace.image_from_page(
page, page_id,
feature_selector="binarized" if use_legacy else "")
if page_info.resolution != 1:
dpi = page_info.resolution
if page_info.resolutionUnit == 'cm':
Expand Down

0 comments on commit b85e147

Please sign in to comment.