{"id":14977686,"url":"https://github.com/mayuce/androiddocumentscanner","last_synced_at":"2025-04-04T17:06:33.771Z","repository":{"id":43580139,"uuid":"173961134","full_name":"mayuce/AndroidDocumentScanner","owner":"mayuce","description":"This library helps to scan a document like CamScanner.","archived":false,"fork":false,"pushed_at":"2021-12-25T23:47:24.000Z","size":86433,"stargazers_count":556,"open_issues_count":11,"forks_count":167,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-04T17:05:52.543Z","etag":null,"topics":["android","android-library","androidlibrary","image-processing","opencv"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/in/mayuce/","language":"Java","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/mayuce.png","metadata":{"files":{"readme":"readme.adoc","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}},"created_at":"2019-03-05T14:24:52.000Z","updated_at":"2025-03-17T17:10:11.000Z","dependencies_parsed_at":"2022-08-12T10:41:52.540Z","dependency_job_id":null,"html_url":"https://github.com/mayuce/AndroidDocumentScanner","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuce%2FAndroidDocumentScanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuce%2FAndroidDocumentScanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuce%2FAndroidDocumentScanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayuce%2FAndroidDocumentScanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayuce","download_url":"https://codeload.github.com/mayuce/AndroidDocumentScanner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217176,"owners_count":20903009,"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":["android","android-library","androidlibrary","image-processing","opencv"],"created_at":"2024-09-24T13:56:08.454Z","updated_at":"2025-04-04T17:06:28.759Z","avatar_url":"https://github.com/mayuce.png","language":"Java","readme":"# Android Document Scanner Library\n\nimage::https://img.shields.io/badge/version-1.6.1-green.svg[]\nimage::https://img.shields.io/badge/minSDK-21-blue.svg[]\nimage::https://img.shields.io/badge/license-MIT-yellowgreen.svg[]\n\nIf you liked the work you can think about https://www.paypal.com/donate/?hosted_button_id=MCMYPAN46SKFA[Donate via Paypal].\n\nThis library helps you to scan any document like CamScanner.\n\nimage::documentscannerMockup.png[]\n\n## Requirements\n\nAdd line below to your *top* level build.gradle\n\n[source,bourne]\n----\nallprojects {\n    repositories {\n        /// ....\n        mavenCentral()\n    }\n}\n----\n\nAdd lines below to your *app* level build.gradle\n\n[source,bourne]\n----\n    implementation 'io.github.mayuce:AndroidDocumentScanner:1.6.1'\n----\n\nAnd Sync the gradle\n\n## Usage\n\nNew version of this library provides you the gear instead of ready to go car. So you need to build your own implementation with it, before you upgrade your project make sure that you know it's gonna be a braking change in your project.\n\n* Add DocumentScannerView to your layout\n\n[source,xml]\n----\n...\n            \u003ccom.labters.documentscanner.DocumentScannerView\n                    android:id=\"@+id/document_scanner\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"match_parent\" /\u003e\n...\n----\n\n* Set loading listener\n\n[source,kotlin]\n----\n        binding.documentScanner.setOnLoadListener { loading -\u003e\n            binding.progressBar.isVisible = loading\n        }\n----\n\n* Set selected Bitmap into the view\n\n[source,kotlin]\n----\n        binding.documentScanner.setImage(bitmap)\n----\n\n* After selecting the edge points get cropped image\n\n[source,kotlin]\n----\n        binding.btnImageCrop.setOnClickListener {\n            lifecycleScope.launch {\n                binding.progressBar.isVisible = true\n                val image = binding.documentScanner.getCroppedImage()\n                binding.progressBar.isVisible = false\n                binding.resultImage.isVisible = true\n                binding.resultImage.setImageBitmap(image)\n            }\n        }\n----\n\n### Additional Features\n\nOn above Android 9.0 there is magnifier to help user to see zoomed image to crop.\n\nIf you face with any issues you can take a look at com.labters.documentscannerandroid.ImageCropActivity to see how does it works.\n\n## TO-DO\n\n- Nothing so far, you may tell me?..\n\n## Thanks\n\n* Thanks OpenCV for this awesome library. - https://opencv.org/\n\n* Inspiration from *aashari* . Thanks to him for his https://github.com/aashari/android-opencv-camera-scanner[source codes].\n\n[source,bourne]\n----\nMIT License\n\nCopyright (c) 2020 Muhammet Ali YUCE\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n----\n","funding_links":["https://www.paypal.com/donate/?hosted_button_id=MCMYPAN46SKFA"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayuce%2Fandroiddocumentscanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayuce%2Fandroiddocumentscanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayuce%2Fandroiddocumentscanner/lists"}