Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectral Unmixing using mesma function/ Problem with low values #78

Closed
ALoak21 opened this issue Nov 8, 2021 · 1 comment
Closed

Spectral Unmixing using mesma function/ Problem with low values #78

ALoak21 opened this issue Nov 8, 2021 · 1 comment

Comments

@ALoak21
Copy link

ALoak21 commented Nov 8, 2021

Hello There!

I'm currently trying to do some spectral unmixing with Landsat 4-8 Data. For this, i am using the mesma() function, developed by jakob schwalb-willmann. Apart from some vegetational Endmember/spectra, for e. g. floodplain areas and wetlands, i also tried to run the unmixing function with a shade-spectrum for calculating the percentage of shade in each pixel. For this, i added the value 0.000001 for each band of the raster layer (in my Sources, the calculation of the shade-percentage is done with setting the values to 0, but then the results of mesma() are completely trash).
Normally, the expected values/percentage of the Endmember spectra in each pixel after the unmixing should be between 0 and 1. But this time, the mesma function calculates values from 0 to 364649.8, which in my opinion can't be right.
Has anybody an idea, why?
Mesma uses a non-negative least squares solver, maybe this is a reason for the problem?

Part of the code i'm using:
Em_pos = st_read("path") # reading the table with the geographic position of the Endmember in the Data
s_05_07_19 = stack("path") # raster, from which the Endmember should be extracted
EM_L7 = extract(s_05_07_19, Em_pos) # extracting the Endmember from the Raster
EM_L7.df = as.data.frame(EM_L7)
EM_L7.df [8,] = c(0.000001,0.000001,0.000001,0.000001,0.000001,0.000001,0.000001) # adding the shade-class to the Frame
Data = stack ("path") # raster, for which the unmix-function should be applied
unmix = mesma(Data,EM_L7.df,method = "NNLS",verbose = T)

@16EAGLE
Copy link
Collaborator

16EAGLE commented Apr 17, 2024

Please update to the most recent github version, as mesma has been updated in the meantime, implementing a sum to one constraint. Please reopen of this issue persists.

@16EAGLE 16EAGLE closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants