how to classify an image

2 views (last 30 days)
Pat
Pat on 30 Dec 2013
Commented: Walter Roberson on 30 Dec 2013
I am working on classification of images,i have 500 categories of images with 8 images for each category,i need to use a classification algorithm,i like to use knn classifier or svm ,I have extracted features of those 96 images,say mean value so i have 500x8,from this can u tell how to classify the images,does normal classification can be done,its Polyu database of palmprint,kindly help

Answers (1)

Walter Roberson
Walter Roberson on 30 Dec 2013
I would not advise svm for this. multi-class svm is time consuming and memory consuming. More efficient than multi-class svm is to do ceiling(log2(N)) svm's where N is the number of classes. e.g., (category 1 to 250, vs 251 to 500), select the "winner", subdivide it into two pieces, and so on dividing into two until you get to the point where the "winning" side only had a population of 1 category.
knn or the like is more likely to give you a one-step answer -- but it won't necessarily be the most accurate answer if some of the possibilities are similar.
  2 Comments
Pat
Pat on 30 Dec 2013
ceiling(log2(N)) gives error as Undefined function 'ceiling' for input arguments of type 'double'.
I have divided the data into training and testing
can you tell how to find accuracy of the test data say i have used 80 % for training and 20 % for testing using knn classifier
Walter Roberson
Walter Roberson on 30 Dec 2013
ceiling(log2(N)) is mathematical description, not code. The MATLAB code is
ceil(log2(N))
The calculation is an upper bound on the number of svm() calls you will need to make in order to determine which class any given point belongs to.
Accuracy of your test data is 100 * (number of test entries your classifier correctly classifies) / (total number of test entries)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!