- Open Access
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)
Empirical mode decomposition (EMD) is a fully unsupervised and data-driven approach to the class of nonlinear and non-stationary 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 2D-EMD 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.
In the real world, data from natural phenomena like life science, social and economic systems are mostly nonlinear and non-stationary. 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.  provided the means for creating intrinsic a posteriori base functions with meaningful instantaneous frequency in the form of Hilbert spectrum expansion . This approach is embedded into a new decomposition algorithm, namely empirical mode decomposition (EMD)  that provides a powerful tool for adaptive multi-scale analysis of nonlinear and non-stationary 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 . These functions, known as intrinsic mode functions (IMFs), are sufficient to describe the signal, even though they are not necessarily orthogonal . IMFs, computed via an iterative ‘sifting process’ (SP), are functions with zero local mean , having symmetric upper and lower envelops . The SP depends both on an interpolation method and on a stopping criterion that ends the procedure. Some updates of the 1D-EMD have been proposed which address the mode mixing effect that sometimes occurs in the EMD domain. In this vein, 1D-ensemble EMD (1D-EEMD) has been proposed , 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 2D-EMD realization and it can generally be classified into three categories:
Single direction EMD: applies 1D-EMD to each image line, breaking down the correlation of the bi-dimensional space .
Bi-dimensional 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 .
Directional EMD: selects a direction that maximizes the power spectrum of the image and then uses 1D-EMD along this direction . 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 1D-EEMD is then performed to robustly decompose the signal into different characteristic 1D-IMFs. An inverse procedure is finally involved to transform the 1D-IMFs back to 2D-IMFs, resulting in the 2D data decomposition. In this way, a significant computational load is avoided, forming a fast realization of 2D-EEMD. The objective of this study is a fast realization of the 2D-EEMD by efficiently applying the 1D-EEMD 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 1D-EMD, the 1D-EEMD, and the 2D-EMD 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.
1D-Empirical Mode Decomposition (1D-EMD)
1D-EMD considers a signal x(t) at the scale of its local oscillations . 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 1D-EMD scheme is fully described in .
The reconstructed signal x(t) after being decomposed by the 1D-EMD is
where c i (t) is the i th IMF and r N (t)the final residue.
1D-Ensemble Empirical Mode Decomposition (1D-EEMD)
One of the major drawbacks of the original 1D-EMD 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 time-scale or time-frequency space, a reference distribution that facilitates the decomposition method is provided; hence, it helps to reveal the true signals in the data . 1D-EEMD performs this concept with the following steps:
(S1) Add Gaussian white noise w(t) of (0, σw) to the x(t) data, i.e.,
(S2) Decompose X(t) into IMFs using 1D-EMD, i.e.,
(S3) Repeat S1 and S2 M times (e.g., M = 10) with different noise realizations w i (t), and obtain the corresponding IMFs that result in
(S4) Finally, the corresponding IMFs of the decomposition are given by
derived by IMF averaging across the M ensemble members.
2D-Empirical Mode Decomposition (2D-EMD)
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 . In 2D space, the IMFs typically use the definition of symmetry of upper and lower envelops related to local mean . 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 8-connected neighbors, while more sophisticated methods, like morphological reconstruction, are based on geodesic operators . Furthermore, the interpolation method should rely on proper 2D spline interpolation of the scattered extrema points. In , the thin-plate smoothing spline interpolation is used. In BEMD , 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 real-time 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 . These curves were first studied by Peano and later by Hilbert . 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 one-to-one 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 , 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 time-consuming 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 th-order curve. The obtained n th-order curve is adjusted to the image resolution by the 2n × 2n 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 1D-EEMD to the linear signal to compute the 1D IMFs that carry multi-scale space-frequency 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
In order to test computational cost gain of the proposed PHEEMD method when compared with BEEMD  and LSEEMD , a set of different representative images with different resolutions were fully decomposed and decomposition times were measured. Full decomposition was performed using log2(n), where n is the number of points, to find the signal number of IMFs .
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.  have proposed a multidimensional EEMD (MEEMD) in which EEMD is applied to spatial data in one dimension (x-direction) and then applied in the second dimension (y-direction) 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 signal-to-noise 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 . 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 two-dimensional Gaussian white noise decomposition using BEEMD, the results are in line with those obtained by Rilling et al.  and Damerval et al. . Figure 4b shows the results for the first’s six modes of a full two-dimensional 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 two-dimensional 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
Real-world 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 , extraction of inhomogeneous illumination , and image denoising .
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  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.
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
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 low-order 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).
The EMD algorithm in two dimensions is a powerful tool for image processing; the drawback is, however, the computing power demand. Several 1D-EMD 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 pre-process the data (image) for using 1D-EEMD, enhancing the functionality of the application of the 1D-EEMD 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 cost-effective 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.
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 non-stationary time series analysis. Proc R Soc Lond A: Math Phys Eng Sci 1998, 454(1971):903-995. 10.1098/rspa.1998.0193
Norden EH, Zheng S, Steven R: A new view of nonlinear water waves: the Hilbert spectrum. Annu Rev Fluid Mech 1999, 31(1):417-457. 10.1146/annurev.fluid.31.1.417
Wu Z, Huang NE: Ensemble empirical mode decomposition: a noise-assisted data analysis method. Adv Adaptive Data Anal 2009, 1(1):1-41. 10.1142/S1793536909000047
Long SR: Use of the empirical mode decomposition and Hilbert-Huang transform in image analysis. World Multi-conference on Systemics, Cybernetics and Informatics, Cybernetics And Informatics: Concepts And Applications (Part II), Orlando, Florida; 2001.
Nunes JC, Bouaoune Y, Delechelle E, Niang O, Bunel P: Image analysis by bidimensional empirical mode decomposition. Image Vis Comput 2003, 21(12):1019-1026. 10.1016/S0262-8856(03)00094-5
Liu ZX, Wang HJ, Peng SL: Texture segmentation using directional empirical mode decomposition. 1st edition. International Conference on Image Processing, Singapore; 2004:279-282. October
Linderhed A: Compression by image empirical mode decomposition. 1st edition. IEEE International Conference on Image Processing, Italy; 2005:553-556. September
Deléchelle É, Nunes J-C, Lemoine J: Empirical mode decomposition synthesis of fractional processes in 1D- and 2D-space. Image Vis Comput 2005, 23(9):799-806. 10.1016/j.imavis.2005.05.012
Dafner R, Cohen-Or D, Matias Y: Context-based space filling curves. Comput Graph Forum 2000, 19(3):209-218. 10.1111/1467-8659.00413
Bauman K: The dictation factor of the Peano–Hilbert curve. Math Notes 2006, 80(5):609-620. 10.1007/s11006-006-0182-8
Wu Z, Huang NE, Chen X: The multi-dimensional ensemble empirical mode decomposition method. Adv Adaptive Data Anal 2009, 1: 339-372. 10.1142/S1793536909000187
Rilling G, Flandrin P, Goncalves P: Empirical mode decomposition as a filter bank. IEEE Signal Process Lett 2004, 11(2):112-114. 10.1109/LSP.2003.821662
Damerval C, Meignen S, Perrier V: A fast algorithm for bidimensional EMD. IEEE Signal Process Lett 2005, 12(10):701-704.
Giannarou S, Stathaki T: Optimal edge detection using multiple operators for image understanding. EURASIP J Adv Signal Process 2011. 10.1186/1687-6180-2011-28
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
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
Otsu N: A threshold selection method from gray-level histograms. IEEE Trans Syst Man Cybern 1979, 9(1):62-66.
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.
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.
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/1687-6180-2012-181
- Ensemble empirical mode decomposition (EEMD)
- fast bidimensional EEMD
- Peano–Hilbert curves