Skip to content

Commit 199a35a

Browse files
author
Andrey Kamaev
committed
Move C API of opencv_video to separate file
1 parent e27f4da commit 199a35a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+408
-375
lines changed

apps/traincascade/HOGfeatures.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "opencv2/core.hpp"
2+
#include "opencv2/imgproc.hpp"
23

34
#include "HOGfeatures.h"
45
#include "cascadeclassifier.h"

apps/traincascade/haarfeatures.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "opencv2/core.hpp"
2+
#include "opencv2/imgproc.hpp"
23

34
#include "haarfeatures.h"
45
#include "cascadeclassifier.h"

apps/traincascade/lbpfeatures.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "opencv2/core.hpp"
2+
#include "opencv2/imgproc.hpp"
23

34
#include "lbpfeatures.h"
45
#include "cascadeclassifier.h"

include/opencv/cv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
#include "opencv2/core/core_c.h"
6464
#include "opencv2/imgproc/imgproc_c.h"
6565
#include "opencv2/photo/photo_c.h"
66+
#include "opencv2/video/tracking_c.h"
6667

67-
#include "opencv2/video.hpp"
6868
#include "opencv2/features2d.hpp"
6969
#include "opencv2/flann.hpp"
7070
#include "opencv2/calib3d.hpp"

include/opencv/cv.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "opencv2/core.hpp"
5252
#include "opencv2/imgproc.hpp"
5353
#include "opencv2/photo.hpp"
54+
#include "opencv2/video.hpp"
5455
#include "opencv2/highgui.hpp"
5556

5657
#endif

include/opencv/cvaux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
#include "opencv2/core/core_c.h"
5050
#include "opencv2/imgproc/imgproc_c.h"
5151
#include "opencv2/photo/photo_c.h"
52+
#include "opencv2/video/tracking_c.h"
5253

53-
#include "opencv2/video.hpp"
5454
#include "opencv2/features2d.hpp"
5555
#include "opencv2/calib3d.hpp"
5656
#include "opencv2/objdetect.hpp"

modules/contrib/src/colortracker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void CvMeanShiftTracker::newTrackingWindow(Mat image, Rect selection)
6060
float srange[] = { 0, 1 };
6161
const float* ranges[] = {hrange, srange};
6262

63-
cvtColor(image, hsv, CV_BGR2HSV);
63+
cvtColor(image, hsv, COLOR_BGR2HSV);
6464
inRange(hsv, Scalar(0, 30, MIN(10, 256)), Scalar(180, 256, MAX(10, 256)), mask);
6565

6666
hue.create(hsv.size(), CV_8UC2);
@@ -83,7 +83,7 @@ RotatedRect CvMeanShiftTracker::updateTrackingWindow(Mat image)
8383
float srange[] = { 0, 1 };
8484
const float* ranges[] = {hrange, srange};
8585

86-
cvtColor(image, hsv, CV_BGR2HSV);
86+
cvtColor(image, hsv, COLOR_BGR2HSV);
8787
inRange(hsv, Scalar(0, 30, MIN(10, 256)), Scalar(180, 256, MAX(10, 256)), mask);
8888
hue.create(hsv.size(), CV_8UC2);
8989
mixChannels(&hsv, 1, &hue, 1, channels, 2);

modules/contrib/src/featuretracker.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ CvFeatureTracker::~CvFeatureTracker()
8080
void CvFeatureTracker::newTrackingWindow(Mat image, Rect selection)
8181
{
8282
image.copyTo(prev_image);
83-
cvtColor(prev_image, prev_image_bw, CV_BGR2GRAY);
83+
cvtColor(prev_image, prev_image_bw, COLOR_BGR2GRAY);
8484
prev_trackwindow = selection;
8585
prev_center.x = selection.x;
8686
prev_center.y = selection.y;
@@ -148,12 +148,12 @@ Rect CvFeatureTracker::updateTrackingWindowWithFlow(Mat image)
148148
ittr++;
149149
Size subPixWinSize(10,10), winSize(31,31);
150150
Mat image_bw;
151-
TermCriteria termcrit(CV_TERMCRIT_ITER | CV_TERMCRIT_EPS, 20, 0.03);
151+
TermCriteria termcrit(TermCriteria::COUNT | TermCriteria::EPS, 20, 0.03);
152152
std::vector<uchar> status;
153153
std::vector<float> err;
154154

155-
cvtColor(image, image_bw, CV_BGR2GRAY);
156-
cvtColor(prev_image, prev_image_bw, CV_BGR2GRAY);
155+
cvtColor(image, image_bw, COLOR_BGR2GRAY);
156+
cvtColor(prev_image, prev_image_bw, COLOR_BGR2GRAY);
157157

158158
if (ittr == 1)
159159
{

modules/legacy/src/blobtrackpostprockalman.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
//M*/
4040

4141
#include "precomp.hpp"
42+
#include "opencv2/video/tracking_c.h"
4243

4344
/*======================= KALMAN FILTER =========================*/
4445
/* State vector is (x,y,w,h,dx,dy,dw,dh). */

modules/legacy/src/camshift.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
//
4040
//M*/
4141
#include "precomp.hpp"
42+
#include "opencv2/video/tracking_c.h"
4243

4344
CvCamShiftTracker::CvCamShiftTracker()
4445
{

0 commit comments

Comments
 (0)