Merge pull request #13188 from alalek:samples_rename
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Fri, 16 Nov 2018 21:35:05 +0000 (00:35 +0300)
committerGitHub <noreply@github.com>
Fri, 16 Nov 2018 21:35:05 +0000 (00:35 +0300)
* samples: rename starter_imagelist.cpp

* samples: rename intelperc_capture.cpp => videocapture_intelperc.cpp

* samples: rename openni_capture.cpp => videocapture_openni.cpp

* samples: rename image_sequence.cpp => videocapture_image_sequence.cpp

* samples: rename gstreamer_pipeline.cpp => videocapture_gstreamer_pipeline.cpp

* samples: rename autofocus.cpp => videocapture_gphoto2_autofocus.cpp

* samples: rename live_detect_qrcode.cpp => qrcode.cpp

doc/tutorials/videoio/intelperc.markdown
doc/tutorials/videoio/kinect_openni.markdown
samples/cpp/imagelist_reader.cpp [moved from samples/cpp/starter_imagelist.cpp with 87% similarity]
samples/cpp/qrcode.cpp [moved from samples/cpp/live_detect_qrcode.cpp with 100% similarity]
samples/cpp/videocapture_gphoto2_autofocus.cpp [moved from samples/cpp/autofocus.cpp with 100% similarity]
samples/cpp/videocapture_gstreamer_pipeline.cpp [moved from samples/cpp/gstreamer_pipeline.cpp with 100% similarity]
samples/cpp/videocapture_image_sequence.cpp [moved from samples/cpp/image_sequence.cpp with 100% similarity]
samples/cpp/videocapture_intelperc.cpp [moved from samples/cpp/intelperc_capture.cpp with 99% similarity]
samples/cpp/videocapture_openni.cpp [moved from samples/cpp/openni_capture.cpp with 100% similarity]

index 932d78b..4822c41 100644 (file)
@@ -78,5 +78,5 @@ there are two flags that should be used to set/get property of the needed genera
     flag value is assumed by default if neither of the two possible values of the property is set.
 
 For more information please refer to the example of usage
-[intelperc_capture.cpp](https://github.com/opencv/opencv/tree/3.4/samples/cpp/intelperc_capture.cpp)
+[videocapture_intelperc.cpp](https://github.com/opencv/opencv/tree/3.4/samples/cpp/videocapture_intelperc.cpp)
 in opencv/samples/cpp folder.
index e8b7ad5..32cc995 100644 (file)
@@ -134,5 +134,5 @@ property. The following properties of cameras available through OpenNI interface
     -   CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_REGISTRATION
 
 For more information please refer to the example of usage
-[openni_capture.cpp](https://github.com/opencv/opencv/tree/3.4/samples/cpp/openni_capture.cpp) in
+[videocapture_openni.cpp](https://github.com/opencv/opencv/tree/3.4/samples/cpp/videocapture_openni.cpp) in
 opencv/samples/cpp folder.
similarity index 87%
rename from samples/cpp/starter_imagelist.cpp
rename to samples/cpp/imagelist_reader.cpp
index 6f4f714..1d209b9 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * starter_imagelist.cpp
- *
  *  Created on: Nov 23, 2010
  *      Author: Ethan Rublee
  *
 using namespace cv;
 using namespace std;
 
-//hide the local functions in an unnamed namespace
-namespace
-{
-void help(char** av)
+static void help(char** av)
 {
   cout << "\nThis program gets you started being able to read images from a list in a file\n"
           "Usage:\n./" << av[0] << " image_list.yaml\n"
@@ -30,7 +25,7 @@ void help(char** av)
         "Using OpenCV version %s\n" << CV_VERSION << "\n" << endl;
 }
 
-bool readStringList(const string& filename, vector<string>& l)
+static bool readStringList(const string& filename, vector<string>& l)
 {
   l.resize(0);
   FileStorage fs(filename, FileStorage::READ);
@@ -45,7 +40,7 @@ bool readStringList(const string& filename, vector<string>& l)
   return true;
 }
 
-int process(vector<string> images)
+static int process(const vector<string>& images)
 {
     namedWindow("image", WINDOW_KEEPRATIO); //resizable window;
     for (size_t i = 0; i < images.size(); i++)
@@ -53,13 +48,11 @@ int process(vector<string> images)
         Mat image = imread(images[i], IMREAD_GRAYSCALE); // do grayscale processing?
         imshow("image",image);
         cout << "Press a key to see the next image in the list." << endl;
-        waitKey(); // wait indefinitely for a key to be pressed
+        waitKey(); // wait infinitely for a key to be pressed
     }
     return 0;
 }
 
-}
-
 int main(int ac, char** av)
 {
   cv::CommandLineParser parser(ac, av, "{help h||}{@input||}");
similarity index 99%
rename from samples/cpp/intelperc_capture.cpp
rename to samples/cpp/videocapture_intelperc.cpp
index b6e6674..7ac3a7c 100644 (file)
@@ -1,6 +1,3 @@
-// testOpenCVCam.cpp : Defines the entry point for the console application.
-//
-
 #include "opencv2/videoio.hpp"
 #include "opencv2/highgui.hpp"