Skip to content
Snippets Groups Projects

feature/frame class

Merged Sebastian Hahta requested to merge feature/stereovideo-refactor into master
Files
5
@@ -12,15 +12,17 @@ namespace rgbd {
typedef unsigned int channel_t;
static const channel_t kChanNone = 0;
static const channel_t kChanLeft = 0x0001;
static const channel_t kChanDepth = 0x0002;
static const channel_t kChanRight = 0x0004;
static const channel_t kChanDisparity = 0x0008;
static const channel_t kChanLeft = 0x0001; // CV_8UC3
static const channel_t kChanDepth = 0x0002; // CV_32FC1
static const channel_t kChanRight = 0x0004; // CV_8UC3
static const channel_t kChanDisparity = 0x0008; // CV_32FC1
static const channel_t kChanDeviation = 0x0010;
static const channel_t kChanNormals = 0x0020;
static const channel_t kChanConfidence = 0x0040;
static const channel_t kChanFlow = 0x0080;
static const channel_t kChanFlow = 0x0080; // CV_32FC2 or CV_16FC2 (fix)
static const channel_t kChanEnergy = 0x0100;
//static const channel_t kChanLeftGray = 0x0200; // not used // CV_8UC1
//static const channel_t kChanRightGray = 0x0400; // not used // CV_8UC1
static const channel_t kChanOverlay1 = 0x1000;
@@ -56,6 +58,7 @@ public:
/* @brief Method to get reference to the channel content
* @param Channel type
* @param CUDA stream
* @returns Const reference to channel data
*
* Result is valid only if hasChannel() is true. Host/Gpu transfer is
@@ -63,10 +66,9 @@ public:
* changed by calling setChannel(). Return value valid only if
* hasChannel(channel) is true.
*/
template <typename T> const T& getChannel(const ftl::rgbd::channel_t& channel, cv::cuda::Stream& stream);
template <typename T> const T& getChannel(const ftl::rgbd::channel_t& channel);
/* @brief Method to set/modify channel content
* @param Channel type
* @returns Reference to channel data
@@ -98,6 +100,8 @@ private:
case kChanConfidence: return 7;
case kChanFlow: return 8;
case kChanEnergy: return 9;
// case kChanLeftGray: return 11;
// case kChanRightGray: return 12;
// should not happen (error); returned index is kChanNone
default: return 0;
}
@@ -113,9 +117,13 @@ private:
std::vector<uint> available_;
};
template<> const cv::Mat& Frame::getChannel(const ftl::rgbd::channel_t& channel, cv::cuda::Stream& stream);
template<> const cv::cuda::GpuMat& Frame::getChannel(const ftl::rgbd::channel_t& channel, cv::cuda::Stream& stream);
template<> const cv::Mat& Frame::getChannel(const ftl::rgbd::channel_t& channel);
template<> cv::Mat& Frame::setChannel(const ftl::rgbd::channel_t& channel);
template<> const cv::cuda::GpuMat& Frame::getChannel(const ftl::rgbd::channel_t& channel);
template<> cv::Mat& Frame::setChannel(const ftl::rgbd::channel_t& channel);
template<> cv::cuda::GpuMat& Frame::setChannel(const ftl::rgbd::channel_t& channel);
}
Loading