{"id":23152758,"url":"https://github.com/michaeltroger/shape-detection-android","last_synced_at":"2025-06-30T03:08:41.334Z","repository":{"id":46787605,"uuid":"68513426","full_name":"michaeltroger/shape-detection-android","owner":"michaeltroger","description":"Augmented Reality simple shape detector using OpenCV 4 for \u003e= Android 5","archived":false,"fork":false,"pushed_at":"2024-02-08T23:07:44.000Z","size":322602,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T13:23:02.481Z","etag":null,"topics":["android","augmented-reality","augmented-reality-applications","computer-vision","opencv","shapedetection"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaeltroger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"michaeltroger","custom":"http://paypal.me/trogermichael/3"}},"created_at":"2016-09-18T10:10:53.000Z","updated_at":"2024-05-31T18:52:08.000Z","dependencies_parsed_at":"2022-09-10T11:01:40.114Z","dependency_job_id":null,"html_url":"https://github.com/michaeltroger/shape-detection-android","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/michaeltroger/shape-detection-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fshape-detection-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fshape-detection-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fshape-detection-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fshape-detection-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaeltroger","download_url":"https://codeload.github.com/michaeltroger/shape-detection-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltroger%2Fshape-detection-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262702335,"owners_count":23350644,"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","augmented-reality","augmented-reality-applications","computer-vision","opencv","shapedetection"],"created_at":"2024-12-17T19:18:44.040Z","updated_at":"2025-06-30T03:08:41.307Z","avatar_url":"https://github.com/michaeltroger.png","language":"Kotlin","funding_links":["https://github.com/sponsors/michaeltroger","http://paypal.me/trogermichael/3"],"categories":[],"sub_categories":[],"readme":"# Augmented Reality Simple Shape Detector using OpenCV 4 for Android\n[![Android CI](https://github.com/michaeltroger/shape-detection-android/actions/workflows/android.yml/badge.svg)](https://github.com/michaeltroger/shape-detection-android/actions/workflows/android.yml)\n\nAttention: This app was created in 2016. I was a beginner to Android development and Computer Vision back then.\nSo don't expect a perfect code please. Over the years I updated the dependencies and converted it to Kotlin, while the business logic remained unchanged.\n\nNote: Originally I targeted min SDK 15 (Android 4), more architectures (\"mips\", \"mips64\", \"armeabi\") and OpenCV 3 with this project. Nowadays the repo uses newer versions. If you need to support older devices, then you can look back in the repo's Git history (app version 1.2 / Git tag 3)\n\n\u003cimg src=\"/screenshots/demo.gif\" alt=\"Augmented Reality shape detection\" width=\"800px\"/\u003e\n\n### What is this repository for? ###\n\n* Uses the camera image to recognize triangles, rectangles and circles. It can also be configured to only detect a certain color (red). If a specific shape is detected the information can be shown on top of each shape as a label describing it (multiple shapes at the same time) or as an image respresenting the shape on top of the camera (only one shape is detected). Additionally also a sound depending on the detected shape can be played.\n* More computer vision projects at https://michaeltroger.com/computervision/\n\n### How do I get set up? ###\n\n* IDE: Android Studio (tested with 2023.3.1)\n* Android SDK\n* Images location: res/drawable | Sounds location: res/raw\n* Mode (label/image): Flag in MainActivity (default labels)\n* Mode (all colors / red only): Flag in MainActivity (default all colors)\n\n### Test images ###\n\u003cimg src=\"/testimages/circles.jpg\" alt=\"\" width=\"400px\"/\u003e\n\n\u003cimg src=\"/testimages/simpleshapes.png\" alt=\"\" width=\"600px\"/\u003e\n\n### Author ###\n[Michael Troger](https://michaeltroger.com)\n\n### Credits ###\n* The shape detection is based on Nash's shape detection https://github.com/bsdnoobz/opencv-code/blob/master/shape-detect.cpp His version is based on OpenCV 2 for the PC and usable for static images files. He extracted the code from the OpenCV tutorials http://opencv-code.com back then - that website is no longer available though.\n* The red color detection is based on Sol's OpenCV red circle detection. See https://github.com/sol-prog/OpenCV-red-circle-detection and https://solarianprogrammer.com/2015/05/08/detect-red-circles-image-using-opencv/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeltroger%2Fshape-detection-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaeltroger%2Fshape-detection-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeltroger%2Fshape-detection-android/lists"}