{"id":17182413,"url":"https://github.com/bertsky/ocrd_jdeskew","last_synced_at":"2025-06-19T17:39:03.252Z","repository":{"id":177637323,"uuid":"660704405","full_name":"bertsky/ocrd_jdeskew","owner":"bertsky","description":"OCR-D wrapper for Document Image Skew Estimation using Adaptive Radial Projection","archived":false,"fork":false,"pushed_at":"2023-07-05T13:05:33.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-25T21:40:58.418Z","etag":null,"topics":["ocr-d"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-30T16:21:15.000Z","updated_at":"2023-06-30T16:25:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"29202b1f-009c-4c7c-8073-46b905de0f36","html_url":"https://github.com/bertsky/ocrd_jdeskew","commit_stats":null,"previous_names":["bertsky/ocrd_jdeskew"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bertsky/ocrd_jdeskew","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertsky%2Focrd_jdeskew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertsky%2Focrd_jdeskew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertsky%2Focrd_jdeskew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertsky%2Focrd_jdeskew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertsky","download_url":"https://codeload.github.com/bertsky/ocrd_jdeskew/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertsky%2Focrd_jdeskew/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260797627,"owners_count":23064827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ocr-d"],"created_at":"2024-10-15T00:37:01.161Z","updated_at":"2025-06-19T17:38:58.238Z","avatar_url":"https://github.com/bertsky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/ocrd-jdeskew.svg)](https://badge.fury.io/py/ocrd-jdeskew)\n\n# ocrd_jdeskew\n\n    OCR-D wrapper for Document Image Skew Estimation using Adaptive Radial Projection\n\n  * [Introduction](#introduction)\n  * [Installation](#installation)\n  * [Usage](#usage)\n     * [OCR-D processor interface ocrd-jdeskew](#ocr-d-processor-interface-ocrd-jdeskew)\n\n## Introduction\n\nThis offers an [OCR-D](https://ocr-d.de) compliant [workspace processor](https://ocr-d.de/en/spec/cli) for [jdeskew](https://github.com/phamquiluan/jdeskew).\n\n## Installation\n\nCreate and activate a [virtual environment](https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments) as usual.\n\nTo install this module along with its dependencies, do:\n\n    pip install .\n\n## Usage\n\n### [OCR-D processor](https://ocr-d.de/en/spec/cli) interface `ocrd-jdeskew`\n\nTo be used with [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) documents in an [OCR-D](https://ocr-d.de/en/about) annotation workflow.\n\n```\nUsage: ocrd-jdeskew [OPTIONS]\n\n  Deskew pages / regions with jdeskew\n\n  \u003e Deskew the regions of the workspace.\n\n  \u003e Open and deserialise PAGE input files and their respective images,\n  \u003e then iterate over the element hierarchy down to the requested\n  \u003e ``level-of-operation``.\n\n  \u003e Next, for each segment, crop an image according to its layout\n  \u003e annotation (via coordinates into the higher-level image, or from an\n  \u003e existing alternative image), and determine optimal the deskewing\n  \u003e angle for it (up to ``maxskew``). Annotate the angle in the page or\n  \u003e region.\n\n  \u003e Derotate the image, and add the new image file to the workspace\n  \u003e along with the output fileGrp, and using a file ID with suffix\n  \u003e ``.IMG-DESKEW`` along with further identification of the segment.\n\n  \u003e Produce a new output file by serialising the resulting hierarchy.\n\nOptions for processing:\n  -m, --mets URL-PATH             URL or file path of METS to process [./mets.xml]\n  -w, --working-dir PATH          Working directory of local workspace [dirname(URL-PATH)]\n  -I, --input-file-grp USE        File group(s) used as input\n  -O, --output-file-grp USE       File group(s) used as output\n  -g, --page-id ID                Physical page ID(s) to process instead of full document []\n  --overwrite                     Remove existing output pages/images\n                                  (with \"--page-id\", remove only those)\n  --profile                       Enable profiling\n  --profile-file PROF-PATH        Write cProfile stats to PROF-PATH. Implies \"--profile\"\n  -p, --parameter JSON-PATH       Parameters, either verbatim JSON string\n                                  or JSON file path\n  -P, --param-override KEY VAL    Override a single JSON object key-value pair,\n                                  taking precedence over \"--parameter\"\n  -l, --log-level [OFF|ERROR|WARN|INFO|DEBUG|TRACE]\n                                  Override log level globally [INFO]\n\nOptions for Processing Worker server:\n  --queue                         The RabbitMQ server address in format\n                                  \"amqp://{user}:{pass}@{host}:{port}/{vhost}\"\n                                  [amqp://admin:admin@localhost:5672]\n  --database                      The MongoDB server address in format\n                                  \"mongodb://{host}:{port}\"\n                                  [mongodb://localhost:27018]\n  --type                          type of processing: either \"worker\" or \"server\"\n\nOptions for information:\n  -C, --show-resource RESNAME     Dump the content of processor resource RESNAME\n  -L, --list-resources            List names of processor resources\n  -J, --dump-json                 Dump tool description as JSON\n  -D, --dump-module-dir           Show the 'module' resource location path for this processor\n  -h, --help                      Show this message\n  -V, --version                   Show version\n\nParameters:\n   \"maxskew\" [number]\n    modulus of maximum skewing angle (in degrees) to detect\n   \"level-of-operation\" [string - \"page\"]\n    PAGE XML hierarchy level granularity to annotate orientation and\n    images for\n    Possible values: [\"page\", \"region\"]\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertsky%2Focrd_jdeskew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertsky%2Focrd_jdeskew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertsky%2Focrd_jdeskew/lists"}