Pattern Recognition , Vol. 29, No. 8, pp. 1309 1322, 1996
Pe,s,mo.
Elsevier Science Ltd Copyright© 1996 Pattern Recognition Society Printed in Great Britain. All rights reserved 0031 3203/96 $15.00+.00
0031-3203(95)00157-3
IMAGE ANALYSIS USING SPACE-FILLING CURVES A N D 1D WAVELET BASES C.-H. L A M A R Q U E and F. R O B E R T Ecole Nationale des Travaux Publics de l'Etat, L G M - - U R A CNRS 1652, 1 rue Maurice Audin, F69 518 Vaulx-en-Velin Cedex, France
(Received 3 November 1994; in revised.[brm 17 October 1995; receivedJbr publication 24 November 1995) Abstract--Images are transformed into signals using a Peano Hilbert space-filling curve: this continuous mapping captures local informations when Hilbert's curve is wandering inside the image. Then the obtained signal is~nalysed using l D (one-dimensional) wavelet orthogonal bases. The spaces of details of smaller and smaller scales are considered. They are built from a scaling function. An image can be computed by selecting wavelet coefficients corresponding to one or several scales and using the inverse Peano Hilbert procedure. Due to the good localization of wavelet analysis lbcal and global patterns can be detected and global ones can be reinforced. So the edge detection of global edges is prepared and easier with mathematical morphology. Copyright (t) 1996 Pattern Recognition Society. Published by Elsevier Science Ltd. Peano space-filling I D-wavelet analysis Large patterns detection
Edge detection
i. INTRODUCTION In this paper, two main tools are used: a family of Peano curves and discrete 1D-wavelet analysis. Wavelet analysis m seems to provide a very powerful analysis for many fields of physics, for image analysis and for resolution of partial differential equations: the reader is referred to multiresolution analysis, 13) resolution of Burgers equation, t4'51 signal processing, acoustics, t6) analysis of turbulent jets, tT) data compression, tsl etc. The aim of discrete wavelet analysis is to replace a "function" by a sum of details of smaller and smaller scales. So it should be possible to distinguish "local" informations from "global" informations. Building of two-dimensional wavelet analysis (LZ(R 21.... ) may lead to tensor-product-made-bases tg) or non-tensor products/t°) Since Mallat's pioneering work, 131 these techniques have been extensively used in the field of image analysis and image coding. The idea of this article is to find a method to transform an image into a signal, so it will be possible to apply to images a one-dimensional wavelet analysis. N o w a family of Peano's curves provides a scanning of an image capturing local informations: the curves run round a pixel capturing values of neighbouring pixels, before moving far from it. Elsewhere, these curves have been used to understand strange nonchaotic behaviour?l 1) SO the main aim of this paper is to show that one-dimensional wavelet analysis of an image is possible using a Peano scanning and that this analysis provides a method to recognize global informations from local ones: for example, roads, rivers are nonlocal informations on a map, whereas a farm is a local
Data compression
"detail". First, we describe our Peano-like scanning. Second, we give some mathematical explanations about one-dimensional wavelet analysis and the corresponding algorithms. Then we apply these procedures (Peano transformation and wavelet analysis) to some examples. 2. PEANO TRANSFORMATION
We intend to use one-dimensional wavelet analysis. First, we have to transform our images (a two-dimensional array) into a signal (a one-dimensional array). In this section we describe a classical method allowing this transformation. The theoretical description of this method is due to Peano It21 and Hilbert, 1131 and the corresponding algorithms could be found in references (14, 15). 2.1. Peano curves A space-filling curve is a continuous map from [0, 1] onto [0, 1]". The first description of such a map was made by Peano in 1890:1121 that is, why all the curves of this type are termed Peano curves. These curves possess inverse functions defined from [0, 1]" to [0, 1] and termed scanning curves. These maps have three interesting properties: • a Peano curve is continuous; • a scanning curve is continuous almost everywhere: • some parts of the curve are self similar to the whole curve. These curves have already been used in the field of signal processing, see reference (14) for more details
1309
1310
C.-H. LAMARQUE and F. ROBERT
a)
b)
N
0
Fig. 1. Hilbert curve; (a) basic pattern; (b) 2 iterations; (c) 3 iterations; (d) 4 iterations.
for computing the wavelets coefficients of the signals obtained by using the procedure of the previous section. These algorithms could be found in references (10, 16, 17, 19). They deal with the general method of computation of wavelet coefficients based on the FFTbased implementation of Mallars filterbank algorithm.
Definition. The continuous wavelet-transform coefficients of a signal s are given according to the formula: W ~ ( a , b ) = - 7 ~ s(t)O x/ a
dr,
where g is the so-called "mother wavelet" and a and b are, respectively, "scale" and "time" indices. Fourier coefficients of the wavelet transform are obtained from the equation:
I2V,(a, b) = x/ad(~o)~(a(o). about the numerous applications. However, to our knowledge, a sequence "Peano plus wavelet analysis" has never been tried. 2.2. Hilbert space-filling curves In order to transform an image (two-dimensional array) in a signal (one-dimensional array) we need a continuous curve filling the plane respecting neighbourhood properties. These properties seem to be verified by Peano curves, which is why we have built an algorithm linked to one of them. The Peano curve (1890) has not kept our attention because it cuts a square into nine other squares at each iteration, that means that we should have worked with images of 9" pixels. Practically, we are used to working with images whose size is 2"x 2". The space-filling curve described by Hilbert(la'16) (in 1891) sub-divides the unit square in four sub-parts. Thus, we are able to start from images whose size is 2" x 2". Such a curve is presented at successive iterations in Fig. 1. After a finite well-adapted number of iterations, every pixel of the image is captured by Hilbert curve (one to one). Obviously, the starting 2" x 2" image could be transformed into a signal, the values of which are the grey-level values of the pixel met during the scanning at the chosen iteration. 2.3. From image to signal and from signal to image The algorithm that we use later is due to Simon and, Quinqueton.(aS) It has been used to classify datas scattered in n-dimensional space (n > 1). A C + + algorithm that implements the procedure (14) can be found with more details in Appendices 1 and 2 of reference (16).
(1)
(2)
3.1. General method: continuous transform First, the computation of equation (1) using a discretisation of the integral term is almost never used because of three inconvenients: • its high cost (of order N 2 in the case of N coefficients); • it needs a quadrature formula adapted to each wavelet; • a large error arising at small scales. Fortunately, another method exists derived from equation (2): we consider a discretisation of the signal s at points x, = k6, with k e [ 1 , N ] and space-step 6x. Knowing 0 in an analytical form, and estimating g((o) using its discrete-Fourier-transform coefficients ss, the wavelet coefficients Ws(a, Xk) could be infered from:
ITCs(a,Xk) = gkO(ak).
(3)
This method is often used because it allows an intensive call of the fast Fourier transformation's services, which highly reduces the cost of the algorithm: an order of N log N is sufficient to compute N coefficients. Any wavelet can be chosen. For smaller and smaller scales, the coefficients are computed at increasing orders.
Algorithm (0) (Sk)o~_k~_Narray of the signal values. (1) F F T of order N of(Sk)o
3. W A V E L E T A N A L Y S I S
In this section we give basic definitions and properties related to wavelet analysis (continuous transform and discrete bases) and we describe the two algorithms
3.2. Wavelet bases and Mallat's algorithm First we recall the mathematical fundations (multiresolution analysis, etc.) that are needed in order to
Space-filling curves and 1D wavelet bases clearly present the algorithms of splitting. Then we describe these algorithms. 3.2.1. Multiresolution analysis and orthogonal wavelet bases.
Multiresolution analysis. A multiresolution analysis of a function f consists of building a hierarchy of estimation f~, where f~ represents f up to details of size 1/U. These estimates converge to f when j tends to infinity. Let us give the mathematical point of view. Definition. t~'a) A multiresolution analysis of s~L2(R) consists of a sery of nested sub-spaces ... V_ 2 V ~ ~ V0 ~ V~ ~ Vz... verifying the following properties: (i) c~j~z Vj = 0 ~j~z V~= L 2- (R). (ii) f~V~c:,f(2-J.)~Vj+l, jeZ. (iii) f ~ Vo ¢¢-f(2. - k) 6 Vo, k ~ Z. (iv) It exists qb~Vo (scaling function) so that (~(x - k))k~ z is an orthonormal base of Vo.
1311
not intend to present the best algorithm, but to test the sequence Peano then 1D wavelet analysis. So we describe an O(log(N)) computation for each coefficient. A better approach using quadrature mirror filters could improve this algorithm: the cost would be O(N) rather than O(N log(N))/TM
Splitting (0) (Sk)o<_k<2p array of signal values. (1) Compute the filters Hp and t~p (they are derived by using discrete Fourier-transform from the filters H and G). (2) F F T of order 2P+-+(g(k))o
(S is the cardinal function of Lagrange). (4) F o r j = p to 1: • fork=0to2
j-l:
?j(k) = 2q4(k)dj(k) and dj(k) = UG(k)dj(k)(filtering)
Orthonormal bases of wavelets. Definition/1'3) Let us denote W~ as the orthonormal supplementary of Vj in V~+I: W~@V~=Vj+I. The Wj spaces verify the following properties: (a) f~W~,~f(Z-~.)~Wo, j~Z. (b) g6Woc~..g(.-k)~.W o, k6Z. (c) W i orthogonal to Wj for i # j . (d) @]~zWj = L2(R). Note that details carried by W2 are referred to as "channel number j " hereafter. The results allow the substitution of (d) to (i). Fortunately, the following theorem provides a property similar to (iv).
Theorem. There exists a function ~P ("motherwavelet") belonging to W o so that (~(x - k))k~Z is an orthonormal base of W0. 3.2.2. Algorithms. Let • be a scaling function. The following algorithms could be applied with any wavelet derived from such a multiresolution analysis. It provides a computation of the wavelet coefficients of functions belonging to LZ(T). Basically, this algorithm works like this: at step j we know sj belonging to the space of approximations Vj and its coefficients %k on the bases of Vj; then we compute its projection fj_ 1 on Vj_ 1 or more precisely dj_ 1.k, its coefficients on the bases of Wj ~ and cj_ 1.k,its coefficients on the bases of V~ 1, using the equation Vj = Vj_ 1 0) Wj_ r The coefficients cj_ 1,k and dj_ Lk are obtained by respectively applying a low-pass filter H and a band-pass filter G to the cj_ 1,k" The following algorithms are adapted from Perrier and Basdevant, t~71 and have been optimized by Bastien ~5) in order to solve partial differential equations. These algorithms are similar to Mallat's filterbank algorithm, ~9) but we use an interpolating model ~17,20) and quadrature mirror filters (H and G)~ Here we do
• for k = 0 t o
2 J - 1 - 1:
?j_ l(k) = ?i(k) + gj(k + 2 ~ 1) and dj_ l(k) = dj(k) + SCj(k+ 2 j - 1)(decimation) • inverse F F T of order 2 ~ - l ~ ( d j
l(k))0
Rebuilding a signal (0) (dj l(k))o<_,
cj(k)=l~j
l(k) and ? j ( k + 2 j
I
l(k) (ex-
1)=1(~j
pand) d'j(k) = ! ~ 2j_l(k) and Jj(k+2J~l)=½dj_~(k) pand) • fork=0to2
(ex-
j-l:
d(k) = 2J(/4j(k)?j(k) + Gj(k)dj(k))
(filter)
(3) Inverse interpolation: Vk e [0, 2 p - 1], ~(k) = 2 ~/2 ~ (k/2pJ ~n(k)
S(k/2p)
(4) Inverse F F T of order 2 p ~ (s,) o <_k<2~ 4. APPLICATIONS 4.1. Original images To test the general method and the multiresolution algorithm, we consider the three following images: • "the toucan" (128 x 128) with simple edges, • "the girl" (256 x 256) with either simple edges (the face) and complex ones (the hairs),
1312
C.-H.
LAMARQUE
and
F. ROBERT
:
original
~iiii
::~:
:..:.:.:
~
~
. ' : "~.
image
'ii;:.:~iiiiii':'" ! . .
.:.~ :::::::::::::::::::::.:.~!~!!!*::.:.:::.!!i......
i
~:~
a=O.O1
. ":':
-'~
ii~i:-
....
.:
:~~::::..~i~.i~::~::!::!::~
.~:~:~.~:::~.~:!:::::!:!:.':::::::.::::::::::::::::::::::::i..~. [~.: ::. !~ ~:: ..::.~." "~"-'~ ~:: :::-::- : : .: ':".'1.~..".~'~..':.'::: • '~ . ~ ;
::::................................... . . . . . . . . . . . . . .
...
~i:~:..~.i:i;;~":~::':k~::i~i~~.-~!~.4 :~'~~
:,...,:.:
,iili
........~ "
:i] ..i]:]:i: "~.!!..
':
ii
..-..~;~:
:. ~
•
.""'7~- : ::. '..: :":.:::: :-::: .:'.':::~:~,".:....:::::::
~ . . . . ~. . . . . . . . .
~:!~i~iiiiii~:::::: "i::! :~?~?~: "~,i •:.. : :" ::
.~..".....
========================= .... . .........
.'.:~.::
================================== .. "~"i~.~::~:~:~::-:i:i:~g:~:.-:.::::: ::~i::i~il...5.~::~:::::~i:::.::~!~i~... ~i~::::::~'::ii~":" "i'::~:
.
• :~:Jl :i]:] :..~ ..::!.: .?i~i::::~!~!.:::::::::::::::::::::: :::"
.........
iiiiiii
!~ii"
' .~.!i!::i.i~i::],.":;:'i!il,,.~'!!~ ~ 77:::::.::!. ~i~::i~i:il:i:~:.
27 .~!:i:~:~:~:.~::~:.: .z~ i i ."-.~ : i ~!. ~ i i ~ ! ~': '~ : . ~::..:~:~zi ~ ~ :
•
.~!.":.~..~"":::":~..~ ~ ' : : : ! : ~ . . :.. ~':[i~il]~i~:~:":'::i~"~"..: " ~ ! i : ~ - ~ . •
::].. -:
-::'~i'"
:::::::::::::::::::::::::::
"-
.~ i:~!i!i~ iii.ii ~ :I~,
:
" :.:.!:!i!ii~i!i~i':::"~ : ~ l i ~ i "
~:
:L.:.:':i~ ~'~:J
:':' -'~
"
•:" i.~'7~.al~ :~;. "~..'.;.:......... "",.i:::" '::~. "..~:~:'~~,~,::
a=O.O05
a=0.001
::.. :.:
:~]~.
:~:
. ..'..-.,,.~.~<~;:..
. . . . ~/~.... ,.~ ~ . . . . % : . ":['¢~',, ~ - . ~::...~. ~. :':
.
•
:
.~.:
.]
.:-' ...." • .
~:.~ .;~... ~;:.: :~.. •
d';,~
...~
•. . ~ " ::~z| "i::..:
i./ •: "
:~,:.:~ : : '"~]'-':.it~-~
* ~5:[~: '. '
-:.~,~
:~:
-" ~ : ~
~
Fig. 2. Continuous
..-;.:~:... '"
•
...
.
.
.:... "
.
• . :::,!~:,:~]-
:
"
"
"::.;..:,..
.
~.'
with a fixed "scale";.(a)
scaling
function:
Mexican
~:'.:~!~'.'T~ %...::;~.:..~.. ." ,"~-..
.-~::: "~".': "~:~."
~
~""
....:i:5..-'.: ~,~:" " :,~:.:U ~"" "
"
a=O.O001
transform
~.:s. ,..'~: . .f~ .~ ;;-~.:
. . ~ i . . :~:~
'
~" '~? ~:..
.~..
:-
~
"
. . . . . .
.
~.~.:. ...: •
.
'.~:'~..]'-'.:-.":
i~.. •
""~1~"~. : .~: :'~:"":": : .:::.'~i.:.-~ ~ a=O.O005
-:,g->..~:.::.
........ ..
hat.
Space-fillingcurves and 1D wavelet bases
original image
1313
a=0.1
......
~i . . . .
f ~
a=0.05
: ~ .~.i ; ..
.-.~~
: :: :::::: ::: .: :.. ~r ~ :..:..~:..~; ~; :~.o::: ::: ::: : :::::::::
:.:::::::5::5:..::::::::: :+>:.::+ ~:::5:,.. ?- :~::9:.: :?: :::.:: "~'-
a=0.01
a=0.005
.
"
-!~.
. :i
!~~:~::?(:iiiT!:.!i::::ii{iiiii:i::i{!iTiSi:~?:!i:.:.!::ii:! :~:!i!:.{iiiiii:.:.5i::ii::3ff~:::.iil i!:.!
a=0.001
a=0.0005
Fig. 3. Continuous transform with a fixed scale;(a) scaling function: Mexican hat.
:~:~!S ?~!ii¢ ~ii!i!:~i!i::!?i:i~),:P ~'
original image
....
a=0.1
a=0.05
;i~'~: ::!':'7~' ':
.::::.
g a=0.01
:' -
: .~-~'::::~'.iii.~~t ::.
a=O.005
a=O.001
a=0.~
Fig. 4.. Continuous transform with a fixed scale; (a) scaling function: Mexican hat.
• "the canyon" (128 x 128) with only a clear boundary between "sky" and "earth", without any other edge. As for the Mallat's algorithm we decided to test in on a fourth image "the map" (256 x 256) with very simple shapes and lines.
4.2. Continuous wavelet transform We have applied the following procedures to the images described in Section 4.1: (1) the algorithm of Section 2.3 to convert the image into a signal;
1314
C.-H. LAMARQUE and F. ROBERT
.......
":
original image
channel 0
)!
channel 1
i channel 2
'~::'~':'iiiiiiiiiiiilililiiiii!i~iiii!il channel
Fig. 5. Algorithm of(3.2.2), scaling function: spline of order 2.
q
.~"
:!~I'~'H"
H:~i:
ii
~
ii
!'!
:;:.: :~.
:~
:ii!ii
':':~i:
:..".:
i~:: ~
:!!"
~:~:~.,:,
.~i!:': :':':"
~ ':'!....:.~..:~ :i!~i.,~i
;.
~
h:
":':: ~ i ~ ! ~iF•~"~h~7 ~ ~i!i ~i!i
.~:!~
~ .~ ~ . ~ : . . ~ !
ii~,~l ::~:~i:~::i:~t~'~:::::~.-.:~ .i.: :~
~>~:.~¢i~::..,~# .....
I.;~:~Z ~,:~i!~i'::::,~!~i
~:~,~iiii~i~,~,ii!i ~_i ~,, ~i~~ ::" i ~ ' ~ . ~ ~ ~:: !gT.~ ~ ~;.:.~i~ii~ ~ ~ ~i
':
;ii:~i.~:¸:.¸:
i.,'.g,:~;..;~h:~~
.i.....
~ii~i~!~.~.~ ~ ~i~.i,i ~:~" e. ". !ii :~
:
:~ ~
x:~:
i
,:
ii!
,~,!!~!i'i:i~~:!II ! ~:: ' i~'iii~iii!
:':':!:"
#
!ii
ff ff
=*
e~
g
IQ
":-"
~.
.~
m
~""
~..
•
-
.,~..
• "
.
.....
"
•
•
"
: . "~
•
:
•
.
' ..,
•
'
"
'
....
.
~
"
.. • "
-.i.
~.,~ " "
..."
~ "
•
.
~
"~
,.....-....
"
~ ~
.. .
'~:.~'!l,~
.:
.
.'
.
,,~.~..~."
","
:.
*
•
•
'
'
:.~
. . . . .
~.."~.~
::
"
'
.
.::.:,
-'~'
:~.':
::t~.~:~:~ :t
: ~.t'..
....~"
~
~
"i
: ~'
~z.~::
:-.:-
...... '"::
. ' , . ) :,.3:. : ,"." . , , . ~ .::~:~ -,.~..~ . . . . . . .
.
.~¢,~,W_.~,~.',~...:..:
.
~.
,
, ' :~
-....,.
"
".~
:~,~;
:.'~.:~,~: ~ .~1 ~'-'
.
,'~"
•
.~
..,~~
;
..~
• ,i
~ ).-: :~::~. : - ~.~i!:~i:.~ .. : " ..~ ... ..;.~... ~:: .:....~:...!
" "":
.. . . . . .
."
;,% ........ " ....~.:.".:~tT~';"...
',~
.
:~'
..
~:
.
. . . . .
~:.::.../: ...
"'~",f'
~
~:"i~:':::":
:~
"
~ ........
~ ~,
:
" ~ . . ' :. .. ".~ .....
.'
•
"
.., •:.:~
•. . . . .
::-. :
• " • ..'.~(~,.:
"
. • . ..r. ~,.'r....,. • . ~:~ • ~. ~ . . . . .~,"~.,~"x * ~ . -,
.i
:'..P'
. . . .'.~....~,
.-..
'i. ';;
"
~,.-'~
'" "
'.."::::," : ::~
': .'...'::
:: :..~
:i
.~..~!~:,.!
"'..."*:-~.:'
• ,,~.~..,,, I
~;:'-,"::~2.~:~'~:". ,~: .:~".:-. :~.. ~ . ~ i : ° "~::'.:.~.-~'::~i,~........ " ...>~" .~..~:,,• .:.:.~,,~,,:-~:~:q:~~,::.::.r.,,~..
":.~.
|
:..~, ~., .. :~:. ... ~:..~ "~
: ~ , . ' ":" : :."..
'
%
,..~.
.
.,...,.,..~, !
:. ;'~
.,~
.
,:
:. ;.": ' .:.i:. .:... ::.: ...... 77 ";?":7::::::"~"::. ~;
:., ~" ~.:~:
,~.
.
"- "::~" . . :.'.! ': • ."~.:~,~'...'"L~ • .-.... •r . . . . . . . . . : . , : ~ : . . ~ . ~ ' ~ . :,~f~.~.
~!~.
~'-:~.:.~
:..'....:
':'~.:.;~....
::. :
.
.
.,~;:.
..
~ ~.,...: . . / : . . . . ~ . . : . .
::.~:';
.~i
:....: ...,~,,.
~
.... :
~ ~..,~
~. :.. g~...,~..
~ ...... % ...'~.:':' , , ~ : ~ , . , . . ,".
' ~"'~,i:"
.~:f~ ~.~:i : ' .
~. ........
- '.
. . . .
,.~:i:~,~.¢.. .~., '.:,,~'~.....~.. .... ~.~...,,,
!:~:.".::
••" "
•
..
~.-,,~ ..:~,.~ ..... :.:v .........
•". . ."". . . .'. ' . . - . . . . .
....... :~" :;S.'.::• ..:.:: .
t,:. • •
~ . "~
....
".~.
~(i.t-I,. "~ '.2"
~'.~.'~.,i~.':
~ ~ . . ~ , , ~ :
•.
,...
•
~.~:~,~ ::,,
.:~.~ .4.:
:~ ~*"
. : f:..."~4~
......
.....
~.".~'.~. :~" :
~~......:.
"
,.-,~....
. ' .':::-
:~:...~
...:..~. , % ',~.
~:;:.:~,
•
:~ .....:~:
•
..........
il ~ ...... ~ .....
:.-'
.:...
.:~ .~ .::'~.: r . . i . . . . . . ~:.;;¢..,,,~¢:.( ~':. . :
:-.', . . . . . .
•
~
~
ii~,"
,',
..-:~..~ . ~ ' ~
:.,..:~:.:~.,:~
"
:
" "".~i~::!~i~:~::~i::ii~i
' ' -~.:
.
:..:
"
"
.:.
""
~;
..
.
.:.~;-.:..
': . . . . . . . .
'
.
.
.
.
.
.
~:,l~!".~t.
: ":'::'7,~'~.
: ::"
..: :i.:".i;::.:+.:::....
:
".:~..
• :
. . . . ..:,:..".
..: ; ~ .
" " )
.."
..~
~
.+
~.
:";" •
-~.~.~.
..
"
..,:
~t~
" ..~.:
.
., .....
..
";
':
/
..;~,~.~..:,~;
. :,.:; .~
~ "" ......
. :~.i':~:"::" ..",i
. ...:.:.... ~,~..:
:~
:::~.,,j.:..:.:":!'.:~
.':'.'.':"~.t~,:',..'::
"'~
' " :" . . .. . . . . . .
..~..
,~:':. '~
.. :] :..:...';..~:
.
...~
.
.
.
.:.
.
;".~.
'r..3::""..:.;~y
~ ~" . . . . . " :.*.~: -~.~',:" :' ..' - : " • ~ "
:
"..:
..."...:.'.'"'..'.:..-r.'. " ": .... -..: ... v..:: ::.' • : . ...~,
" :."-.:
,
: .
.:!~,. . . . ." . ~-,~... . . . . :~¢. .. . . . ~ : ~ : : ~ T ~ .:.,,, . . . ..~:::~.: .~..... :...:...~,~.,,.......,~ . ......~ .,...~....... ..:. ~ . . . . .
:.:~
• ....
"" ~~
..
.,.. :. • ...~.~,~..::...:...:
.'"
~'~:::':':~":'" "~."
........ ~ . . . . . . .
-~~ ,~.,,~.:.:.~-.~:~,:,~.~,:~~.~:?~:~i,;...!:~-..:
...... . . ! ~ . , ~ ; : ~ : " ~ : : , ~ ' . i ~ : : i
"
' : . "~.
.,,,.~
• ~:~.:.: ' ".. " :
. .~ . . . . . . .
'
" .... :~t".
....' "~".I * '""' '*':" .........' r~'..... '
~...
.
" ..:
.
.:
~::~::~: :i:.~:~:. ::~"i:~'::f.~:i:i~, ~:~i~:~::~::i::::~ :::::::::::::::::::::::::::: i!i~'..?iii~i
~.~
::. .' ?:': .:. .:';..:r.:...::i.
. .............. .:
' " :~:~.:~ :~:
.
?".:".
.: ~,,~.:...";~':'"
.~"
"....~ :.i:"-': ~,"~,~.. .~ :~,~.
-
..
. . . . •::":.~,~.,:...
:.
.... "
-..
. . . . . . . .
.
..
.
~.:i:~:::~i]iiii~!i!~:iiii~]:]i:~:'~:i.]i:
::ii~.i!ii~.~-i,~..:'J
..:~!..,'~:i.:~
~i~i~:.::~
~ii!ii~
:~'::~:~ili~:::!::::
i%%.%i:~.t: :~:~:~;~..'.i:~:.*.. ~:~.~.~:.?!!
". ,i~...~ *:.:: :~;:~1 !'~ ~.":::.:~.:. ~ .; :;~: '~:i .. ..:~:~-:;~.. :~"~.~,~.~:::~"~i::::.:...,:; .-: .ii:::r ::-..: " -~ ...:.....;..,~.: ;:~"., .:.:.'::..-..•.".
:: :.*::":.":.."i. i.:: ::":.
~.~:i:?.?:"[ ." ~:': ...... " " . " ". :...
.
": ~' " ' " : "':':-:%
~.
......................• ~ 2
.
~-:::~
::::::::::::::::::::::::::::::::::::::::: ============================================
~ : : ~ ~:~., . , ~ : ~
•~.~'.~.#.~.~:::~ : ~ ..'.:::~:::::.~..'~ i~.!.~ ~.:. :. ::::~:.'-~: .:.!~:
.~ ..~!.:...!~::~::~i~.::: ~.:...:: :.i1!] .::::.::~::;::i:::.:i:i;]~:~:~:i~
...... . , : . , , ~ ? . : . : : . . ~ : :
~""
.
,
..
::!i::~::::i~!~::~::::~ii~ ~:~i~i~$".:~i!~i."."::~!;~"
.~.*:. :~:~b)::::: :.:
::" ::~"~:~:~'~
,....
~;.(.~!~:~:~.~
: :":b.~!.~i,:."
........,.:.:
::::]::::£~.~: ~
~:
~:~::~,..:, ..::~
. - , 5:;:~:::%:
i~:..i~i.i]~]!:.i]
:"i:. i~::i.~!:.~':~
:.:.:-:...'~. :8::::i:
. :
~
"~:
" ,~ " " ~ i ~ : . : . ~.~:'.'.~:"...z,~ ~.~,~q~: : : ~ ~
~:.
. ::~
~:~
"'~:i$ ....
.::..::~ ~::-'~,~":,~
~::.: ,.-:.-:: :::. ..~
: ~ ......
~:"~"*~::~::
"i.. ::i~!~:!'!'!!~!~!i.i~:~':
'i""~::::::::i~::~::::::-i~:~:~ :'!:~ ~': : :: ~ .:~i:i:i:iii,!i~!~i~ ~! i:i:.~:,~:..~.~ ~r • ............. . . . . . . ~ .......... .:~.~::::::~. ..............- - . .......... , ~ . . , ~...,:.~,:.:::::::::::::::::::::::::: ~:~:~.~:~:
I~ ~;.i:~.~:~; ~:~~:.!:::~.:.%:"~~
!
:,:,:
.. ~ . " ~ ' ~ " ~ " . ~ ! "
~:..:::~i[~i:::.-,.,:. :.:. ..... ~......:~
,.,:..~'-:~.'::~:~.~ ......
.
~:::~:i:~ '::-:.::J~ .-'..~i::~i -".~:i~::.::::::::::::::::::::::::::-:~:i~::.~:i:~::::!:i~t~.~::i:::~:~:::~.~:i~ii::i:::i:iii::-:ili:: ~• " "": • -"; !-:.~:~...' .: ::':::~.~!.!.-:.~-.:.:::.':"..~:." .'~ .... '" "::. :-~.:~:::!:!::!.!.!::i..!.!-!.::-'-'. " 1:*:**: ".:::::::::.:::4:: ~.~: ": :::::::::::::::::::::::::::::::::::
.--]
©
,,0
¢,,-.
Space-filling curves and 1D wavelet bases (2) the algorithm computing wavelet coefficients by the continuous transform of Section 3.1. The scaling function is the mexican hat; (3) a procedure to map the array of coefficients onto the interval [0, 255]; (4) a procedure to build again an image using the inverse algorithm of Section 2.3.
4.3. Results with the continuous wavelet transform We make first some comments on Figs 2, 3 and 4. In general, the edges can be clearly identified. The best results are obtained with "the girF' (Fig. 2) and the "toucan" (Fig. 3), for which the edges are in a very good agreement with those of the original image. In the case
original i m a g e
channel 3
channel 2
1317
channel 0
channel 1
channel 4
channel 5
....
"....... :...'1@.':... •
~ ~!:ii!i~ii~i-~~i~~~ii~!:i:~:i:i:i:iT i ~i~i!; !i:i~i~i~:~: ~i :i•:"~:;~?*: i~i li
!iii::!liiiiii!~: i~i~ i ! i ! i i~i~::ii:i::i::i::il i •.:.:.:.:.:.:.:.:+:+:~.:.:.:.'..iof~;:..~:.:..~+:.:g
.:. -2.!~.'.:;::.:.:
. . . . . . . . . .!:...,..~i~i:~:.iiiii~iil ................ ~ !~i{.~:~i~:...
:
i:i: ii:iii:i!iiii!:ii:ii:!i:!,i:; i!:i:!iiiiiiiii£i
"
channel 7
channel 6
•i:!: ~:: :.':;.:.~:"i~;:;-'::.;:~ ;; :% ": :::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:.
channel 8
iiiii.li:.:.: i::~?.~g'~'i~;i~::;i~;:::?:.~:iiii::i;!i;~ :::::::::::::::::::::::::::::::::::>:::i:]j ,:~.-,!ii:::~• .ii:::':!-~..:.;:.~i:.-¥4.~.-:i
ii.:~i:iiiiiiiii
.:i
'.:.~?~,
..:~;
channel 9
:?:
~!.~..:::.~.%.~..~I :i~.?:r~.".':~i'.;'i¢'a~.::::. ~. '(:,~
~
iiiiiiiiiiiiiiii!::ii!?:!3!! ~.::.."-':;?"e,l~'~':~!!!!!i:i:i:i:i:i: ::i~'~:3iiii:~i:i:~i!3iS::::::::;:::~'~:~i:iSi?:'?i:'::::':!
c h a n n e l lO
" ~5:':::::.':;:?'.r.~
::::::::::::::::::::::::::::::::::::::::::::::::::::!':S
c h a n n e l 11
=========================
:~.. :.....
: ....
; :::
,~...
.
~
c h a n n e l 12
Fig. 6. Algorithm of (3.2.2), scaling function: spline of order 2.
' '.~-?L~]::~,J''::"~.::7?~
"
?".: ." "-.. 7:!!';'::" ;'i.::-'.r~ ''',
c h a n n e l 13
"?;'.?" <'"'r"
1318
C.-H. LAMARQUE and F. ROBERT
of "the canyon" (Fig. 4), only the limit between sky and earth appears clearly. However, the reader should note that in this analysis we lost some information without compressing the data. 4.4. Results using the multiresolution algorithm
and projection We have applied the following procedures to the different images presented in Section 4.1:
(1) algorithm of Section 2.3. to convert the image into a signal; (2) algorithm described in Section 3.2.2, with mother-wavelet: spline of order 2; (3) except for one space W~, all the coefficients are fixed to zero; (4) inverse multiresolution algorithm; (5) building again an image using the inverse algorithm of Section 2.3.
i!?i!:!!! ¸¸¸: !/51 ¸:
original image
channel 3
channel 2
:::!ili~iiii:.iU!!i~i~ii~:: .....~
~i!i!.i:,'..~.
.....~i'::; .~....
channel 6
channel 7
.;~ ~"~:~.~!.~
channel 0
channel 1
channel 4
channel $
}
i..i)~~.II;:~ -~.Zi.li ~i ! ~;.::ii~+~
: ::+::iiii::i].i: ::~ : . " i.i.i::! i i--~:i i:i:':+::::!:~ ". , •
!~ii~ :~.~i.:.~i~i:~i~~:'.~.~
channel 8
.....'.~.7"
.,.~....~.:
.~'.. '. ":'.~-i~'~
channel 9 •
.~L..I
.
~;...~
•
.. :: .
.-
...~:,:~:.~.:~,.
:.:ii~... ? : - . ~ . ~ . •! ~ . ...
.:.~:~z~.~i~:i~.~.~ ~~i:~ ~.:";,,! ;iT: ~~:~::;i::~:.~¢ :i+'-;:~i('_'~5.:,~:?i,::.'.:;.~..:.::¢:i.~:" : . :-~z~ .. "..: • : - ~ " 4 ~ .....
channel 10
,
:"'~"~ :
-..
.~,.,:;-~::
" " • '~:': ~.
channel 11
--:.
channel 12
Fig, 7. Algorithm of (3.2.2), scaling function: spline of order 2.
channel 13
Space-filling curves and 1D wavelet bases
1319
[] ",111 J
I/
J
I original image
~ ~ . ~ a a u
rv. I,d
.3
•
I,
~..! : ~
~'
d%:
~," •
'
~ ¢,-~
r-".i •
.|~
:..:.
.
8 iterations + channel 14 + tresholding
$ iterations + channel 14
"' l
,,....... !,
~.~e ..... ~ /
8 iterations + channel 15
..
;a..~,.~:..¢,, #. ~
/It"
~:~-,,,~ ° ~ ~ ,'"~.'-.~
"\ ,¢
:~e
~ :/C:Z3 .
~ / , .. ,ej,....,.,,...
...... 11,~. , ,..,- ( ~
~
t
L.J :
. , .....
g iterations + channel 15 + tresholding
Fig. 8. (a) Algorithm of (3.2.2), scaling function: spline of order 2; (b) Algorithm of (3.2.2), scaling function: spline of order 2.
.'
1320
C.-H. L A M A R Q U E and F. ROBERT
~.".
i j.' ...:.~- .." ..i~ " " ..' I. . ~a:" . . . . . . ~.~'
.......... •
e,= "Ill 1F
I ;~lr
.
~ " ~ , ~ • ~, . . . . . $ -.. ~
~.,.,.,._
""
.'.
•
.=
:
,
=C
•
.:
.
.'i a
• ° . . . . , . - •,
I[~
r
,"
" . . . .
--,
, • "I~.
. :"
,'
~- ,-" ~ - ' , ~
~'if
" •
•
"~F~.¢ . - - _
"
:-,-~,;
.
•
~ I"~
,*," ;,'."4r ~.: "','
" t
,
":~ . . . .
L
." ~;
......
r
7 iterations + channel 12
_,is"
.~-~.'~
~,
I'.
.,w.-
~.,.~:; ~;..,,......J
:.
~."
; -'%
I
.=...,,.-,....,-
I
.I.,vir..m.~
~-
I
•
.,P.S.,'
•
",:.,~. ;,:'":'"v;,'."
I~.~:~:;~.
X~
• • ,=-.p '5 " •
,.,..
..,
"..
-'~"
.
,
r,,.,
"~=-'...
--
..
.,ir,cr,.,~ .. . . ,= ~. " .'.. ~ . . '' "~
. ' r " ,/f= :, . % "~,
•
, , " .I "
.,J--..
,
"~
' ~ i ";S i '
4 . ,
• .,,
" ' i t " • I "',a= " a " "V' -
~..:... -il
" I
"
~
~.
.
'. 4.., . . . . "
I I
:
I l~,~r
",.. ~'.
I,¢."--~
.',~. • .
7 iterations + channel 12 + tresholding
.'~ " ..'~
,-"
.'".',
"l
•,.~."
¢
• •
I
S'f.
."
J
:
:
..
- i
'
~
~4~
1"k'%"
.i.
...-.~.,....N.~..--
.jr
"¢
:, .-4
•
o • .o
--m-q..
T~ "."..=
~- - ! ~r
)
~ •- , - •, , . " s .. ~
I-.
".
i~l
...,.,..,.,..,.....D:~'..,~~.~..~ .~., --
4-
."$'.'... ji 4'e
..
~.~-~
". "'" Te~. ...... ~" __ ~ " ~
...........-...
~" i - .-,, %
,f,.".',~_ J J l V~' v
A;"-",.;
-re
%
:
"4.
'~-. I.,y;..'.'.." ~'~- • . .
-'__
.~
~..,%%..T
.,,,,,.,,.,.,.,
-, ~
., ;r
;..."-,¢
o" • ~'~,:,'-~" . . . .
.,
;
~",~,,..,,,.~
~.~.._
•
=Lr="
.r
•*
;
•
:
"
.
,t e
1
.,,,
:".v.".,,.".v"
.i~
I
.. " • ,.
.......
**"~.'Ve4'V%*"pV~, ..40' I t , " " " "-'i ire -'-
~. d~ "
~ -"
~'-':-
. •
.
*
.v.-_~__. • .-.&..._a-._ o"
" .i
7 iterations + channel 13 + tresholding
7 iterations + channel 13
,.=r~__
. :.
= . = jl -.J. . •" "
.I....,.,...._L,
.• mid . ~ i• -. ~ .:l.~ :'.~..._=~._
.'
..
I
I
. - - . - - . - , . - - .'~ "~. :.. 2.,~:" "i',...',. =~,_'~ i . . . - - . ..._-'~:." . .".:,__..'~ ., •r - - 4 . =
".'-
:..
"'...
=i-.¢ d : ' = " . i ' . .
,,..= ....= ,. ~ ' , i ~ . ~ , ' ~
•~ •
,,la,
,.. '/'
..~
-- ..-.r.~--- X . ~ i " . ' .
•
- "~3. "'
•
='~---
,:
.~-~'
...- .....='
l
I
_."_-_.i.~_-, ,
." = =
.=.~
l
.
= "
".==
. .. =. . '
=
,
~r..)
i";
6 iterations+ channel I I + U'csholding
6 i t e r ~ o n s + c h a n n e l 11 Fig. 8.
(Contd.)
Space-filling curves and 1D wavelet bases
Filters and functions (S, H, (~,/t, (~) are given in the Appendix. We do not give details about the splines which are reported elsewhere. 1211 4.5. Results with the multiresolution algorithm A complete splitting has been made and rebuilding of images is presented according to each" channel in Figs 5, 6 and 7. Now we make some comments on Figs 5 and 6. F r o m Figs 5 and 6 [for images 256 × 256 (Fig. 5) and from channel 10 to 13 for images 128 x 128 (Fig. 6)], it appears clearly that edge information can be extracted from channel 11 to channel 15. However, we may obtain dotted lines due to Hilbert scanning. Classical tools of mathematical morphology can be used to connect the dots returning the main edge information in Fig. 5, channel 15 and in Fig. 6, channel 13. Let us give some comments on Fig. 7. The original image only possesses one type of edge: the line between the sky and the earth. Channels 10 and 11 show a dotted limit between these two areas. This limit is no longer clear for channels 12 and 13: this is due to the fact that the original image has many small size details. We make some comments on Fig. 8. It is clear that using coefficients corresponding to channel 15 and eight iterations of Hilbert curves, a dotted fat line is obtained associated to non-local lines of the original image. This result is not as clear using channel 14 together with eight iterations. In this case a morphological procedure (closure, erosions) can provide these lines. If the Hilbert curve does not wander enough in the original image, too many gaps appear in dotted fat lines and it becomes impossible to detect these lines. For instance, in Fig. 8 one displayed results obtained with six or seven iterations. Only the case of seven iterations with channel 13 (compression rate of 8) gives good results. 5. CONCLUSIONS We used Hilbert curve mapping (and inverse mapping) and different 1D wavelet analysis algorithms to process images. Peano (Hilbert) curves permit us to choose a first characteristic scale to transform an image into a signal. Then the obtained signal is analysed using another scale of details provided by the wavelet procedure. We show that edge information can be detected: non-local patterns are increased, whereas local patterns are associated with thin edges. The images can also be compressed (the compression ratio is highly dependent on the image type). In turn, we can obtain both an edge analysis and a data compression. It is noteworthy that a pattern of Hilbert curve together with a vector of W~ corresponds to a determined area of the original image. Edges are detected and localized. Future efforts will focus on: (a) automatic recognition of roads from maps; (b) localization of particules in a fluid flow; (c) following the edge of a turbulent jet.
1321
Acknowledgement The authors want to thank one of the referees for help in improving the manuscript.
REFERENCES
1. Y. Meyer, Ondelettes et op~rateurs, Tome I. Ondelettes, Hermann, Paris (1990). 2. I. Daubechies, Ten lectures on wavelets. Society for Industrial and Applied Mathematics. Philadelphia, Pennsylvania (1992). 3. S.G. Mallat, Multiresolution approximation and wavelet orthonormal bases of LZ(IR), Trans. Am. Mathemat. Soc. 315(1), 69 -87 (September 1989). 4. P. Tchamitchian and J. Liandrat, Resolution of 1D regularized Burgers equation using a spatial wavelet approximation, Rapport ICASE, NASA Langley Research Center, p. 34 (1990). 5. J. Bastien, Introductious aux ondelettes et application fi une classe d'equations aux d6riv6es partielles, Dipl6me d'Etudes Approfondies, Universit6 Lyon I (Septembre 1994). 6. A. Grossmann, P. Tchamitchian and J. M. Combes, Ondelettes, M6thodes temps fr6quence et espaces de phases, Masson (1989). 7. R. Everson, L. Sirovitch and K. R. Sreenivasan, Wavelet Analysis of the turbulent jet, Phys. Lett. A, 145(6 7), 314-322 (April 1990). 8. T. Gaidon, M. Barland and P. Mathieu, Compression d'images fixes par transformees en ondelettes et quantification vectorielle bas6e sur les lattices, Laboratoires d'informatique, signaux et syst6mes, Sophia antipolis URA 1376--France, Rapport de recherche no. 92, p. 59. 9. R. Murenzi, Ondelettes multidimensionnelles et application ~ l'analyse d'images, Th6se de Doctorat de l'Universit~ catholique de Louvain, Louvain-la-Neuve, Belgique (Janvier 1990). 10. M. Vetterli and J. Kovacevic, Wavelets and Subband Coding. Prentice Hall, New Jersey (1995). 11. M. S. El Naschie, Peano dynamics as a model for turbulence and strange nonchaotic behaviour, Proceedings of 13th CANCAM 91, University of Manitoba, paper no. AI0.1 (1991). 12. G. Peano, Sur une courbe qui remptit toute une aire plane, Math. Ann. 36, 157 160 (1890). 13. D. Hilbert, 15ber die stetige Abbildung einer Linie aufdie Fl~ichenstfick, Math. Ann. 38 (1891). 14. T. Bially, Space-Filling curves, their generation and their application to bandwidth reduction, IEEE Trans. Inf. Theory IT-t5(6), 658 664 (November 1969). 15. J. Quinqueton and J. C. Simon, Une methode de classification bas6e sur un balayage multidimensionnel d'une courbe de Peano, Acad6mie Fran~:aise Sci. Rep., vol. 286, p. 655 (1978). 16. F. Robert, Traitement d'images par transformation de Peano et analyse en ondelettes, Rapport de fin d'Etudes de l'Ecole Nationale des Travaux Publics de l'Etat (Juin 1994). 17. V. Perrier, Ondelettes et simulation num6rique, Th6se de Doctorat, Universit6 Paris VI (F6vrier 1991). 18. M. Unser, A. Aldroubi and S. J. Schiff, Fast implementation of the continuous wavelet transform with integer scales, IEEE Trans. Sign. Process. 42(12), 3519 3523 (December 1994). 19. S. G. Mallat, A theory of multiresolution signal decomposition: the wavelet representation, IEEE Trans. Pattern Anal. Mach. lntell. PAMI-ll(7), 674-693 (1989). 20. M. Unser, A. Aldroubi and M. Eden, A family of polynomial spline wavelet transforms, Sign. Process. 30(2), 141-162 (January 1993). 21. C. De Borr, A practical guide to spline, Applied Mathematical Sciences, Vol. 27. Springer Verlag, Berlin (1978).
1322
C.-H. LAMARQUE and F. ROBERT APPENDIX: FILTERS
Let @be a scaling function. Let S be the cardinal function of Lagrange of the space Vp. The following relations occur: 1 S(k)
2J \ 2 ] } with .. ]- p,._,(sin2x) ql/2
H(x)=./zcos Xl - - - - -
I
L p . _ l(sin2(2x))J
1G(kX ~ Gj(k)=2j \ 2J )
O(x)=,,/2e
2'Xsin"xF P" '(c°s2x)]1/2 L ~ ) J "
We have: G(x) = H(~ - x)e- 2ix The computation of P,.(x) = Z~=oa,.ix"i is achieved by using:
Splines wavelets *
1
/k~\
Lp(k) = 2~72L~ ~'~) L(x)-[Pm-l(sin2(x))]l/2 P~m,'2~-l(sin2(x))
(
1
a~o = 1
ll <-i
1)al,._ nli_~l ].
C.-H. LAMARQUE received the degree of IngSnieur des Travaux Publics de l'Etat from the Ecole Nationale des Travaux Publics de l'Etat in 1985. He received Ph.D. degree in mechanics from the Ecole Centrale de Lyon. He is now a researcher at Ecole Nationale des Travaux Publics de l'Etat. His main fields of research are mechanics of vibrations (control, identification, nonlinear oscillations, chaos) and signal and image processing. About the Author
F. ROBERT received the degree of IngSnieur des Travaux Publics de l'Etat from the Ecole Nationale des Travaux Publics de FEtat in 1994.
About the Author