Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tutorials on OpenCV on Android phones [closed]

I would appreciate if anyone could show me where I can get good tutorials or documentations for developing OpenCV 2.4.3 for Android. I already gone through the one on the OpenCv site and its more of configuration and getting started but not the real code explained. I want the opencv for android codes, functions and what these functions do explained. Is opencv on Android written with Java cv or the native C++ codes included using Java Native Interface?

If its the the Java cv then where can i get a good tutorials that can get me started. If its the C++ codes, included with JNI, how do i interface these Native codes with the original Android java code?

I would really appreciate If some one can show me some good tutorials or documentation if available? And if not i would like your explanation please? Best regards.

Edit:

Thanks Torcelite for you response. Could you explain more about how I am going to port the code to java (Like a bit more detail)? Is there a good tutorial that explains about how i do this. I mean when i port the code what kind of changes do i make on the original openCV code that i have made for desktop application if there is. Or do i just port the C++ code as it is on Visual Studio's open CV into the Android eclipse to work on Open cv for Android.

For example on my face detection code i have used the haar classifier with its built-in function for object detection.

function--->[cvHaarDetectObjects( , , , ,  , , ) 
//just deleted the parameters for simplicity] 

So when i want to do the same thing on android, do i will make changes when i use this function or take it as it is? What kind of job am i supposed to do when i have to port or adopt these and other function on Android to make them work. Not only this function but all the functions in OpenCV.

like image 518
Sisay Avatar asked Mar 07 '26 01:03

Sisay


2 Answers

I hate to break it to you, but OpenCV for Android hasn't gotten much attention till now. I haven't figured out the functions and algorithms completely myself. I did create a small image comparison optimization tool though. Also, I suggest you learn OpenCV from this book. You just need to port the code in Java.

"Porting" code from C++ to JAVA means converting the code in C++ to JAVA i.e you're changing the syntax.

So, this will become something like this.

P.S - My code isn't using a FlannMatcher, this isn't complete code porting but it's the gist. Your syntax changes but the algorithm remains as it is.

like image 66
Karthik Balakrishnan Avatar answered Mar 09 '26 13:03

Karthik Balakrishnan


If you are not satisfied with the documentation, all the books about opencv that I know of (there aren't that many out there) you can find them in the following 2 links.

There is a specific one about Android - "Android Application Programming with OpenCV". It will probably be the best source besides the official documentation.

http://opencv.org/books.html

http://www.packtpub.com/search?keys=opencv

OpenCV for Android (and more recently for desktop Java) has nothing to do with JavaCV, the first is an official port which is basically JNI wrappers on C++ functions. JavaCV is an earlier port to Java by Samuel Audet, an independent researcher (as in not officially belonging to the OpenCV team).

like image 37
Rui Marques Avatar answered Mar 09 '26 13:03

Rui Marques



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!