# Using Principal Component Analysis for corner feature extraction

I am on a project of vehicle type Identification (MUV,jeep,Sedan,etc) from images and Here is what I have done up-to now on matlab.

I am working only on the sideview of images.

Then I detected the corners easily

Now I got a matrix C with 40 corner coordinates thus I got a matrix of C=[40x2]
I converted it to a linear form using C=C(:); so I got C=[1x80] (as Neural Network destroys coordinates information itself) for 1 image
But I have about 9 image for each class(MUV,Jeep,Sedan) so I made a matrix using C matrix to form a new matrix say MAT=[9x80]

Now I have a corner feature of MAT=[9x80]
1. What Other features could I use or the corner feature would itself be fine enough.(may be SURF features)
2. The Input Format of NN is inMAT=[nxm] where n=number of features and m=total images and target Format is tgMAT=[cxm] where c=number of classes (MUV,Sedan,jeep) and 'm=total images'. Am I right here?

• Why do you think this would work? I mean, PCA essentially works if you give it high-dimensional data that's a linear combination of a few vectors (the principal components). I don't see why corner coordinates in more or less random order would be combinations of a few linear components. Nov 9 '13 at 10:34
• Ok so Can I use the Corner vector MAT=[9x80] features directly as a feature vector for training and classification?
– xor
Nov 9 '13 at 11:44
• @nikie I have made some edits to question please check it
– xor
Nov 9 '13 at 12:18
• I think 9 samples are not enough to train. You can also try polar coordinates in some cases they give better results. You can also use bounding box sizes of the cars as input. But mainly you should decide the type of input you want to use vectorel (require a lot of pre processing) or image information. You can check pattern recognition and character recognition steps for image information usage in NNs. Nov 12 '13 at 11:40

Neural networks can cope with not linearly separable classes, but they're not magic either. They still assume smooth decision boundaries, and I don't think your data would have those.

And before you try to feed the same data to an SVM, RVM, random forest, or any other classifier: I don't think the corner coordinates are good features for any off-the-shelf classification algorithm. The typical input vector in machine learning is something like {age,weight,height,eye color}, where for every input vector, index 2 means "weight". In your input vector, index 2 can sometimes be a corner somewhere near the front wheel of the car, and in another case it's a corner near the roof.

Have you tried simpler shape descriptors, like Fourier descriptors or maybe Hu moments?

• No Sorry... But I tried using SURF features...because I read that they find out most relevant features by themselves. And right now I am studying about gabor filters too.. Are they good to go? And please clarify my second point on neural network.
– xor
Nov 9 '13 at 14:27
• Also I am asking it here because I know you guys are practical in this field and when I ask my professor/mentor about any help then all I see is a Confused face saying Ok I will see it...!! You may leave now
– xor
Nov 9 '13 at 14:50
• @adil: I'm not a Matlab used, so I can't tell you how your Matlab NN implementation is used. Regarding SIFT: it's certainly useful, but harder to use. With SIFT, you again get a variable number of descriptor vectors (one for each keypoint), so you can't feed them to your NN directly. You'll have to implement something like a bag of words model instead. If you're not sure how your classifier is invoked, I'd recommend to start with a simpler shape descriptor first, where you get a fixed number of features for your shape. Nov 9 '13 at 15:46
• Ok thanks....will ask you If I stuck again dont mind :P
– xor
Nov 9 '13 at 16:04