点云匹配ICP

  • T2_372219
    了解作者
  • 114.1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-05 01:35
    上传日期
快速实现匹配算法匹配,可以利用MATLAB实现
040962694ICP.rar
  • ICP
  • loadFile.do_files
  • xmlicon_30x12.gif
    260B
  • preview.jpg
    10.3KB
  • s87229918487815.gif
    43B
  • exclamation.gif
    64B
  • site3.css
    3.4KB
  • question.gif
    64B
  • fullstar_grey.gif
    145B
  • mlc_logo.gif
    2.5KB
  • dots_rnav_top.gif
    152B
  • doc.gif
    70B
  • blue_band_536x5.gif
    646B
  • mail_brdr.gif
    155B
  • ltblue_top_nav_trans.gif
    117B
  • bullet.gif
    57B
  • cmnty1.css
    10.3KB
  • 90th.png
    96B
  • s_code.js
    38.5KB
  • spacer.gif
    43B
  • dots_rnav.gif
    97B
  • 00th.png
    102B
  • fullstar.gif
    145B
  • 50th.png
    105B
  • submitfile.gif
    66B
  • Captcha.htm
    6.8KB
  • icp.gif
    6.2KB
  • icp.m
    29.6KB
  • loadFile.do.htm
    44.4KB
  • loadFile.do_files
  • xmlicon_30x12.gif
    260B
  • preview.jpg
    10.3KB
  • s87229918487815.gif
    43B
  • exclamation.gif
    64B
  • site3.css
    3.4KB
  • question.gif
    64B
  • fullstar_grey.gif
    145B
  • mlc_logo.gif
    2.5KB
  • dots_rnav_top.gif
    152B
  • doc.gif
    70B
  • blue_band_536x5.gif
    646B
  • mail_brdr.gif
    155B
  • ltblue_top_nav_trans.gif
    117B
  • bullet.gif
    57B
  • cmnty1.css
    10.3KB
  • 90th.png
    96B
  • s_code.js
    38.5KB
  • spacer.gif
    43B
  • dots_rnav.gif
    97B
  • 00th.png
    102B
  • fullstar.gif
    145B
  • 50th.png
    105B
  • submitfile.gif
    66B
  • Captcha.htm
    6.8KB
  • icp.gif
    6.2KB
  • icp.m
    29.6KB
  • loadFile.do.htm
    44.4KB
