surface reconstruction with wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf ·...

6
Surface reconstruction with Wavelet transformation Petra Balla * , P´ eter Kocsis * , Gy¨ orgy Eigner and ´ Akos Antal * * Department of Mechatronics, Optics and Mechanical Engineering Informatics, BUTE, Budapest, Hungary Email: [email protected], [email protected], [email protected] Research and Innovation Center of Obuda University, Physiological Controls Group, Obuda University, Budapest, Hungary Email: [email protected] Abstract—The development in computing power highlights some forgotten algorithms, which were neglected because of their complexity and slowness on early computers. One example is the Wavelet-Transformation Profilometry (WTP) of which successful application is demonstrated in the paper. WTP is a high level signal processing method using orthogonal algorithms for huge datasets. The high performance in quality and running speed makes the described method suitable for medical image processing applications. 1. I NTRODUCTION The performance of the computers increased significantly through the development of science that is why many of the mathematical methods had become available to restore the surface, like the Fourier-, G´ abor-, S-, Hilbert- or Wavelet- transform. The orthogonal trajectories act particularly impor- tant part from these, because they can be easily adapted to the environment and give accurate results. Further advantages are that the entire spatial analysis needs only one image and the accuracy can be significantly improved with the function of frequency if there are enough available pixels. The disadvantage is that the higher number of pixels means more calculation that is why the speed slows down, however it can be significantly reduced in the future [1]. Successful use of the Fourier-transform method was first published in 1982 by M. Takeda [2], [3], who used a one-dimensional procedure, but in 1986 a two-dimensional method has been successfully applied by Bone [4]. The paper is structured as follows: first, the regarding Fourier- and Wavelet-transformations are presented. After, the Wavelet-transformation profilometry is demonstrated. In Sec. 5 we present the test results. Finally, the development opportunities and the conclusion are coming. 2. USAGE OF FOURIER-TRANSFORM ANALYSIS The Fourier-Transform Analysis (FTA) has many applica- tion fields, including the field of image processing [5]. In order to restore a particular surface a reference sample (g 0 (x, y)) and the deformed surface (g(x, y)) are needed: g(x, y)= r(x, y) X n=-∞ A n e 2πf0x+(x,y) , g 0 (x, y)= r 0 (x, y) X n=-∞ A n e 2πf0x+0(x,y) , (1) where r(x, y) and r 0 (x, y)) are the concurrent component of the non-uniform reflections, A n is the weighting factor, f 0 is the carrier frequency, and ϕ(x, y) and ϕ 0 (x, y) are the value of the phase. The Fourier-transform of the resulting complex amount gives the spectrum, and the respective components can be determined by filtration. The phase difference between the modulated signal and reference signal can be calculated by using inverse Fourier-transform: ¯ g(x, y)= A 1 r(x, y)e 2πf0x+(x,y) , ¯ g 0 (x, y)= A 1 r 0 (x, y)e 2πf0x+0(x,y) . (2) The disadvantage of this process is that it breaks the signals into sinusoidal harmonics (as it can be seen on Fig. 1), that is why only frequency domain analysis may be carried out with it and the time (or dimensional in this case) analysis is not. This means that the Fourier-transform procedure has no temporal localization properties, so the place of the examined frequency component cannot be determined with the function of time. Because of the breakdown of the signal into horizontal waves, if the signal is changed in one place its Fourier-transform changes as well, thus the location of the changes cannot be determined. In addition, the disadvantage that signal analysis errors can occur because the overlapping over and above the counting is difficult because the sine and cosine functions and their long burst values should be calculated, which requires large computational resources. These errors can be fixed with the Wavelet-Transform Analysis (WTA) [6]. Figure 1: a) Square wave approximation, b) Saw tooth wave approximation, c) Triangle wave approximation 3. WAVELET-TRANSFORMATION ANALYSIS The WTA procedure is relatively new, though its founda- tions have been known at (since) the beginning of the 20th INES 2016 • 20th Jubilee IEEE International Conference on Intelligent Engineering Systems • June 30-July 2, 2016 • Budapest, Hungary – 201 – 978-1-5090-1216-9/16/$31.00 ©2016 IEEE

Upload: others

