 Research
 Open Access
 Published:
Using Peano–Hilbert space filling curves for fast bidimensional ensemble EMD realization
EURASIP Journal on Advances in Signal Processing volume 2012, Article number: 181 (2012)
Abstract
Empirical mode decomposition (EMD) is a fully unsupervised and datadriven approach to the class of nonlinear and nonstationary signals. A new approach is proposed, namely PHEEMD, to image analysis by using Peano–Hilbert space filling curves to transform 2D data (image) into 1D data, followed by ensemble EMD (EEMD) analysis, i.e., a more robust realization of EMD based on white noise excitation. Tests’ results have shown that PHEEMD exhibits a substantially reduced computational cost compared to other 2DEMD approaches, preserving, simultaneously, the information lying at the EMD domain; hence, new perspectives for its use in low computational power devices, like portable applications, are feasible.
Introduction
In the real world, data from natural phenomena like life science, social and economic systems are mostly nonlinear and nonstationary. Fourier and wavelet transforms (built upon predefined basis functions) are traditional methods that sometimes face difficulties to reveal the nature of real life complex data. The adoption of adaptive basis functions introduced by Huang et al. [1] provided the means for creating intrinsic a posteriori base functions with meaningful instantaneous frequency in the form of Hilbert spectrum expansion [1]. This approach is embedded into a new decomposition algorithm, namely empirical mode decomposition (EMD) [1] that provides a powerful tool for adaptive multiscale analysis of nonlinear and nonstationary signals. EMD is a method of breaking down the signal without leaving the time domain; it filters out functions which form a complete and nearly orthogonal basis for the signal being analyzed [1]. These functions, known as intrinsic mode functions (IMFs), are sufficient to describe the signal, even though they are not necessarily orthogonal [1]. IMFs, computed via an iterative ‘sifting process’ (SP), are functions with zero local mean [1], having symmetric upper and lower envelops [2]. The SP depends both on an interpolation method and on a stopping criterion that ends the procedure. Some updates of the 1DEMD have been proposed which address the mode mixing effect that sometimes occurs in the EMD domain. In this vein, 1Densemble EMD (1DEEMD) has been proposed [3], where the objective is to obtain a mean ensemble of IMFs with mixed mode cancelation due to white noise addition to the input signal. Moreover, EMD has been extended to 2D image processing as a 2DEMD realization and it can generally be classified into three categories:

(1)
Single direction EMD: applies 1DEMD to each image line, breaking down the correlation of the bidimensional space [4].

(2)
Bidimensional EMD (BEMD): adopts fully 2D local extrema detection and 2D surface interpolation processing, using, for example, cubic spline or radial basis functions. BEMD, however, requires very high computational cost [5].

