X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02 May 2016 12:44 PM by  anon
SAM classification using ASCII file
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:4
New Member


--
02 May 2016 12:44 PM
    We are trying to create a comprehensive spectral libraries for both 'soil' and 'salt' based on 8 study areas and use those spectral libraries in Spectral Angle Mapper algorithm in order to map the salt pans existed in the entire world. To do so we need to use ASCII files which contain only band values of each individual pixel in each band without location information. I have read that the right format for importing spectral information is the one that has 2 columns of number of bands and mean values of ROIs. Below is an example of an ASCII file that can easily be set up in notepad. Since my preference is using the first type of output (values for all bands), is there any way by which I can use information – in my preferred format – as input to my algorithm?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    02 May 2016 03:00 PM
    When you use SAM in ENVI, you will need to supply one mean spectrum per training class. Do you plan on running SAM with each spectrum for a training class? It is correct that if you want to make a spectral library from an ascii file, you will need have the spectra in columns with the first column as wavelength and then subsequent columns representing each pixel or material.

    Deleted User



    New Member


    Posts:4
    New Member


    --
    02 May 2016 03:23 PM
    For now, we have already sampled ROIs from several selected representative images, our questions now are i) how can we export these ROIs to a training data which records the band values for ALL pixels within the ROIs (not only the means with the ROIs; should we export them into an ASCII file)? and ii) after that, how can we use the exported training data into a supervised classification (such as Maximum likelihood; it seems like the current design only takes ROIs)?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    03 May 2016 06:11 AM
    You can export the ROI as ascii and it will contain all pixel values for all bands. However, the SAM algorithm takes the mean spectrum or a single spectrum which can be from an ROI or a spectral library. However, spectral libraries are not designed to be collections of pixels for a classification training data set - this is what ROIs are for. Maximum likelihood must take a collection of pixels from an ROI or shapefile so that it can calculate covariance. It cannot accept a single or mean spectrum as input. What is the purpose of having the pixels of a training data class as a spectral library?

    Deleted User



    New Member


    Posts:4
    New Member


    --
    03 May 2016 02:45 PM
    I wanted to create and use a comprehensive training data generated from different ASCII files. But SAM only works with the mean values. How can I use all exported ASCII files which contain all pixel's value as training data for other types of supervised algorithms?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    04 May 2016 07:32 AM
    In this case, you use ROIs. You can also sometimes use the statistics file of one file to classify another as described in this help article: http://www.harrisgeospatial.com/Suppo...

    Deleted User



    New Member


    Posts:4
    New Member


    --
    05 May 2016 10:35 AM
    Okay, I will read through this article. Thank you so much.
    You are not authorized to post a reply.