Ask Your Question
1

Reducing Android package

asked 2013-04-24 00:04:27 -0600

mbox2000 gravatar image

updated 2013-04-24 07:07:20 -0600

Andrey Pavlenko gravatar image

i only want to use


Mat m1 = new Mat();
Imgproc.blur(m, m1, new Size(s, s));
Utils.matToBitmap(m1, b);

but the SO file unexpectedly 20+M how to lower OpenCV SO?

thanks.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2013-04-24 00:50:49 -0600

Probably you are including the complete openCV library folder containing the dll's with your so file. In order to reduce the size you should only include the dlls necessary, in this case the core dll and the imageprocessing dll.

edit flag offensive delete link more

Comments

i delete some so file, only remain must 4 files, libopencv_core.a libopencv_features2d.a libopencv_imgproc.a libopencv_java.so

these files total 14M, still so big for android app

mbox2000 gravatar imagembox2000 ( 2013-04-24 01:29:44 -0600 )edit
2

Did you try to use OpenCV Manager (http://docs.opencv.org/android/service/doc/index.html)? It allows you to reduce .apk size.

Daniil Osokin gravatar imageDaniil Osokin ( 2013-04-24 01:36:53 -0600 )edit

thank you very much for reply.

mbox2000 gravatar imagembox2000 ( 2013-04-24 01:47:30 -0600 )edit
1

OpenCV Manager cant be answer for this question. Anyway to lower libopencv_java.so's file size? I think, this file has all modules.

atasoyh gravatar imageatasoyh ( 2013-04-24 01:52:08 -0600 )edit
1

answered 2013-04-24 07:11:44 -0600

Andrey Pavlenko gravatar image

If you need small APK - the only choice is the OpenCV Manager.

If you can't use OpenCV Manager you need to keep libnative_camera_*.so (for VideoCapture class) and libopencv_java.so (for the rest of API) for all supported platforms.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-24 00:04:27 -0600

Seen: 2,787 times

Last updated: Apr 24 '13