Merge pull request #1336 from jet47:gpu-resize
authorRoman Donchenko <roman.donchenko@itseez.com>
Mon, 26 Aug 2013 12:40:50 +0000 (16:40 +0400)
committerOpenCV Buildbot <buildbot@opencv.org>
Mon, 26 Aug 2013 12:40:50 +0000 (16:40 +0400)
CMakeLists.txt
cmake/OpenCVFindLibsGrfmt.cmake
cmake/OpenCVFindLibsVideo.cmake
cmake/OpenCVGenInfoPlist.cmake [new file with mode: 0644]
modules/core/doc/basic_structures.rst
modules/core/src/parallel.cpp
platforms/ios/Info.plist.in
platforms/ios/build_framework.py
samples/gpu/super_resolution.cpp

index 4c38b5b..5954765 100644 (file)
@@ -497,6 +497,8 @@ include(cmake/OpenCVGenAndroidMK.cmake)
 # Generate OpenCVŠ”onfig.cmake and OpenCVConfig-version.cmake for cmake projects
 include(cmake/OpenCVGenConfig.cmake)
 
+# Generate Info.plist for the IOS framework
+include(cmake/OpenCVGenInfoPlist.cmake)
 
 # ----------------------------------------------------------------------------
 # Summary:
index 9381350..f27a302 100644 (file)
@@ -114,7 +114,7 @@ if(WITH_JASPER)
 endif()
 
 # --- libpng (optional, should be searched after zlib) ---
-if(WITH_PNG AND NOT IOS)
+if(WITH_PNG)
   if(BUILD_PNG)
     ocv_clear_vars(PNG_FOUND)
   else()
index 9572c72..dcd5e87 100644 (file)
@@ -241,8 +241,10 @@ if(WITH_AVFOUNDATION)
 endif()
 
 # --- QuickTime ---
-if(WITH_QUICKTIME)
-  set(HAVE_QUICKTIME YES)
-elseif(APPLE)
-  set(HAVE_QTKIT YES)
+if (NOT IOS)
+  if(WITH_QUICKTIME)
+    set(HAVE_QUICKTIME YES)
+  elseif(APPLE)
+    set(HAVE_QTKIT YES)
+  endif()
 endif()
diff --git a/cmake/OpenCVGenInfoPlist.cmake b/cmake/OpenCVGenInfoPlist.cmake
new file mode 100644 (file)
index 0000000..97c674c
--- /dev/null
@@ -0,0 +1,4 @@
+if(IOS)
+  configure_file("${OpenCV_SOURCE_DIR}/platforms/ios/Info.plist.in"
+                 "${CMAKE_BINARY_DIR}/ios/Info.plist")
+endif()
index a3f7f92..16d7e50 100644 (file)
@@ -1292,7 +1292,7 @@ The method makes a new header for the specified row span of the matrix. Similarl
 
 Mat::colRange
 -------------
-Creates a matrix header for the specified row span.
+Creates a matrix header for the specified column span.
 
 .. ocv:function:: Mat Mat::colRange(int startcol, int endcol) const
 
index 1ae8c96..27d7ecc 100644 (file)
@@ -144,9 +144,9 @@ namespace
         {
             cv::Range r;
             r.start = (int)(wholeRange.start +
-                            ((size_t)sr.start*(wholeRange.end - wholeRange.start) + nstripes/2)/nstripes);
+                            ((uint64)sr.start*(wholeRange.end - wholeRange.start) + nstripes/2)/nstripes);
             r.end = sr.end >= nstripes ? wholeRange.end : (int)(wholeRange.start +
-                            ((size_t)sr.end*(wholeRange.end - wholeRange.start) + nstripes/2)/nstripes);
+                            ((uint64)sr.end*(wholeRange.end - wholeRange.start) + nstripes/2)/nstripes);
             (*body)(r);
         }
         cv::Range stripeRange() const { return cv::Range(0, nstripes); }
index 6bcfe86..b2a3baf 100644 (file)
@@ -7,9 +7,9 @@
     <key>CFBundleIdentifier</key>
     <string>org.opencv</string>
     <key>CFBundleVersion</key>
-    <string>${VERSION}</string>
+    <string>${OPENCV_LIBVERSION}</string>
     <key>CFBundleShortVersionString</key>
-    <string>${VERSION}</string>
+    <string>${OPENCV_LIBVERSION}</string>
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundlePackageType</key>
index 7dfd394..cb3788f 100755 (executable)
@@ -71,19 +71,11 @@ def put_framework_together(srcroot, dstroot):
     os.makedirs(framework_dir)
     os.chdir(framework_dir)
 
-    # determine OpenCV version (without subminor part)
-    tdir0 = "../build/" + targetlist[0]
-    cfg = open(tdir0 + "/cvconfig.h", "rt")
-    for l in cfg.readlines():
-        if l.startswith("#define  VERSION"):
-            opencv_version = l[l.find("\"")+1:l.rfind(".")]
-            break
-    cfg.close()
-
     # form the directory tree
     dstdir = "Versions/A"
     os.makedirs(dstdir + "/Resources")
 
+    tdir0 = "../build/" + targetlist[0]
     # copy headers
     shutil.copytree(tdir0 + "/install/include/opencv2", dstdir + "/Headers")
 
@@ -91,13 +83,8 @@ def put_framework_together(srcroot, dstroot):
     wlist = " ".join(["../build/" + t + "/lib/Release/libopencv_world.a" for t in targetlist])
     os.system("lipo -create " + wlist + " -o " + dstdir + "/opencv2")
 
-    # form Info.plist
-    srcfile = open(srcroot + "/platforms/ios/Info.plist.in", "rt")
-    dstfile = open(dstdir + "/Resources/Info.plist", "wt")
-    for l in srcfile.readlines():
-        dstfile.write(l.replace("${VERSION}", opencv_version))
-    srcfile.close()
-    dstfile.close()
+    # copy Info.plist
+    shutil.copyfile(tdir0 + "/ios/Info.plist", dstdir + "/Resources/Info.plist")
 
     # make symbolic links
     os.symlink("A", "Versions/Current")
index 4e83c71..07dda77 100644 (file)
@@ -211,7 +211,7 @@ int main(int argc, const char* argv[])
 #if defined(HAVE_OPENCV_OCL)
         cout << "Mode            : " << (useCuda ? "CUDA" : useOcl? "OpenCL" : "CPU") << endl;
 #else
-        cout << "Mode            : " << (useGpu ? "CUDA" : "CPU") << endl;
+        cout << "Mode            : " << (useCuda ? "CUDA" : "CPU") << endl;
 #endif
     }