Skip to content
Snippets Groups Projects
Commit f90f6872 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

documentation

parent 54836638
No related branches found
No related tags found
2 merge requests!105CUDA optical flow smoothing,!103feature/frame class
Pipeline #13261 passed
...@@ -9,32 +9,33 @@ namespace rgbd { ...@@ -9,32 +9,33 @@ namespace rgbd {
class Frame { class Frame {
public: public:
/* @todo REMOVE HARDCODED CHANNEL COUNT! /* @todo TODO: REMOVE HARDCODED CHANNEL COUNT!
*/ */
Frame() : channels_host_(11), channels_gpu_(11), available_(11, 0) {} Frame() : channels_host_(11), channels_gpu_(11), available_(11, 0) {}
/* @brief Reset all channels without releasing memory /* @brief Reset all channels without releasing memory.
*/ */
void reset() void reset()
{ {
std::fill(available_.begin(), available_.end(), 0); std::fill(available_.begin(), available_.end(), 0);
} }
/* @brief Is there valid data in channel. Must be checked if user /* @brief Is there valid data in channel (either host or gpu).
* is not providing the data and it is uncertain that valid data is
* available.
*/ */
bool hasChannel(const ftl::rgbd::channel_t& channel) bool hasChannel(const ftl::rgbd::channel_t& channel)
{ {
return available_[_channelIdx(channel)]; return available_[_channelIdx(channel)];
} }
/* @brief Get reference to the channel. /* @brief Get reference to the channel data.
* @param Channel type * @param Channel type
* @param Output parameter * @param Output parameter
* @param User of the method sets data. NOTE: Only works on unused * @param User of the method sets data. NOTE: Only works on unused
* channels or if reset() was called previously (TODO). * channels or if reset() was called previously (TODO).
* @returns True, if output parameter contains valid data * @returns True, if output parameter contains valid data
*
* Methods automatically copy between host/gpu if the data is only available
* in the other. Results are cached.
*/ */
bool getChannel(const ftl::rgbd::channel_t& channel, cv::Mat& out, bool set=false) bool getChannel(const ftl::rgbd::channel_t& channel, cv::Mat& out, bool set=false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment