开发者

Super slow Image processing on Android tablet

I am trying to implement SLIC superpixel algorithm in Android tablet (SLIC)

I port the code which in C++ to work with android environment using stl-lib and all. What application doing is taking an image from camera and send data to process in native code.

I got the a开发者_C百科pp running but the problem is that it took 20-30 second to process a single frame (640 x 400) while in my notebook running with visual studio application would be almost instantly finish!

I check the memory leak, their isn't any... is their anything that might cause computation time to be way more expensive than VS2010 in notebook?

I know this question might be very open and not really specific but I'm really in the dark too. Hope you guys can help.

Thanks

PS. I check running time for each process, I think that every line of code execution time just went up. I don't see any specific function that take way longer than usual.

PSS. Do you think follow may cause the slow?

  1. Memory size : investigated, during native not much of paused time show from GC
  2. STL-library : not investigate yet, is it possible that function like vector, max and min running in STL may cause significant slow?
  3. Android environment it self?
  4. Lower hardware specification of Android Tablet (Acer Iconia tab - 1GHz Nvidia Tegra 250 dual-core processor and has 1GB of RAM)
  5. Would be better to run in Java?

PSSS. If you have time please check out the code


I've taken a look to your code and can make the following recommendations:

  1. First of all, you need to add the line APP_ABI := armeabi-v7a into your Application.mk file. Otherwise your code is compiled for old armv5te architecture where you have no any FPU (all floating point arithmetic is emulated), have less registers available and so on.
  2. Your SLIC implementation intensively uses double floating-point values for computation. You should replace them with float wherever possible because ARM still misses hardware support for double type.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