{"id":26898342,"url":"https://github.com/dhruvv1402/document-scanner-python-opencv","last_synced_at":"2026-04-15T15:43:13.711Z","repository":{"id":284310249,"uuid":"954518475","full_name":"dhruvv1402/Document-Scanner-Python-OpenCV","owner":"dhruvv1402","description":"Transform smartphone photos into scanned documents in seconds! This Python-based document scanner automatically detects edges, corrects perspective, and enhances document images to produce clean, scanner-like results.","archived":false,"fork":false,"pushed_at":"2025-03-25T08:33:57.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T08:38:57.508Z","etag":null,"topics":["canny-edge-detection","contour-detection","imutils","numpy","opencv","python","scikitlearn-machine-learning","warpperspective"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhruvv1402.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-25T07:54:16.000Z","updated_at":"2025-03-25T08:35:52.000Z","dependencies_parsed_at":"2025-03-25T08:49:02.777Z","dependency_job_id":null,"html_url":"https://github.com/dhruvv1402/Document-Scanner-Python-OpenCV","commit_stats":null,"previous_names":["dhruvv1402/document-scanner-python-opencv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FDocument-Scanner-Python-OpenCV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FDocument-Scanner-Python-OpenCV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FDocument-Scanner-Python-OpenCV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FDocument-Scanner-Python-OpenCV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhruvv1402","download_url":"https://codeload.github.com/dhruvv1402/Document-Scanner-Python-OpenCV/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246591810,"owners_count":20801985,"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":["canny-edge-detection","contour-detection","imutils","numpy","opencv","python","scikitlearn-machine-learning","warpperspective"],"created_at":"2025-04-01T05:46:29.759Z","updated_at":"2026-04-15T15:43:13.677Z","avatar_url":"https://github.com/dhruvv1402.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📄 Mobile Document Scanner with OpenCV\n\n**Transform smartphone photos into scanned documents in seconds!** This Python-based document scanner automatically detects edges, corrects perspective, and enhances document images to produce clean, scanner-like results.\n\n## ✨ Features\n\n- **Automatic edge detection** - Finds document boundaries even at angles\n- **Perspective correction** - Converts skewed photos to perfect top-down views\n- **Image enhancement** - Applies adaptive thresholding for crisp black-and-white output\n- **Easy integration** - Simple CLI interface and modular code structure\n- **Interactive mode** - Visualize each processing step\n\n## 🛠️ Built With\n\n- OpenCV (Computer Vision)\n- scikit-image (Image Processing)\n- NumPy (Numerical Operations)\n- imutils (Image Utilities)\n\n## 📦 Installation\n\n```bash\ngit clone https://github.com/yourusername/document-scanner.git\ncd document-scanner\npython -m venv venv\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n## 🚀 Usage\n\n```bash\n# Basic scanning\npython main.py -i input.jpg -o output.jpg\n\n# Interactive mode (shows processing steps)\npython main.py -i receipt.jpg --interactive\n```\n\n## 📸 Example\n\n**Before** (angled photo) | **After** (scanned result)\n---|---\n![Input](\"https://github.com/dhruvv1402/Document-Scanner-Python-OpenCV/blob/main/myfile.jpg\") | ![Output](\"https://github.com/dhruvv1402/Document-Scanner-Python-OpenCV/blob/main/myfile_scanned.jpg\")\n\n## 🤝 Contributing\n\nPRs welcome! Please open an issue first to discuss proposed changes.\n\n---\n\n### Key Elements Included:\n1. Clear value proposition in the header\n2. Emoji-enhanced section headers\n3. Technical stack transparency\n4. Concise installation/usage instructions\n5. Visual example (replace with actual image URLs)\n6. Contribution guidelines\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvv1402%2Fdocument-scanner-python-opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhruvv1402%2Fdocument-scanner-python-opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvv1402%2Fdocument-scanner-python-opencv/lists"}