Username Remember Me?
Password   forgot password?
   
 
2 of 2
2
Spectral Angle Mapper (SAM) using hypertools
Posted: 14 June 2009 09:52 AM   [ Ignore ]   [ # 16 ]  
Newbie
Rank
Total Posts:  9
Joined  2009-06-13

Yes that did it! Thank you so much, Pavel, you were a great help!!!!!

Nice greets from germany

:-)

Profile
 
 
Posted: 19 February 2010 12:45 PM   [ Ignore ]   [ # 17 ]  
Newbie
Rank
Total Posts:  6
Joined  2010-02-19

Hi All,
I have downloaded PR tool but, I don’t have samc and dissimm file?
Do you have any idea, why I am missing these files. I need to do classification of Hyperspectral image. And are we allowed to ask as many as questions:) Becasue it looks like it will take ages for me to manage a classification algorithm, if you don’t tell me where can I find a sample classification example step by step:)
I have 145x145x220(uint16) image data and 145x145 referance data with 16 classes in it (0 to 16) uint8. I want to do SAM based classification:S Please any help is appreciated. Regards

Profile
 
 
Posted: 19 February 2010 01:05 PM   [ Ignore ]   [ # 18 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  236
Joined  2008-04-26

Hi eexet,

samc and dissimm mappings are part of Hypertools toolbox. You may download it from http://ict.ewi.tudelft.nl/~pavel/spectra/hypertools.html
(edit 18-oct-2010 by Pavel: Hypertools download is now hosted at http://perclass.com/index.php/html/hypertools )

To install, just add it on your Matlab path.

For your problem, you will first need to construct a dataset object. You need to convert your uint16 into doubles and create a matrix samples times features.
Assuming your data matrix has 145x145 pixels (samples) and you have 220 spectral bands:
You can use im2feat(double(data)) as you can see in the example in the beginning of this thread. That adds objsize field so you can visualize the dataset still as an image. Alternative is to construct dataset directly using something like a=dataset(reshape( double(data),[145*145 220])).

To train SAM, you will need to add labels. If pixel label is stored in the reference data, you should be able to say a=setlabels(a, ref_matrix(:)).

To train SAM on class means, you may use w=samc(meancov(a))

For more specific questions, check out hypertools manual http://ict.ewi.tudelft.nl/~pavel/files/hypertools/hypertools.pdf

Kind Regards,

Pavel

[ Edited: 18 October 2010 09:15 AM by pavel]
Profile
 
 
Posted: 19 February 2010 02:53 PM   [ Ignore ]   [ # 19 ]  
Newbie
Rank
Total Posts:  6
Joined  2010-02-19

Hi Pavel,
Thank you very much for your informative reply. But I have diffuculty to open the TAR zip file,it says ‘failed to read the header’?
and it looks 84kb? Is anything wrong with the package?
Thanks

Profile
 
 
Posted: 19 February 2010 03:18 PM   [ Ignore ]   [ # 20 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  236
Joined  2008-04-26

Hi eexet,

you need gzip utility to extract this archive. Maybe your system does not have it installed by default.

To avoid such problems I replaced the .tar.gz archive with the normal .zip file. Just download this new file.

Does it help?

Pavel

Profile
 
 
Posted: 19 February 2010 03:35 PM   [ Ignore ]   [ # 21 ]  
Newbie
Rank
Total Posts:  6
Joined  2010-02-19

Hi Pavel,
Sorry for so many emails:S I am a bit panic becasue of my meeting next week on Wednesday:)I need to show the first classification results of my dimensionality reduction method.
I saw some Dipimage files but do i still need to download it? It look a bit complicated to download it:S
Regards,

Profile
 
 
Posted: 19 February 2010 03:56 PM   [ Ignore ]   [ # 22 ]  
Newbie
Rank
Total Posts:  6
Joined  2010-02-19

Hi Pavel,

I had a quick SAM classification with the Hyperspectral tool. i am attaching it, it needs a bit smooting and what kind of statistical methods should I use to see the classification accuracy? I found the Hyperspectral tool manual very short:) is there any detailed one for the beginners like me:)
I am mentioning the example you have given at the beginning of this thread, i found it very helpful and I guess it is not in the manual.

And last thing:) do you or PR have any works about dimensionality reduction?

Thanks a lot,

esra

Profile
 
 
Posted: 19 February 2010 03:59 PM   [ Ignore ]   [ # 23 ]  
Newbie
Rank
Total Posts:  6
Joined  2010-02-19

Sorry I forgot to attach teh file...Here it comes:)Original one can be downloaded from Purdue University - Multispec program’s documentation site.

Image Attachments
PG_Aviris_SAM.jpg
Profile
 
 
Posted: 19 February 2010 05:14 PM   [ Ignore ]   [ # 24 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  236
Joined  2008-04-26

Hi esra,

you need DipImage only if you want to visualize the hyperspectral image and to apply some spatial filters.

To see classification accuracy in PRTools, use testc command, see the manual.

Unfortunately, there is no more detailed Hypertools manual as it was academic project which is now for three years over. However, you can find some documentation also in the help sections of the matlab functions.

For dimensionality reduction, you may consider pca or fisherm in PRTools or check a list of routines in the Contents file of hypertools.

This forum is intended for software discussion which is of general interest, not for providing step-by-step recipes for specific problems. I’m afraid I cannot help you with your concrete assignment.

Kind Regards,

Pavel

Profile
 
 
Posted: 19 February 2010 05:42 PM   [ Ignore ]   [ # 25 ]  
Newbie
Rank
Total Posts:  6
Joined  2010-02-19

Hi Pavel,
Thank you for your reply. These are already very helpful.
Kind Regards,
Esra

Profile
 
 
   
2 of 2
2