Strojniški vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 © 2015 Journal of Mechanical Engineering. All rights reserved. D0l:10.5545/sv-jme.2015.2424 Original Scientific Paper Received for review: 2015-01-13 Received revised form: 2015-03-12 Accepted for publication: 2015-03-13 Handheld Optical System for Skin Topography Measurement Using Fourier Transform Profilometry Jernej Lalos* - Marko Mrak - Urban Pavlovcic - Matija Jezersek University of Ljubljana, Faculty of Mechanical Engineering, Slovenia In medicine and cosmetics a need has arisen for an accurate, fast, simple and broadly applicable three-dimensional skin surface measuring system. A new development of such handheld optical device that uses white light Fourier transform profilometry for skin surface topography measurement is presented here. The device is based on a commercially available DSLR camera and a newly designed optical system which projects a Ronchi grating pattern on the measured surface and records its image. The 3D surface is reconstructed from a single image. The topography is described using four surface roughness parameters: mean absolute deviation Ra, root-mean-square deviation Rq skewness Rsk and kurtosis Rku. Experimental measurements were conducted on five facial skin areas, together belonging to three people, before and after the laser skin treatment therapy, to evaluate its effects on skin surface roughness. The results show the viability and usefulness of the developed optical system for skin topography measurement. Keywords: Fourier transform profilometry, optical triangulation, skin topography, surface roughness parameters Highlights • A new handheld optical skin surface topography measuring system has been developed. • The device is based on a DSLR camera with a newly designed flash light grating projector and image recording optics. • The Fourier transform profilometry method is used for surface topography measurements. • Surface topography is measured and reconstructed quickly and accurately from a single image. • The surface roughness parameters are used to show the effects of laser skin treatment therapy on several people. 0 INTRODUCTION Until recently, skin surface evaluations were done visually with no universally consistent measuring procedure. One example of this requires standardized digital photographs of the skin to be taken and visually assessed by experienced professionals [1]. In dermatology and cosmetics a need has arisen for an accurate, fast, broadly applicable, simple and cheap in-vivo skin surface measuring system. This kind of optical device would provide accurate and consistent information about the skin surface topography and colour. Its most significant new feature would be the introduction of depth measurement without any contact or invasive procedure. Indeed great advancements have been made in skin surface measuring techniques and in the development of such systems and devices. The most practical and therefore most widely used technique for in-vivo skin surface analysis is fringe projection areal topography [2]. It is done by projecting a fringe pattern onto the measured surface and recording its image. The image is then processed by special computer software which calculates the topography of the surface [3]. Many commercial 3D skin surface measuring systems have been invented, some examples of which can be found in the literature: handheld skin surface measuring device [4], handheld body scanner [5], stationary face measuring device [6], to name a few. Most of these use non-coherent light sources, mainly light emitting diodes (LED). They operate with precision from 0.05 mm to 0.5 mm in ranges from 18 mm x 13 mm x 10 mm to 380 mm x 380 mm x 250 mm with data acquisition times from 0.001 s to 0.1 s. Some experimental skin topography measuring systems may be different from commercial ones. They may use a flashtube as a light source [7], for example. Such devices can be used in medicine to study wounds [8]. A similar principle can also be used in three dimensional foot shape measurements [9], chest wall monitoring during breathing [10], head-to-trunk orientation determination [11] and the study of tissue ablation depths during laser treatments [12]. Similar devices are used for measuring numerous types of objects in science and industry where their adverse health and safety effects are not of concern [13]. This article presents a new optical system that uses the Fourier transform profilometry method [14] for skin surface topography measurement. It was developed primarily for precise and objective monitoring of the skin surface appearance after various laser based skin treatments [15]. In the interest of simplicity, accessibility and cost-effectiveness, this skin topography measuring system *Corr. Author's Address: University of Ljubljana, Faculty of Mechanical Engineering, Aškerčeva 6, 1000 Ljubljana, Slovenia, jernej.lalos@fs.uni-lj.si 285 Strojniski vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 was to be constructed out of as many commercially available products as possible. It was chosen to be based on a digital single-lens reflex (DSLR) camera with a non-coherent flashtube light source around which a camera-specific optical system was to be constructed. 1 FOURIER TRANSFORM PROFILOMETRY Fourier transform profilometry is a type of fringe projection areal topography method in which the Fourier series expansion and Fourier transform of a single line grating pattern image are used together with optical triangulation to determine the topography of the measured surface [14]. The basics of crossed-optical-axes-with-parallel-optical-planes geometry is presented in Fig. 1. In this setup, the optical axes of the projector lens and camera lens intersect at a certain point. At that same time their respective optical planes coincide as well and they effectively form one single plane. This is useful because it ensures the proper orthogonal grating pattern projection without unnecessary distortions. projector measured surface Fig. 1. Basic element setup in crossed-optical-axes-with-parallel-optical-planes geometry The coincidence of both planes is achieved by using the Scheimpflug principle [16]. It determines at what angle 6 an object plane transmitted through a lens with magnification Mp has to be tilted in order to produce an image plane tilted at an angle a0 relative to the normal plane in the other direction: tan(0) = -^tan(ao). Mp (1) Therefore, the projection grating has to be tilted at the angle 6 before it can be properly projected. The spatial period of the line grating is p0. However, when it is projected through a projector lens with a magnification Mp the projected grating pattern period becomes p = Mpp0 which makes its projected spatial frequency = 1 /p. Fig. 2 shows the principles of this kind of optical setup. The optical axes of the projector and camera lenses intersect at point O at angle a0 and their optical planes coincide in plane I. It lies at a distance l0 away from the camera lens and is perpendicular to its optical axis. A point H(x, y) on the measured object's surface is in the focus of interest. U v S GX O H(x, y) Fig. 2. Optical schematics in crossed-optical-axes-with-parallel-optical-planes geometry; H(x, y) is a point of interest on the object surface; the optical axes of the projector lens (P) and the camera lens (C) intersect at point O and their optical planes coincide in plane I; (S) represents the camera sensor and (G) the projection grating A measurement takes the form of a recorded image of a grating pattern projected onto a measured surface. Such an image can be interpreted as multiple rows of light intensity signals modulated in phase >(x,y) and amplitude r(x,y) with the main spatial carrier frequency of £p. This kind of light intensity signal of a single row, as shown in Fig. 3 a, can be expanded into the Fourier series in the x dimension which is perpendicular to the grating lines orientation: g(x, y) = r(x, y) X A«e' i (2nÇpx+$( x, y )) (2) Here, r(x, y) represents the light distribution on the diffuse surface, $(x, y) the phase shift and the An a Fourier coefficient. n=—co 286 Lalos, J. - Mrak, M. - Pavlovcic, U. - Jezersek, M. Strojniski vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 The Fourier series expansion from Eq. (2) is then Fourier transformed and filtered. The Fourier transform is performed only in the x direction, perpendicular to the orientation of the grating lines, while y is kept fixed. Frequency filtering filters out all frequencies except the fundamental one ;p and some of its closest neighbours. A Hanning window function centred at ;p is used [17]. Width w of the window function has to be carefully chosen - too wide and the signal may carry too much noise; too narrow and it may lose the sharp edge and discontinuity details [7]. Original spatial frequency distribution and its filtering is shown in Fig. 3b. The filtered Fourier transform is inversely Fourier transformed back to a complex signal: g ( x, y) = A r ( x, y) e i(2n%pX+$( x, y )) (3) The argument of this complex signal @(x, y) = In^pX + ^(x, y) contains phase shift information ^(x, y) and has to be expressed: 0( x, y) = arctan g( x y) g( x y) (4) This kind of calculation gives principal values of the argument wrapped into an interval of [-n, n]. This creates discontinuity phase jumps of 2n for variations greater than 2n, as shown in Fig. 3c. Therefore, a phase unwrapping algorithm is necessary in order to reconstruct the correct continuous phase distribution. The one used here is two-dimensional and is presented in the literature [18]. This algorithm provides an optimal balance between quality and speed as it is designed to give priority to pixels with a higher reliability in order to prevent error propagation. Once phase @(x,y) is obtained, trigonometry is used to determine the spatial coordinates of a surface point H(x,y). The coordinates x and y are calculated from their respective pixel positions on the camera sensor u and v. Coordinate z(x,y), however, is calculated from: z( x y) = l tan(a(x, y)) -12 u - tan(a(x, y)) where and a( x, y) = a0 + arctan(ß( x, y)), x, y)=dp Sp ¿KSp (5) (6) (7) Here, dg is a half-width of the grating and sp is its mean distance from the projector lens. Further details can be found in the literature [19] and [20]. I 1.0 0.8 0.6 0.4 0.2 0.0 -0.2 a) 0 50 100 150 200 250 300 350 400 pixel index b) 0 0 140 120 100 80 60 40 20 0 f 200 Sp 400 600 c) 800 1000 0 50 100 150 200 250 300 350 400 pixel index Fig. 3. Typical processing signals of Fourier transform profilometry method; a) light intensity signal g(x, y) segment of one pixel row of the grating image taken before (black) and after frequency filtering (grey); b) spatial frequency distribution of the first signal (grey) and the window function for frequency filtering (black); c) phase 0(x, y) of the first signal in the wrapped (black) and unwrapped (grey) state 2 MEASURING SYSTEM The core of this skin topography measuring system is a custom-made handheld device based on a commercially available DSLR camera with its built-in flash as a light source to which other optical components are added. The whole system is shown in Fig. 4 and its most important optical dimensions are shown in Fig. 5. The structural body (B) is made out of a solid plastic block and has the function of rigidly holding the camera lens, the projector lens, the object spacer and the camera in precise relative positions to each other. Handheld Optical System for Skin Topography Measurement Using Fourier Transform Profilometry 287 Strojniski vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 G Fig. 4. Handheld optical system for skin topography measurement-IB) structural body, (S) camera, (F) popup flash, (C) camera lens, (P) projector lens, (G) projection grating, (L) object spacer 240 Fig. 5. Schematics of the system's significant optical measurements in mm and degrees: (S) camera sensor, (C) camera lens, (P) projector lens, (G) projection grating, (I) main coincidental plane The camera (S) used here is Nikon D90 DSLR camera [21]. Its image sensor is a complementary metal-oxide-semiconductor (CMOS) active pixel sensor of Nikon DX format with dimensions of 23.6 mm x 15.8 mm. It has approximately 12.3 effective megapixels arranged in a 4288 x 2848 array. The camera has a sensitivity from 200 up to 3200 according to the International Organization for Standardization (ISO) standard [22]. It is attached to the structural body behind the camera lens on the same optical axis using a Samyang's lens mount adapter for T2 Lenses on a Nikon F mount. The built-in pop-up flash (F) produces short white light projection illumination. When open, it is in line with the projector lens and projection grating. The camera lens (C) is positioned at the base of the structural body and in line with the camera sensor and object spacer. It is an Edmund Optics' #32724 MgF2 coated achromatic doublet lens with an effective focal length of fc = 60 mm and an overall diameter of dc = 25.0 mm. The camera lens setup has a designed optical magnification of Mc = 1.0, as seen on Fig. 5. Its diaphragm is positioned at ac = 20 mm behind the doublet. The projector lens (P) is similar in design to the camera lens. It is positioned above the camera lens at an angle a0 = 22.6° against it and in line with the projection grating and flash. The lens is an Edmund Optics' #45-136 MgF2 coated achromatic doublet lens with an effective focal length of fp = 45 mm and a diameter of dp = 12.5 mm. The projector lens setup was designed to have an optical magnification of Mp = 2.5. The diaphragm of the projector lens is positioned at ap = 20 mm behind the doublet. The projection grating (G) is a horizontal line pattern Ronchi grating. The Edmund Optics' #58-776 1"x1" (10 lp/mm) Ronchi ruling with a pattern period of p0 = 0.1 mm was used. It sits in the object plane of the projector lens between the lens and the flash and in line with them. The grating is inclined towards the projector lens at an angle 0 = 9.45° in accordance with the Scheimpflug principle so that its projected image falls correctly on the measured object. The object spacer (L) is an open half-tube attached to the structural frame in line with the camera lens. Its open end is meant to lean against the measured object - skin in this case. The length of the spacer is chosen such that the distance between the open end of the spacer and the camera lens doublet is equal to the designed object plane distance of the camera lens l0 = 120 mm, thus making the measured area lie in the object plane of the camera lens and in the image plane of the projector lens (I). The whole optical device weighs 1500 g and measures 270 mm x 135 mm x 160 mm overall. It is robust, light and compact, making it convenient to be used as a portable handheld device. Experimentally it was found that the flash powered with half of its maximum power provides an appropriate lighting for the purposes of Fourier transform profilometry. Due to a relatively short duration of flash illumination compared to the exposure time, the best possible setting is a shutter speed of 1/200 s at an ISO sensitivity of 200. Special computer software was developed for the processing of the images. Its code was written in Visual C++ with the aid of the OpenCV and OpenGL libraries. In a few seconds the software analyses the image using the Fourier transform profilometry method. With it, each pixel row is transformed and filtered separately. The pixel rows are then combined into an array for the phase unwrapping and final calculations. This entire process determines the spatial positions of a large number of discrete points on the measured surface - as described in Section 1. S 286 Lalos, J. - Mrak, M. - Pavlovcic, U. - Jezersek, M. Strojniski vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 The calibration of the measuring system and corresponding computer software was done using a precisely manufactured reference surface with a known geometry which was measured at incremental distances between 115.5 mm and 125.5 mm from the camera lens. The captured images were imported into the software for the transformation parameter optimization. The parameters were optimized using the Powell's conjugate gradient descent method. This resulted in the standard deviation between the measurements and the reference surface being 0.05 mm. Further information about such a calibration can be found in the literature [7]. This optical system has an effective measuring range of 24 mm x 15 mm x 7 mm in which a precision of 0.05 mm is achieved. The computer software provides data about the position of the discrete points (xj,yj, z ) on the surface of the measured object which correspond to each pixel in a rectangular grid of the camera sensor. The most interesting aspect of these data for the purposes of surface roughness determination is of course the vertical component in relation to its planar position zj(xj, yj). A topography analysis of the measured surfaces is made using four surface roughness parameters: the mean absolute deviation Ra, the root-mean-square deviation Rq, the skewness Rsk and kurtosis Rku [23]. In order to calculate these parameters, discrete reference points of a smooth reference plane had to be determined as an average value of all the measured points which lie in the neighbourhood of the corresponding measured point. 3 MEASUREMENTS For experimental purposes, five facial skin areas, together belonging to three people, were measured. Thus the areas A1 and A2 belong to person A, areas B1 and B2 belong to person B and area C1 belongs to person C. Each skin surface area was measured twice - before and after the laser skin treatment therapy. While the purpose of this therapy was to smooth the skin, its effects were measured and evaluated here. To provide a better diffuse reflection of light and a higher line pattern contrast on the semi-translucent and non-homogeneous skin surface, face powder was applied to the measured areas. Three-dimensional skin surface reconstructions from the captured images of the selected samples B2Be (before the therapy) and B2Af (after the therapy) are shown in Fig. 6. Fig. 6. Experimentally measured areas of person B's facial skin (top) and three-dimensional skin surface reconstructions from the measurements of the area B2, before (sample B2Be) and after (sample B2Af) laser skin treatment therapy The surface roughness parameters were calculated from the measured data points. For the establishment of reference plane points, the neighbourhood Oj was chosen in the shape of an octagon with a diagonal of 2 mm. The calculated surface roughness parameters for each of the measured samples are presented in Table 1. Table 1. The calculated surface roughness parameters for the measured skin samples before (index .Be) and after (index .Af) the laser skin treatment therapy and the relative changes A in their absolute values; the parameters are: the mean absolute deviation Ra, the root-mean-square deviation Rq, the skewness Rsk and kurtosis Rku; X represents the average value for all the samples and ax their standard deviation Ra.Be [^m] R, aAf [^m] ARa [%] Rq.Be [^m] RqAf [^m] ARq [%] Rsk.Be Rsk.Af ARsk [%] Rku.Be RkuAf ARku [%] A1 92.6 75.2 -18.8 122.6 101.6 -17.1 —1.32 —1.17 -11.4 1.96 3.00 53.5 A2 93.5 70.0 -25.1 134.0 99.9 25.4 —1.65 —1.77 7.3 3.59 3.85 7.4 B1 51.5 48.9 -5.0 62.3 58.8 -5.6 -0.51 -0.60 18.5 -0.44 -0.56 28.0 B2 54.1 30.8 -43.1 69.3 39.7 -42.7 -1.20 -0.21 -82.6 1.14 0.06 -94.7 C1 53.6 60.9 13.6 71.0 78.9 11.1 -0.46 -1.38 201.0 1.08 0.91 -15.8 x 69.1 57.2 -15.7 91.8 75.8 -16.0 -1.03 -1.03 26.6 1.46 1.45 -4.3 21.9 17.8 21.3 33.7 26.7 20.3 0.52 0.62 105.3 1.47 1.90 56.6 Handheld Optical System for Skin Topography Measurement Using Fourier Transform Profilometry 287 Strojniski vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 These statistically calculated surface roughness parameters show that most of the facial skin samples in general have a mean absolute deviation Ra between 45 ^m and 80 ^m and a root-mean-square deviation Rq between 55 ^m and 110 ^m. The parameters also show that the skin samples have low peaks and deep valleys (Rsk < 0) and that, for the most part, those peaks and valleys are relatively pointed (Rku > 0). Regarding the laser skin treatment therapy and its effect on skin surface roughness, it can be clearly seen from Table 1 that almost all of the samples measured after the therapy have lower parameters Ra and Rq compared to those measured before the therapy. This would suggest that the skin is indeed less rough after the therapy. However, the comparison of the parameters Rsk and Rku before and after the therapy from all the samples together is quite inconclusive. 4 CONCLUSIONS The measurement principle and design of a new optical three-dimensional skin topography measurement system is described. Its measuring range is 24 mm x 15 mm x 7 mm and its precision is 0.05 mm. Its small size, light weight, as well as its design and shape make it compact and easy-handling - a very convenient portable handheld device. In-vivo measurements and their analyses are done quickly and precisely. The surface roughness parameters provide a simple way to quantify the surface roughness information of a skin sample. They help compare the surface roughness of different samples or that of a single sample at different times and circumstances. Here, the mean deviation Ra and the root-mean square deviation Rq parameters show a noticeable reduction in the height and depth of the skin profile after the laser skin treatment in almost all samples. 5 AKNOWLEDGEMENTS The research was conducted as a part of the project Laser triangulation in medicine (LASTRIM-L7-4274) which was co-financed by the Slovenian Research Agency and Fotona d.d. 6 REFERENCES [1] Marini, L. (2013). 1064 nm Q-Switched photo-acoustic laser ablation of Xanthelasma Palpebrarum. Journal of the Laser and Health Academy, vol. 2013, no. 1, p. 48-51. [2] Tchvialeva, L., Zeng, H., Markhvida, I., McLean, D. I., Lui, H., Lee, T.K. (2010). Skin roughness assessment. Campolo, D. (Ed.) New Developments In Biomedical Engineering. InTech, p. 341-358, D0l:10.5772/7611. [3] Jezeršek, M., Možina, J. (2003). A laser anamorph profilometer. Strojniški vestnik - Journal of Mechanical Engineering, vol. 49, no. 2, p. 76-89. [4] GFMesstechnik GmbH (2014). PRIMOS lite, from: http://www. gfm3d. com/index. php?option=com_content&view=article&id =199\%3Aprimoslite&catid=48&lang=en, accessed on 201410-15. [5] Creaform (2014). Health Care Partner 3D scanner, from: http://www.creaform3d.com/en/health-care-solutions/ health-care-partner-3d-scanner, accessed on 2014-10-15. [6] 3D-Shape GmbH (2014). FaceSCAN3D and BodySCAN3D, from: http://www.3d-shape.com/produkte/face_e.php, accessed on 2014-10-15. [7] Pavlovčič, U., Jezeršek, M., Možina, J. (2012). Handheld 3D measuring system based on DSLR camera. Proceedings of the 3rd International Conference on 3D Body Scanning Technologies, p. 74-80. [8] Pavlovčič, U., Jezeršek, M., Možina, J. (2011). Laser triangulation system for the measurement of volume and color of wounds. Proceedings of the 2nd International Conference on 3D Body Scanning Technologies, p. 10-15. [9] Novak, B., Babnik, A., Možina, J., Jezeršek, M. (2014). Three-dimensional foot scanning system with a rotational laser-based measuring head. Strojniški vestnik - Journal of Mechanical Engineering, vol. 60, no. 11, p. 685-693, D0I:10.5545/sv-jme.2014.1950. [10] Jezeršek, M., Fležar, M., Možina, J. (2008). Laser multiple line triangulation system for real-time 3-D monitoring of chest wall during breathing. Strojniški vestnik - Journal of Mechanical Engineering, vol. 54, no. 7-8, p. 503-506. [11] Pavlovčič, U., Diaci, J., Možina, J., Jezeršek, M. (2013). Characterization of the head-to-trunk orientation with handheld optical 3D apparatus based on the fringe projection technique. BioMedical Engineering OnLine, vol. 12, art. num. 96, D0I:10.1186/1475-925X-12-96. [12] Nemes, K., Diaci, J., Ahcan, U., Marini, L., Lukac, M. (2014). Dependence of skin ablation depths on Er:YAG laser fluence. Journal of the Laser and Health Academy, vol. 2014, no. 1, p. 7-13. [13] Brajlih, T., Tasič, T., Drstvenšek, I., Valentan, B., Hadžistevic, M., Pogačar, V., Balič, J., Ačko, B. (2011). Possibilities of using three-dimensional optical scanning in complex geometrical inspection. Strojniški vestnik - Journal of Mechanical Engineering, vol. 57, no. 11, p. 826-833, D0I:10.5545/sv-jme.2010.152. [14] Takeda, M., Mutoh, K. (1983). Fourier transform profilometry for the automatic measurement of 3-D object shapes. Applied Optis, vol. 22, no. 24, p. 3977-3982, D0I:10.1364/ A0.22.003977. [15] Gaspar, A., Gasti, G.A. (2013). Tightening of facial skin using intraoral 2940 nm Er:YAG smooth mode. Journal of the Laser and Health Academy, vol. 2013, no. 2, p. 17-20. [16] Smith, W.J. (2000). Modern Optical Engineering. McGraw-Hill, New York. [17] Pratt, W.K. (2001). Digital Image Processing. John Wiley & Sons, New York [etc.], D0I:10.1002/0471221325. 286 Lalos, J. - Mrak, M. - Pavlovcic, U. - Jezersek, M. Strojniski vestnik - Journal of Mechanical Engineering 61(2015)5, 285-291 [18] Arevallilo Herraez, M., Burton, D.R., Lalor, M.J., Gdeisat, M.A. (2002). Fast two-dimensional phase-unwrapping algorithm based on sorting by reliability following a noncontinuous path. Applied Optics, vol. 41, no. 35, p. 7437-7444, D0l:10.1364/ A0.41.007437. [19] Su, X., Chen, W. (2001). Fourier transform profilometry: review. Optics and Lasers in Engineering, vol. 35, no. 5, p. 263-284, D0I:10.1016/S0143-8166(01)00023-9. [20] Gasvik, K.J. (2002). Optical Metrology, John Wiley & Sons, Chichester, D0I:10.1002/0470855606. [21] Nikon Corporation (2008). Digital camera D90 user's manual. Nikon Corporation, Europe. [22] ISO 12232:2006 (2006). Photography - Digital still cameras - Determination of exposure index, ISO speed ratings, standard output sensitivity, and recommended exposure index. International Organization for Standardization, Geneva. [23] Whitehouse, D.J. (1994). Handbook of Surface Metrology. Institute of Physics Publishing, Bristol and Philadelphia. Handheld Optical System for Skin Topography Measurement Using Fourier Transform Profilometry 287