diff --git a/include/basalt/optical_flow/frame_to_frame_optical_flow.h b/include/basalt/optical_flow/frame_to_frame_optical_flow.h index 0cfd752..9ede196 100644 --- a/include/basalt/optical_flow/frame_to_frame_optical_flow.h +++ b/include/basalt/optical_flow/frame_to_frame_optical_flow.h @@ -51,6 +51,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace basalt { +/// Unlike PatchOpticalFlow, FrameToFrameOpticalFlow always tracks patches +/// against the previous frame, not the initial frame where a track was created. +/// While it might cause more drift of the patch location, it leads to longer +/// tracks in practice. template typename Pattern> class FrameToFrameOpticalFlow : public OpticalFlowBase { public: diff --git a/include/basalt/optical_flow/multiscale_frame_to_frame_optical_flow.h b/include/basalt/optical_flow/multiscale_frame_to_frame_optical_flow.h index f30e928..c3473e3 100644 --- a/include/basalt/optical_flow/multiscale_frame_to_frame_optical_flow.h +++ b/include/basalt/optical_flow/multiscale_frame_to_frame_optical_flow.h @@ -54,6 +54,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace basalt { +/// MultiscaleFrameToFrameOpticalFlow is the same as FrameToFrameOpticalFlow, +/// but patches can be created at all pyramid levels, not just the lowest +/// pyramid. template typename Pattern> class MultiscaleFrameToFrameOpticalFlow : public OpticalFlowBase { public: diff --git a/include/basalt/optical_flow/patch_optical_flow.h b/include/basalt/optical_flow/patch_optical_flow.h index 81c891d..72a2466 100644 --- a/include/basalt/optical_flow/patch_optical_flow.h +++ b/include/basalt/optical_flow/patch_optical_flow.h @@ -50,6 +50,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace basalt { +// TODO: patches are currently never erased, so over time memory consumption +// increases +// TODO: some changes from FrameToFrameOpticalFlow could be back-ported +// (adjustments to Scalar=float, tbb parallelization, ...). + +/// PatchOpticalFlow keeps reference patches from the frame where the point was +/// initially created. Should result in more consistent tracks (less drift over +/// time) than frame-to-frame tracking, but it results in shorter tracks in +/// practice. template typename Pattern> class PatchOpticalFlow : public OpticalFlowBase { public: