Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

how do i rectify the error that i have got while performing the kmeans clustering

1 visualizzazione (ultimi 30 giorni)
color based segmentation using kmeans clustering how do i use 'start' key word in kmeans..i have tried a code but it gives an error it must have k rows how to solve it the code i tried is here
[cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...
'Replicates', 4, 'start',seeds);
rng(123); %// Set seed for reproducibility
numReplicates = 4;
ind = randperm(size(ab,1),numReplicates*nColors);
% ind=ind(1:numReplicates*nColors);
seeds = permute(reshape(ab(ind,:).', [2 nColors numReplicates]), [2 1 3]);
%// Now call kmeans
[cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...
'Replicates', numReplicates, 'start', seeds);

Risposte (0)

Questa domanda è chiusa.

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by