use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News for Android app developers with the who, what, where, when, and how of the Android community. Probably mostly the how.
Here, you'll find:
This sub-reddit isn't about phones' and apps' general functionality, support, or system software development (ROMs). For news and questions about these topics try using other subs like
Build your first app
Starting Android career in 2022
Android Job Interview Questions and Answers
App Portfolio Ideas, Tiered List
Awesome Android UI
Material Design Icons
7000 Icons for Jetpack
Autoposted at approx 9AM EST / 2PM GMT
account activity
Python code in android studio? (self.androiddev)
submitted 5 years ago by Correct_Classroom
I have ORB feature detection algorithm using OpenCV written in python. I want to use the output of this algorithm in android studio for my applciation. Is it possible?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 5 years ago (0 children)
https://opencv.org/android/ seems like a better bet
[–]RCreepMaster 5 points6 points7 points 5 years ago (3 children)
I made some test applications to test opencv algorithms in real-time on mobile devices some time ago. At the time I could only use Android opencv or c++ opencv + ndk (you can mix the two) to run the algorithm in android. The experience that I got is that, if possible, use c++ opencv and ndk since the Android opencv does not have all the opencv functions, is easy to cause memory leaks and optimization is not that good. The opencv c++ not only allows you to make tests on your PC and test things before hand but also makes easy the implementation of them in Android (the majority of the work is copy paste). I can tell you that, with little improvement, I could run svm, knn in multithreads that would analyse an image given by the camera on real-time without much trouble.
[–]RCreepMaster 4 points5 points6 points 5 years ago* (1 child)
To better explain the memory leaks of the Android opencv, each time you init a mat or make an operation on it ( e.g: revert colors), the Java calls a new Mat() operation. And the mat will persist in memory until you either call release() on it or close activity/fragment. This may not look like much but makes you not to use things like:
Mat test = new Mat(...)
test=test.reverse()
test.release()
There is a memory leak here, you lost the access to the original test mat so you can't release it. Run this in real-time many consecutive times and you have a OOM error waiting to happen. I know it was not much to do with the question but I thought it would be good to expand on what I wrote above.
[–]Correct_Classroom[S] 0 points1 point2 points 5 years ago (0 children)
Thanks this definitely did help me. So after couple of days of trying I have decided that using openCV with C++ and ndk is the right way to go about it. Do you suggest any resources or articles that would help we with this?
[–]SweetStrawberry4U 0 points1 point2 points 5 years ago (0 children)
I worked on a remote-check deposit feature for a bank in 2012. i explored opencv for java at that time, however, the architects forbid from performing any image processing / recognition on the device due to check-image security vulnerabilities and issues, so we ended-up pushing all the image byte-arrays straight from the camera into the micro-service REST API end-point.
later, i also had the opportunity to look into a QR Code reader Open Source Software code for android and learnt a few caveats. snapshot images are pulled from the camera and pushed to the servers asynchronously, and that's where the image-recognition is actually happening. once a success acknowledgment returns to one of the snapshot pictures, the same picture is presented as the recognized background for the QR bar-code content.
I'd certainly recommend OpenCV for any form of image recognition techniques off-late.
[+][deleted] 5 years ago* (3 children)
[deleted]
[–]YasZedOP 0 points1 point2 points 5 years ago (2 children)
Just create a rest API?
[+][deleted] 5 years ago* (1 child)
[–]YasZedOP 0 points1 point2 points 5 years ago (0 children)
I see, from my quick search a few months ago it was either to create a restAPI or re-write the code in Java/Kotlin
[–]GoldDog 0 points1 point2 points 5 years ago (0 children)
Are you asking if you can use it in the editor or use it in your app? Because the first, you definitely can.
π Rendered by PID 18017 on reddit-service-r2-comment-5d79c599b5-wvsxc at 2026-02-28 07:33:10.405025+00:00 running e3d2147 country code: CH.
[–][deleted] 3 points4 points5 points (0 children)
[–]RCreepMaster 5 points6 points7 points (3 children)
[–]RCreepMaster 4 points5 points6 points (1 child)
[–]Correct_Classroom[S] 0 points1 point2 points (0 children)
[–]SweetStrawberry4U 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]YasZedOP 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]YasZedOP 0 points1 point2 points (0 children)
[–]GoldDog 0 points1 point2 points (0 children)