From OpenCV 3.0.0-rc1, --contrib
option is added to platforms/ios/build_framework.py
.
As a result, we can specify opencv_contrib's path by this option.
https://github.com/Itseez/opencv/blob/master/platforms/ios/build_framework.py#L142
So, I tried to build opencv2.framework with opencv_contrib in the following steps.
- get the code of opencv-3.0.0-rc1.
- get the code of opencv_contrib.
- run
python opencv-3.0.0-rc1/platforms/ios/build_framework.py ios
to generateopencv2.framework
. python opencv-3.0.0-rc1/platforms/ios/build_framework.py --contrib opencv_contrib ios_contrib
to generateopencv2_contrib.framework
.
And, I made iOS project using Xcode. And, I imported opencv2.framework
and opencv2_contrib.framework
to my project.
After that I added the following code to my project.
#import <opencv2/core.hpp>
#import <opencv2/features2d.hpp>
#import <opencv2_contrib/xfeatures2d.hpp>
But, the following build error occurs.
/Users/xxxx/dev/ios_contrib/opencv2_contrib.framework/Headers/xfeatures2d.hpp:43:10: 'opencv2/xfeatures2d/nonfree.hpp' file not found
Is this procedure is wrong to use opencv2.framework with opencv_contrib?