mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 13:10:12 +08:00
warnings, renamed Marina's GPU_PERF_TEST_P
This commit is contained in:
parent
be22891f71
commit
389ecbe96d
@ -81,8 +81,8 @@ GPU_PERF_TEST_P(Image, HoughLinesP, testing::Values(std::string("im1_1280x800.jp
|
||||
|
||||
std::string fileName = GetParam();
|
||||
|
||||
const double rho = 1.0;
|
||||
const double theta = 1.0;
|
||||
const float rho = 1.f;
|
||||
const float theta = 1.f;
|
||||
const int threshold = 40;
|
||||
const int minLineLenght = 20;
|
||||
const int maxLineGap = 5;
|
||||
|
@ -1805,8 +1805,8 @@ PERF_TEST_P(Image, ImgProc_HoughLinesP, testing::Values("cv/shared/pic5.png", "s
|
||||
|
||||
std::string fileName = getDataPath(GetParam());
|
||||
|
||||
const double rho = 1.0f;
|
||||
const double theta = CV_PI / 180.0;
|
||||
const float rho = 1.0f;
|
||||
const float theta = static_cast<float>(CV_PI / 180.0);
|
||||
const int threshold = 100;
|
||||
const int minLineLenght = 50;
|
||||
const int maxLineGap = 5;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
#define GPU_PERF_TEST_P(fixture, name, params) \
|
||||
#define PERF_TEST_P1(fixture, name, params) \
|
||||
class fixture##_##name : public fixture {\
|
||||
public:\
|
||||
fixture##_##name() {}\
|
||||
@ -52,7 +52,7 @@ namespace {
|
||||
typedef std::tr1::tuple<std::string, std::string> fixture_t;
|
||||
typedef perf::TestBaseWithParam<fixture_t> SCascadeTest;
|
||||
|
||||
GPU_PERF_TEST_P(SCascadeTest, detect,
|
||||
PERF_TEST_P1(SCascadeTest, detect,
|
||||
testing::Combine(
|
||||
testing::Values(std::string("cv/cascadeandhog/sc_cvpr_2012_to_opencv.xml")),
|
||||
testing::Values(std::string("cv/cascadeandhog/bahnhof/image_00000000_0.png"))))
|
||||
@ -108,7 +108,7 @@ static cv::Rect getFromTable(int idx)
|
||||
typedef std::tr1::tuple<std::string, std::string, int> roi_fixture_t;
|
||||
typedef perf::TestBaseWithParam<roi_fixture_t> SCascadeTestRoi;
|
||||
|
||||
GPU_PERF_TEST_P(SCascadeTestRoi, detectInRoi,
|
||||
PERF_TEST_P1(SCascadeTestRoi, detectInRoi,
|
||||
testing::Combine(
|
||||
testing::Values(std::string("cv/cascadeandhog/sc_cvpr_2012_to_opencv.xml")),
|
||||
testing::Values(std::string("cv/cascadeandhog/bahnhof/image_00000000_0.png")),
|
||||
@ -152,7 +152,7 @@ RUN_GPU(SCascadeTestRoi, detectInRoi)
|
||||
NO_CPU(SCascadeTestRoi, detectInRoi)
|
||||
|
||||
|
||||
GPU_PERF_TEST_P(SCascadeTestRoi, detectEachRoi,
|
||||
PERF_TEST_P1(SCascadeTestRoi, detectEachRoi,
|
||||
testing::Combine(
|
||||
testing::Values(std::string("cv/cascadeandhog/sc_cvpr_2012_to_opencv.xml")),
|
||||
testing::Values(std::string("cv/cascadeandhog/bahnhof/image_00000000_0.png")),
|
||||
@ -191,7 +191,7 @@ RUN_GPU(SCascadeTestRoi, detectEachRoi)
|
||||
|
||||
NO_CPU(SCascadeTestRoi, detectEachRoi)
|
||||
|
||||
GPU_PERF_TEST_P(SCascadeTest, detectOnIntegral,
|
||||
PERF_TEST_P1(SCascadeTest, detectOnIntegral,
|
||||
testing::Combine(
|
||||
testing::Values(std::string("cv/cascadeandhog/sc_cvpr_2012_to_opencv.xml")),
|
||||
testing::Values(std::string("cv/cascadeandhog/integrals.xml"))))
|
||||
@ -239,7 +239,7 @@ RUN_GPU(SCascadeTest, detectOnIntegral)
|
||||
|
||||
NO_CPU(SCascadeTest, detectOnIntegral)
|
||||
|
||||
GPU_PERF_TEST_P(SCascadeTest, detectStream,
|
||||
PERF_TEST_P1(SCascadeTest, detectStream,
|
||||
testing::Combine(
|
||||
testing::Values(std::string("cv/cascadeandhog/sc_cvpr_2012_to_opencv.xml")),
|
||||
testing::Values(std::string("cv/cascadeandhog/bahnhof/image_00000000_0.png"))))
|
||||
|
@ -276,8 +276,8 @@ struct cv::gpu::SCascade::Fields
|
||||
int dcs = 0;
|
||||
for (int sc = 0; sc < totals; ++sc)
|
||||
{
|
||||
int width = ::std::max(0.0f, fw - (origObjWidth * scale));
|
||||
int height = ::std::max(0.0f, fh - (origObjHeight * scale));
|
||||
int width = (int)::std::max(0.0f, fw - (origObjWidth * scale));
|
||||
int height = (int)::std::max(0.0f, fh - (origObjHeight * scale));
|
||||
|
||||
float logScale = ::log(scale);
|
||||
int fit = fitOctave(voctaves, logScale);
|
||||
@ -457,7 +457,7 @@ cv::gpu::SCascade::~SCascade() { delete fields; }
|
||||
bool cv::gpu::SCascade::load(const FileNode& fn)
|
||||
{
|
||||
if (fields) delete fields;
|
||||
fields = Fields::parseCascade(fn, minScale, maxScale, scales, flags);
|
||||
fields = Fields::parseCascade(fn, (float)minScale, (float)maxScale, scales, flags);
|
||||
return fields != 0;
|
||||
}
|
||||
|
||||
@ -488,7 +488,7 @@ void cv::gpu::SCascade::detect(InputArray _image, InputArray _rois, OutputArray
|
||||
{
|
||||
flds.update(image.rows, image.cols, flds.shrinkage);
|
||||
|
||||
if (flds.check(minScale, maxScale, scales))
|
||||
if (flds.check((float)minScale, (float)maxScale, scales))
|
||||
flds.createLevels(image.rows, image.cols);
|
||||
|
||||
flds.preprocessor->apply(image, flds.shrunk);
|
||||
@ -672,4 +672,4 @@ cv::Ptr<cv::gpu::ChannelsProcessor> cv::gpu::ChannelsProcessor::create(const int
|
||||
cv::gpu::ChannelsProcessor::ChannelsProcessor() { }
|
||||
cv::gpu::ChannelsProcessor::~ChannelsProcessor() { }
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -98,7 +98,8 @@ int main(int argc, char** argv)
|
||||
|
||||
std::cout << "working..." << std::endl;
|
||||
cv::imshow("Soft Cascade demo", result);
|
||||
cv::waitKey(10);
|
||||
if (27 == cv::waitKey(10))
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user