资源简介
Ncut 是目前较好的一种图像分割算法。
代码片段和文件信息
function demoncutClustering;
% demoncutClustering
%
% demo for NcutClustering
% also initialize matlab paths to subfolders
% Timothee Cour Stella Yu Jianbo Shi 2004.
disp(‘Ncut Clustering demo‘);
% initialize matlab paths to subfolders
main;
%% make up a point data set
caseid = 2;%3
[datasize_cluster] = build_scene(caseid);
figure(1);clf;
plot(data(1:)data(2:)‘ks‘ ‘MarkerFaceColor‘‘k‘‘MarkerSize‘5); axis image; hold on;
disp(‘This is the input data points to be clustered press Enter to continue...‘);
pause;
disp(‘Compute clustering...‘);
% compute similarity matrix
[WDist] = compute_relation(data);
% clustering graph in
nbCluster = 4;
tic;
[NcutDiscreteNcutEigenvectorsNcutEigenvalues] = ncutW(WnbCluster);
disp([‘The computation took ‘ num2str(toc) ‘ seconds‘]);
figure(3);
plot(NcutEigenvectors);
% display clustering result
cluster_color = [‘rgbmyc‘];
figure(2);clf;
for j=1:nbCluster
id = find(NcutDiscrete(:j));
plot(data(1id)data(2id)[cluster_color(j)‘s‘] ‘MarkerFaceColor‘cluster_color(j)‘MarkerSize‘5); hold on;
end
hold off; axis image;
disp(‘This is the clustering result‘);
disp(‘The demo is finished.‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 140 2006-05-04 11:43 main.m
文件 319 2006-05-04 12:08 Version.txt
文件 1215 2005-03-21 16:38 demon
文件 908 2004-06-18 03:02 README_NcutClustering.txt
文件 7820 2004-06-15 17:44 common_files\a_times_b_cmplx.mexglx
文件 13096 2004-06-15 17:00 common_files\a_times_b_cmplx.mexmac
文件 1251 2004-06-18 03:13 common_files\discretisation.m
文件 317 2004-06-18 03:13 common_files\discretisationEigenVectorData.m
文件 37466 2004-06-18 03:12 common_files\eigs2.m
文件 20480 2006-05-04 11:51 common_files\mex_w_times_x_symmetric.dll
文件 8713 2004-06-15 17:44 common_files\mex_w_times_x_symmetric.mexglx
文件 13396 2004-06-15 17:00 common_files\mex_w_times_x_symmetric.mexmac
文件 2666 2005-03-21 16:31 common_files\ncut.m
文件 604 2004-06-18 02:56 common_files\ncutW.m
文件 20480 2006-05-04 11:51 common_files\sparsifyc.dll
文件 8541 2004-06-15 17:44 common_files\sparsifyc.mexglx
文件 9004 2004-06-15 17:00 common_files\sparsifyc.mexmac
文件 20480 2006-05-04 11:51 common_files\spmtimesd.dll
文件 7285 2004-06-15 17:44 common_files\spmtimesd.mexglx
文件 8888 2004-06-15 17:00 common_files\spmtimesd.mexmac
文件 217 2006-05-04 11:34 specific_NcutClustering_files\X2distances.m
文件 3259 2005-03-21 16:38 specific_NcutClustering_files\build_scene.m
文件 530 2006-05-04 11:58 specific_NcutClustering_files\compute_relation.m
- 上一篇:交通灯控制模块verilog语言
- 下一篇:在树莓派安装神经计算棒sdk步骤
评论
共有 条评论