From 15da8085560ac820f9ed3e963d544c9381ca0610 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 9 Jun 2015 14:40:10 +0900 Subject: [PATCH] Fixed Warnings #2 --- modules/tracking/src/tldDataset.cpp | 22 +++++++++++----------- modules/tracking/src/tldDetector.cpp | 6 +++--- modules/tracking/src/tldDetector.hpp | 2 +- modules/tracking/src/tldModel.cpp | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/tracking/src/tldDataset.cpp b/modules/tracking/src/tldDataset.cpp index 81ecd6f72..8432fc272 100644 --- a/modules/tracking/src/tldDataset.cpp +++ b/modules/tracking/src/tldDataset.cpp @@ -51,61 +51,61 @@ namespace cv cv::Rect2d tld_InitDataset(int datasetInd,const char* rootPath) { - char* folderName = ""; + char* folderName = (char *)""; int x, y, w, h; flagPNG = false; frameNum = 1; if (datasetInd == 1) { - folderName = "01_david"; + folderName = (char *)"01_david"; x = 165, y = 83; w = 51; h = 54; frameNum = 100; } if (datasetInd == 2) { - folderName = "02_jumping"; + folderName = (char *)"02_jumping"; x = 147, y = 110; w = 33; h = 32; } if (datasetInd == 3) { - folderName = "03_pedestrian1"; + folderName = (char *)"03_pedestrian1"; x = 47, y = 51; w = 21; h = 36; } if (datasetInd == 4) { - folderName = "04_pedestrian2"; + folderName = (char *)"04_pedestrian2"; x = 130, y = 134; w = 21; h = 53; } if (datasetInd == 5) { - folderName = "05_pedestrian3"; + folderName = (char *)"05_pedestrian3"; x = 154, y = 102; w = 24; h = 52; } if (datasetInd == 6) { - folderName = "06_car"; + folderName = (char *)"06_car"; x = 142, y = 125; w = 90; h = 39; } if (datasetInd == 7) { - folderName = "07_motocross"; + folderName = (char *)"07_motocross"; x = 290, y = 43; w = 23; h = 40; flagPNG = true; } if (datasetInd == 8) { - folderName = "08_volkswagen"; + folderName = (char *)"08_volkswagen"; x = 273, y = 77; w = 27; h = 25; } if (datasetInd == 9) { - folderName = "09_carchase"; + folderName = (char *)"09_carchase"; x = 145, y = 84; w = 54; h = 37; } if (datasetInd == 10){ - folderName = "10_panda"; + folderName = (char *)"10_panda"; x = 58, y = 100; w = 27; h = 22; } diff --git a/modules/tracking/src/tldDetector.cpp b/modules/tracking/src/tldDetector.cpp index 8a11ecdff..95f6eaf63 100644 --- a/modules/tracking/src/tldDetector.cpp +++ b/modules/tracking/src/tldDetector.cpp @@ -159,7 +159,7 @@ namespace cv { LabeledPatch labPatch; total++; - if (!patchVariance(intImgP, intImgP2, *originalVariance, Point(dx * i, dy * j), initSize)) + if (!patchVariance(intImgP, intImgP2, originalVariance, Point(dx * i, dy * j), initSize)) continue; if (ensembleClassifierNum(&blurred_img.at(dy * j, dx * i)) <= ENSEMBLE_THRESHOLD) continue; @@ -209,7 +209,7 @@ namespace cv // Computes the variance of subimage given by box, with the help of two integral // images intImgP and intImgP2 (sum of squares), which should be also provided. - bool TLDDetector::patchVariance(Mat_& intImgP, Mat_& intImgP2, double originalVariance, Point pt, Size size) + bool TLDDetector::patchVariance(Mat_& intImgP, Mat_& intImgP2, double *originalVariance, Point pt, Size size) { int x = (pt.x), y = (pt.y), width = (size.width), height = (size.height); CV_Assert(0 <= x && (x + width) < intImgP.cols && (x + width) < intImgP2.cols); @@ -229,7 +229,7 @@ namespace cv D = intImgP2(y + height, x + width); p2 = (A + D - B - C) / (width * height); - return ((p2 - p * p) > VARIANCE_THRESHOLD * originalVariance); + return ((p2 - p * p) > VARIANCE_THRESHOLD * *originalVariance); } } diff --git a/modules/tracking/src/tldDetector.hpp b/modules/tracking/src/tldDetector.hpp index b51108e23..6e8891d26 100644 --- a/modules/tracking/src/tldDetector.hpp +++ b/modules/tracking/src/tldDetector.hpp @@ -94,7 +94,7 @@ namespace cv friend class MyMouseCallbackDEBUG; void computeIntegralImages(const Mat& img, Mat_& intImgP, Mat_& intImgP2){ integral(img, intImgP, intImgP2, CV_64F); } - inline bool patchVariance(Mat_& intImgP, Mat_& intImgP2, double originalVariance, Point pt, Size size); + inline bool patchVariance(Mat_& intImgP, Mat_& intImgP2, double *originalVariance, Point pt, Size size); }; } } diff --git a/modules/tracking/src/tldModel.cpp b/modules/tracking/src/tldModel.cpp index 15e7b945e..f8fcaa3b2 100644 --- a/modules/tracking/src/tldModel.cpp +++ b/modules/tracking/src/tldModel.cpp @@ -46,8 +46,8 @@ namespace cv namespace tld { //Constructor - TrackerTLDModel::TrackerTLDModel(TrackerTLD::Params params, const Mat& image, const Rect2d& boundingBox, Size minSize) :minSize_(minSize), - timeStampPositiveNext(0), timeStampNegativeNext(0), params_(params), boundingBox_(boundingBox) + TrackerTLDModel::TrackerTLDModel(TrackerTLD::Params params, const Mat& image, const Rect2d& boundingBox, Size minSize): + timeStampPositiveNext(0), timeStampNegativeNext(0), minSize_(minSize), params_(params), boundingBox_(boundingBox) { std::vector closest, scanGrid; Mat scaledImg, blurredImg, image_blurred;