(3)
Directional EMD: selects a direction that maximizes the power spectrum of the image and then uses 1DEMD along this direction [6]. This method has shown some good results in texture analysis, but if the selected direction in the image is not well chosen it exhibits poor performance.
To overcome the problem of suitable direction selection, the use of the Peano–Hilbert space filling curves (SFCs) is proposed, which produces a continuous and unique function whose domain is the unit interval [0,1]. The proposed scheme, namely PHEEMD, involves the Peano–Hilbert curve, which is initially applied to the input image and results in a single continuous signal dataset, upon which 1DEEMD is then performed to robustly decompose the signal into different characteristic 1DIMFs. An inverse procedure is finally involved to transform the 1DIMFs back to 2DIMFs, resulting in the 2D data decomposition. In this way, a significant computational load is avoided, forming a fast realization of 2DEEMD. The objective of this study is a fast realization of the 2DEEMD by efficiently applying the 1DEEMD algorithm to 2D signals, such as images, without losing their spatial information; this would, eventually, allow for faster image processing and analysis.
The article is organized as follows. The following section presents the mathematical background, i.e., the 1DEMD, the 1DEEMD, and the 2DEMD schemes, along with the Peano–Hilbert SFCs. Section “The proposed PHEEMD approach” describes the proposed PHEEMD approach, whereas Section “Results and discussion” presents and discusses the testing results. Finally, Section “Conclusion” concludes the article.
Mathematical background
1DEmpirical Mode Decomposition (1DEMD)
1DEMD considers a signal x(t) at the scale of its local oscillations [1]. Locally, under the EMD concept, the signal x(t) is assumed as the sum of fast oscillations superimposed to slow oscillations. On each decomposition step of the EMD, the upper and lower envelops are initially unknown; thus, an interactive SP is applied for their approximation to obtain the IMFs and the residue, the 1DEMD scheme is fully described in [1].
The reconstructed signal x(t) after being decomposed by the 1DEMD is
where c_{ i }(t) is the i th IMF and r_{ N }(t)the final residue.
1DEnsemble Empirical Mode Decomposition (1DEEMD)
One of the major drawbacks of the original 1DEMD is the appearance of mode mixing, which is defined as a single IMF consisting of signals widely disparate scales, or a signal of similar scale residing in different IMF components. By uniformly adding white noise through the whole timescale or timefrequency space, a reference distribution that facilitates the decomposition method is provided; hence, it helps to reveal the true signals in the data [3]. 1DEEMD performs this concept with the following steps:
(S1) Add Gaussian white noise w(t) of (0, σw) to the x(t) data, i.e., $X\left(t\right)=x\left(t\right)+w\left(t\right)\text{;}$
(S2) Decompose X(t) into IMFs using 1DEMD, i.e., $X\left(t\right)={\displaystyle \sum _{j=1}^{N}{c}_{j}\left(t\right)+{r}_{N}\left(t\right)\text{;}}$
(S3) Repeat S1 and S2 M times (e.g., M = 10) with different noise realizations w_{ i }(t), ${X}_{i}\left(t\right)=x\left(t\right)+{w}_{i}\left(t\right)$ and obtain the corresponding IMFs that result in ${X}_{i}\left(t\right)={\displaystyle \sum _{j=1}^{N}{c}_{\mathit{ij}}\left(t\right)+{r}_{\mathit{iN}}\left(t\right);}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,M\text{;}$
(S4) Finally, the corresponding IMFs of the decomposition are given by
derived by IMF averaging across the M ensemble members.
2DEmpirical Mode Decomposition (2DEMD)
The sifting notion is essentially identical in 1D and 2D cases of EMD. Nevertheless, due to the 2D nature of the images, some issues should be handled with care.
In particular, in 1D space, the number of local extrema and zero crossings of an IMF must be the same, or differ by one [1]. In 2D space, the IMFs typically use the definition of symmetry of upper and lower envelops related to local mean [7]. There are many ways to define the extrema; hence, different local extrema detection algorithms could be applied. Fast algorithms use the comparison of the candidate extreme with its nearest 8connected neighbors, while more sophisticated methods, like morphological reconstruction, are based on geodesic operators [8]. Furthermore, the interpolation method should rely on proper 2D spline interpolation of the scattered extrema points. In [7], the thinplate smoothing spline interpolation is used. In BEMD [8], radial basis functions are used for surface interpolation. This combination of 2D extrema extraction and 2D surface interpolation represents a very heavy computation power, not suitable for realtime implementations or applications for portable devices.
Peano–Hilbert Space Filling Curves
An SFC is a continuous scan that passes through every pixel of the image only once. In order to transform an image (2D data) on a signal (1D), the SFC must preserve the neighborhood properties of the pixel [9]. These curves were first studied by Peano and later by Hilbert [10]. A Peano–Hilbert curve has three main interesting properties: (i) the curve is continuous; (ii) a scanning curve is continuous almost everywhere; and (iii) some parts of the curve are similar with the whole curve, suggesting a fractal structure.
Peano’s definition of SFC was entirely analytical while Hilbert followed a geometric description, which maps the unit interval I = [0,1] onto the unit square S = [0,1] × [0,1]. The mapping is based on a quaternary expansion of t, for t ∈ I, and is based on a geometric approach that divides a square S into four subsequent subsquares according to the orientation shown in Figure 1. We construct a onetoone correspondence between subintervals of I and the subsquares of S, so that adjacent subintervals correspond to adjacent sub squares. Each subinterval can be divided into another four new subintervals and each sub square into another four new sub squares according to previous unitary division. This process can be executed according to the order of the curve (Figure 1).
According to [10], the Peano–Hilbert p(t) curve that maps the unit interval to unit square can be written in the complex form (3):
where i denotes imaginary unit and bar complex conjugation. According to (3), for the transition points (4) in the interval I t = 0, t = 1/3, t = 2/3, and t = 1, we have on S:
The proposed PHEEMD approach
The 2D EMD algorithms previously presented are very timeconsuming processes. In order to reduce the computation demands, the PHEEMD algorithm is proposed. This algorithm combines the advantages of SFCs with the performance of the EEMD algorithm and transfers them into the image processing domain. PHEEMD is structured in the following three phases:
Phase 1: Perform image decomposition using the Peano–Hilbert curve and get the equivalent 1D signal. For the Peano–Hilbert algorithm, a recursive function operates on the S area to get the n thorder curve. The obtained n thorder curve is adjusted to the image resolution by the 2^{n} × 2^{n} relationship (n ≥ 2). This procedure converts a 2D data into 1D signal, yet, maintaining the local pixel spatial relations between neighbors.
When 2D data are sliced into 1D data along parallel lines in some cases discontinuity between different slices is introduced. This procedure can work well if a dominant direction on 2D data could clearly be identified.
To overcome the problem of finding a suitable direction selection on 2D data, the Peano–Hilbert curve was used to transform 2D data into 1D data. The adjacency property of these curves maintains spatial properties between neighbors and, if discontinuity is introduced, it is distributed along different directions. This procedure minimizes the discontinuity errors introduced during the transformation of 2D data to 1D data.
Phase 2: Apply the 1DEEMD to the linear signal to compute the 1D IMFs that carry multiscale spacefrequency information. Some indicative values for the standard deviation of the Gaussian white noise and the ensemble size are σ_{ w } = 0.1σ_{ x } and M = 8, respectively; σ_{ x } denotes the standard deviation of the original data. Due to finite data samples, even data extension should be implemented in the interpolation procedure on the SP.
Phase 3: Apply the inverse procedure to reconstruct the image from the data, using the Peano–Hilbert pixel spatial relations to process the 1D IMFs to 2D IMFs, according to the relationship of Phase 1. Figure 2 shows a block diagram of the proposed method explained previously.
Results and discussion
Computational cost
In order to test computational cost gain of the proposed PHEEMD method when compared with BEEMD [5] and LSEEMD [4], a set of different representative images with different resolutions were fully decomposed and decomposition times were measured. Full decomposition was performed using log_{2}(n), where n is the number of points, to find the signal number of IMFs [3].
The tests were realized in the same hardware and the coding process was to maximize algorithm differences and minimizes code implementations dependencies. The derived results are presented in Table 1; for simplicity, all time values are referenced to the BEEMD, to measure the execution time. As it can be seen from this table, at a 512 × 512 image resolution the PHEEMD runs approximately 22 times faster than BEEMD, representing a significant reduction in computing demands. The previous results are consistent with Table 2 which shows the complexity analysis of the SP for the PHEEMD and BEEMD which analytically shows a complexity reduction of our method. Table 3 presents the number of maxima/minima with respect to IMFs for PHEEMD showing its ability to perform a full decomposition.
The second evaluation perspective was the efficiency of the PHEEMD compared with BEEMD and LSEEMD to extract the image IMFs. Figure 3 shows the decomposition for the first’s eight modes plus residue of the Lena image at 256 × 256 pixel resolutions for the three methods.
In particular, Figure 3a shows the BEEMD image decomposition into eight IMFs plus residue; the first IMF corresponds to higher frequencies (image transitions) and practically there is no mixed mode, while the residue corresponds to image lower frequencies. Because the BEEMD algorithm is fully 2D, there are not any effects associated to changes in pixels spatial relations. Figure 3b illustrates the LSEMD image decomposition into eight IMFs plus residue where the line artifacts associated to column spatial brake relations related to algorithm implementations clearly appear. Due to pixel spatial brake relations, mixed mode (noise) is also introduced in each IMF. Figure 3c depicts the PHEEMD image decomposition into eight IMFs plus residue and represents an improvement in IMF extraction related to LSEEMD and execution speed when compared to BEEMD. Due to the nature of the SFC (Peano–Hilbert) the line scan artifacts (Figure 3b) and mixed mode effects are minimized, as the first neighbor’s spatial relations are taken into account. Compared to the other two methodologies, the PHEEMD reconstruction shows a negligible difference in the quality of the reconstructed image. Moreover, the ‘blockiness’like seen in the higher IMFs does not cause any serious obstacle since they usually are not the focus of the image processing procedures. Furthermore, it can also be seen that the first IMFs are more sharply defined whereas the lower IMFs and the residue also reflect the image trend.
Wu et al. [11] have proposed a multidimensional EEMD (MEEMD) in which EEMD is applied to spatial data in one dimension (xdirection) and then applied in the second dimension (ydirection) to the results of the previous decomposition. By combining the appropriate components they obtain the image decomposition IMFs.
Using the code provided in the article we have implemented a series of tests using the Lena image to compare computational costs with our method. For resolutions of 64 × 64 and 128 × 128 our method runs very fast while MEEMD is significantly slower.
Our method can also be used with multidimensional data since the Peano–Hilbert curve exists in multiple data dimensions. This factor is an advantage because it reduces the data dimension to 1D with significant reduction in computer power demands.
As a final efficiency test, the image reconstruction process was made according to (1) and the peak signaltonoise ratio (PSNR) with the original Lena image was computed. The PSNR was found 42.8, 41.9, and 42.7 dB for the BEEMD, LSEEMD, and PHEEMD reconstructions, respectively, showing a negligible difference in quality of the reconstructed image among the three methodologies.
PHEEMD as a filter bank
The next evaluation we put forward that PHEEMD creates a selective filter bank when applied to bidimensional Gaussian white noise, as in 1D case [12]. For this test, we consider the average Fourier transform of IMFs over 100 realizations. Figure 4 shows the derived results for the first six IMFs, as expected the first modes contain the highest frequencies, while the others contain lower frequencies. For this configuration, bidimensional 128 × 128 Gaussian white noise with σ = 1 was used.
Analyzing the results of the tree methods and taking into account the isotropy of the Fourier transform we can observe the effects of Gaussian white noise decomposition for the three methods. Figure 4a depicts the results for the first’s six modes of a full twodimensional Gaussian white noise decomposition using BEEMD, the results are in line with those obtained by Rilling et al. [12] and Damerval et al. [13]. Figure 4b shows the results for the first’s six modes of a full twodimensional Gaussian white noise decomposition using LSEEMD, resulting in a filter bank over each separated horizontal line (noise image). Figure 4c shows the results for the first’s six modes of a full twodimensional Gaussian white noise decomposition using our proposed method PHEEMD.
The output shows that our method operates as a filter bank over the directions of the Peano–Hilbert curve leading to an improvement over LSEEMD method. The filter bank denotes some edge effects of the Peano–Hilbert curve over the noisy image as can be seen in crosstabs of the Fourier transform of IMFs. For future improvement of the algorithm, this crosstabs have to be minimized efficiently, i.e., removing the effects of high frequencies on higher modes (smooth the higher IMFs).
PHEEMD in image analysis
Realworld applications have been used to test and validate the proposed approach. A study is performed to show the efficiency and performance of the PHEEMD on edge detection [14], extraction of inhomogeneous illumination [15], and image denoising [16].

