From d0ce9ae3c4a6fdc5f147c92263933499aed055a7 Mon Sep 17 00:00:00 2001 From: Christian Forster Date: Thu, 1 May 2014 18:28:47 +0200 Subject: [PATCH] 1D alignment for edgelets seems to work better --- svo/src/matcher.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/svo/src/matcher.cpp b/svo/src/matcher.cpp index bced525..f3098e7 100644 --- a/svo/src/matcher.cpp +++ b/svo/src/matcher.cpp @@ -170,9 +170,22 @@ bool Matcher::findMatchDirect( // px_cur should be set Vector2d px_scaled(px_cur/(1<type == Feature::EDGELET) + { + Vector2d dir_cur(A_cur_ref_*ref_ftr_->grad); + dir_cur.normalize(); + success = feature_alignment::align1D( + cur_frame.img_pyr_[search_level_], dir_cur.cast(), + patch_with_border_, patch_, options_.align_max_iter, px_scaled, h_inv_); + } + else + { + success = feature_alignment::align2D( cur_frame.img_pyr_[search_level_], patch_with_border_, patch_, options_.align_max_iter, px_scaled); + } px_cur = px_scaled * (1<