~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/CsvReader.h

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef CSVREADER_H
 
2
#define CSVREADER_H
 
3
 
 
4
#include <iostream>
 
5
#include <fstream>
 
6
#include <opencv2/core/core.hpp>
 
7
#include "Utils.h"
 
8
 
 
9
using namespace std;
 
10
using namespace cv;
 
11
 
 
12
class CsvReader {
 
13
public:
 
14
  /**
 
15
  * The default constructor of the CSV reader Class.
 
16
  * The default separator is ' ' (empty space)
 
17
  *
 
18
  * @param path - The path of the file to read
 
19
  * @param separator - The separator character between words per line
 
20
  * @return
 
21
  */
 
22
  CsvReader(const string &path, const char &separator = ' ');
 
23
 
 
24
  /**
 
25
  * Read a plane text file with .ply format
 
26
  *
 
27
  * @param list_vertex - The container of the vertices list of the mesh
 
28
  * @param list_triangle - The container of the triangles list of the mesh
 
29
  * @return
 
30
  */
 
31
  void readPLY(vector<Point3f> &list_vertex, vector<vector<int> > &list_triangles);
 
32
 
 
33
private:
 
34
  /** The current stream file for the reader */
 
35
  ifstream _file;
 
36
  /** The separator character between words for each line */
 
37
  char _separator;
 
38
};
 
39
 
 
40
#endif