From 285cfe2878796407e096957701e11b04c5b0feed Mon Sep 17 00:00:00 2001 From: dominikmuhle Date: Sat, 9 Oct 2021 20:04:22 +0200 Subject: [PATCH] fix: use optical flow levels from config --- include/basalt/optical_flow/patch_optical_flow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/basalt/optical_flow/patch_optical_flow.h b/include/basalt/optical_flow/patch_optical_flow.h index c99516b..0710bd4 100644 --- a/include/basalt/optical_flow/patch_optical_flow.h +++ b/include/basalt/optical_flow/patch_optical_flow.h @@ -298,7 +298,7 @@ class PatchOpticalFlow : public OpticalFlowBase { Vector2 pos = kd.corners[i].cast(); - for (int l = 0; l < 4; l++) { + for (int l = 0; l <= config.optical_flow_levels; l++) { Scalar scale = 1 << l; Vector2 pos_scaled = pos / scale; p.emplace_back(pyramid->at(0).lvl(l), pos_scaled);