ocrd.processor.ocrd_page_result module¶
- class ocrd.processor.ocrd_page_result.OcrdPageResultImage(pil: Image, file_id_suffix: str, alternative_image: AlternativeImageType | PageType | None)[source]¶
Bases:
objectEncapsulates a single
AlternativeImagereference to be persisted as image file to theocrd.Workspace.- pil: Image¶
image data to be saved
- file_id_suffix: str¶
a suffix to append to the file name when saving (something like
.IMGaccording to OCR-D conventions for PAGE-XML)
- alternative_image: AlternativeImageType | PageType | None¶
the
AlternativeImageinstance that references this image; to be amended with the actual (final)@filenamewhen savingalternatively, can be a
Pageinstance: in that case, amend its@imageFilename(i.e. replace the original image of the PAGE-XML)
- class ocrd.processor.ocrd_page_result.OcrdPageResultVariadicListWrapper(pcgts: OcrdPage, *args)[source]¶
Bases:
objectProxy object for
ocrd.SingleOcrdPageResultallowing list semantics (i.e. multi-valued return fromocrd.Processor.process_page_pcgts()) without changing the API introduced in version 3.0.Everything but list access will yield the old (singular valued) semantics.
- images: List[OcrdPageResultImage]¶
- ocrd.processor.ocrd_page_result.SingleOcrdPageResult¶
alias of
OcrdPageResult
- ocrd.processor.ocrd_page_result.OcrdPageResult[source]¶
alias of
OcrdPageResultVariadicListWrapper