createLineSegmentDetectorPtr -> createLineSegmentDetector in tests and samples
authorAlexander Mordvintsev <Alexander.Mordvintsev@transas.com>
Thu, 19 Sep 2013 15:06:48 +0000 (19:06 +0400)
committerVadim Pisarevsky <vadim.pisarevsky@gmail.com>
Mon, 30 Sep 2013 10:30:01 +0000 (14:30 +0400)
modules/imgproc/test/test_lsd.cpp
samples/cpp/lsd_lines.cpp

index 7d8b7f2..82f5b0b 100644 (file)
@@ -110,7 +110,7 @@ TEST_F(Imgproc_LSD_ADV, whiteNoise)
     for (int i = 0; i < EPOCHS; ++i)
     {
         GenerateWhiteNoise(test_image);
-        Ptr<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_ADV);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_STD);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_STD);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_STD);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_STD);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_STD);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_NONE);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_NONE);
+        Ptr<LineSegmentDetector> 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<LineSegmentDetector> detector = createLineSegmentDetectorPtr(LSD_REFINE_NONE);
+        Ptr<LineSegmentDetector> detector = createLineSegmentDetector(LSD_REFINE_NONE);
         detector->detect(test_image, lines);
 
         if(8u <= lines.size()) ++passedtests;
index 62692f7..92452a9 100644 (file)
@@ -30,9 +30,9 @@ int main(int argc, char** argv)
 
     // Create and LSD detector with standard or no refinement.
 #if 1
-    Ptr<LineSegmentDetector> ls = createLineSegmentDetectorPtr(LSD_REFINE_STD);
+    Ptr<LineSegmentDetector> ls = createLineSegmentDetector(LSD_REFINE_STD);
 #else
-    Ptr<LineSegmentDetector> ls = createLineSegmentDetectorPtr(LSD_REFINE_NONE);
+    Ptr<LineSegmentDetector> ls = createLineSegmentDetector(LSD_REFINE_NONE);
 #endif
 
     double start = double(getTickCount());