Sunteți pe pagina 1din 4

IMAGE BROWSING USING LEGENDRE POLYNOMIALS AND WAVELETS

A.C.Sankaranarayanan

Department of Electrical Engineering


IIT Madras
aswinch@ee.iitm.ernet.in

S.N.Merchant

Advanced Centre for Research in Electronics (A.C.R.E)


IIT Bombay
merchant@acre.iitb.ac.in

the image, but the time involved in computing


ABSTRACT the associated vectors is higher than in
histograms. In this paper, we propose to
represent an image using 2-D Legendre
In this paper, we propose a new method for polynomials. This is computationally
image browsing by using Legendre Polynomials. expensive. Hence, we use a wavelet approach
The complexity of computation and the time to reduce the computational effort involved.
involved in performing them are considerably
reduced using a wavelet based algorithm. 2. LEGENDRE POLYNOMIAL BASED BROWSING

In this section we recount the basic mathematics


1. INTRODUCTION behind Legendre polynomials. These polynomials
are used in many areas of mathematics, physics
and engineering. They have been well studied
Image browsing has become a very important from a mathematical point of view.
field with the need for image recognition in
various day-to-day activities. Image browsing
has the potential to revolutionize the 2.1 DEFINITON (LEGENDRE POLYNOMIAL)
traditional methods used in many areas such
as law enforcement, digital libraries. Hence, Legendre polynomial [2] of order ‘k’, denoted
there is a need for efficient and fast Lk(x), is given as follows,
techniques to browse and classify images in Legendre polynomials can also be recursively
real time. There exist traditional methods for
image browsing such as the Histogram 1 d k ( x 2 − 1)
Comparison Technique and Color
Lk ( x ) =
2 k .k! dx k
Corelograms [1]. These are used to come up
with a set of images that are closely related to
a reference image (which is the input to the (2k − 1).x.Lk −1 ( x) + (k − 1).Lk − 2 ( x)
Lk ( x ) =
problem). The resultant set is then subjected k
to refinement techniques that try and identify calculated using the relation,
the closest match to the reference image.
Histogram based techniques are very popular It can be shown that Legendre polynomials form
because of their relatively low complexity. an orthonormal basis for all continuous set in the
However, histograms do not preserve spatial interval [-1, +1],
information. Color corelograms do preserve
some information on the spatial structure of
computed. But the use of N02 coefficients of the
+1
2 expansion causes some loss in information.
∫ L ( x).L ( x).dx = (2i − 1) δ
−1
i j ij Therefore if we reconstruct the signal using the
N02 coefficients, the reconstructed signal f’ will
Hence, any continuous function in the interval
not match the original signal f.
[-1, +1] can be expressed as a linear combination
of Legendre polynomials. f ' ( x, y ) = ∑∑ c mn .Lm ( x).Ln ( y )
m n
N −1 for 0 ≤ m, n < N0
f ( x) = ∑ ci .Li ( x) It is easily seen that the retrieval efficiency
i =0
depends on the value of N02 we choose. The
These arguments can also be extended for higher the value of N02 the lesser is the
bivariate functions also. A 2D continuous difference between f and f’. However, a high N02
function can be expressed as a linear value means that a large amount of time will be
combination of a product of Legendre needed for computation of Legendre
polynomials, polynomials. Again, another factor that
f ( x, y ) = ∑∑ cij .Li ( x).L j ( y ) determines time taken for computation of
i j Legendre polynomial coefficients is the size of
where the coefficients can be found out by the the image. A larger image means more time. To
following relation. reduce the time that is required for computation
without any reasonable loss of retrieval
1 1 efficiency we could adopt a wavelet approach.
(2i + 1)(2 j + 1)
cij =
4 ∫ ∫ f ( x. y) Li ( x) L j ( y)dxdy
−1 −1 3 USING WAVELETS TO REDUCE COMPLEXITY

