Ask Your Question
1

How to make opencv2.framework with opencv_contrib

asked 2015-05-11 08:18:18 -0600

updated 2015-05-11 08:21:29 -0600

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...

So, I tried to build opencv2.framework with opencv_contrib in the following steps.

  1. get the code of opencv-3.0.0-rc1.
  2. get the code of opencv_contrib.
  3. run python opencv-3.0.0-rc1/platforms/ios/build_framework.py ios to generate opencv2.framework.
  4. run python opencv-3.0.0-rc1/platforms/ios/build_framework.py --contrib opencv_contrib ios_contrib to generate opencv2_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?

edit retag flag offensive close merge delete

Comments

Can you please guide me to create opencv2_contrib.framework as i am new in opencv?

mau.tasol gravatar imagemau.tasol ( 2018-04-03 01:16:49 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-08-13 20:21:42 -0600

carl gravatar image

I have same problem,and you can't

import opencv2/module.hpp

from opencv2_contrib.framework,instead you should import like this

opencv2_contrib/module/module.hpp

edit flag offensive delete link more

Comments

Thank you for your comment!
I' ll try it.

dandelion1124 gravatar imagedandelion1124 ( 2015-08-23 00:24:26 -0600 )edit
1

I found other solution. I replaced my "build_framework.py".
https://gist.github.com/atinfinity/cc...

dandelion1124 gravatar imagedandelion1124 ( 2015-08-23 06:44:47 -0600 )edit

i am getting error to create opencv2_contrib.framework

mau.tasol gravatar imagemau.tasol ( 2018-04-03 02:19:37 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-05-11 08:18:18 -0600

Seen: 4,802 times

Last updated: May 11 '15