update cpp samples and tutorials
authorSuleyman TURKMEN <sturkmen@hotmail.com>
Mon, 15 Feb 2016 13:37:29 +0000 (15:37 +0200)
committerSuleyman TURKMEN <sturkmen@hotmail.com>
Sun, 26 Jun 2016 17:55:00 +0000 (20:55 +0300)
110 files changed:
samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp
samples/android/tutorial-2-mixedprocessing/jni/jni_part.cpp
samples/cpp/3calibration.cpp
samples/cpp/contours2.cpp
samples/cpp/convexhull.cpp
samples/cpp/cout_mat.cpp
samples/cpp/dbt_face_detection.cpp
samples/cpp/delaunay2.cpp
samples/cpp/facedetect.cpp
samples/cpp/facial_features.cpp
samples/cpp/fback.cpp
samples/cpp/ffilldemo.cpp
samples/cpp/filestorage.cpp
samples/cpp/fitellipse.cpp
samples/cpp/grabcut.cpp
samples/cpp/houghcircles.cpp
samples/cpp/houghlines.cpp
samples/cpp/image.cpp
samples/cpp/image_sequence.cpp
samples/cpp/imagelist_creator.cpp
samples/cpp/inpaint.cpp
samples/cpp/intelperc_capture.cpp
samples/cpp/kalman.cpp
samples/cpp/laplace.cpp
samples/cpp/letter_recog.cpp
samples/cpp/lkdemo.cpp
samples/cpp/lsd_lines.cpp
samples/cpp/minarea.cpp
samples/cpp/morphology2.cpp
samples/cpp/openni_capture.cpp
samples/cpp/pca.cpp
samples/cpp/phase_corr.cpp
samples/cpp/polar_transforms.cpp
samples/cpp/segment_objects.cpp
samples/cpp/squares.cpp
samples/cpp/starter_imagelist.cpp
samples/cpp/starter_video.cpp
samples/cpp/stereo_calib.cpp
samples/cpp/stereo_match.cpp
samples/cpp/tree_engine.cpp
samples/cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp
samples/cpp/tutorial_code/HighGUI/BasicLinearTransformsTrackbar.cpp
samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp
samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp
samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo2.cpp
samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
samples/cpp/tutorial_code/ImgProc/AddingImages.cpp
samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp
samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp
samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp
samples/cpp/tutorial_code/ImgProc/Pyramids.cpp
samples/cpp/tutorial_code/ImgProc/Smoothing.cpp
samples/cpp/tutorial_code/ImgProc/Threshold.cpp
samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/HoughLines_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp
samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp
samples/cpp/tutorial_code/ImgTrans/filter2D_demo.cpp
samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp
samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp
samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp
samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp
samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp
samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp
samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
samples/cpp/tutorial_code/TrackingMotion/cornerSubPix_Demo.cpp
samples/cpp/tutorial_code/TrackingMotion/goodFeaturesToTrack_Demo.cpp
samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp
samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/Utils.cpp
samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp
samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp
samples/cpp/tutorial_code/calib3d/stereoBM/SBM_Sample.cpp
samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp
samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp
samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp
samples/cpp/tutorial_code/imgcodecs/GDAL_IO/gdal-image.cpp
samples/cpp/tutorial_code/introduction/display_image/display_image.cpp
samples/cpp/tutorial_code/photo/decolorization/decolor.cpp
samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp
samples/cpp/tutorial_code/video/bg_sub.cpp
samples/cpp/tutorial_code/videoio/video-input-psnr-ssim/video-input-psnr-ssim.cpp
samples/cpp/tutorial_code/videoio/video-write/video-write.cpp
samples/gpu/alpha_comp.cpp
samples/gpu/cascadeclassifier.cpp
samples/gpu/driver_api_multi.cpp
samples/gpu/driver_api_stereo_multi.cpp
samples/gpu/multi.cpp
samples/gpu/opengl.cpp
samples/gpu/opticalflow_nvidia_api.cpp
samples/gpu/surf_keypoint_matcher.cpp
samples/tapi/camshift.cpp
samples/tapi/clahe.cpp
samples/tapi/squares.cpp
samples/tapi/tvl1_optical_flow.cpp
samples/winrt/FaceDetection/FaceDetection/MainPage.xaml.cpp
samples/winrt/ImageManipulations/MediaExtensions/OcvTransform/OcvTransform.cpp
samples/winrt/OcvImageProcessing/OcvImageProcessing/MainPage.xaml.cpp
samples/winrt_universal/PhoneTutorial/MainPage.xaml.cpp
samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/Direct3DInterop.cpp
samples/wp8/OpenCVXaml/OpenCVComponent/OpenCVComponent.cpp

index 9fd8494..7d198dc 100644 (file)
@@ -1,5 +1,5 @@
 #include <DetectionBasedTracker_jni.h>
-#include <opencv2/core/core.hpp>
+#include <opencv2/core.hpp>
 #include <opencv2/objdetect.hpp>
 
 #include <string>
index 2c09961..72fa0b2 100644 (file)
@@ -1,7 +1,7 @@
 #include <jni.h>
-#include <opencv2/core/core.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/features2d/features2d.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/features2d.hpp>
 #include <vector>
 
 using namespace std;
index 12f2c81..7079b6d 100644 (file)
@@ -2,10 +2,10 @@
  * 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
  */
 
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/imgcodecs/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/calib3d.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/imgcodecs.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/core/utility.hpp"
 
 #include <stdio.h>
index c5a1fa7..437f76c 100644 (file)
@@ -1,5 +1,5 @@
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
 #include <math.h>
 #include <iostream>
 
index 36e5544..fd22756 100644 (file)
@@ -1,6 +1,5 @@
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <fstream>
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
 #include <iostream>
 
 using namespace cv;
index bf1dfb2..ed2cd71 100644 (file)
@@ -5,7 +5,7 @@
  *
  */
 
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include <iostream>
 
 using namespace std;
index d7409bf..920ae00 100644 (file)
@@ -1,11 +1,11 @@
 #if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
 
-#include <opencv2/imgproc/imgproc.hpp>  // Gaussian Blur
-#include <opencv2/core/core.hpp>        // Basic OpenCV structures (cv::Mat, Scalar)
-#include <opencv2/videoio/videoio.hpp>
-#include <opencv2/highgui/highgui.hpp>  // OpenCV window I/O
-#include <opencv2/features2d/features2d.hpp>
-#include <opencv2/objdetect/objdetect.hpp>
+#include <opencv2/imgproc.hpp>  // Gaussian Blur
+#include <opencv2/core.hpp>        // Basic OpenCV structures (cv::Mat, Scalar)
+#include <opencv2/videoio.hpp>
+#include <opencv2/highgui.hpp>  // OpenCV window I/O
+#include <opencv2/features2d.hpp>
+#include <opencv2/objdetect.hpp>
 
 #include <stdio.h>
 #include <string>