Post on 05-Nov-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Surface reconstruction with Wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf · The WTA procedure is relatively new, though its founda-tions have been known at (since)

Surface reconstruction with Wavelet transformationPetra Balla∗, Peter Kocsis∗, Gyorgy Eigner† and Akos Antal∗

∗Department of Mechatronics, Optics and Mechanical Engineering Informatics,BUTE, Budapest, Hungary

Email: [email protected], [email protected], [email protected]†Research and Innovation Center of Obuda University,

Physiological Controls Group, Obuda University, Budapest, HungaryEmail: [email protected]

Abstract—The development in computing power highlightssome forgotten algorithms, which were neglected because oftheir complexity and slowness on early computers. One exampleis the Wavelet-Transformation Profilometry (WTP) of whichsuccessful application is demonstrated in the paper. WTP is ahigh level signal processing method using orthogonal algorithmsfor huge datasets. The high performance in quality and runningspeed makes the described method suitable for medical imageprocessing applications.

1. INTRODUCTION

The performance of the computers increased significantlythrough the development of science that is why many of themathematical methods had become available to restore thesurface, like the Fourier-, Gabor-, S-, Hilbert- or Wavelet-transform. The orthogonal trajectories act particularly impor-tant part from these, because they can be easily adapted tothe environment and give accurate results. Further advantagesare that the entire spatial analysis needs only one imageand the accuracy can be significantly improved with thefunction of frequency if there are enough available pixels. Thedisadvantage is that the higher number of pixels means morecalculation that is why the speed slows down, however it canbe significantly reduced in the future [1]. Successful use ofthe Fourier-transform method was first published in 1982 byM. Takeda [2], [3], who used a one-dimensional procedure,but in 1986 a two-dimensional method has been successfullyapplied by Bone [4]. The paper is structured as follows:first, the regarding Fourier- and Wavelet-transformations arepresented. After, the Wavelet-transformation profilometry isdemonstrated. In Sec. 5 we present the test results. Finally,the development opportunities and the conclusion are coming.

2. USAGE OF FOURIER-TRANSFORM ANALYSIS

The Fourier-Transform Analysis (FTA) has many applica-tion fields, including the field of image processing [5]. In orderto restore a particular surface a reference sample (g0(x, y))and the deformed surface (g(x, y)) are needed:

g(x, y) = r(x, y)∞∑

n=−∞Ane

2πf0x+nϕ(x,y) ,

g0(x, y) = r0(x, y)∞∑

n=−∞Ane

2πf0x+nϕ0(x,y) ,

(1)

where r(x, y) and r0(x, y)) are the concurrent componentof the non-uniform reflections, An is the weighting factor, f0is the carrier frequency, and ϕ(x, y) and ϕ0(x, y) are the valueof the phase. The Fourier-transform of the resulting complexamount gives the spectrum, and the respective components canbe determined by filtration. The phase difference between themodulated signal and reference signal can be calculated byusing inverse Fourier-transform:

g(x, y) = A1r(x, y)e2πf0x+nϕ(x,y) ,g0(x, y) = A1r0(x, y)e2πf0x+nϕ0(x,y) .

(2)

The disadvantage of this process is that it breaks the signalsinto sinusoidal harmonics (as it can be seen on Fig. 1), that iswhy only frequency domain analysis may be carried out with itand the time (or dimensional in this case) analysis is not. Thismeans that the Fourier-transform procedure has no temporallocalization properties, so the place of the examined frequencycomponent cannot be determined with the function of time.Because of the breakdown of the signal into horizontal waves,if the signal is changed in one place its Fourier-transformchanges as well, thus the location of the changes cannot bedetermined. In addition, the disadvantage that signal analysiserrors can occur because the overlapping over and above thecounting is difficult because the sine and cosine functions andtheir long burst values should be calculated, which requireslarge computational resources. These errors can be fixed withthe Wavelet-Transform Analysis (WTA) [6].

Figure 1: a) Square wave approximation, b) Saw tooth waveapproximation, c) Triangle wave approximation

3. WAVELET-TRANSFORMATION ANALYSIS

The WTA procedure is relatively new, though its founda-tions have been known at (since) the beginning of the 20th

