From a8a69e365df29616c05fce3764705d66e6ac3e3b Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Jul 2024 18:59:15 +0800 Subject: [PATCH] opencv4.5 migrate --- src/kcftracker.cpp | 2 +- src/recttools.hpp | 2 +- src/runtracker.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kcftracker.cpp b/src/kcftracker.cpp index 7012f97..393e8b8 100644 --- a/src/kcftracker.cpp +++ b/src/kcftracker.cpp @@ -403,7 +403,7 @@ cv::Mat KCFTracker::getFeatures(const cv::Mat & image, bool inithann, float scal // HOG features if (_hogfeatures) { - IplImage z_ipl = z; + IplImage z_ipl = cvIplImage(z);; CvLSVMFeatureMapCaskade *map; getFeatureMaps(&z_ipl, cell_size, &map); normalizeAndTruncate(map,0.2f); diff --git a/src/recttools.hpp b/src/recttools.hpp index 780ad32..c72d770 100644 --- a/src/recttools.hpp +++ b/src/recttools.hpp @@ -129,7 +129,7 @@ inline cv::Mat subwindow(const cv::Mat &in, const cv::Rect & window, int borderT inline cv::Mat getGrayImage(cv::Mat img) { - cv::cvtColor(img, img, CV_BGR2GRAY); + cv::cvtColor(img, img, cv::COLOR_BGR2GRAY); img.convertTo(img, CV_32F, 1 / 255.f); return img; } diff --git a/src/runtracker.cpp b/src/runtracker.cpp index e44c926..ed329e0 100644 --- a/src/runtracker.cpp +++ b/src/runtracker.cpp @@ -110,7 +110,7 @@ int main(int argc, char* argv[]){ frameName = frameName; // Read each frame from the list - frame = imread(frameName, CV_LOAD_IMAGE_COLOR); + frame = imread(frameName, cv::IMREAD_COLOR); // First frame, give the groundtruth to the tracker if (nFrames == 0) {