Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Abstract Due to its wide variety of applications, object it has other objects as well. For example, the image of gun
detection has been the center of attention for researchers in the
may contain a person holding that gun, a person to which the
field of digital image processing and computer vision. When
trained with the sample training dataset, various object
gun is being pointed, the environmental background and so
classifiers can detect and classify the objects with prominent on. So it is not suggested to provide whole image to a
accuracy and precision. The major step in any of the object classifier. Rather, it is more beneficial to extract some
classification algorithm is feature selection. Performance of the features from the object of interest in an image.
classifier depends on robustness of the feature vector selected.
This paper presents unconcealed gun detection method by Feature is simply a piece of information related to the object
using Boosted Cascade Classifier. The classifier was trained in an image. A feature may typically be the shape, edge,
with two of the widely known feature types: Haar-like features color, size or texture of object. The more strong the feature
and Histogram of Oriented Gradients (HOG) features. The set, the more accurate is the classifier. So the most important
paper also presents a comparative study between the two of the step in training a classifier is to decide the feature set and to
feature types under the consideration of unconcealed gun
detection. The classifier was trained with the dataset of 11,257
select a robust feature extraction technique.
number of images using both the types of features separately
There are various feature extraction algorithms used in
and tested with dataset of 700 number of images. Using the
Haar-like features the classifier attained the accuracy of practice today for the purpose of classification, few of them
42.14% with the precision of 45.73%. While using the HOG are: SIFT (Scale Invariant Feature Transform) [1], SURF
features, the classifier gained the accuracy of 88.57% with the (Speeded-up Robust Features) [2], FAST (Fusing Points and
precision of 95.30%. The evaluation metrics clearly depicts the Lines for High Performance Tracking) [3], MSER
superiority of HOG features over the Haar-like features in (Maximally Stable External Regions) [4], BRISK (Binary
unconcealed gun detection. Robust Invariant Scalable Key-points) [5], HOG (Histogram
of Oriented Gradients) [6], Haar wavelets [7], LBP (Local
Binary Patterns) [8] and many others.
Keywords Object Detection, Cascade Classifier, Haar-like
features, HOG features The biggest problem in object detection is to find the most
appropriate feature type for the particular application.
Literature survey reveals that Haar and HOG feature types
I. INTRODUCTION are the most powerful features from all the above mentioned
Unconcealed weapon detection is a modern research area in features. But at the same time we cannot ignore the
the field of Computer Vision. It is an application of smart importance of other features in forming the basis for the
surveillance which provides a guaranteed, cost efficient and development of these very famous feature types.
accurate security system. Weapon detection is not a new
field for research because much work has been done on This paper provides a comparative study between the two
concealed weapon detection. The interesting point is that well-known feature types i.e. HOG and Haar-like features
Unconcealed Weapon Detection is a relatively new field of for the purpose of unconcealed weapon detection.
research.
The HOG features, introduced by Dalal and Triggs in [6],
To detect any object, a classifier is trained. A classifier is are well known for their high detection accuracy whereas the
nothing but a computer program which is capable to identify Haar-like features, proposed by Viola and Jones in [7] are
an object of interest among all other objects. A classifier famous for their fast training speed. This paper proposes a
needs some input to process so that it can be trained practical approach to validate the above properties of both
accordingly. Input to the classifier is in the form of training the feature types in case of unconcealed gun detection.
images. An image not only contains the object of interest but
The rest of the paper is ordered as follows: Section II
Department of Computer Systems Engineering
Mehran University of Engineering and Technology, Jamshoro, Sindh,
outlines the previous work, Section III provides the details
Pakistan.
sorath.asnani@hotmail.com, engr.syeddanialwaseem@outlook.com,
ali.manjotho@faculty.muet.edu.pk
34
ASIAN JOURNAL OF ENGINEERING, SCIENCES & TECHNOLOGY, VOL. 4, ISSUE 1 MARCH 2014
of the feature types used in this paper, Section IV describes III. FEATURE SELECTION
the classifier training for gun detection, Section V discusses
Feature selection and the training algorithm are the two key
the training and testing corpus, Section VI describes the
steps of creating an efficient classifier. In this section we
methodology carried out for training the classifier,
explain the working mechanism of Haar-like and HOG
Experimental results are demonstrated in Section VII,
features one by one.
Section VIII summarizes and concludes the proposed
system. Finally the future work and references are provided.
A. HAAR LIKE FEATURES
II. RELATED WORK The Haar-like features, introduced by Viola-Jones in [7],
have been used widely for face detection. Haar-like feature
This section examines the related work of HOG and Haar-
takes its name from the Haar Wavelets. Haar-like feature is a
like features.
rectangular feature. Each rectangle is made up of alternative
The Haar-like features are being used extensively for face white and black blocks. The Haar-feature is computed by
detection. These features have proved to be successful for subtracting the sum of white and black regions with each
face detection as in [7]. The famous HOG features have been other. First, calculate the sum of all the white rectangular
used successfully in Human and Pedestrian Detection in [9]. regions and the sum of black regions separately. Then
The research not only stops there. But the researchers are subtract the sums from each other. Indisputably the
striving hard to compare both the feature types for many estimation of the subtraction is the estimation of the Haar
other applications. characteristic.
A Pedestrian detection method based on both the feature Haar-like features can be classified as two, three and four
types i.e. HOG and Haar-like features, is proposed in [10]. rectangle features, as shown in figure 1.
The combined approach was suggested to take advantage of
both features i.e. to obtain the greater detection precision by
HOG and to greatly reduce the training time by the use of
Haar-like features.
Liang et al. [11] proposed a multi kernel approach for
(a) (b) (c)
Vehicle detection based on HOG and Haar-like features. The
experimental results in [11] shows that vehicle detection Figure 1: Haar-like features (a) Two-Rectangle features, (b) Three-
system is 88% accurate using HOG features, by using only Rectangle features, and (c) Four-Rectangle features
Haar-like features its accuracy decreases to 86% and when
both the features are combined, the overall accuracy
increases up to 91%, which is a significant achievement of Figure 2 shows the Haar-like features extracted from the
the final trained classifier. training dataset.
35
ASIAN JOURNAL OF ENGINEERING, SCIENCES & TECHNOLOGY, VOL. 4, ISSUE 1 MARCH 2014
focus on its shape, which is the main reason for using HOG known as Cascade Classifier. The boosted cascade
features. classifier works on the concept of sliding window. A small
rectangular window is slid over the entire image during each
Now, we briefly discuss the working mechanism of HOG
stage. At each stage, the sliding window is moved from left
feature extraction. Image is a collection of pixels. The
to right and from top to bottom of an image. If the region
cluster of adjacent pixels forms a spatial region known as
covered by the window does not contain object of interest, it
Cell. Adjacent cells are combined into a larger region
is marked as negative and is discarded from the process. On
called Block. The blocks are adjusted by 50% overlap
the other hand, if the object of interest is found at any stage,
with one another. Horizontal and Vertical gradients are
it is moved to the subsequent stages. The final detection
calculated for each cell, known as a Gradient Vector. The
result is provided by the last stage.
gradient vector of each cell inside a block is consolidated
which structures the final feature vector. The gradients of The more the number of stages and the number of training
cell are the local histograms computed over the pixels of the images, the more efficient is the classifier.
cell. Different experiments show that the best results are
obtained by having 8x8 pixels per cell, and 2x2 cells per
block as shown in figure 3. V. TRAINING AND TEST CORPUS
We have created two separate classifiers, one is based on the
HOG features and the other is based on the HAAR-like
features. In order to train a classifier, an image corpus is
required containing both the Positive as well as Negative
images. The Positive images contain the objects of interest
while the Negative images are those which do not contain
the desired object.
The Cascade Classifier requires extensive number of images
for training. It does not work well for the scale and rotation
invariant images. To train it accurately, the training dataset
must contain the images from all the directions in which one
Figure 3: Block and Cell Organization
is interested to detect. Taking this point into consideration,
we have set our camera at particular distance and at a fixed
angle for collecting the dataset. It is about 7 ft. above the
We have computed the HOG features from the training
ground and at the angle of 65 degrees in the z-axis. All
image dataset using MATLAB functions. The HOG features
images are captured at the specified parameters. The images
are shown in figure 4.
are captured under different lightening conditions. The
dimension of all the images is 640 x 480.
The training corpus comprises of 11,257 images among
them 5000 are Positive images and 6257 are Negative
images. The testing corpus contains 350 Positive and 350
Negative images i.e. 700 images in total.
(a) (b) (c) The test dataset contains the best cases (i.e. images which
contain clearer view of the gun and less occlusion) as well as
Figure 4: HOG features. (a) Input image, (b) HOG features using cell size the worst case (i.e. images in which the gun is not clearly
8x8, (c) HOG features by using cell size 32x32.
visible). The images are taken under different lightning
conditions.
It can be seen through the above figure, that the HOG Tables 1 and 2 show the Training and Testing Corpus,
features capture the overall structure of an object. HOG respectively.
features depends upon the cell and block size. They must be
kept so that the shape is clearly visible with in HOG feature
set. Table 1: Training Corpus Table 2: Testing Corpus
36
ASIAN JOURNAL OF ENGINEERING, SCIENCES & TECHNOLOGY, VOL. 4, ISSUE 1 MARCH 2014
The Training and Testing dataset is same for both the In the same way, the Haar-like features are also extracted
classifiers. from all the images to create the Haar feature based
classifier.
Figures 5 and 6 show some sample Positive and Negative
Images from the image corpus, respectively. iv. Training the Cascade Classifier
Finally the extracted features are provided to the cascade
classifier for training. Along with these features, the
negative images are also provided to the classifier, so that
the final classification model can distinguish among the guns
and other objects. The output of the classifier is the .xml file
which contains all the information regarding the trained
classifier. While training the classifier, the True positive rate
is set to 99.5% and the False Alarm Rate is kept 0.5%.
37
ASIAN JOURNAL OF ENGINEERING, SCIENCES & TECHNOLOGY, VOL. 4, ISSUE 1 MARCH 2014
38
ASIAN JOURNAL OF ENGINEERING, SCIENCES & TECHNOLOGY, VOL. 4, ISSUE 1 MARCH 2014
paper we have provided a comparative study of both the Conference on Computer Vision and Pattern Recognition,
feature types for the Unconcealed Weapon Detection. Vol. 1 (June 2005), pp. 886893.
According to the experimental results of section VI, it is [7] Viola, P., and Jones, M., "Rapid Object Detection using a
quite evidence that HOG feature type is the most suitable Boosted Cascade of Simple Features", Proceedings of the
and robust feature type for the purpose of unconcealed 2001 IEEE Computer Society Conference, Volume 1, 15
weapon detection in image processing. April 2001, pp. 511518.
We compared both the classifiers on various parameters like [8] Ojala, T., Pietikainen, M., and Maenpaa, T.,
training time duration, accuracy, precision, true positive rate, "Multiresolution Gray-scale and Rotation Invariant Texture
false positive rate, true negative rate and false positive rate. Classification With Local Binary Patterns", IEEE
From every aspect, the HOG based classifier is much better Transactions on Pattern Analysis and Machine Intelligence,
than the HAAR based classifier. Volume 24, No. 7 July 2002, pp. 971987.
HOG based classifier is trained in 2.5 hours whereas HAAR [9] Jia, X. H., Zhang, J. Y., Fast Human Detection by
based classifier took approximately 4.4 days for training the Boosting Histograms of Oriented Gradients, 4th
classifier. The precision and accuracy of HAAR based International Conference on Image and Graphics, pp. 683-
classifier is almost the half of the HOG based classifier. 688, 2007.
Keeping in view the above discussion and the results, we [10] Xin, Y., Su Li, S., A Combined Pedestrian Detection
therefore conclude that Haar-like features do not work well Method based on Haar-like Features and HOG Features, 3rd
for the Gun detection instead the most suitable technique is International Workshop on Intelligent Systems and
the HOG feature extraction. Applications (ISA), pp. 1-4, 2011.
[11] Liang, P., Teodoro, G., Ling, H., Blasch, E., Chen, G.,
Bai, L., Multiple Kernel Learning for Vehicle Detection in
FUTURE WORK
Wide Area Motion Imagery, 15th International Conference
The future work is: on Information Fusion (FUSION), pp. 1629-1636, July
2012.
- To make the HOG based classifier more accurate
- To include multiple gun types for detection. [12] Kremgkamjornkit, R., Simic, M., Enhancement of
- To implement the Gun Detector to improve the Human Body Detection and Tracking Algorithm based on
existing security systems. Viola and Jones Framework, 11th International Conference
on Telecommunication in Modern Satellite, Cable and
broadcasting Services (TELSIKS), vol. 1, pp. 115-118, 2013.
REFERENCES [13] Peleshko, D., Soroka, K., Research of Usage of Haar-
[1] Lowe, G. D., Distinctive Image Features from Scale like Features and AdaBoost Algorithm in Viola-Jones
Invariant key points, International Journal of Computer Method of Object Detection, 12th International Conference
Vision, vol. 60, no. 2, pp. 91-110, 2004. on the Experience of Designing and Application of CAD
Systems in Microelectronics (CADSM), pp. 284-286, 2013.
[2] Herbert, B., Ess, A., Tuytelaars, T., and L. Van Gool,
SURF: "Speeded Up Robust Features", Computer Vision [14] Li, Q., Niaz, U., Merialdo, B., An Improved Algorithm
and Image Understanding (CVIU), Vol. 110, No. 3, pp. 346- on Viola-Jones Object Detector, 10th International
359, 2008. Workshop on Content-based Multimedia Indexing (CBMI),
pp. 1-6, 2012.
[3] Rosten, E., and Drummond, T.; "Fusing Points and Lines
for High Performance Tracking", Proceedings of the IEEE [15] Lang, R. S., Luerssen, H. M., Powers, W. M.,
International Conference on Computer Vision, Vol. 2 Evolutionary Feature Preselection for Viola-Jones
(October 2005): pp. 15081511. Classifier Training, Spring Conference on Engineering and
Technology (S-CET), pp. 1-4, 2012.
[4] Nister, D., and Stewenius, H., "Linear Time Maximally
Stable Extremal Regions", Lecture Notes in Computer [16] mathworks.com, Train a Cascade Object Detector,
Science. 10th European Conference on Computer Vision, http://www.mathworks.com/help/vision/ug/train-a-cascade-
Marseille, France: 2008, no. 5303, pp. 183196. object-detector.html, Accessed: [09 Nov, 2014].
[5] Leutenegger, S., Chli, M., and Siegwart, R., "BRISK:
Binary Robust Invariant Scalable Keypoints", Proceedings
of the IEEE International Conference, ICCV 2011, pp. 2548-
2555.
[6] Dalal, N. and Triggs, B., "Histograms of Oriented
Gradients for Human Detection", IEEE Computer Society
39