Fixed mingw build.

pull/2/head
Andrey Kamaev 13 years ago
parent bee982b492
commit f62028dc16
  1. 14
      3rdparty/libjasper/CMakeLists.txt
  2. 7
      3rdparty/libjpeg/CMakeLists.txt
  3. 6
      3rdparty/libpng/CMakeLists.txt
  4. 7
      3rdparty/libtiff/CMakeLists.txt
  5. 2
      3rdparty/libtiff/tif_config.h.cmakein
  6. 13
      3rdparty/zlib/CMakeLists.txt
  7. 8
      3rdparty/zlib/zconf.h.cmakein
  8. 9
      CMakeLists.txt
  9. 35
      apps/haartraining/cvboost.cpp
  10. 4
      apps/haartraining/cvhaarclassifier.cpp
  11. 3
      apps/haartraining/cvhaartraining.cpp
  12. 6
      cmake/OpenCVDetectCXXCompiler.cmake
  13. 40
      cmake/OpenCVUtils.cmake
  14. 2
      modules/calib3d/src/quadsubpix.cpp
  15. 12
      modules/contrib/src/retina.cpp
  16. 2
      modules/core/src/system.cpp
  17. 2
      modules/features2d/src/features2d_init.cpp
  18. 4
      modules/features2d/test/test_features2d.cpp
  19. 2
      modules/flann/include/opencv2/flann/defines.h
  20. 4
      modules/flann/include/opencv2/flann/index_testing.h
  21. 13
      modules/highgui/CMakeLists.txt
  22. 2
      modules/highgui/src/cap_cmu.cpp
  23. 44
      modules/highgui/src/cap_dshow.cpp
  24. 2
      modules/highgui/src/cap_vfw.cpp
  25. 8
      modules/highgui/src/window_w32.cpp
  26. 2
      modules/imgproc/src/rotcalipers.cpp
  27. 3
      modules/legacy/src/extendededges.cpp
  28. 8
      modules/objdetect/src/featurepyramid.cpp
  29. 6
      modules/objdetect/src/latentsvm.cpp
  30. 34
      modules/objdetect/src/lsvmparser.cpp
  31. 20
      modules/objdetect/src/matching.cpp
  32. 2
      modules/stitching/include/opencv2/stitching/detail/motion_estimators.hpp
  33. 6
      modules/stitching/perf/perf_stich.cpp
  34. 2
      modules/stitching/src/exposure_compensate.cpp
  35. 4
      modules/stitching/src/stitcher.cpp
  36. 3
      modules/ts/include/opencv2/ts/ts.hpp
  37. 5
      modules/ts/include/opencv2/ts/ts_gtest.h
  38. 10
      samples/c/blobtrack_sample.cpp
  39. 5
      samples/cpp/brief_match_test.cpp
  40. 6
      samples/cpp/build3dmodel.cpp
  41. 4
      samples/cpp/stitching_detailed.cpp