(1)
Edge detection: the goal of edge detection is to produce a line drawing of an image. In practice, operators will look for places in the image where the intensity quickly changes revealing the geometric/spatial information within the image. In the EMD domain every mode (IMF) contains spatial information at a specific scale conveniently separated. The first’s modes contain higher frequencies that correspond to image transitions; based on this EMD property we will use the first’s modes to obtain edge information. We use a four phase’s algorithm to evaluate our method; first we decompose the image using one of the tree methods (BEEMD, LSEEMD, and PHEEMD), second reconstruct the image based on (1) using only the firsts IMFs, third perform a standard deviation filtering using a 3 × 3 window and finally make a global image binarization using Otsu’s [17] method. To determine the number of IMFs in the second phase a root mean square error minimization (RMSE) criteria of the overall method compared with the Sobel operator was used. The RMSE minimization occurs with only the first’s two IMFs in the reconstruction phase and RMSE are 0.32, 0.33, and 0.36 for BEEMD, PHEEMD, and LSEEMD, respectively. Figure 5 shows the comparison of the BEEMD, LSEEMD, and PHEEMD to perform edge detection.

(2)
Image denoising: since EMD extracts first the highest frequencies the first’s modes generally correspond to the noise. The noise information is spread over the first’s modes and in the residual image. The image tendency is contained only in the residue and lasts IMFs. The results in Figure 6 show the possibility of image denoising with our method. After having applied PHEEMD, noise removing is carried out by eliminating the first two IMFs according to a criterion of RMSE minimization. Figure 6d represents the RMSE during the reconstruction phase of the image which was corrupted by Gaussian white noise (σ = 0.1). The minimum error occurs when removing the first two IMFs, where the reconstruction is $x\left(t\right)={\displaystyle \sum _{i=3}^{N}{c}_{i}\left(t\right)+{r}_{N}\left(t\right)}\text{.}$

