我为图像构建了树形图,我想将其分割
clear all;close all;
maxclust=3
RGB = imread('yellowlily.jpg');
imshow(RGB,'InitialMagnification',50)
RGB=rgb2gray(RGB);
rgb=double(RGB);
T = clusterdata(rgb,'maxclust',3);
X2=zscore(rgb);% standardized data
Y2=pdist(X2);% distance calculation
% % The connection between Step2 making making variable definition
Z2=linkage(Y2);
% % Step3 making clustering information
C2=cophenet(Z2,Y2);
% % Step4 create cluster, and make a pedigree chart
T=cluster(Z2,6);
H=dendrogram(Z2);
从这个树形图中我得到了两个分支。它是否处理2个对象???