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}") 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/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/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/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 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; 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; 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]; 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); 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() 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):