Commit c743244f authored by Vladimir's avatar Vladimir

Warnings Fix #1

parent 36f8dc2b
......@@ -98,7 +98,7 @@ int main()
//
// "MIL", "BOOSTING", "MEDIANFLOW", "TLD"
//
char* tracker_algorithm_name = "TLD";
const char* tracker_algorithm_name = "TLD";
Mat frame;
paused = false;
......
......@@ -75,6 +75,7 @@ namespace cv
bool MultiTracker::update(const Mat& image)
{
printf("Naive-Loop MO-TLD Update....\n");
for (int i = 0; i < (int)trackers.size(); i++)
if (!trackers[i]->update(image, boundingBoxes[i]))
return false;
......@@ -130,7 +131,7 @@ namespace cv
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
data = tracker->data;
data->frameNum++;
......@@ -236,7 +237,14 @@ namespace cv
}
//Debug display candidates after Variance Filter
////////////////////////////////////////////////
Mat tmpImg = image;
for (int i = 0; i < (int)debugStack[0].size(); i++)
//rectangle(tmpImg, debugStack[0][i], Scalar(255, 255, 255), 1, 1, 0);
debugStack[0].clear();
tmpImg.copyTo(image);
////////////////////////////////////////////////
return true;
}
......@@ -311,7 +319,7 @@ namespace cv
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
//Optimized variance calculation
bool varPass = (windowVar > tld::VARIANCE_THRESHOLD * *tldModel->detector->originalVariancePtr);
......@@ -334,13 +342,14 @@ namespace cv
} while (size.width >= initSize.width && size.height >= initSize.height);
//Encsemble classification
//e1 = getTickCount();
for (int k = 0; k < (int)trackers.size(); k++)
{
//TLD Tracker data extraction
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
for (int i = 0; i < (int)varBuffer[k].size(); i++)
......@@ -376,13 +385,14 @@ namespace cv
}
//NN classification
//e1 = getTickCount();
for (int k = 0; k < (int)trackers.size(); k++)
{
//TLD Tracker data extraction
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
npos = 0;
nneg = 0;
......@@ -505,7 +515,7 @@ namespace cv
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
//Optimized variance calculation
bool varPass = (windowVar > tld::VARIANCE_THRESHOLD * *tldModel->detector->originalVariancePtr);
......@@ -528,13 +538,14 @@ namespace cv
} while (size.width >= initSize.width && size.height >= initSize.height);
//Encsemble classification
//e1 = getTickCount();
for (int k = 0; k < (int)trackers.size(); k++)
{
//TLD Tracker data extraction
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
for (int i = 0; i < (int)varBuffer[k].size(); i++)
......@@ -570,13 +581,15 @@ namespace cv
}
//NN classification
//e1 = getTickCount();
for (int k = 0; k < (int)trackers.size(); k++)
{
//TLD Tracker data extraction
trackerPtr = trackers[k];
tracker = static_cast<tld::TrackerTLDImpl*>(trackerPtr);
//TLD Model Extraction
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->getModel()));
tldModel = ((tld::TrackerTLDModel*)static_cast<TrackerModel*>(tracker->model));
//Size InitSize = tldModel->getMinSize();
npos = 0;
nneg = 0;
maxSc = -5.0;
......
......@@ -51,7 +51,7 @@ namespace cv
bool flagVOT = false;
//TLD Dataset Parameters
char* tldFolderName[10] = {
const char* tldFolderName[10] = {
"01_david",
"02_jumping",
"03_pedestrian1",
......@@ -63,7 +63,7 @@ namespace cv
"09_carchase",
"10_panda"
};
char* votFolderName[60] = {
const char* votFolderName[60] = {
"bag", "ball1", "ball2", "basketball", "birds1", "birds2", "blanket", "bmx", "bolt1", "bolt2",
"book", "butterfly", "car1", "car2", "crossing", "dinosaur", "fernando", "fish1", "fish2", "fish3",
"fish4", "girl", "glove", "godfather", "graduate", "gymnastics1", "gymnastics2 ", "gymnastics3", "gymnastics4", "hand",
......@@ -72,11 +72,11 @@ namespace cv
"singer2", "singer3", "soccer1", "soccer2", "soldier", "sphere", "tiger", "traffic", "tunnel", "wiper"
};
Rect2d tldInitBB[10] = {
const Rect2d tldInitBB[10] = {
Rect2d(165, 93, 51, 54), Rect2d(147, 110, 33, 32), Rect2d(47, 51, 21, 36), Rect2d(130, 134, 21, 53), Rect2d(154, 102, 24, 52),
Rect2d(142, 125, 90, 39), Rect2d(290, 43, 23, 40), Rect2d(273, 77, 27, 25), Rect2d(337, 219, 54, 37), Rect2d(58, 100, 27, 22)
};
Rect2d votInitBB[60] = {
const Rect2d votInitBB[60] = {
Rect2d(142, 125, 90, 39), Rect2d(490, 400, 40, 40), Rect2d(273, 77, 27, 25), Rect2d(145, 84, 54, 37), Rect2d(58, 100, 27, 22),
Rect2d(450, 380, 60, 60), Rect2d(290, 43, 23, 40), Rect2d(273, 77, 27, 25), Rect2d(225, 175, 50, 50), Rect2d(58, 100, 27, 22),
......@@ -118,7 +118,10 @@ namespace cv
cv::Rect2d tld_InitDataset(int videoInd, const char* rootPath, int datasetInd)
{
char* folderName = (char *)"";
int x, y, w, h;
int x = 0,
y = 0,
w = 0,
h = 0;
//Index range
// 1-10 TLD Dataset
......@@ -127,7 +130,7 @@ namespace cv
if (datasetInd == 0)
{
folderName = tldFolderName[id];
folderName = (char*)tldFolderName[id];
x = tldInitBB[id].x;
y = tldInitBB[id].y;
w = tldInitBB[id].width;
......@@ -138,7 +141,7 @@ namespace cv
}
if (datasetInd == 1)
{
folderName = votFolderName[id];
folderName = (char*)votFolderName[id];
x = votInitBB[id].x;
y = votInitBB[id].y;
w = votInitBB[id].width;
......
......@@ -238,7 +238,7 @@ bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
//Debug display candidates after Variance Filter
////////////////////////////////////////////////
Mat tmpImg = image;
for (int i = 0; i < tldModel->detector->debugStack[0].size(); i++)
for (int i = 0; i < (int)tldModel->detector->debugStack[0].size(); i++)
//rectangle(tmpImg, tldModel->detector->debugStack[0][i], Scalar(255, 255, 255), 1, 1, 0);
tldModel->detector->debugStack[0].clear();
tmpImg.copyTo(image);
......
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