% 本函数实现T中高频类别的画点
% ------------------------------------------------------------------------------
function ShowMostCluster(label, matchings, img, str1, str2, testImgPath)
testImgName = ['MostPtsImg' str1 '_' str2];
LengthLabel = length(label);
% 求标签的频率,并保存新的标签号
rateLable = tabulate(label);
[row, column] = size(rateLable);
num = 1;
clear newLable;
for i_row = 1 : row
if rateLable(i_row, 3) > 0.7
newLable(num, 1) = rateLable(i_row, 1);
newLable(num, 2) = num;
num = num + 1;
end
end
%画出当前图像
figure,imshow(img);
title(testImgName);
hold on;
[m, n] = size(newLable);
for i_lable = 1 : m
switch newLable(i_lable, 2)
case 1
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1 = matchings(1, j); %X坐标
y1 = matchings(2, j); %Y坐标
plot(x1, y1,'+','MarkerEdgeColor','c','markersize',5); %青色
end
end
case 2
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'+','MarkerEdgeColor','m','markersize',5); %粉色
end
end
case 3
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'+','MarkerEdgeColor','y','markersize',5); %黄色
end
end
case 4
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'+','MarkerEdgeColor','r','markersize',5);
end
end
case 5
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'+','MarkerEdgeColor','g','markersize',5);
end
end
case 6
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'+','MarkerEdgeColor','b','markersize',5);
end
end
case 7
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'o','MarkerEdgeColor','c','markersize',5);
end
end
case 8
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'o','MarkerEdgeColor','m','markersize',5);
end
end
case 9
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'o','MarkerEdgeColor','y','markersize',5);
end
end
case 10
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'o','MarkerEdgeColor','r','markersize',5);
end
end
case 11
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'o','MarkerEdgeColor','g','markersize',5);
end
end
case 12
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'o','MarkerEdgeColor','b','markersize',5);
end
end
case 13
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'*','MarkerEdgeColor','c','markersize',5);
end
end
case 14
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'*','MarkerEdgeColor','m','markersize',5);
end
end
case 15
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'*','MarkerEdgeColor','y','markersize',5);
end
end
case 16
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'*','MarkerEdgeColor','r','markersize',5);
end
end
case 17
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'*','MarkerEdgeColor','g','markersize',5);
end
end
case 18
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'*','MarkerEdgeColor','b','markersize',5);
end
end
case 19
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1 = matchings(1, j); %X坐标
y1 = matchings(2, j); %Y坐标
plot(x1, y1,'.','MarkerEdgeColor','c','markersize',10); %青色
end
end
case 20
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'.','MarkerEdgeColor','m','markersize',10); %粉色
end
end
case 21
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'.','MarkerEdgeColor','y','markersize',10); %黄色
end
end
case 22
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y坐标
plot(x1, y1,'.','MarkerEdgeColor','r','markersize',10);
end
end
case 23
for j = 1 : LengthLabel
if label(j) == newLable(i_lable, 1)
x1=matchings(1, j); %X坐标
y1=matchings(2, j); %Y