程序运行完成后的结果文件
运行程序自带的实例文件
自己用激光雷达跑出来的结果,超级差,先开始没改参数文件,一直用的example,做的实验如下表所示
实验结果真的非常不好,甚至用他所有的参数配置文件跑不完代码,会报错too few correspondences
看了相关代码之后,原理并没有什么问题,具体报错的位置如下
Break原因为:
对应关系的函数:
输出GPBFRV:
Break语句:
min_total_corr_num=100
min_neccessary_corr_num=25
min_neccessary_corr_ratio=0.03
输出break时的对应点:
for (int i = 0; i < (*Corr).size(); i++)
{
int s_index, t_index;
s_index = (*Corr)[i].index_query;
t_index = (*Corr)[i].index_match;
if (t_index != -1)
{
float px = Source_Cloud->points[s_index].x;
float py = Source_Cloud->points[s_index].y;
float pz = Source_Cloud->points[s_index].z;
float qx = Target_Cloud->points[t_index].x;
float qy = Target_Cloud->points[t_index].y;
float qz = Target_Cloud->points[t_index].z;
}
}
输出匹配不成功的帧,来查看特征点数量不够的原因(代码将点分成六类,分别查看不同类别特征点的数量)
我出现问题的地方是在232-233地方
查看之后发现立面点很少,但是真的代码很难修改参数使提取的特征点变多
立面特征点有误因此寻找立面特征点的语句:
if (used_feature_type[2] == ‘1’ && pc_facade_sc->size() > 0)
determine_corres(pc_facade_sc,pc_facade_tc,registration_cons.block1->tree_facade,dis_thre_facade, corrs_facade, normal_shooting_on, true, normal_bearing); //Check normal vector
float dis_thre_facade = dis_thre_unit;
float get_weight_by_dist_adaptive(float dist, int iter_num, float unit_dist = 30.0, float b_min = 0.7, float b_max = 1.3, float b_step = 0.05)
{
float b_current = min_(b_min + b_step * iter_num, b_max);
float temp_weight = b_current + (1.0 - b_current) * dist / unit_dist;
temp_weight = max_(temp_weight, 0.01);
return temp_weight;
}
//standard
inline float get_weight_by_dist(float dist, float unit_dist = 60.0, float base_value = 0.7) //unit_dist = 60.0 (is just a multiplier constant)
{
return (base_value + (1 - base_value) * dist / unit_dist);
//return (base_value + (1 - base_value) * unit_dist / dist);
}
于是开始研究参数配置,具体参数配置请参考下一篇博文