Permalink
Browse files

Update OpenCV to 2.1, Update build script

  • Loading branch information...
1 parent 5809b40 commit 140b90aa41c456e538ca326202aa7b71e00d4686 @niw committed Aug 22, 2010
Showing with 5,948 additions and 5,643 deletions.
  1. +2 −1 .gitignore
  2. +63 −0 OpenCV-2.1.0.patch
  3. +28 −18 OpenCVTest.xcodeproj/project.pbxproj
  4. +0 −96 configure_opencv
  5. +0 −11 cvcalibration.cpp.patch_opencv-1.1.0
  6. +0 −11 cvcalibration.cpp.patch_opencv-2.0.0
  7. +109 −0 opencv_cmake.sh
  8. +57 −44 opencv_device/include/opencv/cv.h
  9. +97 −24 opencv_device/include/opencv/cv.hpp
  10. +54 −5 opencv_device/include/opencv/cvaux.h
  11. +1,832 −1,234 opencv_device/include/opencv/cvaux.hpp
  12. +4 −4 opencv_device/include/opencv/cvcompat.h
  13. +209 −0 opencv_device/include/opencv/cvinternal.h
  14. +0 −93 opencv_device/include/opencv/cvstreams.h
  15. +4 −19 opencv_device/include/opencv/cvtypes.h
  16. +4 −4 opencv_device/include/opencv/cvver.h
  17. +2 −2 opencv_device/include/opencv/cvvidsurv.hpp
  18. +3 −3 opencv_device/include/opencv/cvwimage.h
  19. +28 −325 opencv_device/include/opencv/cxcore.h
  20. +112 −48 opencv_device/include/opencv/cxcore.hpp
  21. +6 −7 opencv_device/include/opencv/cxerror.h
  22. +3 −3 opencv_device/include/opencv/cxflann.h
  23. +214 −139 opencv_device/include/opencv/cxmat.hpp
  24. +2 −9 opencv_device/include/opencv/cxmisc.h
  25. +168 −42 opencv_device/include/opencv/cxoperations.hpp
  26. +18 −25 opencv_device/include/opencv/cxtypes.h
  27. +0 −534 opencv_device/include/opencv/highgui.h
  28. +0 −130 opencv_device/include/opencv/highgui.hpp
  29. +56 −59 opencv_device/include/opencv/ml.h
  30. BIN opencv_device/lib/libcv.a
  31. BIN opencv_device/lib/libcvaux.a
  32. BIN opencv_device/lib/libcxcore.a
  33. BIN opencv_device/lib/libhighgui.a
  34. BIN opencv_device/lib/libml.a
  35. BIN opencv_device/lib/libopencv_lapack.a
  36. +57 −44 opencv_simulator/include/opencv/cv.h
  37. +97 −24 opencv_simulator/include/opencv/cv.hpp
  38. +54 −5 opencv_simulator/include/opencv/cvaux.h
  39. +1,832 −1,234 opencv_simulator/include/opencv/cvaux.hpp
  40. +4 −4 opencv_simulator/include/opencv/cvcompat.h
  41. +209 −0 opencv_simulator/include/opencv/cvinternal.h
  42. +0 −93 opencv_simulator/include/opencv/cvstreams.h
  43. +4 −19 opencv_simulator/include/opencv/cvtypes.h
  44. +4 −4 opencv_simulator/include/opencv/cvver.h
  45. +2 −2 opencv_simulator/include/opencv/cvvidsurv.hpp
  46. +3 −3 opencv_simulator/include/opencv/cvwimage.h
  47. +28 −325 opencv_simulator/include/opencv/cxcore.h
  48. +112 −48 opencv_simulator/include/opencv/cxcore.hpp
  49. +6 −7 opencv_simulator/include/opencv/cxerror.h
  50. +3 −3 opencv_simulator/include/opencv/cxflann.h
  51. +214 −139 opencv_simulator/include/opencv/cxmat.hpp
  52. +2 −9 opencv_simulator/include/opencv/cxmisc.h
  53. +168 −42 opencv_simulator/include/opencv/cxoperations.hpp
  54. +18 −25 opencv_simulator/include/opencv/cxtypes.h
  55. +0 −534 opencv_simulator/include/opencv/highgui.h
  56. +0 −130 opencv_simulator/include/opencv/highgui.hpp
  57. +56 −59 opencv_simulator/include/opencv/ml.h
  58. BIN opencv_simulator/lib/libcv.a
  59. BIN opencv_simulator/lib/libcvaux.a
  60. BIN opencv_simulator/lib/libcxcore.a
  61. BIN opencv_simulator/lib/libhighgui.a
  62. BIN opencv_simulator/lib/libml.a
  63. BIN opencv_simulator/lib/libopencv_lapack.a