Thus, an image of size (row*col) can be As seen in section 2, any image can be
translated to a function between [-1,-1] and decomposed into N02 Legendre coefficients. But
[+1,+1] by assuming row/2 pixels per unit length calculation of these coefficients can be a time
along x-axis and col/2 pixels per unit length consuming process if a high value of N02 is used.
along y-axis. The entire image is fit in the 2 x 2 For example, if the value of N02 is doubled the
space around the origin to represent the whole computation time increases fourfold. In case of
image using Legendre polynomials. Then the large images, this can be computationally
2D Legendre polynomial coefficients Cmn are unacceptable.
calculated for 0 ≤ m, n < N0, where N0 is an There is lot of error if we represent a high
integer chosen as a parameter for the technique. frequency signal using a finite number of
Hence, we have N02 coefficients. Legendre polynomials. To show this, we take as
A measure of distance between 2 images C & D inputs sinusoids of different frequencies. They
with coefficients c1, c2… ck and d1, d2… dk are broken down in to their first m Legendre
respectively can be calculated by using the polynomial coefficients. With these m
standard difference formula coefficients we get the reconstructed signal and
thus, the error function (see figure 1). From this
∆ CD = ∑ | ci − d i | figure, we can see that the error for high
i frequency input is much larger. This is because
It should be noted that the k used in the above of our usage of a finite number of Legendre
equations corresponds to the N02 parameters coefficients. The higher order Legendre
discussed above. The image in the image coefficients represent high frequency
database with the smallest difference is the components. Since we neglect the higher order
retrieved image. Other difference measures such components while reconstructing, the high
as the Euclidean distance of vectors can be used. frequency case shows greater error.
Image reconstruction using a finite number of
Theoretically, all the (infinitely many) Legendre polynomials leads to loss of high
coefficients of the Legendre polynomial frequency data. We might as well remove the
expansion are needed for this difference to be high frequency data and then apply the
reconstruction techniques. This will not affect were characterized into faces, monuments and
the coefficient values for the Legendre scenarios. All images were in 8-bit grayscales.
polynomials. Wavelet [3][4][5] transformation The implementation was done partly in C and
can be used to reduce the computational time. partly using MatLab v5.3. Table (1) shows
The approximation coefficients of a signal are retrieval efficiency for various values of N0 and
equal to the signal after low pass filtering. The different scope. For example, if N0 = 7, the
main advantage here lies in the fact that the size polynomials from L0(x).L0(y) to L6(x).L6(y) are
of the signal gets reduces by half (one-fourth in used. Table (2) shows the retrieval success
the case of 2-D signal) every time we subject it percentage for different scopes and resolutions.
to transformation. We generate a subset of the database in which
Hence we can find the Legendre coefficient for we look for a match. The number of images in
the approximation coefficients of the image at a this subset is referred to as scope.
lower resolution. The reconstruction of an image
and the same image subjected to wavelet REFERENCES
transformation will essentially look the same.
(See figure 2). The following algorithm sums up [1] M.J.Swain and D.H.Ballard, Color Indexing,
the process of creating and querying the International Journal of Computer Vision, Vol 7,
database. No 1, 1991
[2] Legendre’s Equations and Legendre
4 PROPOSED ALGORITHM Polynomials, www.eng.uml.edu/dept/chemical/
[3] Amara Graps, An Introduction to Wavelets,
Compute the approximation coefficients I’ of the www.amara.com
image I at a lower resolution (say -2). This [4] Y.T.Chan, Wavelet Basics, Kluwer Academic
makes the size of image I’ one-sixteenth of the Publishers, 1995
original image I. Also I’ has no high frequency [5] S.G.Mallat, A Theory for Multiresolution
components. Signal Decomposition The Wavelet
2. Compute the first N02 Legendre coefficients for Representation, IEEE Transactions on Pattern
I’. Analysis and Machine Intelligence, Vol II, No 7,
3. Do steps 1 & 2 for every image in the image July1989
database to get a database of coefficients.
4. Subject the query image to the same process to
5. APPENDIX A: TABLES AND FIGURES
get its coefficients.
5. Using a comparison technique (say absolute
difference of vectors) determine the image in SCOPE N0 = 7 N0 = 9 N0 = 11
database that is the closest match to the query 1 50.00 50.00 56.25
image. 2 56.25 56.25 56.25
We can, thus, improve image retrieval efficiency 3 56.25 68.75 68.75
by increasing N02 and reduce the time involved by 4 68.75 75.00 75.00
calculating the coefficients for the image at a 5 68.75 81.25 75.00
lower resolution. The retrieval efficiency does not Table 1: This table shows retrieval success rates at different
suffer because of the lower resolution used. scopes and at different values of Legendre coefficients
However for large value of N02 there will be used i.e. different values of N0.
considerable differences in efficiency at various
resolutions. This approach can be used
effectively for images with low contrast. It can be
used effectively in areas such as shape
recognition.

5. RESULTS AND CONCLUSION

As a preliminary test of this algorithm, we


constructed a database of images. The images
SCOPE → 1 2 3 4 5
Resolution –1 50.00 56.25 68.75 75.00 81.25
Resolution –2 50.00 56.25 68.75 75.00 75.00
Resolution –4 50.00 50.00 56.25 56.25 56.25
Table 2:This table shows retrieval success rates at different scopes and approximation
coefficients of the image taken at different resolutions.

Figure 1: The three rows represent a) input signal (top) b) reconstructed signal (middle) and c) the error (bottom) . This is
done for two sinusoids of different frequencies as input. Note that the error if highly pronounced for the higher frequency
input.

Figure 2: This figure shows an image f (top) and the reconstructed image f’ (bottom) starting at two different resolutions.
The column on the left shows the reconstruction being done for the image at a resolution –2 and the right is at resolution –
1. Number of Legendre polynomials used was 7*7. Note that the reconstructed image looks the same in both the cases
(both lacking contrast, high frequency components are lost).

S-ar putea să vă placă și