资源简介
matlab三维散乱点云曲率算法,曲率,包括主曲率,高斯曲率和平均曲率,计算点云模型上的每一个顶点的法矢和曲率
代码片段和文件信息
function [output_gaussian output_mean output_k1 output_k2] = MLS_curvature_computing(input_pnts input_normals eval_pnts number_of_neighbor gaussian_param)
% Direct computing of point-set surface curvatures
%
% [out_a out_b out_c out_d] = MLS_curvature_computing (in_1 in_2 in_3 in_4 in_5)
%
% Description :
% Direct computing of surface curvatures for point-set surfaces based on
% a set of analytical equations derived from MLS.
%
% Parameters [IN ]:
% in_1 : input synthetic/real point data which will define an MLS surface
% in_2 : corresponding normals of the input synthetic/real point data
% in_3 : positions where to evaluate surface curvatures
% in_4 : number of neighbor points which will contribute to the curvature
% computing at each evaluation position
% in_5 : Gaussian scale parameter that determines the width of the Gaussian
% kernel
%
% Returns [ OUT ]:
% out_a : output gaussian curvatures
% out_b : output mean curvatures
% out_c : output maximum principal curvatures
% out_d : output minimum principal curvatures
%
% Example :
% see the demo
%
% References :
% Yang P. and Qian X. “Direct computing of surface curvatures for
% point-set surfaces“ Proceedings of 2007 IEEE/Eurographics Symposium
% on Point-based Graphics(PBG) Prague Czech Republic Sep. 2007.
%
% Authors : Pinghai Yang
% Created : Sep. 25 2007
% Version : 1.0
% Matlab Version : 7.0 ( Windows )
%
% Copyright (c) 2007 CDM Lab Illinois Institute of Technology U.S.A.
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Output Gaussian curvature
output_gaussian = zeros(size(eval_pnts2)size(eval_pnts3));
% Output Mean curvature
output_mean = zeros(size(eval_pnts2)size(eval_pnts3));
for i = 1:size(eval_pnts2)
for j = 1:size(eval_pnts3)
% Coordinates of the current point
eval_pnt = eval_pnts(:ij);
neighbor_index = nearestneighbour(eval_pnt input_pnts ‘NumberOfNeighbours‘ number_of_neighbor);
neighbor_pnts = input_pnts(:neighbor_index);
% Difference vectors from neighbor points to the evaluation point
diff_vec = repmat(eval_pnt 1 number_of_neighbor) - neighbor_pnts;
dist_squared = diff_vec(1:).*diff_vec(1:) + diff_vec(2:).*diff_vec(2:) + diff_vec(3:).*diff_vec(3:);
weight = exp(- dist_squared / gaussian_param^2);
% Delta_g of the current point
neighbor_normals = input_normals(:neighbor_index);
for ii = 1:3
eval_normal(ii1) = sum(weight.*neighbor_normals(ii:));
end
normalized_eval_normal = eval_normal/norm(eval_normal);
projected_diff_vec = diff_vec(1:).*normalized_eval_normal(11) + diff_vec(2:).*normalized_eval_normal(21)...
+ diff_vec(3:).*normalized_eval_normal(31);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%delta_g
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-10-04 20:55 demo_MLS
文件 8400 2007-09-30 00:55 demo_MLS\demo_evaluation_data.txt
文件 281617 2007-09-30 00:55 demo_MLS\demo_input_data.txt
文件 11647 2007-09-30 01:18 demo_MLS\demo_resulting_curvatures.txt
文件 7484 2007-09-30 01:16 demo_MLS\MLS_curvature_computing.m
文件 1854 2007-09-30 01:27 demo_MLS\MLS_demo.m
文件 1182 2007-09-30 01:29 demo_MLS\MLS_energy.asv
文件 1196 2007-09-30 01:29 demo_MLS\MLS_energy.m
文件 2000 2007-09-30 01:29 demo_MLS\MLS_projection.asv
文件 2000 2007-09-30 01:31 demo_MLS\MLS_projection.m
文件 9365 2006-11-14 23:30 demo_MLS\nearestneighbour.m
文件 975 2007-09-30 01:37 demo_MLS\readme.txt
----------- --------- ---------- ----- ----
327938 13
- 上一篇:现代控制系统matlab程序
- 下一篇:Kdtree求点云数据边缘点
相关资源
- Kdtree求点云数据边缘点
- 平方根无迹卡尔曼滤波算法程序
- 清扫机器人路径规划算法仿真
- 基于改进遗传算法的路径规划MATLAB实
- RANSAC去除误匹配算法
- matlab图像拼接算法
- 离散粒子群算法DPSOMatlab代码
- matlab计算表面曲率
- 蚁群算法解决背包问题matlab
- matlab遗传算法解决背包问题
- 多种插值算法Matlab实现--数学建模
- 智能优化算法及其MATLAB源程序
- Madgwick 和 Mahony算法源码
- [MATLAB+R2017a人工智能算法][张德丰][程
- 二维粒子群算法的matlab源程序.docx.z
- MATLAB+遗传算法+多车有容量约束VRP
- MATLAB遗传算法VRP
- 基于导频的信道估计ls算法
- 基于Gabor滤波指纹识别算法matlab完整程
- MATLAB用遗传算法GA)车间调度
- leach分簇算法仿真基于matlab
- 图像融合算法
- 图像下采样算法
- DOA估计算法MATLAB程序
- TDOA/AOA定位的扩展卡尔曼滤波定位算法
- 遗传算法优化BP神经网络,以非线性函
- 粒子群算法在物流中心选址中的应用
- Sick激光雷达数据解析程序MATLAB
- 小生境PSO算法matlab程序
- 基于music算法的天线角度估计
评论
共有 条评论