View
@@ -3,6 +3,7 @@
/*.xcodeproj/*.perspectivev3
/*.xcodeproj/*.pbxuser
/*.xcodeproj/*.mode*
-/opencv-*
+/OpenCV-*/
/opencv_*/lib/*.la
/opencv_*/lib/pkgconfig
+/opencv_*/share
View
@@ -0,0 +1,63 @@
+Only in OpenCV-2.1.0.patched: CMakeCache.txt
+Only in OpenCV-2.1.0.patched: CMakeFiles
+diff -ru OpenCV-2.1.0/CMakeLists.txt OpenCV-2.1.0.patched/CMakeLists.txt
+--- OpenCV-2.1.0/CMakeLists.txt 2010-04-05 18:24:37.000000000 -0700
++++ OpenCV-2.1.0.patched/CMakeLists.txt 2010-08-22 00:10:11.000000000 -0700
+@@ -195,8 +195,6 @@
+ set(OPENCV_BUILD_3RDPARTY_LIBS FALSE CACHE BOOL "Build 3rd party libraries")
+ endif()
+
+-include(OpenCVPCHSupport.cmake REQUIRED)
+-
+ if(UNIX)
+ include(OpenCVFindPkgConfig.cmake OPTIONAL)
+ include(CheckFunctionExists)
+@@ -297,23 +295,6 @@
+ set(ALIAS_LIBRARIES ${ALIAS}_LIBRARIES)
+
+ PKG_CHECK_MODULES(${ALIAS} ${module_name})
+-
+- if (${ALIAS_FOUND})
+- set(${define} 1)
+- foreach(P "${ALIAS_INCLUDE_DIRS}")
+- if (${P})
+- list(APPEND HIGHGUI_INCLUDE_DIRS ${${P}})
+- endif()
+- endforeach()
+-
+- foreach(P "${ALIAS_LIBRARY_DIRS}")
+- if (${P})
+- list(APPEND HIGHGUI_LIBRARY_DIRS ${${P}})
+- endif()
+- endforeach()
+-
+- list(APPEND HIGHGUI_LIBRARIES ${${ALIAS_LIBRARIES}})
+- endif()
+ endif()
+ endmacro()
+
+@@ -1041,7 +1022,7 @@
+ endif()
+
+ install(DIRECTORY data samples DESTINATION "." COMPONENT main PATTERN ".svn" EXCLUDE)
+- install(DIRECTORY 3rdparty apps interfaces src tests utils DESTINATION "." COMPONENT src PATTERN ".svn" EXCLUDE)
++ install(DIRECTORY 3rdparty interfaces src tests utils DESTINATION "." COMPONENT src PATTERN ".svn" EXCLUDE)
+ install(DIRECTORY doc/ DESTINATION doc COMPONENT src FILES_MATCHING PATTERN "*.tex")
+ install(DIRECTORY doc/pics DESTINATION doc COMPONENT src PATTERN ".svn" EXCLUDE)
+ install(DIRECTORY doc/plastex DESTINATION doc COMPONENT src PATTERN ".svn" EXCLUDE)
+@@ -1054,7 +1035,6 @@
+ # Subdirectories:
+ #-----------------------------------
+ add_subdirectory(src)
+-add_subdirectory(apps)
+
+ if(BUILD_LATEX_DOCS)
+ include(OpenCVFindLATEX.cmake REQUIRED)
+diff -ru OpenCV-2.1.0/src/CMakeLists.txt OpenCV-2.1.0.patched/src/CMakeLists.txt
+--- OpenCV-2.1.0/src/CMakeLists.txt 2010-04-05 18:24:42.000000000 -0700
++++ OpenCV-2.1.0.patched/src/CMakeLists.txt 2010-08-22 00:07:51.000000000 -0700
+@@ -2,4 +2,3 @@
+ add_subdirectory(cv)
+ add_subdirectory(cvaux)
+ add_subdirectory(ml)
+-add_subdirectory(highgui)
@@ -18,6 +18,9 @@
540ABC6B0E3E1C5300E30885 /* haarcascade_frontalface_default.xml in Resources */ = {isa = PBXBuildFile; fileRef = 540ABC6A0E3E1C5300E30885 /* haarcascade_frontalface_default.xml */; };
540ABCF60E3E280700E30885 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 540ABCF50E3E280700E30885 /* Icon.png */; };
549913C70E3E3D2100BD1311 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 549913C60E3E3D2100BD1311 /* Default.png */; };
+ 54A4A00312211BFD006678AF /* libcv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 54A4A00212211BFD006678AF /* libcv.a */; };
+ 54A4A00512211C0D006678AF /* libcxcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 54A4A00412211C0D006678AF /* libcxcore.a */; };
+ 54A4A00A12211DC3006678AF /* libopencv_lapack.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 54A4A00912211DC3006678AF /* libopencv_lapack.a */; };
54BBAF3D0F04148D00568ED9 /* Tink.aiff in Resources */ = {isa = PBXBuildFile; fileRef = 54BBAF3C0F04148D00568ED9 /* Tink.aiff */; };
54BBAF4F0F0414C200568ED9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54BBAF4E0F0414C200568ED9 /* AudioToolbox.framework */; };
54FC5BDE0E3EB3EB00F48645 /* laughing_man.png in Resources */ = {isa = PBXBuildFile; fileRef = 54FC5BDD0E3EB3EB00F48645 /* laughing_man.png */; };
@@ -39,6 +42,9 @@
5452E0090E3D08AA00FE4518 /* lena.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = lena.jpg; sourceTree = "<group>"; };
5452E0730E3D119700FE4518 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
549913C60E3E3D2100BD1311 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 54A4A00212211BFD006678AF /* libcv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcv.a; path = opencv_device/lib/libcv.a; sourceTree = "<group>"; };
+ 54A4A00412211C0D006678AF /* libcxcore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcxcore.a; path = opencv_device/lib/libcxcore.a; sourceTree = "<group>"; };
+ 54A4A00912211DC3006678AF /* libopencv_lapack.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_lapack.a; path = opencv_device/lib/libopencv_lapack.a; sourceTree = "<group>"; };
54BBAF3C0F04148D00568ED9 /* Tink.aiff */ = {isa = PBXFileReference; lastKnownFileType = audio.aiff; path = Tink.aiff; sourceTree = "<group>"; };
54BBAF4E0F0414C200568ED9 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
54FC5BDD0E3EB3EB00F48645 /* laughing_man.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = laughing_man.png; sourceTree = "<group>"; };
@@ -54,6 +60,9 @@
540723E30E3DD25B00B598A2 /* UIKit.framework in Frameworks */,
540723E40E3DD25B00B598A2 /* CoreGraphics.framework in Frameworks */,
54BBAF4F0F0414C200568ED9 /* AudioToolbox.framework in Frameworks */,
+ 54A4A00312211BFD006678AF /* libcv.a in Frameworks */,
+ 54A4A00512211C0D006678AF /* libcxcore.a in Frameworks */,
+ 54A4A00A12211DC3006678AF /* libopencv_lapack.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -130,6 +139,9 @@
540723F00E3DD28C00B598A2 /* Libraries */ = {
isa = PBXGroup;
children = (
+ 54A4A00212211BFD006678AF /* libcv.a */,
+ 54A4A00412211C0D006678AF /* libcxcore.a */,
+ 54A4A00912211DC3006678AF /* libopencv_lapack.a */,
);
name = Libraries;
sourceTree = "<group>";
@@ -214,17 +226,15 @@
"HEADER_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "$(SRCROOT)/opencv_device/include";
"HEADER_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "$(SRCROOT)/opencv_simulator/include";
INFOPLIST_FILE = Info.plist;
- "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
- "-lstdc++",
- "-lz",
- "$(SRCROOT)/opencv_device/lib/libcv.a",
- "$(SRCROOT)/opencv_device/lib/libcxcore.a",
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/opencv_device/lib\"",
);
- "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = (
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "$(SRCROOT)/opencv_device/lib";
+ "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "$(SRCROOT)/opencv_simulator/lib";
+ OTHER_LDFLAGS = (
"-lstdc++",
"-lz",
- "$(SRCROOT)/opencv_simulator/lib/libcv.a",
- "$(SRCROOT)/opencv_simulator/lib/libcxcore.a",
);
PRODUCT_NAME = OpenCVTest;
};
@@ -240,17 +250,15 @@
"HEADER_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "$(SRCROOT)/opencv_device/include";
"HEADER_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "$(SRCROOT)/opencv_simulator/include";
INFOPLIST_FILE = Info.plist;
- "OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
- "-lstdc++",
- "-lz",
- "$(SRCROOT)/opencv_device/lib/libcv.a",
- "$(SRCROOT)/opencv_device/lib/libcxcore.a",
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/opencv_device/lib\"",
);
- "OTHER_LDFLAGS[sdk=iphonesimulator*][arch=*]" = (
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = "$(SRCROOT)/opencv_device/lib";
+ "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=*]" = "$(SRCROOT)/opencv_simulator/lib";
+ OTHER_LDFLAGS = (
"-lstdc++",
"-lz",
- "$(SRCROOT)/opencv_simulator/lib/libcv.a",
- "$(SRCROOT)/opencv_simulator/lib/libcxcore.a",
);
PRODUCT_NAME = OpenCVTest;
};
@@ -264,9 +272,10 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
- SDKROOT = iphoneos3.1.2;
+ SDKROOT = iphoneos4.0;
};
name = Debug;
};
@@ -278,8 +287,9 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
PREBINDING = NO;
- SDKROOT = iphoneos3.1.2;
+ SDKROOT = iphoneos4.0;
};
name = Release;
};
View
@@ -1,96 +0,0 @@
-#!/bin/sh
-if [ "$1" = "--help" -o "$1" = "-h" ]; then
- echo "Usage: $0 [Options | Configure Options] [Enviroment Variables]"
- echo ""
- echo "OPTIONS"
- echo " -h, --help Show this guide"
- echo " -c, --configure-help Show configure help for configure options"
- echo ""
- echo "ENVIROMENT VARIABLES"
- echo " SDK_VERION Select iPhone SDK Version (2.0, 2.1, 2.2, 2.2.1, 3.0, 3.1, 3.1.2 and more)"
- echo " Default = 3.1.2"
- echo " GCC_VERSION Select GCC Version (4.0 for SDK 2.x, 3.x, 4.2 for SDK 3.x and more)"
- echo " Default = 4.0 for SDK 2.x, 4.2 for SDK 3.x"
- echo " ARCH Select target architecture (device or simulator)"
- echo " Default = simulator"
- echo " CONFIGURE Path to configure script"
- echo " Default = ../configure"
- echo ""
- echo "EXAMPLES"
- echo " % $0 Making OpenCV with SDK3.1.2 using GCC4.2 for iPhone simulator"
- echo " % $0 GCC_VERISON=4.0 ARCH=device Making OpenCV with SDK3.1.2 using GCC4.0 for iPhone device"
- echo " % $0 SDK_VERISON=3.0 ARCH=device Making OpenCV with SDK3.0 using GCC4.2 for iPhone device"
- echo " % $0 SDK_VERSION=2.2.1 Making OpenCV with SDK2.2.1 using GCC4.0 for iPhone simulator"
- exit
-fi
-if [ -z "${CONFIGURE}" ]; then
- CONFIGURE=../configure
-fi
-if [ ! -e "${CONFIGURE}" ]; then
- echo "Missing '${CONFIGURE}', please set the path to configure by CONFIGURE enviroment variable."
- exit 1
-fi
-if [ "$1" = "--configure-help" -o "$1" = "-c" ]; then
- ${CONFIGURE} --help
- exit
-fi
-
-if [ -z "${SDK_VERSION}" ]; then
- SDK_VERSION=3.1.2
-fi
-if [ -z "${GCC_VERSION}" ]; then
- if [ `expr ${SDK_VERSION} \\>= 3.0` = '1' ]; then
- GCC_VERSION=4.2
- else
- GCC_VERSION=4.0
- fi
-fi
-if [ -z "${ARCH}" ]; then
- ARCH=simulator
-fi
-if [ "${ARCH}" = "simulator" ]; then
- ARCH_SDKNAME=Simulator
- ARCH_FLAG="-arch i686 -mmacosx-version-min=10.5"
- ARCH_HOST=i686-apple-darwin9
-elif [ "${ARCH}" = "device" ]; then
- ARCH_SDKNAME=OS
- ARCH_FLAG="-arch armv6 -miphoneos-version-min=${SDK_VERSION}"
- ARCH_HOST=arm-apple-darwin9
-else
- echo "Please select target architecture with ARCH enviroment variable (simulator or device)."
- exit 1
-fi
-echo "Use iPhone SDK ${SDK_VERSION}(gcc ${GCC_VERSION}) for ${ARCH}"
-
-PLATFORM=/Developer/Platforms/iPhone${ARCH_SDKNAME}.platform
-BIN=${PLATFORM}/Developer/usr/bin
-SDK=${PLATFORM}/Developer/SDKs/iPhone${ARCH_SDKNAME}${SDK_VERSION}.sdk
-
-PREFIX=`pwd`/`dirname $0`/opencv_${ARCH}
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:${BIN}
-
-${CONFIGURE} \
- --prefix=${PREFIX} \
- --build=i686-apple-darwin \
- --host=${ARCH_HOST} \
- --enable-static \
- --disable-shared \
- --disable-sse \
- --disable-apps \
- --without-python \
- --without-ffmpeg \
- --without-1394libs \
- --without-v4l \
- --without-imageio \
- --without-quicktime \
- --without-carbon \
- --without-gtk \
- --without-gthread \
- $* \
- CC=${BIN}/gcc-${GCC_VERSION} \
- CXX=${BIN}/g++-${GCC_VERSION} \
- CFLAGS="${ARCH_FLAG} -isysroot ${SDK}" \
- CXXFLAGS="${ARCH_FLAG} -isysroot ${SDK}" \
- CPP=${BIN}/cpp \
- CXXCPP=${BIN}/cpp \
- AR=${BIN}/ar
@@ -1,11 +0,0 @@
---- cv/src/cvcalibration.cpp.orig 2009-11-15 03:56:44.000000000 +0900
-+++ cv/src/cvcalibration.cpp 2009-11-15 03:56:55.000000000 +0900
-@@ -2292,7 +2292,7 @@
- CvMat wR = cvMat(3, 3, CV_64F, _wr);
- CvMat Z = cvMat(3, 1, CV_64F, _z);
- CvMat Ri = cvMat(3, 3, CV_64F, _ri);
-- double nx = imageSize.width, ny = imageSize.height;
-+ int nx = imageSize.width, ny = imageSize.height;
- int i, k;
-
- if( _R->rows == 3 && _R->cols == 3 )
@@ -1,11 +0,0 @@
---- src/cv/cvcalibration.cpp.orig 2009-11-15 03:54:30.000000000 +0900
-+++ src/cv/cvcalibration.cpp 2009-11-15 03:55:17.000000000 +0900
-@@ -2320,7 +2320,7 @@
- CvMat wR = cvMat(3, 3, CV_64F, _wr);
- CvMat Z = cvMat(3, 1, CV_64F, _z);
- CvMat Ri = cvMat(3, 3, CV_64F, _ri);
-- double nx = imageSize.width, ny = imageSize.height;
-+ int nx = imageSize.width, ny = imageSize.height;
- int i, k;
-
- if( _R->rows == 3 && _R->cols == 3 )
Oops, something went wrong.

0 comments on commit 140b90a

Please sign in to comment.