The Empirical Mode Decomposition algorithm via Fast Fourier Transform Oleg O. Myakinin*a, Valery P. Zakharova, Ivan A. Bratchenkoa, Dmitry V. Kornilina, Dmitry N. Artemyeva, Alexander G. Khramovb,c a Dept. of Laser and Biotechnical Systems and bTechnical Cybernetics Dept., Samara State Aerospace University (SSAU), 34, Moskovskoye Shosse, Samara, 443086, Russia; cImage Processing Systems Institute, 151, Molodogvardeyskaya st., Samara, 443001, Russia ABSTRACT In this paper we consider a problem of implementing a fast algorithm for the Empirical Mode Decomposition (EMD). EMD is one of the newest methods for decomposition of non-linear and non-stationary signals. A basis of EMD is formed "on-the-fly", i.e. it depends from a distribution of the signal and not given a priori in contrast on cases Fourier Transform (FT) or Wavelet Transform (WT). The EMD requires interpolating of local extrema sets of signal to find upper and lower envelopes. The data interpolation on an irregular lattice is a very low-performance procedure. A classical description of EMD by Huang suggests doing this through splines, i.e. through solving of a system of equations. Existence of a fast algorithm is the main advantage of the FT. A simple description of an algorithm in terms of Fast Fourier Transform (FFT) is a standard practice to reduce operation's count. We offer a fast implementation of EMD (FEMD) through FFT and some other cost-efficient algorithms. Basic two-stage interpolation algorithm for EMD is composed of a Upscale procedure through FFT and Downscale procedure through a selection procedure for signal's points. First we consider the local maxima (or minima) set without reference to the axis OX, i.e. on a regular lattice. The Upscale through the FFT change the signal’s length to the Least Common Multiple (LCM) value of all distances between neighboring extremes on the axis OX. If the LCM value is too large then it is necessary to limit local set of extrema. In this case it is an analog of the spline interpolation. A demo for FEMD in noise reduction task for OCT has been shown. Keywords: Empirical Mode Decomposition, interpolation, Fast Fourier Transform, Optical Coherence Tomography.
1. INTRODUCTION An orthogonal decomposition's selecting is one of big problems in the signal analysis. Huang1 split all signals into 3 groups: linear stationary (Fast Fourier Transform - FFT), linear nonstationary (Discrete Wavelet Transform - DWT), nonlinear nonstationary (Hilbert-Huang Transform - HHT). The most popular set includes the DFT and the DWT, but natural signals do not satisfy a linear model of signal in practice. Moreover DFT is giving only an integral value contribution of each frequency in signal without time resolving. A Short-time DFT partially solves this problem, but a priori static basis does not always give a satisfactory decomposition for time-frequency signal analysis. The Empirical Mode Decomposition (EMD) is one of the new methods for analysis of nonlinear nonstationary signals. Originally introduced by Huang2, the method has been successfully used in signal/image processing3-6. The key feature of the method is adaptive (a posteriori) basis, which is created "on-the-fly." The EMD calculates a basis set, which depends on current signal features unlike other methods listed above, which have a priori basis. The EMD’s a posteriori basis set is not precisely orthogonal. There is no full and precise mathematical system for the EMD yet, but in practice the EMD basis signals are quasi-orthogonal. This is often sufficient for high-quality time-frequency analysis.
*
[email protected]; phone +7-846-267-45-50
Applications of Digital Image Processing XXXVII, edited by Andrew G. Tescher, Proc. of SPIE Vol. 9217, 921721 © 2014 SPIE · CCC code: 0277-786X/14/$18 · doi: 10.1117/12.2061808
Proc. of SPIE Vol. 9217 921721-1 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 10/13/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx
A 2D EMD generalization resulted in a significant performance falling. In papers7-9 we had a challenge. This was a multidimensional OCT signal’s processing, which is a very low performance task. The general performance problem of the EMD is an extremum points’ interpolation stage. Some authors10-12 propose fast methods for 1D and 2D EMD. The principal idea of their methods is using of high-performance transform cores for interpolation. However, the need to comply with certain requirements on the smoothness (for continuous signal) requires to solve algebraic problems, which does not implement the processing of OCT in real time. We propose our simple data interpolation algorithm for the EMD. We were guided by the following principles: 1) The method must no use any algebraic interpolation methods; 2) The method must be from class of “discrete” interpolation, i.e. both input data and result are discrete signals, not continue functions like polynomial functions, splines, etc.; 3) The method must be defined via FFT (Fast Fourier Transform); 4) No additional restriction must be required for function’s smoothness. A full and piecewise discrete interpolation methods via FFT are shown below. We also show the method’s performance and consider “smoothness” problem.
2. METHODS 2.1 A discrete Fourier interpolation on regular lattice The principal idea of a fast interpolation algorithm is using of FFT implementation. There is a fast discrete interpolation algorithm on regular lattice. An example of the signal interpolation is shown on Figure 1. 2.0
Original signal
Interpolated points 2.5
1.5
2.0 1.0 1.5
1.0
03 0.5
t f
point # 2
4
6
10
12
2
14
4
6
a
point #
b
Figure 1. A schematic image of a fast data interpolation algorithm implemented via FFT: (a) signal and (b) their FFT (absolute part) spectrum.
Blue points are input signal, which has length 𝑁. If one expands the Fourier spectrum (after FFT) by zero-value points (purppe colored) up to length 2𝑁 then a signal, which correspond, to the spectrum (after the Inverse FFT) will has also length 2𝑁. Moreover, each odd point will precisely corresponds to a point of input signal. Thus, the Fourier based interpolation algorithm (upscale) can be described as 𝑅𝑆! 𝑉 = 𝐹𝐹𝑇 !! 𝑍𝑃! 𝐹𝐹𝑇 𝑉
, 𝑉 ∈ ℝ! , 𝑀 = 𝑘𝑁, 𝑘 ∈ ℤ, 𝑘 > 1,
(1)
where 𝐹𝐹𝑇 ∙ и 𝐹𝐹𝑇 !! ∙ are the procedures of direct and inverse FFT respectively, 𝑍𝑃! 𝑢 is the procedure for spectral data scaling up to length 𝑀: 𝑍𝑃! 𝑢 = 𝐶𝑜𝑛𝑐𝑎𝑡
𝑢 1 ,𝑢 2 ,…,𝑢 𝑛
!
, Θ(!!!)! , 𝑢 𝑛 + 1 , 𝑢 𝑛 + 2 , … , 𝑢 𝑁
Θ(!!!)! = 0,0, … ,0 ! , Θ(!!!)! ∈ ℂ
!!! !
!
,
,
Proc. of SPIE Vol. 9217 921721-2 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 10/13/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx
(2)
𝑚 = 𝐹𝑙𝑜𝑜𝑟
𝑁 + 1, 2
where 𝐹𝑙𝑜𝑜𝑟 𝑥 gives the greatest integer less than or equal to 𝑥, and 𝐶𝑜𝑛𝑐𝑎𝑡 𝐶! , 𝐶! , … , 𝐶! is a vector concatenation operator for 𝐶! , 𝐶! , … , 𝐶! . 2.2 A fast discrete Fourier interpolation on irregular lattice The method described above is working only for interpolation on regular lattice. In this paper we propose a modification for points’ interpolation on irregular lattice. The method is composed in three stages: 1) All points are considered with no reference to the axis 𝑋; 2) The signal upscale (1)-(2) with a solid reserve; 3) An adaptive signal downscale considering a reference of each original point to the axis Х. The algorithm is shown in Figure 2. 2.0
Ti 1.5
1.0
0.5
point # 10
15
a 2.0
2.0
Original signal
Interpolated points
MM
1.5
X Deleted points
1.5
MI
06
1.0
mil // LO
!R
410(
03
0.5
point #
point # 2
3
4
5
6
b
5
10
15
c
Figure 2. A schematic image of The Fast Fourier discrete interpolation algorithm on irregular lattice: (a) original signal; (b) fast Fourier interpolation or regular lattice, and (c) result signal.
If one considers original signal’s point without references to the axis 𝑋 then this is a general discrete signal and one can performs The Basic Fourier Interpolation on regular lattice. This signal can be upscaled with a solid reserve up to new level (we will show below how to do this). Finally, the upscaled signal will be performed by an adaptive downscale procedure to restore the references between the original signal’s points and the axis 𝑋 and delete all “reserve” points from stage 2 of our method. Each upscaled signal region (between points of the original signal) has own downscale procedure. All described above can be formally described as follow. Let original signal's points is defined by two vectors 𝑋 ∈ ℤ! and 𝑌 ∈ ℝ! . These are coordinate vectors for the axis 𝑋 and 𝑌 respectively, i.e. a pair 𝑥! , 𝑦! , 𝑥! ∈ 𝑋, 𝑦! ∈ 𝑌 defines a position of point for 1D signal.
Proc. of SPIE Vol. 9217 921721-3 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 10/13/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx
The algorithm is described as follow. 1) Calculating of difference vector for point on the axis 𝑋 𝐷 = 𝑑! 𝑑! = 𝑥!!! − 𝑥! , 𝑖 = 1, 𝑁 − 1; 2) The upscale performing for the signal 𝑌 𝑌!" = 𝑅𝑆! 𝑌 , 𝑀 = 𝑁 ∗ 𝐿𝐶𝑀 𝐷 , where 𝐿𝐶𝑀 𝐷 defines the least common multiple of the values of vector 𝐷; 3) Each region [𝑘 ∗ 𝐿𝐶𝑀 𝐷 , 𝑘 + 1 ∗ 𝐿𝐶𝑀 𝐷 ) of the signal 𝑌!" , which corresponds to neighbor points of the original signal is performed by the downscale so that the length of 𝑘-th region will be 𝑑! . The downscale procedure is performed through “reserve” point’s dropping in equal intervals on the axis Х: (!)
(!)
(!!!)
𝑌!"# = 𝐶𝑜𝑛𝑐𝑎𝑡 𝑌!"# , 𝑌!"# , … , 𝑌!"# !
𝑌!"# 𝑙 = 𝑌!"
𝑘 − 1 ∗ 𝐿𝐶𝑀 𝐷 + 𝑙 − 1 ∗
,
𝐿𝐶𝑀 𝐷 + 1 , 𝑙 = 1, 𝑑! . 𝑑!
Finally, the result signal 𝑌!"# is a discrete point’s, which is defined by vectors 𝑋 и 𝑌. 2.3 A fast discrete piecewise Fourier interpolation on irregular lattice If we have a big list of points for interpolation then our method will have a low performance because of 𝐿𝐶𝑀 𝑥 is a very rapidly growing operation. Let’s split vectors 𝑋 and 𝑌 so that 𝐿𝐶𝑀 ° of each sub-vector of 𝐷 will be less than a predefined number. Each sub-vector is performed by our algorithm proposed in preview part of this paper. The result set is performed by concatenation procedure.
3. RESULTS AND DISCUSSION All tests are been performed on following PC configuration: Core2Duo (2 cores) 1.86 GHz, 4 GB (4 x 1Gb) RAM PC3200, SATA II HDD, Linux Open SUSE 10.3 64bit.
{
Original signal Concatenation points
R
300
.1.
200
i
L
100
a
100
250
150
point #
Y p
300
350
>
b
c
Figure 3. Fast Fourier piecewise discrete interpolation on irregular lattice for random signal with equal distribution: (a) interpolated signal; (b) their second derivative, and (c) second derivative after smooth of (a) in concatenation points.
Proc. of SPIE Vol. 9217 921721-4 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 10/13/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx
An example of fast Fourier interpolation on irregular lattice is shown in Figure 3. The fast piecewise Fourier interpolation EMD examples for 1D row of OCT B-scan are shown in Figure 4. We choose some OCT images from different categories. We used our described before noise-removing algorithm9 and modifying based on proposed in this paper the fast discrete piecewise Fourier interpolation algorithm. The results are shown in Table 1. 200
150
100
50
pixel #
100.
200
300
400
500
a
-40
100
200
400
300
500
b Figure 4. (a) A row of OCT B-scan and (b) their EMD decomposition based on proposed piecewise Fourier interpolation.
Table 1. Performance tests of proposed fast discrete piecewise Fourier interpolation algorithm.
Image category Mesh implant
Melanoma
Interpolation Spline Fourier Spline Fourier
Lung cancer
Spline Fourier
OCT image size, px 100x100
200x200
300x300
400x400
500x500
1024x1024
22 sec
41 sec
2 min 16 sec
5 min 3 sec
15 min 44 sec
40 min 59 sec
0.1 sec
0.2 sec
0.5 sec
1.5 sec
4.0 sec
15.2 sec
26 sec
45 sec
2 min 46 sec
4 min 39 sec
16 min 21 sec
41 min 14 sec
0.1 sec
0.2 sec
0.6 sec
1.7 sec
4.3 sec
15.6 sec
19 sec
38 sec
2 min 8 sec
4 min 52 sec
16 min 54 sec
40 min 38 sec
0.1 sec
0.2 sec
0.6 sec
1.6 sec
4.3 sec
15.1 sec
Thus, we developed a very fast modification for proposed before noise removing algorithm based on the EMD. Any problem with high change of second derivative can be solved using smooth filter in concatenation points.
Proc. of SPIE Vol. 9217 921721-5 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 10/13/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx
ACKNOWLEDGEMENTS This research was supported by RFBR, research project No. 14-07-31292 mol_a, and by the Ministry of Education and Science of the Russian Federation.
REFERENCES [1] Huang, N. E. and Shen, S. S. P., [Hilbert-Huang Transform and Its Applications], World Scientific Publishing, Singapore, 12-14 (2005). [2] Huang, N. E., Shen, Z., Long, S. R., Wu, M. C., Shih, H. H., Zheng, Q., Yen, N.-C., Tung, C. C. and Liu, H. H., “The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis,” Proc. R. Soc. Lond. A. 454, 903-995 (1998). [3] Hariharan, H., Gribok, A., Abidi, M. A. and Koschan, A., "Image Fusion and Enhancement via Empirical Mode Decomposition," Journal of Pattern Recognition Research 1(1), 16–31 (2006). [4] Chang, J., Huang, M, Lee, J., Chang, C. and Tu, T., “Iris recognition with an improved empirical mode decomposition method,” Optical Engineering 48(4), 047007–047007–15 (2009). [5] Huang, N. E., Shen, Z. and Long, R. S., "A New View of Nonlinear Water Waves – The Hilbert Spectrum," Annual Review of Fluid Mechanics 31, 417–457 (1999). [6] Huang, H. and Pan, J., "Speech pitch determination based on Hilbert-Huang transform," Signal Processing 86(4), 792–803 (2006). [7] Zakharov, V. P., Bratchenko, I. A., Belokonev, V. I., Kornilin, D. V. and Myakinin, O. O., “Complex optical characterization of mesh implants and encapsulation area,” J. Innov. Opt. Health Sci. 6(2), 1350007 (2013). [8] Myakinin, O. O., Kornilin, D. V., Bratchenko, I. A., Zakharov, V. P. and Khramov, A. G., “Noise reduction method for OCT images based on Empirical Mode Decomposition,” J. Innov. Opt. Health Sci. 6(2), 1350009 (2013). [9] Myakinin, O. O., Zakharov, V. P., Bratchenko, I. A., Kornilin, D. V. and Khramov, A. G., “A complex noise reduction method for improving visualization of SD-OCT skin biomedical images,” Proc. SPIE 9129, 91292Y, (2014). [10] Ahmed, M. U. and Mandic, D. P., “Image Fusion Based on Fast and Adaptive Bidimensional Empirical Mode Decomposition,” IEEE 13th Conference on Information Fusion, 1–6 (2010). [11] Damerval, C., Meignen, S. and Perrier, V., “A fast algorithm for bidimensional EMD,” IEEE Signal Processing Letters 12(10), 701–704 (2005). [12] Wielgus, M., Antoniewicz, A. and Putz, B., “Fast and Adaptive Bidimensional Empirical Mode Decomposition for the Real-time Video Fusion,” Proc. of 15th International Conference on Information Fusion, 649–654 (2012).
Proc. of SPIE Vol. 9217 921721-6 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 10/13/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx