RSLightFields
Disparity map estimator from 3D light fields
rslf_io.hpp
Go to the documentation of this file.
1 #ifndef _RSLF_IO
2 #define _RSLF_IO
3 
4 
5 #include <rslf_types.hpp>
6 #include <opencv2/highgui/highgui.hpp>
7 
8 
15 namespace rslf
16 {
17 
18 
19 /*
20  * *****************************************************************
21  * Reading/Writing matrices
22  * *****************************************************************
23  */
24 
25 
36 (
37  std::string path_to_folder,
38  std::string name_we,
39  std::string extension,
40  int cv_read_mode = CV_LOAD_IMAGE_UNCHANGED,
41  bool transpose = false,
42  bool rotate_180 = false
43 );
44 
53 std::vector<Mat> read_imgs_from_folder
54 (
55  std::string path_to_folder,
56  std::string extension,
57  int cv_read_mode = CV_LOAD_IMAGE_UNCHANGED,
58  bool transpose = false,
59  bool rotate_180 = false
60 );
61 
71 (
72  Mat img,
73  std::string path_to_folder,
74  std::string name_we,
75  std::string extension = "yml"
76 );
77 
88 (
89  Mat img,
90  std::string path_to_folder,
91  std::string name_we,
92  std::string extension = "png",
93  std::vector<int> compression_params = std::vector<int>()
94 );
95 
105 (
106  std::string path_to_folder,
107  std::string name_we,
108  std::string extension = "yml"
109 );
110 
111 
112 /*
113  * *****************************************************************
114  * Building EPIs
115  * *****************************************************************
116  */
117 
128 (
129  Vec<Mat> imgs,
130  int row,
131  bool transpose = false,
132  bool rotate_180 = false
133 );
134 
143 Vec<Mat> build_epis_from_imgs
144 (
145  Vec<Mat> imgs,
146  bool transpose = false,
147  bool rotate_180 = false
148 );
149 
163 (
164  std::string path_to_folder,
165  std::string extension,
166  int row,
167  int cv_read_mode = CV_LOAD_IMAGE_UNCHANGED,
168  bool transpose = false,
169  bool rotate_180 = false
170 );
171 
172 }
173 
174 #endif
std::vector< Mat > read_imgs_from_folder(std::string path_to_folder, std::string extension, int cv_read_mode=CV_LOAD_IMAGE_UNCHANGED, bool transpose=false, bool rotate_180=false)
Definition: rslf_io.cpp:47
Definition: rslf_depth_computation.hpp:14
Implement a toolbox of utilitary functions.
Mat build_row_epi_from_imgs(Vec< Mat > imgs, int row, bool transpose=false, bool rotate_180=false)
Assume we have a set of rectified images such that the epipolar planes are on the lines...
Definition: rslf_io.cpp:159
void write_mat_to_imgfile(Mat img, std::string path_to_folder, std::string name_we, std::string extension="png", std::vector< int > compression_params=std::vector< int >())
Mat read_img_from_file(std::string path_to_folder, std::string name_we, std::string extension, int cv_read_mode=CV_LOAD_IMAGE_UNCHANGED, bool transpose=false, bool rotate_180=false)
Definition: rslf_io.cpp:12
cv::Mat Mat
RSLF Matrix class (cv::Mat)
Definition: rslf_types.hpp:26
Vec< Mat > build_epis_from_imgs(Vec< Mat > imgs, bool transpose=false, bool rotate_180=false)
Assume we have a set of rectified images such that the epipolar planes are on the lines...
Definition: rslf_io.cpp:195
void write_mat_to_yml(Mat img, std::string path_to_folder, std::string name_we, std::string extension="yml")
Definition: rslf_io.cpp:99
Mat build_row_epi_from_path(std::string path_to_folder, std::string extension, int row, int cv_read_mode=CV_LOAD_IMAGE_UNCHANGED, bool transpose=false, bool rotate_180=false)
Assume we have a set of rectified images such that the epipolar planes are on the lines in a folder...
Definition: rslf_io.cpp:230
Mat read_mat_from_yml(std::string path_to_folder, std::string name_we, std::string extension="yml")
Definition: rslf_io.cpp:136