64 lines
1.9 KiB
C++
64 lines
1.9 KiB
C++
// This file is part of VIO - Semi-direct Visual Odometry.
|
|
//
|
|
// Copyright (C) 2014 Christian Forster <forster at ifi dot uzh dot ch>
|
|
// (Robotics and Perception Group, University of Zurich, Switzerland).
|
|
//
|
|
// VIO is free software: you can redistribute it and/or modify it under the
|
|
// terms of the GNU General Public License as published by the Free Software
|
|
// Foundation, either version 3 of the License, or any later version.
|
|
//
|
|
// VIO is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#ifndef VIO_FEATURE_ALIGNMENT_H_
|
|
#define VIO_FEATURE_ALIGNMENT_H_
|
|
|
|
#include <vio/global.h>
|
|
|
|
namespace vio {
|
|
|
|
/// Subpixel refinement of a reference feature patch with the current image.
|
|
/// Implements the inverse-compositional approach (see "Lucas-Kanade 20 Years on"
|
|
/// paper by Baker.
|
|
namespace feature_alignment {
|
|
|
|
bool align1D(
|
|
const cv::Mat& cur_img,
|
|
const Vector2f& dir, // direction in which the patch is allowed to move
|
|
uint8_t* ref_patch_with_border,
|
|
uint8_t* ref_patch,
|
|
const int n_iter,
|
|
Vector2d& cur_px_estimate,
|
|
double& h_inv);
|
|
|
|
bool align2D(
|
|
const cv::Mat& cur_img,
|
|
uint8_t* ref_patch_with_border,
|
|
uint8_t* ref_patch,
|
|
const int n_iter,
|
|
Vector2d& cur_px_estimate,
|
|
bool no_simd = false);
|
|
|
|
bool align2D_SSE2(
|
|
const cv::Mat& cur_img,
|
|
uint8_t* ref_patch_with_border,
|
|
uint8_t* ref_patch,
|
|
const int n_iter,
|
|
Vector2d& cur_px_estimate);
|
|
|
|
bool align2D_NEON(
|
|
const cv::Mat& cur_img,
|
|
uint8_t* ref_patch_with_border,
|
|
uint8_t* ref_patch,
|
|
const int n_iter,
|
|
Vector2d& cur_px_estimate);
|
|
|
|
} // namespace feature_alignment
|
|
} // namespace vio
|
|
|
|
#endif // VIO_FEATURE_ALIGNMENT_H_
|