Commit 237ca817 authored by Vladimir's avatar Vladimir

Fixed Warnings #3

parent 15da8085
...@@ -159,7 +159,7 @@ namespace cv ...@@ -159,7 +159,7 @@ namespace cv
{ {
LabeledPatch labPatch; LabeledPatch labPatch;
total++; total++;
if (!patchVariance(intImgP, intImgP2, originalVariance, Point(dx * i, dy * j), initSize)) if (!patchVariance(intImgP, intImgP2, originalVariancePtr, Point(dx * i, dy * j), initSize))
continue; continue;
if (ensembleClassifierNum(&blurred_img.at<uchar>(dy * j, dx * i)) <= ENSEMBLE_THRESHOLD) if (ensembleClassifierNum(&blurred_img.at<uchar>(dy * j, dx * i)) <= ENSEMBLE_THRESHOLD)
continue; continue;
...@@ -209,7 +209,7 @@ namespace cv ...@@ -209,7 +209,7 @@ namespace cv
// Computes the variance of subimage given by box, with the help of two integral // 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. // 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 *originalVariancePtr, Point pt, Size size)
{ {
int x = (pt.x), y = (pt.y), width = (size.width), height = (size.height); 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); CV_Assert(0 <= x && (x + width) < intImgP.cols && (x + width) < intImgP2.cols);
...@@ -229,7 +229,7 @@ namespace cv ...@@ -229,7 +229,7 @@ namespace cv
D = intImgP2(y + height, x + width); D = intImgP2(y + height, x + width);
p2 = (A + D - B - C) / (width * height); p2 = (A + D - B - C) / (width * height);
return ((p2 - p * p) > VARIANCE_THRESHOLD * *originalVariance); return ((p2 - p * p) > VARIANCE_THRESHOLD * *originalVariancePtr);
} }
} }
......
...@@ -79,7 +79,7 @@ namespace cv ...@@ -79,7 +79,7 @@ namespace cv
std::vector<TLDEnsembleClassifier> classifiers; std::vector<TLDEnsembleClassifier> classifiers;
std::vector<Mat_<uchar> > *positiveExamples, *negativeExamples; std::vector<Mat_<uchar> > *positiveExamples, *negativeExamples;
std::vector<int> *timeStampsPositive, *timeStampsNegative; std::vector<int> *timeStampsPositive, *timeStampsNegative;
double *originalVariance; double *originalVariancePtr;
static void generateScanGrid(int rows, int cols, Size initBox, std::vector<Rect2d>& res, bool withScaling = false); static void generateScanGrid(int rows, int cols, Size initBox, std::vector<Rect2d>& res, bool withScaling = false);
struct LabeledPatch struct LabeledPatch
......
...@@ -60,7 +60,7 @@ namespace cv ...@@ -60,7 +60,7 @@ namespace cv
detector->negativeExamples = &negativeExamples; detector->negativeExamples = &negativeExamples;
detector->timeStampsPositive = &timeStampsPositive; detector->timeStampsPositive = &timeStampsPositive;
detector->timeStampsNegative = &timeStampsNegative; detector->timeStampsNegative = &timeStampsNegative;
detector->originalVariance = &originalVariance_; detector->originalVariancePtr = &originalVariance_;
//Calculate the variance in initial BB //Calculate the variance in initial BB
originalVariance_ = variance(image(boundingBox)); originalVariance_ = variance(image(boundingBox));
......
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