RSLightFields
Disparity map estimator from 3D light fields
rslf_types.hpp
Go to the documentation of this file.
1 #ifndef _RSLF_TYPES
2 #define _RSLF_TYPES
3 
4 //~ #include <vector>
5 //~ #include <string>
6 
7 #include <opencv2/core/core.hpp>
8 
9 
16 namespace rslf
17 {
18 
19 /*
20  * Aliases
21  */
22 
26 using Mat = cv::Mat;
27 
31 template<typename T>
32 using Vec = std::vector<T>;
33 
40 std::string type2str(int type);
41 
45 template<typename DataType>
46 DataType nan_type();
47 
51 template<typename DataType>
52 bool is_nan_type(DataType x);
53 
54 template<>
55 bool is_nan_type<float>(float x);
56 
57 template<>
58 bool is_nan_type<cv::Vec3f>(cv::Vec3f x);
59 
63 template<typename DataType>
64 cv::Scalar zero_scalar();
65 
66 template<>
67 cv::Scalar zero_scalar<float>();
68 
69 template<>
70 cv::Scalar zero_scalar<cv::Vec3f>();
71 
75 template<typename DataType>
76 float norm(DataType x);
77 
78 
79 }
80 
81 #endif
std::string type2str(int type)
Get an explicit form of an OpenCV type.
Definition: rslf_types.cpp:52
std::vector< T > Vec
RSLF Vector class (std::vector)
Definition: rslf_types.hpp:32
Definition: rslf_depth_computation.hpp:14
float norm(DataType x)
Implement the euclidean norm.
bool is_nan_type(DataType x)
Check whether the element is NaN.
DataType nan_type()
Implement NaN.
cv::Mat Mat
RSLF Matrix class (cv::Mat)
Definition: rslf_types.hpp:26
cv::Scalar zero_scalar()
Impelment zero.