嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
基于MATLAB的二维和三维图形分割工具
% add all needed function paths
addpath .\coherenceFilter
addpath .\GLtree3DMex
% %% Compile
% fprintf('COMPILING:\n')
% mex GraphSeg_mex.cpp
% fprintf('\tGraphSeg_mex.cpp: mex succesfully completed.\n')
%
% mex .\GLtree3DMex\BuildGLTree.cpp
% fprintf('\tBuildGLTree : mex succesfully completed.\n')
%
% mex .\GLtree3DMex\KNNSearch.cpp
% fprintf('\tKNNSearch : mex succesfully completed.\n')
%
% mex .\GLtree3DMex\DeleteGLTree.cpp
% fprintf('\tDeleteGLTree : mex succesfully completed.\n\n')
% %end of Complie#
% %load an gray image:
%load clown;
%I_gray = X;
[filename,pathname]=uigetfile({'*.bmp'},'choose the picture');
str=[pathname, filename];
I_gray =imread(str);
I_gray=rgb2gray(I_gray);
%smooth the image by coherence filter:
filted_I = CoherenceFilter(I_gray,struct('T',5,'rho',2,'Scheme','I', 'sigma', 1));
%adjacent neighborhood model:
L = graphSeg(filted_I, 0.5, 50, 2, 0);
%k-nearest neighborhood model:
Lnn = graphSeg(filted_I, 0.5/sqrt(3), 50, 10, 1);
%display:
subplot(3, 1, 1), imshow(I_gray, []), title('original image');
subplot(3, 1, 2), imshow(label2rgb(L)), title('adjacent neighborhood based segmentation');
subplot(3, 1, 3), imshow(label2rgb(Lnn)), title('k nearest neighborhood based segmentation');
【文件目录】
GraphSeg
├── BuildGLTree.mexw64
├── DeleteGLTree.mexw64
├── GLtree3DMex
│ ├── BuildGLTree.cpp
│ ├── BuildGLTree.m
│ ├── DeleteGLTree.cpp
│ ├── DeleteGLTree.m
│ ├── GLTree.cpp
│ ├── GLTree.h
│ ├── KNNSearch.cpp
│ ├── KNNSearch.m
│ └── TestMexFiles.m
├── GraphSeg.h
├── GraphSeg_mex.cpp
├── GraphSeg_mex.mexw64
├── KNNSearch.mexw64
├── binaryHeap.h
├── coherenceFilter
│ ├── CoherenceFilter.m
│ ├── compile_c_files.m
│ ├── functions
│ │ ├── derivatives.c
│ │ ├── derivatives.m
│ │ ├── imgaussian.c
│ │ ├── imgaussian.m
│ │ ├── showcs3.fig
│ │ └── showcs3.m
│ ├── functions2D
│ │ ├── CoherenceFilterStep2D.c
│ │ ├── CoherenceFilterStep2D.m
│ │ ├── CoherenceFilterStep2D_functions.c
│ │ ├── ConstructDiffusionTensor2D.m
│ │ ├── EigenVectors2D.m
│ │ ├── StructureTensor2D.m
│ │ ├── diffusion_scheme_2D_implicit.m
│ │ ├── diffusion_scheme_2D_non_negativity.m
│ │ ├── diffusion_scheme_2D_rotation_invariant.m
│ │ └── diffusion_scheme_2D_standard.m
│ ├── functions3D
│ │ ├── CoherenceFilterStep3D.c
│ │ ├── CoherenceFilterStep3D.m
│ │ ├── CoherenceFilterStep3D_functions.c
│ │ ├── EigenDecomposition3.c
│ │ ├── EigenDecomposition3.h
│ │ ├── EigenVectors3D.c
│ │ ├── EigenVectors3D.m
│ │ ├── StructureTensor2DiffusionTensor3DWeickert.c
│ │ ├── StructureTensor2DiffusionTensor3DWeickert.m
│ │ ├── StructureTensor3D.m
│ │ ├── diffusion_scheme_3D_implicit.m
│ │ ├── diffusion_scheme_3D_non_negativity.c
│ │ ├── diffusion_scheme_3D_non_negativity.m
│ │ ├── diffusion_scheme_3D_rotation_invariant.c
│ │ ├── diffusion_scheme_3D_rotation_invariant.m
│ │ ├── diffusion_scheme_3D_standard.c
│ │ └── diffusion_scheme_3D_standard.m
│ └── images
│ ├── Thumbs.db
│ ├── sphere.mat
│ ├── sync.png
│ └── sync_noise.png
├── graphSeg.m
├── knng_search.m
├── license.txt
└── test_GraphSeg.m
6 directories, 59 files