From 20fe614c2f97cb75d7103a7290aeeed33e176656 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Thu, 19 Sep 2013 19:06:48 +0400 Subject: [PATCH] createLineSegmentDetectorPtr -> createLineSegmentDetector in tests and samples --- modules/imgproc/test/test_lsd.cpp | 24 ++++++++++++------------ samples/cpp/lsd_lines.cpp | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/imgproc/test/test_lsd.cpp b/modules/imgproc/test/test_lsd.cpp index 7d8b7f2..82f5b0b 100644 --- a/modules/imgproc/test/test_lsd.cpp +++ b/modules/imgproc/test/test_lsd.cpp @@ -110,7 +110,7 @@ TEST_F(Imgproc_LSD_ADV, whiteNoise) for (int i = 0; i < EPOCHS; ++i) { GenerateWhiteNoise(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV); + Ptr detector = createLineSegmentDetector(LSD_REFINE_ADV); detector->detect(test_image, lines); if(40u >= lines.size()) ++passedtests; @@ -123,7 +123,7 @@ TEST_F(Imgproc_LSD_ADV, constColor) for (int i = 0; i < EPOCHS; ++i) { GenerateConstColor(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV); + Ptr detector = createLineSegmentDetector(LSD_REFINE_ADV); detector->detect(test_image, lines); if(0u == lines.size()) ++passedtests; @@ -137,7 +137,7 @@ TEST_F(Imgproc_LSD_ADV, lines) { const unsigned int numOfLines = 1; GenerateLines(test_image, numOfLines); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV); + Ptr detector = createLineSegmentDetector(LSD_REFINE_ADV); detector->detect(test_image, lines); if(numOfLines * 2 == lines.size()) ++passedtests; // * 2 because of Gibbs effect @@ -150,7 +150,7 @@ TEST_F(Imgproc_LSD_ADV, rotatedRect) for (int i = 0; i < EPOCHS; ++i) { GenerateRotatedRect(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV); + Ptr detector = createLineSegmentDetector(LSD_REFINE_ADV); detector->detect(test_image, lines); if(2u <= lines.size()) ++passedtests; @@ -163,7 +163,7 @@ TEST_F(Imgproc_LSD_STD, whiteNoise) for (int i = 0; i < EPOCHS; ++i) { GenerateWhiteNoise(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_STD); + Ptr detector = createLineSegmentDetector(LSD_REFINE_STD); detector->detect(test_image, lines); if(50u >= lines.size()) ++passedtests; @@ -176,7 +176,7 @@ TEST_F(Imgproc_LSD_STD, constColor) for (int i = 0; i < EPOCHS; ++i) { GenerateConstColor(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_STD); + Ptr detector = createLineSegmentDetector(LSD_REFINE_STD); detector->detect(test_image, lines); if(0u == lines.size()) ++passedtests; @@ -190,7 +190,7 @@ TEST_F(Imgproc_LSD_STD, lines) { const unsigned int numOfLines = 1; GenerateLines(test_image, numOfLines); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_STD); + Ptr detector = createLineSegmentDetector(LSD_REFINE_STD); detector->detect(test_image, lines); if(numOfLines * 2 == lines.size()) ++passedtests; // * 2 because of Gibbs effect @@ -203,7 +203,7 @@ TEST_F(Imgproc_LSD_STD, rotatedRect) for (int i = 0; i < EPOCHS; ++i) { GenerateRotatedRect(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_STD); + Ptr detector = createLineSegmentDetector(LSD_REFINE_STD); detector->detect(test_image, lines); if(4u <= lines.size()) ++passedtests; @@ -216,7 +216,7 @@ TEST_F(Imgproc_LSD_NONE, whiteNoise) for (int i = 0; i < EPOCHS; ++i) { GenerateWhiteNoise(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_STD); + Ptr detector = createLineSegmentDetector(LSD_REFINE_STD); detector->detect(test_image, lines); if(50u >= lines.size()) ++passedtests; @@ -229,7 +229,7 @@ TEST_F(Imgproc_LSD_NONE, constColor) for (int i = 0; i < EPOCHS; ++i) { GenerateConstColor(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_NONE); + Ptr detector = createLineSegmentDetector(LSD_REFINE_NONE); detector->detect(test_image, lines); if(0u == lines.size()) ++passedtests; @@ -243,7 +243,7 @@ TEST_F(Imgproc_LSD_NONE, lines) { const unsigned int numOfLines = 1; GenerateLines(test_image, numOfLines); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_NONE); + Ptr detector = createLineSegmentDetector(LSD_REFINE_NONE); detector->detect(test_image, lines); if(numOfLines * 2 == lines.size()) ++passedtests; // * 2 because of Gibbs effect @@ -256,7 +256,7 @@ TEST_F(Imgproc_LSD_NONE, rotatedRect) for (int i = 0; i < EPOCHS; ++i) { GenerateRotatedRect(test_image); - Ptr detector = createLineSegmentDetectorPtr(LSD_REFINE_NONE); + Ptr detector = createLineSegmentDetector(LSD_REFINE_NONE); detector->detect(test_image, lines); if(8u <= lines.size()) ++passedtests; diff --git a/samples/cpp/lsd_lines.cpp b/samples/cpp/lsd_lines.cpp index 62692f7..92452a9 100644 --- a/samples/cpp/lsd_lines.cpp +++ b/samples/cpp/lsd_lines.cpp @@ -30,9 +30,9 @@ int main(int argc, char** argv) // Create and LSD detector with standard or no refinement. #if 1 - Ptr ls = createLineSegmentDetectorPtr(LSD_REFINE_STD); + Ptr ls = createLineSegmentDetector(LSD_REFINE_STD); #else - Ptr ls = createLineSegmentDetectorPtr(LSD_REFINE_NONE); + Ptr ls = createLineSegmentDetector(LSD_REFINE_NONE); #endif double start = double(getTickCount()); -- 2.7.4