The Comparison of Template Matching and SURF for Logo Classification on Product

This paper proposes the fast logo classification on product. The search space for logo classification is reduced by production using Histogram of Oriented Gradients (HOG). The template matching and Speeded-Up Robust Features (SURF) algorithm are used to detect the logo, and in term of the computational time. The experimental results found that the HOG can be detected the area and product at 88.00% accuracy rate. The logo detection found that the advantage of template matching is simple, but the advantage of SURF algorithm is speed.


Introduction
The logo is graphic or symbol that represents the company, organization, product, activity, or technology.The logo design is often represented by letter, word, image, or combinations.The objective of the logo design is easy for recognition, unique, and attracting with the customer.The logo is used to easily recognize instead of text. (1,2)owadays, the logo is used in various fields such as logo classification in vehicle for identifying. (3)Logo in product detection system helps for the product description.Logo detection and classification has a challenging issue in topics of background cluttered, brightness, size, and computational time.Many researches proposed the various solutions for logo detection and classification using SIFT algorithm.However, The SIFT algorithm uses high memory and time-consuming.Kalaiyarasi.et al. proposed the logo detection from video capturing using the PCA-SIFT (principal component analysis SIFT) method by improving Scale Invariant Feature Transform (SIFT) to increase the speed.The normalized gradient is used by PCA to describe the interested point and the speed. (4)Juan.and Gwun proposed the comparison of the computational time between SIFT, PCA-SIFT and SURF.The research found that the computational time of SUFT is the best. (5)his paper proposes the fast logo classification on product consisted of 2 processes, product detection and logo classification.The product detection used to reduce the space by only selected in product area.That is possible to detect the outside product logo.Template matching and SURF algorithm are used for logo classification.The advantage of template matching is simple, but the advantage of SURF algorithm is speed.The next sections of this paper are organized as follow: section 2 is the related work, section 3 explains the about methodology, section 4 shown the experimental results, section 5 discusses the conclusions, and section 6 is the future enhancement. (6)e logo of products is the symbols or markers created by human.These symbols are recognizable and simple.The logo are divided into 4 types, (a) Letter mark, (b) Word mark, (c) Pictorial symbol, and (d) Combinational mark.

Logo Design for Product
(a) Letter mark The letter mark is the logo design used from letters or acronyms that are modified for beauty as shown in figure 1.The word mark is the logo design used from words or texts as shown in figure 2. The pictorial symbol is the logo design used from images or symbols that are abstract as shown in figure 3.Moreover, the logo position on product has very important to recognize.Teng.proposed the experiment of human eye motion.This results found the similarity of the behavior of human vision by the movement pattern eyes.The order of the movement of the eyes are shown in figure 5, starting from point number 1. (7) Fig. 5.The order of the movement of the eyes. (8)stogram of Oriented Gradients (HOG) is the feature extraction method that is stable for a cluttered background and brightness.HOG is able to use to extract the feature of object in the region based on distribution of oriented gradient.Feature extraction is divided the region of the image into the small parts called cells and group of cells called block.The process of HOG is consisted of 4 processes, (a) Gradient computation, (b) Orientation binning, (c) Descriptor blocks, and (d) Block normalization.

Histogram of Oriented Gradients (HOG)
(a) Gradient computation The Gradient computation can be calculated from the vector x-axis and y-axis, and convoluted with the kernel filter as shown in figure 6.
The magnitude of gradient and orientation gradients are calculated from the equation ( 1) and equation ( 2). 1 : e is small constant value.

Template matching (9)
Template matching is the identification the template with the image by finding the maximum value of correlation as shown in figure 7.
when n is the number of pixels in the template.(i) Integral Image is the calculation of the sum of the pixels which is help to reduce the computational time calculated by the equation ( 5). ( ) ( , ) (ii) The Hessian matrix is the area of interested point in the image calculated by the equation ( 6).(iv) The interested point is the points that are robust to change of image using Non-maximal suppression.The interested point is the comparison of the 26 pixels adjacent at the same, above and below layers.If the central point is greater than the all neighbors points, it will select as an interesting point.Conversely, it will reject as shown in figure 9. (i) Orientation assignment is using Haar wavelets filter for the robust rotation to identify the direction of the interested point.Haar wavelets filter used the gradient in the x-axis and the axis y as shown in figure 10.

