2020-10-06 05:45:01 -0600 | received badge | ● Notable Question (source) |
2018-04-25 13:28:10 -0600 | received badge | ● Famous Question (source) |
2017-06-27 02:06:29 -0600 | received badge | ● Taxonomist |
2015-07-17 13:41:37 -0600 | received badge | ● Notable Question (source) |
2014-10-30 03:21:06 -0600 | received badge | ● Popular Question (source) |
2014-08-22 19:22:12 -0600 | received badge | ● Popular Question (source) |
2014-02-08 14:55:05 -0600 | asked a question | Include opencv2.framework in CMake iOS project with find_library I'm trying to include opencv2.framework in my CMake iOS project using the standard Xcode generator. I've verified that my opencv2.framework works as expected when included in an Xcode generated project. The CMake generated Xcode project compiles, and the target app runs fine. I haven't been able to find the correct syntax to include the opencv2.framework in order to start using OpenCV sections of code, nor have I found any references for how to achieve this. I'm even able to include Apple's standard system frameworks in my app using a macro based on find_library, so I can't be too far off. This is admittedly a bit more of a CMake question, but I think there is enough overlap and interest to warrant an opencv workflow related question here, and my previous post to the CMake mailing list has gone unanswered. I expect there are more CMake + opencv2 users on this forum. This post contains fairly specific details regarding what I have tried, but I'll be happy with any solution. Update: I'm able include the opencv2.framework using find_library if I place it in the Xcode internal folder Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/opencv2.framework (I've created a new post and updated the link above to provide more details). |
2012-11-15 08:23:18 -0600 | received badge | ● Student (source) |
2012-11-13 09:46:30 -0600 | asked a question | cmake install_name_tool absolute path for library on Mac OSX When I compile OpenCV for Mac OSX 10.8 using XCode 4.5.2 and cmake 2.8.9 my installed libraries aren't configured with the correct corresponding installation path. cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=RELEASE -D WITH_QT=ON -D WITH_OPENGL=ON -DCMAKE_INSTALL_PREFIX=/opt/local ../opencv.ram/ The CMAKE_INSTALL_PREFIX=/opt/local puts the libraries in the correct place after a "make install" but the embedded path names are configured with a relative path name such as "lib/libopencv" and not "/opt/local/lib/libopencv" as desired. otool -D /opt/local/lib/libopencv_core.2.4.3.dylib /opt/local/lib/libopencv_core.2.4.3.dylib: lib/libopencv_core.2.4.dylib The libraries in the build location after the make command but before the "make install" are configured with the correct absolute path name corresponding to the build tree location: otool -D /Volumes/ramdisk/osx_ffmpeg/lib/libopencv_core.2.4.3.dylib /Volumes/ramdisk/osx_ffmpeg/lib/libopencv_core.2.4.3.dylib: /Volumes/ramdisk/osx_ffmpeg/lib/libopencv_core.2.4.dylib The relative path seems to be set during installation in the generated cmake_install.cmake file via the install_name_tool command as shown here. grep -C1 install_name /Volumes/ramdisk/osx_ffmpeg/modules/core/cmake_install.cmake NOT IS_SYMLINK "${file}") EXECUTE_PROCESS(COMMAND "/usr/bin/install_name_tool" -id "lib/libopencv_core.2.4.dylib" Basically I'd like to configure the installed libraries with correct embedded absolute path names, so that I can link to them directly without using DYLD_LIBRARY_PATH or the like. Presumably this is the desired default build behavior? Perhaps my build syntax is missing something. I have found a number of links to folks who have remedied this with post installation scripts using the install_name_tool command to modify the path names, such as shown in the link below, but I'm guessing there is a way to avoid this. install_name_tool -id If I omit the CMAKE_INSTALL_PREFIX=/opt/local cmake option the libraries are installed in the default /usr/local/lib location but still have a relative embedded path name. UPDATE: I haven't found a cmake fix for this but did create a simpler post installation bash script that should fix the install path for opencv libraries and their dependencies: |
2012-11-03 14:38:19 -0600 | commented question | opencv for ios 5.1 (on OS X 10.8) with boost using c++11 and libc++ The latest version # seems to be different for the two repositories sited on http://code.opencv.org/projects/opencv/wiki (that page suggests itseez is a mirror): (1) git://code.opencv.org/opencv.git => 2.4.9 grep -E "CV_.*_VERSION" ${OPENCV}/opencv/modules/core/include/opencv2/core/version.hpp define CV_MAJOR_VERSION 2define CV_MINOR_VERSION 4define CV_SUBMINOR_VERSION 9(2) git://github.com/itseez/opencv.git => 2.4.3 grep -E "CV_.*_VERSION" ${ITSEEZ}/opencv/modules/core/include/opencv2/core/version.hpp define CV_MAJOR_VERSION 2define CV_MINOR_VERSION 4define CV_SUBMINOR_VERSION 3Can someone explain or send a link that explains the difference between and reason for the two repositories? I'm guessing this is addressed somewhere but my searches have come up empty. |
2012-11-01 17:20:45 -0600 | commented answer | opencv for ios 5.1 (on OS X 10.8) with boost using c++11 and libc++ That was the version of my last checkout from the git repository |
2012-11-01 17:18:06 -0600 | commented answer | opencv for ios 5.1 (on OS X 10.8) with boost using c++11 and libc++ Magic! I've been hacking this all day. The latest OpenCV should be fine. I'll give that a try. Thanks. EDIT: From the link it seems that you removed the atomicity.h dependency in commit # d9d4e8df6f8d26e904ac3c50a54df1d5e1c6cecd but after a fresh checkout via git clone git://github.com/Itseez/opencv.git my opencv/modules/core/include/opencv2/core/operations.hpp still contains a #include <ext/atomicity.h>. I'm not a git user, so perhaps I'm missing something? |
2012-11-01 16:20:31 -0600 | received badge | ● Editor (source) |
2012-11-01 16:01:05 -0600 | asked a question | opencv for ios 5.1 (on OS X 10.8) with boost using c++11 and libc++ In the process of adding boost 1.5.1 to my ios project, I encountered an incompatibility due to C++ Standard Library conflicts, e.g.: since my boost build via galbraithjosephs-boostoniphone compiles with the following options: and it appears that the OpenCV 2.4.9 CMake build compiles with gnu++11 and libstdc++. I'm compiling an OpenCV framework with the included build script as follows: At this point my plan is to try to rebuild my OpenCV framework with the c++11 compiler and libc++ standard library as in the boost build, and then update all of my XCode libraries and applications appropriately. The following link aimed at OpenCV 2.4.2 OpenCV with C++11 on OS X 10.8 seems to be a good starting point, and it essentially suggests modifying CMakeLists.txt with the following entries: but after modifying the opencv/CMakeLists.txt file in the first step my build fails with the following message: and I noticed that the output indicates that it is still using the GNU compiler. I see the message added above in the build output but the compiler and arguments are still listed as: If anyone has advice or a link for how to tune CMake accordingly it would be much appreciated. I would imagine opencv + boost are fairly common siblings for ios platforms. EDIT: The build also reports a second error |