Commit 9c13b84e authored by marina.kolpakova's avatar marina.kolpakova

fixed unused warnings

parent 66eb96d7
...@@ -1607,6 +1607,7 @@ GPU_PERF_TEST(Norm, cv::gpu::DeviceInfo, cv::Size, MatDepth, NormType) ...@@ -1607,6 +1607,7 @@ GPU_PERF_TEST(Norm, cv::gpu::DeviceInfo, cv::Size, MatDepth, NormType)
{ {
dst = cv::gpu::norm(src, normType, buf); dst = cv::gpu::norm(src, normType, buf);
} }
(void)dst;
} }
INSTANTIATE_TEST_CASE_P(Core, Norm, testing::Combine( INSTANTIATE_TEST_CASE_P(Core, Norm, testing::Combine(
...@@ -1642,6 +1643,7 @@ GPU_PERF_TEST(NormDiff, cv::gpu::DeviceInfo, cv::Size, NormType) ...@@ -1642,6 +1643,7 @@ GPU_PERF_TEST(NormDiff, cv::gpu::DeviceInfo, cv::Size, NormType)
{ {
dst = cv::gpu::norm(src1, src2, normType); dst = cv::gpu::norm(src1, src2, normType);
} }
(void)dst;
} }
INSTANTIATE_TEST_CASE_P(Core, NormDiff, testing::Combine( INSTANTIATE_TEST_CASE_P(Core, NormDiff, testing::Combine(
...@@ -1829,6 +1831,7 @@ GPU_PERF_TEST(CountNonZero, cv::gpu::DeviceInfo, cv::Size, MatDepth) ...@@ -1829,6 +1831,7 @@ GPU_PERF_TEST(CountNonZero, cv::gpu::DeviceInfo, cv::Size, MatDepth)
{ {
dst = cv::gpu::countNonZero(src, buf); dst = cv::gpu::countNonZero(src, buf);
} }
(void)dst;
} }
INSTANTIATE_TEST_CASE_P(Core, CountNonZero, testing::Combine( INSTANTIATE_TEST_CASE_P(Core, CountNonZero, testing::Combine(
......
...@@ -1229,6 +1229,7 @@ GPU_PERF_TEST(Norm, cv::gpu::DeviceInfo, cv::Size, MatDepth, NormType) ...@@ -1229,6 +1229,7 @@ GPU_PERF_TEST(Norm, cv::gpu::DeviceInfo, cv::Size, MatDepth, NormType)
{ {
dst = cv::norm(src, normType); dst = cv::norm(src, normType);
} }
(void)dst;
} }
INSTANTIATE_TEST_CASE_P(Core, Norm, testing::Combine( INSTANTIATE_TEST_CASE_P(Core, Norm, testing::Combine(
...@@ -1259,6 +1260,7 @@ GPU_PERF_TEST(NormDiff, cv::gpu::DeviceInfo, cv::Size, NormType) ...@@ -1259,6 +1260,7 @@ GPU_PERF_TEST(NormDiff, cv::gpu::DeviceInfo, cv::Size, NormType)
{ {
dst = cv::norm(src1, src2, normType); dst = cv::norm(src1, src2, normType);
} }
(void)dst;
} }
INSTANTIATE_TEST_CASE_P(Core, NormDiff, testing::Combine( INSTANTIATE_TEST_CASE_P(Core, NormDiff, testing::Combine(
...@@ -1338,6 +1340,7 @@ GPU_PERF_TEST(CountNonZero, cv::gpu::DeviceInfo, cv::Size, MatDepth) ...@@ -1338,6 +1340,7 @@ GPU_PERF_TEST(CountNonZero, cv::gpu::DeviceInfo, cv::Size, MatDepth)
{ {
dst = cv::countNonZero(src); dst = cv::countNonZero(src);
} }
(void)dst;
} }
INSTANTIATE_TEST_CASE_P(Core, CountNonZero, testing::Combine( INSTANTIATE_TEST_CASE_P(Core, CountNonZero, testing::Combine(
......
...@@ -214,6 +214,7 @@ void cv::gpu::solvePnPRansac(const Mat& object, const Mat& image, const Mat& cam ...@@ -214,6 +214,7 @@ void cv::gpu::solvePnPRansac(const Mat& object, const Mat& image, const Mat& cam
int num_iters, float max_dist, int min_inlier_count, int num_iters, float max_dist, int min_inlier_count,
vector<int>* inliers) vector<int>* inliers)
{ {
(void)min_inlier_count;
CV_Assert(object.rows == 1 && object.cols > 0 && object.type() == CV_32FC3); CV_Assert(object.rows == 1 && object.cols > 0 && object.type() == CV_32FC3);
CV_Assert(image.rows == 1 && image.cols > 0 && image.type() == CV_32FC2); CV_Assert(image.rows == 1 && image.cols > 0 && image.type() == CV_32FC2);
CV_Assert(object.cols == image.cols); CV_Assert(object.cols == image.cols);
......
...@@ -143,7 +143,7 @@ public: ...@@ -143,7 +143,7 @@ public:
} }
unsigned int process(const GpuMat& image, GpuMat& objectsBuf, float scaleFactor, int minNeighbors, unsigned int process(const GpuMat& image, GpuMat& objectsBuf, float scaleFactor, int minNeighbors,
bool findLargestObject, bool visualizeInPlace, cv::Size minSize, cv::Size maxObjectSize) bool findLargestObject, bool visualizeInPlace, cv::Size minSize, cv::Size /*maxObjectSize*/)
{ {
CV_Assert( scaleFactor > 1 && image.depth() == CV_8U); CV_Assert( scaleFactor > 1 && image.depth() == CV_8U);
...@@ -380,12 +380,12 @@ public: ...@@ -380,12 +380,12 @@ public:
LbpCascade(){} LbpCascade(){}
virtual ~LbpCascade(){} virtual ~LbpCascade(){}
virtual unsigned int process(const GpuMat& image, GpuMat& objects, float scaleFactor, int groupThreshold, bool findLargestObject, virtual unsigned int process(const GpuMat& image, GpuMat& objects, float scaleFactor, int groupThreshold, bool /*findLargestObject*/,
bool visualizeInPlace, cv::Size minObjectSize, cv::Size maxObjectSize) bool /*visualizeInPlace*/, cv::Size minObjectSize, cv::Size maxObjectSize)
{ {
CV_Assert(scaleFactor > 1 && image.depth() == CV_8U); CV_Assert(scaleFactor > 1 && image.depth() == CV_8U);
const int defaultObjSearchNum = 100; // const int defaultObjSearchNum = 100;
const float grouping_eps = 0.2f; const float grouping_eps = 0.2f;
if( !objects.empty() && objects.depth() == CV_32S) if( !objects.empty() && objects.depth() == CV_32S)
......
...@@ -227,6 +227,7 @@ namespace ...@@ -227,6 +227,7 @@ namespace
void matchTemplate_SQDIFF_32F( void matchTemplate_SQDIFF_32F(
const GpuMat& image, const GpuMat& templ, GpuMat& result, MatchTemplateBuf &buf, Stream& stream) const GpuMat& image, const GpuMat& templ, GpuMat& result, MatchTemplateBuf &buf, Stream& stream)
{ {
(void)buf;
result.create(image.rows - templ.rows + 1, image.cols - templ.cols + 1, CV_32F); result.create(image.rows - templ.rows + 1, image.cols - templ.cols + 1, CV_32F);
matchTemplateNaive_SQDIFF_32F(image, templ, result, image.channels(), StreamAccessor::getStream(stream)); matchTemplateNaive_SQDIFF_32F(image, templ, result, image.channels(), StreamAccessor::getStream(stream));
} }
......
...@@ -119,7 +119,6 @@ namespace ...@@ -119,7 +119,6 @@ namespace
int depth = src.depth(); int depth = src.depth();
int num_channels = src.channels(); int num_channels = src.channels();
Size size = src.size();
if (depth == CV_64F) if (depth == CV_64F)
{ {
......
...@@ -351,21 +351,22 @@ TEST_P(LBP_classify, Accuracy) ...@@ -351,21 +351,22 @@ TEST_P(LBP_classify, Accuracy)
cv::gpu::GpuMat tested(grey); cv::gpu::GpuMat tested(grey);
int count = gpuClassifier.detectMultiScale(tested, gpu_rects); int count = gpuClassifier.detectMultiScale(tested, gpu_rects);
#if defined (LOG_CASCADE_STATISTIC)
cv::Mat downloaded(gpu_rects); cv::Mat downloaded(gpu_rects);
const cv::Rect* faces = downloaded.ptr<cv::Rect>(); const cv::Rect* faces = downloaded.ptr<cv::Rect>();
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
cv::Rect r = faces[i]; cv::Rect r = faces[i];
#if defined (LOG_CASCADE_STATISTIC)
std::cout << r.x << " " << r.y << " " << r.width << " " << r.height << std::endl; std::cout << r.x << " " << r.y << " " << r.width << " " << r.height << std::endl;
cv::rectangle(markedImage, r , CV_RGB(255, 0, 0)); cv::rectangle(markedImage, r , CV_RGB(255, 0, 0));
#endif
} }
#endif
#if defined (LOG_CASCADE_STATISTIC) #if defined (LOG_CASCADE_STATISTIC)
cv::imshow("Res", markedImage); cv::waitKey(); cv::imshow("Res", markedImage); cv::waitKey();
#endif #endif
(void)count;
} }
INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, LBP_classify, INSTANTIATE_TEST_CASE_P(GPU_ObjDetect, LBP_classify,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment