# Calculate percentage of endmember abundance in Hyperspectral Unmixing resut?

Hi, my first time here, I fell in love with ORFEO only a few weeks ago.

I am unsure on how to calculate the percentage each endmember has in the result of Hyperspectral unmixing. For an example RGB Pixel I have the values: [137.75, 123.70, 58.39] which with 4 endmembers gives me an abundance matrix of : [0.76, 0.03, -0.35, 0.92].

Am I right by assuming these are the coefficients of the linear equation that when multiplied with my endmembers results in the pixel value? How could I calculate a percentage of each endmember present in the pixel?

King reguards,

Hello,

this is weird, I think the output abundances should lie between 0 and 1, and should sum to 1. Have you tried to verify the result of unmixing by manually applying the linear model using the endmembers and the output abundances ? Which unmixing algorithm did you use ?

Where do the endmembers come from ? Have they been generated using the VertexComponentAnalysis application ?

1 Like

I used the ucls-algorithm, and the endmembers do come from the VertexComponentAnalysis application. I tried to verify the result after your advice using different pixel values as the example above, and it gives back the correct values:

``````import numpy as np
# observed pixels
R = np.array([146.21552, 142.08421, 80.00875])

# endmembers
A = np.array([
[212.6503, 10.482534, 136.97844],
[267.92877, 32.882927, 108.81945],
[181.8901, -5.3892436, 41.599026]
])

# abundance matrix
S = np.array([0.294039,-0.129561, 0.620872])

print(A.dot(S))

``````

Returns:

``````[146.21543197 142.08411226  80.00868937]
``````

Here a link to my testdata:

Raphael

Hello Raphael,

the result are weird, in particular I think the endmembers produced by the VCA should all be positive. I tested another implementation of the algorithm (available here) and obtained the same output endmembers, so I donâ€™t think the problem comes form OTB implementation (note that both implementation are based on the same Matlab code provided by the author of the VCA paper [1]).

perhaps the problem comes from the input data ? I am not sure the linear mixing model and use VCA to compute endmembers for a RGB image. Maybe the algorithm should be used on an actual hyperspectral image of high dimension ?