From fd4df0f67dc093f8a384e44c0b40efed840b4a34 Mon Sep 17 00:00:00 2001 From: Abhijit Kundu Date: Mon, 28 Apr 2014 07:23:49 -0400 Subject: [PATCH 1/8] Added suuport for finding Intel TBB for Visual Studio 2013 --- cmake/OpenCVDetectTBB.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/OpenCVDetectTBB.cmake b/cmake/OpenCVDetectTBB.cmake index fe8e100ec3..8ff78bb3d4 100644 --- a/cmake/OpenCVDetectTBB.cmake +++ b/cmake/OpenCVDetectTBB.cmake @@ -63,6 +63,8 @@ if(NOT HAVE_TBB) set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10") elseif(MSVC11) set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc11") + elseif(MSVC12) + set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc12") endif() set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory") link_directories("${TBB_LIB_DIR}") From eaa9b781217d6d246f105e916771e9a90ea6653e Mon Sep 17 00:00:00 2001 From: Yang Fan Date: Tue, 14 Apr 2015 13:39:00 +0800 Subject: [PATCH 2/8] ENH: explicitly declared outputFilename to surpress error C2668 Conflicts: samples/gpu/video_writer.cpp --- samples/gpu/video_writer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/gpu/video_writer.cpp b/samples/gpu/video_writer.cpp index e5154d53a0..ce00675312 100644 --- a/samples/gpu/video_writer.cpp +++ b/samples/gpu/video_writer.cpp @@ -63,7 +63,8 @@ int main(int argc, const char* argv[]) { std::cout << "Open GPU Writer" << std::endl; - d_writer.open("output_gpu.avi", frame.size(), FPS); + const cv::String outputFilename = "output_gpu.avi"; + d_writer.open(outputFilename, frame.size(), FPS); } d_frame.upload(frame); From a21fb63c2841485980246db95dfd742540c4fe08 Mon Sep 17 00:00:00 2001 From: Ben Hagen Date: Mon, 19 Jan 2015 21:51:19 +0100 Subject: [PATCH 3/8] store user-provided data in PlaneTracker class --- samples/python2/plane_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python2/plane_tracker.py b/samples/python2/plane_tracker.py index 4b7d3959c7..fe86ce8ad3 100755 --- a/samples/python2/plane_tracker.py +++ b/samples/python2/plane_tracker.py @@ -73,7 +73,7 @@ class PlaneTracker: descs.append(desc) descs = np.uint8(descs) self.matcher.add([descs]) - target = PlanarTarget(image = image, rect=rect, keypoints = points, descrs=descs, data=None) + target = PlanarTarget(image = image, rect=rect, keypoints = points, descrs=descs, data=data) self.targets.append(target) def clear(self): From 7a5aa06b9e56b03f95514fde909218ee90b72503 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Tue, 30 Dec 2014 10:13:10 +0000 Subject: [PATCH 4/8] Act on INSTALL_PYTHON_EXAMPLES Conflicts: samples/CMakeLists.txt --- samples/CMakeLists.txt | 4 ++++ samples/python2/CMakeLists.txt | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 samples/python2/CMakeLists.txt diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index a2b8f68bc9..d2089de768 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -25,6 +25,10 @@ if(INSTALL_C_EXAMPLES) PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) endif() +if(INSTALL_PYTHON_EXAMPLES) + add_subdirectory(python2) +endif() + # # END OF BUILD CASE 1: Build samples with library sources # diff --git a/samples/python2/CMakeLists.txt b/samples/python2/CMakeLists.txt new file mode 100644 index 0000000000..7fa245447c --- /dev/null +++ b/samples/python2/CMakeLists.txt @@ -0,0 +1,6 @@ +if(INSTALL_PYTHON_EXAMPLES) + file(GLOB install_list *.py ) + install(FILES ${install_list} + DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/python2 + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) +endif() From 044de4105e809f7380e461588757fce6628eab1c Mon Sep 17 00:00:00 2001 From: Brian Park Date: Tue, 21 Oct 2014 22:47:49 -0700 Subject: [PATCH 5/8] add input paramter checking that verifies the existance of the input files to stero_match example remove the unnecessary header file check input paramter by checking the image size --- samples/cpp/stereo_match.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/samples/cpp/stereo_match.cpp b/samples/cpp/stereo_match.cpp index 69c77c39a3..9dc448abd3 100644 --- a/samples/cpp/stereo_match.cpp +++ b/samples/cpp/stereo_match.cpp @@ -159,7 +159,18 @@ int main(int argc, char** argv) Mat img1 = imread(img1_filename, color_mode); Mat img2 = imread(img2_filename, color_mode); - if( scale != 1.f ) + if (img1.empty()) + { + printf("Command-line parameter error: could not load the first input image file\n"); + return -1; + } + if (img2.empty()) + { + printf("Command-line parameter error: could not load the second input image file\n"); + return -1; + } + + if (scale != 1.f) { Mat temp1, temp2; int method = scale < 1 ? INTER_AREA : INTER_CUBIC; From d9b7b300b41d4d08f5f818a6a7b7b709e663b6af Mon Sep 17 00:00:00 2001 From: Dikay900 Date: Sat, 25 Apr 2015 14:31:50 +0200 Subject: [PATCH 6/8] fix qt example on 2.4 with vs2010 and higher --- samples/cpp/Qt_sample/qt_opengl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/cpp/Qt_sample/qt_opengl.cpp b/samples/cpp/Qt_sample/qt_opengl.cpp index 2878da4c00..eebb17b50a 100644 --- a/samples/cpp/Qt_sample/qt_opengl.cpp +++ b/samples/cpp/Qt_sample/qt_opengl.cpp @@ -13,6 +13,9 @@ #ifdef __APPLE__ #include #else +#if defined _MSC_VER && _MSC_VER >= 1600 +#include +#endif #include #endif From aad95c7d8c9fc93795d71889255a1085bbcb9a3e Mon Sep 17 00:00:00 2001 From: Adi Shavit Date: Thu, 3 Jul 2014 22:14:58 +0300 Subject: [PATCH 7/8] Added call to clone() to avoid unexpected change to external data. - Fix both stitching_detailed.cpp sample and cv::Stitcher. --- modules/stitching/src/stitcher.cpp | 2 +- samples/cpp/stitching_detailed.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index 83ea60954e..be2c2b7fd6 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -478,7 +478,7 @@ void Stitcher::estimateCameraParams() { vector rmats; for (size_t i = 0; i < cameras_.size(); ++i) - rmats.push_back(cameras_[i].R); + rmats.push_back(cameras_[i].R.clone()); detail::waveCorrect(rmats, wave_correct_kind_); for (size_t i = 0; i < cameras_.size(); ++i) cameras_[i].R = rmats[i]; diff --git a/samples/cpp/stitching_detailed.cpp b/samples/cpp/stitching_detailed.cpp index 4162addb38..60b73b35c9 100644 --- a/samples/cpp/stitching_detailed.cpp +++ b/samples/cpp/stitching_detailed.cpp @@ -516,7 +516,7 @@ int main(int argc, char* argv[]) { vector rmats; for (size_t i = 0; i < cameras.size(); ++i) - rmats.push_back(cameras[i].R); + rmats.push_back(cameras[i].R.clone()); waveCorrect(rmats, wave_correct); for (size_t i = 0; i < cameras.size(); ++i) cameras[i].R = rmats[i]; From 901d4995e39a2c501035461aeb8ae64aaf99a9fc Mon Sep 17 00:00:00 2001 From: Pierre Moulon Date: Fri, 14 Feb 2014 12:21:35 +0100 Subject: [PATCH 8/8] Fix a typo error Fix a typo error Conflicts: modules/features2d/include/opencv2/features2d.hpp --- modules/features2d/include/opencv2/features2d/features2d.hpp | 2 +- samples/cpp/freak_demo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/features2d/include/opencv2/features2d/features2d.hpp b/modules/features2d/include/opencv2/features2d/features2d.hpp index 9769431463..e4e796fbac 100644 --- a/modules/features2d/include/opencv2/features2d/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d/features2d.hpp @@ -879,7 +879,7 @@ CV_EXPORTS Mat windowedMatchingMask( const vector& keypoints1, const v /* * OpponentColorDescriptorExtractor * - * Adapts a descriptor extractor to compute descripors in Opponent Color Space + * Adapts a descriptor extractor to compute descriptors in Opponent Color Space * (refer to van de Sande et al., CGIV 2008 "Color Descriptors for Object Category Recognition"). * Input RGB image is transformed in Opponent Color Space. Then unadapted descriptor extractor * (set in constructor) computes descriptors on each of the three channel and concatenate diff --git a/samples/cpp/freak_demo.cpp b/samples/cpp/freak_demo.cpp index fd4eea42cd..6dbd9215ba 100644 --- a/samples/cpp/freak_demo.cpp +++ b/samples/cpp/freak_demo.cpp @@ -87,7 +87,7 @@ int main( int argc, char** argv ) { // DESCRIPTOR // Our proposed FREAK descriptor - // (roation invariance, scale invariance, pattern radius corresponding to SMALLEST_KP_SIZE, + // (rotation invariance, scale invariance, pattern radius corresponding to SMALLEST_KP_SIZE, // number of octaves, optional vector containing the selected pairs) // FREAK extractor(true, true, 22, 4, std::vector()); FREAK extractor;