I want to find centroids of image regions: Mean shift
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
% an implementation by "Naotoshi Seo" with a little modification is used
% it is sensitive in choosing parameters.
% an implementation by "Bryan Feldman" is used for “mean-shift clustering"
% Alireza Asvadi
% Department of ECE, SPR Lab
% Babol (Noshirvani) University of Technology
% http://www.a-asvadi.ir
% 2013
%%clear command windows
clc
clear all
close all
%%input
tic;
I=imread('DSC_1540tamp1.jpg');
% I = imread('d1.jpg'); % Original: also test 2.jpg
% I = imread('bb.jpg'); % Original: also test 2.jpg
%%parameters
% kmeans parameter
K = 8; % Cluster Numbers
% meanshift parameter
bw = 0.2; % Mean Shift Bandwidth
% ncut parameters
%%compare
[Ims2, Nms2] = Ms2(I,bw); % Mean Shift (color + spatial)
%%show
figure()
imshow(I); title('Original'),figure;
imshow(Ims2); title(['MeanShift+Spatial',' : ',num2str(Nms2)]);
toc;
1 comentario
Respuestas (0)
Ver también
Categorías
Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!