Hyperspectral Image Classification/Unmixing Matlab code

2 visualizaciones (últimos 30 días)
Keshav Dev Singh
Keshav Dev Singh el 14 de En. de 2016
Movida: DGM el 20 de Feb. de 2023
Hello All,
I am working on Plants hyperspectral image classification/unmixing. For this I want to precisely explain my problem in bit simple way. I have a vegetation hyperspectral data of 240 bands. I want to extract its endmembers and then corresponding abundance maps. I have some doubts to obtain the final classified image from these abundance maps. Can I use "imfuse" matlab algorithm (Ref: http://stackoverflow.com/questions/25587530/fusing-more-than-2-images-in-matlab) or overlay transparency with abundance maps to display final classified image? OR how these abundance maps can be show as a single classified image representing all endmember classes? In simple words, How to link these abundance maps to get final classified image?, as the matlab community did plenty of work in this field I hope someone can guide me in more precise way. Moreover if someone have any matlab code to directly classified an hyperspectral image please let me know.
Later for the classified image I want to calculate the classification accuracy of each pixel and hence the full classified image (overall accuracy or average accuracy). May I know how to calculate each pixel unmixing/classification accuracy or what could be the simplest procedure in matlab? If someone also have any simple matlab code/idea to calculate overall hyperspectral image classification accuracy in matlab please do let me know.
I hope my problem is quite clear. Your help will be highly appreciated in this regard.
Best Regards, Keshav
  3 comentarios
Keshav Dev Singh
Keshav Dev Singh el 14 de En. de 2016
No I don't have the ground truth information/file, but on visual inspection I can say which pixel is of which type, but its a ~20,000 pixels image. Therefore I want to know if we don't have the ground truth or correctly classified pixels information then how one can measure the classification accuracies? Thanks!!
Walter Roberson
Walter Roberson el 14 de En. de 2016
When you use visual inspection to say which pixel is of which type, are you looking at the color in isolation or do you need some context from surrounding pixels? If you do need some context is that context color only or is it shapes as well?

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 23 de En. de 2016
"Can I use "imfuse" matlab algorithm (Ref: http://stackoverflow.com/questions/25587530/fusing-more-than-2-images-in-matlab) or overlay transparency with abundance maps to display final classified image? "
Yes.
"OR how these abundance maps can be show as a single classified image representing all endmember classes?"
scatter(). Or create an indexed (pseudocolor image) in which each location is given the label of the type of vegetation there, and then image() it with an appropriate colormap that distinguishes visually between the types.
"How to link these abundance maps to get final classified image?"
Any of the methods from above.
"May I know how to calculate each pixel unmixing/classification accuracy or what could be the simplest procedure in matlab"
This is what we have been concentrating on, the method and accuracy of the classification, as the rest is minor decoration, and what you have been resisting talking about. The answer to this question is therefore apparently "No, you cannot know".
"Therefore I want to know if we don't have the ground truth or correctly classified pixels information then how one can measure the classification accuracies"
You cannot do so. You cannot measure accuracy of a method unless you know what the right answer is during your testing procedure.
The training and testing of your classification method does not have to take place on all of your data: you can extract representative examples for which the answers are known with certainty (for example if someone has gone down to the ground and created a map of what they see in front of them), and find statistics for that. Then, providing that the examples were truly representative then you assume that the accuracy is the same for your more complete data -- if the assumption is not true then you either have bugs in the procedure or your samples were insufficiently representative. Watch out for blur at edges, especially if you used JPG files. Watch out for how the algorithm reacts when there is a mix of types in a single pixel (one type of vegetation overhanging another or growing mixed with another.)
"you are not replying exactly as per my asked question"
This replies exactly to your asked question.
  4 comentarios
Abdemoula Haboub
Abdemoula Haboub el 25 de Ag. de 2016
Movida: DGM el 20 de Feb. de 2023
Hi Dear Walter Could you please define or specify the function classify_pixel that you use in this code? Thanks you very much
Taha
Walter Roberson
Walter Roberson el 25 de Ag. de 2016
Movida: DGM el 20 de Feb. de 2023
classify_pixel = @(pixel_value, classifier) classifier(pixel_value);
Where you would have created classification_information by a patternnet() call.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 14 de En. de 2016
If you're going to specify what each type of pixel is, then that is essentially your ground truth. You're saying that you know for a fact that those pixels are that type of vegetation. I doubt you could do this accurately, for example if you lassooed some region and said they were pecan trees, there would still be some pixels in that region that were pure plain dirt but now you've said that they're pecan trees so if your algorithm says they're not pecan trees, you will count that as wrong, even though it's right. So if you do that there will be a certain amount of error, but maybe that error is something you can live with.
You may want to look up ROC curves and confusion matrix and get up to speed on those concepts.
  1 comentario
Keshav Dev Singh
Keshav Dev Singh el 23 de En. de 2016
Movida: DGM el 20 de Feb. de 2023
@Image Analyst, Thanks for your reply, but you are not replying exactly as per my asked question...

Iniciar sesión para comentar.

Categorías

Más información sobre Hyperspectral Image Processing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by