{"id":16162377,"url":"https://github.com/sunsided/stroke-width-transform-rs","last_synced_at":"2025-03-18T22:31:05.858Z","repository":{"id":38333527,"uuid":"383930343","full_name":"sunsided/stroke-width-transform-rs","owner":"sunsided","description":"A Rust implementation of the Stroke Width Transform.","archived":false,"fork":false,"pushed_at":"2024-05-26T16:44:49.000Z","size":107,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T00:08:56.271Z","etag":null,"topics":["image-processing","ocr","rust","stroke-width","stroke-width-transform"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/stroke-width-transform","language":"Rust","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/sunsided.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-07-07T21:39:31.000Z","updated_at":"2024-05-26T16:44:50.000Z","dependencies_parsed_at":"2024-10-27T19:17:10.770Z","dependency_job_id":"02e6c206-17ed-4325-96e5-8639819ec4b4","html_url":"https://github.com/sunsided/stroke-width-transform-rs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fstroke-width-transform-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fstroke-width-transform-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fstroke-width-transform-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fstroke-width-transform-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunsided","download_url":"https://codeload.github.com/sunsided/stroke-width-transform-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950961,"owners_count":20373663,"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":["image-processing","ocr","rust","stroke-width","stroke-width-transform"],"created_at":"2024-10-10T02:29:55.194Z","updated_at":"2025-03-18T22:31:05.592Z","avatar_url":"https://github.com/sunsided.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stroke Width Transform\n\n[![Crates.io](https://img.shields.io/crates/v/stroke-width-transform)](https://crates.io/crates/stroke-width-transform)\n[![Crates.io](https://img.shields.io/crates/l/stroke-width-transform)](https://crates.io/crates/stroke-width-transform)\n[![codecov](https://codecov.io/gh/sunsided/stroke-width-transform-rs/graph/badge.svg?token=2M1H8XLWVG)](https://codecov.io/gh/sunsided/stroke-width-transform-rs)\n\nThis is a Rust re-implementation of the [sunsided/stroke-width-transform] repo.\nIt provides a test implementation of the Stroke Width Transform algorithm described\nin the paper [Detecting Text in Natural Scenes with Stroke Width Transform] (PDF [here]):\n\n\u003e We present a novel image operator that seeks to find the value of stroke width for each image pixel, and demonstrate its use on the task of text detection in natural images. The suggested operator is local and data dependent, which makes it fast and robust enough to eliminate the need for multi-scale computation or scanning windows. Extensive testing shows that the suggested scheme outperforms the latest published algorithms. Its simplicity allows the algorithm to detect texts in many fonts and languages.\n\n## Example\n\nTo apply SWT to an example image and show the result, run:\n\n```console\n$ cargo run --release --example swt -- --show images/train-station.jpg\n```\n\nThe immediate SWT output is a map in which each pixel value corresponds to the\nlength of the stroke the pixel is on.\n\n| Example Input       | Example Output (SWT)     |\n|---------------------|--------------------------|\n| ![](images/ocr.png) | ![](.readme/ocr-swt.jpg) |\n\n## Original publication\n\n```bibtex\n@InProceedings{epshtein2010detecting,\n    author = {Epshtein, Boris and Ofek, Eyal and Wexler, Yonatan},\n    title = {Detecting Text in Natural Scenes with Stroke Width Transform},\n    year = {2010},\n    month = {June},\n    abstract = {We present a novel image operator that seeks to find the value of stroke width for each image pixel, and demonstrate its use on the task of text detection in natural images. The suggested operator is local and data dependent, which makes it fast and robust enough to eliminate the need for multi-scale computation or scanning windows. Extensive testing shows that the suggested scheme outperforms the latest published algorithms. Its simplicity allows the algorithm to detect texts in many fonts and languages.},\n    publisher = {IEEE - Institute of Electrical and Electronics Engineers},\n    url = {https://www.microsoft.com/en-us/research/publication/detecting-text-in-natural-scenes-with-stroke-width-transform/},\n}\n```\n\n## License\n\nThe code in this repository is available under the MIT license (see [LICENSE.md]).\n\n[sunsided/stroke-width-transform]: https://github.com/sunsided/stroke-width-transform\n[Detecting Text in Natural Scenes with Stroke Width Transform]: https://www.microsoft.com/en-us/research/publication/detecting-text-in-natural-scenes-with-stroke-width-transform/\n[here]: https://github.com/sunsided/stroke-width-transform/blob/master/paper/201020CVPR20TextDetection.pdf\n[LICENSE.md]: LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Fstroke-width-transform-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunsided%2Fstroke-width-transform-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Fstroke-width-transform-rs/lists"}