Академический Документы
Профессиональный Документы
Культура Документы
Pi19404
January 12, 2013
Contents
Contents
Shape Classication using Histogram of Oriented Gradients
0.1 0.2 0.3 0.4 0.5 Introduction . . . . . . . . . . . . . . . . . Pre-Processing . . . . . . . . . . . . . . . . Feature Extraction . . . . . . . . . . . . . . 0.3.1 Histogram of Oriented Gradients Classication Task . . . . . . . . . . . . . Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
2 2 3 3 4 6
0.2 Pre-Processing
We can take two approaches a visual approach or a geometric approach. In geometric approach we make use of the co-ordinates and construct a model for the shape. Then Given a unknown set of pixels we can determine if it ts the model or not. In visual approach we construct a image from the captured-coordinates and use visual
2|6
As the name suggests it a histogram of gradients in different orientation directions. The Hog descriptor has become one of the most popular low-level image representations in computer vision. Local shape information often well described by the distribution of intensity gradients or edge directions even without precise information about the location of the edges themselves.Shape information is encoded by HOG and spatial information is encoded by sliding windows The derivative of images is computed along x and y directions.Applying Cartesian to polar transformation we obtain magnitude and orientation of the gradient at every point of the image. We consider the orientations along 9 orientation directions,a orientation resolution of 200 . We compute the histogram of oriented gradients that lie along these predened orientations. This will give a feature vector of length 9. The image is subdivided into block and HOG is computed over the each block To encapsulate correlation amongst neighborhood block simple techniques of sliding windows is used. To speed up the computation integral images are used to compute sum of pixels ie histogram bin count quickly over the windows. The most basic features are raw pixel feature .If we used raw pixels directly we would
3|6
The descriptors can be computed for set of training images,the image as well class label is written to the csv le.
4|6
1. train.le - input training data lename 2. test.le - input test data lename 3. t1.range - le containing feature scaling parameters 4. t1.scale - output data le name after performing feature scaling on training data le 5. t2.scake - output data le name after performing feature scaling on test data le 6. t1.model - SVM classier model le command to perform feature scaling is Java svm_scale -s t1.range train.le > t1.scale command to train the classier java svm_train t1.scale t1.model Command for feature scaling the test data java svm_scale -r t1.range test.le > t2.scale command to perform prediction on test data Java svm_predict t2.scale t1.model test.out we obtain perfect classication on this small data set. In the future the method can be tested on larger number of classes with more complex gesture and large test data set.
5|6
Bibliography
Bibliography
[1] N. Dalal and B. Triggs, Histograms of oriented gradients for human detection, in In CVPR, pp. 886893, 2005. [2] O. Ludwig, Hog descriptor for matlab, September 2010. 6 [3] O. Ludwig, D. Delgado, V. Goncalves, and U. Nunes, Trainable classier-fusion schemes: An application to pedestrian detection, in Intelligent Transportation Systems, 2009. ITSC 09. 12th International IEEE Conference on, pp. 1 6, oct. 2009. [4] C.-C. Chang and C.-J. Lin, LIBSVM: A library for support vector machines, ACM Transactions on Intelligent Systems and Technology, vol. 2, pp. 27:127:27, 2011. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm.
0.5 Code
The code for Histogram of oriented gradients was adapted for opencv images from following link [2] . The training les and test les are placed in directories labelled 1-10 correpondingly. The appliation takes as input name of the training/test base directory and outputs a le containing the feature descriptor in libsvm format. The training and testing is performed using libsvm tools. C/C++ based inplementation of HOG is embedded in PDF .In the java based implmentation itegral images were used to provide performance improvements. The code can be found at http://code.google.com/p/m19404/source/browse/HOG/
6|6