内容介绍
function [TR, TT] = icp(model,data,max_iter,min_iter,fitting,thres,init_flag,tes_flag,refpnt) % ICP Iterative Closest Point Algorithm. Takes use of % Delaunay tesselation of points in model. % % Ordinary usage: % % [R, T] = icp(model,data) % % ICP fit points in data to the points in model. % Fit with respect to minimize the sum of square % errors with the closest model points and data points. % % INPUT: % % model - matrix with model points, [Pm_1 Pm_2 ... Pm_nmod] % data - matrix with data points, [Pd_1 Pd_2 ... Pd_ndat] % % OUTPUT: % % R - rotation matrix and % T - translation vector accordingly so % % newdata = R*data + T . % % newdata are transformed data points to fit model % % % Special usage: % % icp(model) or icp(model,tes_flag) % % ICP creates a Delaunay tessellation of points in % model and save it as global variable Tes. ICP also % saves two global variables ir and jc for tes_flag=1 (default) or % Tesind and Tesver for tes_flag=2, which % makes it easy to find in the tesselation. To use the global variables % in icp, put tes_flag to 0. % % % Other usage: % % [R, T] = icp(model,data,max_iter,min_iter,... % fitting,thres,init_flag,tes_flag) % % INPUT: % % max_iter - maximum number of iterations. Default=104 % % min_iter - minimum number of iterations. Default=4 % % fitting - =2 Fit with respect to minimize the sum of square errors. (default) % alt. =[2,w], where w is a weight vector corresponding to data. % w is a vector of same length as data. % Fit with respect to minimize the weighted sum of square errors. % =3 Fit with respect to minimize the sum to the amount 0.95 % of the closest square errors. % alt. =[3,lambda], 0.0<lambda<=1.0, (lambda=0.95 default) % In each iteration only the amount lambda of the closest % points will affect the translation and rotation. % If 1<lambda<=size(data,2), lambda integer, only the number lambda % of the closest points will affect the translation and % rotation in each iteration. % % thres - error differens threshold for stop iterations. Default 1e-5 % % init_flag - =0 no initial starting transformation % =1 transform data so the mean value of % data is equal to mean value of model. % No rotation. (init_flag=1 default) % % tes_flag - =0 No new tesselation has to be done. There % alredy exists one for the current model points. % =1 A new tesselation of the model points will % be done. (default) % =2 A new tesselation of the model points will % be done. Another search strategy than tes_flag=1 % =3 The closest point will be find by testing % all combinations. No Delaunay tesselation will be done. % % refpnt - (optional) (An empty vector is default.) refpnt is a point corresponding to the % set of model points wich correspondig data point has to be find. % How the points are weighted depends on the output from the % function weightfcn found in the end of this m-file. The input in weightfcn is the % distance between the closest model point and refpnt. % % To clear old global tesselation variables run: "clear global Tes ir jc" (tes_flag=1) % or run: "clear global Tes Tesind Tesver" (tes_flag=2) in Command Window. % % m-file can be downloaded for free at % http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=12627&objectType=FILE % % icp version 1.4 % % written by Per Bergstr�m 2007-03-07 if nargin<1 error('To few input arguments!'); elseif or(nargin==1,nargin==2) bol=1; refpnt=[]; if nargin==2 if isempty(data) tes_flag=1; elseif isscalar(data) tes_flag=data; if not(tes_flag==1 | tes_flag==2) tes_flag=1; end else bol=0; end else tes_flag=1; end if bol global MODEL if isempty(model) error('Model can not be an empty matrix.'); end if (size(model,2)<size(model,1)) MODEL=model'; TR=eye(size(model,2)); TT=zeros(size(model,2),1); else MODEL=model; TR=eye(size(model,1)); TT=zeros(size(model,1),1); end if (size(MODEL,2)==size(MODEL,1)) error('This icp method demands the number of MODEL points to be greater then the dimension.'); end icp_struct(tes_flag); return end end global MODEL DATA TR TT if isempty(model) error('Model can not be an empty matrix.'); end if (size(model,2)<size(model,1)) MODEL=model'; else MODEL=model; end if (size(data,2)<size(data,1)) data=data'; DATA=data; else DATA=data; end if size(DATA,1)~=size(MODEL,1) error('Different dimensions of DATA and MODEL!'); end if nargin<9 refpnt=[]; if nargin<8 tes_flag=1; if nargin<7 init_flag=1; if nargin<6 thres=1e-5; % threshold to icp iterations if nargin<5 fitting=2; % fitting method if nargin<4 min_iter=4; % min number of icp iterations if nargin<3 max_iter=104; % max number of icp iterations end end end end end end elseif nargin>9 warning('Too many input arguments!'); end if isempty(tes_flag) tes_flag=1; elseif not(tes_flag==0 | tes_flag==1 | tes_flag==2 | tes_flag==3) init_flag=1; warning('init_flag has been changed to 1'); end if and((size(MODEL,2)==size(MODEL,1)),tes_flag~=0) error('This icp method demands the number of model points to be greater then the dimension.'); end if isempty(min_iter) min_iter=4; end if isempty(max_iter) max_iter=100+min_iter; end if max_iter<min_iter; max_iter=min_iter; warning('max_iter<min_iter , max_iter has been changed to be equal min_iter'); end if min_iter<0; min_iter=0; warning('min_iter<0 , min_iter has been changed to be equal 0'); end if isempty(thres) thres=1e-5; elseif thres<0 thres=abs(thres); warning('thres negative , thres have been changed to -thres'); end if isempty(fitting) fitting=2; elseif fitting(1)==2 [fi1,fi2]=size(fitting); lef=max([fi1,fi2]); if lef>1 if fi1<fi2 fitting=fitting'; end if lef<(size(data,2)+1) warning('Illegeal size of fitting! Unweighted minimization will be used.'); fitting=2; elseif min(fitting(2:(size(data,2)+1)))<0 warning('Illegeal value of the weights! Unweighted minimization will be used.'); fitting=2; elseif max(fitting(2:(size(data,2)+1)))==0 warning('Illegeal values of the weights! Unweighted minimization will be used.'); fitting=2; else su=sum(fitting(2:(size(data,2)+1))); fitting(2:(size(data,2)+1))=fitting(2:(size(data,2)+1))/su; thres=thres/su; end end elseif fitting(1)==3 if length(fitting)<2 fitting=[fitting,round(0.95*size(data,2))]; elseif fitting(2)>1 if fitting(2)>floor(fitting(2)) f
评论
    相关推荐
    • A*算法Matlab 代码
      A*算法Matlab 代码,输入为自定义地图或图片,图片中默认绿色为起始地址,红色为终点,二值化化后进行路径规划。本文件中共有7张测试图,从20*20-640*480像素。
    • retinex算法MATLAB代码
      retinex算法是目前比较流行且重要的图像增强算法,主要是通过将影响图像质量的照度分量去除,得到图像本来面目的原理!利用了人类视觉系统的特性!
    • PSO算法matlab程序
      PSO算法的标准程序,程序使用matlab语言
    • 遗传算法Matlab程序
      应用数字群算法设计数字滤波器的matlab程序,遗传算法是最近几年流行的优化算法
    • Q算法MATLAB仿真
      移动机器人路径规划MATLAB仿真,使用Q-Learning算法
    • 遗传算法MATLAB应用
      老师上课的参考书 主要是关于遗传算法的一些MATLAB应用,十分有意思 希望大家能喜欢
    • 遗传算法matlab
      matlab程序下的遗传算法
    • 遗传算法matlab
      遗传算法是自然选择和群体学基础上的非数值优化方法。提供了些matlab实例计算
    • 遗传算法matlab
      matlab是科学计算常用的工具,遗传算法也是一种目前比较流行的一种算法,利用matlab写的遗传算法代码,供大家参考。
    • 遗传算法matlab代码
      遗传算法matlab代码,能够正常运行,对于刚开始接触遗传算法的人员有很好的帮助