⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_redistancing.m.svn-base

📁 fast marching method
💻 SVN-BASE
字号:
% test for the re-distancing of a distance functionn = 256;name = 'circle';name = 'rectangle';name = 'circlerect1';name = 'circlerect2';D0 = compute_levelset_shape(name, n);% the modified distance function, should have the same 0 level setD = (D0.^3) .* (X+n/3);options.use_interpolation = 1;D1 = perform_redistancing(D, options);options.use_interpolation = 0;D2 = perform_redistancing(D, options);% originalc0 = perform_contour_extraction(D0, 0);% interpolationc1 = perform_contour_extraction(D1, 0);% no interpolationc2 = perform_contour_extraction(D2, 0);clf;hold on;plot(c0(1,:),c0(2,:), 'r');plot(c1(1,:),c1(2,:), 'g');plot(c2(1,:),c2(2,:), 'b');legend('Original', 'Interpolation', 'No interpolation');axis([0 1 0 1]);hold off;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -