系统入口是feature_tracker_node.cpp文件中的main函数

1. 首先创建feature_tracker节点,从配置文件中读取信息(parameters.cpp),包括:

  • ROS中发布订阅的话题名称;
  • 图像尺寸;
  • 特征跟踪参数;
  • 是否需要加上鱼眼mask来去除边缘噪点;
%YAML:1.0

#common parameters
imu_topic: "/imu0"
image_topic: "/cam0/image_raw" #camera calibration
model_type: PINHOLE
camera_name: camera
image_width:
image_height:
distortion_parameters:
k1: -2.917e-01
k2: 8.228e-02
p1: 5.333e-05
p2: -1.578e-04
projection_parameters:
fx: 4.616e+02
fy: 4.603e+02
cx: 3.630e+02
cy: 2.481e+02 # Extrinsic parameter between IMU and Camera.
estimate_extrinsic: # Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
# Have an initial guess about extrinsic parameters. We will optimize around your initial guess.
# Don't know anything about extrinsic parameters. You don't need to give R,T. We will try to calibrate it. Do some rotation movement at beginning.
ex_calib_result_path: "/config/euroc/ex_calib_result.yaml" # If you choose or , the extrinsic calibration result will be written vins_folder_path + ex_calib_result_path.
#If you choose or , you should write down the following matrix.
#Rotation from camera frame to imu frame, imu^R_cam
extrinsicRotation: !!opencv-matrix
rows:
cols:
dt: d
data: [, -, ,
, , ,
, , ]
#Translation from camera frame to imu frame, imu^T_cam
extrinsicTranslation: !!opencv-matrix
rows:
cols:
dt: d
data: [-0.02,-0.06, 0.01] #feature traker paprameters
max_cnt: # max feature number in feature tracking
min_dist: # min distance between two features
freq: # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set , the frequence will be same as raw image
F_threshold: 1.0 # ransac threshold (pixel)
show_track: # publish tracking image as topic
equalize: # if image is too dark or light, trun on equalize to find enough features
fisheye: # if using fisheye, trun on it. A circle mask will be loaded to remove edge noisy points #optimization parameters
max_solver_time: 0.04 # max solver itration time (ms), to guarantee real time
max_num_iterations: # max solver itrations, to guarantee real time
keyframe_parallax: 10.0 # keyframe selection threshold (pixel) #imu parameters The more accurate parameters you provide, the better performance
acc_n: 0.2 # accelerometer measurement noise standard deviation. #0.2
gyr_n: 0.02 # gyroscope measurement noise standard deviation. #0.05
acc_w: 0.0002 # accelerometer bias random work noise standard deviation. #0.02
gyr_w: 2.0e-5 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.81007 # gravity magnitude #loop closure parameters
loop_closure: #if you want to use loop closure to minimize the drift, set loop_closure true and give your brief pattern file path and vocabulary file path accordingly;
#also give the camera calibration file same as feature_tracker node
pattern_file: "/support_files/brief_pattern.yml"
voc_file: "/support_files/brief_k10L6.bin"
min_loop_num:

该config.yaml文件中的其他参数在vins_estimator_node中被读取,属于融合算法的参数。

  • 优化参数(最大求解时间以保证实时性,不卡顿;最大迭代次数,避免冗余计算;视差阈值,用于选取sliding window中的关键帧);
  • imu参数,包括加速度计陀螺仪的测量噪声标准差、零偏随机游走噪声标准差,重力值(imu放火星上需要改变);
  • imu和camera之间的外参R,t;可选(0)已知精确的外参,运行中无需改变,(1)已知外参初值,运行中优化,(2)什么都不知道,在线初始化中标定
  • 闭环参数,包括brief描述子的pattern文件(前端视觉使用光流跟踪,不需要计算描述子),针对场景训练好的DBow二进制字典文件;

2. 监听IMAGE_TOPIC, 有图像信息发布到IMAGE_TOPIC上时,执行回调函数:

ros::Subscriber sub_img = n.subscribe(IMAGE_TOPIC, , img_callback);

3. img_callback()

前端视觉的算法基本在这个回调函数中,步骤为:

  1. 频率控制,保证每秒钟处理的image不多于FREQ;

  2. 对于单目:

    1). readImage;

    2). showUndistortion(可选);

    3). 将特征点矫正(相机模型camodocal)后归一化平面的3D点(此时没有尺度信息,3D点p.z=1),像素2D点,以及特征的id,封装成ros的sensor_msgs::PointCloud消息类型;

  3. 将处理完的图像信息用PointCloud和Image的消息类型,发布到"feature"和"feature_img"的topic:

pub_img = n.advertise<sensor_msgs::PointCloud>("feature", );
pub_match = n.advertise<sensor_msgs::Image>("feature_img",);

4. 包含的视觉算法:

1. CLAHE(Contrast Limited Adaptive Histogram Equalization)

cv::Ptr<cv::CLAHE> clahe = cv::createCLAHE(3.0, cv::Size(, ));

2. Optical Flow(光流追踪)

cv::calcOpticalFlowPyrLK(cur_img, forw_img, cur_pts, forw_pts, status, err, cv::Size(, ), );

3. 根据匹配点计算Fundamental Matrix, 然后用Ransac剔除不符合Fundamental Matrix的外点

