{"id":20196523,"url":"https://github.com/endalk200/document-scanner","last_synced_at":"2025-04-10T10:43:34.800Z","repository":{"id":40960543,"uuid":"314762563","full_name":"endalk200/document-scanner","owner":"endalk200","description":"Document scanner written in python using OpenCV and other Computer Vision libraries. Scans image of documents and creates scanned version of the document by running some image manipulations on it.","archived":false,"fork":false,"pushed_at":"2025-01-18T14:03:49.000Z","size":21112,"stargazers_count":27,"open_issues_count":4,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T09:38:26.519Z","etag":null,"topics":["document-scanner","opencv","pdf","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/endalk200.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":"2020-11-21T08:01:37.000Z","updated_at":"2025-03-20T10:14:18.000Z","dependencies_parsed_at":"2024-11-14T07:15:17.812Z","dependency_job_id":null,"html_url":"https://github.com/endalk200/document-scanner","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"ab200b99789d2252a274ee1b7a21ff1eaadc4c43"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endalk200%2Fdocument-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endalk200%2Fdocument-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endalk200%2Fdocument-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endalk200%2Fdocument-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endalk200","download_url":"https://codeload.github.com/endalk200/document-scanner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248200249,"owners_count":21063860,"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":["document-scanner","opencv","pdf","scanner"],"created_at":"2024-11-14T04:24:34.302Z","updated_at":"2025-04-10T10:43:34.779Z","avatar_url":"https://github.com/endalk200.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Scanner\n\n### An interactive document scanner built in Python using OpenCV\n\nThe scanner takes a poorly scanned image, finds the corners of the document, applies the perspective transformation to get a top-down view of the document, sharpens the image, and applies an adaptive color threshold to clean up the image.\n\nOn my test dataset of 300 images, the program correctly detected the corners of the document 92.8% of the time.\n\n* The scanner can process an entire directory of images automatically and save the output in an output directory:\n\n#### Here are some examples of images before and after scan:\n\n\u003cimg src=\"https://github.com/endalk200/document-scanner/blob/main/sample_images/cell_pic.jpg\" height=\"450\"\u003e \u003cimg src=\"https://github.com/endalk200/doc_scanner/blob/main/output/cell_pic.jpg\" height=\"450\"\u003e\n\n\u003cimg src=\"https://github.com/endalk200/document-scanner/blob/main/sample_images/receipt.jpg\" height=\"450\"\u003e \u003cimg src=\"https://github.com/endalk200/document-scanner/blob/master/output/receipt.jpg\" height=\"450\"\u003e\n\n\u003cimg src=\"https://github.com/endalk200/document-scanner/blob/main/sample_images/math_cheat_sheet.JPG\" height=\"450\"\u003e \u003cimg src=\"https://github.com/endalk200/document-scanner/blob/main/output/math_cheat_sheet.JPG\" height=\"450\"\u003e\n\n\u003cimg src=\"https://github.com/endalk200/document-scanner/blob/main/sample_images/dollar_bill.JPG\" width=\"350\"\u003e \u003cimg src=\"https://github.com/endalk200/document-scanner/blob/main/output/dollar_bill.JPG\" width=\"350\"\u003e\n\n\n### Usage\n\nYou can use this script by downloading it from pypi\n```bash\npip install document-scanner\n```\n\naftter installing it from pypi index, you can use it from the terminal as follows.\n\n```\npython scan.py (--images \u003cIMG_DIR\u003e | --image \u003cIMG_PATH\u003e) [-i]\n```\n* The `-i` flag enables interactive mode, where you will be prompted to click and drag the corners of the document. For example, to scan a single image with interactive mode enabled:\n```\npython scan.py --image sample_images/desk.JPG -i\n```\n* Alternatively, to scan all images in a directory without any input:\n```\npython scan.py --images sample_images\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendalk200%2Fdocument-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendalk200%2Fdocument-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendalk200%2Fdocument-scanner/lists"}