X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Jun 2009 02:09 AM by  anon
K Nearest Neighbor
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
23 Jun 2009 02:09 AM
    Hello, I need to use the KNN classification algorithm on ENVI in order to classify forests from a SPOT5 image, but I can't find it. Does anyone know where I can find it and how to use it? Thanks

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Jun 2009 06:57 AM
    I'm not sure of the exact definition of the K Nearest Neighbor but perhaps the following would be of interest from the ENVI main menu: Classification ? Unsupervised ? K-Means

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Jun 2009 07:01 AM
    ENVI does not provide a KNN classification tool except as an option in the Feature Extraction module's object-based classification.  In core ENVI, K-means is not the same as KNN.  There is the Mahalanobis distance classifier, which is a similar distance-based classification.  In fact, KNN can employ the Mahalanobis distance to determine the k nearest neighbors among the training data.  But ENVI's Mahalanobis distance classifier doesn't choose the class for each pixel based on a KNN algorithm, where the chosen class would be the majority class of the k nearest neighbors to the given pixel among the training pixels.  Instead, it chooses the class for each pixel based on the minimum Mahalanobis distance from that pixel to the mean of each training class. In the Feature Extraction module to ENVI, the KNN classifier is used on objects, or segments calculated in a previous step from the input image.  So, it isn't individual pixels that are classified, it's objects. I hope that helps. Peg  

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Jun 2009 07:57 AM
    Thank you for your help ! But as you said, the Mahanlanobis distance classifier is based on class statistics, not on "real" pixel ditances, so I don't think I can use it as a substitute... At least now I know that ENVI doesn't provide a KNN classification. (which is weird since it's one of the most popular classification methods...) Thanks again, Vicou
    You are not authorized to post a reply.