Lubna
Lubna

Reputation: 21

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 ?

Upvotes: 2

Views: 2056

Answers (3)

Samuel Audet
Samuel Audet

Reputation: 4994

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.

Upvotes: 5

Frohnzie
Frohnzie

Reputation: 3569

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.

Upvotes: 0

Eric
Eric

Reputation: 2341

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.

Upvotes: 0

Related Questions