Commit 15da8085 authored by Vladimir's avatar Vladimir

Fixed Warnings #2

parent 603fb880
......@@ -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;
}
......
......@@ -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<uchar>(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_<double>& intImgP, Mat_<double>& intImgP2, double originalVariance, Point pt, Size size)
bool TLDDetector::patchVariance(Mat_<double>& intImgP, Mat_<double>& 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);
}
}
......
......@@ -94,7 +94,7 @@ namespace cv
friend class MyMouseCallbackDEBUG;
void computeIntegralImages(const Mat& img, Mat_<double>& intImgP, Mat_<double>& intImgP2){ integral(img, intImgP, intImgP2, CV_64F); }
inline bool patchVariance(Mat_<double>& intImgP, Mat_<double>& intImgP2, double originalVariance, Point pt, Size size);
inline bool patchVariance(Mat_<double>& intImgP, Mat_<double>& intImgP2, double *originalVariance, Point pt, Size size);
};
}
}
......
......@@ -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<Rect2d> closest, scanGrid;
Mat scaledImg, blurredImg, image_blurred;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment