Ask Your Question

Add OpenCV to just one Extra Module

asked 2018-10-23 05:29:26 -0500

cherault gravatar image


According to my project, I would like to build a specific package with OpenCV Core and an Extra Module (Bioinspired). The goal is to have just the necessary to work with, without spend a lot of HDD space and memory. In fact I would like to optimized the package in terms of HDD space and memory, because the final package will be installed on a small embedded computer (ie. Raspberry, Beaglebone, Intel Edisson,...).

So, could you help me to compile this specific package ? I don't know how to achieve this.

Thank you for your help and support.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-10-23 05:43:43 -0500

berak gravatar image

updated 2018-10-23 05:56:14 -0500

sure, that's possible. in general, you look at the cmakelists.txt of that module, and see, that you would minimally need:

opencv_bioinspired opencv_core

i'd also throw in:

opencv_highgui (for showing things ?) opencv_imgcodecs (to load images ?) opencv_imgproc (conversions ?)

then you can use a whitelist of explicitly needed opencv modules (w/o opencv_ prefix), which will override all other BUILD_opencv_xxx settings:

cmake -DBUILD_LIST="core,bioinspired,imgproc"

alternatively, if you want ALL of the opencv main repo, but ONLY the bioinspired module from contrib, you can point:

cmake -DOPENCV_EXTRA_MODULES_PATH=/your/opencv_contrib/modules/bioinspired
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-10-23 05:29:26 -0500

Seen: 37 times

Last updated: Oct 23 '18