Reputation: 2584
I followed the documentation (http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html#application-development-with-static-initialization) to initialize opencv in static initialization and it is working well so far on my phone.
However, some of my friends who helped testing my app, says the performance is very bad when they use the 'photo enhancement' feature, where I used openCV to apply some adaptive threshold filtering to sharpen the text in the images (example here: How to use OpenCV to process image so that the text become sharp and clear?). I still couldn't figure out why is that so.
Phone models that I tried it on:
1) My phone (samsung galaxy s3) - smooth (instant)
2) friend no.1 (samsung galaxy s2) - smooth (instant)
3) friend no.2 (samsung galaxy s2) - super laggy (takes few seconds for UI to regain responsiveness)
4) friend no.3 (htc one) - super laggy (takes few seconds for UI to regain responsiveness)
5) friend no.4 (samsung galaxy s4) - super laggy (takes few seconds for UI to regain responsiveness)
I recalled that my phone and friend no.1's phone installed older version of my app before, where the app was still using async initialization method (and have to install OpenCV manager from play store in order to use) and I can't think of anything different between the phones tested above..
Does anyone has similar experience? Any advice on what to look for?
Upvotes: 2
Views: 1274
Reputation: 93458
There's a number of reasons why this could be happening. To make a fair evaluation you would have to restore each device to it's factory settings and execute profiling/benchmarking tools to figure out what's going on.
For instance, the phones that were found to be super laggy:
There is an official document for Android developers with performance tips. It's pretty interesting to read. They recommend a few tools for measure the performance of an application:
There's also a nice article on vogella.com about analyzing Android performance issues. It's a must-read!
Upvotes: 1