@ -7,10 +7,8 @@ project(${JASPER_LIBRARY})
add_definitions(-DEXCLUDE_MIF_SUPPORT -DEXCLUDE_PNM_SUPPORT -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT) add_definitions(-DEXCLUDE_MIF_SUPPORT -DEXCLUDE_PNM_SUPPORT -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT)
# List of C++ files:
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# The .cpp files:
file(GLOB lib_srcs *.c) file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.h) file(GLOB lib_hdrs *.h)
file(GLOB lib_ext_hdrs jasper/*.h) file(GLOB lib_ext_hdrs jasper/*.h)
@ -22,16 +20,10 @@ file(GLOB lib_ext_hdrs jasper/*.h)
add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs}) add_library(${JASPER_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
if(MSVC) if(MSVC)
if(NOT ENABLE_NOISY_WARNINGS)
string(REPLACE "/W3" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REPLACE "/W4" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
add_definitions(-DJAS_WIN_MSVC_BUILD) add_definitions(-DJAS_WIN_MSVC_BUILD)
endif() endif()
if(CMAKE_COMPILER_IS_GNUCXX) ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-uninitialized")
endif()
if(UNIX) if(UNIX)
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
@ -39,10 +31,6 @@ if(UNIX)
endif() endif()
endif() endif()
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-function-declaration -Wno-unused")
endif()
set_target_properties(${JASPER_LIBRARY} set_target_properties(${JASPER_LIBRARY}
PROPERTIES PROPERTIES
OUTPUT_NAME ${JASPER_LIBRARY} OUTPUT_NAME ${JASPER_LIBRARY}

@ -4,11 +4,8 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
project(${JPEG_LIBRARY}) project(${JPEG_LIBRARY})
# List of C++ files:
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR}) ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# The .cpp files:
file(GLOB lib_srcs *.c) file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.h) file(GLOB lib_hdrs *.h)
@ -18,10 +15,6 @@ file(GLOB lib_hdrs *.h)
add_library(${JPEG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs}) add_library(${JPEG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
endif()
if(UNIX) if(UNIX)
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

@ -4,8 +4,6 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
project(${PNG_LIBRARY}) project(${PNG_LIBRARY})
# List of C++ files:
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR}) ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
file(GLOB lib_srcs *.c) file(GLOB lib_srcs *.c)
@ -17,10 +15,6 @@ file(GLOB lib_hdrs *.h)
add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs}) add_library(${PNG_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
endif()
if(UNIX) if(UNIX)
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

@ -26,7 +26,6 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmakein"
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIR}) ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIR})
# List of C++ files:
set(lib_srcs set(lib_srcs
tif_aux.c tif_aux.c
tif_close.c tif_close.c
@ -91,10 +90,8 @@ if(WIN32)
list(APPEND lib_srcs tif_win32.c) list(APPEND lib_srcs tif_win32.c)
endif(WIN32) endif(WIN32)
if(MSVC AND NOT ENABLE_NOISY_WARNINGS) ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef)
string(REPLACE "/W4" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
string(REPLACE "/W4" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

@ -143,7 +143,7 @@
/* Signed 64-bit type formatter */ /* Signed 64-bit type formatter */
/* Unsigned 64-bit type formatter */ /* Unsigned 64-bit type formatter */
#ifdef _MSC_VER #if defined _MSC_VER || defined __MINGW__ || defined __MINGW32__
# define TIFF_UINT64_FORMAT "%I64u" # define TIFF_UINT64_FORMAT "%I64u"
# define TIFF_SSIZE_FORMAT "%Iu" # define TIFF_SSIZE_FORMAT "%Iu"
#else #else

@ -5,19 +5,10 @@
project(${ZLIB_LIBRARY} C) project(${ZLIB_LIBRARY} C)
include(CheckTypeSize)
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckCSourceCompiles) include(CheckCSourceCompiles)
#
# Check to see if we have large file support
#
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
# #
# Check for fseeko # Check for fseeko
# #
@ -82,9 +73,7 @@ if(UNIX)
endif() endif()
endif() endif()
if(MSVC AND NOT ENABLE_NOISY_WARNINGS) ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4013")
endif()
set_target_properties(${ZLIB_LIBRARY} PROPERTIES set_target_properties(${ZLIB_LIBRARY} PROPERTIES
OUTPUT_NAME ${ZLIB_LIBRARY} OUTPUT_NAME ${ZLIB_LIBRARY}

@ -414,6 +414,14 @@ typedef uLong FAR uLongf;
# undef _LARGEFILE64_SOURCE # undef _LARGEFILE64_SOURCE
#endif #endif
#ifndef _LFS64_LARGEFILE
# define _LFS64_LARGEFILE 0
#endif
#ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS
#endif
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
# define Z_LARGE # define Z_LARGE
#endif #endif

@ -329,6 +329,15 @@ if(UNIX)
endif() endif()
endif() endif()
#
# Check to see if we have large file support (needed by zlib)
#
include(CheckTypeSize)
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
include(cmake/OpenCVPCHSupport.cmake REQUIRED) include(cmake/OpenCVPCHSupport.cmake REQUIRED)
include(cmake/OpenCVModule.cmake REQUIRED) include(cmake/OpenCVModule.cmake REQUIRED)

@ -213,13 +213,10 @@ static int icvFindStumpThreshold_##suffix(
float* curval = NULL; \ float* curval = NULL; \
float curlerror = 0.0F; \ float curlerror = 0.0F; \
float currerror = 0.0F; \ float currerror = 0.0F; \
float wposl; \
float wposr; \
\ \
int i = 0; \ int i = 0; \
int idx = 0; \ int idx = 0; \
\ \
wposl = wposr = 0.0F; \
if( *sumw == FLT_MAX ) \ if( *sumw == FLT_MAX ) \
{ \ { \
/* calculate sums */ \ /* calculate sums */ \
@ -298,8 +295,8 @@ static int icvFindStumpThreshold_##suffix(
*/ */
#define ICV_DEF_FIND_STUMP_THRESHOLD_MISC( suffix, type ) \ #define ICV_DEF_FIND_STUMP_THRESHOLD_MISC( suffix, type ) \
ICV_DEF_FIND_STUMP_THRESHOLD( misc_##suffix, type, \ ICV_DEF_FIND_STUMP_THRESHOLD( misc_##suffix, type, \
wposl = 0.5F * ( wl + wyl ); \ float wposl = 0.5F * ( wl + wyl ); \
wposr = 0.5F * ( wr + wyr ); \ float wposr = 0.5F * ( wr + wyr ); \
curleft = 0.5F * ( 1.0F + curleft ); \ curleft = 0.5F * ( 1.0F + curleft ); \
curright = 0.5F * ( 1.0F + curright ); \ curright = 0.5F * ( 1.0F + curright ); \
curlerror = MIN( wposl, wl - wposl ); \ curlerror = MIN( wposl, wl - wposl ); \
@ -311,8 +308,8 @@ static int icvFindStumpThreshold_##suffix(
*/ */
#define ICV_DEF_FIND_STUMP_THRESHOLD_GINI( suffix, type ) \ #define ICV_DEF_FIND_STUMP_THRESHOLD_GINI( suffix, type ) \
ICV_DEF_FIND_STUMP_THRESHOLD( gini_##suffix, type, \ ICV_DEF_FIND_STUMP_THRESHOLD( gini_##suffix, type, \
wposl = 0.5F * ( wl + wyl ); \ float wposl = 0.5F * ( wl + wyl ); \
wposr = 0.5F * ( wr + wyr ); \ float wposr = 0.5F * ( wr + wyr ); \
curleft = 0.5F * ( 1.0F + curleft ); \ curleft = 0.5F * ( 1.0F + curleft ); \
curright = 0.5F * ( 1.0F + curright ); \ curright = 0.5F * ( 1.0F + curright ); \
curlerror = 2.0F * wposl * ( 1.0F - curleft ); \ curlerror = 2.0F * wposl * ( 1.0F - curleft ); \
@ -326,8 +323,8 @@ static int icvFindStumpThreshold_##suffix(
*/ */
#define ICV_DEF_FIND_STUMP_THRESHOLD_ENTROPY( suffix, type ) \ #define ICV_DEF_FIND_STUMP_THRESHOLD_ENTROPY( suffix, type ) \
ICV_DEF_FIND_STUMP_THRESHOLD( entropy_##suffix, type, \ ICV_DEF_FIND_STUMP_THRESHOLD( entropy_##suffix, type, \
wposl = 0.5F * ( wl + wyl ); \ float wposl = 0.5F * ( wl + wyl ); \
wposr = 0.5F * ( wr + wyr ); \ float wposr = 0.5F * ( wr + wyr ); \
curleft = 0.5F * ( 1.0F + curleft ); \ curleft = 0.5F * ( 1.0F + curleft ); \
curright = 0.5F * ( 1.0F + curright ); \ curright = 0.5F * ( 1.0F + curright ); \
curlerror = currerror = 0.0F; \ curlerror = currerror = 0.0F; \
@ -1560,7 +1557,7 @@ CvBoostTrainer* icvBoostStartTraining( CvMat* trainClasses,
CV_MAT2VEC( *trainClasses, ydata, ystep, m ); CV_MAT2VEC( *trainClasses, ydata, ystep, m );
CV_MAT2VEC( *weakTrainVals, traindata, trainstep, trainnum ); CV_MAT2VEC( *weakTrainVals, traindata, trainstep, trainnum );
assert( m == trainnum ); CV_Assert( m == trainnum );
idxnum = 0; idxnum = 0;
idxstep = 0; idxstep = 0;
@ -1640,8 +1637,8 @@ float icvBoostNextWeakClassifierDAB( CvMat* weakEvalVals,
CV_MAT2VEC( *trainClasses, ydata, ystep, ynum ); CV_MAT2VEC( *trainClasses, ydata, ystep, ynum );
CV_MAT2VEC( *weights, wdata, wstep, wnum ); CV_MAT2VEC( *weights, wdata, wstep, wnum );
assert( m == ynum ); CV_Assert( m == ynum );
assert( m == wnum ); CV_Assert( m == wnum );
sumw = 0.0F; sumw = 0.0F;
err = 0.0F; err = 0.0F;
@ -1808,8 +1805,8 @@ CvBoostTrainer* icvBoostStartTrainingLB( CvMat* trainClasses,
CV_MAT2VEC( *weakTrainVals, traindata, trainstep, trainnum ); CV_MAT2VEC( *weakTrainVals, traindata, trainstep, trainnum );
CV_MAT2VEC( *weights, wdata, wstep, wnum ); CV_MAT2VEC( *weights, wdata, wstep, wnum );
assert( m == trainnum ); CV_Assert( m == trainnum );
assert( m == wnum ); CV_Assert( m == wnum );
idxnum = 0; idxnum = 0;
@ -1889,9 +1886,9 @@ float icvBoostNextWeakClassifierLB( CvMat* weakEvalVals,
CV_MAT2VEC( *weakTrainVals, traindata, trainstep, trainnum ); CV_MAT2VEC( *weakTrainVals, traindata, trainstep, trainnum );
CV_MAT2VEC( *weights, wdata, wstep, wnum ); CV_MAT2VEC( *weights, wdata, wstep, wnum );
assert( m == ynum ); CV_Assert( m == ynum );
assert( m == wnum ); CV_Assert( m == wnum );
assert( m == trainnum ); CV_Assert( m == trainnum );
//assert( m == trainer->count ); //assert( m == trainer->count );
for( i = 0; i < trainer->count; i++ ) for( i = 0; i < trainer->count; i++ )
@ -1944,8 +1941,8 @@ float icvBoostNextWeakClassifierGAB( CvMat* weakEvalVals,
CV_MAT2VEC( *trainClasses, ydata, ystep, ynum ); CV_MAT2VEC( *trainClasses, ydata, ystep, ynum );
CV_MAT2VEC( *weights, wdata, wstep, wnum ); CV_MAT2VEC( *weights, wdata, wstep, wnum );
assert( m == ynum ); CV_Assert( m == ynum );
assert( m == wnum ); CV_Assert( m == wnum );
sumw = 0.0F; sumw = 0.0F;
for( i = 0; i < trainer->count; i++ ) for( i = 0; i < trainer->count; i++ )

@ -525,9 +525,9 @@ float icvEvalTreeCascadeClassifierFilter( CvIntHaarClassifier* classifier, sum_t
sum_type* tilted, float normfactor ) sum_type* tilted, float normfactor )
{ {
CvTreeCascadeNode* ptr; CvTreeCascadeNode* ptr;
CvTreeCascadeClassifier* tree; //CvTreeCascadeClassifier* tree;
tree = (CvTreeCascadeClassifier*) classifier; //tree = (CvTreeCascadeClassifier*) classifier;

@ -169,10 +169,11 @@ CvIntHaarFeatures* icvCreateIntHaarFeatures( CvSize winsize,
int dx = 0; int dx = 0;
int dy = 0; int dy = 0;
#if 0
float factor = 1.0F; float factor = 1.0F;
factor = ((float) winsize.width) * winsize.height / (24 * 24); factor = ((float) winsize.width) * winsize.height / (24 * 24);
#if 0
s0 = (int) (s0 * factor); s0 = (int) (s0 * factor);
s1 = (int) (s1 * factor); s1 = (int) (s1 * factor);
s2 = (int) (s2 * factor); s2 = (int) (s2 * factor);

@ -44,6 +44,12 @@ if(MSVC AND CMAKE_C_COMPILER MATCHES "icc")
set(CV_ICC __INTEL_COMPILER_FOR_WINDOWS) set(CV_ICC __INTEL_COMPILER_FOR_WINDOWS)
endif() endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR (UNIX AND CV_ICC))
set(CV_COMPILER_IS_GNU TRUE)
else()
set(CV_COMPILER_IS_GNU FALSE)
endif()
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Detect GNU version: # Detect GNU version:
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------

@ -32,6 +32,46 @@ macro(ocv_clear_vars)
endforeach() endforeach()
endmacro() endmacro()
# turns off warnings
macro(ocv_warnings_disable)
if(NOT ENABLE_NOISY_WARNINGS)
set(_flag_vars "")
set(_msvc_warnings "")
set(_gxx_warnings "")
foreach(arg ${ARGN})
if(arg MATCHES "^CMAKE_")
list(APPEND _flag_vars ${arg})
elseif(arg MATCHES "^/wd")
list(APPEND _msvc_warnings ${arg})
elseif(arg MATCHES "^-W")
list(APPEND _gxx_warnings ${arg})
endif()
endforeach()
if(MSVC AND _msvc_warnings AND _flag_vars)
foreach(var ${_flag_vars})
foreach(warning ${_msvc_warnings})
set(${var} "${${var}} ${warning}")
endforeach()
endforeach()
elseif(CV_COMPILER_IS_GNU AND _gxx_warnings AND _flag_vars)
foreach(var ${_flag_vars})
foreach(warning ${_gxx_warnings})
if(warning MATCHES "^-Wno-")
set(${var} "${${var}} ${warning}")
else()
string(REPLACE "${warning}" "" ${var} "${${var}}")
string(REPLACE "-W" "-Wno-" warning "${warning}")
set(${var} "${${var}} ${warning}")
endif()
endforeach()
endforeach()
endif()
unset(_flag_vars)
unset(_msvc_warnings)
unset(_gxx_warnings)
endif(NOT ENABLE_NOISY_WARNINGS)
endmacro()
# Provides an option that the user can optionally select. # Provides an option that the user can optionally select.
# Can accept condition to control when option is available for user. # Can accept condition to control when option is available for user.
# Usage: # Usage:

@ -252,7 +252,7 @@ bool cv::find4QuadCornerSubpix(InputArray _img, InputOutputArray _corners, Size
int black_thresh = histQuantile(hist, 0.45f); int black_thresh = histQuantile(hist, 0.45f);
int white_thresh = histQuantile(hist, 0.55f); int white_thresh = histQuantile(hist, 0.55f);
#else #else
int black_thresh, white_thresh; int black_thresh = 0, white_thresh = 0;
segment_hist_max(hist, black_thresh, white_thresh); segment_hist_max(hist, black_thresh, white_thresh);
#endif #endif

@ -419,16 +419,17 @@ bool Retina::_convertCvMat2ValarrayBuffer(const cv::Mat inputMatToConvert, std::
if(imageNumberOfChannels==4) if(imageNumberOfChannels==4)
{ {
// create a cv::Mat table (for RGBA planes) // create a cv::Mat table (for RGBA planes)
cv::Mat planes[] = cv::Mat planes[4] =
{ {
cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[_retinaFilter->getInputNBpixels()*2]), cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[_retinaFilter->getInputNBpixels()*2]),
cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[_retinaFilter->getInputNBpixels()]), cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[_retinaFilter->getInputNBpixels()]),
cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[0]), cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[0])
cv::Mat(inputMatToConvert.size(), dsttype) // last channel (alpha) does not point on the valarray (not usefull in our case)
}; };
planes[3] = cv::Mat(inputMatToConvert.size(), dsttype); // last channel (alpha) does not point on the valarray (not usefull in our case)
// split color cv::Mat in 4 planes... it fills valarray directely // split color cv::Mat in 4 planes... it fills valarray directely
cv::split(cv::Mat_<Vec<T, 4> >(inputMatToConvert), planes); cv::split(cv::Mat_<Vec<T, 4> >(inputMatToConvert), planes);
}else if (imageNumberOfChannels==3) }
else if (imageNumberOfChannels==3)
{ {
// create a cv::Mat table (for RGB planes) // create a cv::Mat table (for RGB planes)
cv::Mat planes[] = cv::Mat planes[] =
@ -439,7 +440,8 @@ bool Retina::_convertCvMat2ValarrayBuffer(const cv::Mat inputMatToConvert, std::
}; };
// split color cv::Mat in 3 planes... it fills valarray directely // split color cv::Mat in 3 planes... it fills valarray directely
cv::split(cv::Mat_<Vec<T, 3> >(inputMatToConvert), planes); cv::split(cv::Mat_<Vec<T, 3> >(inputMatToConvert), planes);
}else if(imageNumberOfChannels==1) }
else if(imageNumberOfChannels==1)
{ {
// create a cv::Mat header for the valarray // create a cv::Mat header for the valarray
cv::Mat dst(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[0]); cv::Mat dst(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[0]);

@ -869,6 +869,8 @@ cvGetModuleInfo( const char* name, const char **version, const char **plugin_lis
} }
#if defined BUILD_SHARED_LIBS && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE #if defined BUILD_SHARED_LIBS && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID );
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID ) BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
{ {
if( fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH ) if( fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH )

@ -133,7 +133,7 @@ CV_INIT_ALGORITHM(DenseFeatureDetector, "Feature2D.Dense",
obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale)); obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale));
CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid", CV_INIT_ALGORITHM(GridAdaptedFeatureDetector, "Feature2D.Grid",
//obj.info()->addParam(obj, "detector", (Ptr<Algorithm>&)obj.detector); obj.info()->addParam(obj, "detector", (Ptr<Algorithm>&)obj.detector);
obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints); obj.info()->addParam(obj, "maxTotalKeypoints", obj.maxTotalKeypoints);
obj.info()->addParam(obj, "gridRows", obj.gridRows); obj.info()->addParam(obj, "gridRows", obj.gridRows);
obj.info()->addParam(obj, "gridCols", obj.gridCols)); obj.info()->addParam(obj, "gridCols", obj.gridCols));

@ -911,7 +911,7 @@ void CV_DescriptorMatcherTest::radiusMatchTest( const Mat& query, const Mat& tra
dmatcher->radiusMatch( query, matches, radius, masks ); dmatcher->radiusMatch( query, matches, radius, masks );
int curRes = cvtest::TS::OK; //int curRes = cvtest::TS::OK;
if( (int)matches.size() != queryDescCount ) if( (int)matches.size() != queryDescCount )
{ {
ts->printf(cvtest::TS::LOG, "Incorrect matches count while test radiusMatch() function (1).\n"); ts->printf(cvtest::TS::LOG, "Incorrect matches count while test radiusMatch() function (1).\n");
@ -951,7 +951,7 @@ void CV_DescriptorMatcherTest::radiusMatchTest( const Mat& query, const Mat& tra
} }
if( (float)badCount > (float)queryDescCount*badPart ) if( (float)badCount > (float)queryDescCount*badPart )
{ {
curRes = cvtest::TS::FAIL_INVALID_OUTPUT; //curRes = cvtest::TS::FAIL_INVALID_OUTPUT;
ts->printf( cvtest::TS::LOG, "%f - too large bad matches part while test radiusMatch() function (2).\n", ts->printf( cvtest::TS::LOG, "%f - too large bad matches part while test radiusMatch() function (2).\n",
(float)badCount/(float)queryDescCount ); (float)badCount/(float)queryDescCount );
ts->set_failed_test_info( cvtest::TS::FAIL_BAD_ACCURACY ); ts->set_failed_test_info( cvtest::TS::FAIL_BAD_ACCURACY );

@ -65,7 +65,7 @@
#undef FLANN_PLATFORM_32_BIT #undef FLANN_PLATFORM_32_BIT
#undef FLANN_PLATFORM_64_BIT #undef FLANN_PLATFORM_64_BIT
#if __amd64__ || __x86_64__ || _WIN64 || _M_X64 #if defined __amd64__ || defined __x86_64__ || defined _WIN64 || defined _M_X64
#define FLANN_PLATFORM_64_BIT #define FLANN_PLATFORM_64_BIT
#else #else
#define FLANN_PLATFORM_32_BIT #define FLANN_PLATFORM_32_BIT

@ -164,7 +164,7 @@ float test_index_precision(NNIndex<Distance>& index, const Matrix<typename Dista
int c2 = 1; int c2 = 1;
float p2; float p2;
int c1 = 1; int c1 = 1;
float p1; //float p1;
float time; float time;
DistanceType dist; DistanceType dist;
@ -178,7 +178,7 @@ float test_index_precision(NNIndex<Distance>& index, const Matrix<typename Dista
while (p2<precision) { while (p2<precision) {
c1 = c2; c1 = c2;
p1 = p2; //p1 = p2;
c2 *=2; c2 *=2;
p2 = search_with_ground_truth(index, inputData, testData, matches, nn, c2, time, dist, distance, skipMatches); p2 = search_with_ground_truth(index, inputData, testData, matches, nn, c2, time, dist, distance, skipMatches);
} }

@ -133,12 +133,8 @@ endif()
if(HAVE_OPENNI) if(HAVE_OPENNI)
list(APPEND highgui_srcs src/cap_openni.cpp) list(APPEND highgui_srcs src/cap_openni.cpp)
ocv_include_directories(${OPENNI_INCLUDE_DIR}) include_directories(AFTER SYSTEM ${OPENNI_INCLUDE_DIR})
list(APPEND HIGHGUI_LIBRARIES ${OPENNI_LIBRARY}) list(APPEND HIGHGUI_LIBRARIES ${OPENNI_LIBRARY})
if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(src/cap_openni.cpp PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-uninitialized -Wno-reorder -Wno-strict-aliasing")
endif()
endif(HAVE_OPENNI) endif(HAVE_OPENNI)
if(HAVE_opencv_androidcamera) if(HAVE_opencv_androidcamera)
@ -194,7 +190,7 @@ endif()
if(WIN32) if(WIN32)
link_directories("${OpenCV_SOURCE_DIR}/3rdparty/lib") # for ffmpeg wrapper only link_directories("${OpenCV_SOURCE_DIR}/3rdparty/lib") # for ffmpeg wrapper only
include_directories(AFTER "${OpenCV_SOURCE_DIR}/3rdparty/include") # for directshow in VS2005 and multi-monitor support on MinGW include_directories(AFTER SYSTEM "${OpenCV_SOURCE_DIR}/3rdparty/include") # for directshow in VS2005 and multi-monitor support on MinGW
endif() endif()
if(UNIX) if(UNIX)
@ -228,10 +224,7 @@ endif()
set_target_properties(${the_module} PROPERTIES LINK_INTERFACE_LIBRARIES "") set_target_properties(${the_module} PROPERTIES LINK_INTERFACE_LIBRARIES "")
ocv_add_precompiled_headers(${the_module}) ocv_add_precompiled_headers(${the_module})
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-deprecated-declarations)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
endif()
if(WIN32 AND WITH_FFMPEG) if(WIN32 AND WITH_FFMPEG)
#copy ffmpeg dll to the output folder #copy ffmpeg dll to the output folder

@ -45,7 +45,7 @@
/****************** Capturing video from camera via CMU lib *******************/ /****************** Capturing video from camera via CMU lib *******************/
#if HAVE_CMU1394 #ifdef HAVE_CMU1394
// This firewire capability added by Philip Gruebele (pgruebele@cox.net). // This firewire capability added by Philip Gruebele (pgruebele@cox.net).
// For this to work you need to install the CMU firewire DCAM drivers, // For this to work you need to install the CMU firewire DCAM drivers,

@ -89,7 +89,7 @@ Thanks to:
#include "precomp.hpp" #include "precomp.hpp"
#if _MSC_VER >= 100 #if defined _MSC_VER && _MSC_VER >= 100
#pragma warning(disable: 4995) #pragma warning(disable: 4995)
#endif #endif
@ -103,7 +103,7 @@ Thanks to:
#include <vector> #include <vector>
//Include Directshow stuff here so we don't worry about needing all the h files. //Include Directshow stuff here so we don't worry about needing all the h files.
#if _MSC_VER >= 1500 #if defined _MSC_VER && _MSC_VER >= 1500
# include "DShow.h" # include "DShow.h"
# include "strmif.h" # include "strmif.h"
# include "Aviriff.h" # include "Aviriff.h"
@ -114,6 +114,7 @@ Thanks to:
# define __extension__ # define __extension__
typedef BOOL WINBOOL; typedef BOOL WINBOOL;
#endif #endif
#include "dshow/dshow.h" #include "dshow/dshow.h"
#include "dshow/dvdmedia.h" #include "dshow/dvdmedia.h"
#include "dshow/bdatypes.h" #include "dshow/bdatypes.h"
@ -133,6 +134,8 @@ public:
virtual HRESULT STDMETHODCALLTYPE Clone( virtual HRESULT STDMETHODCALLTYPE Clone(
/* [out] */ IEnumPIDMap **ppIEnumPIDMap) = 0; /* [out] */ IEnumPIDMap **ppIEnumPIDMap) = 0;
virtual ~IEnumPIDMap() {}
}; };
interface IMPEG2PIDMap : public IUnknown interface IMPEG2PIDMap : public IUnknown
@ -148,6 +151,8 @@ interface IMPEG2PIDMap : public IUnknown
virtual HRESULT STDMETHODCALLTYPE EnumPIDMap( virtual HRESULT STDMETHODCALLTYPE EnumPIDMap(
/* [out] */ IEnumPIDMap **pIEnumPIDMap) = 0; /* [out] */ IEnumPIDMap **pIEnumPIDMap) = 0;
virtual ~IMPEG2PIDMap() {}
}; };
#endif #endif
@ -234,6 +239,7 @@ interface ISampleGrabberCB : public IUnknown
BYTE *pBuffer, BYTE *pBuffer,
LONG BufferLen) = 0; LONG BufferLen) = 0;
virtual ~ISampleGrabberCB() {}
}; };
interface ISampleGrabber : public IUnknown interface ISampleGrabber : public IUnknown
@ -261,6 +267,7 @@ interface ISampleGrabber : public IUnknown
ISampleGrabberCB *pCallback, ISampleGrabberCB *pCallback,
LONG WhichMethodToCallback) = 0; LONG WhichMethodToCallback) = 0;
virtual ~ISampleGrabber() {}
}; };
#ifndef HEADER #ifndef HEADER
@ -519,12 +526,12 @@ class videoInput{
//Manual control over settings thanks..... //Manual control over settings thanks.....
//These are experimental for now. //These are experimental for now.
bool setVideoSettingFilter(int deviceID, long Property, long lValue, long Flags = NULL, bool useDefaultValue = false); bool setVideoSettingFilter(int deviceID, long Property, long lValue, long Flags = 0, bool useDefaultValue = false);
bool setVideoSettingFilterPct(int deviceID, long Property, float pctValue, long Flags = NULL); bool setVideoSettingFilterPct(int deviceID, long Property, float pctValue, long Flags = 0);
bool getVideoSettingFilter(int deviceID, long Property, long &min, long &max, long &SteppingDelta, long &currentValue, long &flags, long &defaultValue); bool getVideoSettingFilter(int deviceID, long Property, long &min, long &max, long &SteppingDelta, long &currentValue, long &flags, long &defaultValue);
bool setVideoSettingCamera(int deviceID, long Property, long lValue, long Flags = NULL, bool useDefaultValue = false); bool setVideoSettingCamera(int deviceID, long Property, long lValue, long Flags = 0, bool useDefaultValue = false);
bool setVideoSettingCameraPct(int deviceID, long Property, float pctValue, long Flags = NULL); bool setVideoSettingCameraPct(int deviceID, long Property, float pctValue, long Flags = 0);
bool getVideoSettingCamera(int deviceID, long Property, long &min, long &max, long &SteppingDelta, long &currentValue, long &flags, long &defaultValue); bool getVideoSettingCamera(int deviceID, long Property, long &min, long &max, long &SteppingDelta, long &currentValue, long &flags, long &defaultValue);
//bool setVideoSettingCam(int deviceID, long Property, long lValue, long Flags = NULL, bool useDefaultValue = false); //bool setVideoSettingCam(int deviceID, long Property, long lValue, long Flags = NULL, bool useDefaultValue = false);
@ -597,7 +604,7 @@ class videoInput{
/////////////////////////// HANDY FUNCTIONS ///////////////////////////// /////////////////////////// HANDY FUNCTIONS /////////////////////////////
void MyFreeMediaType(AM_MEDIA_TYPE& mt){ static void MyFreeMediaType(AM_MEDIA_TYPE& mt){
if (mt.cbFormat != 0) if (mt.cbFormat != 0)
{ {
CoTaskMemFree((PVOID)mt.pbFormat); CoTaskMemFree((PVOID)mt.pbFormat);
@ -612,7 +619,7 @@ void MyFreeMediaType(AM_MEDIA_TYPE& mt){
} }
} }
void MyDeleteMediaType(AM_MEDIA_TYPE *pmt) static void MyDeleteMediaType(AM_MEDIA_TYPE *pmt)
{ {
if (pmt != NULL) if (pmt != NULL)
{ {
@ -642,7 +649,7 @@ public:
//------------------------------------------------ //------------------------------------------------
~SampleGrabberCallback(){ virtual ~SampleGrabberCallback(){
ptrBuffer = NULL; ptrBuffer = NULL;
DeleteCriticalSection(&critSection); DeleteCriticalSection(&critSection);
CloseHandle(hEvent); CloseHandle(hEvent);
@ -849,7 +856,7 @@ void videoDevice::NukeDownstream(IBaseFilter *pBF){
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
void videoDevice::destroyGraph(){ void videoDevice::destroyGraph(){
HRESULT hr = NULL; HRESULT hr = 0;
//int FuncRetval=0; //int FuncRetval=0;
//int NumFilters=0; //int NumFilters=0;
@ -867,7 +874,7 @@ void videoDevice::destroyGraph(){
IBaseFilter * pFilter = NULL; IBaseFilter * pFilter = NULL;
if (pEnum->Next(1, &pFilter, &cFetched) == S_OK) if (pEnum->Next(1, &pFilter, &cFetched) == S_OK)
{ {
FILTER_INFO FilterInfo={0}; FILTER_INFO FilterInfo;
memset(&FilterInfo, 0, sizeof(FilterInfo)); memset(&FilterInfo, 0, sizeof(FilterInfo));
hr = pFilter->QueryFilterInfo(&FilterInfo); hr = pFilter->QueryFilterInfo(&FilterInfo);
FilterInfo.pGraph->Release(); FilterInfo.pGraph->Release();
@ -1620,14 +1627,15 @@ void __cdecl videoInput::basicThread(void * objPtr){
void videoInput::showSettingsWindow(int id){ void videoInput::showSettingsWindow(int id){
if(isDeviceSetup(id)){ if(isDeviceSetup(id)){
HANDLE myTempThread; //HANDLE myTempThread;
//we reconnect to the device as we have freed our reference to it //we reconnect to the device as we have freed our reference to it
//why have we freed our reference? because there seemed to be an issue //why have we freed our reference? because there seemed to be an issue
//with some mpeg devices if we didn't //with some mpeg devices if we didn't
HRESULT hr = getDevice(&VDList[id]->pVideoInputFilter, id, VDList[id]->wDeviceName, VDList[id]->nDeviceName); HRESULT hr = getDevice(&VDList[id]->pVideoInputFilter, id, VDList[id]->wDeviceName, VDList[id]->nDeviceName);
if(hr == S_OK){ if(hr == S_OK){
myTempThread = (HANDLE)_beginthread(basicThread, 0, (void *)&VDList[id]); //myTempThread = (HANDLE)
_beginthread(basicThread, 0, (void *)&VDList[id]);
} }
} }
} }
@ -1705,7 +1713,7 @@ bool videoInput::setVideoSettingFilterPct(int deviceID, long Property, float pct
float halfStep = (float)stepAmnt * 0.5f; float halfStep = (float)stepAmnt * 0.5f;
if( mod < halfStep ) rasterValue -= mod; if( mod < halfStep ) rasterValue -= mod;
else rasterValue += stepAmnt - mod; else rasterValue += stepAmnt - mod;
printf("RASTER - pctValue is %f - value is %i - step is %i - mod is %i - rasterValue is %i\n", pctValue, value, stepAmnt, mod, rasterValue); printf("RASTER - pctValue is %f - value is %li - step is %li - mod is %li - rasterValue is %li\n", pctValue, value, stepAmnt, mod, rasterValue);
} }
return setVideoSettingFilter(deviceID, Property, rasterValue, Flags, false); return setVideoSettingFilter(deviceID, Property, rasterValue, Flags, false);
@ -1795,7 +1803,7 @@ bool videoInput::setVideoSettingCameraPct(int deviceID, long Property, float pct
float halfStep = (float)stepAmnt * 0.5f; float halfStep = (float)stepAmnt * 0.5f;
if( mod < halfStep ) rasterValue -= mod; if( mod < halfStep ) rasterValue -= mod;
else rasterValue += stepAmnt - mod; else rasterValue += stepAmnt - mod;
printf("RASTER - pctValue is %f - value is %i - step is %i - mod is %i - rasterValue is %i\n", pctValue, value, stepAmnt, mod, rasterValue); printf("RASTER - pctValue is %f - value is %li - step is %li - mod is %li - rasterValue is %li\n", pctValue, value, stepAmnt, mod, rasterValue);
} }
return setVideoSettingCamera(deviceID, Property, rasterValue, Flags, false); return setVideoSettingCamera(deviceID, Property, rasterValue, Flags, false);
@ -1920,7 +1928,7 @@ bool videoInput::restartDevice(int id){
stopDevice(id); stopDevice(id);
//set our fps if needed //set our fps if needed
if( avgFrameTime != -1){ if( avgFrameTime != (unsigned long)-1){
VDList[id]->requestedFrameTime = avgFrameTime; VDList[id]->requestedFrameTime = avgFrameTime;
} }
@ -2300,7 +2308,7 @@ static void findClosestSizeAndSubtype(videoDevice * VD, int widthIn, int heightI
//find perfect match or closest size //find perfect match or closest size
int nearW = 9999999; int nearW = 9999999;
int nearH = 9999999; int nearH = 9999999;
bool foundClosestMatch = true; //bool foundClosestMatch = true;
int iCount = 0; int iCount = 0;
int iSize = 0; int iSize = 0;
@ -2360,7 +2368,7 @@ static void findClosestSizeAndSubtype(videoDevice * VD, int widthIn, int heightI
//see if we have an exact match! //see if we have an exact match!
if(exactMatchX && exactMatchY){ if(exactMatchX && exactMatchY){
foundClosestMatch = false; //foundClosestMatch = false;
exactMatch = true; exactMatch = true;
widthOut = widthIn; widthOut = widthIn;

@ -43,7 +43,7 @@
#include <vfw.h> #include <vfw.h>
#if _MSC_VER >= 1200 #if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( disable: 4711 ) #pragma warning( disable: 4711 )
#endif #endif

@ -43,7 +43,7 @@
#if defined WIN32 || defined _WIN32 #if defined WIN32 || defined _WIN32
#if _MSC_VER >= 1200 #if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( disable: 4710 ) #pragma warning( disable: 4710 )
#endif #endif
@ -61,6 +61,10 @@
#ifndef __inout #ifndef __inout
# define __inout # define __inout
#endif #endif
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
#include <MultiMon.h> #include <MultiMon.h>
#include <commctrl.h> #include <commctrl.h>
@ -1467,6 +1471,7 @@ cvShowImage( const char* name, const CvArr* arr )
__END__; __END__;
} }
#if 0
CV_IMPL void CV_IMPL void
cvShowImageHWND(HWND w_hWnd, const CvArr* arr) cvShowImageHWND(HWND w_hWnd, const CvArr* arr)
{ {
@ -1544,6 +1549,7 @@ cvShowImageHWND(HWND w_hWnd, const CvArr* arr)
__END__; __END__;
} }
#endif
CV_IMPL void cvResizeWindow(const char* name, int width, int height ) CV_IMPL void cvResizeWindow(const char* name, int width, int height )
{ {

@ -94,7 +94,7 @@ icvRotatingCalipers( CvPoint2D32f* points, int n, int mode, float* out )
{ {
float minarea = FLT_MAX; float minarea = FLT_MAX;
float max_dist = 0; float max_dist = 0;
char buffer[32]; char buffer[32] = {};
int i, k; int i, k;
CvPoint2D32f* vect = (CvPoint2D32f*)cvAlloc( n * sizeof(vect[0]) ); CvPoint2D32f* vect = (CvPoint2D32f*)cvAlloc( n * sizeof(vect[0]) );
float* inv_vect_length = (float*)cvAlloc( n * sizeof(inv_vect_length[0]) ); float* inv_vect_length = (float*)cvAlloc( n * sizeof(inv_vect_length[0]) );

@ -41,7 +41,8 @@
#include "precomp.hpp" #include "precomp.hpp"
#ifdef WIN32 /* make sure it builds under Linux whenever it is included into Makefile.am or not. */ #if 0
//#ifdef WIN32 /* make sure it builds under Linux whenever it is included into Makefile.am or not. */
//void icvCutContour( CvSeq* current, IplImage* image ); //void icvCutContour( CvSeq* current, IplImage* image );
CvSeq* icvCutContourRaster( CvSeq* current, CvMemStorage* storage, IplImage* image ); CvSeq* icvCutContourRaster( CvSeq* current, CvMemStorage* storage, IplImage* image );

@ -446,15 +446,15 @@ static int getPathOfFeaturePyramid(IplImage * image,
CvLSVMFeatureMap *map; CvLSVMFeatureMap *map;
IplImage *scaleTmp; IplImage *scaleTmp;
float scale; float scale;
int i, err; int i;
for(i = 0; i < numStep; i++) for(i = 0; i < numStep; i++)
{ {
scale = 1.0f / powf(step, (float)i); scale = 1.0f / powf(step, (float)i);
scaleTmp = resize_opencv (image, scale); scaleTmp = resize_opencv (image, scale);
err = getFeatureMaps(scaleTmp, sideLength, &map); getFeatureMaps(scaleTmp, sideLength, &map);
err = normalizeAndTruncate(map, VAL_OF_TRUNCATE); normalizeAndTruncate(map, VAL_OF_TRUNCATE);
err = PCAFeatureMaps(map); PCAFeatureMaps(map);
(*maps)->pyramid[startIndex + i] = map; (*maps)->pyramid[startIndex + i] = map;
cvReleaseImage(&scaleTmp); cvReleaseImage(&scaleTmp);
}/*for(i = 0; i < numStep; i++)*/ }/*for(i = 0; i < numStep; i++)*/

@ -560,7 +560,7 @@ int searchObjectThresholdSomeComponents(const CvLSVMFeaturePyramid *H,
float **score, int *kPoints, float **score, int *kPoints,
int numThreads) int numThreads)
{ {
int error = 0; //int error = 0;
int i, j, s, f, componentIndex; int i, j, s, f, componentIndex;
unsigned int maxXBorder, maxYBorder; unsigned int maxXBorder, maxYBorder;
CvPoint **pointsArr, **oppPointsArr, ***partsDisplacementArr; CvPoint **pointsArr, **oppPointsArr, ***partsDisplacementArr;
@ -576,14 +576,14 @@ int searchObjectThresholdSomeComponents(const CvLSVMFeaturePyramid *H,
partsDisplacementArr = (CvPoint ***)malloc(sizeof(CvPoint **) * kComponents); partsDisplacementArr = (CvPoint ***)malloc(sizeof(CvPoint **) * kComponents);
// Getting maximum filter dimensions // Getting maximum filter dimensions
error = getMaxFilterDims(filters, kComponents, kPartFilters, &maxXBorder, &maxYBorder); /*error = */getMaxFilterDims(filters, kComponents, kPartFilters, &maxXBorder, &maxYBorder);
componentIndex = 0; componentIndex = 0;
*kPoints = 0; *kPoints = 0;
// For each component perform searching // For each component perform searching
for (i = 0; i < kComponents; i++) for (i = 0; i < kComponents; i++)
{ {
#ifdef HAVE_TBB #ifdef HAVE_TBB
error = searchObjectThreshold(H, &(filters[componentIndex]), kPartFilters[i], /*error = */searchObjectThreshold(H, &(filters[componentIndex]), kPartFilters[i],
b[i], maxXBorder, maxYBorder, scoreThreshold, b[i], maxXBorder, maxYBorder, scoreThreshold,
&(pointsArr[i]), &(levelsArr[i]), &(kPointsArr[i]), &(pointsArr[i]), &(levelsArr[i]), &(kPointsArr[i]),
&(scoreArr[i]), &(partsDisplacementArr[i]), numThreads); &(scoreArr[i]), &(partsDisplacementArr[i]), numThreads);

@ -534,12 +534,12 @@ void parserPFilterS (FILE * xmlf, int p, CvLSVMFilterObject *** model, int *last
int tag; int tag;
int tagVal; int tagVal;
char ch; char ch;
int i,j; int /*i,*/j;
char buf[1024]; //char buf[1024];
char tagBuf[1024]; char tagBuf[1024];
//printf("<PartFilters>\n"); //printf("<PartFilters>\n");
i = 0; //i = 0;
j = 0; j = 0;
st = 0; st = 0;
tag = 0; tag = 0;
@ -566,10 +566,10 @@ void parserPFilterS (FILE * xmlf, int p, CvLSVMFilterObject *** model, int *last
N_path++; N_path++;
} }
tag = 0; tag = 0;
i = 0; //i = 0;
}else{ }else{
if((tag == 0)&& (st == 1)){ if((tag == 0)&& (st == 1)){
buf[i] = ch; i++; //buf[i] = ch; i++;
}else{ }else{
tagBuf[j] = ch; j++; tagBuf[j] = ch; j++;
} }
@ -582,12 +582,12 @@ void parserComp (FILE * xmlf, int p, int *N_comp, CvLSVMFilterObject *** model,
int tag; int tag;
int tagVal; int tagVal;
char ch; char ch;
int i,j; int /*i,*/j;
char buf[1024]; //char buf[1024];
char tagBuf[1024]; char tagBuf[1024];
//printf("<Component> %d\n", *N_comp); //printf("<Component> %d\n", *N_comp);
i = 0; //i = 0;
j = 0; j = 0;
st = 0; st = 0;
tag = 0; tag = 0;
@ -616,10 +616,10 @@ void parserComp (FILE * xmlf, int p, int *N_comp, CvLSVMFilterObject *** model,
parserPFilterS (xmlf, p, model, last, max); parserPFilterS (xmlf, p, model, last, max);
} }
tag = 0; tag = 0;
i = 0; //i = 0;
}else{ }else{
if((tag == 0)&& (st == 1)){ if((tag == 0)&& (st == 1)){
buf[i] = ch; i++; //buf[i] = ch; i++;
}else{ }else{
tagBuf[j] = ch; j++; tagBuf[j] = ch; j++;
} }
@ -726,12 +726,12 @@ void parserModel(FILE * xmlf, CvLSVMFilterObject *** model, int *last, int *max,
}//namespace }//namespace
int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, int *max, int **comp, float **b, int *count, float * score){ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, int *max, int **comp, float **b, int *count, float * score){
int st = 0; //int st = 0;
int tag; int tag;
char ch; char ch;
int i,j; int /*i,*/j;
FILE *xmlf; FILE *xmlf;
char buf[1024]; //char buf[1024];
char tagBuf[1024]; char tagBuf[1024];
(*max) = 10; (*max) = 10;
@ -744,9 +744,9 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
if(xmlf == NULL) if(xmlf == NULL)
return LSVM_PARSER_FILE_NOT_FOUND; return LSVM_PARSER_FILE_NOT_FOUND;
i = 0; //i = 0;
j = 0; j = 0;
st = 0; //st = 0;
tag = 0; tag = 0;
while(!feof(xmlf)){ while(!feof(xmlf)){
ch = (char)fgetc( xmlf ); ch = (char)fgetc( xmlf );
@ -757,7 +757,7 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
}else { }else {
if(ch == '>'){ if(ch == '>'){
tag = 0; tag = 0;
i = 0; //i = 0;
tagBuf[j ] = ch; tagBuf[j ] = ch;
tagBuf[j + 1] = '\0'; tagBuf[j + 1] = '\0';
if(getTeg(tagBuf) == MODEL){ if(getTeg(tagBuf) == MODEL){
@ -765,7 +765,7 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
} }
}else{ }else{
if(tag == 0){ if(tag == 0){
buf[i] = ch; i++; //buf[i] = ch; i++;
}else{ }else{
tagBuf[j] = ch; j++; tagBuf[j] = ch; j++;
} }

@ -23,7 +23,7 @@
*/ */
int convolution(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap *map, float *f) int convolution(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap *map, float *f)
{ {
int n1, m1, n2, m2, p, size, diff1, diff2; int n1, m1, n2, m2, p, /*size,*/ diff1, diff2;
int i1, i2, j1, j2, k; int i1, i2, j1, j2, k;
float tmp_f1, tmp_f2, tmp_f3, tmp_f4; float tmp_f1, tmp_f2, tmp_f3, tmp_f4;
float *pMap = NULL; float *pMap = NULL;
@ -37,7 +37,7 @@ int convolution(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap *map, float
diff1 = n1 - n2 + 1; diff1 = n1 - n2 + 1;
diff2 = m1 - m2 + 1; diff2 = m1 - m2 + 1;
size = diff1 * diff2; //size = diff1 * diff2;
for (j1 = diff2 - 1; j1 >= 0; j1--) for (j1 = diff2 - 1; j1 >= 0; j1--)
{ {
@ -333,7 +333,7 @@ int filterDispositionLevel(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap
float **scoreFi, float **scoreFi,
int **pointsX, int **pointsY) int **pointsX, int **pointsY)
{ {
int n1, m1, n2, m2, p, size, diff1, diff2; int n1, m1, n2, m2, /*p,*/ size, diff1, diff2;
float *f; float *f;
int i1, j1; int i1, j1;
int res; int res;
@ -342,7 +342,7 @@ int filterDispositionLevel(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap
m1 = pyramid->sizeX; m1 = pyramid->sizeX;
n2 = Fi->sizeY; n2 = Fi->sizeY;
m2 = Fi->sizeX; m2 = Fi->sizeX;
p = pyramid->numFeatures; //p = pyramid->numFeatures;
(*scoreFi) = NULL; (*scoreFi) = NULL;
(*pointsX) = NULL; (*pointsX) = NULL;
(*pointsY) = NULL; (*pointsY) = NULL;
@ -418,7 +418,7 @@ int filterDispositionLevelFFT(const CvLSVMFilterObject *Fi, const CvLSVMFftImage
float **scoreFi, float **scoreFi,
int **pointsX, int **pointsY) int **pointsX, int **pointsY)
{ {
int n1, m1, n2, m2, p, size, diff1, diff2; int n1, m1, n2, m2, /*p,*/ size, diff1, diff2;
float *f; float *f;
int i1, j1; int i1, j1;
int res; int res;
@ -428,7 +428,7 @@ int filterDispositionLevelFFT(const CvLSVMFilterObject *Fi, const CvLSVMFftImage
m1 = featMapImage->dimX; m1 = featMapImage->dimX;
n2 = Fi->sizeY; n2 = Fi->sizeY;
m2 = Fi->sizeX; m2 = Fi->sizeX;
p = featMapImage->numFeatures; //p = featMapImage->numFeatures;
(*scoreFi) = NULL; (*scoreFi) = NULL;
(*pointsX) = NULL; (*pointsX) = NULL;
(*pointsY) = NULL; (*pointsY) = NULL;
@ -611,7 +611,7 @@ int maxFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
float *score, CvPoint **points, float *score, CvPoint **points,
int *kPoints, CvPoint ***partsDisplacement) int *kPoints, CvPoint ***partsDisplacement)
{ {
int i, j, k, dimX, dimY, nF0, mF0, p; int i, j, k, dimX, dimY, nF0, mF0/*, p*/;
int diff1, diff2, index, last, partsLevel; int diff1, diff2, index, last, partsLevel;
CvLSVMFilterDisposition **disposition; CvLSVMFilterDisposition **disposition;
float *f; float *f;
@ -639,7 +639,7 @@ int maxFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
dimY = H->pyramid[level]->sizeY; dimY = H->pyramid[level]->sizeY;
// Number of features // Number of features
p = H->pyramid[level]->numFeatures; //p = H->pyramid[level]->numFeatures;
// Getting dimension of root filter // Getting dimension of root filter
nF0 = all_F[0]->sizeY; nF0 = all_F[0]->sizeY;
@ -860,7 +860,7 @@ int thresholdFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
float **score, CvPoint **points, int *kPoints, float **score, CvPoint **points, int *kPoints,
CvPoint ***partsDisplacement) CvPoint ***partsDisplacement)
{ {
int i, j, k, dimX, dimY, nF0, mF0, p; int i, j, k, dimX, dimY, nF0, mF0/*, p*/;
int diff1, diff2, index, last, partsLevel; int diff1, diff2, index, last, partsLevel;
CvLSVMFilterDisposition **disposition; CvLSVMFilterDisposition **disposition;
float *f; float *f;
@ -887,7 +887,7 @@ int thresholdFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
dimY = H->pyramid[level]->sizeY; dimY = H->pyramid[level]->sizeY;
// Number of features // Number of features
p = H->pyramid[level]->numFeatures; //p = H->pyramid[level]->numFeatures;
// Getting dimension of root filter // Getting dimension of root filter
nF0 = all_F[0]->sizeY; nF0 = all_F[0]->sizeY;

@ -177,7 +177,7 @@ private:
}; };
enum CV_EXPORTS WaveCorrectKind enum WaveCorrectKind
{ {
WAVE_CORRECT_HORIZ, WAVE_CORRECT_HORIZ,
WAVE_CORRECT_VERT WAVE_CORRECT_VERT

@ -33,7 +33,6 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
imgs.push_back( imread( getDataPath("stitching/a2.jpg") ) ); imgs.push_back( imread( getDataPath("stitching/a2.jpg") ) );
imgs.push_back( imread( getDataPath("stitching/a3.jpg") ) ); imgs.push_back( imread( getDataPath("stitching/a3.jpg") ) );
Stitcher::Status status;
Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb" Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb"
? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder() ? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder()
: (detail::FeaturesFinder*)new detail::SurfFeaturesFinder(); : (detail::FeaturesFinder*)new detail::SurfFeaturesFinder();
@ -53,7 +52,7 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
stitcher.setRegistrationResol(WORK_MEGAPIX); stitcher.setRegistrationResol(WORK_MEGAPIX);
startTimer(); startTimer();
status = stitcher.stitch(imgs, pano); stitcher.stitch(imgs, pano);
stopTimer(); stopTimer();
} }
} }
@ -66,7 +65,6 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
imgs.push_back( imread( getDataPath("stitching/b1.jpg") ) ); imgs.push_back( imread( getDataPath("stitching/b1.jpg") ) );
imgs.push_back( imread( getDataPath("stitching/b2.jpg") ) ); imgs.push_back( imread( getDataPath("stitching/b2.jpg") ) );
Stitcher::Status status;
Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb" Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb"
? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder() ? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder()
: (detail::FeaturesFinder*)new detail::SurfFeaturesFinder(); : (detail::FeaturesFinder*)new detail::SurfFeaturesFinder();
@ -86,7 +84,7 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
stitcher.setRegistrationResol(WORK_MEGAPIX); stitcher.setRegistrationResol(WORK_MEGAPIX);
startTimer(); startTimer();
status = stitcher.stitch(imgs, pano); stitcher.stitch(imgs, pano);
stopTimer(); stopTimer();
} }
} }

@ -82,7 +82,7 @@ void GainCompensator::feed(const vector<Point> &corners, const vector<Mat> &imag
Mat_<int> N(num_images, num_images); N.setTo(0); Mat_<int> N(num_images, num_images); N.setTo(0);
Mat_<double> I(num_images, num_images); I.setTo(0); Mat_<double> I(num_images, num_images); I.setTo(0);
Rect dst_roi = resultRoi(corners, images); //Rect dst_roi = resultRoi(corners, images);
Mat subimg1, subimg2; Mat subimg1, subimg2;
Mat_<uchar> submask1, submask2, intersect; Mat_<uchar> submask1, submask2, intersect;

@ -206,7 +206,7 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
Mat img_warped, img_warped_s; Mat img_warped, img_warped_s;
Mat dilated_mask, seam_mask, mask, mask_warped; Mat dilated_mask, seam_mask, mask, mask_warped;
double compose_seam_aspect = 1; //double compose_seam_aspect = 1;
double compose_work_aspect = 1; double compose_work_aspect = 1;
bool is_blender_prepared = false; bool is_blender_prepared = false;
@ -227,7 +227,7 @@ Stitcher::Status Stitcher::composePanorama(InputArray images, OutputArray pano)
is_compose_scale_set = true; is_compose_scale_set = true;
// Compute relative scales // Compute relative scales
compose_seam_aspect = compose_scale / seam_scale_; //compose_seam_aspect = compose_scale / seam_scale_;
compose_work_aspect = compose_scale / work_scale_; compose_work_aspect = compose_scale / work_scale_;
// Update warped image scale // Update warped image scale

@ -38,6 +38,9 @@
#ifndef GTEST_USES_SIMPLE_RE #ifndef GTEST_USES_SIMPLE_RE
# define GTEST_USES_SIMPLE_RE 0 # define GTEST_USES_SIMPLE_RE 0
#endif #endif
#ifndef GTEST_USES_POSIX_RE
# define GTEST_USES_POSIX_RE 0
#endif
#ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-declarations" # pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif #endif

@ -413,18 +413,21 @@
# include <regex.h> // NOLINT # include <regex.h> // NOLINT
# define GTEST_USES_POSIX_RE 1 # define GTEST_USES_POSIX_RE 1
# define GTEST_USES_SIMPLE_RE 0
#elif GTEST_OS_WINDOWS #elif GTEST_OS_WINDOWS
// <regex.h> is not available on Windows. Use our own simple regex // <regex.h> is not available on Windows. Use our own simple regex
// implementation instead. // implementation instead.
# define GTEST_USES_SIMPLE_RE 1 # define GTEST_USES_SIMPLE_RE 1
# define GTEST_USES_POSIX_RE 0
#else #else
// <regex.h> may not be available on this platform. Use our own // <regex.h> may not be available on this platform. Use our own
// simple regex implementation instead. // simple regex implementation instead.
# define GTEST_USES_SIMPLE_RE 1 # define GTEST_USES_SIMPLE_RE 1
# define GTEST_USES_POSIX_RE 0
#endif // GTEST_HAS_POSIX_RE #endif // GTEST_HAS_POSIX_RE
@ -1678,6 +1681,8 @@ inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
// Determines whether test results can be streamed to a socket. // Determines whether test results can be streamed to a socket.
#if GTEST_OS_LINUX #if GTEST_OS_LINUX
# define GTEST_CAN_STREAM_RESULTS_ 1 # define GTEST_CAN_STREAM_RESULTS_ 1
#else
# define GTEST_CAN_STREAM_RESULTS_ 0
#endif #endif
// Defines some utility macros. // Defines some utility macros.

@ -371,7 +371,7 @@ int main(int argc, char* argv[])
CvBlobTrackerAutoParam1 param = {0}; CvBlobTrackerAutoParam1 param = {0};
CvBlobTrackerAuto* pTracker = NULL; CvBlobTrackerAuto* pTracker = NULL;
float scale = 1; //float scale = 1;
const char* scale_name = NULL; const char* scale_name = NULL;
char* yml_name = NULL; char* yml_name = NULL;
char** yml_video_names = NULL; char** yml_video_names = NULL;
@ -387,7 +387,7 @@ int main(int argc, char* argv[])
const char* bta_name = NULL; const char* bta_name = NULL;
char* bta_data_name = NULL; char* bta_data_name = NULL;
char* track_name = NULL; char* track_name = NULL;
char* comment_name = NULL; //char* comment_name = NULL;
char* FGTrainFrames = NULL; char* FGTrainFrames = NULL;
char* log_name = NULL; char* log_name = NULL;
char* savestate_name = NULL; char* savestate_name = NULL;
@ -462,7 +462,7 @@ int main(int argc, char* argv[])
RO("bta_data=",bta_data_name); RO("bta_data=",bta_data_name);
RO("btgen=",btgen_name); RO("btgen=",btgen_name);
RO("track=",track_name); RO("track=",track_name);
RO("comment=",comment_name); //RO("comment=",comment_name);
RO("FGTrainFrames=",FGTrainFrames); RO("FGTrainFrames=",FGTrainFrames);
RO("log=",log_name); RO("log=",log_name);
RO("savestate=",savestate_name); RO("savestate=",savestate_name);
@ -512,8 +512,8 @@ int main(int argc, char* argv[])
if(!scale_name) scale_name = "1"; if(!scale_name) scale_name = "1";
} }
if(scale_name) // if(scale_name)
scale = (float)atof(scale_name); // scale = (float)atof(scale_name);
for(pFGModule=FGDetector_Modules; pFGModule->nickname; ++pFGModule) for(pFGModule=FGDetector_Modules; pFGModule->nickname; ++pFGModule)
if( fg_name && MY_STRICMP(fg_name,pFGModule->nickname)==0 ) break; if( fg_name && MY_STRICMP(fg_name,pFGModule->nickname)==0 ) break;

@ -112,12 +112,11 @@ int main(int argc, const char ** argv)
vector<Point2f> mpts_1, mpts_2; vector<Point2f> mpts_1, mpts_2;
matches2points(matches_popcount, kpts_1, kpts_2, mpts_1, mpts_2); //Extract a list of the (x,y) location of the matches matches2points(matches_popcount, kpts_1, kpts_2, mpts_1, mpts_2); //Extract a list of the (x,y) location of the matches
vector<uchar> outlier_mask; vector<char> outlier_mask;
Mat H = findHomography(mpts_2, mpts_1, RANSAC, 1, outlier_mask); Mat H = findHomography(mpts_2, mpts_1, RANSAC, 1, outlier_mask);
Mat outimg; Mat outimg;
drawMatches(im2, kpts_2, im1, kpts_1, matches_popcount, outimg, Scalar::all(-1), Scalar::all(-1), drawMatches(im2, kpts_2, im1, kpts_1, matches_popcount, outimg, Scalar::all(-1), Scalar::all(-1), outlier_mask);
*(const vector<char>*)(void*)(&outlier_mask));
imshow("matches - popcount - outliers removed", outimg); imshow("matches - popcount - outliers removed", outimg);
Mat warped; Mat warped;

@ -164,7 +164,7 @@ static void findConstrainedCorrespondences(const Mat& _F,
{ {
Point2f p1 = keypoints1[i].pt; Point2f p1 = keypoints1[i].pt;
double bestDist1 = DBL_MAX, bestDist2 = DBL_MAX; double bestDist1 = DBL_MAX, bestDist2 = DBL_MAX;
int bestIdx1 = -1, bestIdx2 = -1; int bestIdx1 = -1;//, bestIdx2 = -1;
const float* d1 = descriptors1.ptr<float>(i); const float* d1 = descriptors1.ptr<float>(i);
for( int j = 0; j < (int)keypoints2.size(); j++ ) for( int j = 0; j < (int)keypoints2.size(); j++ )
@ -203,14 +203,14 @@ static void findConstrainedCorrespondences(const Mat& _F,
if( dist < bestDist1 ) if( dist < bestDist1 )
{ {
bestDist2 = bestDist1; bestDist2 = bestDist1;
bestIdx2 = bestIdx1; //bestIdx2 = bestIdx1;
bestDist1 = dist; bestDist1 = dist;
bestIdx1 = (int)j; bestIdx1 = (int)j;
} }
else if( dist < bestDist2 ) else if( dist < bestDist2 )
{ {
bestDist2 = dist; bestDist2 = dist;
bestIdx2 = (int)j; //bestIdx2 = (int)j;
} }
} }
} }

@ -632,7 +632,7 @@ int main(int argc, char* argv[])
Mat img_warped, img_warped_s; Mat img_warped, img_warped_s;
Mat dilated_mask, seam_mask, mask, mask_warped; Mat dilated_mask, seam_mask, mask, mask_warped;
Ptr<Blender> blender; Ptr<Blender> blender;
double compose_seam_aspect = 1; //double compose_seam_aspect = 1;
double compose_work_aspect = 1; double compose_work_aspect = 1;
for (int img_idx = 0; img_idx < num_images; ++img_idx) for (int img_idx = 0; img_idx < num_images; ++img_idx)
@ -648,7 +648,7 @@ int main(int argc, char* argv[])
is_compose_scale_set = true; is_compose_scale_set = true;
// Compute relative scales // Compute relative scales
compose_seam_aspect = compose_scale / seam_scale; //compose_seam_aspect = compose_scale / seam_scale;
compose_work_aspect = compose_scale / work_scale; compose_work_aspect = compose_scale / work_scale;
// Update warped image scale // Update warped image scale

Loading…
Cancel
Save