clc;clear all;close all;
load('spectra_truth_campus_1')
load('muufl_gulfport_campus_1_all4TypeLabel')
rowindice=hsi.groundTruth.Targets_rowIndices
colindice=hsi.groundTruth.Targets_colIndices
typeindice=ismember(hsi.groundTruth.Targets_Type,'all4types')
rowindice=rowindice(typeindice)
colindice=colindice(typeindice)
guangpu=zeros(72,57)
w=hsi.Data
for i=1:57
row=rowindice(i)
col=colindice(i)
guangpu(1:72,i)=w(row,col,1:72)
end
E_vca=vca1(guangpu,'Endmembers',4);
sum=0
for i=1:4
for j=1:4
jiaodu=acos(dot(E_vca(1:72,i),spectra_truth_campus_1(1:72,j))/(norm(E_vca(1:72,i))*norm(spectra_truth_campus_1(1:72,j))))*180/pi
if j==1
sum1=jiaodu
elseif sum1>jiaodu
sum1=jiaodu
end
end
sum=sum+sum1
end
wavelength=hsi.info.wavelength/1000
plot_sig( 'VCA',E_vca,spectra_truth_campus_1,wavelength,101,1)
看效果不是很好应该不是这all4type brown、dark green、faux vineyard green、pea green
标签:vca,rowindice,结果,hsi,all4,jiaodu,72,type,campus From: https://www.cnblogs.com/hahaah/p/17563845.html