cv::findFundamentalMat(un_prev_pts, un_forw_pts, cv::FM_RANSAC, F_THRESHOLD, 0.99, status);

4. 特征点检测:goodFeaturesToTrack, 使用Shi-Tomasi的改进版Harris corner

cv::goodFeaturesToTrack(forw_img, n_pts, MAX_CNT - forw_pts.size(), 0.1, MIN_DIST, mask);

特征点之间保证了最小距离30个像素,跟踪成功的特征点需要经过rotation-compensated旋转补偿的视差计算,视差在30个像素以上的特征点才会去参与三角化和后续的优化,保证了所有的特征点质量都是比较高的,同时降低了计算量。

VINS(二)Feature Detection and Tracking的更多相关文章

  1. Image Processing and Analysis_8_Edge Detection:Design of steerable filters for feature detection using canny-like criteria ——2004

    此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...

  2. Image Processing and Analysis_21_Scale Space:Feature Detection with Automatic Scale Selection——1998

    此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...

  3. Image Processing and Computer Vision_Review:A survey of recent advances in visual feature detection(Author's Accepted Manuscript)——2014.08

    翻译 一项关于视觉特征检测的最新进展概述(作者已被接受的手稿) 和A survey of recent advances in visual feature detection——2014.08内容相 ...

  4. 论文解读(CGC)《CGC: Contrastive Graph Clustering for Community Detection and Tracking》

    论文信息 论文标题:CGC: Contrastive Graph Clustering for Community Detection and Tracking论文作者:Namyong Park, R ...

  5. Correlation Filter in Visual Tracking系列二:Fast Visual Tracking via Dense Spatio-Temporal Context Learning 论文笔记

    原文再续,书接一上回.话说上一次我们讲到了Correlation Filter类 tracker的老祖宗MOSSE,那么接下来就让我们看看如何对其进一步地优化改良.这次要谈的论文是我们国内Zhang ...

  6. 论文笔记:Integrated Object Detection and Tracking with Tracklet-Conditioned Detection

    概要 JiFeng老师CVPR2019的另一篇大作,真正地把检测和跟踪做到了一起,之前的一篇大作FGFA首次构建了一个非常干净的视频目标检测框架,但是没有实现帧间box的关联,也就是说没有实现跟踪.而 ...

  7. 《Dynamic Topic Detection and Tracking: A Comparison of HDP, C-Word, and Cocitation Methods》笔记

    原文地址:http://onlinelibrary.wiley.com/doi/10.1002/asi.23134/abstract 黄色背景是我认为比较重要的,红色字体是我自己的话. 动态主题监测与 ...

  8. Image Processing and Computer Vision_Review:A survey of recent advances in visual feature detection—2014.08

    翻译 一项关于视觉特征检测的最新进展概述——http://tongtianta.site/paper/56761 摘要 -特征检测是计算机视觉和图像处理中的基础和重要问题.这是一个低级处理步骤,它是基 ...

  9. 特征检测(feature detection)的一些资料

    FAST特征点: http://blog.csdn.net/hujingshuang/article/details/46898007 BRIEF特征描述子: http://blog.csdn.net ...

随机推荐

  1. Android(java)学习笔记208:Android下的属性动画高级用法(Property Animation)

    1. 大家好,在上一篇文章当中,我们学习了Android属性动画的基本用法,当然也是最常用的一些用法,这些用法足以覆盖我们平时大多情况下的动画需求了.但是,正如上篇文章当中所说到的,属性动画对补间动画 ...

  2. Hibernate关于父类子类的映射

    怕忘记,把栗子贴上来 以Person类和Student类为例 public class Person { private Integer id; private String name; privat ...

  3. bzoj4600 [Sdoi2016]硬币游戏

    Description Alice和Bob现在在玩的游戏,主角是依次编号为1到n的n枚硬币.每一枚硬币都有两面,我们分别称之为正面和反面.一开始的时候,有些硬币是正面向上的,有些是反面朝上的.Alic ...

  4. Type Systems

    This section deals with more theoretical aspects of types. A type system is a set of rules used by a ...

  5. Windows与kali双系统安装启动项的选择问题

    在安装kali的时候,选择了用linux的grub启动,但是在重启后发现启动项里已经没有Windows系统可以选择了. 网上资料说,进入kali的终端,输入以下命令: $ sudo update-gr ...

  6. 9、SpringBoot-CRUD国际化

    1).编写国际化配置文件: 2).使用ResourceBundleMessageSource管理国际化资源文件 3).在页面使用fmt:message取出国际化内容 步骤: 1).编写国际化配置文件, ...

  7. WIN10下的Docker安装

    1.什么是Docker Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱 ...

  8. java使用类序列化反序列化(读写文件)

    创建类:Role package com.wbg.springRedis.entity; import java.io.Serializable; public class Role implemen ...

  9. 【luogu P3366 最小生成树】 题解 Prim

    include include include include using namespace std; const int maxn = 505000; int n, m, dis[maxn], v ...

  10. Code First 二 DataAnnotation 数据注解

    Code-First中配置域类 我们在前一节学习了默认的代码优先约定.Code-First使用默认约定从您的域类构建概念模型.Code-First利用称为约定而不是配置的编程模式.这意味着您可以通过配 ...