Documente Academic
Documente Profesional
Documente Cultură
A.C.Sankaranarayanan
S.N.Merchant
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.
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).