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

documentation on the interface

parent b0011ee9
No related branches found
No related tags found
2 merge requests!105CUDA optical flow smoothing,!103feature/frame class
Pipeline #13346 passed
This commit is part of merge request !105. Comments created here will be created in the context of that merge request.
......@@ -71,9 +71,14 @@ public:
* @param Channel type
* @returns Reference to channel data
*
* Returns non-const reference to channel data. Invalidates other copies of
* the data (host/gpu) for the specified channel, next time getChannel() is
* called a memory transfer may occur.
* Returns non-const reference to channel memory. Invalidates other copies
* of the data (host/gpu) for the specified channel, next time getChannel()
* is called a memory transfer may occur.
*
* NOTE: If user of setChannel<T>() wants to modify contents instead of
* replacing them, getChannel<T>() needs to be called first to
* ensure there is valid contents in the returned reference!
* (TODO: interface could be improved)
*/
template <typename T> T& setChannel(const ftl::rgbd::channel_t& channel);
......
......@@ -118,6 +118,7 @@ void FixstarsSGM::compute(ftl::rgbd::Frame &frame, cv::cuda::Stream &stream)
#ifdef HAVE_OPTFLOW
if (use_off_)
{
frame.getChannel<Mat>(ftl::rgbd::kChanDisparity);
off_.filter(frame.setChannel<Mat>(ftl::rgbd::kChanDisparity), Mat(lbw_));
}
#endif
......
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