I want to find centroids of image regions: Mean shift
1 次查看(过去 30 天)
显示 更早的评论
% 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;
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cluster Analysis and Anomaly Detection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!