1 Star 0 Fork 0

重剑无锋/klt_feature_tracker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

The klt_feature_tracker repository is a ROS package that provides feature tracking capabilities.

This functionality is provided through a library klt_feature_tracker with a single function trackFeatures().

To use this library in your ROS package, add the following to your CMakeLists.txt:

  • find_package(klt_feature_tracker)
  • include_directories(${klt_feature_tracker_INCLUDE_DIRS})
  • target_link_libraries(my_node ${klt_feature_tracker_LIBRARIES})

You can then use the function trackFeatures(const cv::Mat &img_l, const cv::Mat &img_r, std::vector<cv::Point2f> &features_l, std::vector<cv::Point2f> &features_r, std::vector<int> &status, int stereo). The library is suitable for use with stereo images or monocular images. For monocular applications, only the 'left' images and features are used.

Call the function with the following arguments:

  • cv::Mat &img_l: The left (or only) image as an OpenCV matrix.
  • cv::Mat &img_r: The right image as an OpenCV matrix. For monocular applications, this can be an empty image.
  • std::vector<cv::Point2f> &features_l: A vector of feature points tracked in the left image.
  • std::vector<cv::Point2f> &features_r: A vector of feature points tracked in the right image.
  • std::vector<int> &status: A vector used to communicate the status of each feature (see below).
  • int stereo: Select the stereo mode.
    • stereo = 0: Monocular mode: The right image will not be used and features_r will be meaningless.
    • stereo = 1: Semi-stereo mode: Newly initialized features will have both left and right image measurements, other features will only be tracked in the left image.
    • stereo = 2: Full-stereo mode: Features will always be tracked in both images.

The status vector is used to communicate with the library. It is used to request new features to be tracked and the tracker informs about the features state.

The size of status determines the number of features that are tracked.

The tracker interprets each entry of status as follows:

  • status[i] = 0: Feature i is inactive, do not track.
  • status[i] = 1: Feature i is active, track it according to stereo:
    • stereo = 0 or stereo = 1: Track the feature over time in the left image.
    • stereo = 2: Track the feature over time in the left image, then track from left to right image.
  • status[i] = 2: Feature i is to be initialized according to stereo:
    • stereo = 0: Initialize a feature using only img_l.
    • stereo = 1 or stereo = 2: Initialize a new feature and return left and right measurements.

The tracker writes each entry of status as follows:

  • status[i] = 0: Feature i is inactive, not tracked. This is either because status[i] was 0 when the trackFeatures was called, or the tracker was not able to track the feature in the new image(s).
  • status[i] = 1: Feature i is active and successfully tracked according to stereo:
    • stereo = 0 or stereo = 1: features_l[i] is a meaninfull measurement.
    • stereo = 2: features_l[i] and features_l[i] are meaninfull measurements.
  • status[i] = 2: A new requested feature was successfully initialized according to stereo:
    • stereo = 0: features_l[i] is a meaninfull measurement.
    • stereo = 1 or stereo = 2: features_l[i] and features_l[i] are meaninfull measurements.
    • Note that if you request a new feature at position i with status[i] = 2, it is not guaranteed that a new feature can successfully be initialized. In case of success, status[i] will be left at 2, in case of failure it will be 0.
Copyright (c) 2016, Advanced Interactive Technologies Lab All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ait_ros_messages nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
README
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sdkmsdn_admin/klt_feature_tracker.git
git@gitee.com:sdkmsdn_admin/klt_feature_tracker.git
sdkmsdn_admin
klt_feature_tracker
klt_feature_tracker
master

搜索帮助