Ask Your Question
0

How to exclude some opencv modules from libopencv_java3.so

asked 2018-03-30 11:18:19 -0600

Wyane gravatar image

In my android application, we only use very basic stuffs from core. I was wondering how to exclude other modules from libopencv_java3.so, so that we can make our app much smaller.

Best, Wayne

edit retag flag offensive close merge delete

Comments

rebuild opencv and in cmake command line add -DBUILD_opencv_apps=OFF -DBUILD_opencv_calib3=OFF... and so on except -DBUILD_opencv_core=ON

LBerger gravatar imageLBerger ( 2018-03-30 11:24:51 -0600 )edit

This one works for me. Thanks a lot! Wayne

Wyane gravatar imageWyane ( 2018-03-30 21:17:36 -0600 )edit
1

I think BUILD_LIST is a good answer too but you will need opencv >3.x (x=4 @berak?)

LBerger gravatar imageLBerger ( 2018-03-31 02:25:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-03-30 11:56:42 -0600

berak gravatar image

updated 2018-03-31 02:34:27 -0600

if you're using opencv3.4, you can also use:

 cmake -DBUILD_LIST=core,imgproc,imgcodecs,video,calib3d,bgsegm,features2d,flann,highgui,java

(a comma seperated list of modules), and specify explicitly, what you want to build (yet i don't think, it's possible to build only the core module)

edit flag offensive delete link more

Comments

@Wyane, try and please, make another answer, what worked for you in the end, to help future users !

berak gravatar imageberak ( 2018-03-30 11:59:00 -0600 )edit

Tried -DBUILD_LIST, but it didn't work out for me.

Best, Wayne

Wyane gravatar imageWyane ( 2018-03-30 21:18:43 -0600 )edit

BUILD_LIST is working file when using opencv3.4.1.

Wyane gravatar imageWyane ( 2018-04-01 13:01:23 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-03-30 11:18:19 -0600

Seen: 655 times

Last updated: Mar 31 '18