• 大小: 9.77MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-14
  • 语言: Matlab
  • 标签: 三维  重建  

资源简介

点云三维重建,用matlab写成的,效果很好,而且速度也比较快 文件列表: point3d\点云的三维重建\Block.mat point3d\点云的三维重建\Bunny.bmp point3d\点云的三维重建\Cactus.mat point3d\点云的三维重建\Chair.mat point3d\点云的三维重建\Dino.mat point3d\点云的三维重建\Elephant.mat point3d\点云的三维重建\gargo50k.mat point3d\点云的三维重建\hippo.mat point3d\点云的三维重建\Horse.mat point3d\点云的三维重建\MyCrust.asv point3d\点云的三维重建\MyCrust.m point3d\点云的三维重建\Skull.mat point3d\点云的三维重建\Standford_Bunny.mat point3d\点云的三维重建\TestMyCrust.asv point3d\点云的三维重建\TestMyCrust.m point3d\点云的三维重建\如何運行.txt point3d\点云的三维重建\p.mat point3d\点云的三维重建\p.txt point3d\点云的三维重建\data.mat point3d\点云的三维重建\matlab.mat point3d\Block.mat point3d\Bunny.bmp point3d\Cactus.mat point3d\Chair.mat point3d\Dino.mat point3d\Elephant.mat point3d\gargo50k.mat point3d\hippo.mat point3d\Horse.mat point3d\MyCrust.asv point3d\MyCrust.m point3d\Skull.mat point3d\Standford_Bunny.mat point3d\TestMyCrust.asv point3d\TestMyCrust.m point3d\如何運行.txt point3d\点云的三维重建

资源截图

代码片段和文件信息

%% MyCrust
%
%Simple surface recostruction program based on Crust algorithm
%Given a set of 3D points returns a triangulated tight surface.
%
%The more points there are the best the surface will be fitted
%although you will have to wait more. For very large models an 
%help memory errors may occurs.
%It is important even the point distribution generally uniformly 
% distributed points with denser zones in high curvature features
% give the best results.

% Remember  crust algorithom needs a cloud representing a volume 
% so open surface may give inaccurate results. 
%  
%  
% If any problems occurs in execution or if you found a bug
% have a suggestion or question just contact me at:  
%   
% giaccariluigi@msn.com

%
%
%
%Here is a simple example:
%
%load Dino.mat%load input points from mat file
%
%[t]=MyCrust(p);
%
% figure(1)
%         hold on
%         title(‘Output Triangulation‘‘fontsize‘14)
%         axis equal
%         trisurf(tp(:1)p(:2)p(:3)‘facecolor‘‘c‘‘edgecolor‘‘b‘)
%
%Input:
%              p is a Nx3 array containing the 3D set of points
%Output:
%              t are points id contained in triangles Nx3 array too.
%
% See also qhull voronoin convhulln delaunay delaunay3 tetramesh.
%
%Author:Giaccari Luigi
%Last Update: 1/12/2008
%Creation: 10/10/2008


function [t]=MyCrust(p)
%%   Main
starttime=clock;


%add points to the given ones this is usefull
%to create outside tetraedrom
tic
p=AddShield(p);
fprintf(‘Addedded Shield: %4.4f s\n‘toc)


tic
tetr=delaunayn(p);%creating tedraedron
tetr=int32(tetr);%use integer to save memory
fprintf(‘Delaunay Triangulation Time: %4.4f s\n‘toc)


%connectivity data
%find triangles to tetraedrom and tetraedrom to triangles connectivity data
tic
[t2tetrtetr2t]=Connectivity(tetr);
fprintf(‘Connectivity Time: %4.4f s\n‘toc)
tic
[ccr]=CC();%Circumcenters of tetraedroms
fprintf(‘Circumcenters Time: %4.4f s\n‘toc)
clear n



tic
t=Walking();%Flagging tetraedroms as inside or outside
fprintf(‘Walking Time: %4.4f s\n‘toc)


time=etime(clockstarttime);
fprintf(‘Total Time: %4.4f s\n‘time)





%% Circumcenters(Nested)
    function [ccr]=CC()
         %finds circumcenters fro a set of tetraedrom
        
         %points of tetraedrom 
        p1=(p(tetr(:1):));
        p2=(p(tetr(:2):));
        p3=(p(tetr(:3):));
        p4=(p(tetr(:4):));

        %vectors of tetraedrom edges
        v21=p(tetr(:1):)-p(tetr(:2):);
        v31=p(tetr(:3):)-p(tetr(:1):);
        v41=p(tetr(:4):)-p(tetr(:1):);

        %preallocation
        cc=zeros(size(tetr1)3);






         %Solve the system using cramer method
        d1=sum(v41.*(p1+p4)*.52);
        d2=sum(v21.*(p1+p2)*.52);
        d3=sum(v31.*(p1+p3)*.52);

        det23=(v21(:2).*v31(:3))-(v21(:3).*v31(:2));
        det13=(v21(:3).*v31(:1))-(v21(:1).*v31(:3));
        det12=(v2

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-03-28 18:54  point3d\
     文件       45713  2008-11-20 18:01  point3d\Block.mat
     文件      236278  2008-11-20 18:20  point3d\Bunny.bmp
     文件       27357  2008-11-20 18:14  point3d\Cactus.mat
     文件     1100582  2008-11-20 18:13  point3d\Chair.mat
     文件      527477  2008-11-20 18:02  point3d\Dino.mat
     文件      550432  2008-11-20 18:05  point3d\Elephant.mat
     文件      985815  2008-11-20 18:13  point3d\Horse.mat
     文件       11469  2008-11-20 17:53  point3d\MyCrust.asv
     文件       12126  2008-12-01 22:41  point3d\MyCrust.m
     文件      306544  2008-11-20 18:11  point3d\Skull.mat
     文件      804127  2008-11-20 18:10  point3d\Standford_Bunny.mat
     文件         797  2009-03-28 17:45  point3d\TestMyCrust.asv
     文件         787  2009-03-28 18:24  point3d\TestMyCrust.m
     文件      290952  2008-07-01 20:24  point3d\gargo50k.mat
     文件      188902  2008-06-28 16:52  point3d\hippo.mat
     文件         109  2009-03-28 18:56  point3d\如何運行.txt
     目录           0  2009-03-28 18:54  point3d\点云的三维重建\
     文件      303794  2010-05-03 14:11  point3d\点云的三维重建\Block.mat
     文件      236278  2008-11-20 18:20  point3d\点云的三维重建\Bunny.bmp
     文件       27357  2008-11-20 18:14  point3d\点云的三维重建\Cactus.mat
     文件     1100582  2008-11-20 18:13  point3d\点云的三维重建\Chair.mat
     文件      527477  2008-11-20 18:02  point3d\点云的三维重建\Dino.mat
     文件      550432  2008-11-20 18:05  point3d\点云的三维重建\Elephant.mat
     文件      985815  2008-11-20 18:13  point3d\点云的三维重建\Horse.mat
     文件       12180  2010-05-03 14:48  point3d\点云的三维重建\MyCrust.asv
     文件       12195  2010-05-03 14:52  point3d\点云的三维重建\MyCrust.m
     文件      306544  2008-11-20 18:11  point3d\点云的三维重建\Skull.mat
     文件      804127  2008-11-20 18:10  point3d\点云的三维重建\Standford_Bunny.mat
     文件         871  2010-05-03 14:48  point3d\点云的三维重建\TestMyCrust.asv
     文件         872  2010-05-05 20:44  point3d\点云的三维重建\TestMyCrust.m
............此处省略7个文件信息

评论

共有 条评论