mirror of
https://github.com/opencv/opencv.git
synced 2025-06-23 04:01:31 +08:00
Fixed several GCC 5.x warnings
This commit is contained in:
parent
4d041e6809
commit
21167b1bf1
4
3rdparty/libtiff/CMakeLists.txt
vendored
4
3rdparty/libtiff/CMakeLists.txt
vendored
@ -86,7 +86,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
|
||||||
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast)
|
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wmisleading-indentation)
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter)
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd4706) # vs2005
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd4706) # vs2005
|
||||||
@ -95,7 +95,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 /wd4305 /wd4306) # vs2008 Win64
|
|||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018)
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018 /wd4311 /wd4312)
|
||||||
|
|
||||||
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")
|
||||||
|
4
3rdparty/openexr/CMakeLists.txt
vendored
4
3rdparty/openexr/CMakeLists.txt
vendored
@ -37,8 +37,8 @@ endif()
|
|||||||
source_group("Include" FILES ${lib_hdrs} )
|
source_group("Include" FILES ${lib_hdrs} )
|
||||||
source_group("Src" FILES ${lib_srcs})
|
source_group("Src" FILES ${lib_srcs})
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations)
|
-Wdeprecated-declarations -Wmisleading-indentation)
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
|
||||||
|
@ -95,6 +95,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
add_extra_compiler_option(-Wno-narrowing)
|
add_extra_compiler_option(-Wno-narrowing)
|
||||||
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
|
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
|
||||||
add_extra_compiler_option(-Wno-unnamed-type-template-args)
|
add_extra_compiler_option(-Wno-unnamed-type-template-args)
|
||||||
|
add_extra_compiler_option(-Wno-comment)
|
||||||
add_extra_compiler_option(-Wno-array-bounds)
|
add_extra_compiler_option(-Wno-array-bounds)
|
||||||
add_extra_compiler_option(-Wno-aggressive-loop-optimizations)
|
add_extra_compiler_option(-Wno-aggressive-loop-optimizations)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1036,12 +1036,14 @@ icvRemoveQuadFromGroup(CvCBQuad **quads, int count, CvCBQuad *q0)
|
|||||||
q->neighbors[j] = 0;
|
q->neighbors[j] = 0;
|
||||||
q->count--;
|
q->count--;
|
||||||
for(int k = 0; k < 4; k++ )
|
for(int k = 0; k < 4; k++ )
|
||||||
|
{
|
||||||
if( q0->neighbors[k] == q )
|
if( q0->neighbors[k] == q )
|
||||||
{
|
{
|
||||||
q0->neighbors[k] = 0;
|
q0->neighbors[k] = 0;
|
||||||
q0->count--;
|
q0->count--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1339,6 +1339,7 @@ bool CV_StereoCalibrationTest::checkPandROI( int test_case_idx, const Mat& M, co
|
|||||||
|
|
||||||
undistortPoints(Mat(pts), upts, M, D, R, P );
|
undistortPoints(Mat(pts), upts, M, D, R, P );
|
||||||
for( k = 0; k < N*N; k++ )
|
for( k = 0; k < N*N; k++ )
|
||||||
|
{
|
||||||
if( upts[k].x < -imgsize.width*eps || upts[k].x > imgsize.width*(1+eps) ||
|
if( upts[k].x < -imgsize.width*eps || upts[k].x > imgsize.width*(1+eps) ||
|
||||||
upts[k].y < -imgsize.height*eps || upts[k].y > imgsize.height*(1+eps) )
|
upts[k].y < -imgsize.height*eps || upts[k].y > imgsize.height*(1+eps) )
|
||||||
{
|
{
|
||||||
@ -1346,6 +1347,7 @@ bool CV_StereoCalibrationTest::checkPandROI( int test_case_idx, const Mat& M, co
|
|||||||
test_case_idx, pts[k].x, pts[k].y, upts[k].x, upts[k].y);
|
test_case_idx, pts[k].x, pts[k].y, upts[k].x, upts[k].y);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// step 2. check that all the points inside ROI belong to the original source image
|
// step 2. check that all the points inside ROI belong to the original source image
|
||||||
Mat temp(imgsize, CV_8U), utemp, map1, map2;
|
Mat temp(imgsize, CV_8U), utemp, map1, map2;
|
||||||
|
@ -122,27 +122,23 @@ namespace cv
|
|||||||
typedef PtrStep<float> PtrStepf;
|
typedef PtrStep<float> PtrStepf;
|
||||||
typedef PtrStep<int> PtrStepi;
|
typedef PtrStep<int> PtrStepi;
|
||||||
|
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
#define __CV_GPU_DEPR_BEFORE__
|
#define CV_GPU_DEPRECATED __attribute__ ((deprecated))
|
||||||
#define __CV_GPU_DEPR_AFTER__ __attribute__ ((deprecated))
|
|
||||||
#elif defined(__MSVC__) //|| defined(__CUDACC__)
|
#elif defined(__MSVC__) //|| defined(__CUDACC__)
|
||||||
#pragma deprecated(DevMem2D_)
|
#pragma deprecated(DevMem2D_)
|
||||||
#define __CV_GPU_DEPR_BEFORE__ __declspec(deprecated)
|
#define CV_GPU_DEPRECATED __declspec(deprecated)
|
||||||
#define __CV_GPU_DEPR_AFTER__
|
|
||||||
#else
|
#else
|
||||||
#define __CV_GPU_DEPR_BEFORE__
|
#define CV_GPU_DEPRECATED
|
||||||
#define __CV_GPU_DEPR_AFTER__
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T> struct __CV_GPU_DEPR_BEFORE__ DevMem2D_ : public PtrStepSz<T>
|
template <typename T> struct DevMem2D_ : public PtrStepSz<T>
|
||||||
{
|
{
|
||||||
DevMem2D_() {}
|
CV_GPU_DEPRECATED DevMem2D_() {}
|
||||||
DevMem2D_(int rows_, int cols_, T* data_, size_t step_) : PtrStepSz<T>(rows_, cols_, data_, step_) {}
|
CV_GPU_DEPRECATED DevMem2D_(int rows_, int cols_, T* data_, size_t step_) : PtrStepSz<T>(rows_, cols_, data_, step_) {}
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
explicit __CV_GPU_DEPR_BEFORE__ DevMem2D_(const DevMem2D_<U>& d) : PtrStepSz<T>(d.rows, d.cols, (T*)d.data, d.step) {}
|
explicit CV_GPU_DEPRECATED DevMem2D_(const DevMem2D_<U>& d) : PtrStepSz<T>(d.rows, d.cols, (T*)d.data, d.step) {}
|
||||||
} __CV_GPU_DEPR_AFTER__ ;
|
};
|
||||||
|
|
||||||
typedef DevMem2D_<unsigned char> DevMem2Db;
|
typedef DevMem2D_<unsigned char> DevMem2Db;
|
||||||
typedef DevMem2Db DevMem2D;
|
typedef DevMem2Db DevMem2D;
|
||||||
@ -174,8 +170,7 @@ namespace cv
|
|||||||
typedef PtrElemStep_<float> PtrElemStepf;
|
typedef PtrElemStep_<float> PtrElemStepf;
|
||||||
typedef PtrElemStep_<int> PtrElemStepi;
|
typedef PtrElemStep_<int> PtrElemStepi;
|
||||||
|
|
||||||
//#undef __CV_GPU_DEPR_BEFORE__
|
//#undef CV_GPU_DEPRECATED
|
||||||
//#undef __CV_GPU_DEPR_AFTER__
|
|
||||||
|
|
||||||
namespace device
|
namespace device
|
||||||
{
|
{
|
||||||
|
@ -277,10 +277,9 @@ namespace cv { namespace gpu
|
|||||||
template <typename _Tp> operator PtrStep<_Tp>() const;
|
template <typename _Tp> operator PtrStep<_Tp>() const;
|
||||||
|
|
||||||
// Deprecated function
|
// Deprecated function
|
||||||
__CV_GPU_DEPR_BEFORE__ template <typename _Tp> operator DevMem2D_<_Tp>() const __CV_GPU_DEPR_AFTER__;
|
template <typename _Tp> CV_GPU_DEPRECATED operator DevMem2D_<_Tp>() const;
|
||||||
__CV_GPU_DEPR_BEFORE__ template <typename _Tp> operator PtrStep_<_Tp>() const __CV_GPU_DEPR_AFTER__;
|
template <typename _Tp> CV_GPU_DEPRECATED operator PtrStep_<_Tp>() const;
|
||||||
#undef __CV_GPU_DEPR_BEFORE__
|
#undef CV_GPU_DEPRECATED
|
||||||
#undef __CV_GPU_DEPR_AFTER__
|
|
||||||
|
|
||||||
/*! includes several bit-fields:
|
/*! includes several bit-fields:
|
||||||
- the magic signature
|
- the magic signature
|
||||||
|
@ -292,7 +292,7 @@ namespace cv
|
|||||||
return classname##_info_var; \
|
return classname##_info_var; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static ::cv::AlgorithmInfo& classname##_info_auto = classname##_info(); \
|
CV_ATTR_USED static ::cv::AlgorithmInfo& classname##_info_auto = classname##_info(); \
|
||||||
\
|
\
|
||||||
::cv::AlgorithmInfo* classname::info() const \
|
::cv::AlgorithmInfo* classname::info() const \
|
||||||
{ \
|
{ \
|
||||||
|
@ -43,6 +43,15 @@
|
|||||||
#ifndef __OPENCV_CORE_TYPES_H__
|
#ifndef __OPENCV_CORE_TYPES_H__
|
||||||
#define __OPENCV_CORE_TYPES_H__
|
#define __OPENCV_CORE_TYPES_H__
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(COMPILER_ICC)
|
||||||
|
# define CV_ATTR_UNUSED __attribute__((unused))
|
||||||
|
# define CV_ATTR_USED __attribute__((used))
|
||||||
|
#else
|
||||||
|
# define CV_ATTR_UNUSED
|
||||||
|
# define CV_ATTR_USED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !defined _CRT_SECURE_NO_DEPRECATE && defined _MSC_VER
|
#if !defined _CRT_SECURE_NO_DEPRECATE && defined _MSC_VER
|
||||||
# if _MSC_VER > 1300
|
# if _MSC_VER > 1300
|
||||||
# define _CRT_SECURE_NO_DEPRECATE /* to avoid multiple Visual Studio 2005 warnings */
|
# define _CRT_SECURE_NO_DEPRECATE /* to avoid multiple Visual Studio 2005 warnings */
|
||||||
|
@ -56,7 +56,7 @@ static void cvTsSimpleSeqShiftAndCopy( CvTsSimpleSeq* seq, int from_idx, int to_
|
|||||||
(seq->count - from_idx)*elem_size );
|
(seq->count - from_idx)*elem_size );
|
||||||
}
|
}
|
||||||
seq->count += to_idx - from_idx;
|
seq->count += to_idx - from_idx;
|
||||||
if( elem && to_idx > from_idx )
|
if( elem )
|
||||||
memcpy( seq->array + from_idx*elem_size, elem, (to_idx - from_idx)*elem_size );
|
memcpy( seq->array + from_idx*elem_size, elem, (to_idx - from_idx)*elem_size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ struct big_any_policy : typed_base_any_policy<T>
|
|||||||
{
|
{
|
||||||
virtual void static_delete(void** x)
|
virtual void static_delete(void** x)
|
||||||
{
|
{
|
||||||
if (* x) delete (* reinterpret_cast<T**>(x)); *x = NULL;
|
if (* x) { delete (* reinterpret_cast<T**>(x)); *x = NULL; }
|
||||||
}
|
}
|
||||||
virtual void copy_from_value(void const* src, void** dest)
|
virtual void copy_from_value(void const* src, void** dest)
|
||||||
{
|
{
|
||||||
|
@ -225,43 +225,49 @@ int GenericIndex<Distance>::radiusSearch(const Mat& query, Mat& indices, Mat& di
|
|||||||
* @deprecated Use GenericIndex class instead
|
* @deprecated Use GenericIndex class instead
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class
|
class Index_ {
|
||||||
#ifndef _MSC_VER
|
|
||||||
FLANN_DEPRECATED
|
|
||||||
#endif
|
|
||||||
Index_ {
|
|
||||||
public:
|
public:
|
||||||
typedef typename L2<T>::ElementType ElementType;
|
typedef typename L2<T>::ElementType ElementType;
|
||||||
typedef typename L2<T>::ResultType DistanceType;
|
typedef typename L2<T>::ResultType DistanceType;
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
Index_(const Mat& features, const ::cvflann::IndexParams& params);
|
Index_(const Mat& features, const ::cvflann::IndexParams& params);
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
~Index_();
|
~Index_();
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
void knnSearch(const vector<ElementType>& query, vector<int>& indices, vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& params);
|
void knnSearch(const vector<ElementType>& query, vector<int>& indices, vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& params);
|
||||||
|
FLANN_DEPRECATED
|
||||||
void knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& params);
|
void knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& params);
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
int radiusSearch(const vector<ElementType>& query, vector<int>& indices, vector<DistanceType>& dists, DistanceType radius, const ::cvflann::SearchParams& params);
|
int radiusSearch(const vector<ElementType>& query, vector<int>& indices, vector<DistanceType>& dists, DistanceType radius, const ::cvflann::SearchParams& params);
|
||||||
|
FLANN_DEPRECATED
|
||||||
int radiusSearch(const Mat& query, Mat& indices, Mat& dists, DistanceType radius, const ::cvflann::SearchParams& params);
|
int radiusSearch(const Mat& query, Mat& indices, Mat& dists, DistanceType radius, const ::cvflann::SearchParams& params);
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
void save(std::string filename)
|
void save(std::string filename)
|
||||||
{
|
{
|
||||||
if (nnIndex_L1) nnIndex_L1->save(filename);
|
if (nnIndex_L1) nnIndex_L1->save(filename);
|
||||||
if (nnIndex_L2) nnIndex_L2->save(filename);
|
if (nnIndex_L2) nnIndex_L2->save(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
int veclen() const
|
int veclen() const
|
||||||
{
|
{
|
||||||
if (nnIndex_L1) return nnIndex_L1->veclen();
|
if (nnIndex_L1) return nnIndex_L1->veclen();
|
||||||
if (nnIndex_L2) return nnIndex_L2->veclen();
|
if (nnIndex_L2) return nnIndex_L2->veclen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
int size() const
|
int size() const
|
||||||
{
|
{
|
||||||
if (nnIndex_L1) return nnIndex_L1->size();
|
if (nnIndex_L1) return nnIndex_L1->size();
|
||||||
if (nnIndex_L2) return nnIndex_L2->size();
|
if (nnIndex_L2) return nnIndex_L2->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FLANN_DEPRECATED
|
||||||
::cvflann::IndexParams getParameters()
|
::cvflann::IndexParams getParameters()
|
||||||
{
|
{
|
||||||
if (nnIndex_L1) return nnIndex_L1->getParameters();
|
if (nnIndex_L1) return nnIndex_L1->getParameters();
|
||||||
@ -269,7 +275,8 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FLANN_DEPRECATED const ::cvflann::IndexParams* getIndexParameters()
|
FLANN_DEPRECATED
|
||||||
|
const ::cvflann::IndexParams* getIndexParameters()
|
||||||
{
|
{
|
||||||
if (nnIndex_L1) return nnIndex_L1->getIndexParameters();
|
if (nnIndex_L1) return nnIndex_L1->getIndexParameters();
|
||||||
if (nnIndex_L2) return nnIndex_L2->getIndexParameters();
|
if (nnIndex_L2) return nnIndex_L2->getIndexParameters();
|
||||||
@ -281,10 +288,6 @@ private:
|
|||||||
::cvflann::Index< L1<ElementType> >* nnIndex_L1;
|
::cvflann::Index< L1<ElementType> >* nnIndex_L1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
template <typename T>
|
|
||||||
class FLANN_DEPRECATED Index_;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Index_<T>::Index_(const Mat& dataset, const ::cvflann::IndexParams& params)
|
Index_<T>::Index_(const Mat& dataset, const ::cvflann::IndexParams& params)
|
||||||
|
@ -383,9 +383,8 @@ static void icvInitCapture_V4L() {
|
|||||||
// add indexList
|
// add indexList
|
||||||
indexList|=(1 << CameraNumber);
|
indexList|=(1 << CameraNumber);
|
||||||
numCameras++;
|
numCameras++;
|
||||||
}
|
|
||||||
if (deviceHandle != -1)
|
|
||||||
close(deviceHandle);
|
close(deviceHandle);
|
||||||
|
}
|
||||||
/* Set up to test the next /dev/video source in line */
|
/* Set up to test the next /dev/video source in line */
|
||||||
CameraNumber++;
|
CameraNumber++;
|
||||||
} /* End while */
|
} /* End while */
|
||||||
|
@ -166,6 +166,7 @@ double showFlowAndCalcError(const string& name, const Mat& gray, const Mat& flow
|
|||||||
bool all = true;
|
bool all = true;
|
||||||
Mat inner = flow(where);
|
Mat inner = flow(where);
|
||||||
for(int y = 0; y < inner.rows; ++y)
|
for(int y = 0; y < inner.rows; ++y)
|
||||||
|
{
|
||||||
for(int x = 0; x < inner.cols; ++x)
|
for(int x = 0; x < inner.cols; ++x)
|
||||||
{
|
{
|
||||||
const Point2f f = inner.at<Point2f>(y, x);
|
const Point2f f = inner.at<Point2f>(y, x);
|
||||||
@ -178,6 +179,8 @@ double showFlowAndCalcError(const string& name, const Mat& gray, const Mat& flow
|
|||||||
double a = atan2(f.y, f.x);
|
double a = atan2(f.y, f.x);
|
||||||
error += fabs(angle - a);
|
error += fabs(angle - a);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
double res = all ? numeric_limits<double>::max() : error / (inner.cols * inner.rows);
|
double res = all ? numeric_limits<double>::max() : error / (inner.cols * inner.rows);
|
||||||
|
|
||||||
if (writeError)
|
if (writeError)
|
||||||
|
@ -461,7 +461,9 @@ void CV_StereoMatchingTest::run(int)
|
|||||||
int dispScaleFactor = datasetsParams[datasetName].dispScaleFactor;
|
int dispScaleFactor = datasetsParams[datasetName].dispScaleFactor;
|
||||||
Mat tmp; trueLeftDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor ); trueLeftDisp = tmp; tmp.release();
|
Mat tmp; trueLeftDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor ); trueLeftDisp = tmp; tmp.release();
|
||||||
if( !trueRightDisp.empty() )
|
if( !trueRightDisp.empty() )
|
||||||
|
{
|
||||||
trueRightDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor ); trueRightDisp = tmp; tmp.release();
|
trueRightDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor ); trueRightDisp = tmp; tmp.release();
|
||||||
|
}
|
||||||
|
|
||||||
Mat leftDisp, rightDisp;
|
Mat leftDisp, rightDisp;
|
||||||
int ignBorder = max(runStereoMatchingAlgorithm(leftImg, rightImg, leftDisp, rightDisp, ci), EVAL_IGNORE_BORDER);
|
int ignBorder = max(runStereoMatchingAlgorithm(leftImg, rightImg, leftDisp, rightDisp, ci), EVAL_IGNORE_BORDER);
|
||||||
|
@ -71,8 +71,8 @@ namespace
|
|||||||
vector<int> rank;
|
vector<int> rank;
|
||||||
vector<int> size;
|
vector<int> size;
|
||||||
private:
|
private:
|
||||||
DjSets(const DjSets &) {}
|
DjSets(const DjSets &); // = delete
|
||||||
DjSets operator =(const DjSets &);
|
DjSets& operator =(const DjSets &); // = delete
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -139,13 +139,6 @@ namespace
|
|||||||
// Implementation
|
// Implementation
|
||||||
//
|
//
|
||||||
|
|
||||||
DjSets DjSets::operator = (const DjSets &/*obj*/)
|
|
||||||
{
|
|
||||||
//cout << "Invalid DjSets constructor\n";
|
|
||||||
CV_Error(-1, "Invalid DjSets constructor\n");
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
DjSets::DjSets(int n) : parent(n), rank(n, 0), size(n, 1)
|
DjSets::DjSets(int n) : parent(n), rank(n, 0), size(n, 1)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < n; ++i)
|
for (int i = 0; i < n; ++i)
|
||||||
|
@ -296,7 +296,7 @@ CV_FLAGS(DftFlags, DFT_INVERSE, DFT_SCALE, DFT_ROWS, DFT_COMPLEX_OUTPUT, DFT_REA
|
|||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
||||||
test_name)::gtest_registering_dummy_ = \
|
test_name)::gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
||||||
\
|
\
|
||||||
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() \
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() \
|
||||||
|
@ -50,6 +50,7 @@ using namespace cv::gpu;
|
|||||||
#ifdef HAVE_OPENCV_NONFREE
|
#ifdef HAVE_OPENCV_NONFREE
|
||||||
#include "opencv2/nonfree/nonfree.hpp"
|
#include "opencv2/nonfree/nonfree.hpp"
|
||||||
|
|
||||||
|
CV_ATTR_USED
|
||||||
static bool makeUseOfNonfree = initModule_nonfree();
|
static bool makeUseOfNonfree = initModule_nonfree();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ namespace cvtest
|
|||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
||||||
}; \
|
}; \
|
||||||
int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
||||||
test_name)::gtest_registering_dummy_ = \
|
test_name)::gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
||||||
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() \
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() \
|
||||||
{ \
|
{ \
|
||||||
|
@ -17026,14 +17026,14 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
|
|||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
||||||
}; \
|
}; \
|
||||||
int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
||||||
test_name)::gtest_registering_dummy_ = \
|
test_name)::gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||||
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
||||||
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
|
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
|
||||||
|
|
||||||
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
|
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
|
||||||
::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
::testing::internal::ParamGenerator<test_case_name::ParamType> \
|
||||||
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
|
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
|
||||||
int gtest_##prefix##test_case_name##_dummy_ = \
|
int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
|
||||||
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
|
::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
|
||||||
GetTestCasePatternHolder<test_case_name>(\
|
GetTestCasePatternHolder<test_case_name>(\
|
||||||
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
|
#test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
|
||||||
|
@ -1757,7 +1757,7 @@ cmpUlpsFlt_(const int* src1, const int* src2, size_t total, int imaxdiff, size_t
|
|||||||
for( i = 0; i < total; i++ )
|
for( i = 0; i < total; i++ )
|
||||||
{
|
{
|
||||||
int a = src1[i], b = src2[i];
|
int a = src1[i], b = src2[i];
|
||||||
if( a < 0 ) a ^= C; if( b < 0 ) b ^= C;
|
if( a < 0 ) { a ^= C; } if( b < 0 ) { b ^= C; }
|
||||||
int diff = std::abs(a - b);
|
int diff = std::abs(a - b);
|
||||||
if( realmaxdiff < diff )
|
if( realmaxdiff < diff )
|
||||||
{
|
{
|
||||||
@ -1779,7 +1779,7 @@ cmpUlpsFlt_(const int64* src1, const int64* src2, size_t total, int imaxdiff, si
|
|||||||
for( i = 0; i < total; i++ )
|
for( i = 0; i < total; i++ )
|
||||||
{
|
{
|
||||||
int64 a = src1[i], b = src2[i];
|
int64 a = src1[i], b = src2[i];
|
||||||
if( a < 0 ) a ^= C; if( b < 0 ) b ^= C;
|
if( a < 0 ) { a ^= C; } if( b < 0 ) { b ^= C; }
|
||||||
double diff = fabs((double)a - (double)b);
|
double diff = fabs((double)a - (double)b);
|
||||||
if( realmaxdiff < diff )
|
if( realmaxdiff < diff )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user