-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathioFunctions.h
More file actions
36 lines (23 loc) · 1.13 KB
/
ioFunctions.h
File metadata and controls
36 lines (23 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef IOFUNCTIONS
#define IOFUNCTIONS
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <typeinfo>
#include <iomanip>
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/core/mat.hpp>
class io {
public:
static std::vector <float> readBinary(const std::string filename);
static cv::Mat readCSV(const std::string filename, char delimiter = ',');
static void writeMatrixToFile(cv::Mat inputMatrix, std::string filename, std::string delimiter = " ", int space = 15);
static void mergeFiles(std::string file_1, std::string file_2, std::string new_file, std::string delimiter = " ");
static void writeVectorToFile(std::vector<float> inputVector, std::string filename, std::string delimiter = " ");
static void exportDisparityTo3D(std::string output_name, cv::Mat disparity_mat, double baseline, double cx, double cy, double f, double doffs);
static void readCalibrationData(const std::string filename, std::vector<std::string>& calibration_data);
static void readLadimoCalibration(const std::string filename, std::vector<std::string>& calibration_data);
};
#endif // !IOFUNCTIONS