• 大小: 32KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-05
  • 语言: 其他
  • 标签: RANSAC  

资源简介

RANSAC & OLS 比较

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%局外点符合模型的有多少通过点到线的距离来判断%%%%%%%%%%%%%%%%%%%%%%%%%
%Consensus_Setx     原来的x局内点
%Consensus_Sety     原来的y局内点
%Maybe_outliersx    x局外点
%Maybe_outliersy    y局外点
%line_vec           直线的系数
%point_line_dis     点到直线的距离阈值
function [Re_Consensus_Set2dRe_Consensus_Set3d] = AgreeWithModel(Consensus_SetxConsensus_SetyMaybe_outliersxMaybe_outliersyline_vecpoint_line_dis)
Consensus_Set_temx = Consensus_Setx;                %临时变量进行保存
Consensus_Set_temy = Consensus_Sety;
[mn] = size(Maybe_outliersx);
for i=1:m
    distem = abs(line_vec(11)*Maybe_outliersx(i1)+line_vec(12)-Maybe_outliersy(i1))/sqrt(line_vec(11)^2+1);           %判断点到直线的距离
    if (distem < point_line_dis)
        Consensus_Set_temx = [Consensus_Set_temx;Maybe_outliersx(i1)];
        Consensus_Set_temy = [Consensus_Set_temy;Maybe_outliersy(i1)];
    end
end
Re_Consensus_Set2d = Consensus_Set_temx;
Re_Consensus_Set3d = Consensus_Set_temy;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1442  2015-03-25 14:53  ransactest\AgreeWithModel.asv

     文件       1030  2015-03-25 15:48  ransactest\AgreeWithModel.m

     文件        423  2015-03-25 08:15  ransactest\NumInVec.m

     文件      28264  2015-03-31 08:53  ransactest\QQ截图20150331085255.png

     文件       1707  2015-03-25 08:18  ransactest\RandomNData.asv

     文件       1704  2015-03-25 15:18  ransactest\RandomNData.m

     文件       1228  2015-03-25 15:03  ransactest\Ransac_test.asv

     文件       1854  2015-03-31 08:46  ransactest\Ransac_test.m

     文件        120  2015-03-31 08:16  ransactest\说明.txt

     目录          0  2015-03-31 08:53  ransactest

----------- ---------  ---------- -----  ----

                37772                    10


评论

共有 条评论