fixed ~300 warnings under windows (had to hack gtest a bit)
This commit is contained in:
parent
c67f1a2551
commit
1c18e5fef9
@ -2,9 +2,6 @@
|
|||||||
macro(define_opencv_module name)
|
macro(define_opencv_module name)
|
||||||
|
|
||||||
project(opencv_${name})
|
project(opencv_${name})
|
||||||
if (OPENCV_BUILD_SHARED_LIB)
|
|
||||||
add_definitions(-DCVAPI_EXPORTS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||||
@ -41,6 +38,11 @@ macro(define_opencv_module name)
|
|||||||
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
|
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (OPENCV_BUILD_SHARED_LIB)
|
||||||
|
#add_definitions(-DCVAPI_EXPORTS)
|
||||||
|
set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Additional target properties
|
# Additional target properties
|
||||||
set_target_properties(${the_target} PROPERTIES
|
set_target_properties(${the_target} PROPERTIES
|
||||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||||
|
@ -1929,8 +1929,8 @@ void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
|
|||||||
bool cv::findCirclesGrid( const InputArray& _image, Size patternSize,
|
bool cv::findCirclesGrid( const InputArray& _image, Size patternSize,
|
||||||
OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector )
|
OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector )
|
||||||
{
|
{
|
||||||
bool isAsymmetricGrid = (flags & CALIB_CB_ASYMMETRIC_GRID);
|
bool isAsymmetricGrid = (bool)(flags & CALIB_CB_ASYMMETRIC_GRID);
|
||||||
bool isSymmetricGrid = (flags & CALIB_CB_SYMMETRIC_GRID);
|
bool isSymmetricGrid = (bool)(flags & CALIB_CB_SYMMETRIC_GRID);
|
||||||
CV_Assert(isAsymmetricGrid ^ isSymmetricGrid);
|
CV_Assert(isAsymmetricGrid ^ isSymmetricGrid);
|
||||||
|
|
||||||
Mat image = _image.getMat();
|
Mat image = _image.getMat();
|
||||||
|
@ -58,7 +58,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector<Point2f> poin
|
|||||||
{
|
{
|
||||||
for(size_t j=i+1; j<points.size(); j++)
|
for(size_t j=i+1; j<points.size(); j++)
|
||||||
{
|
{
|
||||||
dists.at<float>(i, j) = norm(points[i] - points[j]);
|
dists.at<float>(i, j) = (float)norm(points[i] - points[j]);
|
||||||
distsMask.at<uchar>(i, j) = 255;
|
distsMask.at<uchar>(i, j) = 255;
|
||||||
//TODO: use symmetry
|
//TODO: use symmetry
|
||||||
distsMask.at<uchar>(j, i) = distsMask.at<uchar>(i, j);
|
distsMask.at<uchar>(j, i) = distsMask.at<uchar>(i, j);
|
||||||
@ -160,7 +160,7 @@ void CirclesGridClusterFinder::findCorners(const std::vector<cv::Point2f> &hull2
|
|||||||
{
|
{
|
||||||
Point2f vec1 = hull2f[(i+1) % hull2f.size()] - hull2f[i % hull2f.size()];
|
Point2f vec1 = hull2f[(i+1) % hull2f.size()] - hull2f[i % hull2f.size()];
|
||||||
Point2f vec2 = hull2f[(i-1 + static_cast<int>(hull2f.size())) % hull2f.size()] - hull2f[i % hull2f.size()];
|
Point2f vec2 = hull2f[(i-1 + static_cast<int>(hull2f.size())) % hull2f.size()] - hull2f[i % hull2f.size()];
|
||||||
float angle = vec1.ddot(vec2) / (norm(vec1) * norm(vec2));
|
float angle = (float)(vec1.ddot(vec2) / (norm(vec1) * norm(vec2)));
|
||||||
angles.push_back(angle);
|
angles.push_back(angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -626,9 +626,9 @@ bool CirclesGridFinder::isDetectionCorrect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t largeWidth = patternSize.width;
|
size_t largeWidth = patternSize.width;
|
||||||
size_t largeHeight = ceil(patternSize.height / 2.);
|
size_t largeHeight = (size_t)ceil(patternSize.height / 2.);
|
||||||
size_t smallWidth = patternSize.width;
|
size_t smallWidth = patternSize.width;
|
||||||
size_t smallHeight = floor(patternSize.height / 2.);
|
size_t smallHeight = (size_t)floor(patternSize.height / 2.);
|
||||||
|
|
||||||
size_t sw = smallWidth, sh = smallHeight, lw = largeWidth, lh = largeHeight;
|
size_t sw = smallWidth, sh = smallHeight, lw = largeWidth, lh = largeHeight;
|
||||||
if (largeHoles->size() != largeHeight)
|
if (largeHoles->size() != largeHeight)
|
||||||
@ -782,7 +782,7 @@ Mat CirclesGridFinder::rectifyGrid(Size detectedGridSize, const vector<Point2f>&
|
|||||||
|
|
||||||
size_t CirclesGridFinder::findNearestKeypoint(Point2f pt) const
|
size_t CirclesGridFinder::findNearestKeypoint(Point2f pt) const
|
||||||
{
|
{
|
||||||
size_t bestIdx = -1;
|
size_t bestIdx = 0;
|
||||||
double minDist = std::numeric_limits<double>::max();
|
double minDist = std::numeric_limits<double>::max();
|
||||||
for (size_t i = 0; i < keypoints.size(); i++)
|
for (size_t i = 0; i < keypoints.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -52,12 +52,14 @@
|
|||||||
|
|
||||||
class CirclesGridClusterFinder
|
class CirclesGridClusterFinder
|
||||||
{
|
{
|
||||||
|
CirclesGridClusterFinder& operator=(const CirclesGridClusterFinder&);
|
||||||
|
CirclesGridClusterFinder(const CirclesGridClusterFinder&);
|
||||||
public:
|
public:
|
||||||
CirclesGridClusterFinder(bool _isAsymmetricGrid)
|
CirclesGridClusterFinder(bool _isAsymmetricGrid)
|
||||||
{
|
{
|
||||||
isAsymmetricGrid = _isAsymmetricGrid;
|
isAsymmetricGrid = _isAsymmetricGrid;
|
||||||
squareSize = 1.0f;
|
squareSize = 1.0f;
|
||||||
maxRectifiedDistance = squareSize / 2.0;
|
maxRectifiedDistance = (float)(squareSize / 2.0);
|
||||||
}
|
}
|
||||||
void findGrid(const std::vector<cv::Point2f> points, cv::Size patternSize, std::vector<cv::Point2f>& centers);
|
void findGrid(const std::vector<cv::Point2f> points, cv::Size patternSize, std::vector<cv::Point2f>& centers);
|
||||||
|
|
||||||
@ -209,6 +211,9 @@ private:
|
|||||||
|
|
||||||
const cv::Size_<size_t> patternSize;
|
const cv::Size_<size_t> patternSize;
|
||||||
CirclesGridFinderParameters parameters;
|
CirclesGridFinderParameters parameters;
|
||||||
|
|
||||||
|
CirclesGridFinder& operator=(const CirclesGridFinder&);
|
||||||
|
CirclesGridFinder(const CirclesGridFinder&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CIRCLESGRID_HPP_ */
|
#endif /* CIRCLESGRID_HPP_ */
|
||||||
|
@ -224,6 +224,10 @@ namespace cv
|
|||||||
tvec.copyTo(initTvec);
|
tvec.copyTo(initTvec);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
PnPSolver& operator=(const PnPSolver&);
|
||||||
|
PnPSolver(const PnPSolver&);
|
||||||
|
|
||||||
const Mat& objectPoints;
|
const Mat& objectPoints;
|
||||||
const Mat& imagePoints;
|
const Mat& imagePoints;
|
||||||
const Parameters& parameters;
|
const Parameters& parameters;
|
||||||
|
@ -1113,7 +1113,7 @@ ChamferMatcher::Match* ChamferMatcher::Matching::localChamferDistance(Point offs
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cnt_orientation>0) {
|
if (cnt_orientation>0) {
|
||||||
cost = beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation;
|
cost = (float)(beta*cost+alpha*(sum_orientation/(2*CV_PI))/cnt_orientation);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1928,7 +1928,7 @@ void Core_SVDTest::run_func()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Core_SVDTest::prepare_to_validation( int test_case_idx )
|
void Core_SVDTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
Mat& input = test_mat[INPUT][0];
|
Mat& input = test_mat[INPUT][0];
|
||||||
int depth = input.depth();
|
int depth = input.depth();
|
||||||
|
@ -299,7 +299,7 @@ void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector<cv::KeyPoi
|
|||||||
normalizer += centers[i][j].confidence;
|
normalizer += centers[i][j].confidence;
|
||||||
}
|
}
|
||||||
sumPoint *= (1. / normalizer);
|
sumPoint *= (1. / normalizer);
|
||||||
KeyPoint kpt(sumPoint, params.defaultKeypointSize);
|
KeyPoint kpt(sumPoint, (float)params.defaultKeypointSize);
|
||||||
keypoints.push_back(kpt);
|
keypoints.push_back(kpt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,9 @@ class AutotunedIndex : public NNIndex<ELEM_TYPE>
|
|||||||
*/
|
*/
|
||||||
const AutotunedIndexParams& index_params;
|
const AutotunedIndexParams& index_params;
|
||||||
|
|
||||||
|
AutotunedIndex& operator=(const AutotunedIndex&);
|
||||||
|
AutotunedIndex(const AutotunedIndex&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
AutotunedIndex(const Matrix<ELEM_TYPE>& inputData, const AutotunedIndexParams& params = AutotunedIndexParams() ) :
|
AutotunedIndex(const Matrix<ELEM_TYPE>& inputData, const AutotunedIndexParams& params = AutotunedIndexParams() ) :
|
||||||
|
@ -77,7 +77,8 @@ class CompositeIndex : public NNIndex<ELEM_TYPE>
|
|||||||
|
|
||||||
const IndexParams& index_params;
|
const IndexParams& index_params;
|
||||||
|
|
||||||
|
CompositeIndex& operator=(const CompositeIndex&);
|
||||||
|
CompositeIndex(const CompositeIndex&);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CompositeIndex(const Matrix<ELEM_TYPE>& inputData, const CompositeIndexParams& params = CompositeIndexParams() ) :
|
CompositeIndex(const Matrix<ELEM_TYPE>& inputData, const CompositeIndexParams& params = CompositeIndexParams() ) :
|
||||||
|
@ -3,12 +3,9 @@ set(name "gpu")
|
|||||||
set(the_target "opencv_${name}")
|
set(the_target "opencv_${name}")
|
||||||
project(${the_target})
|
project(${the_target})
|
||||||
|
|
||||||
|
|
||||||
set(DEPS "opencv_core" "opencv_imgproc" "opencv_objdetect" "opencv_features2d" "opencv_flann" "opencv_calib3d") #"opencv_features2d" "opencv_flann" "opencv_objdetect" - only headers needed
|
set(DEPS "opencv_core" "opencv_imgproc" "opencv_objdetect" "opencv_features2d" "opencv_flann" "opencv_calib3d") #"opencv_features2d" "opencv_flann" "opencv_objdetect" - only headers needed
|
||||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} opencv_gpu)
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} opencv_gpu)
|
||||||
|
|
||||||
add_definitions(-DCVAPI_EXPORTS)
|
|
||||||
|
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/cuda"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/cuda"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||||
@ -71,6 +68,10 @@ if (HAVE_CUDA)
|
|||||||
string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (OPENCV_BUILD_SHARED_LIB)
|
||||||
|
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-DCVAPI_EXPORTS")
|
||||||
|
endif()
|
||||||
|
|
||||||
CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
|
CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
|
||||||
#CUDA_BUILD_CLEAN_TARGET()
|
#CUDA_BUILD_CLEAN_TARGET()
|
||||||
endif()
|
endif()
|
||||||
@ -103,6 +104,11 @@ set_target_properties(${the_target} PROPERTIES
|
|||||||
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
|
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (OPENCV_BUILD_SHARED_LIB)
|
||||||
|
#add_definitions(-DCVAPI_EXPORTS)
|
||||||
|
set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Additional target properties
|
# Additional target properties
|
||||||
set_target_properties(${the_target} PROPERTIES
|
set_target_properties(${the_target} PROPERTIES
|
||||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||||
|
@ -3,12 +3,9 @@ set(name "gpu")
|
|||||||
set(the_target "opencv_${name}")
|
set(the_target "opencv_${name}")
|
||||||
project(${the_target})
|
project(${the_target})
|
||||||
|
|
||||||
|
|
||||||
set(DEPS "opencv_core" "opencv_imgproc" "opencv_objdetect" "opencv_features2d" "opencv_flann" "opencv_calib3d") #"opencv_features2d" "opencv_flann" "opencv_objdetect" - only headers needed
|
set(DEPS "opencv_core" "opencv_imgproc" "opencv_objdetect" "opencv_features2d" "opencv_flann" "opencv_calib3d") #"opencv_features2d" "opencv_flann" "opencv_objdetect" - only headers needed
|
||||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} opencv_gpu)
|
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} opencv_gpu)
|
||||||
|
|
||||||
add_definitions(-DCVAPI_EXPORTS)
|
|
||||||
|
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/cuda"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/cuda"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
||||||
@ -71,6 +68,10 @@ if (HAVE_CUDA)
|
|||||||
string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (OPENCV_BUILD_SHARED_LIB)
|
||||||
|
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-DCVAPI_EXPORTS")
|
||||||
|
endif()
|
||||||
|
|
||||||
CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
|
CUDA_COMPILE(cuda_objs ${lib_cuda} ${ncv_cuda})
|
||||||
#CUDA_BUILD_CLEAN_TARGET()
|
#CUDA_BUILD_CLEAN_TARGET()
|
||||||
endif()
|
endif()
|
||||||
@ -103,6 +104,11 @@ set_target_properties(${the_target} PROPERTIES
|
|||||||
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
|
OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (OPENCV_BUILD_SHARED_LIB)
|
||||||
|
#add_definitions(-DCVAPI_EXPORTS)
|
||||||
|
set_target_properties(${the_target} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Additional target properties
|
# Additional target properties
|
||||||
set_target_properties(${the_target} PROPERTIES
|
set_target_properties(${the_target} PROPERTIES
|
||||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||||
|
@ -77,6 +77,7 @@ CV_EXPORTS bool cv::gpu::TargetArchs::builtWith(cv::gpu::FeatureSet feature_set)
|
|||||||
#if defined (HAVE_CUDA)
|
#if defined (HAVE_CUDA)
|
||||||
return ::compareToSet(CUDA_ARCH_FEATURES, feature_set, std::greater_equal<int>());
|
return ::compareToSet(CUDA_ARCH_FEATURES, feature_set, std::greater_equal<int>());
|
||||||
#else
|
#else
|
||||||
|
(void)feature_set;
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -93,6 +94,8 @@ CV_EXPORTS bool cv::gpu::TargetArchs::hasPtx(int major, int minor)
|
|||||||
#if defined (HAVE_CUDA)
|
#if defined (HAVE_CUDA)
|
||||||
return ::compareToSet(CUDA_ARCH_PTX, major * 10 + minor, std::equal_to<int>());
|
return ::compareToSet(CUDA_ARCH_PTX, major * 10 + minor, std::equal_to<int>());
|
||||||
#else
|
#else
|
||||||
|
(void)major;
|
||||||
|
(void)minor;
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -103,6 +106,8 @@ CV_EXPORTS bool cv::gpu::TargetArchs::hasBin(int major, int minor)
|
|||||||
#if defined (HAVE_CUDA)
|
#if defined (HAVE_CUDA)
|
||||||
return ::compareToSet(CUDA_ARCH_BIN, major * 10 + minor, std::equal_to<int>());
|
return ::compareToSet(CUDA_ARCH_BIN, major * 10 + minor, std::equal_to<int>());
|
||||||
#else
|
#else
|
||||||
|
(void)major;
|
||||||
|
(void)minor;
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -114,6 +119,8 @@ CV_EXPORTS bool cv::gpu::TargetArchs::hasEqualOrLessPtx(int major, int minor)
|
|||||||
return ::compareToSet(CUDA_ARCH_PTX, major * 10 + minor,
|
return ::compareToSet(CUDA_ARCH_PTX, major * 10 + minor,
|
||||||
std::less_equal<int>());
|
std::less_equal<int>());
|
||||||
#else
|
#else
|
||||||
|
(void)major;
|
||||||
|
(void)minor;
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -132,6 +139,8 @@ CV_EXPORTS bool cv::gpu::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
|
|||||||
return ::compareToSet(CUDA_ARCH_PTX, major * 10 + minor,
|
return ::compareToSet(CUDA_ARCH_PTX, major * 10 + minor,
|
||||||
std::greater_equal<int>());
|
std::greater_equal<int>());
|
||||||
#else
|
#else
|
||||||
|
(void)major;
|
||||||
|
(void)minor;
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -143,6 +152,8 @@ CV_EXPORTS bool cv::gpu::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
|
|||||||
return ::compareToSet(CUDA_ARCH_BIN, major * 10 + minor,
|
return ::compareToSet(CUDA_ARCH_BIN, major * 10 + minor,
|
||||||
std::greater_equal<int>());
|
std::greater_equal<int>());
|
||||||
#else
|
#else
|
||||||
|
(void)major;
|
||||||
|
(void)minor;
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ using namespace gpu;
|
|||||||
class CV_GpuArithmTest : public cvtest::BaseTest
|
class CV_GpuArithmTest : public cvtest::BaseTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CV_GpuArithmTest(const char* test_name, const char* test_funcs){}
|
CV_GpuArithmTest(const char* /*test_name*/, const char* /*test_funcs*/){}
|
||||||
virtual ~CV_GpuArithmTest() {}
|
virtual ~CV_GpuArithmTest() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -51,7 +51,7 @@ using namespace gpu;
|
|||||||
class CV_GpuNppFilterTest : public cvtest::BaseTest
|
class CV_GpuNppFilterTest : public cvtest::BaseTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CV_GpuNppFilterTest(const char* test_name, const char* test_funcs) {}
|
CV_GpuNppFilterTest(const char* /*test_name*/, const char* /*test_funcs*/) {}
|
||||||
virtual ~CV_GpuNppFilterTest() {}
|
virtual ~CV_GpuNppFilterTest() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -77,7 +77,7 @@ int main( int argc, char* argv[] )
|
|||||||
int width = 24;
|
int width = 24;
|
||||||
int height = 24;
|
int height = 24;
|
||||||
|
|
||||||
srand(time(0));
|
srand((unsigned int)time(0));
|
||||||
|
|
||||||
if( argc == 1 )
|
if( argc == 1 )
|
||||||
{
|
{
|
||||||
|
@ -247,7 +247,7 @@ int CV_MorphologyBaseTest::prepare_test_case( int test_case_idx )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CV_MorphologyBaseTest::prepare_to_validation( int test_case_idx )
|
void CV_MorphologyBaseTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
Mat& src = test_mat[INPUT][0], &dst = test_mat[REF_OUTPUT][0];
|
Mat& src = test_mat[INPUT][0], &dst = test_mat[REF_OUTPUT][0];
|
||||||
Mat _ielement(element->nRows, element->nCols, CV_32S, element->values);
|
Mat _ielement(element->nRows, element->nCols, CV_32S, element->values);
|
||||||
@ -422,7 +422,7 @@ void CV_FilterTest::run_func()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CV_FilterTest::prepare_to_validation( int test_case_idx )
|
void CV_FilterTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].type(),
|
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].type(),
|
||||||
test_mat[INPUT][1], anchor, 0, BORDER_REPLICATE );
|
test_mat[INPUT][1], anchor, 0, BORDER_REPLICATE );
|
||||||
@ -539,7 +539,7 @@ void CV_SobelTest::run_func()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CV_SobelTest::prepare_to_validation( int test_case_idx )
|
void CV_SobelTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
Mat kernel = cvtest::calcSobelKernel2D( dx, dy, _aperture_size, 0 );
|
Mat kernel = cvtest::calcSobelKernel2D( dx, dy, _aperture_size, 0 );
|
||||||
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].depth(),
|
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].depth(),
|
||||||
@ -600,7 +600,7 @@ int CV_LaplaceTest::prepare_test_case( int test_case_idx )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CV_LaplaceTest::prepare_to_validation( int test_case_idx )
|
void CV_LaplaceTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
Mat kernel = cvtest::calcLaplaceKernel2D( _aperture_size );
|
Mat kernel = cvtest::calcLaplaceKernel2D( _aperture_size );
|
||||||
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].depth(),
|
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].depth(),
|
||||||
@ -703,7 +703,7 @@ int CV_BlurTest::prepare_test_case( int test_case_idx )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CV_BlurTest::prepare_to_validation( int test_case_idx )
|
void CV_BlurTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
Mat kernel(aperture_size, CV_64F);
|
Mat kernel(aperture_size, CV_64F);
|
||||||
kernel.setTo(Scalar::all(normalize ? 1./(aperture_size.width*aperture_size.height) : 1.));
|
kernel.setTo(Scalar::all(normalize ? 1./(aperture_size.width*aperture_size.height) : 1.));
|
||||||
@ -823,7 +823,7 @@ static Mat calcGaussianKernel2D( Size ksize, double sigma )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CV_GaussianBlurTest::prepare_to_validation( int test_case_idx )
|
void CV_GaussianBlurTest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
Mat kernel = calcGaussianKernel2D( aperture_size, sigma );
|
Mat kernel = calcGaussianKernel2D( aperture_size, sigma );
|
||||||
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].depth(),
|
cvtest::filter2D( test_mat[INPUT][0], test_mat[REF_OUTPUT][0], test_mat[REF_OUTPUT][0].depth(),
|
||||||
|
@ -1116,13 +1116,13 @@ CvDTreeSplit* CvForestERTree::find_split_cat_class( CvDTreeNode* node, int vi, f
|
|||||||
|
|
||||||
if (var_class_mask->data.ptr[mask_class_idx])
|
if (var_class_mask->data.ptr[mask_class_idx])
|
||||||
{
|
{
|
||||||
lc[r]+=p;
|
lc[r]+=(int)p;
|
||||||
L+=p;
|
L+=p;
|
||||||
split->subset[var_class_idx >> 5] |= 1 << (var_class_idx & 31);
|
split->subset[var_class_idx >> 5] |= 1 << (var_class_idx & 31);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rc[r]+=p;
|
rc[r]+=(int)p;
|
||||||
R+=p;
|
R+=p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2112,9 +2112,9 @@ struct predict_body_svm {
|
|||||||
cvGetRow( samples, &sample, i );
|
cvGetRow( samples, &sample, i );
|
||||||
int r = (int)pointer->predict(&sample);
|
int r = (int)pointer->predict(&sample);
|
||||||
if (results)
|
if (results)
|
||||||
results->data.fl[i] = r;
|
results->data.fl[i] = (float)r;
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
*result = r;
|
*result = (float)r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -253,7 +253,7 @@ static int decode(Sampler &sa, code &cc)
|
|||||||
|
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
sum += sa.getpixel(1 + (i & 7), 1 + (i >> 3));
|
sum += sa.getpixel(1 + (i & 7), 1 + (i >> 3));
|
||||||
uint8 mean = sum / 64;
|
uint8 mean = (uint8)(sum / 64);
|
||||||
for (i = 0; i < 64; i++) {
|
for (i = 0; i < 64; i++) {
|
||||||
b = (b << 1) + (sa.getpixel(pickup[i].x, pickup[i].y) <= mean);
|
b = (b << 1) + (sa.getpixel(pickup[i].x, pickup[i].y) <= mean);
|
||||||
if ((i & 7) == 7) {
|
if ((i & 7) == 7) {
|
||||||
|
@ -647,7 +647,7 @@ void DOTDetector::save( const std::string& filename ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DOTDetector::train( const string& _baseDirName, const TrainParams& _trainParams, bool _isAddImageAndGradientMask )
|
void DOTDetector::train( const string& _baseDirName, const TrainParams& _trainParams, bool /*_isAddImageAndGradientMask*/ )
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ int searchObjectThreshold(const CvLSVMFeaturePyramid *H,
|
|||||||
float scoreThreshold,
|
float scoreThreshold,
|
||||||
CvPoint **points, int **levels, int *kPoints,
|
CvPoint **points, int **levels, int *kPoints,
|
||||||
float **score, CvPoint ***partsDisplacement,
|
float **score, CvPoint ***partsDisplacement,
|
||||||
int numThreads)
|
int /*numThreads*/)
|
||||||
{
|
{
|
||||||
int opResult;
|
int opResult;
|
||||||
|
|
||||||
@ -551,7 +551,7 @@ int searchObjectThresholdSomeComponents(const CvLSVMFeaturePyramid *H,
|
|||||||
const float *b, float scoreThreshold,
|
const float *b, float scoreThreshold,
|
||||||
CvPoint **points, CvPoint **oppPoints,
|
CvPoint **points, CvPoint **oppPoints,
|
||||||
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;
|
||||||
|
@ -1652,15 +1652,18 @@ inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
#if GTEST_LINKED_AS_SHARED_LIBRARY
|
#if GTEST_LINKED_AS_SHARED_LIBRARY
|
||||||
#define GTEST_API_ __declspec(dllimport)
|
#define GTEST_API_
|
||||||
|
#define GTEST_API_2 __declspec(dllimport)
|
||||||
#elif GTEST_CREATE_SHARED_LIBRARY
|
#elif GTEST_CREATE_SHARED_LIBRARY
|
||||||
#define GTEST_API_ __declspec(dllexport)
|
#define GTEST_API_ __declspec(dllexport)
|
||||||
|
#define GTEST_API_2 GTEST_API_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
||||||
#ifndef GTEST_API_
|
#ifndef GTEST_API_
|
||||||
#define GTEST_API_
|
#define GTEST_API_
|
||||||
|
#define GTEST_API_2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace testing {
|
namespace testing {
|
||||||
@ -8378,7 +8381,7 @@ namespace testing {
|
|||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// Protects copying of all linked_ptr objects.
|
// Protects copying of all linked_ptr objects.
|
||||||
GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
|
GTEST_API_2 GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
|
||||||
|
|
||||||
// This is used internally by all instances of linked_ptr<>. It needs to be
|
// This is used internally by all instances of linked_ptr<>. It needs to be
|
||||||
// a non-template class because different types of linked_ptr<> can refer to
|
// a non-template class because different types of linked_ptr<> can refer to
|
||||||
@ -15359,7 +15362,7 @@ class GTEST_API_ TestPartResultArray {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This interface knows how to report a test part result.
|
// This interface knows how to report a test part result.
|
||||||
class TestPartResultReporterInterface {
|
class GTEST_API_ TestPartResultReporterInterface {
|
||||||
public:
|
public:
|
||||||
virtual ~TestPartResultReporterInterface() {}
|
virtual ~TestPartResultReporterInterface() {}
|
||||||
|
|
||||||
|
@ -2712,7 +2712,7 @@ Mat calcLaplaceKernel2D( int aperture_size )
|
|||||||
|
|
||||||
for( int i = 0; i < ksize; i++ )
|
for( int i = 0; i < ksize; i++ )
|
||||||
for( int j = 0; j < ksize; j++ )
|
for( int j = 0; j < ksize; j++ )
|
||||||
kernel.at<float>(i, j) = kx[j]*ky[i] + kx[i]*ky[j];
|
kernel.at<float>(i, j) = (float)(kx[j]*ky[i] + kx[i]*ky[j]);
|
||||||
|
|
||||||
return kernel;
|
return kernel;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ void CV_UpdateMHITest::run_func()
|
|||||||
|
|
||||||
void CV_UpdateMHITest::prepare_to_validation( int /*test_case_idx*/ )
|
void CV_UpdateMHITest::prepare_to_validation( int /*test_case_idx*/ )
|
||||||
{
|
{
|
||||||
CvMat m0 = test_mat[REF_INPUT_OUTPUT][0];
|
//CvMat m0 = test_mat[REF_INPUT_OUTPUT][0];
|
||||||
test_updateMHI( test_mat[INPUT][0], test_mat[REF_INPUT_OUTPUT][0], timestamp, duration );
|
test_updateMHI( test_mat[INPUT][0], test_mat[REF_INPUT_OUTPUT][0], timestamp, duration );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user