(3)
Inhomogeneous illumination: since EMD extracts firstly the highest frequencies the first’s modes generally correspond to the noise and image fine details and the image tendency is contained only in the residue and lasts IMFs. The tendency can be represented by a loworder polynomial generally 0, 1, or 2. The results in Figure 7 show the inhomogeneous illumination correction of represented image with our method. After having applied PHEEMD, inhomogeneous illumination correction is carried out by subtracting the residual image from original image using (1).
Conclusion
The EMD algorithm in two dimensions is a powerful tool for image processing; the drawback is, however, the computing power demand. Several 1DEMD techniques exist that have less computing power demand; nevertheless, they break the image into independent lines, introducing image noise which, in turn, results in extended mixed mode in the IMFs. The proposed method (PHEEMD) uses the local vicinity properties of the Peano–Hilbert curve to preprocess the data (image) for using 1DEEMD, enhancing the functionality of the application of the 1DEEMD to image processing.
This study focuses on SFCs that are continuous and differentiable. Since these curves pass through every point in the square (Figure 1) once and only once they are said to be space filling. Due to the adjacency property (Figure 1a) neighbor properties on 2D data are preserved during the transformation to 1D data. Future study is needed to see how different SFCs with different local properties influence the robustness of the decomposition.
PHEEMD represents an efficient costeffective image processing algorithm, allowing for fast EMD image analysis within different image processing applications, hence, new perspectives for its use in low computer power devices, like portable applications.
References
 1.
