fixed some more MSVC2010 warnings
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
using namespace cv;
|
||||
|
||||
void drawOptFlowMap(const Mat& flow, Mat& cflowmap, int step,
|
||||
double scale, const Scalar& color)
|
||||
double, const Scalar& color)
|
||||
{
|
||||
for(int y = 0; y < cflowmap.rows; y += step)
|
||||
for(int x = 0; x < cflowmap.cols; x += step)
|
||||
@@ -18,7 +18,7 @@ void drawOptFlowMap(const Mat& flow, Mat& cflowmap, int step,
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
int main(int, char**)
|
||||
{
|
||||
VideoCapture cap(0);
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
//Calonder descriptor sample
|
||||
#include <stdio.h>
|
||||
|
||||
#if 0
|
||||
#include <cxcore.h>
|
||||
#include <cv.h>
|
||||
#include <cvaux.h>
|
||||
@@ -84,13 +86,14 @@ float CalcAffineReprojectionError(const vector<CvPoint>& p1, const vector<CvPoin
|
||||
|
||||
return error;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int main( int argc, char** argv )
|
||||
int main( int, char** )
|
||||
{
|
||||
printf("calonder_sample is under construction\n");
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
IplImage* test_image;
|
||||
IplImage* train_image;
|
||||
if (argc < 3)
|
||||
@@ -302,4 +305,5 @@ int main( int argc, char** argv )
|
||||
cvReleaseImage(&test_image);
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
@@ -149,7 +149,7 @@ void GCApplication::setLblsInMask( int flags, Point p, bool isPr )
|
||||
}
|
||||
}
|
||||
|
||||
void GCApplication::mouseClick( int event, int x, int y, int flags, void* param )
|
||||
void GCApplication::mouseClick( int event, int x, int y, int flags, void* )
|
||||
{
|
||||
// TODO add bad args check
|
||||
switch( event )
|
||||
|
@@ -14,7 +14,7 @@ IplImage* markers = 0;
|
||||
IplImage* img0 = 0, *img = 0, *img_gray = 0, *wshed = 0;
|
||||
CvPoint prev_pt = {-1,-1};
|
||||
|
||||
void on_mouse( int event, int x, int y, int flags, void* param )
|
||||
void on_mouse( int event, int x, int y, int flags, void* )
|
||||
{
|
||||
if( !img )
|
||||
return;
|
||||
|
@@ -54,7 +54,7 @@ static double computeReprojectionErrors(
|
||||
cameraMatrix, distCoeffs, imagePoints2);
|
||||
err = norm(Mat(imagePoints[i]), Mat(imagePoints2), CV_L1 );
|
||||
int n = (int)objectPoints[i].size();
|
||||
perViewErrors[i] = err/n;
|
||||
perViewErrors[i] = (float)(err/n);
|
||||
totalErr += err;
|
||||
totalPoints += n;
|
||||
}
|
||||
@@ -94,8 +94,7 @@ static bool runCalibration( vector<vector<Point2f> > imagePoints,
|
||||
calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix,
|
||||
distCoeffs, rvecs, tvecs, flags);
|
||||
|
||||
bool ok = checkRange( cameraMatrix, CV_CHECK_QUIET ) &&
|
||||
checkRange( distCoeffs, CV_CHECK_QUIET );
|
||||
bool ok = checkRange(cameraMatrix) && checkRange(distCoeffs);
|
||||
|
||||
totalAvgErr = computeReprojectionErrors(objectPoints, imagePoints,
|
||||
rvecs, tvecs, cameraMatrix, distCoeffs, reprojErrs);
|
||||
|
@@ -10,7 +10,7 @@ int levels = 3;
|
||||
vector<vector<Point> > contours;
|
||||
vector<Vec4i> hierarchy;
|
||||
|
||||
void on_trackbar(int pos, void*)
|
||||
void on_trackbar(int, void*)
|
||||
{
|
||||
Mat cnt_img = Mat::zeros(w, w, CV_8UC3);
|
||||
int _levels = levels - 3;
|
||||
@@ -20,7 +20,7 @@ void on_trackbar(int pos, void*)
|
||||
imshow("contours", cnt_img);
|
||||
}
|
||||
|
||||
int main( int argc, char** argv )
|
||||
int main( int, char** )
|
||||
{
|
||||
Mat img = Mat::zeros(w, w, CV_8UC1);
|
||||
|
||||
|
@@ -86,7 +86,7 @@ IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1,
|
||||
|
||||
for (size_t i = 0; i < features2.size(); i++)
|
||||
{
|
||||
CvPoint pt = cvPoint(features2[i].pt.x + img1->width, features2[i].pt.y);
|
||||
CvPoint pt = cvPoint(cvRound(features2[i].pt.x + img1->width), cvRound(features2[i].pt.y));
|
||||
cvCircle(img_corr, pt, 3, CV_RGB(255, 0, 0));
|
||||
cvLine(img_corr, features1[desc_idx[i]].pt, pt, CV_RGB(0, 255, 0));
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ int main(int argc, char** argv)
|
||||
refineSegments(tmp_frame, bgmask, out_frame);
|
||||
imshow("video", tmp_frame);
|
||||
imshow("segmented", out_frame);
|
||||
char keycode = waitKey(30);
|
||||
int keycode = waitKey(30);
|
||||
if( keycode == 27 )
|
||||
break;
|
||||
if( keycode == ' ' )
|
||||
|
@@ -61,7 +61,7 @@ static Point3f image2plane(Point2f imgpt, const Mat& R, const Mat& tvec,
|
||||
R1.col(2) = R1.col(2)*Z + tvec;
|
||||
Mat_<double> v = (cameraMatrix*R1).inv()*(Mat_<double>(3,1) << imgpt.x, imgpt.y, 1);
|
||||
double iw = fabs(v(2,0)) > DBL_EPSILON ? 1./v(2,0) : 0;
|
||||
return Point3f(v(0,0)*iw, v(1,0)*iw, Z);
|
||||
return Point3f((float)(v(0,0)*iw), (float)(v(1,0)*iw), (float)Z);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ static int select3DBox(const string& windowname, const string& selWinName, const
|
||||
projectPoints(Mat(tempobj), rvec, tvec, cameraMatrix, Mat(), tempimg);
|
||||
|
||||
Point2f a = imgpt[nearestIdx], b = tempimg[0], d1 = b - a, d2 = m - a;
|
||||
float n1 = norm(d1), n2 = norm(d2);
|
||||
float n1 = (float)norm(d1), n2 = (float)norm(d2);
|
||||
if( n1*n2 < eps )
|
||||
imgpt[npt] = a;
|
||||
else
|
||||
@@ -458,7 +458,7 @@ int main(int argc, char** argv)
|
||||
vector<Point3f> box, boardPoints;
|
||||
|
||||
readModelViews(indexFilename, box, capturedImgList, roiList, poseList);
|
||||
calcChessboardCorners(boardSize, squareSize, boardPoints);
|
||||
calcChessboardCorners(boardSize, (float)squareSize, boardPoints);
|
||||
int frameIdx = 0;
|
||||
bool grabNext = !imageList.empty();
|
||||
|
||||
|
Reference in New Issue
Block a user