Move C API of opencv_video to separate file
This commit is contained in:
@@ -60,7 +60,7 @@ void CvMeanShiftTracker::newTrackingWindow(Mat image, Rect selection)
|
||||
float srange[] = { 0, 1 };
|
||||
const float* ranges[] = {hrange, srange};
|
||||
|
||||
cvtColor(image, hsv, CV_BGR2HSV);
|
||||
cvtColor(image, hsv, COLOR_BGR2HSV);
|
||||
inRange(hsv, Scalar(0, 30, MIN(10, 256)), Scalar(180, 256, MAX(10, 256)), mask);
|
||||
|
||||
hue.create(hsv.size(), CV_8UC2);
|
||||
@@ -83,7 +83,7 @@ RotatedRect CvMeanShiftTracker::updateTrackingWindow(Mat image)
|
||||
float srange[] = { 0, 1 };
|
||||
const float* ranges[] = {hrange, srange};
|
||||
|
||||
cvtColor(image, hsv, CV_BGR2HSV);
|
||||
cvtColor(image, hsv, COLOR_BGR2HSV);
|
||||
inRange(hsv, Scalar(0, 30, MIN(10, 256)), Scalar(180, 256, MAX(10, 256)), mask);
|
||||
hue.create(hsv.size(), CV_8UC2);
|
||||
mixChannels(&hsv, 1, &hue, 1, channels, 2);
|
||||
|
@@ -80,7 +80,7 @@ CvFeatureTracker::~CvFeatureTracker()
|
||||
void CvFeatureTracker::newTrackingWindow(Mat image, Rect selection)
|
||||
{
|
||||
image.copyTo(prev_image);
|
||||
cvtColor(prev_image, prev_image_bw, CV_BGR2GRAY);
|
||||
cvtColor(prev_image, prev_image_bw, COLOR_BGR2GRAY);
|
||||
prev_trackwindow = selection;
|
||||
prev_center.x = selection.x;
|
||||
prev_center.y = selection.y;
|
||||
@@ -148,12 +148,12 @@ Rect CvFeatureTracker::updateTrackingWindowWithFlow(Mat image)
|
||||
ittr++;
|
||||
Size subPixWinSize(10,10), winSize(31,31);
|
||||
Mat image_bw;
|
||||
TermCriteria termcrit(CV_TERMCRIT_ITER | CV_TERMCRIT_EPS, 20, 0.03);
|
||||
TermCriteria termcrit(TermCriteria::COUNT | TermCriteria::EPS, 20, 0.03);
|
||||
std::vector<uchar> status;
|
||||
std::vector<float> err;
|
||||
|
||||
cvtColor(image, image_bw, CV_BGR2GRAY);
|
||||
cvtColor(prev_image, prev_image_bw, CV_BGR2GRAY);
|
||||
cvtColor(image, image_bw, COLOR_BGR2GRAY);
|
||||
cvtColor(prev_image, prev_image_bw, COLOR_BGR2GRAY);
|
||||
|
||||
if (ittr == 1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user