Fixed number of warnings. Fixed mingw64 build.
This commit is contained in:
@@ -1702,15 +1702,7 @@ class CV_EXPORTS GoodFeaturesToTrackDetector_GPU
|
||||
{
|
||||
public:
|
||||
explicit GoodFeaturesToTrackDetector_GPU(int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 0.0,
|
||||
int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04)
|
||||
{
|
||||
this->maxCorners = maxCorners;
|
||||
this->qualityLevel = qualityLevel;
|
||||
this->minDistance = minDistance;
|
||||
this->blockSize = blockSize;
|
||||
this->useHarrisDetector = useHarrisDetector;
|
||||
this->harrisK = harrisK;
|
||||
}
|
||||
int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04);
|
||||
|
||||
//! return 1 rows matrix with CV_32FC2 type
|
||||
void operator ()(const GpuMat& image, GpuMat& corners, const GpuMat& mask = GpuMat());
|
||||
@@ -1742,6 +1734,18 @@ private:
|
||||
GpuMat tmpCorners_;
|
||||
};
|
||||
|
||||
inline GoodFeaturesToTrackDetector_GPU::GoodFeaturesToTrackDetector_GPU(int maxCorners_, double qualityLevel_, double minDistance_,
|
||||
int blockSize_, bool useHarrisDetector_, double harrisK_)
|
||||
{
|
||||
maxCorners = maxCorners_;
|
||||
qualityLevel = qualityLevel_;
|
||||
minDistance = minDistance_;
|
||||
blockSize = blockSize_;
|
||||
useHarrisDetector = useHarrisDetector_;
|
||||
harrisK = harrisK_;
|
||||
}
|
||||
|
||||
|
||||
class CV_EXPORTS PyrLKOpticalFlow
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -57,7 +57,7 @@ void cv::gpu::VideoReader_GPU::open(const cv::Ptr<VideoSource>&) { throw_nogpu()
|
||||
bool cv::gpu::VideoReader_GPU::isOpened() const { return false; }
|
||||
void cv::gpu::VideoReader_GPU::close() { }
|
||||
bool cv::gpu::VideoReader_GPU::read(GpuMat&) { throw_nogpu(); return false; }
|
||||
cv::gpu::VideoReader_GPU::FormatInfo cv::gpu::VideoReader_GPU::format() const { throw_nogpu(); FormatInfo format = {MPEG1,Monochrome,0,0}; return format; }
|
||||
cv::gpu::VideoReader_GPU::FormatInfo cv::gpu::VideoReader_GPU::format() const { throw_nogpu(); FormatInfo format_ = {MPEG1,Monochrome,0,0}; return format_; }
|
||||
bool cv::gpu::VideoReader_GPU::VideoSource::parseVideoData(const unsigned char*, size_t, bool) { throw_nogpu(); return false; }
|
||||
void cv::gpu::VideoReader_GPU::dumpFormat(std::ostream&) { throw_nogpu(); }
|
||||
|
||||
|
||||
@@ -513,7 +513,6 @@ PARAM_TEST_CASE(Filter2D, cv::gpu::DeviceInfo, cv::Size, MatType, KSize, Anchor,
|
||||
bool useRoi;
|
||||
|
||||
cv::Mat img;
|
||||
cv::Mat kernel;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
|
||||
@@ -150,8 +150,6 @@ PARAM_TEST_CASE(CalcHist, cv::gpu::DeviceInfo, cv::Size)
|
||||
cv::gpu::DeviceInfo devInfo;
|
||||
|
||||
cv::Size size;
|
||||
cv::Mat src;
|
||||
cv::Mat hist_gold;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
@@ -202,7 +200,7 @@ TEST_P(EqualizeHist, Accuracy)
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::equalizeHist(loadMat(src), dst);
|
||||
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::equalizeHist(src, dst_gold);
|
||||
|
||||
@@ -221,8 +219,6 @@ PARAM_TEST_CASE(ColumnSum, cv::gpu::DeviceInfo, cv::Size)
|
||||
cv::gpu::DeviceInfo devInfo;
|
||||
cv::Size size;
|
||||
|
||||
cv::Mat src;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
devInfo = GET_PARAM(0);
|
||||
@@ -276,8 +272,6 @@ PARAM_TEST_CASE(Canny, cv::gpu::DeviceInfo, AppertureSize, L2gradient, UseRoi)
|
||||
bool useL2gradient;
|
||||
bool useRoi;
|
||||
|
||||
cv::Mat edges_gold;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
devInfo = GET_PARAM(0);
|
||||
@@ -361,7 +355,7 @@ TEST_P(MeanShift, Filtering)
|
||||
else
|
||||
img_template = readImage("meanshift/con_result_CC1X.png");
|
||||
ASSERT_FALSE(img_template.empty());
|
||||
|
||||
|
||||
cv::gpu::GpuMat d_dst;
|
||||
cv::gpu::meanShiftFiltering(loadMat(img), d_dst, spatialRad, colorRad);
|
||||
|
||||
@@ -396,7 +390,7 @@ TEST_P(MeanShift, Proc)
|
||||
cv::gpu::meanShiftProc(loadMat(img), rmap, spmap, spatialRad, colorRad);
|
||||
|
||||
ASSERT_EQ(CV_8UC4, rmap.type());
|
||||
|
||||
|
||||
EXPECT_MAT_NEAR(rmap_filtered, rmap, 0.0);
|
||||
EXPECT_MAT_NEAR(spmap_template, spmap, 0.0);
|
||||
}
|
||||
@@ -573,11 +567,6 @@ PARAM_TEST_CASE(Convolve, cv::gpu::DeviceInfo, cv::Size, KSize, Ccorr)
|
||||
int ksize;
|
||||
bool ccorr;
|
||||
|
||||
cv::Mat src;
|
||||
cv::Mat kernel;
|
||||
|
||||
cv::Mat dst_gold;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
devInfo = GET_PARAM(0);
|
||||
@@ -596,7 +585,7 @@ TEST_P(Convolve, Accuracy)
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::convolve(loadMat(src), loadMat(kernel), dst, ccorr);
|
||||
|
||||
|
||||
cv::Mat dst_gold;
|
||||
convolveDFT(src, kernel, dst_gold, ccorr);
|
||||
|
||||
@@ -670,9 +659,6 @@ PARAM_TEST_CASE(MatchTemplate32F, cv::gpu::DeviceInfo, cv::Size, TemplateSize, C
|
||||
int method;
|
||||
|
||||
int n, m, h, w;
|
||||
cv::Mat image, templ;
|
||||
|
||||
cv::Mat dst_gold;
|
||||
|
||||
virtual void SetUp()
|
||||
{
|
||||
@@ -1080,7 +1066,7 @@ TEST_P(CornerHarris, Accuracy)
|
||||
|
||||
cv::gpu::GpuMat dst;
|
||||
cv::gpu::cornerHarris(loadMat(src), dst, blockSize, apertureSize, k, borderType);
|
||||
|
||||
|
||||
cv::Mat dst_gold;
|
||||
cv::cornerHarris(src, dst_gold, blockSize, apertureSize, k, borderType);
|
||||
|
||||
|
||||
@@ -69,16 +69,16 @@ struct HOG : testing::TestWithParam<cv::gpu::DeviceInfo>, cv::gpu::HOGDescriptor
|
||||
}
|
||||
|
||||
#ifdef DUMP
|
||||
void dump(const cv::Mat& block_hists, const std::vector<cv::Point>& locations)
|
||||
void dump(const cv::Mat& blockHists, const std::vector<cv::Point>& locations)
|
||||
{
|
||||
f.write((char*)&block_hists.rows, sizeof(block_hists.rows));
|
||||
f.write((char*)&block_hists.cols, sizeof(block_hists.cols));
|
||||
f.write((char*)&blockHists.rows, sizeof(blockHists.rows));
|
||||
f.write((char*)&blockHists.cols, sizeof(blockHists.cols));
|
||||
|
||||
for (int i = 0; i < block_hists.rows; ++i)
|
||||
for (int i = 0; i < blockHists.rows; ++i)
|
||||
{
|
||||
for (int j = 0; j < block_hists.cols; ++j)
|
||||
for (int j = 0; j < blockHists.cols; ++j)
|
||||
{
|
||||
float val = block_hists.at<float>(i, j);
|
||||
float val = blockHists.at<float>(i, j);
|
||||
f.write((char*)&val, sizeof(val));
|
||||
}
|
||||
}
|
||||
@@ -90,21 +90,21 @@ struct HOG : testing::TestWithParam<cv::gpu::DeviceInfo>, cv::gpu::HOGDescriptor
|
||||
f.write((char*)&locations[i], sizeof(locations[i]));
|
||||
}
|
||||
#else
|
||||
void compare(const cv::Mat& block_hists, const std::vector<cv::Point>& locations)
|
||||
void compare(const cv::Mat& blockHists, const std::vector<cv::Point>& locations)
|
||||
{
|
||||
int rows, cols;
|
||||
f.read((char*)&rows, sizeof(rows));
|
||||
f.read((char*)&cols, sizeof(cols));
|
||||
ASSERT_EQ(rows, block_hists.rows);
|
||||
ASSERT_EQ(cols, block_hists.cols);
|
||||
ASSERT_EQ(rows, blockHists.rows);
|
||||
ASSERT_EQ(cols, blockHists.cols);
|
||||
|
||||
for (int i = 0; i < block_hists.rows; ++i)
|
||||
for (int i = 0; i < blockHists.rows; ++i)
|
||||
{
|
||||
for (int j = 0; j < block_hists.cols; ++j)
|
||||
for (int j = 0; j < blockHists.cols; ++j)
|
||||
{
|
||||
float val;
|
||||
f.read((char*)&val, sizeof(val));
|
||||
ASSERT_NEAR(val, block_hists.at<float>(i, j), 1e-3);
|
||||
ASSERT_NEAR(val, blockHists.at<float>(i, j), 1e-3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user