Using Peano–Hilbert space filling curves for fast bidimensional ensemble EMD realization
- Paulo Costa^{1}Email author,
- João Barroso^{2},
- Hugo Fernandes^{3} and
- Leontios J Hadjileontiadis^{4}
https://doi.org/10.1186/1687-6180-2012-181
© Costa et al.; licensee Springer. 2012
Received: 17 December 2011
Accepted: 2 August 2012
Published: 21 August 2012
Abstract
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.
Keywords
Introduction
- (1)
Single direction EMD: applies 1D-EMD to each image line, breaking down the correlation of the bi-dimensional space [4].
- (2)
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 [5].
- (3)
Directional EMD: selects a direction that maximizes the power spectrum of the image and then uses 1D-EMD 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 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.
Mathematical background
1D-Empirical Mode Decomposition (1D-EMD)
1D-EMD 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 1D-EMD scheme is fully described in [1].
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 [3]. 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., $X\left(t\right)=x\left(t\right)+w\left(t\right)\text{;}$
(S2) Decompose X(t) into IMFs using 1D-EMD, 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{;}$
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 [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 8-connected 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 thin-plate 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 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 [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.
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 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 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.
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].
Execution speed ratios for the three xEMD algorithms ^{ a }
Resolution | BEMD | LSEMD | PHEEMD |
---|---|---|---|
64 × 64 | 1.0 | 1.1 | 10.4 |
128 × 128 | 1.0 | 1.8 | 15.7 |
256 × 256 | 1.0 | 2.0 | 20.6 |
512 × 512 | 1.0 | 4.9 | 22.4 |
Complexity analysis of the SP for xEMD algorithms
PHEEMD—SP steps | C(n) | BEMD—SP steps | C(n) |
---|---|---|---|
Extrema definition | O(n) | Extrema definition | O(n) |
Data extension | O(n) | Data symmetrisation | O(n) |
Data interpolation | O(n) | Delaunay training | O(n^{2}) |
Data interpolation | O(n^{2}) | ||
Median envelop estimation | O(n) | Median envelop estimation | O(n) |
2D > 1D > 2D | O(n) | – | – |
Number of maxima, minima of IMFs and the residual of the 256 × 256 Lena image for PHEEM
nb maxima | nb minima | |
---|---|---|
IMF_{1} | 7384 | 7489 |
IMF_{2} | 5536 | 5573 |
IMF_{3} | 3236 | 3199 |
IMF_{4} | 1778 | 1776 |
IMF_{5} | 877 | 907 |
IMF_{6} | 440 | 447 |
IMF_{7} | 225 | 222 |
IMF_{8} | 104 | 101 |
IMF_{9} | 54 | 55 |
IMF_{10} | 24 | 24 |
IMF_{11} | 12 | 11 |
IMF_{12} | 6 | 6 |
IMF_{13} | 4 | 3 |
IMF_{14} | 2 | 2 |
Residue | 1 | 2 |
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 (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
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. [12] and Damerval et al. [13]. 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
- (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 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).
Conclusion
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.
Declarations
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.
Authors’ Affiliations
References
- 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.0193MathSciNetView ArticleMATHGoogle Scholar
- 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.417View ArticleMathSciNetGoogle Scholar
- 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/S1793536909000047View ArticleGoogle Scholar
- 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.Google Scholar
- 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-5View ArticleMATHGoogle Scholar
- Liu ZX, Wang HJ, Peng SL: Texture segmentation using directional empirical mode decomposition. 1st edition. International Conference on Image Processing, Singapore; 2004:279-282. OctoberGoogle Scholar
- Linderhed A: Compression by image empirical mode decomposition. 1st edition. IEEE International Conference on Image Processing, Italy; 2005:553-556. SeptemberMATHGoogle Scholar
- 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.012View ArticleGoogle Scholar
- Dafner R, Cohen-Or D, Matias Y: Context-based space filling curves. Comput Graph Forum 2000, 19(3):209-218. 10.1111/1467-8659.00413View ArticleGoogle Scholar
- Bauman K: The dictation factor of the Peano–Hilbert curve. Math Notes 2006, 80(5):609-620. 10.1007/s11006-006-0182-8MathSciNetView ArticleMATHGoogle Scholar
- Wu Z, Huang NE, Chen X: The multi-dimensional ensemble empirical mode decomposition method. Adv Adaptive Data Anal 2009, 1: 339-372. 10.1142/S1793536909000187MathSciNetView ArticleGoogle Scholar
- 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.821662View ArticleGoogle Scholar
- Damerval C, Meignen S, Perrier V: A fast algorithm for bidimensional EMD. IEEE Signal Process Lett 2005, 12(10):701-704.View ArticleGoogle Scholar
- Giannarou S, Stathaki T: Optimal edge detection using multiple operators for image understanding. EURASIP J Adv Signal Process 2011. 10.1186/1687-6180-2011-28Google Scholar
- 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/746052Google Scholar
- 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.1205Google Scholar
- Otsu N: A threshold selection method from gray-level histograms. IEEE Trans Syst Man Cybern 1979, 9(1):62-66.MathSciNetView ArticleGoogle Scholar
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.