icub-client
main.cpp
Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 /*
4 * Copyright (C) 2014 WYSIWYD Consortium, European Commission FP7 Project ICT-612139
5 * Authors: Hyung Jin Chang
6 * email: hj.chang@imperial.ac.uk
7 * website: http://wysiwyd.upf.edu/
8 * Permission is granted to copy, distribute, and/or modify this program
9 * under the terms of the GNU General Public License, version 2 or any
10 * later version published by the Free Software Foundation.
11 *
12 * A copy of the license can be found at
13 * icub-client/license/gpl.txt
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18 * Public License for more details
19 */
20 
21 #include "faceTracker.h"
22 
23 using namespace yarp::os;
24 using namespace yarp::sig;
25 using namespace yarp::sig::draw;
26 using namespace yarp::sig::file;
27 using namespace yarp::dev;
28 using namespace std;
29 
30 int main(int argc, char * argv[]) {
31  /* initialize yarp network */
32  Network yarp; // set up yarp
33 
34  if(!yarp.checkNetwork())
35  {
36  cout << "yarp network is not available for faceTracker!" << endl;
37  return -1;
38  }
39 
40  /* prepare and configure the resource finder */
41  ResourceFinder rf;
42  rf.setVerbose(true);
43  rf.setDefaultConfigFile("faceTracker.ini"); //overridden by --from parameter
44  rf.setDefaultContext("faceTracker"); //overridden by --context parameter
45  rf.configure(argc, argv);
46 
47  /* create your module */
48  faceTrackerModule module;
49 
50  /* run the module: runModule() calls configure first and, if successful, it then runs */
51  yInfo() << "Start face tracking...";
52  module.runModule(rf);
53 
54  return 0;
55 }
56 
STL namespace.
int main()
Definition: main.cpp:32