JavaCV Vs OpenCV from Runtime point of View

亡梦爱人 提交于 2019-12-01 07:31:05

问题


I am building an Android App that includes image processing techniques. From the Runtime point of view, which is better JavaCV or OpenCV ?


回答1:


Their runtime overhead seems to be about the same, but the android-opencv wrappers do not give access to raw data via direct NIO buffers, rendering custom processing in Java a lot less efficient. JavaCV is more efficient for those tasks. Being the author of JavaCV, I also like its API better :) It's closer to the original C/C++ API than android-opencv.

EDIT: Another difference is that android-opencv forces users to use the NDK and JNI to write functions. Since JavaCV is based on JavaCPP, we can write native functions more easily without having to deal with neither the NDK nor JNI.




回答2:


Writing native code using Android NDK will usually be much faster than using the SDK. You can find nice tutorial here, using opencv with NDK. Notice that with NDK framework you have access to openGL functions.




回答3:


JavaCV is just a Java wrapper around the native OpenCV library. OpenCV does provide a Java/SWIG binding. I have used both bindings and didn't see a significant difference between the two.

If you are writing a native only app go with native OpenCV.



来源:https://stackoverflow.com/questions/9468450/javacv-vs-opencv-from-runtime-point-of-view

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