Gx
Gy Fig. 10.Haar wavelets filter. (10)ii) Descriptor based on sum of Haar wavelet is the created square windows covering the key points and assigns the assignment orientation as shown in figure 11.   ( , , ,..., ) x w w w w  is input vector used to define the class i y when i y is the real numbers, (-1 to +1).The hyperplane is a line that the value of i y is equal to 0 by the equation ( 7).     1) Gradient computation can be calculated from the x-axis and y-axis vector that used for convolution with kernel filter as shown in figure 17. 2) Orientation binning value calculated from orientation of the gradient is stored in the bin as shown in figure 18.The orientation is defined for 0-360 degrees as shown in figure 19.The logo detection can be found at the region of the cans this process is divided into 2 sections.

Methodology
(i) The logo templates are came from cutting the logo image from cans as shown in figure 23.(ii) This research used and compared the speed of logo detection classifications that are template matching and SURF algorithm.
The output of logo detection is successfully using template matching algorithm as shown in figure 24, and SURF algorithm as shown in figure 25.

(d) Evaluation
The effective measurement is separated into 2 sections.
(i) The accuracy measurement is using the confusion matrix table for classification between 2 classes (14) for can detection as shown in table 1 (iv) The computational time is used to compare the logo detection between template matching and SURF algorithms.The experimental images is consisted of 3 sizes: small size (320x180 pixels), medium size (640x360 pixels) and large size (960x540 pixels).

Experimental Results
The image dataset is separated into 2 groups of images: training set, and test set.The effective measurement is separated into 2 sections.
(a) Accuracy Rate The accuracy measurement is used to measure the accuracy of can detection by confusion matrix table as shown in table 2. The experimental result found that the accuracy is equal to 88.00%.

Conclusions
This paper proposes the fast logo classification on the cans.The search space for logo detection is reduced by can detection using HOG.The logo detection workspace is only at the region of the cans, and computational time is came from comparison between template matching and SURF algorithm.The experimental results found that accuracy of can detection using HOG algorithm is equal to 88.00%, and the computational time of logo detection found that SURF algorithm is faster than template matching.

Future Enhancement
The future research for increasing speed of logo detection is divided into 2 interested points: The modification processed of SURF algorithm, and reduction of search spec.

2 Gx
is second-order derivative in x-axis 2 Gy is second-order derivative in y-axis (b) Orientation binning Each cell creates the histogram, and the value of gradients is stored to the bin.The orientation defined from 0-180 or 0-360 degree is categorized to the 9 bins of histogram.(c) Descriptor blocks The descriptor blocks are the feature description from all blocks in the form of the vectors.(d) Block normalization This process is normalization by the equation (3).

f
is image template.g is image part under the templates.2.4 Speeded-Up Robust Features (SURF) (10)(11) Speeded-Up Robust Features (SURF) is the feature extraction that speeds up the process and robust to change of the image (size, rotation, blur and brightness).Feature extraction is consisted of 2 processes.(a) Interested point detection, and (b) Interest point description.(a) Interested point detection Interested point detection is used for the detection of interested region.This process is consisted of 4 processes.
derivative of Gaussian image I position X. (iii) Scale space is the pyramid created by the convolution image with the Gaussian kernel.The box filter is various sizes such as 9x9, 15x15, 21x21, 27x27, and it is used for each different size without changing the physical size of the image as shown in figure8.

Fig. 11 .
Fig. 11.Orientation of key point. (10)2.5 Support Vector Machine (SVM) (12)(13) Support Vector Machine (SVM) is the supervised learning used for classification.The plane called hyperplane is divided the data into 2 groups as shown in figure 12(a).The distance between 2 groups called margin away as much as possible.The contact data at the margin called support vector are shown in figure 12(b).
(a) The plane to try divides 2 groups.(12) (b) The plane to divides the data into 2 groups.
Fig. 12. Support Vector Machine x  will compare with the hyperplane for prediction the class.
This proposed framework is divided into 4 sections, (a) Training, (b) Object Detection, (c) Logo Detection, and (d) Evaluation and Comparison as shown in figure 13.

Fig. 13 .
Fig. 13.Framework proposed.(a) Training Data classification used the training data to create a model classifier.This process is divided into 4 sections.(i) Images collection is the process to collect the image for training set.The images are divided into 2 parts: positive and negative images.The interested object is appeared in the positive images, and unappeared in the negative image.The 100 positive image as shown in figure 14. and 20 negative images as shown in figure 15. are captured from different environments with size of images 1920x1080 pixels.
(a) Shown interested point detection.(b) Shown corresponding point.(c) Shown logo detection.
time The computational time is used for the logo detection by comparing between template matching and SURF algorithms.The experimental results as shown in figure26.
when a is the number of correct negative predictions.b is the number of incorrect positive predictions.c is the number of incorrect negative predictions.d is the number of correct positive predictions.