mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-09 20:29:55 +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,
|
"default": false,
|
||||||
"description": "if this parameter set to true, this tool would check that input image need resizing and enhancement or not."
|
"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": {
|
"headers_off": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
|
|
|
@ -14,6 +14,7 @@ class EynollahProcessor(Processor):
|
||||||
def process_page_pcgts(self, *input_pcgts: Optional[OcrdPage], page_id: Optional[str] = None) -> OcrdPageResult:
|
def process_page_pcgts(self, *input_pcgts: Optional[OcrdPage], page_id: Optional[str] = None) -> OcrdPageResult:
|
||||||
assert input_pcgts
|
assert input_pcgts
|
||||||
assert input_pcgts[0]
|
assert input_pcgts[0]
|
||||||
|
assert self.parameter
|
||||||
pcgts = input_pcgts[0]
|
pcgts = input_pcgts[0]
|
||||||
page = pcgts.get_Page()
|
page = pcgts.get_Page()
|
||||||
# XXX loses DPI information
|
# XXX loses DPI information
|
||||||
|
@ -24,6 +25,7 @@ class EynollahProcessor(Processor):
|
||||||
self.logger,
|
self.logger,
|
||||||
allow_enhancement=self.parameter['allow_enhancement'],
|
allow_enhancement=self.parameter['allow_enhancement'],
|
||||||
curved_line=self.parameter['curved_line'],
|
curved_line=self.parameter['curved_line'],
|
||||||
|
light_version=self.parameter['light_mode'],
|
||||||
full_layout=self.parameter['full_layout'],
|
full_layout=self.parameter['full_layout'],
|
||||||
allow_scaling=self.parameter['allow_scaling'],
|
allow_scaling=self.parameter['allow_scaling'],
|
||||||
headers_off=self.parameter['headers_off'],
|
headers_off=self.parameter['headers_off'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue