I want to find centroids of image regions: Mean shift
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
% 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 commentaire
Réponses (0)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!