INES 2016 • 20th Jubilee IEEE International Conference on Intelligent Engineering Systems • June 30-July 2, 2016 • Budapest, Hungary

– 201 –978-1-5090-1216-9/16/$31.00 ©2016 IEEE

Page 2: Surface reconstruction with Wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf · The WTA procedure is relatively new, though its founda-tions have been known at (since)

century. Although it did not promise much success, thanks toMeyer’s and Mallatt’s work [5], [7] from late 1980s and early1990s the research of the wavelets and the further developmentof the older methods have begun on international level. Theadvantage is that the WTA is a spectral resolution process,which is not sinusoidal anymore, but divides the signal into theso-called mother wavelets. These wavelet signals have limitedlength with a mean value of zero. Thanks to them, we cancorrect the errors of the FTA, because the time analysis - inthis case spatial analysis - is also feasible with it.

A. Main properties

The common property of the WTA and FTA is that bothmethods measure the similarity between the signal under testand a test function and uses internal multiplying mathematicaltools. This can be written as < u, v >= |u||v|cosθ, where ifu and v is a unit, then the cosine of the angle between themdetermines the result, so it is limited into the [−1, 1] interval.This means that in the analysis u will be the signal undertest and v will be the test function. As it was mentioned, thedifference between the two procedures is the test function,which represents the recoverable information. In the case ofFTA the harmonics of the sine function are regular and smooth,while in case of WTA they are irregular and asymmetric, sothe sharp and sudden changes of the signal can be detectedeasier [8]. The compressions and stretching of the functionis called scaling. Our main goal is to measure the similaritybetween the two functions, which is accomplished with a two-variable equation for the wavelets, using positions and scales.For the three-dimensional profilometry using complex mother-wavelets is needed, when the wavelet transform is a complexfunction of the scale and position. The mentioned mother-wavelets generally classified into families which are the basisfor the most common grouping. The basis-function of theWavelet-transformation has to be a compressed and shiftedversion of a base-wavelet and the following correlations haveto be correct, where ψ(t) is the wavelet-function:∫ ∞

−∞ψ(t)dt . (3)

Here, ψ(ω) = 0 if ω = 0, where ψ(ω) is the Fourier-transform of the wavelet-function. The most important typesof them from our application point of view are available inthe MATLAB software and we used these in this study:• Complex Gaussian

ψGaussian(x) =d(Cp exp(−ix) exp(−x2))p

dxp, (4)

• Shannon

ψShannon(x) =√fb exp(2πifcx)(sinc(fbx)) , (5)

• Frequency B-spline

ψb−spline(x) =√fb exp(2πifcx)

(sinc

(fbx

m

)),

(6)

• Complex Morlet

ψMorlet(x) =1

(f2b π)1/4exp(2πifcx) exp

(− x2

2f2b

).

(7)The value of the compression (a) and the shifting (τ)

defines a two variable function, which can be prescribed as

F (a, τ) =1√a

∫f(t)ψ

t− τa

dt , (8)

where ψ(t) is the wavelet-function,1√aψt− τa

the basis-

function of the transformation, and F (a, τ) is the wavelettransformation itself.

4. WAVELET-TRANSFORMATION PROFILOMETRY

In the field of Wavelet-Transformation Profilometry (WTP)we can distinguish one- and two dimensional methods butthe experience shows that the former one is more useful. Inthis case a line of pixels of a given image are analyzed, andthen repeated for each row. After the detection of the phasea demodulation method follows it, which is performed withphase-evaluation technique when we can perform the evalua-tion with arcus tangent operations. The generated patterns canbe prepared by appropriate modification of a sine wave, sothe generated phase pattern can be written as the followingequation:

f(x, y) = a(x, y) + b(x, y)cos(2πf0x+ ϕ(x, y)) . (9)

In (9) a(x, y) is the back-light, b(x, y) is the amplitude ofthe bars, f0 is the spatial carrier frequency and ϕ(x, y) is thephase modulation of the bars. The one-dimensional continuouswavelet transformation on the test signal creates a complexarray, which modulus and phase can be determined with

abs(a, τ) = |W (a, τ)| ,

ϕ(a, τ) = tan−1Im(W (a, τ))

Re(W (a, τ)),

