mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
update cpp samples and tutorials
This commit is contained in:
parent
1aeff45631
commit
11ca1c95f8
@ -1,5 +1,5 @@
|
|||||||
#include <DetectionBasedTracker_jni.h>
|
#include <DetectionBasedTracker_jni.h>
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/objdetect.hpp>
|
#include <opencv2/objdetect.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/features2d/features2d.hpp>
|
#include <opencv2/features2d.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
* 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
|
* 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/calib3d/calib3d.hpp"
|
#include "opencv2/calib3d.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/core/utility.hpp"
|
#include "opencv2/core/utility.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <fstream>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
|
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
|
||||||
|
|
||||||
#include <opencv2/imgproc/imgproc.hpp> // Gaussian Blur
|
#include <opencv2/imgproc.hpp> // Gaussian Blur
|
||||||
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
|
#include <opencv2/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
|
||||||
#include <opencv2/videoio/videoio.hpp>
|
#include <opencv2/videoio.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp> // OpenCV window I/O
|
#include <opencv2/highgui.hpp> // OpenCV window I/O
|
||||||
#include <opencv2/features2d/features2d.hpp>
|
#include <opencv2/features2d.hpp>
|
||||||
#include <opencv2/objdetect/objdetect.hpp>
|
#include <opencv2/objdetect.hpp>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -177,7 +177,7 @@ void detectAndDraw( Mat& img, CascadeClassifier& cascade,
|
|||||||
resize( gray, smallImg, Size(), fx, fx, INTER_LINEAR );
|
resize( gray, smallImg, Size(), fx, fx, INTER_LINEAR );
|
||||||
equalizeHist( smallImg, smallImg );
|
equalizeHist( smallImg, smallImg );
|
||||||
|
|
||||||
t = (double)cvGetTickCount();
|
t = (double)getTickCount();
|
||||||
cascade.detectMultiScale( smallImg, faces,
|
cascade.detectMultiScale( smallImg, faces,
|
||||||
1.1, 2, 0
|
1.1, 2, 0
|
||||||
//|CASCADE_FIND_BIGGEST_OBJECT
|
//|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));
|
faces.push_back(Rect(smallImg.cols - r->x - r->width, r->y, r->width, r->height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t = (double)cvGetTickCount() - t;
|
t = (double)getTickCount() - t;
|
||||||
printf( "detection time = %g ms\n", t/((double)cvGetTickFrequency()*1000.) );
|
printf( "detection time = %g ms\n", t*1000/getTickFrequency());
|
||||||
for ( size_t i = 0; i < faces.size(); i++ )
|
for ( size_t i = 0; i < faces.size(); i++ )
|
||||||
{
|
{
|
||||||
Rect r = faces[i];
|
Rect r = faces[i];
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/objdetect/objdetect.hpp"
|
#include "opencv2/objdetect.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "opencv2/video/tracking.hpp"
|
#include "opencv2/video/tracking.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* filestorage_sample demonstrate the usage of the opencv serialization functionality
|
* filestorage_sample demonstrate the usage of the opencv serialization functionality
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -14,10 +14,11 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
#include <opencv2/core/utility.hpp>
|
#include <opencv2/core/utility.hpp>
|
||||||
|
|
||||||
using namespace cv; // all the new API is put into "cv" namespace. Export its content
|
using namespace cv; // all the new API is put into "cv" namespace. Export its content
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/videoio/videoio.hpp>
|
#include <opencv2/videoio.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/*this creates a yaml or xml list of files from the command line args
|
/*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/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/photo/photo.hpp"
|
#include "opencv2/photo.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// testOpenCVCam.cpp : Defines the entry point for the console application.
|
// testOpenCVCam.cpp : Defines the entry point for the console application.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "opencv2/video/tracking.hpp"
|
#include "opencv2/video/tracking.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/ml/ml.hpp"
|
#include "opencv2/ml.hpp"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "opencv2/video/tracking.hpp"
|
#include "opencv2/video/tracking.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/core/utility.hpp"
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -23,6 +20,9 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
Mat image = imread(in, IMREAD_GRAYSCALE);
|
Mat image = imread(in, IMREAD_GRAYSCALE);
|
||||||
|
|
||||||
|
if( image.empty() )
|
||||||
|
{ return -1; }
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Canny(image, image, 50, 200, 3); // Apply canny edge
|
Canny(image, image, 50, 200, 3); // Apply canny edge
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -66,7 +66,7 @@ int main( int argc, char** argv )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::string filename = parser.get<std::string>("@image");
|
std::string filename = parser.get<std::string>("@image");
|
||||||
if( (src = imread(filename,1)).empty() )
|
if( (src = imread(filename,IMREAD_COLOR)).empty() )
|
||||||
{
|
{
|
||||||
help();
|
help();
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
|
@ -1,94 +1,75 @@
|
|||||||
#include "opencv2/imgproc/imgproc_c.h"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/videoio/videoio_c.h"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/highgui/highgui_c.h"
|
#include <iostream>
|
||||||
#include "opencv2/core/utility.hpp"
|
|
||||||
|
|
||||||
#include <ctype.h>
|
using namespace cv;
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
static void help( void )
|
static void help( void )
|
||||||
{
|
{
|
||||||
printf("\nThis program illustrates Linear-Polar and Log-Polar image transforms\n"
|
printf("\nThis program illustrates Linear-Polar and Log-Polar image transforms\n"
|
||||||
"Usage :\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 )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
CvCapture* capture = 0;
|
VideoCapture capture;
|
||||||
IplImage* log_polar_img = 0;
|
Mat log_polar_img, lin_polar_img, recovered_log_polar, recovered_lin_polar_img;
|
||||||
IplImage* lin_polar_img = 0;
|
|
||||||
IplImage* recovered_img = 0;
|
|
||||||
|
|
||||||
help();
|
help();
|
||||||
cv::CommandLineParser parser(argc, argv, "{help h||}{@input|0|}");
|
|
||||||
if (parser.has("help"))
|
CommandLineParser parser(argc, argv, "{@input|0|}");
|
||||||
{
|
|
||||||
help();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
std::string arg = parser.get<std::string>("@input");
|
std::string arg = parser.get<std::string>("@input");
|
||||||
|
|
||||||
if( arg.size() == 1 && isdigit(arg[0]) )
|
if( arg.size() == 1 && isdigit(arg[0]) )
|
||||||
capture = cvCaptureFromCAM( arg[0] - '0' );
|
capture.open( arg[0] - '0' );
|
||||||
else
|
else
|
||||||
capture = cvCaptureFromAVI( arg.c_str() );
|
capture.open( arg.c_str() );
|
||||||
if( !capture )
|
|
||||||
|
if( !capture.isOpened() )
|
||||||
{
|
{
|
||||||
const char* name = argv[0];
|
const char* name = argv[0];
|
||||||
fprintf(stderr,"Could not initialize capturing...\n");
|
fprintf(stderr,"Could not initialize capturing...\n");
|
||||||
fprintf(stderr,"Usage: %s <CAMERA_NUMBER> , or \n %s <VIDEO_FILE>\n", name, name);
|
fprintf(stderr,"Usage: %s <CAMERA_NUMBER> , or \n %s <VIDEO_FILE>\n", name, name);
|
||||||
help();
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvNamedWindow( "Linear-Polar", 0 );
|
namedWindow( "Linear-Polar", WINDOW_NORMAL );
|
||||||
cvNamedWindow( "Log-Polar", 0 );
|
namedWindow( "Log-Polar", WINDOW_NORMAL );
|
||||||
cvNamedWindow( "Recovered image", 0 );
|
namedWindow( "Recovered Linear-Polar", WINDOW_NORMAL );
|
||||||
|
namedWindow( "Recovered Log-Polar", WINDOW_NORMAL );
|
||||||
|
|
||||||
cvMoveWindow( "Linear-Polar", 20,20 );
|
moveWindow( "Linear-Polar", 20,20 );
|
||||||
cvMoveWindow( "Log-Polar", 700,20 );
|
moveWindow( "Log-Polar", 700,20 );
|
||||||
cvMoveWindow( "Recovered image", 20,700 );
|
moveWindow( "Recovered Linear-Polar", 20, 350 );
|
||||||
|
moveWindow( "Recovered Log-Polar", 700, 350 );
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
IplImage* frame = 0;
|
Mat frame;
|
||||||
|
capture >> frame;
|
||||||
|
|
||||||
frame = cvQueryFrame( capture );
|
if( frame.empty() )
|
||||||
if( !frame )
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( !log_polar_img )
|
Point2f center( (float)frame.cols / 2, (float)frame.rows / 2 );
|
||||||
{
|
double M = (double)frame.cols / 8;
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
cvLogPolar(frame,log_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);
|
||||||
cvLinearPolar(frame,lin_polar_img,cvPoint2D32f(frame->width >> 1,frame->height >> 1),70, CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS);
|
linearPolar(frame,lin_polar_img, center, M, INTER_LINEAR + WARP_FILL_OUTLIERS);
|
||||||
|
|
||||||
#if 0
|
logPolar(log_polar_img, recovered_log_polar, center, M, WARP_INVERSE_MAP + INTER_LINEAR);
|
||||||
cvLogPolar(log_polar_img,recovered_img,cvPoint2D32f(frame->width >> 1,frame->height >> 1),70, CV_WARP_INVERSE_MAP+CV_INTER_LINEAR);
|
linearPolar(lin_polar_img, recovered_lin_polar_img, center, M, WARP_INVERSE_MAP + INTER_LINEAR + WARP_FILL_OUTLIERS);
|
||||||
#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
|
|
||||||
|
|
||||||
cvShowImage("Log-Polar", log_polar_img );
|
imshow("Log-Polar", log_polar_img );
|
||||||
cvShowImage("Linear-Polar", lin_polar_img );
|
imshow("Linear-Polar", lin_polar_img );
|
||||||
cvShowImage("Recovered image", recovered_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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvReleaseCapture( &capture );
|
waitKey(0);
|
||||||
cvDestroyWindow("Linear-Polar");
|
|
||||||
cvDestroyWindow("Log-Polar");
|
|
||||||
cvDestroyWindow("Recovered image");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _EiC
|
|
||||||
main(1,"laplace.c");
|
|
||||||
#endif
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/videoio/videoio.hpp"
|
#include "opencv2/videoio.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/video/background_segm.hpp"
|
#include "opencv2/video/background_segm.hpp"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
// It loads several images sequentially and tries to find squares in
|
// It loads several images sequentially and tries to find squares in
|
||||||
// each image
|
// each image
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -23,8 +23,8 @@ static void help()
|
|||||||
"Returns sequence of squares detected on the image.\n"
|
"Returns sequence of squares detected on the image.\n"
|
||||||
"the sequence is stored in the specified memory storage\n"
|
"the sequence is stored in the specified memory storage\n"
|
||||||
"Call:\n"
|
"Call:\n"
|
||||||
"./squares\n"
|
"./squares [file_name (optional)]\n"
|
||||||
"Using OpenCV version %s\n" << CV_VERSION << "\n" << endl;
|
"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",
|
static const char* names[] = { "../data/pic1.png", "../data/pic2.png", "../data/pic3.png",
|
||||||
"../data/pic4.png", "../data/pic5.png", "../data/pic6.png", 0 };
|
"../data/pic4.png", "../data/pic5.png", "../data/pic6.png", 0 };
|
||||||
help();
|
help();
|
||||||
|
|
||||||
|
if( argc > 1)
|
||||||
|
{
|
||||||
|
names[0] = argv[1];
|
||||||
|
names[1] = "0";
|
||||||
|
}
|
||||||
|
|
||||||
namedWindow( wndname, 1 );
|
namedWindow( wndname, 1 );
|
||||||
vector<vector<Point> > squares;
|
vector<vector<Point> > squares;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* easy as CV_PI right?
|
* easy as CV_PI right?
|
||||||
*/
|
*/
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <opencv2/imgcodecs.hpp>
|
#include <opencv2/imgcodecs.hpp>
|
||||||
#include <opencv2/videoio/videoio.hpp>
|
#include <opencv2/videoio.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
GitHub: https://github.com/Itseez/opencv/
|
GitHub: https://github.com/Itseez/opencv/
|
||||||
************************************************** */
|
************************************************** */
|
||||||
|
|
||||||
#include "opencv2/calib3d/calib3d.hpp"
|
#include "opencv2/calib3d.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/calib3d/calib3d.hpp"
|
#include "opencv2/calib3d/calib3d.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/core/utility.hpp"
|
#include "opencv2/core/utility.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "opencv2/ml/ml.hpp"
|
#include "opencv2/ml.hpp"
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/core/utility.hpp"
|
#include "opencv2/core/utility.hpp"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -24,10 +23,10 @@ int main( int, char** argv )
|
|||||||
const char* equalized_window = "Equalized Image";
|
const char* equalized_window = "Equalized Image";
|
||||||
|
|
||||||
/// Load image
|
/// Load image
|
||||||
src = imread( argv[1], 1 );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ cout<<"Usage: ./Histogram_Demo <path_to_image>"<<endl;
|
{ cout<<"Usage: ./EqualizeHist_Demo <path_to_image>"<<endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -27,11 +26,24 @@ void MatchingMethod( int, void* );
|
|||||||
/**
|
/**
|
||||||
* @function main
|
* @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
|
/// Load image and template
|
||||||
img = imread( argv[1], 1 );
|
img = imread( argv[1], IMREAD_COLOR );
|
||||||
templ = imread( argv[2], 1 );
|
templ = imread( argv[2], IMREAD_COLOR );
|
||||||
|
|
||||||
|
if(img.empty() || templ.empty())
|
||||||
|
{
|
||||||
|
cout << "Can't read one of the images" << endl;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/// Create windows
|
/// Create windows
|
||||||
namedWindow( image_window, WINDOW_AUTOSIZE );
|
namedWindow( image_window, WINDOW_AUTOSIZE );
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -27,7 +27,13 @@ void Hist_and_Backproj(int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Read the image
|
/// 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
|
/// Transform it to HSV
|
||||||
cvtColor( src, hsv, COLOR_BGR2HSV );
|
cvtColor( src, hsv, COLOR_BGR2HSV );
|
||||||
|
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ void pickPoint (int event, int x, int y, int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Read the image
|
/// Read the image
|
||||||
src = imread( argv[1], 1 );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
/// Transform it to HSV
|
/// Transform it to HSV
|
||||||
cvtColor( src, hsv, COLOR_BGR2HSV );
|
cvtColor( src, hsv, COLOR_BGR2HSV );
|
||||||
|
|
||||||
|
@ -4,11 +4,10 @@
|
|||||||
* @author
|
* @author
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -16,12 +15,19 @@ using namespace cv;
|
|||||||
/**
|
/**
|
||||||
* @function main
|
* @function main
|
||||||
*/
|
*/
|
||||||
int main( int, char** argv )
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
Mat src, dst;
|
Mat src, dst;
|
||||||
|
|
||||||
/// Load image
|
/// 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() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -26,13 +25,19 @@ int main( int argc, char** argv )
|
|||||||
/// Load three images with different environment settings
|
/// Load three images with different environment settings
|
||||||
if( argc < 4 )
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
src_base = imread( argv[1], 1 );
|
src_base = imread( argv[1], IMREAD_COLOR );
|
||||||
src_test1 = imread( argv[2], 1 );
|
src_test1 = imread( argv[2], IMREAD_COLOR );
|
||||||
src_test2 = imread( argv[3], 1 );
|
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
|
/// Convert to HSV
|
||||||
cvtColor( src_base, hsv_base, COLOR_BGR2HSV );
|
cvtColor( src_base, hsv_base, COLOR_BGR2HSV );
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -32,7 +30,7 @@ void Dilation( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -34,7 +32,7 @@ void Morphology_Operations( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
@ -67,7 +65,6 @@ int main( int, char** argv )
|
|||||||
*/
|
*/
|
||||||
void Morphology_Operations( int, void* )
|
void Morphology_Operations( int, void* )
|
||||||
{
|
{
|
||||||
|
|
||||||
// Since MORPH_X : 2,3,4,5 and 6
|
// Since MORPH_X : 2,3,4,5 and 6
|
||||||
int operation = morph_operator + 2;
|
int operation = morph_operator + 2;
|
||||||
|
|
||||||
|
@ -4,12 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <math.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
|
@ -3,13 +3,10 @@
|
|||||||
* brief Sample code for simple filters
|
* brief Sample code for simple filters
|
||||||
* author OpenCV team
|
* author OpenCV team
|
||||||
*/
|
*/
|
||||||
#include <iostream>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/features2d/features2d.hpp"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -35,7 +32,7 @@ int main( void )
|
|||||||
namedWindow( window_name, WINDOW_AUTOSIZE );
|
namedWindow( window_name, WINDOW_AUTOSIZE );
|
||||||
|
|
||||||
/// Load the source image
|
/// 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; }
|
if( display_caption( "Original Image" ) != 0 ) { return 0; }
|
||||||
|
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -35,10 +33,13 @@ void Threshold_Demo( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1], 1 );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
|
if( src.empty() )
|
||||||
|
{ return -1; }
|
||||||
|
|
||||||
/// Convert the image to Gray
|
/// Convert the image to Gray
|
||||||
cvtColor( src, src_gray, COLOR_RGB2GRAY );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
|
||||||
/// Create a window to display results
|
/// Create a window to display results
|
||||||
namedWindow( window_name, WINDOW_AUTOSIZE );
|
namedWindow( window_name, WINDOW_AUTOSIZE );
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -50,7 +48,7 @@ static void CannyThreshold(int, void*)
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -31,7 +30,7 @@ int main( int, char** argv )
|
|||||||
Mat src, warp_dst, warp_rotate_dst;
|
Mat src, warp_dst, warp_rotate_dst;
|
||||||
|
|
||||||
/// Load the image
|
/// 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
|
/// Set the dst image the same type and size as src
|
||||||
warp_dst = Mat::zeros( src.rows, src.cols, src.type() );
|
warp_dst = Mat::zeros( src.rows, src.cols, src.type() );
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -63,7 +63,7 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read the image
|
// Read the image
|
||||||
src = imread( argv[1], 1 );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{
|
{
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -39,7 +38,7 @@ void Probabilistic_Hough( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Read the image
|
/// Read the image
|
||||||
src = imread( argv[1], 1 );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ help();
|
{ help();
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -26,7 +24,7 @@ int main( int, char** argv )
|
|||||||
const char* window_name = "Laplace Demo";
|
const char* window_name = "Laplace Demo";
|
||||||
|
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -27,7 +26,7 @@ void update_map( void );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load the image
|
/// 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:
|
/// Create dst, map_x and map_y with the same size as src:
|
||||||
dst.create( src.size(), src.type() );
|
dst.create( src.size(), src.type() );
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -26,7 +24,7 @@ int main( int, char** argv )
|
|||||||
int ddepth = CV_16S;
|
int ddepth = CV_16S;
|
||||||
|
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -28,7 +26,7 @@ int main( int, char** argv )
|
|||||||
int c;
|
int c;
|
||||||
|
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{
|
{
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -30,7 +28,7 @@ int main ( int, char** argv )
|
|||||||
int c;
|
int c;
|
||||||
|
|
||||||
/// Load an image
|
/// Load an image
|
||||||
src = imread( argv[1] );
|
src = imread( argv[1], IMREAD_COLOR );
|
||||||
|
|
||||||
if( src.empty() )
|
if( src.empty() )
|
||||||
{ return -1; }
|
{ return -1; }
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -28,7 +26,7 @@ void thresh_callback(int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image
|
/// Load source image
|
||||||
src = imread(argv[1]);
|
src = imread(argv[1], IMREAD_COLOR);
|
||||||
if (src.empty())
|
if (src.empty())
|
||||||
{
|
{
|
||||||
cerr << "No image supplied ..." << endl;
|
cerr << "No image supplied ..." << endl;
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -28,7 +26,7 @@ void thresh_callback(int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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
|
/// Convert image to gray and blur it
|
||||||
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -28,7 +26,7 @@ void thresh_callback(int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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
|
/// Convert image to gray and blur it
|
||||||
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -28,7 +26,7 @@ void thresh_callback(int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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
|
/// Convert image to gray and blur it
|
||||||
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -28,7 +26,7 @@ void thresh_callback(int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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
|
/// Convert image to gray and blur it
|
||||||
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
@ -4,11 +4,9 @@
|
|||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -3,12 +3,11 @@
|
|||||||
* @brief Demo code for detecting corners using OpenCV built-in functions
|
* @brief Demo code for detecting corners using OpenCV built-in functions
|
||||||
* @author OpenCV team
|
* @author OpenCV team
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -40,7 +39,7 @@ void myHarris_function( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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 );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
|
||||||
/// Set some parameters
|
/// Set some parameters
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -31,7 +29,7 @@ void cornerHarris_demo( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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 );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
|
||||||
/// Create a window and a trackbar
|
/// Create a window and a trackbar
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -32,7 +30,7 @@ void goodFeaturesToTrack_Demo( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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 );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
|
||||||
/// Create Window
|
/// Create Window
|
||||||
|
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -32,7 +30,7 @@ void goodFeaturesToTrack_Demo( int, void* );
|
|||||||
int main( int, char** argv )
|
int main( int, char** argv )
|
||||||
{
|
{
|
||||||
/// Load source image and convert it to gray
|
/// 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 );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
|
||||||
/// Create Window
|
/// Create Window
|
||||||
|
@ -21,7 +21,7 @@ using namespace std;
|
|||||||
static void help()
|
static void help()
|
||||||
{
|
{
|
||||||
cout << "This is a camera calibration sample." << endl
|
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 "
|
<< "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;
|
"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++ )
|
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())
|
if(view.empty())
|
||||||
continue;
|
continue;
|
||||||
remap(view, rview, map1, map2, INTER_LINEAR);
|
remap(view, rview, map1, map2, INTER_LINEAR);
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
#include "ModelRegistration.h"
|
#include "ModelRegistration.h"
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
|
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/calib3d/calib3d.hpp>
|
#include <opencv2/calib3d.hpp>
|
||||||
|
|
||||||
// For text
|
// For text
|
||||||
int fontFace = cv::FONT_ITALIC;
|
int fontFace = cv::FONT_ITALIC;
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
// OpenCV
|
// OpenCV
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2//core.hpp>
|
||||||
#include <opencv2/core/utility.hpp>
|
#include <opencv2/core/utility.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/calib3d/calib3d.hpp>
|
#include <opencv2/calib3d.hpp>
|
||||||
#include <opencv2/video/tracking.hpp>
|
#include <opencv2/video/tracking.hpp>
|
||||||
// PnP Tutorial
|
// PnP Tutorial
|
||||||
#include "Mesh.h"
|
#include "Mesh.h"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
// C++
|
// C++
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
// OpenCV
|
// OpenCV
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/calib3d/calib3d.hpp>
|
#include <opencv2/calib3d.hpp>
|
||||||
#include <opencv2/features2d/features2d.hpp>
|
#include <opencv2/features2d.hpp>
|
||||||
// PnP Tutorial
|
// PnP Tutorial
|
||||||
#include "Mesh.h"
|
#include "Mesh.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
|
@ -4,12 +4,10 @@
|
|||||||
* @author A. Huaman
|
* @author A. Huaman
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "opencv2/calib3d/calib3d.hpp"
|
#include "opencv2/calib3d.hpp"
|
||||||
#include "opencv2/core/core.hpp"
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ static void help()
|
|||||||
<< " we take an input image and divide the native color palette (255) with the " << endl
|
<< " 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
|
<< "input. Shows C operator[] method, iterators and at function for on-the-fly item address calculation."<< endl
|
||||||
<< "Usage:" << 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
|
<< "if you add a G parameter the image is processed in gray scale" << endl
|
||||||
<< "--------------------------------------------------------------------------" << endl
|
<< "--------------------------------------------------------------------------" << endl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
//! [head]
|
//! [head]
|
||||||
#include <stdio.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
|
||||||
#include "opencv2/imgcodecs.hpp"
|
#include "opencv2/imgcodecs.hpp"
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
#include <opencv2/core/utility.hpp>
|
|
||||||
|
|
||||||
using namespace cv; // The new C++ interface API is inside this namespace. Import it.
|
using namespace cv; // The new C++ interface API is inside this namespace. Import it.
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#include <opencv2/core.hpp>
|
|
||||||
#include <opencv2/core/utility.hpp>
|
|
||||||
#include <opencv2/imgcodecs.hpp>
|
#include <opencv2/imgcodecs.hpp>
|
||||||
#include <opencv2/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
#include <opencv2/imgproc.hpp>
|
#include <opencv2/imgproc.hpp>
|
||||||
@ -25,38 +23,44 @@ int main( int argc, char* argv[])
|
|||||||
help(argv[0]);
|
help(argv[0]);
|
||||||
const char* filename = argc >=2 ? argv[1] : "../data/lena.jpg";
|
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]))
|
if (argc >= 3 && !strcmp("G", argv[2]))
|
||||||
I = imread( filename, IMREAD_GRAYSCALE);
|
src = imread( filename, IMREAD_GRAYSCALE);
|
||||||
else
|
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("Input", WINDOW_AUTOSIZE);
|
||||||
namedWindow("Output", WINDOW_AUTOSIZE);
|
namedWindow("Output", WINDOW_AUTOSIZE);
|
||||||
|
|
||||||
imshow("Input", I);
|
imshow( "Input", src );
|
||||||
double t = (double)getTickCount();
|
double t = (double)getTickCount();
|
||||||
|
|
||||||
Sharpen(I, J);
|
Sharpen( src, dst0 );
|
||||||
|
|
||||||
t = ((double)getTickCount() - t)/getTickFrequency();
|
t = ((double)getTickCount() - t)/getTickFrequency();
|
||||||
cout << "Hand written function times passed in seconds: " << t << endl;
|
cout << "Hand written function times passed in seconds: " << t << endl;
|
||||||
|
|
||||||
imshow("Output", J);
|
imshow( "Output", dst0 );
|
||||||
waitKey(0);
|
waitKey();
|
||||||
|
|
||||||
Mat kern = (Mat_<char>(3,3) << 0, -1, 0,
|
Mat kernel = (Mat_<char>(3,3) << 0, -1, 0,
|
||||||
-1, 5, -1,
|
-1, 5, -1,
|
||||||
0, -1, 0);
|
0, -1, 0);
|
||||||
t = (double)getTickCount();
|
t = (double)getTickCount();
|
||||||
filter2D(I, K, I.depth(), kern );
|
filter2D( src, dst1, src.depth(), kernel );
|
||||||
t = ((double)getTickCount() - t)/getTickFrequency();
|
t = ((double)getTickCount() - t)/getTickFrequency();
|
||||||
cout << "Built-in filter2D time passed in seconds: " << t << endl;
|
cout << "Built-in filter2D time passed in seconds: " << t << endl;
|
||||||
|
|
||||||
imshow("Output", K);
|
imshow( "Output", dst1 );
|
||||||
|
|
||||||
waitKey(0);
|
waitKey();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
void Sharpen(const Mat& myImage,Mat& Result)
|
void Sharpen(const Mat& myImage,Mat& Result)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* For description look into the help() function. */
|
/* For description look into the help() function. */
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -15,7 +15,7 @@ static void help()
|
|||||||
<< "That is, cv::Mat M(...); M.create and cout << M. " << endl
|
<< "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
|
<< "Shows how output can be formated to OpenCV, python, numpy, csv and C styles." << endl
|
||||||
<< "Usage:" << endl
|
<< "Usage:" << endl
|
||||||
<< "./cvout_sample" << endl
|
<< "./mat_the_basic_image_container" << endl
|
||||||
<< "--------------------------------------------------------------------------" << endl
|
<< "--------------------------------------------------------------------------" << endl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// OpenCV Headers
|
// OpenCV Headers
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
// C++ Standard Libraries
|
// C++ Standard Libraries
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -159,8 +159,8 @@ int main( int argc, char* argv[] ){
|
|||||||
* Check input arguments
|
* Check input arguments
|
||||||
*/
|
*/
|
||||||
if( argc < 3 ){
|
if( argc < 3 ){
|
||||||
cout << "usage: " << argv[0] << " <image> <dem>" << endl;
|
cout << "usage: " << argv[0] << " <image_name> <dem_model_name>" << endl;
|
||||||
return 1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the image (note that we don't have the projection information. You will
|
// load the image (note that we don't have the projection information. You will
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! [includes]
|
//! [includes]
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core.hpp>
|
||||||
#include <opencv2/imgcodecs.hpp>
|
#include <opencv2/imgcodecs.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -16,7 +16,7 @@ using namespace std;
|
|||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
//! [load]
|
//! [load]
|
||||||
string imageName("../data/HappyFish.jpg"); // by default
|
String imageName( "../data/HappyFish.jpg" ); // by default
|
||||||
if( argc > 1)
|
if( argc > 1)
|
||||||
{
|
{
|
||||||
imageName = argv[1];
|
imageName = argv[1];
|
||||||
@ -28,7 +28,7 @@ int main( int argc, char** argv )
|
|||||||
//! [mat]
|
//! [mat]
|
||||||
|
|
||||||
//! [imread]
|
//! [imread]
|
||||||
image = imread(imageName.c_str(), IMREAD_COLOR); // Read the file
|
image = imread( imageName, IMREAD_COLOR ); // Read the file
|
||||||
//! [imread]
|
//! [imread]
|
||||||
|
|
||||||
if( image.empty() ) // Check for invalid input
|
if( image.empty() ) // Check for invalid input
|
||||||
|
@ -27,13 +27,13 @@ using namespace cv;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
CV_Assert(argc == 2);
|
CV_Assert(argc == 2);
|
||||||
Mat I;
|
Mat src;
|
||||||
I = imread(argv[1]);
|
src = imread(argv[1], IMREAD_COLOR);
|
||||||
|
|
||||||
Mat gray = Mat(I.size(),CV_8UC1);
|
Mat gray = Mat(src.size(),CV_8UC1);
|
||||||
Mat color_boost = Mat(I.size(),CV_8UC3);
|
Mat color_boost = Mat(src.size(),CV_8UC3);
|
||||||
|
|
||||||
decolor(I,gray,color_boost);
|
decolor(src,gray,color_boost);
|
||||||
imshow("grayscale",gray);
|
imshow("grayscale",gray);
|
||||||
imshow("color_boost",color_boost);
|
imshow("color_boost",color_boost);
|
||||||
waitKey(0);
|
waitKey(0);
|
||||||
|
@ -35,9 +35,9 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
int num,type;
|
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;
|
cout << "Image not found" << endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -71,25 +71,25 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
cin >> type;
|
cin >> type;
|
||||||
|
|
||||||
edgePreservingFilter(I,img,type);
|
edgePreservingFilter(src,img,type);
|
||||||
imshow("Edge Preserve Smoothing",img);
|
imshow("Edge Preserve Smoothing",img);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(num == 2)
|
else if(num == 2)
|
||||||
{
|
{
|
||||||
detailEnhance(I,img);
|
detailEnhance(src,img);
|
||||||
imshow("Detail Enhanced",img);
|
imshow("Detail Enhanced",img);
|
||||||
}
|
}
|
||||||
else if(num == 3)
|
else if(num == 3)
|
||||||
{
|
{
|
||||||
Mat img1;
|
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("Pencil Sketch",img1);
|
||||||
imshow("Color Pencil Sketch",img);
|
imshow("Color Pencil Sketch",img);
|
||||||
}
|
}
|
||||||
else if(num == 4)
|
else if(num == 4)
|
||||||
{
|
{
|
||||||
stylization(I,img);
|
stylization(src,img);
|
||||||
imshow("Stylization",img);
|
imshow("Stylization",img);
|
||||||
}
|
}
|
||||||
waitKey(0);
|
waitKey(0);
|
||||||
|
@ -38,9 +38,9 @@ void help()
|
|||||||
<< " OpenCV. You can process both videos (-vid) and images (-img)." << endl
|
<< " OpenCV. You can process both videos (-vid) and images (-img)." << endl
|
||||||
<< endl
|
<< endl
|
||||||
<< "Usage:" << endl
|
<< "Usage:" << endl
|
||||||
<< "./bs {-vid <video filename>|-img <image filename>}" << endl
|
<< "./bg_sub {-vid <video filename>|-img <image filename>}" << endl
|
||||||
<< "for example: ./bs -vid video.avi" << endl
|
<< "for example: ./bg_sub -vid video.avi" << endl
|
||||||
<< "or: ./bs -img /data/images/1.png" << endl
|
<< "or: ./bg_sub -img /data/images/1.png" << endl
|
||||||
<< "--------------------------------------------------------------------------" << endl
|
<< "--------------------------------------------------------------------------" << endl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
#include <iomanip> // for controlling float print precision
|
#include <iomanip> // for controlling float print precision
|
||||||
#include <sstream> // string to number conversion
|
#include <sstream> // string to number conversion
|
||||||
|
|
||||||
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
|
#include <opencv2/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
|
||||||
#include <opencv2/imgproc/imgproc.hpp> // Gaussian Blur
|
#include <opencv2/imgproc.hpp> // Gaussian Blur
|
||||||
#include <opencv2/videoio/videoio.hpp>
|
#include <opencv2/videoio.hpp>
|
||||||
#include <opencv2/highgui/highgui.hpp> // OpenCV window I/O
|
#include <opencv2/highgui.hpp> // OpenCV window I/O
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -22,7 +22,7 @@ static void help()
|
|||||||
<< "tests the similarity of two input videos first with PSNR, and for the frames "
|
<< "tests the similarity of two input videos first with PSNR, and for the frames "
|
||||||
<< "below a PSNR trigger value, also with MSSIM." << endl
|
<< "below a PSNR trigger value, also with MSSIM." << endl
|
||||||
<< "Usage:" << 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
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include <iostream> // for standard I/O
|
#include <iostream> // for standard I/O
|
||||||
#include <string> // for strings
|
#include <string> // for strings
|
||||||
|
|
||||||
#include <opencv2/core/core.hpp> // Basic OpenCV structures (cv::Mat)
|
#include <opencv2/core.hpp> // Basic OpenCV structures (cv::Mat)
|
||||||
#include <opencv2/videoio/videoio.hpp> // Video write
|
#include <opencv2/videoio.hpp> // Video write
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
@ -14,7 +14,7 @@ static void help()
|
|||||||
<< "This program shows how to write video files." << endl
|
<< "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
|
<< "You can extract the R or G or B color channel of the input video." << endl
|
||||||
<< "Usage:" << 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
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "opencv2/core/opengl.hpp"
|
#include "opencv2/core/opengl.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/cudaimgproc.hpp"
|
#include "opencv2/cudaimgproc.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "opencv2/objdetect/objdetect.hpp"
|
#include "opencv2/objdetect.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/cudaobjdetect.hpp"
|
#include "opencv2/cudaobjdetect.hpp"
|
||||||
#include "opencv2/cudaimgproc.hpp"
|
#include "opencv2/cudaimgproc.hpp"
|
||||||
#include "opencv2/cudawarping.hpp"
|
#include "opencv2/cudawarping.hpp"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "opencv2/cvconfig.h"
|
#include "opencv2/cvconfig.h"
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/cudaarithm.hpp"
|
#include "opencv2/cudaarithm.hpp"
|
||||||
|
|
||||||
#ifdef HAVE_TBB
|
#ifdef HAVE_TBB
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "opencv2/cvconfig.h"
|
#include "opencv2/cvconfig.h"
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/cudastereo.hpp"
|
#include "opencv2/cudastereo.hpp"
|
||||||
|
|
||||||
#ifdef HAVE_TBB
|
#ifdef HAVE_TBB
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "opencv2/cvconfig.h"
|
#include "opencv2/cvconfig.h"
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/cudaarithm.hpp"
|
#include "opencv2/cudaarithm.hpp"
|
||||||
|
|
||||||
#ifdef HAVE_TBB
|
#ifdef HAVE_TBB
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/core/opengl.hpp"
|
#include "opencv2/core/opengl.hpp"
|
||||||
#include "opencv2/core/cuda.hpp"
|
#include "opencv2/core/cuda.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "opencv2/core/cuda.hpp"
|
#include "opencv2/core/cuda.hpp"
|
||||||
#include "opencv2/cudalegacy.hpp"
|
#include "opencv2/cudalegacy.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/highgui/highgui_c.h"
|
|
||||||
|
|
||||||
#if !defined(HAVE_CUDA)
|
#if !defined(HAVE_CUDA)
|
||||||
int main( int, const char** )
|
int main( int, const char** )
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core.hpp"
|
||||||
#include "opencv2/features2d/features2d.hpp"
|
#include "opencv2/features2d.hpp"
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
#include "opencv2/cudafeatures2d.hpp"
|
#include "opencv2/cudafeatures2d.hpp"
|
||||||
#include "opencv2/xfeatures2d/cuda.hpp"
|
#include "opencv2/xfeatures2d/cuda.hpp"
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user