index a370feb..4807cd3 100644 (file)
@@ -1,5 +1,5 @@
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/highgui.hpp>
 #include <iostream>
 
 using namespace cv;
index 39717b7..e9b648a 100644 (file)
@@ -177,7 +177,7 @@ void detectAndDraw( Mat& img, CascadeClassifier& cascade,
     resize( gray, smallImg, Size(), fx, fx, INTER_LINEAR );
     equalizeHist( smallImg, smallImg );
 
-    t = (double)cvGetTickCount();
+    t = (double)getTickCount();
     cascade.detectMultiScale( smallImg, faces,
         1.1, 2, 0
         //|CASCADE_FIND_BIGGEST_OBJECT
@@ -198,8 +198,8 @@ void detectAndDraw( Mat& img, CascadeClassifier& cascade,
             faces.push_back(Rect(smallImg.cols - r->x - r->width, r->y, r->width, r->height));
         }
     }
-    t = (double)cvGetTickCount() - t;
-    printf( "detection time = %g ms\n", t/((double)cvGetTickFrequency()*1000.) );
+    t = (double)getTickCount() - t;
+    printf( "detection time = %g ms\n", t*1000/getTickFrequency());
     for ( size_t i = 0; i < faces.size(); i++ )
     {
         Rect r = faces[i];
index f46fa3f..3ed6a44 100644 (file)
@@ -6,9 +6,9 @@
  *
  */
 
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <iostream>
 #include <cstdio>
index 5fbec69..a044844 100644 (file)
@@ -1,7 +1,7 @@
 #include "opencv2/video/tracking.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 
index 93bdd67..d10d72e 100644 (file)
@@ -1,7 +1,7 @@
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 
index 60ea51a..46b4da2 100644 (file)
@@ -2,7 +2,7 @@
  * filestorage_sample demonstrate the usage of the opencv serialization functionality
  */
 
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include <iostream>
 #include <string>
 
index b83f617..0cd6c4a 100644 (file)
 *
 *
 ********************************************************************************/
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <iostream>
+
 using namespace cv;
 using namespace std;
 
index b6b4060..726906c 100644 (file)
@@ -1,6 +1,6 @@
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <iostream>
 
index bdafffe..26c4dba 100644 (file)
@@ -1,6 +1,6 @@
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <iostream>
 
index ddeb3bd..94eec86 100644 (file)
@@ -1,6 +1,6 @@
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <iostream>
 
index b5925c6..fc57738 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <iostream>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/highgui.hpp>
 #include <opencv2/core/utility.hpp>
 
 using namespace cv; // all the new API is put into "cv" namespace. Export its content
index 14b63e3..6a84fab 100644 (file)
@@ -1,6 +1,6 @@
-#include <opencv2/core/core.hpp>
-#include <opencv2/videoio/videoio.hpp>
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/videoio.hpp>
+#include <opencv2/highgui.hpp>
 
 #include <iostream>
 
index bdb0231..5b2dc38 100644 (file)
@@ -1,9 +1,9 @@
 /*this creates a yaml or xml list of files from the command line args
  */
 
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <string>
 #include <iostream>
 
index 62d7521..86e6e37 100644 (file)
@@ -1,7 +1,7 @@
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/photo/photo.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/photo.hpp"
 
 #include <iostream>
 
index daae442..d8a1c32 100644 (file)
@@ -1,8 +1,8 @@
 // testOpenCVCam.cpp : Defines the entry point for the console application.
 //
 
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 
index 8f9adc6..501a749 100644 (file)
@@ -1,5 +1,5 @@
 #include "opencv2/video/tracking.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <stdio.h>
 
index b33b49c..462f628 100644 (file)
@@ -1,6 +1,6 @@
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <ctype.h>
 #include <stdio.h>
index 3d7e34a..0eb67d1 100644 (file)
@@ -1,5 +1,5 @@
-#include "opencv2/core/core.hpp"
-#include "opencv2/ml/ml.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/ml.hpp"
 
 #include <cstdio>
 #include <vector>
index 3881aa8..5e57aa8 100644 (file)
@@ -1,7 +1,7 @@
 #include "opencv2/video/tracking.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 #include <ctype.h>
index 4c8c7e0..e0db6c3 100644 (file)
@@ -1,11 +1,8 @@
 #include <iostream>
-#include <string>
 
-#include "opencv2/core/core.hpp"
-#include "opencv2/core/utility.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 using namespace std;
 using namespace cv;
@@ -23,6 +20,9 @@ int main(int argc, char** argv)
 
     Mat image = imread(in, IMREAD_GRAYSCALE);
 
+    if( image.empty() )
+    { return -1; }
+
 #if 0
     Canny(image, image, 50, 200, 3); // Apply canny edge
 #endif
index 91ad5a3..ac79db5 100644 (file)
@@ -1,5 +1,5 @@
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <iostream>
 
index 04e916c..8439080 100644 (file)
@@ -1,6 +1,6 @@
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string>
@@ -66,7 +66,7 @@ int main( int argc, char** argv )
         return 0;
     }
     std::string filename = parser.get<std::string>("@image");
-    if( (src = imread(filename,1)).empty() )
+    if( (src = imread(filename,IMREAD_COLOR)).empty() )
     {
         help();
         return -1;
index 70d4a7c..6c51624 100644 (file)
@@ -1,6 +1,6 @@
 #include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <iostream>
 
index 35fd0c1..b33a463 100644 (file)
@@ -42,9 +42,9 @@
 #include <fstream>
 #include <sstream>
 
-#include <opencv2/core/core.hpp>
+#include <opencv2/core.hpp>
 #include "opencv2/imgcodecs.hpp"
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/highgui.hpp>
 
 using namespace cv;
 using namespace std;
index 5e8685f..c3120fe 100644 (file)
@@ -1,7 +1,7 @@
-#include "opencv2/core/core.hpp"
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 using namespace cv;
 
index 872dda8..3cbc431 100644 (file)
@@ -1,94 +1,75 @@
-#include "opencv2/imgproc/imgproc_c.h"
-#include "opencv2/videoio/videoio_c.h"
-#include "opencv2/highgui/highgui_c.h"
-#include "opencv2/core/utility.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include <iostream>
 
-#include <ctype.h>
-#include <stdio.h>
+using namespace cv;
 
 static void help( void )
 {
     printf("\nThis program illustrates Linear-Polar and Log-Polar image transforms\n"
             "Usage :\n"
-            "./polar_transforms [[camera number -- Default 0],[AVI path_filename]]\n\n"
-            );
+            "./polar_transforms [[camera number -- Default 0],[path_to_filename]]\n\n");
 }
+
 int main( int argc, char** argv )
 {
-    CvCapture* capture = 0;
-    IplImage*  log_polar_img = 0;
-    IplImage*  lin_polar_img = 0;
-    IplImage*  recovered_img = 0;
+    VideoCapture capture;
+    Mat log_polar_img, lin_polar_img, recovered_log_polar, recovered_lin_polar_img;
 
     help();
-    cv::CommandLineParser parser(argc, argv, "{help h||}{@input|0|}");
-    if (parser.has("help"))
-    {
-        help();
-        return 0;
-    }
+
+    CommandLineParser parser(argc, argv, "{@input|0|}");
     std::string arg = parser.get<std::string>("@input");
+
     if( arg.size() == 1 && isdigit(arg[0]) )
-        capture = cvCaptureFromCAM( arg[0] - '0' );
+        capture.open( arg[0] - '0' );
     else
-        capture = cvCaptureFromAVI( arg.c_str() );
-    if( !capture )
+        capture.open( arg.c_str() );
+
+    if( !capture.isOpened() )
     {
         const char* name = argv[0];
         fprintf(stderr,"Could not initialize capturing...\n");
         fprintf(stderr,"Usage: %s <CAMERA_NUMBER>    , or \n       %s <VIDEO_FILE>\n", name, name);
-        help();
         return -1;
     }
 
-    cvNamedWindow( "Linear-Polar", 0 );
-    cvNamedWindow( "Log-Polar", 0 );
-    cvNamedWindow( "Recovered image", 0 );
+    namedWindow( "Linear-Polar", WINDOW_NORMAL );
+    namedWindow( "Log-Polar", WINDOW_NORMAL );
+    namedWindow( "Recovered Linear-Polar", WINDOW_NORMAL );
+    namedWindow( "Recovered Log-Polar", WINDOW_NORMAL );
 
-    cvMoveWindow( "Linear-Polar", 20,20 );
-    cvMoveWindow( "Log-Polar", 700,20 );
-    cvMoveWindow( "Recovered image", 20,700 );
+    moveWindow( "Linear-Polar", 20,20 );
+    moveWindow( "Log-Polar", 700,20 );
+    moveWindow( "Recovered Linear-Polar", 20, 350 );
+    moveWindow( "Recovered Log-Polar", 700, 350 );
 
     for(;;)
     {
-        IplImage* frame = 0;
+        Mat frame;
+        capture >> frame;
 
-        frame = cvQueryFrame( capture );
-        if( !frame )
+        if( frame.empty() )
             break;
 
-        if( !log_polar_img )
-        {
-            log_polar_img = cvCreateImage( cvSize(frame->width,frame->height), IPL_DEPTH_8U, frame->nChannels );
-            lin_polar_img = cvCreateImage( cvSize(frame->width,frame->height), IPL_DEPTH_8U, frame->nChannels );
-            recovered_img = cvCreateImage( cvSize(frame->width,frame->height), IPL_DEPTH_8U, frame->nChannels );
-        }
+        Point2f center( (float)frame.cols / 2, (float)frame.rows / 2 );
+        double M = (double)frame.cols / 8;
 
-        cvLogPolar(frame,log_polar_img,cvPoint2D32f(frame->width >> 1,frame->height >> 1),70, CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS);
-        cvLinearPolar(frame,lin_polar_img,cvPoint2D32f(frame->width >> 1,frame->height >> 1),70, CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS);
+        logPolar(frame,log_polar_img, center, M, INTER_LINEAR + WARP_FILL_OUTLIERS);
+        linearPolar(frame,lin_polar_img, center, M, INTER_LINEAR + WARP_FILL_OUTLIERS);
 
-#if 0
-        cvLogPolar(log_polar_img,recovered_img,cvPoint2D32f(frame->width >> 1,frame->height >> 1),70, CV_WARP_INVERSE_MAP+CV_INTER_LINEAR);
-#else
-        cvLinearPolar(lin_polar_img,recovered_img,cvPoint2D32f(frame->width >> 1,frame->height >> 1),70, CV_WARP_INVERSE_MAP+CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS);
-#endif
+        logPolar(log_polar_img, recovered_log_polar, center, M, WARP_INVERSE_MAP + INTER_LINEAR);
+        linearPolar(lin_polar_img, recovered_lin_polar_img, center, M, WARP_INVERSE_MAP + INTER_LINEAR + WARP_FILL_OUTLIERS);
 
-        cvShowImage("Log-Polar", log_polar_img );
-        cvShowImage("Linear-Polar", lin_polar_img );
-        cvShowImage("Recovered image", recovered_img );
+        imshow("Log-Polar", log_polar_img );
+        imshow("Linear-Polar", lin_polar_img );
+        imshow("Recovered Linear-Polar", recovered_lin_polar_img );
+        imshow("Recovered Log-Polar", recovered_log_polar );
 
-        if( cvWaitKey(10) >= 0 )
+        if( waitKey(10) >= 0 )
             break;
     }
 
-    cvReleaseCapture( &capture );
-    cvDestroyWindow("Linear-Polar");
-    cvDestroyWindow("Log-Polar");
-    cvDestroyWindow("Recovered image");
-
+    waitKey(0);
     return 0;
 }
-
-#ifdef _EiC
-main(1,"laplace.c");
-#endif
index 3c217f6..9162831 100644 (file)
@@ -1,6 +1,6 @@
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/video/background_segm.hpp"
 #include <stdio.h>
 #include <string>
index f53e931..df8459c 100644 (file)
@@ -2,10 +2,10 @@
 // It loads several images sequentially and tries to find squares in
 // each image
 
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 #include <math.h>
@@ -23,8 +23,8 @@ static void help()
     "Returns sequence of squares detected on the image.\n"
     "the sequence is stored in the specified memory storage\n"
     "Call:\n"
-    "./squares\n"
-    "Using OpenCV version %s\n" << CV_VERSION << "\n" << endl;
+    "./squares [file_name (optional)]\n"
+    "Using OpenCV version " << CV_VERSION << "\n" << endl;
 }
 
 