(10)

where Im(W (a, τ)) is the imaginary part and Re(W (a, τ))is the real part of the transformation. After this procedure weused a direct maximum method [9] to evaluate the phase andmodulus of every pixel, but this phase map is characterized bytears. That is why necessary to use an unwrapping algorithm[10], which aims to improve or even stop the discontinuityof the signal. The unwrapped phase map is now possible touse (can now be used) for depth information extraction withrelative coordinates. In this case we determined the depthvalues of the pixels (h(x, y)) compared to a defined referenceplane. To do that, we needed the phase of the transmittedsignal, which can be calculated by ∆φ(x) = φ(x) − 2πf0x.This can be further formed to be able to evaluate h(x, y)parameter as well [11]:

∆φ(x, y) = −2πf0h(x, y)d

l0 − h(x, y). (11)

P. Balla et al. • Surface Reconstruction with Wavelet Transformation

– 202 –

Page 3: Surface reconstruction with Wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf · The WTA procedure is relatively new, though its founda-tions have been known at (since)

If we accept the assumption that the relative distancebetween the camera and projector is negligibly small comparedto the distance from the surface (l0 >> d) the equation issimplified and modifying it we can obtain the equation for thedepth information [12]:

h(x, y) = −∆φ(x, y)l0

2πf0d. (12)

For example in case of a given application, when ϕ(x, y) isconstrained to its principal value, either the interval (−π, π]or [0, 2π), it is called wrapped phase. Otherwise it is calledunwrapped phase. These can be seen on Fig. 2.

Figure 2: a and c: Wrapped phase; b and d: Unwrapped phase[11]

5. TEST FRAMEWORK

A. Capturing the image

For this method three important parts are needed:• Projector,• Camera,• The object.Two types of projectors were tried, both had advantage and

disadvantage as well. The first was a digital one, controlled bya computer, therefore sinus wave with any frequency could tobe projected. It had very good color depth, although it couldnot project real black. That is why the second was an old-time, analog one. With the help of this, we could project sinuswaves in two frequencies – only these are in a slide image.It had real good black parts, however, the color of the bulbwas yellowish. Due to this effect the amplitude of the waveof the tested picture becomes lower. That is why we usedthe first one, because the picture made with it contains moreinformation about the surface. The camera was a Canon 350DDS126071 No.1130601174, the lens was Canon Zoom Lens

EF-S 18-55.For the tested object we choose a loupe, measured its radiuswith a three-ball spherometer, then we painted it to white. Itwas necessary because the WTP works only in non-reflectingsurfaces. The test object can be seen on Fig. 3.

Figure 3: The captured picture

B. Transformation method

In order to realize and test the necessary algorithms, wehave chosen the Matlab software, because it has one ofthe highest speeds in mathematical calculations and built-inwavelet families.Fig. 4 shows the initial image, which was captured from thesurface of the object (it can be compared with the centralregion of the sample object on Fig. 3).After loading the image we have to ensure that the picturecan be transformed into arithmetical progression. After thatthe method can be started: choosing the mother wavelet andthe level of the WT, we transform each row of the picture, usea maximum ridge search and unwrap the phase. To reconstructthe surface we need to extract a reference from the generatedone. For this process another picture about a flat surface wasused, but in our case we decided to create an artificial one.To do that, two important information were needed:

1) The frequency of the projected sinus wave, which isknown

2) To be sure that the center of the loupe is in the centerof the cut picture

After using the l0/(2πf0d) multiplier on the generated onewe have to set X and Y direction multiplier for the artificialone. In the result the parallel edges of the reconstructed surfacehas to be in the same value. For the evaluation we cut themiddle line and searched its radius.

INES 2016 • 20th Jubilee IEEE International Conference on Intelligent Engineering Systems • June 30-July 2, 2016 • Budapest, Hungary

– 203 –

Page 4: Surface reconstruction with Wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf · The WTA procedure is relatively new, though its founda-tions have been known at (since)

Figure 4: Ready for processing image

C. Results

