1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Warning fixes continued

This commit is contained in:
Andrey Kamaev
2012-06-09 15:00:04 +00:00
parent f6b451c607
commit f2d3b9b4a1
127 changed files with 6298 additions and 6277 deletions
@@ -350,11 +350,10 @@ public:
virtual void Process(IplImage* pImg, IplImage* /*pFG*/)
{
int i;
double MinTv = pImg->width/1440.0; /* minimal threshold for speed difference */
double MinTv2 = MinTv*MinTv;
for(i=m_Tracks.GetBlobNum(); i>0; --i)
for(int i=m_Tracks.GetBlobNum(); i>0; --i)
{
DefTrackForDist* pF = (DefTrackForDist*)m_Tracks.GetBlob(i-1);
pF->state = 0;
@@ -466,14 +465,13 @@ public:
if(m_Wnd)
{ /* Debug output: */
int i;
if(m_pDebugImg==NULL)
m_pDebugImg = cvCloneImage(pImg);
else
cvCopy(pImg, m_pDebugImg);
for(i=m_TrackDataBase.GetBlobNum(); i>0; --i)
for(int i=m_TrackDataBase.GetBlobNum(); i>0; --i)
{ /* Draw all elements in track data base: */
int j;
DefTrackForDist* pF = (DefTrackForDist*)m_TrackDataBase.GetBlob(i-1);
@@ -497,7 +495,7 @@ public:
pF->close = 0;
} /* Draw all elements in track data base. */
for(i=m_Tracks.GetBlobNum(); i>0; --i)
for(int i=m_Tracks.GetBlobNum(); i>0; --i)
{ /* Draw all elements for all trajectories: */
DefTrackForDist* pF = (DefTrackForDist*)m_Tracks.GetBlob(i-1);
int j;
+2 -2
View File
@@ -301,8 +301,8 @@ public:
{ /* Find a neighbour on current frame
* for each blob from previous frame:
*/
CvBlob* pB = m_BlobList.GetBlob(i-1);
DefBlobTracker* pBT = (DefBlobTracker*)pB;
CvBlob* pBl = m_BlobList.GetBlob(i-1);
DefBlobTracker* pBT = (DefBlobTracker*)pBl;
//int BlobID = CV_BLOB_ID(pB);
//CvBlob* pBBest = NULL;
//double DistBest = -1;
+7 -6
View File
@@ -93,18 +93,19 @@ class CvKDTreeWrap : public CvFeatureTree {
assert(results->cols == k);
assert(dist->cols == k);
for (int j = 0; j < d->rows; ++j) {
const typename __treetype::scalar_type* dj =
(const typename __treetype::scalar_type*) dptr;
for (int j = 0; j < d->rows; ++j)
{
const typename __treetype::scalar_type* dj = (const typename __treetype::scalar_type*) dptr;
int* resultsj = (int*) resultsptr;
double* distj = (double*) distptr;
tr->find_nn_bbf(dj, k, emax, nn);
assert((int)nn.size() <= k);
for (unsigned int j = 0; j < nn.size(); ++j) {
*resultsj++ = *nn[j].p;
*distj++ = nn[j].dist;
for (unsigned int i = 0; i < nn.size(); ++i)
{
*resultsj++ = *nn[i].p;
*distj++ = nn[i].dist;
}
std::fill(resultsj, resultsj + k - nn.size(), -1);
std::fill(distj, distj + k - nn.size(), 0);