updated 3rd party libs: CLapack 3.1.1.1 => 3.2.1, zlib 1.2.3 => 1.2.5, libpng 1.2.x => 1.4.3, libtiff 3.7.x => 3.9.4. fixed many 64-bit related VS2010 warnings

This commit is contained in:
Vadim Pisarevsky
2010-07-16 12:54:53 +00:00
parent 0c9eca7922
commit f78a3b4cc1
465 changed files with 51856 additions and 41344 deletions

View File

@@ -209,7 +209,7 @@ CvAdaptiveSkinDetector::Histogram::~Histogram()
int CvAdaptiveSkinDetector::Histogram::findCoverageIndex(double surfaceToCover, int defaultValue)
{
float s = 0;
double s = 0;
for (int i = 0; i < HistogramSize; i++)
{
s += cvGetReal1D( fHistogram->bins, i );
@@ -223,7 +223,7 @@ int CvAdaptiveSkinDetector::Histogram::findCoverageIndex(double surfaceToCover,
void CvAdaptiveSkinDetector::Histogram::findCurveThresholds(int &x1, int &x2, double percent)
{
float sum = 0;
double sum = 0;
for (int i = 0; i < HistogramSize; i++)
{

View File

@@ -984,8 +984,8 @@ void LevMarqSparse::bundleAdjust( vector<Point3d>& points, //positions of points
const TermCriteria& criteria)
//,enum{MOTION_AND_STRUCTURE,MOTION,STRUCTURE})
{
int num_points = points.size();
int num_cameras = cameraMatrix.size();
int num_points = (int)points.size();
int num_cameras = (int)cameraMatrix.size();
CV_Assert( imagePoints.size() == (size_t)num_cameras &&
visibility.size() == (size_t)num_cameras &&

View File

@@ -89,10 +89,11 @@ bool is_smaller(const std::pair<int, float>& p1, const std::pair<int, float>& p2
void orderContours(const vector<vector<Point> >& contours, Point2f point, vector<std::pair<int, float> >& order)
{
order.clear();
for(size_t i = 0; i < contours.size(); i++)
int i, j, n = (int)contours.size();
for(i = 0; i < n; i++)
{
double min_dist = std::numeric_limits<double>::max();
for(size_t j = 0; j < contours[i].size(); j++)
for(j = 0; j < n; j++)
{
double dist = norm(Point2f((float)contours[i][j].x, (float)contours[i][j].y) - point);
min_dist = MIN(min_dist, dist);
@@ -137,7 +138,7 @@ void findCorner(const vector<Point>& contour, Point2f point, Point2f& corner)
if(dist < min_dist)
{
min_dist = dist;
min_idx = i;
min_idx = (int)i;
}
}
assert(min_idx >= 0);
@@ -162,7 +163,7 @@ void findCorner(const vector<Point2f>& contour, Point2f point, Point2f& corner)
if(dist < min_dist)
{
min_dist = dist;
min_idx = i;
min_idx = (int)i;
}
}
assert(min_idx >= 0);

View File

@@ -124,7 +124,7 @@ Size SelfSimDescriptor::getGridSize( Size imgSize, Size winStride ) const
void SelfSimDescriptor::SSD(const Mat& img, Point pt, Mat& ssd) const
{
int x, y, dx, dy, r0 = largeSize/2, r1 = smallSize/2;
int step = img.step;
int step = (int)img.step;
for( y = -r0; y <= r0; y++ )
{
float* sptr = ssd.ptr<float>(y+r0) + r0;

View File

@@ -447,7 +447,7 @@ float cv::Mesh3D::estimateResolution(float tryRatio)
size_t tryNum = static_cast<size_t>(tryRatio * vtx.size());
tryNum = min(max(tryNum, minReasonable), vtx.size());
CvMat desc = cvMat(vtx.size(), 3, CV_32F, &vtx[0]);
CvMat desc = cvMat((int)vtx.size(), 3, CV_32F, &vtx[0]);
CvFeatureTree* tr = cvCreateKDTree(&desc);
vector<double> dist(tryNum * neighbors);
@@ -458,9 +458,9 @@ float cv::Mesh3D::estimateResolution(float tryRatio)
for(size_t i = 0; i < tryNum; ++i)
query.push_back(vtx[rng.next() % vtx.size()]);
CvMat cvinds = cvMat( tryNum, neighbors, CV_32S, &inds[0] );
CvMat cvdist = cvMat( tryNum, neighbors, CV_64F, &dist[0] );
CvMat cvquery = cvMat( tryNum, 3, CV_32F, &query[0] );
CvMat cvinds = cvMat( (int)tryNum, neighbors, CV_32S, &inds[0] );
CvMat cvdist = cvMat( (int)tryNum, neighbors, CV_64F, &dist[0] );
CvMat cvquery = cvMat( (int)tryNum, 3, CV_32F, &query[0] );
cvFindFeatures(tr, &cvquery, &cvinds, &cvdist, neighbors, 50);
cvReleaseFeatureTree(tr);
@@ -753,7 +753,7 @@ Mat cv::SpinImageModel::packRandomScaledSpins(bool separateScale, size_t xCount,
int sz = spins.front().cols;
Mat result(yCount * sz + (yCount - 1), xCount * sz + (xCount - 1), CV_8UC3);
Mat result((int)(yCount * sz + (yCount - 1)), (int)(xCount * sz + (xCount - 1)), CV_8UC3);
result = colors[(static_cast<int64>(cvGetTickCount()/cvGetTickFrequency())/1000) % colors_mum];
size_t pos = 0;
@@ -761,11 +761,11 @@ Mat cv::SpinImageModel::packRandomScaledSpins(bool separateScale, size_t xCount,
for(size_t x = 0; x < xCount; ++x)
if (pos < num)
{
int starty = (y + 0) * sz + y;
int endy = (y + 1) * sz + y;
int starty = (int)((y + 0) * sz + y);
int endy = (int)((y + 1) * sz + y);
int startx = (x + 0) * sz + x;
int endx = (x + 1) * sz + x;
int startx = (int)((x + 0) * sz + x);
int endx = (int)((x + 1) * sz + x);
Mat color;
cvtColor(spins[pos++], color, CV_GRAY2BGR);
@@ -802,7 +802,7 @@ void cv::SpinImageModel::selectRandomSubset(float ratio)
for(size_t i = 0; i < setSize; ++i)
{
int pos = rnd.next() % left.size();
subset[i] = left[pos];
subset[i] = (int)left[pos];
left[pos] = left.back();
left.resize(left.size() - 1);
@@ -821,14 +821,14 @@ void cv::SpinImageModel::repackSpinImages(const vector<uchar>& mask, Mat& spinIm
if (reAlloc)
{
size_t spinCount = mask.size() - count(mask.begin(), mask.end(), (uchar)0);
Mat newImgs(spinCount, spinImages.cols, spinImages.type());
Mat newImgs((int)spinCount, spinImages.cols, spinImages.type());
int pos = 0;
for(size_t t = 0; t < mask.size(); ++t)
if (mask[t])
{
Mat row = newImgs.row(pos++);
spinImages.row(t).copyTo(row);
spinImages.row((int)t).copyTo(row);
}
spinImages = newImgs;
}
@@ -836,7 +836,7 @@ void cv::SpinImageModel::repackSpinImages(const vector<uchar>& mask, Mat& spinIm
{
int last = (int)mask.size();
int dest = find(mask.begin(), mask.end(), (uchar)0) - mask.begin();
int dest = (int)(find(mask.begin(), mask.end(), (uchar)0) - mask.begin());
if (dest == last)
return;
@@ -942,7 +942,7 @@ void cv::SpinImageModel::matchSpinToModel(const Mat& spin, vector<int>& indeces,
if (masks[i])
if (/* corrs[i] < histThresLo || */ corrs[i] > histThresHi)
{
indeces.push_back(i);
indeces.push_back((int)i);
corrCoeffs.push_back(corrs[i]);
}
}
@@ -975,7 +975,7 @@ struct WgcHelper
/* Wgc( correspondence_C, group_{C1..Cn} ) = max_i=1..n_( Wgc(C, Ci) ) */
float Wgc(const size_t corespInd, const group_t& group) const
{
const float* wgcLine = mat.ptr<float>(corespInd);
const float* wgcLine = mat.ptr<float>((int)corespInd);
float maximum = numeric_limits<float>::min();
for(citer pos = group.begin(); pos != group.end(); ++pos)
@@ -1046,17 +1046,17 @@ private:
allMatches.end());
if (out) *out << "Matches number [filtered by similarity measure] = " << allMatches.size() << endl;
size_t matchesSize = allMatches.size();
int matchesSize = (int)allMatches.size();
if(matchesSize == 0)
return;
/* filtering by geometric consistency */
for(size_t i = 0; i < matchesSize; ++i)
for(int i = 0; i < matchesSize; ++i)
{
size_t consistNum = 1;
float gc = float_max;
for(size_t j = 0; j < matchesSize; ++j)
for(int j = 0; j < matchesSize; ++j)
if (i != j)
{
const Match& mi = allMatches[i];
@@ -1096,18 +1096,18 @@ private:
if (out) *out << "Matches number [filtered by geometric consistency] = " << allMatches.size() << endl;
matchesSize = allMatches.size();
matchesSize = (int)allMatches.size();
if(matchesSize == 0)
return;
if (out) *out << "grouping ..." << endl;
Mat groupingMat(matchesSize, matchesSize, CV_32F);
Mat groupingMat((int)matchesSize, (int)matchesSize, CV_32F);
groupingMat = Scalar(0);
/* grouping */
for(size_t j = 0; j < matchesSize; ++j)
for(size_t i = j + 1; i < matchesSize; ++i)
for(int j = 0; j < matchesSize; ++j)
for(int i = j + 1; i < matchesSize; ++i)
{
const Match& mi = allMatches[i];
const Match& mj = allMatches[j];