The radius of the test object (a usual loupe, which waspainted to white) was measured with a three-ball spherometer,and got it as 390,418 mm. Since, it is a symmetrical object,we assumed that radius is the same in every directions (themanufacturing errors were neglected).The goal was from this point to find that methods (from theabove listed ones), which is the most appropriate to provide thesame result. We tried each applications (Complex Gaussian,Complex Shannon, Frequency B-spline and Complex Morlet),with different tuning parameters.The process was the following: first, the surface reconstruc-tions were produced. After the surface reconstruction, we wereable to measure the radius in vertical (Ry) and horizontal (Rx)directions. The results of the tests are shown in Table I-IV:

Table I: X and Y direction radius with Complex MorletWaveletes

fb − fcCMOR 1-0.1 1-0.5 1-1 1-1.5

Rx 402.5 421.3 386.6 106.9Ry 9.7 100 206.4 46.7

The best result with the Complex Morley algorithm(386.6mm, error: 0.9977%) was occurred, when the tuningparameters fb and fc were equal to 1 − 1, respectively.However, the algorithm only produces close to the originalradius values in the vertical (Rx) directions.

Table II: X and Y direction radius with Complex fb-splineWaveletes

fb −m− fc

FBSP 1-1-0.5

1-1-1

1-1-1.5

2-1-0.1

2-1-0.5

2-1-1

2-1-1.5

Rx 673.1 375.4 153.5 44125.3 302.7 385.7 107.4Ry 19.7 231.4 25.7 103.7 219.9 223.8 39.9

1.2% was the smallest error (at 385.7mm), which can bereached with the application of Frequency B-spline methodwith the fb = 2,m = 1, fc = 1 parameter set. However, thealgorithm produces various results with high dispersion in thedifferent directions, when the tuning parameters were changed.

Table III: X and Y direction radius with Complex ShannonWaveletes

fb − fc

SHAN 1-0.1

1-0.5 1-1 1-

1.5 2-3

Rx 450.4 673.2 375.4 153.5 64.2Ry 53.2 19.7 231.4 25.7 12.3

The Complex Shannon method produced the highest errorin the radius in both directions. The only assessable resultwas with fb = 1 and fc = 1 parameters, however, the errorwas around 3.14% (at 375.4mm). We found that the producedresults in the Ry direction were useless - each of them wassignificantly different then the original radius.

Table IV: X and Y direction radius with Complex GaussianWaveletes

pCGAU 1 2 3 4 5 6 7 8

Rx 353.1 277.8 393 339.9 378.4 346.6 376.8 346.5Ry 204.5 209.6 215.3 222.5 227.8 229.9 225.2 217

It can be seen, that the Complex Gauss method providedthe best results in the Rx direction. The radius values aremore precise, than in other cases with several parameter sets.We got the best match with p = 3 (a third ordered Gaussmethod), which means 0.28% error. The radius values in theY direction were the closest in this case, however, the errorswere intolerable high.We found that, the waviness and disturbance effects of thecaptured picture (as it can be seen on Fig. 5) make the preciseoperation of the algorithms inaccurate. The solution can bean other filtering (smoothing) method - however, we did notapply such kind of application, yet.From our goals point of view, namely, to try which is thebest algorithm which can provide the best approximated radiusdata the experiments were successful. We was able to recover(approximately) the radius value with small error with everyalgorithm. Due to the fact, that the test object was symmet-rical, a one direction equivalence is enough to estimate the

P. Balla et al. • Surface Reconstruction with Wavelet Transformation

– 204 –

Page 5: Surface reconstruction with Wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf · The WTA procedure is relatively new, though its founda-tions have been known at (since)

approximate radius value.Fig. 6 represents the best matched reconstructed radius (be-longs to the Complex Gaussian algorithm, with p = 3). As itcan see, the waviness - at least in the Rx direction - is almostinvisible and we have got a clear result.

Figure 5: Reconstructed surface

Figure 6: Tested radius

6. DEVELOPMENT OPPORTUNITIES

First of all we are working on terminating the waving.There are already some methods for this, but all of themreduced the other direction accuracy. After we reach a suitablepreciseness we would like to use it in biomechatronics tasks,like measuring the spinal curvature, which is now a quicklydeveloping research of our University [13], [14].

7. CONCLUSION

