资源简介
利用MATLAB实现Normalized Cut算法,实现对图像的分割。分割相关很不错。

代码片段和文件信息
function demoncutImage;
% demoncutImage
%
% demo for NcutImage
% also initialize matlab paths to subfolders
% Timothee Cour Stella Yu Jianbo Shi 2004.
main;
%% read image change color image to brightness image resize to 160x160
%I = imread_ncut(‘specific_NcutImage_files/jpg_images/3.jpg‘160160);
I = imread_ncut(‘2.jpg‘160160);
%% display the image
figure(1);clf; imagesc(I);colormap(gray);axis off;
disp(‘This is the input image to segment press Enter to continue...‘);
pause;
%% compute the edges imageEdges the similarity matrix W based on
%% Intervening Contours the Ncut eigenvectors and discrete segmentation
nbSegments = 5;
disp(‘computing Ncut eigenvectors ...‘);
tic;
[SegLabelNcutDiscreteNcutEigenvectorsNcutEigenvaluesWimageEdges]= NcutImage(InbSegments);
disp([‘The computation took ‘ num2str(toc) ‘ seconds on the ‘ num2str(size(I1)) ‘x‘ num2str(size(I2)) ‘ image‘]);
%% display the edges
figure(2);clf; imagesc(imageEdges); axis off
disp(‘This is the edges computed press Enter to continue...‘);
pause;
%% display the segmentation
figure(3);clf
bw = edge(SegLabel0.01);
J1=showmask(Iimdilate(bwones(22))); imagesc(J1);axis off
disp(‘This is the segmentation press Enter to continue...‘);
pause;
%% display Ncut eigenvectors
figure(4);clf;set(gcf‘Position‘[100500200*(nbSegments+1)200]);
[nrncnb] = size(I);
for i=1:nbSegments
subplot(1nbSegmentsi);
imagesc(reshape(NcutEigenvectors(:i) nrnc));axis(‘image‘);axis off;
end
disp(‘This is the Ncut eigenvectors...‘);
disp(‘The demo is finished.‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-07-23 16:12 NormalizedCuts\
文件 12415 2004-06-18 03:19 NormalizedCuts\1.jpg
文件 13587 2004-06-18 03:19 NormalizedCuts\2.jpg
文件 3569 2004-06-18 03:19 NormalizedCuts\3.jpg
目录 0 2014-07-23 16:12 NormalizedCuts\common_files\
文件 7114 2004-06-18 03:19 NormalizedCuts\common_files\a_times_b_cmplx.dll
文件 7820 2004-06-18 03:19 NormalizedCuts\common_files\a_times_b_cmplx.mexglx
文件 13096 2004-06-18 03:19 NormalizedCuts\common_files\a_times_b_cmplx.mexmac
文件 1251 2004-06-18 03:19 NormalizedCuts\common_files\discretisation.m
文件 317 2004-06-18 03:19 NormalizedCuts\common_files\discretisationEigenVectorData.m
文件 37466 2004-06-18 03:19 NormalizedCuts\common_files\eigs2.m
文件 9728 2004-06-18 03:19 NormalizedCuts\common_files\mex_w_times_x_symmetric.dll
文件 8713 2004-06-18 03:19 NormalizedCuts\common_files\mex_w_times_x_symmetric.mexglx
文件 13396 2004-06-18 03:19 NormalizedCuts\common_files\mex_w_times_x_symmetric.mexmac
文件 2470 2004-06-18 03:19 NormalizedCuts\common_files\ncut.m
文件 604 2004-06-18 03:19 NormalizedCuts\common_files\ncutW.m
文件 8704 2004-06-18 03:19 NormalizedCuts\common_files\sparsifyc.dll
文件 8541 2004-06-18 03:19 NormalizedCuts\common_files\sparsifyc.mexglx
文件 9004 2004-06-18 03:19 NormalizedCuts\common_files\sparsifyc.mexmac
文件 7168 2004-06-18 03:19 NormalizedCuts\common_files\spmtimesd.dll
文件 7285 2004-06-18 03:19 NormalizedCuts\common_files\spmtimesd.mexglx
文件 8888 2004-06-18 03:19 NormalizedCuts\common_files\spmtimesd.mexmac
文件 211461 2006-11-13 15:57 NormalizedCuts\demo2.mht
文件 1613 2006-12-13 15:05 NormalizedCuts\demon
文件 309 2004-06-18 03:19 NormalizedCuts\main.m
文件 348672 2006-12-13 15:11 NormalizedCuts\nCut.doc
文件 1091 2004-06-18 03:19 NormalizedCuts\README_NcutImage.txt
目录 0 2014-07-23 16:12 NormalizedCuts\specific_NcutImage_files\
文件 10086 2004-08-10 10:39 NormalizedCuts\specific_NcutImage_files\a_times_b_cmplx.c
文件 4967 2004-06-15 17:00 NormalizedCuts\specific_NcutImage_files\affinityic.c
文件 7680 2004-06-18 03:19 NormalizedCuts\specific_NcutImage_files\affinityic.dll
............此处省略31个文件信息
- 上一篇:magnify用于matlab的放大插件
- 下一篇:RSSI定位 MATLAB
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论