I have a complicated image processing script that runs in python with Numpy and OpenCV. I want to run this script in Android but I couldn't find a way to do it.
After some research I found some frameworks that may help but I have some problems with them:
I will be happy to hear some ideas on how to run this script in Android. Is it possible to maybe root the device and install Python, Numpy and OpenCV?
To work with the OpenCV Android library, you have to add it to your app module as a dependency. To easily do this on Android Studio, click on File -> Project Structure. When the project structure dialog opens, click on the app module or any other module that you want to use OpenCV library in.
Python can run on Android through various apps from the play store library. This tutorial will explain how to run python on Android using Pydroid 3 – IDE for Python 3 application. Features : Offline Python 3.7 interpreter: no Internet is required to run Python programs.
The easiest way to use Python in an Android appChaquopy provides everything you need to include Python components in an Android app, including: Full integration with Android Studio's standard Gradle build system.
py file! Enter some code here, then go to: Run > Run Module. You'll be prompted to save your file as a module (a compact piece of Python code that can be run from other scripts) and from there, your app will run! That is how to run Python files.
Another option is https://termux.com, but you'll have a bit of hard time getting cv2
to work on it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With