Skip to content Skip to sidebar Skip to footer

Javacv Vs Opencv From Runtime Point Of View

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

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

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

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

Post a Comment for "Javacv Vs Opencv From Runtime Point Of View"