Fixed mingw build.

This commit is contained in:
Andrey Kamaev 2012-06-08 03:15:08 +00:00
parent bee982b492
commit f62028dc16
41 changed files with 624 additions and 585 deletions

View File

@ -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)
# List of C++ files:
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# The .cpp files:
file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.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})
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)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-uninitialized")
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes -Wmissing-declarations -Wunused)
if(UNIX)
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
@ -39,10 +31,6 @@ if(UNIX)
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}
PROPERTIES
OUTPUT_NAME ${JASPER_LIBRARY}

View File

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

View File

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

View File

@ -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})
# List of C++ files:
set(lib_srcs
tif_aux.c
tif_close.c
@ -91,10 +90,8 @@ if(WIN32)
list(APPEND lib_srcs tif_win32.c)
endif(WIN32)
if(MSVC AND NOT ENABLE_NOISY_WARNINGS)
string(REPLACE "/W4" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REPLACE "/W4" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

View File

@ -143,7 +143,7 @@
/* Signed 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_SSIZE_FORMAT "%Iu"
#else

View File

@ -5,19 +5,10 @@
project(${ZLIB_LIBRARY} C)
include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckIncludeFile)
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
#
@ -82,9 +73,7 @@ if(UNIX)
endif()
endif()
if(MSVC AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4013")
endif()
ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations)
set_target_properties(${ZLIB_LIBRARY} PROPERTIES
OUTPUT_NAME ${ZLIB_LIBRARY}

View File

@ -414,6 +414,14 @@ typedef uLong FAR uLongf;
# undef _LARGEFILE64_SOURCE
#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
# define Z_LARGE
#endif

View File

@ -329,6 +329,15 @@ if(UNIX)
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/OpenCVModule.cmake REQUIRED)

View File

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

View File

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

View File

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

View File

@ -44,6 +44,12 @@ if(MSVC AND CMAKE_C_COMPILER MATCHES "icc")
set(CV_ICC __INTEL_COMPILER_FOR_WINDOWS)
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:
# ----------------------------------------------------------------------------

View File

@ -32,6 +32,46 @@ macro(ocv_clear_vars)
endforeach()
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.
# Can accept condition to control when option is available for user.
# Usage:

View File

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

View File

@ -419,16 +419,17 @@ bool Retina::_convertCvMat2ValarrayBuffer(const cv::Mat inputMatToConvert, std::
if(imageNumberOfChannels==4)
{
// 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()]),
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)
cv::Mat(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[0])
};
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
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)
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
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
cv::Mat dst(inputMatToConvert.size(), dsttype, &outputValarrayMatrix[0]);

View File

@ -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
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID );
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
{
if( fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH )

View File

@ -133,7 +133,7 @@ CV_INIT_ALGORITHM(DenseFeatureDetector, "Feature2D.Dense",
obj.info()->addParam(obj, "varyImgBoundWithScale", obj.varyImgBoundWithScale));
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, "gridRows", obj.gridRows);
obj.info()->addParam(obj, "gridCols", obj.gridCols));

View File

@ -911,7 +911,7 @@ void CV_DescriptorMatcherTest::radiusMatchTest( const Mat& query, const Mat& tra
dmatcher->radiusMatch( query, matches, radius, masks );
int curRes = cvtest::TS::OK;
//int curRes = cvtest::TS::OK;
if( (int)matches.size() != queryDescCount )
{
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 )
{
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",
(float)badCount/(float)queryDescCount );
ts->set_failed_test_info( cvtest::TS::FAIL_BAD_ACCURACY );

View File

@ -65,7 +65,7 @@
#undef FLANN_PLATFORM_32_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
#else
#define FLANN_PLATFORM_32_BIT

View File

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

View File

@ -133,12 +133,8 @@ endif()
if(HAVE_OPENNI)
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})
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)
if(HAVE_opencv_androidcamera)
@ -194,7 +190,7 @@ endif()
if(WIN32)
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()
if(UNIX)
@ -228,10 +224,7 @@ endif()
set_target_properties(${the_module} PROPERTIES LINK_INTERFACE_LIBRARIES "")
ocv_add_precompiled_headers(${the_module})
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-deprecated-declarations)
if(WIN32 AND WITH_FFMPEG)
#copy ffmpeg dll to the output folder

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -41,7 +41,8 @@
#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 );
CvSeq* icvCutContourRaster( CvSeq* current, CvMemStorage* storage, IplImage* image );

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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/a3.jpg") ) );
Stitcher::Status status;
Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb"
? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder()
: (detail::FeaturesFinder*)new detail::SurfFeaturesFinder();
@ -53,7 +52,7 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
stitcher.setRegistrationResol(WORK_MEGAPIX);
startTimer();
status = stitcher.stitch(imgs, pano);
stitcher.stitch(imgs, pano);
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/b2.jpg") ) );
Stitcher::Status status;
Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb"
? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder()
: (detail::FeaturesFinder*)new detail::SurfFeaturesFinder();
@ -86,7 +84,7 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
stitcher.setRegistrationResol(WORK_MEGAPIX);
startTimer();
status = stitcher.stitch(imgs, pano);
stitcher.stitch(imgs, pano);
stopTimer();
}
}

View File

@ -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_<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_<uchar> submask1, submask2, intersect;

View File

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

View File

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

View File

@ -413,18 +413,21 @@
# include <regex.h> // NOLINT
# define GTEST_USES_POSIX_RE 1
# define GTEST_USES_SIMPLE_RE 0
#elif GTEST_OS_WINDOWS
// <regex.h> is not available on Windows. Use our own simple regex
// implementation instead.
# define GTEST_USES_SIMPLE_RE 1
# define GTEST_USES_POSIX_RE 0
#else
// <regex.h> may not be available on this platform. Use our own
// simple regex implementation instead.
# define GTEST_USES_SIMPLE_RE 1
# define GTEST_USES_POSIX_RE 0
#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.
#if GTEST_OS_LINUX
# define GTEST_CAN_STREAM_RESULTS_ 1
#else
# define GTEST_CAN_STREAM_RESULTS_ 0
#endif
// Defines some utility macros.

View File

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

View File

@ -112,12 +112,11 @@ int main(int argc, const char ** argv)
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
vector<uchar> outlier_mask;
vector<char> outlier_mask;
Mat H = findHomography(mpts_2, mpts_1, RANSAC, 1, outlier_mask);
Mat outimg;
drawMatches(im2, kpts_2, im1, kpts_1, matches_popcount, outimg, Scalar::all(-1), Scalar::all(-1),
*(const vector<char>*)(void*)(&outlier_mask));
drawMatches(im2, kpts_2, im1, kpts_1, matches_popcount, outimg, Scalar::all(-1), Scalar::all(-1), outlier_mask);
imshow("matches - popcount - outliers removed", outimg);
Mat warped;

View File

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

View File

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