MATLAB Answers

## Applying Gabor features for vehicle classification

Asked by Adil

### Adil (view profile)

on 14 Nov 2013
Latest activity Commented on by Adil

### Adil (view profile)

on 17 Nov 2013
Accepted Answer by Greg Heath

### Greg Heath (view profile)

My aim is to classify types of cars (Sedans,SUV,Hatchbacks) and earlier I was using corner features for classification but it didn't work out very well so now I am trying Gabor features code

code from here

Now the features are extracted and suppose when I give an image as input then for 5 scales and 8 orientations I get 2 [1x40] matrices.

1. squared Energy.

2. mean Amplitude.

Problem is I want to use these two matrices for classification and I have about 230 images of 3 classes (SUV,sedan,hatchback).

I do not know how to create a [N x 230] matrix which can be taken as vInputs by the neural netowrk in matlab.(where N be the total features of one image).

My question:

1. How to create a one dimensional image vector from the 2 [1x40] matrices for one image.(should I append the mean Amplitude to square energy matrix to get a [1x80] matrix or something else?)
2. Should I be using these gabor features for my purpose of classification in first place? if not then what? Thanks in advance

## Products

No products are associated with this question.

## 1 Answer

### Greg Heath (view profile)

Answer by Greg Heath

### Greg Heath (view profile)

on 17 Nov 2013
Accepted answer

If you have N I/O pairs of I-dimensional inputs and O-dimensional target outputs, the data matrices must have the sizes

` [ I N ] = size(input)`
` [ O N ] = size(target)`

Hope this helps.

Thank you for formally accepting my answers

Greg

Adil

### Adil (view profile)

on 17 Nov 2013

Yes I figured that out myself....the same day Thanks for your response by the way...

#### Join the 15-year community celebration.

Play games and win prizes!

Learn more

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

### MATLAB Academy

New to MATLAB?

Learn MATLAB today!