Tutorials on OpenCV on Android phones [closed]

倖福魔咒の 提交于 2019-12-10 23:42:34

问题


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.


回答1:


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).




回答2:


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.



来源:https://stackoverflow.com/questions/16124906/tutorials-on-opencv-on-android-phones

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!