Research Article

Improved Unsupervised Color Segmentation Using a Modified Color Model and a Bagging Procedure in -Means++ Algorithm

Pseudocode 2

Cluster grouping.
set groups, result
for each clusters in [clusters_, clusters_120, clusters_240] do
for each cluster in clusters do
if length(groups) == 0 then
set new_group
add cluster in new_group
add new_group in groups
continue
for each group in groups do
if distance(cluster, group) < threshold then
add cluster in group
else
set new_group
add cluster in new_group
add new_group in groups
for each group in groups do
if length(group) == 1 then
delete group
else
add merge(group) in result