Huang NE, Shen Z, Long SR, Wu MC, Shih HH, Zheng Q, Yen NC, Tung CC, Liu HH: The empirical mode decomposition and the Hilbert spectrum for nonlinear and nonstationary time series analysis. Proc R Soc Lond A: Math Phys Eng Sci 1998, 454(1971):903995. 10.1098/rspa.1998.0193
 2.
Norden EH, Zheng S, Steven R: A new view of nonlinear water waves: the Hilbert spectrum. Annu Rev Fluid Mech 1999, 31(1):417457. 10.1146/annurev.fluid.31.1.417
 3.
Wu Z, Huang NE: Ensemble empirical mode decomposition: a noiseassisted data analysis method. Adv Adaptive Data Anal 2009, 1(1):141. 10.1142/S1793536909000047
 4.
Long SR: Use of the empirical mode decomposition and HilbertHuang transform in image analysis. World Multiconference on Systemics, Cybernetics and Informatics, Cybernetics And Informatics: Concepts And Applications (Part II), Orlando, Florida; 2001.
 5.
Nunes JC, Bouaoune Y, Delechelle E, Niang O, Bunel P: Image analysis by bidimensional empirical mode decomposition. Image Vis Comput 2003, 21(12):10191026. 10.1016/S02628856(03)000945
 6.
