提交 042271f5 编写于 作者: V Vadim Pisarevsky

use the new-style headers in the samples to improve OpenCV build time.

上级 54ef4c08
......@@ -39,8 +39,8 @@
#include <cstdio>
#include <cstring>
#include <ctime>
#include <cvaux.h>
#include <highgui.h>
#include <opencv2/contrib/contrib.hpp>
#include <opencv2/highgui/highgui.hpp>
class ASDFrameHolder
{
......
......@@ -21,13 +21,14 @@
ISBN-10: 0596516134 or: ISBN-13: 978-0596516130
************************************************** */
#include "cvaux.h"
#include "cxmisc.h"
#include "highgui.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <opencv2/video/background_segm.hpp>
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/highgui/highgui.hpp>
//VARIABLES for CODEBOOK METHOD:
CvBGCodeBookModel* model = 0;
const int NCHANNELS = 3;
......@@ -220,7 +221,7 @@ int main(int argc, char** argv)
if( ch[n] )
{
int v = ptr[n] + (c == 'i' || c == 'l' ? 1 : -1);
ptr[n] = CV_CAST_8U(v);
ptr[n] = cv::saturate_cast<uchar>(v);
}
printf("%d,", ptr[n]);
}
......
#include "cvaux.h"
#include "highgui.h"
#include <opencv2/video/background_segm.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
//this is a sample for foreground detection functions
......
#include "cvaux.h"
#include "highgui.h"
#include <opencv2/video/background_segm.hpp>
#include <opencv2/legacy/blobtrack.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc_c.h>
#include <stdio.h>
/* Select appropriate case insensitive string comparison function: */
......
......@@ -3,8 +3,9 @@
#include <algorithm>
#include <iterator>
#include "cv.h"
#include "highgui.h"
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
using namespace std;
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#include <opencv2/video/tracking.hpp>
#include <opencv2/highgui/highgui.hpp>
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <ctype.h>
#endif
IplImage *image = 0, *hsv = 0, *hue = 0, *mask = 0, *backproject = 0, *histimg = 0;
CvHistogram *hist = 0;
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <math.h>
#endif
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#define w 500
int levels = 3;
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/highgui/highgui.hpp>
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <ctype.h>
#include <stdio.h>
#endif
int main( int argc, char** argv )
{
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdlib.h>
#endif
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#define ARRAY 1
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#endif
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
/* the script demostrates iterative construction of
delaunay triangulation and voronoi tesselation */
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#endif
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
char file_name[] = "baboon.jpg";
......
#define CV_NO_BACKWARD_COMPATIBILITY
#include <cxcore.h>
#include <cv.h>
#include <highgui.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
// Rearrange the quadrants of Fourier image so that the origin is at
// the image center
......
#define CV_NO_BACKWARD_COMPATIBILITY
#ifdef _CH_
#pragma package <opencv>
#endif
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
char wndname[] = "Distance transform";
char tbarname[] = "Threshold";
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdlib.h>
#include <stdio.h>
#endif
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#define NUMBER 100
#define DELAY 5
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#endif
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
char wndname[] = "Edge";
char tbarname[] = "Threshold";
......
#define CV_NO_BACKWARD_COMPATIBILITY
#include "cv.h"
#include "highgui.h"
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
#include <cstdio>
#ifdef _EiC
#define WIN32
#endif
using namespace std;
using namespace cv;
......
#undef _GLIBCXX_DEBUG
#include "cv.h"
#include "highgui.h"
#include <opencv2/video/tracking.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
......
#undef _GLIBCXX_DEBUG
#include "cv.h"
#include "highgui.h"
#include <opencv2/video/tracking.hpp>
#include <opencv2/highgui/highgui.hpp>
void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
double scale, CvScalar color)
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <stdlib.h>
#endif
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
IplImage* color_img0;
IplImage* mask;
......
......@@ -4,12 +4,11 @@
* Author: Liu Liu
* liuliu.1987+opencv@gmail.com
*/
#include <cv.h>
#include <highgui.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <opencv2/objdetect/objdetect.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/imgproc/imgproc_c.h>
#include <iostream>
#include <vector>
......
#include <cv.h>
#include <cvaux.h>
#include <highgui.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include <algorithm>
#include <iostream>
......
......@@ -14,16 +14,8 @@
*
*
********************************************************************************/
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#endif
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/highgui/highgui.hpp"
int slider_pos = 70;
......
#define CV_NO_BACKWARD_COMPATIBILITY
/* This is a standalone program. Pass an image name as a first parameter of the program.
Switch between standard and probabilistic Hough transform by changing "#if 1" to "#if 0" and back */
#include <cv.h>
#include <highgui.h>
#include <math.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
int main(int argc, char** argv)
{
......
此差异已折叠。
#ifdef _CH_
#pragma package <opencv>
#endif
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <stdlib.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
IplImage* inpaint_mask = 0;
IplImage* img0 = 0, *img = 0, *inpainted = 0;
......
......@@ -11,17 +11,8 @@
Pressing ESC will stop the program.
*/
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <math.h>
#endif
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
int main(int argc, char** argv)
{
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#endif
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/core.hpp"
int main( int argc, char** argv )
{
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <ctype.h>
#include <stdio.h>
#endif
int sigma = 3;
int smoothType = CV_GAUSSIAN;
......
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
using namespace cv;
......
#include "ml.h"
#include <stdio.h>
#include "opencv2/core/core_c.h"
#include "opencv2/ml/ml.hpp"
/*
The sample demonstrates how to train Random Trees classifier
......
/* Demo of modified Lucas-Kanade optical flow algorithm.
See the printf below */
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <ctype.h>
#endif
#include <stdio.h>
IplImage *image = 0, *grey = 0, *prev_grey = 0, *pyramid = 0, *prev_pyramid = 0, *swap_temp;
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <stdlib.h>
#endif
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#define ARRAY 1
......
#define CV_NO_BACKWARD_COMPATIBILITY
#include <cv.h>
#include <highgui.h>
#include <stdlib.h>
#include <stdio.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
IplImage* src = 0;
IplImage* dst = 0;
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
// motion templates sample code
#include "cv.h"
#include "highgui.h"
#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <time.h>
#include <math.h>
#include <ctype.h>
#include <stdio.h>
#endif
// various tracking parameters (in seconds)
const double MHI_DURATION = 1;
......
/* This sample code was originally provided by Liu Liu
* Copyright 2009, Liu Liu All rights reserved.
* Copyright 2009, Liu Liu All rights reserved.
*/
#include <iostream>
#include <cstdio>
#include <stdio.h>
#include "cv.h"
#include "highgui.h"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc_c.h"
static CvScalar colors[] =
{
static CvScalar colors[] =
{
{{0,0,255}},
{{0,128,255}},
{{0,255,255}},
......@@ -21,10 +19,10 @@
{{255,255,255}},
{{196,255,255}},
{{255,255,196}}
};
};
static uchar bcolors[][3] =
{
static uchar bcolors[][3] =
{
{0,0,255},
{0,128,255},
{0,255,255},
......@@ -34,7 +32,7 @@
{255,0,0},
{255,0,255},
{255,255,255}
};
};
int main( int argc, char** argv )
{
......
#include "ml.h"
#include "opencv2/core/core_c.h"
#include "opencv2/ml/ml.hpp"
#include <stdio.h>
/*
......
......@@ -7,9 +7,10 @@
*
*/
#include <cv.h>
#include <cvaux.h>
#include <highgui.h>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <string>
......
#include "cvaux.h"
#include "highgui.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <ctype.h>
#include <stdio.h>
#endif
int main( int argc, char** argv )
{
......
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include <math.h>
#endif
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
IplImage* image[2] = { 0, 0 }, *image0 = 0, *image1 = 0;
CvSize size;
......
......@@ -3,14 +3,8 @@
// It loads several images subsequentally and tries to find squares in
// each image
//
#ifdef _CH_
#pragma package <opencv>
#endif
#define CV_NO_BACKWARD_COMPATIBILITY
#include "cv.h"
#include "highgui.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
#include <math.h>
#include <string.h>
......
......@@ -25,11 +25,10 @@
http://pr.willowgarage.com/wiki/OpenCV
************************************************** */
#undef _GLIBCXX_DEBUG
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "cv.h"
#include "cxmisc.h"
#include "highgui.h"
#include <vector>
#include <string>
#include <algorithm>
......
......@@ -7,8 +7,10 @@
*
*/
#include <cv.h>
#include <highgui.h>
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
using namespace cv;
......
#include "ml.h"
#include "opencv2/ml/ml.hpp"
#include <stdio.h>
/*
The sample demonstrates how to use different decision trees.
......
#ifdef _CH_
#pragma package <opencv>
#endif
#ifndef _EiC
#include "cv.h"
#include "highgui.h"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
#include <stdlib.h>
#endif
IplImage* marker_mask = 0;
IplImage* markers = 0;
......
......@@ -2,7 +2,10 @@
* 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
*/
#include "opencv2/opencv.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
#include <string.h>
#include <time.h>
......
......@@ -4,7 +4,10 @@
* Created on: Oct 17, 2010
* Author: ethan
*/
#include <opencv2/opencv.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <vector>
#include <iostream>
......
#include "cv.h"
#include "highgui.h"
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
Mat img;
int threshval = 100;
......
#include "cv.h"
#include "highgui.h"
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <math.h>
#include <iostream>
using namespace cv;
using namespace std;
void help()
{
......
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <cstdio>
......
#define CV_NO_BACKWARD_COMPATIBILITY
#include <cv.h>
#include <highgui.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdlib.h>
#include <stdio.h>
......
#include "cvaux.h"
#include "highgui.h"
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/background_segm.hpp>
#include <stdio.h>
#include <string>
......
......@@ -8,7 +8,8 @@
* that was generated with imagelist_creator.cpp
* easy as CV_PI right?
*/
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <vector>
using namespace cv;
......
......@@ -7,7 +7,8 @@
* A starter sample for using opencv, get a video stream and display the images
* easy as CV_PI right?
*/
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <vector>
using namespace cv;
......
......@@ -5,7 +5,10 @@
* Author: erublee
*/
#include <opencv2/opencv.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <iostream>
#include <list>
#include <vector>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册