Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Object Detection Using Correlation

Chitra Mahale ,Ruchir Kanakia,Shraddha Shah, & Piyush Jain


Sardar Patel Institute of Technology, Mumbai University, Andheri(W),Mumbai-400056,India.

Abstract—The object detection method used here is that Object-presence detection means determining if one or more
of template matching, by point to point correlation of a instances of an object class are present (at any location or
model pattern with the image pattern. Object detection scale) in an image. This is sometimes called “image
and recognition is formulated as a classification classification”, and can be useful for object-based image
problem. The image is partitioned into a set of retrieval. Formally we define it as estimating P(O = 1|f(I)),
overlapping windows, and a decision is taken at each where O = 1 indicates the presence of class O and f(I) is a
window about if it contains a target object or not. Each set of features (either local or global or both) extracted from
window is represented by extracting a large number of the image. In such cases, looking at parts of the image
features that encode information such as boundaries, outside of the patch to be classified that is, by using the
textures, color, spatial structure. The classification context of the image as a whole can help. By generic
function, that maps an image window into a binary detection, we mean detecting classes (categories) of objects,
decision, is learnt using methods such as SVMs, boosting such as any car, any face, etc. rather than finding a specific
or neural networks. object (class instance), such as a particular car, or a
Keywords-; particular face. For one of the most successful approaches to
the instance-level detection problem. The category-level
INTRODUCTION detection problem is generally considered harder, because of
Traditional approaches to object detection only look at the need to generalize over intra-class variation. That is,
local pieces of the image, whether it be within a sliding approaches which memorize idiosyncratic details of an
window or the regions around an interest point detector. object (such as particular surface pattern or texture) will not
However, such local pieces can be ambiguous, especially work; rather, successful techniques need to focus on generic
when the object of interest is small, or imaging conditions object properties such as shape.
are otherwise unfavourable. This ambiguity can be reduced
by using global features of the image which we call the Following standard practice, we first convolve each image
“gist” of the scene — as an additional source of evidence. with a bank of filters (shown in Figure 2). These filters were
We show that by combining local and global features, we chosen by hand, but are similar to what many other groups
get significantly improved detection rates. In addition, since have used. After filtering the images, we then extract image
the gist is much cheaper to compute than most local fragments from one of the filtered outputs (chosen at
detectors, we can potentially gain a large increase in speed random). The size and location of these fragments is chosen
as well.We have applied LMS algorithm to track the randomly, but is constrained to lie inside the annotated
fundamental frequency of a random sinusoidal signal of a bounding box. (This approach is similar to the random
particular frequency given as an input. Finally based on the intensity patches used in [VNU03], and the random filtered
simulations results have been noted and conclusions have patches used in [SWP05].)We record the location from
been drawn based on observation and analysis . The most which the fragment was extracted by creating a spatial mask
common approach to generic object detection/ localization centered on the object, and placing a blurred delta function
is to slide a window cross the image , and to classify each at the relative offset of the fragment. This process is
such local window as containing the target or background. illustrated in Figure 3.We repeate this process for multiple
This approach has been successfully used to detect rigid filters and fragments, thus creating a large (N ∼ 150)
objects such as faces and cars , and has even been applied to dictionary of features. Thus the i’th dictionary entry consists
articulated objects such as pedestrians . A natural extension of a filter, f i, a patch fragment Pi, and a Gaussian mask gi.
of this approach is to use such sliding window classifiers to We can create a feature vector for every pixel in the image
detect object parts, and then to assemble the parts into a in parallel as follows:
whole object . Another popular approach is to extract local vi = [(I ∗ fi) ⊗ Pi] ∗ gi
interest points from the image, and then to classify each of where ∗ represents convolution, ⊗ represents normalized
the regions around these points, rather than looking at all cross-correlation and v i(x) is the i’th component of the
possible subwindows . A weakness shared by all of the feature vector at pixel x. The intuition behind this is as
above approaches is that they can fail when local image follows: the normalized cross-correlation detects places
information is insufficient e.g. because the target is very where patch Pi occurs, and these “vote” for the center of the
small or highly occluded. We consider two closely related object using the gi masks (c.f., the Hough transform). Note
tasks: Object-presence detection and object localization. that the D ∼ 10 positive images used to create the
dictionary of features are not used for anything else.
LEAST MEAN SQUARE ALGORITHM means, in our case, that the quality of the output signal is
more accurate for medical diagnoses.
The LMS algorithm for a pth order system can be
summarized as follows:
P= filter order
u= step size
Initialization- h(0)=0 ;
Computation- h(n+1)= h(n)+u e*(n) x(n)
where e(n)= d(n)-hH(n) x(n);
x(n)=[x(n),x(n-1).,x(n-p+1)]T
hH(n) is the hermitian transpose of h(n)
RESULT ANALYSIS
The input signal used for the simulation is a random
sinusoidal signal generated and noise is superimposed on
this sinusoidal signal. The input signal can be represented
mathematically by the following equation:
sig=sin(T)+0.5*cos(t*2)+0.25*cos(t*3)+randn(N/3,1).*snr
Figure 1 shows that a variable filter extracts an estimate of where snr = signal to noise ratio ; t = time period
the desired signal For our simulation purpose we had taken N=1200,
snr=10^(-18/20) .
Least mean squares (LMS) algorithms are a class We generated the above signal and added noise and then
of adaptive filter used to mimic a desired filter by finding applied LMS algorithm to track the fundamental frequency
the filter coefficients that relate to producing the least mean of the original signal. The frequency response of the input
squares of the error signal (difference between the desired signal is shown in the diagram below.
and the actual signal). It is a stochastic gradient
descent method in that the filter is only adapted based on the
error at the current time. It was invented in 1960
by Stanford University professor Bernard Widrow and his
first Ph.D. student, Ted Hoff.
The block diagram, shown in the above figure, serves as a
foundation for particular adaptive filter realizations, such
as Least Mean Squares (LMS) and Recursive Least Squares
(RLS). The idea behind the block diagram is that a variable
filter extracts an estimate of the desired signal. The block
diagram, shown in the following figure, serves as a Figure 1 shows the magnitude and phase spectrum of input
foundation for particular adaptive filter realizations, such signal
as Least Mean Squares (LMS) and Recursive Least Squares We observed the output of the adaptive filter for various
(RLS). The idea behind the block diagram is that a variable values of sampling frequency and found that for the above
filter extracts an estimate of the desired signal. signal we observed optimum output for sampling frequency
Suppose a hospital is recording a heart beat (an ECG), equal to 10Khz. When the sampling frequency is varied
which is being corrupted by a 50 Hz noise (the frequency
coming from the power supply in many countries). between 8Khz to 16Khz we get the desired output that is the
One way to remove the noise is to filter the signal with adaptive filter can track the fundamental frequency of the
a notch filter at 50 Hz. However, due to slight variations in given input signal. Below 8Khz and above 16Khz the filter
the power supply to the hospital, the exact frequency of the is not able to track the fundamental frequency of the input
power supply might (hypothetically) wander between 47 Hz and we get noise at the output. The output of the filter
and 53 Hz. A static filter would need to remove all the contains more harmonics as we increase the sampling
frequencies between 47 and 53 Hz, which could excessively frequency. We can draw these conclusions on the basis of
degrade the quality of the ECG since the heart beat would the analysis of the output taken at various values of
also likely have frequency components in the rejected range. sampling frequency.
To circumvent this potential loss of information, an adaptive
filter could be used. The adaptive filter would take input
both from the patient and from the power supply directly
and would thus be able to track the actual frequency of the
noise as it fluctuates. Such an adaptive technique generally
allows for a filter with a smaller rejection range, which
REFERENCES
1] V. Lottici, M. Luise, C. Saccomando, and F. Spalla,
“Blind carrier frequency tracking for filterbank multicarrier
wireless communications,” IEEE Trans. Comm., vol.
53, pp. 1762–1772, Oct 2005.
[2] M. Ferdjallah and R.E. Barr, “Adaptive digital notch
filter design on the unit circle for the removal of powerline
noise from biomedical signals,” IEEE Trans. Biomed.
Eng., vol. 41, pp. 529–536, June 1994.
[3] G. Evangelopoulos and P. Maragos, “Multiband
modulationenergy tracking for noisy speech detection,”
IEEE Trans. Audio, Speech, Language Process., vol. 14, pp.
2024–2038, Nov 2004.
Figure 2 shows the output of the notch filter at Fs=10Khz [4] M. Aboy, O.W. Marquez, J. McNames, R. Hornero,
and frequency response of notch filter Tran
Trong, and B. Goldstein, “Adaptive modeling and spectral
estimation of nonstationary biomedical signals based
on Kalman filtering,” IEEE Trans. Biomed. Eng., vol.
52, pp. 1485–1489, Aug. 2005.
[5] B. Carlsson and P.Handel, “A notch filter based on
recursive least squares modeling,” Signal Processing, vol.
35, pp. 231–239, Feb. 1994.
. [6] D.R. Hush, N. Ahmed, R. David, and S.D. Stearns, “An
adaptive IIR structure for sinusoidal enhancement,
frequency estimation, and detection,” IEEE Trans. Acoust.,
Speech, Signal Processing, vol. ASSP-34, pp. 1380–
1390, Dec 1986.
[7] N.I. Cho and S.U. Lee, “On the adaptive lattice notch
filter for the detection of sinusoids,” IEEE Trans. circuits
Figure 3 shows the output of the filter at Fs=16Khz and Syst. II, vol. 40, pp. 405–416, July 1993.
frequency response of the notch filter. [8] C.C. Ko and C.P. Li, “An adaptive IIR structure for the
separation, enhancement, and tracking of multiple
CONCLUSION sinusoids,”
On the basis of a recently proposed adaptive frequency IEEE Trans. Signal Process., vol. 42, pp. 2832–
2834, Oct. 1994.
estimation algorithm, we have developed an algorithm able
to track the frequency of a sinusoidal component of a signal. [9] P. Tichavsky and A. Nehorai, “Comparative study of
four adaptive frequency trackers,” IEEE Trans. Signal
The theoretical analysis of the new algorithm showed that it
is unbiased. Moreover, for the same noise level and the Process., vol. 45, pp. 1473–1483, June 1997.
[10] H.-E. Liao, “Two discrete oscillator based adaptive
same convergence speed, is observed within a particular
frequency band. notch filters (OSC ANFs) for noisy sinusoids,” IEEE
Trans. Signal Process., vol. 53, pp. 528–538, Feb 2005

You might also like