diff --git a/components/rgbd-sources/include/ftl/rgbd/frame.hpp b/components/rgbd-sources/include/ftl/rgbd/frame.hpp index 15428e66539abe4a977cee9b50ab89a319979d7b..fa87424ad6f7808be9eeba3624e3060c7910d945 100644 --- a/components/rgbd-sources/include/ftl/rgbd/frame.hpp +++ b/components/rgbd-sources/include/ftl/rgbd/frame.hpp @@ -9,32 +9,33 @@ namespace rgbd { class Frame { public: - /* @todo REMOVE HARDCODED CHANNEL COUNT! + /* @todo TODO: REMOVE HARDCODED CHANNEL COUNT! */ 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() { std::fill(available_.begin(), available_.end(), 0); } - /* @brief Is there valid data in channel. Must be checked if user - * is not providing the data and it is uncertain that valid data is - * available. + /* @brief Is there valid data in channel (either host or gpu). */ bool hasChannel(const ftl::rgbd::channel_t& channel) { return available_[_channelIdx(channel)]; } - /* @brief Get reference to the channel. + /* @brief Get reference to the channel data. * @param Channel type * @param Output parameter * @param User of the method sets data. NOTE: Only works on unused * channels or if reset() was called previously (TODO). * @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)