Ask Your Question

Revision history [back]

Building minimal OpenCV with just Features2D

Hi

I want to build a minimal version of OpenCV 3.2.0 which includes the features2d module, for including in an iOS project. I'm using the handy build_framework.py script to generate the library.

By reading the CMakeLists.txt files, I gather that features2d requires core, flann, imgproc, and ml. None of those have additional dependencies so it should be possible to build the library excluding all but those 5.

However, that's not working for me, and the smallest list of modules I've had success with is: calib3d, core, features2d, flann, highgui, imgcodecs, imgproc, ml, shape, video, videoio.

Appreciate any pointers on how to further reduce the list of dependencies.

Building minimal OpenCV with just Features2D

Hi

I want to build a minimal version of OpenCV 3.2.0 which includes the features2d module, for including in an iOS project. I'm using the handy build_framework.py script to generate the library.

By reading the CMakeLists.txt files, I gather that features2d requires core, flann, imgproc, and ml. None of those have additional dependencies so it should be possible to build the library excluding all but those 5.

However, that's not working for me, and the smallest list of modules I've had success with is: calib3d, core, features2d, flann, highgui, imgcodecs, imgproc, ml, shape, video, videoio.

Appreciate any pointers on how to further reduce the list of dependencies.

Building minimal OpenCV with just Features2D

Hi

I want to build a minimal version of OpenCV 3.2.0 which includes the features2d module, for including in an iOS project. I'm using the handy build_framework.py script to generate the library.

By reading the CMakeLists.txt files, I gather that features2d requires core, flann, imgproc, and ml. None of those have additional dependencies so it should be possible to build the library excluding all but those 5.

However, that's not working for me, and while that does build, I get linker errors when trying to build an app against it. If I also include the smallest list calib3d module, the errors go away. This is rather strange as none of the above modules I've had success with is: calib3d, core, features2d, flann, highgui, imgcodecs, imgproc, ml, videoio.have a dependency on calib3d.

Appreciate any pointers on how to further reduce the list of dependencies.pointers.

Building minimal OpenCV with just Features2D

Hi

I want to build a minimal version of OpenCV 3.2.0 which includes the features2d module, for including in an iOS project. I'm using the handy build_framework.py script to generate the library.

By reading the CMakeLists.txt files, I gather that features2d requires core, flann, imgproc, and ml. None of those have additional dependencies so it should be possible to build the library excluding all but those 5.

However, while that does build, I get linker errors when trying to build an app against it. If I also include the calib3d module, the errors go away. This is rather strange as none of the above modules have a dependency on calib3d.

Specific error message when building a mobile app using this library without calib3d included:

Undefined symbols for architecture arm64: "cv::findHomography(cv::_InputArray const&, cv::_InputArray const&, int, double, cv::_OutputArray const&, int, double)", referenced from: myMethod in myLibrary.a(myLibrary.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Appreciate any pointers.