If I use a mask for the end member extraction algorithm (e.g. FIPPI), then it calls the compress method on the HSI cube. I've pasted the source code below.
def _compress(vec, mask):
n = np.sum(mask)
cmp = np.ndarray((n, vec.shape[1]), dtype=np.float)
i = 0
for j in range(mask.shape[0]):
if mask[j] == 1:
cmp[i] = vec[j]
i += 1
return cmp
Then if we get the indexes of the endmembers later on, won't be computing the wrong indexes, since the index i will pertain to the compressed array (see code below)?
self.E, self.idx = eea.FIPPI(cM, q=q, maxit=maxit)
self.idx3D = [(i % self.w, i // self.w) for i in self.idx]
If I use a mask for the end member extraction algorithm (e.g. FIPPI), then it calls the compress method on the HSI cube. I've pasted the source code below.
Then if we get the indexes of the endmembers later on, won't be computing the wrong indexes, since the index i will pertain to the compressed array (see code below)?