{"id":13827451,"url":"https://github.com/Reiqy/document-scanner","last_synced_at":"2025-07-09T04:32:08.674Z","repository":{"id":217316942,"uuid":"382928855","full_name":"Reiqy/document-scanner","owner":"Reiqy","description":"Document Scanner application in Python","archived":false,"fork":false,"pushed_at":"2021-07-06T15:39:18.000Z","size":3700,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-05T09:16:17.138Z","etag":null,"topics":["computer-vision","python","scanner"],"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/Reiqy.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":"2021-07-04T19:05:40.000Z","updated_at":"2023-03-23T11:16:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed3defd8-7912-49f4-9e8a-0d2edddf7c4b","html_url":"https://github.com/Reiqy/document-scanner","commit_stats":null,"previous_names":["reiqy/document-scanner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reiqy%2Fdocument-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reiqy%2Fdocument-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reiqy%2Fdocument-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reiqy%2Fdocument-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Reiqy","download_url":"https://codeload.github.com/Reiqy/document-scanner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225486295,"owners_count":17481870,"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":["computer-vision","python","scanner"],"created_at":"2024-08-04T09:01:57.583Z","updated_at":"2024-11-20T07:30:24.286Z","avatar_url":"https://github.com/Reiqy.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Document Scanner\n\nSimple CLI application for scanning documents from images. This application is build around algorithm proposed by Adrian Rosebrock [[1]](https://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/) and uses OpenCV's adaptive thresholding [[2]](https://docs.opencv.org/4.5.2/d7/d4d/tutorial_py_thresholding.html) for scanner-like look of the output images.\n\n![Input Image](readme/1_mini.jpg)\n![Outut Image](readme/1_out_mini.jpg)\n\n_Source image on the left is converted into the output image on the right._\n\n## Usage\n\nTo use Document Scanner you need to have Python installed with all the required packages as specified in `requirements.txt`. Run\n    \n    $ pip install -r requirements.txt\n\nThen you can run the script by calling\n\n    $ python scanner.py \u003carguments\u003e\n\nThere are several arguments that have to be specified for successful execution of the program. You need to specify the format of the program output. You can choose between\n\n1. `-v`, this option only displays the output images. Additionaly to this option you can optionally specify\n    - `-t \u003cinteger\u003e`, target height of the displayed images on screen;\n    \n2. `-p \u003cfilename\u003e`, this option creates a `.pdf` with specified `\u003cfilename\u003e` (note that the name must have the `.pdf` extension). If you want you can optionally specify dimensions of the images in the generate file with\n    - `-d \u003cinteger\u003e \u003cinteger\u003e`, defaults for these options are numbers `210` and `297` (dimensions of A4 paper);\n    \n3. `-i \u003cdirname\u003e`, this option generates individual images in directory `\u003cdirname\u003e`.\n\nFor all the options you can specify the `-s \u003cinteger1\u003e \u003cinteger2\u003e` which will apply post-processing effects to make the document look more like if it was scanned by conventional document scanner. Numbers `\u003cinteger1\u003e` and `\u003cinteger2\u003e` can either be zeros. This will cause the output images to be converted to grayscale. Or they can be positive and be used as arguments to the adaptive thresholding. First number stands for block size, second is constant `c`. Good results are obtained with numbers `11` and `10`.\n\nThen you have to specify at least one `\u003cfilename\u003e` of input image.\n\nFull call of the script can look like this\n\n    $ python scanner.py -p out/test.pdf -s 11 10 data/1.jpg data/2.jpg\n\nKeep in mind that the command line arguments will likely change in future versions.\n\n## Development\n\nThis project is still in development. Future goals are\n\n1. Better post-processing of the output images;\n\n2. Plain-text output.\n   \n## Reference\n\n[1] [Building Mobile Document Scanner by Adrian Rosebrock](https://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/)\n\n[2] [Adaptive Thresholding](https://docs.opencv.org/4.5.2/d7/d4d/tutorial_py_thresholding.html)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReiqy%2Fdocument-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FReiqy%2Fdocument-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReiqy%2Fdocument-scanner/lists"}