I'm looking to minimize the size of my android ndk built library.
I have started with the pre-built OpenCv libraries for Android and as of now the size of my lib is about 3MB. How can I minimize it's size?
I only need read/write files capability, png encode/decode, jpeg decoder and the typical image manipulation functions from OpenCv such as resize and cvtColor.
Any pointers greatly appreciated!
You've probably moved on with your project by now, Jona, but others not using the cmake-gui may like a command-line example. i.e. if you didn't want the CCALIB module, you could build like this:
cmake -DBUILD_OPENCV_CCALIB=OFF [other cmake flags] ../
Manipulating build flags may not cover all the module exclusions you would like, however, it's probably a good place to start. To see the list of flag options, open CMakeLists.txt file (top of the opencv source directory).
Turning on/off flags also won't break your builds as much as manually commenting-out code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With