From 3569e18f0e44c544a640f38a3499a3dcc012650f Mon Sep 17 00:00:00 2001 From: Maria Dimashova Date: Wed, 10 Aug 2011 11:36:55 +0000 Subject: [PATCH] fixed compile errors and warning on ubuntu64 --- samples/cpp/build3dmodel.cpp | 2 +- samples/cpp/camshiftdemo.cpp | 12 ++++++------ samples/cpp/chamfer.cpp | 24 ++++++++++++------------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/samples/cpp/build3dmodel.cpp b/samples/cpp/build3dmodel.cpp index 5ef25f4b7b..081c9db336 100644 --- a/samples/cpp/build3dmodel.cpp +++ b/samples/cpp/build3dmodel.cpp @@ -251,7 +251,7 @@ static void findConstrainedCorrespondences(const Mat& _F, if( dist < threshold ) break; } - if( i1 == keypoints1.size() ) + if( i1 == (int)keypoints1.size() ) matches.push_back(Vec2i(i,bestIdx1)); } } diff --git a/samples/cpp/camshiftdemo.cpp b/samples/cpp/camshiftdemo.cpp index b726643f1b..921ac9ed3f 100644 --- a/samples/cpp/camshiftdemo.cpp +++ b/samples/cpp/camshiftdemo.cpp @@ -47,19 +47,19 @@ void onMouse( int event, int x, int y, int, void* ) void help() { - printf("\nThis is a demo that shows mean-shift based tracking\n" + cout << "\nThis is a demo that shows mean-shift based tracking\n" "You select a color objects such as your face and it tracks it.\n" "This reads from video camera (0 by default, or the camera number the user enters\n" "Usage: \n" - " ./camshiftdemo [camera number]\n"); + " ./camshiftdemo [camera number]\n"; - printf("\n\nHot keys: \n" + cout << "\n\nHot keys: \n" "\tESC - quit the program\n" "\tc - stop the tracking\n" "\tb - switch to/from backprojection view\n" "\th - show/hide object histogram\n" "\tp - pause video\n" - "To initialize tracking, select the object with mouse\n"); + "To initialize tracking, select the object with mouse\n"; } const char* keys = @@ -85,8 +85,8 @@ int main( int argc, const char** argv ) if( !cap.isOpened() ) { help(); - printf("***Could not initialize capturing...***\n"); - printf("Current parameter's value: \n"); + cout << "***Could not initialize capturing...***\n"; + cout << "Current parameter's value: \n"; parser.printParams(); return -1; } diff --git a/samples/cpp/chamfer.cpp b/samples/cpp/chamfer.cpp index 062873df7e..2c03d3dc37 100644 --- a/samples/cpp/chamfer.cpp +++ b/samples/cpp/chamfer.cpp @@ -2,19 +2,19 @@ #include "opencv2/highgui/highgui.hpp" #include "opencv2/contrib/contrib.hpp" +#include + using namespace cv; using namespace std; void help() { - printf("\nThis program demonstrates Chamfer matching -- computing a distance between an \n" - "edge template and a query edge image.\n" - "Usage: \n" - "./chamfer