I have written an image analysis program in python (using opencv module)..now i want to use it to make an android app..Can somebody help me in this regard??
Sorry to say, but I think you will find this very difficult. Ideally, you would have started this as an android app in the first place!
You may be able to use kivy (link provided) to implement an App, however it will probably not be a simple task. You will need to, for example, refactor your code to use kivy graphics, and I strongly suspect that you will not be able to use opencv in the code (it will be difficult to get buildozer to package such a library). Might I suggest that if you REALLY want to use you program on android you have three realistic options:
Rewrite your code in Java using the Android SDK (you may be able to use Jython here as a half-way measure).
Implement your project as a website.
For personal use only, implement a screen sharing solution.
My advise would be that option 2 is the most feasible, proving of course you can output your data as imagery or some MIME comparable data output. If you can do that, It also has to advantage of instantly working on iPhone, Blackberry, Linux, Windows, OS X and anything else with a web browser!
I suspect this is not what you wanted to hear - sorry!
I have actually tried out Kivy before, it is not simple actually. However, implementing my project as a website seems to be good option. It should be like linking my program to a website, which anybody can access. Can you tell in details how to do this?
The principals are easy to understand, but the details will be very specific to your task. What you need to do is map each function in your program to a function that the web server can perform, and map each input and output to a form the web server can access or output. Take a very simple example as follows:
Imagine that you have a simple Python program which takes two integers an multiplies them (I said it would be simple!), providing a string representation of the maths:
def multiply(x, y):
return "{} * {} = {}".format(x, y, x*y)
Executing:
>>> multiply(5, 4)
5 * 4 = 20
Here you have a function, which takes 2 inputs, and returns 1 output. To convert this to a web page you would need a way to get the two inputs to the server, and get the server to return the output. The following code will allow a web server to do the same:
from flask import Flask
app = Flask(__name__)
@app.route('/multiply///')
def multiply(x, y):
return "{} * {} = {}".format(x, y, x*y)
if __name__ == '__main__':
app.run(port=8010, debug=True)
With this code in a file 'server.py', run:
python ./server.py
Now point a web browser to:
http://127.0.0.1:8010/multiply/4/6/
You will see your browser shows:
4 * 6 = 24
Obviously, your program is far more complicated that multiplying 2 integers together, but this will show you the very basics of the approach. I hope this helps you.
I use Kivy which is a cross-platform framework. It is an easy-to-use framework with the ability to create applications working in all platforms.
I prepared a book titled "Building Android Apps in Python Using Kivy with Android Studio" available here https://www.apress.com/gp/book/9781484250303 . It is a beginners guide to build Android apps in Kivy and distribute the APKs to Google Play as regular Android apps.