ocrd_jdeskew
OCR-D wrapper for Document Image Skew Estimation using Adaptive Radial Projection
Introduction
This offers an OCR-D compliant workspace processor for jdeskew.
Installation
Create and activate a virtual environment as usual.
To install this module along with its dependencies, do:
pip install .
Usage
OCR-D processor interface ocrd-jdeskew
To be used with PAGE-XML documents in an OCR-D annotation workflow.
Usage: ocrd-jdeskew [OPTIONS]
Deskew pages / regions with jdeskew
> Deskew the regions of the workspace.
> Open and deserialise PAGE input files and their respective images,
> then iterate over the element hierarchy down to the requested
> ``level-of-operation``.
> Next, for each segment, crop an image according to its layout
> annotation (via coordinates into the higher-level image, or from an
> existing alternative image), and determine optimal the deskewing
> angle for it (up to ``maxskew``). Annotate the angle in the page or
> region.
> Derotate the image, and add the new image file to the workspace
> along with the output fileGrp, and using a file ID with suffix
> ``.IMG-DESKEW`` along with further identification of the segment.
> Produce a new output file by serialising the resulting hierarchy.
Options for processing:
-m, --mets URL-PATH URL or file path of METS to process [./mets.xml]
-w, --working-dir PATH Working directory of local workspace [dirname(URL-PATH)]
-I, --input-file-grp USE File group(s) used as input
-O, --output-file-grp USE File group(s) used as output
-g, --page-id ID Physical page ID(s) to process instead of full document []
--overwrite Remove existing output pages/images
(with "--page-id", remove only those)
--profile Enable profiling
--profile-file PROF-PATH Write cProfile stats to PROF-PATH. Implies "--profile"
-p, --parameter JSON-PATH Parameters, either verbatim JSON string
or JSON file path
-P, --param-override KEY VAL Override a single JSON object key-value pair,
taking precedence over "--parameter"
-l, --log-level [OFF|ERROR|WARN|INFO|DEBUG|TRACE]
Override log level globally [INFO]
Options for Processing Worker server:
--queue The RabbitMQ server address in format
"amqp://{user}:{pass}@{host}:{port}/{vhost}"
[amqp://admin:admin@localhost:5672]
--database The MongoDB server address in format
"mongodb://{host}:{port}"
[mongodb://localhost:27018]
--type type of processing: either "worker" or "server"
Options for information:
-C, --show-resource RESNAME Dump the content of processor resource RESNAME
-L, --list-resources List names of processor resources
-J, --dump-json Dump tool description as JSON
-D, --dump-module-dir Show the 'module' resource location path for this processor
-h, --help Show this message
-V, --version Show version
Parameters:
"maxskew" [number]
modulus of maximum skewing angle (in degrees) to detect
"level-of-operation" [string - "page"]
PAGE XML hierarchy level granularity to annotate orientation and
images for
Possible values: ["page", "region"]
Metadata
Release files for ocrd-jdeskew 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ocrd_jdeskew-0.0.2.tar.gz | 6.4 kB | Without provenance | Details for ocrd_jdeskew-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocrd_jdeskew-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for ocrd_jdeskew-0.0.2-py3-none-any.whl |
Total release size: 14.0 kB
Release files / ocrd_jdeskew-0.0.2.tar.gz
| Download URL | ocrd_jdeskew-0.0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85c0d1b818af4ea06e36ba4df204aee3fca161db426ef5ad9f066dc490966916
|
|
BLAKE2b-256 checksum How to use checksums |
6d57683dd558a5ae7d71e14532d4c10142da3ed1577b5ee856bbab860dfd8b94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|
Release files / ocrd_jdeskew-0.0.2-py3-none-any.whl
| Download URL | ocrd_jdeskew-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2aa3154387ee90ea77303dbb49462b7044323bd67b3b9c7d3aeb2ac30373290
|
|
BLAKE2b-256 checksum How to use checksums |
309013166cf2cc290a0b6233fc0c4b364b1e9f0f51fc98525a6cf56c24ff3114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.3
|
Security for ocrd-jdeskew 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.