Liu ZX, Wang HJ, Peng SL: Texture segmentation using directional empirical mode decomposition. 1st edition. International Conference on Image Processing, Singapore; 2004:279282. October
 7.
Linderhed A: Compression by image empirical mode decomposition. 1st edition. IEEE International Conference on Image Processing, Italy; 2005:553556. September
 8.
Deléchelle É, Nunes JC, Lemoine J: Empirical mode decomposition synthesis of fractional processes in 1D and 2Dspace. Image Vis Comput 2005, 23(9):799806. 10.1016/j.imavis.2005.05.012
 9.
Dafner R, CohenOr D, Matias Y: Contextbased space filling curves. Comput Graph Forum 2000, 19(3):209218. 10.1111/14678659.00413
 10.
Bauman K: The dictation factor of the Peano–Hilbert curve. Math Notes 2006, 80(5):609620. 10.1007/s1100600601828
 11.
Wu Z, Huang NE, Chen X: The multidimensional ensemble empirical mode decomposition method. Adv Adaptive Data Anal 2009, 1: 339372. 10.1142/S1793536909000187
 12.
Rilling G, Flandrin P, Goncalves P: Empirical mode decomposition as a filter bank. IEEE Signal Process Lett 2004, 11(2):112114. 10.1109/LSP.2003.821662
 13.
Damerval C, Meignen S, Perrier V: A fast algorithm for bidimensional EMD. IEEE Signal Process Lett 2005, 12(10):701704.
 14.
Giannarou S, Stathaki T: Optimal edge detection using multiple operators for image understanding. EURASIP J Adv Signal Process 2011. 10.1186/16876180201128
 15.
Schettini R, Corchs S: Underwater image processing: state of the art of restoration and image enhancement methods. EURASIP J Adv Signal Process 2010. 10.1155/2010/746052
 16.
Bala E, Ertüzün A: A multivariate thresholding technique for image denoising using multiwavelets. EURASIP J Adv Signal Process 2005. 10.1155/ASP.2005.1205
 17.
Otsu N: A threshold selection method from graylevel histograms. IEEE Trans Syst Man Cybern 1979, 9(1):6266.
Acknowledgment
This research was supported by the Portuguese Foundation for Science and Technology (FCT), through the FCT project PTDC/EIA/73633/2006  Smart Vision: active vision for the blind.
Author information
Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Cite this article
Costa, P., Barroso, J., Fernandes, H. et al. Using Peano–Hilbert space filling curves for fast bidimensional ensemble EMD realization. EURASIP J. Adv. Signal Process. 2012, 181 (2012). https://doi.org/10.1186/168761802012181
Received:
Accepted:
Published:
Keywords
 Ensemble empirical mode decomposition (EEMD)
 fast bidimensional EEMD
 Peano–Hilbert curves