2014 International Conference on Mechatronics, Electronics and Automotive Engineering
A Feature Extraction Using SIFT with a Preprocessing by Adding CLAHE
Algorithm to Enhance Image Histograms.
Palma Olvera R. D., Martínez Zerón E., Pedraza Ortega J. C., Ramos Arreguín J.M. and
Gorrostieta Hurtado E.
Facultad de Informática Campus Juriquilla, Universidad Autónoma de Querétaro.
raulpolvera@gmail.com
Abstract—In this paper a novel method is proposed to by histogram equalization in blurred or images with
improve the performance of the S IFT (S cale Invariant slight changes of illu mination, Palma [4] performed an
Feature Transformation) algorithm in adverse analysis of the SIFT algorith m with preprocessed
illumination conditions (in an outdoor environment at images by an enhancement based on histograms in
night), for this research it is proposed to work with different illu mination conditions, showing good results
CLAHE (Contrast Limited Adaptive Histogram in unfavorable lighting conditions. Tang [5] proposed
Equalization), adding a preprocessing stage to the the AH-SIFT, a variation of the SIFT algorithm using
traditional methodology of the S IFT algorithm, this will
Augmented Histograms, this algorithm is based on
be applied to the building to be found in the scene, i.e.,
augment the histogram of local image patch features
the image pattern.
with a set of circular means and variances.
A comparison with different illumination conditions (day,
evening and night) will be held to know the response that This paper is structured as follows, Section II
will have the S IFT algorithm and to identify which contains a summary of SIFT and CLAHE (Contrast
moment the algorithm has a better performance. Limited Adaptive Histogram Equalization) algorithms,
in Section III methodology to improve the SIFT
Keywords-SIF; Pattern Recognition; Enhanced algorithm is presented, section IV shows the analysis
Histograms; CLAHE; Building Recognition. and results and Section V concludes the our work.
II. BACKGROUND.
I. INT RODUCTION.
The SIFT algorith m presented by Lowe [1], is based
on multiple scales and spaces, it focuses on
Nowadays the pattern recognition and feature
transforming an image into a large collection of local
extraction algorith ms are very important in the
features or points of interest [6], each of these is
computer vision field, these algorithms are the basis of
invariant to scale, rotation and a certain degree of
many applications today such as object recognition,
illu mination. This algorithm is divided into four
image reconstruction, object tracking, 3D
sections [1], shown below.
reconstruction, among others. One of the most popular
algorithms used for feature extraction and pattern
recognition is the SIFT algorith m (Scale Invariant A. Space Extreme Detection.
Feature Transformation), which was introduced by First, the images between two adjacent octaves are
Lowe [1], this algorithm is almost invariant to several sampled by a factor of 2. Gaussian functions are used to
factors that affect most of the algorithms in co mputer smooth the image belonging to each of the octaves.
vision fields such as rotation, translation, occlusion, Then the Gaussian pyramid is set, the Difference of
scale and slight illu mination changes, for this is one of Gaussian (DoG) pyramid is generated by the difference
the most popular and widely used algorithms. of Gaussian pyramid between two adjacent scales
belonging to the same octave (Fig. 1), space pyramid of
Some authors have addressed the issues of Do G [1] is generated considering:
illu mination problems that present computer vision
algorithms, such as SIFT, by managing histograms , Tu . (1)
[2] makes a comparison between SIFT and A-SIFT (a
variation of the original SIFT algorithm proposed by
. (2)
Morel [3]), in which proposes an image enhancement
978-1-4673-6756-1/14 $31.00 © 2014 IEEE
978-1-4799-4223-7/14 20
DOI 10.1109/ICMEAE.2014.41
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on August 17,2025 at 15:16:30 UTC from IEEE Xplore. Restrictions apply.
The points with an absolute value obtained in
formula (5) below a certain threshold (defined in 0.04)
[1] will be discarded.
Later will be filtered unstable points with a great
answer to the edges, for it will be used a Hessian
matrix:
(6)
If the value of is less than a
certain threshold value (TH), it's accepted as a one of
the points of interest. However, unstable objects with
great response to edges are discarded.
Figure 1. For each octave on a different scale, a Gaussian
difference is applied to form the Gaussian pyramid. C. Feature Descriptor Generation.
In this section, to each points of interest are
assigned a primary orientation, calculating the
Where represents the scale factor and is neighborhood orientation histogram respect to the same
the input image, furthermore , is the convolution point of interest. Allowing the relative representation of
operation between and . While is the the orientation of each of the points of interest, which
representation of Gaussian function with different scale makes them unchanged to the rotation of the image.
space kernels.
The maximu m value of the orientation histogram is
obtained. To obtain a better and more precise
B. Keypoints Localization. orientation histogram peaks are interpolated by adjacent
The second step of the algorithm SIFT, is to points.
perform analysis to adjust the surrounding data looking
for orientation, scale and ratio of the principal curves The original coordinates are rotated according to
and edges. The points with low contrast and unstable principal orientation of the image, so that the features
with a strong response to the edges are discarded to extracted are invariant to changes in rotation.
increase the points of interest robustness and avoid the
noise that may be generated that can cause false The vector of each point of interest is established by
positives. computing the gradient magnitude and orientation of a
sample of each of its neighbors points, obtaining a 128
A Taylor expansion [7] is used in each of the elements descriptor with respect to each of the extracted
possible points of interest. The low contrast points will features.
be excluded, considering the following formula:
D. Matching.
. (3)
The criterion of Euclidean distance [1] is selected as
a rule to distinguish the extent of match between two
Where is the displacement fro m this feature vectors, image pattern and scene image.
point. The precise position of the extreme point of
interest is found by calculating the derivative of the The nearest neighbor point is defined by the point of
function with respect to point . derivative of the interest with the minimu m Euclidean distance with
function is set to 0, as shown in equation (4). respect to invariant descriptor vector.
A relationship between the first nearest closest point
(4) and the second point is used, for a better and more
accurate result in the match. If the ratio is lower than
Substituting equation 4 into equation 3 gives: certain value, this point corresponds to a point of
interest, the value between the first and second nearest
point usually is in the range of (0.4 to 1.4) [1] [4].
(5)
21
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on August 17,2025 at 15:16:30 UTC from IEEE Xplore. Restrictions apply.
Contrast Limited Adaptive Histogram Equalization.
Contrast Limited Adaptive Histogram Equalization
(CLAHE) is an improved version of Adaptive
Histogram Equalization (AHE) [8], the problems
presented by AHE are reduced by limiting the contrast
enhancement in homogeneous areas. This is
characterized by a peak histogram related to the area of
context, so more pixels are attached to the same range
in grayscale.
CLAHE is used to enhance the contrast of an image
by changing values in the intensity of it, operates in
small areas, called tiles using bilinear interpolation to
eliminate the boundaries of the region, so the small
neighboring areas are smoothed.
CLAHE helps to dramatically reduce image noise
and prevents saturation of brightness that can happen
when performing a traditional histogram equalization.
Figure 2. Proposed Methodology.
The pixels in the histogram may have different
distributions, in this case the exponential will be used Was used for testing an implementation of SIFT in
[8], in which grayness level distribution is dispersed C++ using OpenCV 2.4.3 libraries .
with higher frequency.
First we proceeded to acquire a series of images of
. (7) one of the buildings at the Faculty of Informatics, fro m
the Autonomous University of Querétaro, to form a
small database that will be used to perform tests, Fig. 3.
Where is the limiting factor clip, is the size o f
the region, is the grayscale value, the maximu m Two sets of images with different angles and in
value of the clip limit is obtained for . different lighting conditions are taken to be used as a
pattern for the SIFT algorithm, i.e., the structure that
tries to find on the test images , Fig. 4.
. (8)
III. PROPOSED METHODOLOGY.
In the present work, we propose building
recognition [9][10], in unfavorable illu mination
conditions (scene illu mination is obtained through
incandescent lamps at nighttime) by an improved SIFT
algorithm, with a preprocessing stage based in
histograms enhancement, aims to work with enhanced
images by CLAHE and then apply the SIFT algorithm Figure 3. Database Sample of images used in the tests.
(Fig. 2), then compare the result with the original
images without any treatment and the preprocessed
images.
22
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on August 17,2025 at 15:16:30 UTC from IEEE Xplore. Restrictions apply.
Figure 4. Images used as patterns or structures to find on the
scene.
The pattern images were transformed to grayscale
(Fig. 5), and an enhancement was applied using a
histogram handling.
Contract adjustment was applied using CLAHE
algorithm using exponential distribution to improve the
detection and feature extraction for each of the pattern
images (Fig. 6).
Figure 6. Exponential pattern images histograms using
Clearly see the difference in the distribution CLAHE.
between the original images histograms in which the
concentration of the grayness is loaded much more in
the range of 0-50 on grayscale in images taken at night, Once the pattern images preprocessing is done, will
unlike enhancement pictures histogram where the be analyzed by SIFT algorith m against the test images,
distribution is expanded a little more in the range of 0- in both cases, the original pattern images without any
125 and with much smaller peaks in each of the preprocessing and enhanced pattern images (Fig. 7).
histograms.
Figure 7. Features extracted from one night pattern image.
Figure 5. Histogram of the gray scale pattern images.
23
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on August 17,2025 at 15:16:30 UTC from IEEE Xplore. Restrictions apply.
TABLE 2: RESULTS OBTAINED FROM THE MATCHING I MAGES.
Original Day Original Night Enhanced Histogram Enhanced Histogram Total
Te st Image Patterns Patterns Day Patterns Night Patterns Extracte d
Pattern 1 Pattern 2 Pattern 1 Pattern 2 Pattern 1 Pattern 2 Pattern 1 Pattern 2 Features
Best Case 46 64 10 22 116 141 64 83 163
Night
Worst Case 15 16 10 11 19 17 32 42 130
Best Case 57 46 10 18 39 25 20 50 268
Evening
Worst Case 22 15 8 10 15 19 14 15 149
Best Case 293 247 10 25 166 199 55 69 4199
Day
Worst Case 184 189 12 14 128 161 51 57 3400
IV. RESULT S. unfavorable illu mination conditions, although its
runtime slightly increases.
A satisfactory response to apply preprocessing to
the images based on CLAHE with an exponential Analyzing the results with different tests, we were
distribution was obtained. able to realize that SIFT has a slight problem at the time
of matching images with different illu mination
In the results of the feature extraction, is appreciated conditions, in this case (day/night), having results
that a greater number of points of interest is obtained below obtained if the matching is performed with
(Table 1) in relation to the original images without any images with similar illu mination, i.e. match day pattern
type of preprocessing. images with day scenes or matching night pattern
images with night scenes.
TABLE 1: AMOUNT OF EXTRACTED FEATURES IN TWO P ATTERN By using these techniques, it helps to obtain a
I MAGES AT NIGHT. greater amount of features for images that have a
Pattern Image Extracted Elapsed deficient illu mination (in low light or at night), which
Features Time improves the performance to locating objects or
Pattern 1 without any Preprocessing 115 0.867 seg structures than the traditional SIFT methods.
Pattern 2 without any Preprocessing 142 0.823 seg
REFERENCES.
Pattern 1 with an Exponencial 2099 3.409 seg
Enhancement
Pattern 2 with an Exponencial 3786 3.439 seg [1] D. G., Lowe., "Object recognition from local scale-
Enhancement invariant features". In Computer vision, 1999. The
proceedings of the seventh IEEE international conference on.
Although more points of interest were extracted, IEEE, 1999. p. 1150-1157.
even in unfavorable lighting conditions, some of this
points can be false positives, noise or irrelevant points [2] L. Tu., C. Dong., "Histogram equalization and image
to the matching, in cases of poor lighting conditions the feature matching," Image and Signal Processing (CISP),
histogram enhancement improves notoriously the 2013 6th International Congress on , vol. 01., Dec. 2013. pp.
feature extraction which leads to a better image 443-447.
matching, however, it was possible to perform a
[3] J. Morel and G. Yu, “ASIFT: A new framework for fully
favorable matching without the preprocessing at day
affine invariant image comparison,” SIAM J. Imaging
with good natural lighting conditions (Fig. 7).
Sciences, vol. 2, no. 2, 2009. pp. 438–469,.
[4] R. Palma., E. M artínez., M. Aceves, S. Tovar., J. Ramos.
V. CONCLUSIONS. and J. Pedraza. "Analysis and comparison of mages using the
SIFT algorithm with a preprocessing stage based on
This paper proposed the use of contrast limited histogram with different lighting conditions". In Engineering
adaptive histogram equalization (CLA HE) as and its applications Vol. 1 on 10th International Engineering
preprocessing on the use of SIFT algorith m. Using this Congress. 2014. pp. 21-27.
enhancement pattern images, the values obtained are
highly favorable, increasing substantially the number of [5] H. Tang., F. Tang. "AH-SIFT: Augmented Histogram
points of interest found in the images even with based SIFT descriptor". Image Processing (ICIP), 2012 19th
IEEE International Conference., 2012., pp. 2357-2360.
24
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on August 17,2025 at 15:16:30 UTC from IEEE Xplore. Restrictions apply.
[6] L. Jinxia. and Q. Yuehong. "Application of SIFT feature
extraction algorithm on the image registration.", In Electronic
M easurement & Instruments (ICEM I), 2011 10th
International Conference on Vol. 3., 2011. pp. 177-180.
[7] D. G. Lowe., "Distinctive image features from scale-
invariant keypoints". International journal of computer
vision., 2004. pp.91-110.
[8] Y. Wan., "Performing Contrast Limited Adaptive
Histogram Equalization Technique on Combined Color
M odels for Underwater Image Enhancement.", International
Journal of Interactive Digital M edia. 2013. vol. 1, no 1.
[9] G. Takacs., V. Chandrasekhar., N. Gelfand., Y. Xiong.,
W. Chen., T. Bismpigiannis. and B. Girod., "Outdoors
augmented reality on mobile phone using loxel-based visual
feature organization.", In Proceedings of the 1st ACM
international conference on M ultimedia information retrieval
2008. pp. 427-434. ACM.
[10] W. Zhang. and J. Kosecka., "Localization based on
building recognition.", In Computer Vision and Pattern
Recognition-Workshops., CVPR Workshops. IEEE
Computer Society Conference., 2005., pp. 21-21. IEEE.
25
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on August 17,2025 at 15:16:30 UTC from IEEE Xplore. Restrictions apply.