1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #1567 from ilya-lavrenov:warn_fix

This commit is contained in:
Roman Donchenko
2013-10-08 13:50:49 +04:00
committed by OpenCV Buildbot
23 changed files with 98 additions and 98 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ static Mat _localAffineEstimate(const std::vector<Point2f>& shape1, const std::v
bool fullAfine)
{
Mat out(2,3,CV_32F);
int siz=2*shape1.size();
int siz=2*(int)shape1.size();
if (fullAfine)
{
+5 -5
View File
@@ -67,10 +67,10 @@ public:
comparer=_comparer;
iterations=_iterations;
transformer=_transformer;
bendingEnergyWeight=0.3;
imageAppearanceWeight=0.0;
shapeContextWeight=1.0;
sigma=10;
bendingEnergyWeight=0.3f;
imageAppearanceWeight=0.0f;
shapeContextWeight=1.0f;
sigma=10.0f;
name_ = "ShapeDistanceExtractor.SCD";
}
@@ -505,7 +505,7 @@ void SCDMatcher::hungarian(cv::Mat &costMatrix, std::vector<cv::DMatch> &outMatc
std::vector<int> matches(costMatrix.rows, 0), colsol(costMatrix.rows), rowsol(costMatrix.rows);
std::vector<float> d(costMatrix.rows), pred(costMatrix.rows), v(costMatrix.rows);
const float LOWV=1e-10;
const float LOWV = 1e-10f;
bool unassignedfound;
int i=0, imin=0, numfree=0, prvnumfree=0, f=0, i0=0, k=0, freerow=0;
int j=0, j1=0, j2=0, endofpath=0, last=0, low=0, up=0;
+13 -13
View File
@@ -212,9 +212,9 @@ void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts
}
// Organizing the correspondent points in matrix style //
Mat shape1(matches.size(),2,CV_32F); // transforming shape
Mat shape2(matches.size(),2,CV_32F); // target shape
for (size_t i=0; i<matches.size(); i++)
Mat shape1((int)matches.size(),2,CV_32F); // transforming shape
Mat shape2((int)matches.size(),2,CV_32F); // target shape
for (int i=0, end = (int)matches.size(); i<end; i++)
{
Point2f pt1=pts1.at<Point2f>(0,matches[i].queryIdx);
shape1.at<float>(i,0) = pt1.x;
@@ -229,11 +229,11 @@ void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts
// Building the matrices for solving the L*(w|a)=(v|0) problem with L={[K|P];[P'|0]}
//Building K and P (Neede to buil L)
Mat matK(matches.size(),matches.size(),CV_32F);
Mat matP(matches.size(),3,CV_32F);
for (size_t i=0; i<matches.size(); i++)
Mat matK((int)matches.size(),(int)matches.size(),CV_32F);
Mat matP((int)matches.size(),3,CV_32F);
for (int i=0, end=(int)matches.size(); i<end; i++)
{
for (size_t j=0; j<matches.size(); j++)
for (int j=0; j<end; j++)
{
if (i==j)
{
@@ -251,19 +251,19 @@ void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts
}
//Building L
Mat matL=Mat::zeros(matches.size()+3,matches.size()+3,CV_32F);
Mat matLroi(matL, Rect(0,0,matches.size(),matches.size())); //roi for K
Mat matL=Mat::zeros((int)matches.size()+3,(int)matches.size()+3,CV_32F);
Mat matLroi(matL, Rect(0,0,(int)matches.size(),(int)matches.size())); //roi for K
matK.copyTo(matLroi);
matLroi = Mat(matL,Rect(matches.size(),0,3,matches.size())); //roi for P
matLroi = Mat(matL,Rect((int)matches.size(),0,3,(int)matches.size())); //roi for P
matP.copyTo(matLroi);
Mat matPt;
transpose(matP,matPt);
matLroi = Mat(matL,Rect(0,matches.size(),matches.size(),3)); //roi for P'
matLroi = Mat(matL,Rect(0,(int)matches.size(),(int)matches.size(),3)); //roi for P'
matPt.copyTo(matLroi);
//Building B (v|0)
Mat matB = Mat::zeros(matches.size()+3,2,CV_32F);
for (size_t i=0; i<matches.size(); i++)
Mat matB = Mat::zeros((int)matches.size()+3,2,CV_32F);
for (int i=0, end = (int)matches.size(); i<end; i++)
{
matB.at<float>(i,0) = shape2.at<float>(i,0); //x's
matB.at<float>(i,1) = shape2.at<float>(i,1); //y's