Template Class Frame
Defined in File frame.hpp
Class Documentation
-
template<typename T_PRECISION, int T_IMG_CHANNELS>
class Frame This class serves as a container class for frame data within the lib3D.
Typically one frame consists of:
a Name,
a Camera, with intrinsic, extrinsic and distortion parameters,
an input image,
a corrsponding undistorted image,
as well as numerous data maps (e.g. disparity map, depth map, …)
This class is templated with the precision of the data maps (T_PRECISION) and the number of channels corresponding to the input image (T_IMG_CHANNELS).
Public Functions
-
inline explicit Frame()
Default constructor.
This will initialize the name with “Frame_<seconds-since-epoch>”.
-
inline explicit Frame(const std::string iName)
Inititalization constructor.
Initializing the name with iName.
-
inline virtual ~Frame()
Destructor.
-
inline Frame &operator=(const Frame &rhs)
Copy assignment operator. This will make a deep copy of the content.
-
inline std::string &name()
Access name of frame by reference.
-
template<int ch = T_IMG_CHANNELS>
inline std::enable_if<(ch == 1), GrayscaleImage&>::type inputImg() Access input image by reference. If no input image exists yet, a new object is created.
-
template<int ch = T_IMG_CHANNELS>
inline std::enable_if<(ch == 3), ColorImage&>::type inputImg() Access input image by reference. If no input image exists yet, a new object is created.
-
template<int ch = T_IMG_CHANNELS>
inline std::enable_if<(ch == 1), GrayscaleImage&>::type undistortedImg() Access undistoted image by reference. If no undistoted image exists yet, a new object is created.
-
template<int ch = T_IMG_CHANNELS>
inline std::enable_if<(ch == 3), ColorImage&>::type undistortedImg() Access undistoted image by reference. If no undistoted image exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, float>::value, DisparityMap&>::type disparityMap() Access disparity map by reference. If no disparity map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, double>::value, DisparityMapD&>::type disparityMap() Access disparity map by reference. If no disparity map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, float>::value, DepthMap&>::type depthMap() Access depth map by reference. If no depth map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, double>::value, DepthMapD&>::type depthMap() Access depth map by reference. If no depth map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, float>::value, ConfidenceMap&>::type confidenceMap() Access confidence map by reference. If no confidence map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, double>::value, ConfidenceMapD&>::type confidenceMap() Access confidence map by reference. If no confidence map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, float>::value, NormalMap&>::type normalMap() Access normal map by reference. If no normal map exists yet, a new object is created.
-
template<typename pr = T_PRECISION>
inline std::enable_if<std::is_same<pr, double>::value, NormalMapD&>::type normalMap() Access normal map by reference. If no normal map exists yet, a new object is created.
-
inline bool containsInputImg() const
Check whether frame contains input image.
-
inline bool containsUndistortedImg() const
Check whether frame contains undistorted image.
-
inline bool containsDisparityMap() const
Check whether frame contains disparity map.
-
inline bool containsDepthMap() const
Check whether frame contains depth map.
-
inline bool containsConfidenceMap() const
Check whether frame contains confidence map.
-
inline bool containsNormalMap() const
Check whether frame contains confidence map.
-
inline void removeInputImg()
Remove input image from container.
-
inline void removeUndistortedImg()
Remove undistorted image from container.
-
inline void removeDisparityMap()
Remove disparity map from container.
-
inline void removeDepthMap()
Remove depth map from container.
-
inline void removeConfidenceMap()
Remove confidence map from container.
-
inline void removeNormalMap()
Remove normal map from container.
Protected Attributes
-
std::string mName
Name of the frame.
-
std::map<std::string, Image<uchar, T_IMG_CHANNELS>> mUcharImgs
Map holding uchar images with T_IMG_CHANNELS, i.e. Input image, undistorted image …
-
std::map<std::string, Image<T_PRECISION, 1>> mSingleChnDataMaps
Map holding single channel data maps with T_PRECISION per pixel, i.e. disparityMap, depthMap, confidenceMap …
-
std::map<std::string, Image<T_PRECISION, 3>> mTripleChnDataMaps
Map holding triple channel data maps with T_PRECISION per pixel, i.e. normalMap …