Reputation: 1609
I have compiled openCV 3.1
with contrib modules using cmake gui following this link. The files have been generated but how do I use it in my ios project? Is there a way to create the opencv.framework file or do I just import the whole built folder into my XCode project.
Upvotes: 3
Views: 4685
Reputation: 598
Maybe it would be simplest to use command line instead of using CMakeGUI to build openCV with additional modules. CMake must be installed, of course.
Create somewhere in a place suitable for you a new folder
>mkdir ~/your_open_cv_dir
>
>cd ~/your_open_cv_dir
>
>git clone https://github.com/opencv/opencv.git
If your need extra modules clone their sources too
>git clone https://github.com/opencv/opencv_contrib.git
Your your_open_cv_dir can have inside 2 folders, opencv and opencv_contrib
Make a symbolic link for Xcode to let the OpenCV build scripts find the compiler, header files etc.
>cd /
>
>sudo ln -s /Applications/Xcode.app/Contents/Developer Developer
Build OpenCV framework:
>cd ~/your_open_cv_dir
>
>python opencv/platforms/ios/build_framework.py ios
In case you need extended version of OpenCV build it with extra modules
>python opencv/platforms/ios/build_framework.py ios --contrib opencv_contrib
Upvotes: 5
Reputation: 11
Upvotes: 1