In this paper we successfully applied the WTP in surfaceidentification. According to our results in this example theComplex Gaussian wavelet proved to be the best solution,however for the complete statement further examinations areneeded. If our further results are as appropriate as these, we

are going to try to use this method by real examinations aswell. Medical application could be our target area, especiallythe field of spinal deformations, where our group has also en-couraging outcomes using other optical measurement methods.

ACKNOWLEDGMENT

Gy. Eigner acknowledge the support of the Robotics Spe-cial College of Obuda University and the Doctoral Schoolof Applied Informatics and Applied Mathematics of ObudaUniversity. The research was also supported by the Researchand Innovation Center of Obuda University.

REFERENCES

[1] R.M. Aciu and H. Ciocarlie, “Runtime Translation of the Java Bytecodeto OpenCL and GPU Execution of the Resulted Code,” ACTA Pol Hung,vol. 13, no. 3, pp. 25 – 44, 2016.

[2] M. Takeda, H. Ina, and S. Kobayashi, “Fourier-Transform Method ofFringe-Pattern Analysis for Computer-Based Topography and Interfer-ometry,” J Opt Soc Am, vol. 72, no. 1, pp. 156 – 160, 1982.

[3] M. Takeda, K. Mutoh, and S. Kobayashi, “Fourier-Transform Profilome-try for the Automatic-Measurement of 3-D Object Shapes,” Appl Optics,vol. 22, no. 24, pp. 3977 – 3982, 1983.

[4] D.J. Bone, H.A. Bachor, and R.J. Sandeman, “Fringe-Pattern AnalysisUsing a 2-D Fourier-Transform,” Appl Optics, vol. 25, no. 10, pp. 1653– 1660, 1986.

[5] S.G. Mallat, “A theory for multiresolution signal decomposition: Thewavelet representation,” University of Pennsylvania, Tech. Rep., 1987.

[6] A.Z. Abid, M.A. Gdeisat, D.R. Burton, and M.J. Lalor, “Ridge extrac-tion algorithms for one-dimensional continuous wavelet transform: acomparison,” Journal of Physics - Conference Series, vol. 76, no. 1, pp.1 – 7, 2007.

[7] Y. Meyer, Wavelets, Algorithms & Applications, 1st ed. Philadelphiam,USA: SIAM, 1993.

[8] P. Hariharan, Basics of Interferometry, 2nd ed. San Diego, USA:Academic Press, 2007.

[9] A.Z. Abid, M.A. Gdeisat, D.R. Burton, and M.J. Lalor. (2016) A com-parison between wavelet fringe analysis algorithms. [Online]. Available:photon06archive.iopconfs.org/FASIG%203%20Wed%2016.30.doc

[10] A. Rene, W.L.H. Carmona, and T. Brun, “Characterization of Signalsby the Ridges of Their Wavelet Transforms,” IEEE T Signal Proces,vol. 45, no. 10, pp. 2586 – 2590, 1997.

[11] R. Talebi, J. Johnson, and A. Abdel-Daye, “Binary code pattern un-wrapping technique on fringe projection method,” in Proceedings of the17th International Conference on Image Processing, Computer Vision,& Pattern Recognition (IPCV’13), p. P7.

[12] Z. Zhang and J. Zhong, “Applicability analysis of wavelet- transformprofilometry,” Opt Express, vol. 21, pp. 18 777 – 18 796, 2013.

[13] P. Balla, G. Manhertz, and A. Akos, “Diagnostic moire image evaluationin spinal deformities - accepted for publication,” Opt Appl, vol. 46, no. 4.

[14] P. Balla, K. Prommer, and A. Akos, “Investigation of digital Moire pic-tures for follow-up of patients with spinal deformities (in Hungarian),”Biomechanica Hungarica, vol. 7, no. 1, pp. 50 – 60, 2016.

INES 2016 • 20th Jubilee IEEE International Conference on Intelligent Engineering Systems • June 30-July 2, 2016 • Budapest, Hungary

– 205 –

Page 6: Surface reconstruction with Wavelet transformationphyscon.uni-obuda.hu/cikkek/35_ines2016.pdf · The WTA procedure is relatively new, though its founda-tions have been known at (since)

P. Balla et al. • Surface Reconstruction with Wavelet Transformation

– 206 –