@@ -140,11 +140,18 @@ static void drawSquares( Mat& image, const vector<vector<Point> >& squares )
 }
 
 
-int main(int /*argc*/, char** /*argv*/)
+int main(int argc, char** argv)
 {
     static const char* names[] = { "../data/pic1.png", "../data/pic2.png", "../data/pic3.png",
         "../data/pic4.png", "../data/pic5.png", "../data/pic6.png", 0 };
     help();
+
+    if( argc > 1)
+    {
+     names[0] =  argv[1];
+     names[1] =  "0";
+    }
+
     namedWindow( wndname, 1 );
     vector<vector<Point> > squares;
 
index 89df0cc..6f4f714 100644 (file)
@@ -9,7 +9,7 @@
  * easy as CV_PI right?
  */
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <iostream>
 #include <vector>
 
index d6bf1b7..2839b03 100644 (file)
@@ -12,8 +12,8 @@
 */
 
 #include <opencv2/imgcodecs.hpp>
-#include <opencv2/videoio/videoio.hpp>
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/videoio.hpp>
+#include <opencv2/highgui.hpp>
 
 #include <iostream>
 #include <stdio.h>
index 117c9ba..842a649 100644 (file)
      GitHub:        https://github.com/Itseez/opencv/
    ************************************************** */
 
-#include "opencv2/calib3d/calib3d.hpp"
+#include "opencv2/calib3d.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 
 #include <vector>
 #include <string>
index e88b139..4868a63 100644 (file)
@@ -8,9 +8,9 @@
  */
 
 #include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/core/utility.hpp"
 
 #include <stdio.h>
index 4412588..96b2adf 100644 (file)
@@ -1,5 +1,5 @@
-#include "opencv2/ml/ml.hpp"
-#include "opencv2/core/core.hpp"
+#include "opencv2/ml.hpp"
+#include "opencv2/core.hpp"
 #include "opencv2/core/utility.hpp"
 #include <stdio.h>
 #include <string>
index 9e04dd9..93a7b48 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <stdio.h>
 
 using namespace cv;
index 213850f..1834e35 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
index 45db585..80d4d46 100644 (file)
@@ -5,10 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace cv;
 using namespace std;
@@ -24,10 +23,10 @@ int main( int, char** argv )
   const char* equalized_window = "Equalized Image";
 
   /// Load image
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
-    { cout<<"Usage: ./Histogram_Demo <path_to_image>"<<endl;
+    { cout<<"Usage: ./EqualizeHist_Demo <path_to_image>"<<endl;
       return -1;
     }
 
index e106cb4..0bf447d 100644 (file)
@@ -5,10 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace std;
 using namespace cv;
@@ -27,11 +26,24 @@ void MatchingMethod( int, void* );
 /**
  * @function main
  */
-int main( int, char** argv )
+int main( int argc, char** argv )
 {
+  if (argc < 3)
+  {
+    cout << "Not enough parameters" << endl;
+    cout << "Usage:\n./MatchTemplate_Demo <image_name> <template_name>" << endl;
+    return -1;
+  }
+
   /// Load image and template
-  img = imread( argv[1], 1 );
-  templ = imread( argv[2], 1 );
+  img = imread( argv[1], IMREAD_COLOR );
+  templ = imread( argv[2], IMREAD_COLOR );
+
+  if(img.empty() || templ.empty())
+  {
+    cout << "Can't read one of the images" << endl;
+    return -1;
+  }
 
   /// Create windows
   namedWindow( image_window, WINDOW_AUTOSIZE );
index ce0e911..1e2fe92 100644 (file)
@@ -4,9 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 
@@ -27,7 +27,13 @@ void Hist_and_Backproj(int, void* );
 int main( int, char** argv )
 {
   /// Read the image
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
+
+  if( src.empty() )
+    { cout<<"Usage: ./calcBackProject_Demo1 <path_to_image>"<<endl;
+      return -1;
+    }
+
   /// Transform it to HSV
   cvtColor( src, hsv, COLOR_BGR2HSV );
 
index ff7b369..ecb7737 100644 (file)
@@ -4,9 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 
@@ -30,7 +30,7 @@ void pickPoint (int event, int x, int y, int, void* );
 int main( int, char** argv )
 {
   /// Read the image
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
   /// Transform it to HSV
   cvtColor( src, hsv, COLOR_BGR2HSV );
 
index 1540cd8..27e21e7 100644 (file)
@@ -4,11 +4,10 @@
  * @author
  */
 
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace std;
 using namespace cv;
@@ -16,12 +15,19 @@ using namespace cv;
 /**
  * @function main
  */
-int main( int, char** argv )
+int main(int argc, char** argv)
 {
   Mat src, dst;
 
   /// Load image
-  src = imread( argv[1], 1 );
+  String imageName( "../data/lena.jpg" ); // by default
+
+  if (argc > 1)
+  {
+      imageName = argv[1];
+  }
+
+  src = imread( imageName, IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
index 122e19b..4d0123b 100644 (file)
@@ -5,10 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace std;
 using namespace cv;
@@ -26,13 +25,19 @@ int main( int argc, char** argv )
     /// Load three images with different environment settings
     if( argc < 4 )
     {
-        printf("** Error. Usage: ./compareHist_Demo <image_settings0> <image_setting1> <image_settings2>\n");
+        printf("** Error. Usage: ./compareHist_Demo <image_settings0> <image_settings1> <image_settings2>\n");
         return -1;
     }
 
-    src_base = imread( argv[1], 1 );
-    src_test1 = imread( argv[2], 1 );
-    src_test2 = imread( argv[3], 1 );
+    src_base = imread( argv[1], IMREAD_COLOR );
+    src_test1 = imread( argv[2], IMREAD_COLOR );
+    src_test2 = imread( argv[3], IMREAD_COLOR );
+
+    if(src_base.empty() || src_test1.empty() || src_test2.empty())
+    {
+      cout << "Can't read one of the images" << endl;
+      return -1;
+    }
 
     /// Convert to HSV
     cvtColor( src_base, hsv_base, COLOR_BGR2HSV );
index 32ce10f..20b09ec 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <iostream>
 
 using namespace cv;
index 9ffe156..b24451d 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <iostream>
 
 using namespace cv;
index e8fac91..626bd8b 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -32,7 +30,7 @@ void Dilation( int, void* );
 int main( int, char** argv )
 {
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
index 3f43eee..97304a4 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -34,7 +32,7 @@ void Morphology_Operations( int, void* );
 int main( int, char** argv )
 {
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
@@ -67,7 +65,6 @@ int main( int, char** argv )
  */
 void Morphology_Operations( int, void* )
 {
-
   // Since MORPH_X : 2,3,4,5 and 6
   int operation = morph_operator + 2;
 
index c52c0e0..e4b7096 100644 (file)
@@ -4,12 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
index e7ac4d4..6a84da0 100644 (file)
@@ -3,13 +3,10 @@
  * brief Sample code for simple filters
  * author OpenCV team
  */
-#include <iostream>
-#include <vector>
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/features2d/features2d.hpp"
+#include "opencv2/highgui.hpp"
 
 using namespace std;
 using namespace cv;
@@ -35,7 +32,7 @@ int main( void )
   namedWindow( window_name, WINDOW_AUTOSIZE );
 
   /// Load the source image
-  src = imread( "../data/lena.jpg", 1 );
+  src = imread( "../data/lena.jpg", IMREAD_COLOR );
 
   if( display_caption( "Original Image" ) != 0 ) { return 0; }
 
index 0944f6c..3694302 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -35,10 +33,13 @@ void Threshold_Demo( int, void* );
 int main( int, char** argv )
 {
   /// Load an image
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
+
+  if( src.empty() )
+    { return -1; }
 
   /// Convert the image to Gray
-  cvtColor( src, src_gray, COLOR_RGB2GRAY );
+  cvtColor( src, src_gray, COLOR_BGR2GRAY );
 
   /// Create a window to display results
   namedWindow( window_name, WINDOW_AUTOSIZE );
index 92e10e4..8b94bb3 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -50,7 +48,7 @@ static void CannyThreshold(int, void*)
 int main( int, char** argv )
 {
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
index 00184a3..edbb1e7 100644 (file)
@@ -5,10 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace cv;
 using namespace std;
@@ -31,7 +30,7 @@ int main( int, char** argv )
   Mat src, warp_dst, warp_rotate_dst;
 
   /// Load the image
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   /// Set the dst image the same type and size as src
   warp_dst = Mat::zeros( src.rows, src.cols, src.type() );
index 02f0381..81bb3f8 100644 (file)
@@ -5,8 +5,8 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
 
 using namespace std;
@@ -63,7 +63,7 @@ int main(int argc, char** argv)
     }
 
     // Read the image
-    src = imread( argv[1], 1 );
+    src = imread( argv[1], IMREAD_COLOR );
 
     if( src.empty() )
     {
index 2d9b7b6..5610cfe 100644 (file)
@@ -5,10 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace cv;
 using namespace std;
@@ -39,7 +38,7 @@ void Probabilistic_Hough( int, void* );
 int main( int, char** argv )
 {
    /// Read the image
-   src = imread( argv[1], 1 );
+   src = imread( argv[1], IMREAD_COLOR );
 
    if( src.empty() )
      { help();
index f0d45e7..386b26d 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -26,7 +24,7 @@ int main( int, char** argv )
   const char* window_name = "Laplace Demo";
 
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
index 49727e9..b5a76fa 100644 (file)
@@ -5,10 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
 
 using namespace cv;
 
@@ -27,7 +26,7 @@ void update_map( void );
 int main( int, char** argv )
 {
   /// Load the image
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   /// Create dst, map_x and map_y with the same size as src:
   dst.create( src.size(), src.type() );
index 7d57e8e..efe4c71 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -26,7 +24,7 @@ int main( int, char** argv )
   int ddepth = CV_16S;
 
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
index 5f786d5..6da2b29 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -28,7 +26,7 @@ int main( int, char** argv )
   int c;
 
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     {
index 3c580bb..6fc04d8 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include <stdlib.h>
-#include <stdio.h>
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
@@ -30,7 +28,7 @@ int main ( int, char** argv )
   int c;
 
   /// Load an image
-  src = imread( argv[1] );
+  src = imread( argv[1], IMREAD_COLOR );
 
   if( src.empty() )
     { return -1; }
index 6a6de95..b831441 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -28,7 +26,7 @@ void thresh_callback(int, void* );
 int main( int, char** argv )
 {
   /// Load source image
-  src = imread(argv[1]);
+  src = imread(argv[1], IMREAD_COLOR);
   if (src.empty())
   {
     cerr << "No image supplied ..." << endl;
index a9c22e6..29d7551 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -28,7 +26,7 @@ void thresh_callback(int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   /// Convert image to gray and blur it
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
index c6fd379..742c6cf 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -28,7 +26,7 @@ void thresh_callback(int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   /// Convert image to gray and blur it
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
index 0b35429..7fe5b71 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -28,7 +26,7 @@ void thresh_callback(int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   /// Convert image to gray and blur it
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
index c3a5cbf..4064048 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -28,7 +26,7 @@ void thresh_callback(int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
 
   /// Convert image to gray and blur it
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
index f55f8f6..757b8dc 100644 (file)
@@ -4,11 +4,9 @@
  * @author OpenCV team
  */
 
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
index c5dceab..52d7561 100644 (file)
@@ -3,12 +3,11 @@
  * @brief Demo code for detecting corners using OpenCV built-in functions
  * @author OpenCV team
  */
+
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -40,7 +39,7 @@ void myHarris_function( int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
 
   /// Set some parameters
index 4314a97..4f1df4b 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -31,7 +29,7 @@ void cornerHarris_demo( int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
 
   /// Create a window and a trackbar
index 775e566..8e4876b 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -32,7 +30,7 @@ void goodFeaturesToTrack_Demo( int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
 
   /// Create Window
index cff59f5..da357e7 100644 (file)
@@ -5,11 +5,9 @@
  */
 
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
 
 using namespace cv;
 using namespace std;
@@ -32,7 +30,7 @@ void goodFeaturesToTrack_Demo( int, void* );
 int main( int, char** argv )
 {
   /// Load source image and convert it to gray
-  src = imread( argv[1], 1 );
+  src = imread( argv[1], IMREAD_COLOR );
   cvtColor( src, src_gray, COLOR_BGR2GRAY );
 
   /// Create Window
index 0322519..580fe73 100644 (file)
@@ -21,7 +21,7 @@ using namespace std;
 static void help()
 {
     cout <<  "This is a camera calibration sample." << endl
-         <<  "Usage: calibration configurationFile"  << endl
+         <<  "Usage: camera_calibration [configuration_file -- default ./default.xml]"  << endl
          <<  "Near the sample file you'll find the configuration file, which has detailed help of "
              "how to edit it.  It may be any OpenCV supported file format XML/YAML." << endl;
 }
@@ -415,7 +415,7 @@ int main(int argc, char* argv[])
 
         for(size_t i = 0; i < s.imageList.size(); i++ )
         {
-            view = imread(s.imageList[i], 1);
+            view = imread(s.imageList[i], IMREAD_COLOR);
             if(view.empty())
                 continue;
             remap(view, rview, map1, map2, INTER_LINEAR);
index fa2bad4..b548bed 100644 (file)
@@ -11,8 +11,8 @@
 #include "ModelRegistration.h"
 #include "Utils.h"
 
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/calib3d/calib3d.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/calib3d.hpp>
 
 // For text
 int fontFace = cv::FONT_ITALIC;
index 6de590e..4808e64 100644 (file)
@@ -2,11 +2,11 @@
 #include <iostream>
 #include <time.h>
 // OpenCV
-#include <opencv2/core/core.hpp>
+#include <opencv2//core.hpp>
 #include <opencv2/core/utility.hpp>
-#include <opencv2/highgui/highgui.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/calib3d/calib3d.hpp>
+#include <opencv2/highgui.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/calib3d.hpp>
 #include <opencv2/video/tracking.hpp>
 // PnP Tutorial
 #include "Mesh.h"
index da775a0..5ddb83f 100644 (file)
@@ -1,10 +1,10 @@
 // C++
 #include <iostream>
 // OpenCV
-#include <opencv2/core/core.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
-#include <opencv2/calib3d/calib3d.hpp>
-#include <opencv2/features2d/features2d.hpp>
+#include <opencv2/core.hpp>
+#include <opencv2/imgproc.hpp>
+#include <opencv2/calib3d.hpp>
+#include <opencv2/features2d.hpp>
 // PnP Tutorial
 #include "Mesh.h"
 #include "Model.h"
index 90fa280..d114a95 100644 (file)
@@ -4,12 +4,10 @@
  * @author A. Huaman
  */
 
-#include <stdio.h>
 #include <iostream>
-#include "opencv2/calib3d/calib3d.hpp"
-#include "opencv2/core/core.hpp"
+#include "opencv2/calib3d.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 
index dbebeea..e23ab1c 100644 (file)
@@ -1,7 +1,7 @@
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 
index c673c66..47a5547 100644 (file)
@@ -16,7 +16,7 @@ static void help()
         << " we take an input image and divide the native color palette (255) with the "  << endl
         << "input. Shows C operator[] method, iterators and at function for on-the-fly item address calculation."<< endl
         << "Usage:"                                                                       << endl
-        << "./howToScanImages imageNameToUse divideWith [G]"                              << endl
+        << "./how_to_scan_images <imageNameToUse> <divideWith> [G]"                       << endl
         << "if you add a G parameter the image is processed in gray scale"                << endl
         << "--------------------------------------------------------------------------"   << endl
         << endl;
index b6aa613..79e7c99 100644 (file)
@@ -1,12 +1,9 @@
 //! [head]
-#include <stdio.h>
 #include <iostream>
 
-#include <opencv2/core/core.hpp>
-#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/imgproc.hpp>
 #include "opencv2/imgcodecs.hpp"
-#include <opencv2/highgui/highgui.hpp>
-#include <opencv2/core/utility.hpp>
+#include <opencv2/highgui.hpp>
 
 using namespace cv;  // The new C++ interface API is inside this namespace. Import it.
 using namespace std;
index f0cbca1..8eb9ca7 100644 (file)
@@ -1,5 +1,3 @@
-#include <opencv2/core.hpp>
-#include <opencv2/core/utility.hpp>
 #include <opencv2/imgcodecs.hpp>
 #include <opencv2/highgui.hpp>
 #include <opencv2/imgproc.hpp>
@@ -25,38 +23,44 @@ int main( int argc, char* argv[])
     help(argv[0]);
     const char* filename = argc >=2 ? argv[1] : "../data/lena.jpg";
 
-    Mat I, J, K;
+    Mat src, dst0, dst1;
 
     if (argc >= 3 && !strcmp("G", argv[2]))
-        I = imread( filename, IMREAD_GRAYSCALE);
+        src = imread( filename, IMREAD_GRAYSCALE);
     else
-        I = imread( filename, IMREAD_COLOR);
+        src = imread( filename, IMREAD_COLOR);
+
+    if (src.empty())
+    {
+        cerr << "Can't open image ["  << filename << "]" << endl;
+        return -1;
+    }
 
     namedWindow("Input", WINDOW_AUTOSIZE);
     namedWindow("Output", WINDOW_AUTOSIZE);
 
-    imshow("Input", I);
+    imshow( "Input", src );
     double t = (double)getTickCount();
 
-    Sharpen(I, J);
+    Sharpen( src, dst0 );
 
     t = ((double)getTickCount() - t)/getTickFrequency();
     cout << "Hand written function times passed in seconds: " << t << endl;
 
-    imshow("Output", J);
-    waitKey(0);
+    imshow( "Output", dst0 );
+    waitKey();
 
-    Mat kern = (Mat_<char>(3,3) <<  0, -1,  0,
+    Mat kernel = (Mat_<char>(3,3) <<  0, -1,  0,
                                    -1,  5, -1,
                                     0, -1,  0);
     t = (double)getTickCount();
-    filter2D(I, K, I.depth(), kern );
+    filter2D( src, dst1, src.depth(), kernel );
     t = ((double)getTickCount() - t)/getTickFrequency();
     cout << "Built-in filter2D time passed in seconds:      " << t << endl;
 
-    imshow("Output", K);
+    imshow( "Output", dst1 );
 
-    waitKey(0);
+    waitKey();
     return 0;
 }
 void Sharpen(const Mat& myImage,Mat& Result)
index 7fb060b..77ea938 100644 (file)
@@ -1,6 +1,6 @@
 /*  For description look into the help() function. */
 
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include <iostream>
 
 using namespace std;
@@ -15,7 +15,7 @@ static void help()
     << "That is, cv::Mat M(...); M.create and cout << M. "                            << endl
     << "Shows how output can be formated to OpenCV, python, numpy, csv and C styles." << endl
     << "Usage:"                                                                       << endl
-    << "./cvout_sample"                                                               << endl
+    << "./mat_the_basic_image_container"                                              << endl
     << "--------------------------------------------------------------------------"   << endl
     << endl;
 }
index 6e7c950..66084df 100644 (file)
@@ -3,9 +3,9 @@
 */
 
 // OpenCV Headers
-#include "opencv2/core/core.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/highgui.hpp"
 
 // C++ Standard Libraries
 #include <cmath>
@@ -159,8 +159,8 @@ int main( int argc, char* argv[] ){
      * Check input arguments
     */
     if( argc < 3 ){
-        cout << "usage: " << argv[0] << " <image> <dem>" << endl;
-        return 1;
+        cout << "usage: " << argv[0] << " <image_name> <dem_model_name>" << endl;
+        return -1;
     }
 
     // load the image (note that we don't have the projection information.  You will
index 558cb66..4562867 100644 (file)
@@ -1,7 +1,7 @@
 //! [includes]
-#include <opencv2/core/core.hpp>
+#include <opencv2/core.hpp>
 #include <opencv2/imgcodecs.hpp>
-#include <opencv2/highgui/highgui.hpp>
+#include <opencv2/highgui.hpp>
 
 #include <iostream>
 #include <string>
@@ -16,7 +16,7 @@ using namespace std;
 int main( int argc, char** argv )
 {
     //! [load]
-    string imageName("../data/HappyFish.jpg"); // by default
+    String imageName( "../data/HappyFish.jpg" ); // by default
     if( argc > 1)
     {
         imageName = argv[1];
@@ -28,7 +28,7 @@ int main( int argc, char** argv )
     //! [mat]
 
     //! [imread]
-    image = imread(imageName.c_str(), IMREAD_COLOR); // Read the file
+    image = imread( imageName, IMREAD_COLOR ); // Read the file
     //! [imread]
 
     if( image.empty() )                      // Check for invalid input
index 067bad1..13c1b0c 100644 (file)
@@ -27,13 +27,13 @@ using namespace cv;
 int main(int argc, char *argv[])
 {
     CV_Assert(argc == 2);
-    Mat I;
-    I = imread(argv[1]);
+    Mat src;
+    src = imread(argv[1], IMREAD_COLOR);
 
-    Mat gray = Mat(I.size(),CV_8UC1);
-    Mat color_boost = Mat(I.size(),CV_8UC3);
+    Mat gray = Mat(src.size(),CV_8UC1);
+    Mat color_boost = Mat(src.size(),CV_8UC3);
 
-    decolor(I,gray,color_boost);
+    decolor(src,gray,color_boost);
     imshow("grayscale",gray);
     imshow("color_boost",color_boost);
     waitKey(0);
index f81204c..8a24ddb 100644 (file)
@@ -35,9 +35,9 @@ int main(int argc, char* argv[])
 
     int num,type;
 
-    Mat I = imread(argv[1]);
+    Mat src = imread(argv[1], IMREAD_COLOR);
 
-    if(I.empty())
+    if(src.empty())
     {
         cout <<  "Image not found" << endl;
         exit(0);
@@ -71,25 +71,25 @@ int main(int argc, char* argv[])
 
         cin >> type;
 
-        edgePreservingFilter(I,img,type);
+        edgePreservingFilter(src,img,type);
         imshow("Edge Preserve Smoothing",img);
 
     }
     else if(num == 2)
     {
-        detailEnhance(I,img);
+        detailEnhance(src,img);
         imshow("Detail Enhanced",img);
     }
     else if(num == 3)
     {
         Mat img1;
-        pencilSketch(I,img1, img, 10 , 0.1f, 0.03f);
+        pencilSketch(src,img1, img, 10 , 0.1f, 0.03f);
         imshow("Pencil Sketch",img1);
         imshow("Color Pencil Sketch",img);
     }
     else if(num == 4)
     {
-        stylization(I,img);
+        stylization(src,img);
         imshow("Stylization",img);
     }
     waitKey(0);
index d37c7bd..94799f3 100644 (file)
@@ -38,9 +38,9 @@ void help()
     << " OpenCV. You can process both videos (-vid) and images (-img)."             << endl
                                                                                     << endl
     << "Usage:"                                                                     << endl
-    << "./bs {-vid <video filename>|-img <image filename>}"                         << endl
-    << "for example: ./bs -vid video.avi"                                           << endl
-    << "or: ./bs -img /data/images/1.png"                                           << endl
+    << "./bg_sub {-vid <video filename>|-img <image filename>}"                     << endl
+    << "for example: ./bg_sub -vid video.avi"                                       << endl
+    << "or: ./bg_sub -img /data/images/1.png"                                       << endl
     << "--------------------------------------------------------------------------" << endl
     << endl;
 }
index 4c5bf9f..d3f3c21 100644 (file)
@@ -3,10 +3,10 @@
 #include <iomanip>  // for controlling float print precision
 #include <sstream>  // string to number conversion
 
-#include <opencv2/core/core.hpp>        // Basic OpenCV structures (cv::Mat, Scalar)
-#include <opencv2/imgproc/imgproc.hpp>  // Gaussian Blur
-#include <opencv2/videoio/videoio.hpp>
-#include <opencv2/highgui/highgui.hpp>  // OpenCV window I/O
+#include <opencv2/core.hpp>     // Basic OpenCV structures (cv::Mat, Scalar)
+#include <opencv2/imgproc.hpp>  // Gaussian Blur
+#include <opencv2/videoio.hpp>
+#include <opencv2/highgui.hpp>  // OpenCV window I/O
 
 using namespace std;
 using namespace cv;
@@ -22,7 +22,7 @@ static void help()
         << "tests the similarity of two input videos first with PSNR, and for the frames "
         << "below a PSNR trigger value, also with MSSIM."                                   << endl
         << "Usage:"                                                                         << endl
-        << "./video-source referenceVideo useCaseTestVideo PSNR_Trigger_Value Wait_Between_Frames " << endl
+        << "./video-input-psnr-ssim <referenceVideo> <useCaseTestVideo> <PSNR_Trigger_Value> <Wait_Between_Frames> " << endl
         << "--------------------------------------------------------------------------"     << endl
         << endl;
 }
index 9218cf2..56676fc 100644 (file)
@@ -1,8 +1,8 @@
 #include <iostream>    // for standard I/O
 #include <string>   // for strings
 
-#include <opencv2/core/core.hpp>        // Basic OpenCV structures (cv::Mat)
-#include <opencv2/videoio/videoio.hpp>  // Video write
+#include <opencv2/core.hpp>     // Basic OpenCV structures (cv::Mat)
+#include <opencv2/videoio.hpp>  // Video write
 
 using namespace std;
 using namespace cv;
@@ -14,7 +14,7 @@ static void help()
         << "This program shows how to write video files."                                   << endl
         << "You can extract the R or G or B color channel of the input video."              << endl
         << "Usage:"                                                                         << endl
-        << "./video-write inputvideoName [ R | G | B] [Y | N]"                              << endl
+        << "./video-write <input_video_name> [ R | G | B] [Y | N]"                          << endl
         << "------------------------------------------------------------------------------" << endl
         << endl;
 }
index 816c0a7..3f7966d 100644 (file)
@@ -1,7 +1,7 @@
 #include <iostream>
 
 #include "opencv2/core/opengl.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/cudaimgproc.hpp"
 
 using namespace std;
index f6209f9..64f333d 100644 (file)
@@ -6,9 +6,9 @@
 
 #include <iostream>
 #include <iomanip>
-#include "opencv2/objdetect/objdetect.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/objdetect.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/cudaobjdetect.hpp"
 #include "opencv2/cudaimgproc.hpp"
 #include "opencv2/cudawarping.hpp"
index 7018eea..933368a 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <iostream>
 #include "opencv2/cvconfig.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include "opencv2/cudaarithm.hpp"
 
 #ifdef HAVE_TBB
index 6c55e36..7cb0f5d 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <iostream>
 #include "opencv2/cvconfig.h"
-#include "opencv2/core/core.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/cudastereo.hpp"
 
 #ifdef HAVE_TBB
index 85349eb..11e33b3 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <iostream>
 #include "opencv2/cvconfig.h"
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include "opencv2/cudaarithm.hpp"
 
 #ifdef HAVE_TBB
index 061cc58..9e2c68c 100644 (file)
     #include <GL/glu.h>
 #endif
 
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include "opencv2/core/opengl.hpp"
 #include "opencv2/core/cuda.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 using namespace std;
 using namespace cv;
index 63eebfd..77f70ae 100644 (file)
@@ -14,8 +14,7 @@
 #include <iomanip>
 #include "opencv2/core/cuda.hpp"
 #include "opencv2/cudalegacy.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/highgui/highgui_c.h"
+#include "opencv2/highgui.hpp"
 
 #if !defined(HAVE_CUDA)
 int main( int, const char** )
index 522c8a1..009568b 100644 (file)
@@ -4,9 +4,9 @@
 
 #ifdef HAVE_OPENCV_XFEATURES2D
 
-#include "opencv2/core/core.hpp"
-#include "opencv2/features2d/features2d.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/core.hpp"
+#include "opencv2/features2d.hpp"
+#include "opencv2/highgui.hpp"
 #include "opencv2/cudafeatures2d.hpp"
 #include "opencv2/xfeatures2d/cuda.hpp"
 
index c0f1d8f..324e073 100644 (file)
@@ -1,9 +1,9 @@
 #include "opencv2/core/utility.hpp"
 #include "opencv2/core/ocl.hpp"
 #include "opencv2/video/tracking.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
-#include "opencv2/videoio/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/imgproc.hpp"
+#include "opencv2/videoio.hpp"
+#include "opencv2/highgui.hpp"
 
 #include <iostream>
 #include <cctype>
index 905ea1f..34d895d 100644 (file)
@@ -1,11 +1,11 @@
 #include <iostream>
-#include "opencv2/core/core.hpp"
+#include "opencv2/core.hpp"
 #include "opencv2/core/ocl.hpp"
 #include "opencv2/core/utility.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 
 using namespace cv;
 using namespace std;
index e18e533..9f4d11b 100644 (file)
@@ -5,9 +5,9 @@
 #include "opencv2/core.hpp"
 #include "opencv2/core/ocl.hpp"
 #include "opencv2/core/utility.hpp"
-#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/highgui/highgui.hpp"
+#include "opencv2/highgui.hpp"
 #include <iostream>
 #include <string.h>
 
index f7bebac..2b7e249 100644 (file)
@@ -6,8 +6,8 @@
 #include "opencv2/core/utility.hpp"
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/videoio.hpp"
-#include "opencv2/highgui/highgui.hpp"
-#include "opencv2/video/video.hpp"
+#include "opencv2/highgui.hpp"
+#include "opencv2/video.hpp"
 
 using namespace std;
 using namespace cv;
index ed5e8d7..e0ec27a 100644 (file)
@@ -7,9 +7,9 @@
 #include "MainPage.xaml.h"
 
 #include <opencv2\imgproc\types_c.h>
-#include <opencv2\imgcodecs\imgcodecs.hpp>
-#include <opencv2\core\core.hpp>
-#include <opencv2\imgproc\imgproc.hpp>
+#include <opencv2\imgcodecs.hpp>
+#include <opencv2\core.hpp>
+#include <opencv2\imgproc.hpp>
 #include <opencv2\highgui.hpp>
 #include <opencv2\highgui\highgui_winrt.hpp>
 
@@ -78,4 +78,4 @@ void FaceDetection::MainPage::detectBtn_Click(Platform::Object^ sender, Windows:
     } else {
         Windows::UI::Popups::MessageDialog("Initialize image before processing \n").ShowAsync();
     }
-}
\ No newline at end of file
+}
index 56193c1..a2854d2 100644 (file)
@@ -8,9 +8,9 @@
 #include "OcvTransform.h"
 #include "bufferlock.h"
 
-#include <opencv2\core\core.hpp>
-#include <opencv2\imgproc\imgproc.hpp>
-#include <opencv2\features2d\features2d.hpp>
+#include <opencv2\core.hpp>
+#include <opencv2\imgproc.hpp>
+#include <opencv2\features2d.hpp>
 
 
 
index fc7440f..c911787 100644 (file)
@@ -10,8 +10,8 @@
 #include <Robuffer.h>
 #include <vector>
 #include <opencv2\imgproc\types_c.h>
-#include <opencv2\imgcodecs\imgcodecs.hpp>
-#include <opencv2\core\core.hpp>
+#include <opencv2\imgcodecs.hpp>
+#include <opencv2\core.hpp>
 
 #include <windows.storage.h>
 
index 045698b..de3c554 100644 (file)
@@ -7,8 +7,8 @@
 #include "MainPage.xaml.h"
 
 #include <opencv2\imgproc\types_c.h>
-#include <opencv2\core\core.hpp>
-#include <opencv2\imgproc\imgproc.hpp>
+#include <opencv2\core.hpp>
+#include <opencv2\imgproc.hpp>
 #include <Robuffer.h>
 #include <ppl.h>
 #include <ppltasks.h>
index cb00c7d..f3e3a01 100644 (file)
@@ -4,9 +4,9 @@
 #include <windows.storage.streams.h>
 #include <wrl.h>
 #include <robuffer.h>
-#include <opencv2\core\core.hpp>
-#include <opencv2\imgproc\imgproc.hpp>
-#include <opencv2\features2d\features2d.hpp>
+#include <opencv2\core.hpp>
+#include <opencv2\imgproc.hpp>
+#include <opencv2\features2d.hpp>
 #include <algorithm>
 
 using namespace Windows::Storage::Streams;
index ce309d5..7e0c0df 100644 (file)
@@ -3,8 +3,8 @@
 #include "OpenCVComponent.h"
 
 #include <opencv2\imgproc\types_c.h>
-#include <opencv2\core\core.hpp>
-#include <opencv2\imgproc\imgproc.hpp>
+#include <opencv2\core.hpp>
+#include <opencv2\imgproc.hpp>
 #include <vector>
 #include <algorithm>
 
@@ -63,5 +63,4 @@ void CopyMatrixToVector(const cv::Mat& mat, std::vector<int>& vector, int size)
     {
         vector.push_back(data[i]);
     }
-
-}
\ No newline at end of file
+}