Commit 08848c56 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3965 from Dikay900:2_4_diff_to_master_2

parents ebe97909 901d4995
...@@ -63,6 +63,8 @@ if(NOT HAVE_TBB) ...@@ -63,6 +63,8 @@ if(NOT HAVE_TBB)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10") set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10")
elseif(MSVC11) elseif(MSVC11)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc11") set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc11")
elseif(MSVC12)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc12")
endif() endif()
set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory") set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory")
link_directories("${TBB_LIB_DIR}") link_directories("${TBB_LIB_DIR}")
......
...@@ -879,7 +879,7 @@ CV_EXPORTS Mat windowedMatchingMask( const vector<KeyPoint>& keypoints1, const v ...@@ -879,7 +879,7 @@ CV_EXPORTS Mat windowedMatchingMask( const vector<KeyPoint>& keypoints1, const v
/* /*
* OpponentColorDescriptorExtractor * 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"). * (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 * 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 * (set in constructor) computes descriptors on each of the three channel and concatenate
......
...@@ -478,7 +478,7 @@ void Stitcher::estimateCameraParams() ...@@ -478,7 +478,7 @@ void Stitcher::estimateCameraParams()
{ {
vector<Mat> rmats; vector<Mat> rmats;
for (size_t i = 0; i < cameras_.size(); ++i) 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_); detail::waveCorrect(rmats, wave_correct_kind_);
for (size_t i = 0; i < cameras_.size(); ++i) for (size_t i = 0; i < cameras_.size(); ++i)
cameras_[i].R = rmats[i]; cameras_[i].R = rmats[i];
......
...@@ -25,6 +25,10 @@ if(INSTALL_C_EXAMPLES) ...@@ -25,6 +25,10 @@ if(INSTALL_C_EXAMPLES)
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
endif() endif()
if(INSTALL_PYTHON_EXAMPLES)
add_subdirectory(python2)
endif()
# #
# END OF BUILD CASE 1: Build samples with library sources # END OF BUILD CASE 1: Build samples with library sources
# #
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#ifdef __APPLE__ #ifdef __APPLE__
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#else #else
#if defined _MSC_VER && _MSC_VER >= 1600
#include <windows.h>
#endif
#include <GL/gl.h> #include <GL/gl.h>
#endif #endif
......
...@@ -87,7 +87,7 @@ int main( int argc, char** argv ) { ...@@ -87,7 +87,7 @@ int main( int argc, char** argv ) {
// DESCRIPTOR // DESCRIPTOR
// Our proposed FREAK 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) // number of octaves, optional vector containing the selected pairs)
// FREAK extractor(true, true, 22, 4, std::vector<int>()); // FREAK extractor(true, true, 22, 4, std::vector<int>());
FREAK extractor; FREAK extractor;
......
...@@ -159,7 +159,18 @@ int main(int argc, char** argv) ...@@ -159,7 +159,18 @@ int main(int argc, char** argv)
Mat img1 = imread(img1_filename, color_mode); Mat img1 = imread(img1_filename, color_mode);
Mat img2 = imread(img2_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; Mat temp1, temp2;
int method = scale < 1 ? INTER_AREA : INTER_CUBIC; int method = scale < 1 ? INTER_AREA : INTER_CUBIC;
......
...@@ -516,7 +516,7 @@ int main(int argc, char* argv[]) ...@@ -516,7 +516,7 @@ int main(int argc, char* argv[])
{ {
vector<Mat> rmats; vector<Mat> rmats;
for (size_t i = 0; i < cameras.size(); ++i) 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); waveCorrect(rmats, wave_correct);
for (size_t i = 0; i < cameras.size(); ++i) for (size_t i = 0; i < cameras.size(); ++i)
cameras[i].R = rmats[i]; cameras[i].R = rmats[i];
......
...@@ -63,7 +63,8 @@ int main(int argc, const char* argv[]) ...@@ -63,7 +63,8 @@ int main(int argc, const char* argv[])
{ {
std::cout << "Open GPU Writer" << std::endl; 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); d_frame.upload(frame);
......
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()
...@@ -73,7 +73,7 @@ class PlaneTracker: ...@@ -73,7 +73,7 @@ class PlaneTracker:
descs.append(desc) descs.append(desc)
descs = np.uint8(descs) descs = np.uint8(descs)
self.matcher.add([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) self.targets.append(target)
def clear(self): def clear(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment