Android C++ Speedup

asked 2015-05-13 20:58:32 -0500

Barry gravatar image

updated 2015-05-13 20:59:40 -0500

Hello, I have some code that uses template matching, the simple blob detector, and some Mat operations - no camera or video.

I originally wrote the code in C++ to run on a PC. Everything works satisfactorily and it's amazingly fast on a PC.

I ported the code to Java for Android. It runs satisfactorily, but is much slower. I'm sure a lot of this has to do with the CPU differences between a PC and Android device.

I'm wondering if it would be worth the effort to try implementing the code for Android using C++ and the NDK rather than Java. Could I expect to see a significant speed up with a C++ implementation versus Java?

I am also wondering about the function of the OpenCV Manager that one must load into Android?

Does the Manager just handle things like the camera and keyboard interface on Android or does it execute the code for some of the basic operation functions like SimpleBlob.detect and matchTemplate.

If the Manager executes code, is the code optimized the way using C++ would be optimized versus Java?

Thanks, Barry.

edit retag flag offensive close merge delete