mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-09 04:09:54 +02:00
ocrd interface: add light_mode parameter
This commit is contained in:
parent
0d83db7bc4
commit
87adc4b0c6
2 changed files with 7 additions and 0 deletions
|
@ -49,6 +49,11 @@
|
|||
"default": false,
|
||||
"description": "if this parameter set to true, this tool would check that input image need resizing and enhancement or not."
|
||||
},
|
||||
"light mode": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "lighter and faster but simpler method for main region detection and deskewing"
|
||||
},
|
||||
"headers_off": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
|
|
@ -14,6 +14,7 @@ class EynollahProcessor(Processor):
|
|||
def process_page_pcgts(self, *input_pcgts: Optional[OcrdPage], page_id: Optional[str] = None) -> OcrdPageResult:
|
||||
assert input_pcgts
|
||||
assert input_pcgts[0]
|
||||
assert self.parameter
|
||||
pcgts = input_pcgts[0]
|
||||
page = pcgts.get_Page()
|
||||
# XXX loses DPI information
|
||||
|
@ -24,6 +25,7 @@ class EynollahProcessor(Processor):
|
|||
self.logger,
|
||||
allow_enhancement=self.parameter['allow_enhancement'],
|
||||
curved_line=self.parameter['curved_line'],
|
||||
light_version=self.parameter['light_mode'],
|
||||
full_layout=self.parameter['full_layout'],
|
||||
allow_scaling=self.parameter['allow_scaling'],
|
||||
headers_off=self.parameter['headers_off'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue