3.0.0. Objective-C Framework with Extra Modules

asked 2015-09-02 01:23:11 -0500

I'm trying to build a framework for Objective-C use in XCode with the extra modules needed to run facial recognition, (FaceRecognizer etc.) I have built a framework from 2.4.11 and 2.4.10 but both revolve around iOS applications, and thus use Cocoa Classes reserved for use in mobile applications. I am trying to write a desktop application, and thus cannot use those classes; (UIImage for example).

I have the extra modules and have tried adding the following line to the build_framework.py with cmakeargs

"-DOPENCV_EXTRA_MODULES_PATH=/Users/lewisbull/Apps/opencv/opencv_contrib-master/modules"

The install build failed, returning these messages:

** INSTALL FAILED **


    The following build commands failed:
        Ld /Users/lewisbull/osx-3.0.0-extra/build/MacOSX-x86_64/modules/adas/tools/fcw_detect/UninstalledProducts/opencv_fcw_detect normal x86_64
    (1 failure)

and

** INSTALL FAILED **


The following build commands failed:
    Ld /Users/lewisbull/osx-3.0.0-extra/build/MacOSX-i386/modules/adas/tools/fcw_train/UninstalledProducts/opencv_fcw_train normal i386
(1 failure)
Traceback (most recent call last):
  File "/Users/lewisbull/Apps/opencv/opencv-3.0.0/platforms/osx/build_framework.py", line 125, in <module>
    build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../..")), os.path.abspath(sys.argv[1]))
  File "/Users/lewisbull/Apps/opencv/opencv-3.0.0/platforms/osx/build_framework.py", line 117, in build_framework
    put_framework_together(srcroot, dstroot)
  File "/Users/lewisbull/Apps/opencv/opencv-3.0.0/platforms/osx/build_framework.py", line 93, in put_framework_together
    shutil.copytree(tdir0 + "/install/include/opencv2", dstdir + "/Headers")
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 171, in copytree
    names = os.listdir(src)
OSError: [Errno 2] No such file or directory: '../build/MacOSX-i386/install/include/opencv2'
Lewis-Bulls-iMac:~ lewisbull$ -- Check size of off64_t
-bash: --: command not found
Lewis-Bulls-iMac:~ lewisbull$ -- Check size of off64_t - failed

I think this may not be the correct way to insatll opencv with the extra modules within a framework, but I am unsure how to accomplish it otherwise. Is there a way to make a framework able to be used within Objective C from opencv3.0.0. that supports FaceRecognizer and other modules, or is it preferable to write the program within python, where 2.4.10/11 is more easily implemented?

Many thanks,

Lewis.

edit retag flag offensive close merge delete