Non-destructive Analysis of Flake Properties in Automotive Paints with Full-field Optical Coherence Tomography and 3 D Segmentation

Automotive coating systems are designed to protect vehicle bodies from corrosion and enhance their aesthetic value. The number, size and orientation of small metallic flakes in the base coat of the paint has a significant effect on the appearance of automotive bodies. It is important for quality assurance (QA) to be able to measure the properties of these small flakes, which are approximately 10μm in radius, yet current QA techniques are limited to measuring layer thickness. We design and develop a time-domain (TD) full-field (FF) optical coherence tomography (OCT) system to scan automotive panels volumetrically, non-destructively and without contact. We develop and integrate a segmentation method to automatically distinguish flakes and allow measurement of their properties. We test our integrated system on nine sections of five panels and demonstrate that this integrated approach can characterise small flakes in automotive coating systems in 3D, calculating the number, size and orientation accurately and consistently. This has the potential to significantly impact QA testing in the automotive industry. © 2017 Optical Society of America OCIS codes: (110.4500) Optical coherence tomography; (100.0100) Image processing; (110.2960) Image analysis; (310.1515) Protective coatings; (120.4290) Nondestructive testing. References and links 1. N. K. Akafuah, S. Poozesh, A. Salaimeh, G. Patrick, K. Lawler, and K. Saito, “Evolution of the automotive body coating process a review,” Coatings 6(2), 24 (2016). 2. M. Nichols and J. Tardiff, Active Protective Coatings (Springer Netherlands, 2016), Chap. 13. 3. F. J. Maile, G. Pfaff, and P. Reynders, “Effect pigments-past, present and future,” Prog. Org. Coat. 54(3), 150–163 (2005). 4. J. Allin, P. Cawley, and M. Lowe, “Adhesive disbond detection of automotive components using first mode ultrasonic resonance,” NDT & E International 36(7), 503–514 (2003). 5. S. A. Titov, R. G. Maev, and A. N. Bogachenkov, “Pulse-echo NDT of adhesively bonded joints in automotive assemblies,” Ultrasonics 48(6), 537–546 (2008). 6. B. Auld and J. Moulder, “Review of advances in quantitative eddy current nondestructive evaluation,” J. Nondestruct. Eval. 18(1), 3–36 (1999). 7. J. García-Martín, J. Gómez-Gil, and E. Vázquez-Sánchez, “Non-destructive techniques based on eddy current testing,” Sensors 11(3), 2525–2565 (2011). 8. K. Su, Y.-C. Shen, and J. A. Zeitler, “Terahertz sensor for non-contact thickness and quality measurement of automobile paints of varying complexity,” IEEE T. Thz Sci. Technol. 4(4), 432–439 (2014). 9. S. Krimi, J. Klier, J. Jonuscheit, G. von Freymann, R. Urbansky, and R. Beigang, “Highly accurate thickness measurement of multi-layered automotive paints using terahertz technology,” Appl. Phys. Lett. 109(2), 021105 (2016). 10. M. Sudo, J. Takayanagi, and H. Ohtake, “Nondestructive thickness measurement system for multiple layers of paint based on femtosecond fiber laser technologies,” J. Infrared Millim. Terahertz Waves 37(11), 1139–1147 (2016). 11. J. F. Federici, B. Schulkin, F. Huang, D. Gary, R. Barat, F. Oliveira, and D. Zimdars, “THz imaging and sensing for security applications explosives, weapons and drugs,” Semicond. Sci. Technol. 20(7), S266 (2005). 12. Y.-C. Shen, T. Lo, P. Taday, B. Cole,W. Tribe, and M. Kemp, “Detection and identification of explosives using terahertz pulsed spectroscopic imaging,” Appl. Phys. Lett. 86(24), 241116 (2005). 13. Y.-C. Shen, “Terahertz pulsed spectroscopy and imaging for pharmaceutical applications: a review,” Int. J. Pharm. 417(1), 48–60 (2011). 14. R. H. Webb, “Confocal optical microscopy,” Rep. prog. phys. 59(3), 427 (1996). 15. J. Pawley and B. R. Masters, “Handbook of biological confocal microscopy,” Opt. Eng. 35, 2765–2766 (1996). 16. E. Kirchner and J. Houweling, “Measuring flake orientation for metallic coatings,” Prog. Org. Coat. 64(2), 287–293 (2009). 17. L.-P. Sung, M. E. Nadal, M. E.McKnight, E.Marx, and B. Laurenti, “Optical reflectance of metallic coatings: effect of aluminum flake orientation,” Journal of Coatings Technology 74(932), 55–63 (2002). 18. X. Maldague, Theory and Practice of Infrared Technology for Nondestructive Testing (Wiley, NY, USA, 2001). 19. M. Omar, K. Chuah, K. Saito, A. Numasato, and M. Sakakibara, “Infrared seed inspection system (IRSIS) on painted car shells,” Infrared Phys. Techn. 48(3), 240–248 (2006). 20. A. F. Fercher, W. Drexler, C. K. Hitzenberger, and T. Lasser, “Optical coherence tomography-principles and applications,” Rep. prog. phys. 66(2), 239 (2003). 21. D. Huang, E. A. Swanson, C. P. Lin, J. S. Schuman, W. G. Stinson, W. Chang, M. R. Hee, T. Flotte, K. Gregory, C. A. Puliafito, and J. G. Fujimoto, “Optical coherence tomography,” Science 254(5035), 1178 (1991). 22. R. J. Antcliff, D. J. Spalton, M. R. Stanford, E. M. Graham, and J. Marshall, “Intravitreal triamcinolone for uveitic cystoid macular edema: an optical coherence tomography study,” Ophthalmology 108(4), 765–772 (2001). 23. M. Wojtkowski, V. Srinivasan, J. G. Fujimoto, T. Ko, J. S. Schuman, A. Kowalczyk, and J. S. Duker, “Threedimensional retinal imaging with high-speed ultrahigh-resolution optical coherence tomography,” Ophthalmology 112(10), 1734–1746 (2005). 24. M. Mogensen, L. Thrane, T. M. JÃÿrgensen, P. E. Andersen, and G. Jemec, “Optical coherence tomography for imaging of skin and skin diseases,” in Seminars in cutaneous medicine and surgery, (2009), pp. 196–202. 25. H. Lin, Y. Dong, Y.-C. Shen, and J. A. Zeitler, “Quantifying pharmaceutical film coating with optical coherence tomography and terahertz pulsed imaging: an evaluation,” J. Pharm. Sci. 104(10), 3377–3385 (2015). 26. J. Mauritz, R. S. Morrisby, R. S. Hutton, C. H. Legge, and C. F. Kaminski, “Imaging pharmaceutical tablets with optical coherence tomography,” J. Pharm. Sci. 99(1), 385–391 (2010). 27. S. Zhong, Y.-C. Shen, L. Ho, R. K. May, J. A. Zeitler, M. Evans, P. F. Taday, M. Pepper, T. Rades, K. C. Gordon, and R. Müller, “Non-destructive quantification of pharmaceutical tablet coatings using terahertz pulsed imaging and optical coherence tomography,” Opt. Laser. Eng. 49(3), 361–365 (2011). 28. C. Li, J. A. Zeitler, Y. Dong, and Y.-C. Shen, “Non-destructive evaluation of polymer coating structures on pharmaceutical pellets using full-field optical coherence tomography,” J. Pharm. Sci. 103(1), 161–166 (2014). 29. J. Zhang, Y.-C. Shen, and Y. Zheng, “The application of full-field optical coherence tomography on evaluating film coating of pharmaceutical pellets,” in IEEE Int. Conf. Comput. Inform. Technol., (2015), pp. 1046–1050. 30. Y. Dong, S. Lawman, Y. Zheng, D. Williams, J. Zhang, and Y.-C. Shen, “Nondestructive analysis of automotive paints with spectral domain optical coherence tomography,” Appl. Opt. 55(13), 3695–3700 (2016). 31. N. Zhang, C. Wang, Z. Sun, H. Mei, W. Huang, L. Xu, L. Xie, J. Guo, Y. Yan, Z. Li, and X. Xu, “Characterization of automotive paint by optical coherence tomography,” Forensic Sci. Int. 266, 239–244 (2016). 32. D. Mumford and J. Shah, “Optimal approximations by piecewise smooth functions and associated variational problems,” Commun. Pur. Appl. Math. 42(5), 577–685 (1989). 33. T. F. Chan and L. A. Vese, “Active contours without edges,” IEEE T. Image Process. 10(2), 266–277 (2001). 34. C. Gout, C. Le Guyader, and L. Vese, “Segmentation under geometrical conditions using geodesic active contours and interpolation using level set methods,” Numer. Algorithms 39(1), 155–173 (2005). 35. N. Otsu, “A threshold selection method from gray-level histograms,” Automatica 11, 23–27 (1975). 36. M. K. Garvin, M. D. Abràmoff, R. Kardon, S. R. Russell, X. Wu, and M. Sonka, “Intraretinal layer segmentation of macular optical coherence tomography images using optimal 3-D graph search,” IEEE T. Med. Imaging 27(10), 1495–1505 (2008). 37. S. J. Chiu, X. T. Li, P. Nicholas, C. A. Toth, J. A. Izatt, and S. Farsiu, “Automatic segmentation of seven retinal layers in SDOCT images congruent with expert manual segmentation,” Opt. Express 18(18), 19413–19428 (2010). 38. Q. Yang, C. A. Reisman, Z. Wang, Y. Fukuma, M. Hangai, N. Yoshimura, A. Tomidokoro, M. Araie, A. S. Raza, D. C. Hood, and K. Chan, “Automated layer segmentation of macular OCT images using dual-scale gradient information,” Opt. Express 18(20), 21293–21307 (2010). 39. A. Fuller, R. Zawadzki, S. Choi, D. Wiley, J. Werner, and B. Hamann, “Segmentation of three-dimensional retinal image data,” IEEE T. Vis. Comput. Gr. 13(6), 1719–1726 (2007). 40. K. Vermeer, J. Van der Schoot, H. Lemij, and J. De Boer, “Automated segmentation by pixel classification of retinal layers in ophthalmic OCT images,” Biomed. Opt. Express 2(6), 1743–1756 (2011). 41. S. Osher and J. A. Sethian, “Fronts propagating with curvature-dependent speed: algorithms based on HamiltonJacobi formulations,” J. Comput. Phys. 79(1), 12–49 (1988). 42. L. I. Rudin, S. Osher, and E. Fatemi, “Nonlinear total variation based noise removal algorithms,” Physica D: Nonlinear Phenomena 60, 259–268 (1992). 43. A. Yazdanpanah, G. Hamarneh, B. R. Smith, and M. V. Sarunic, “Segmentation of intra-retinal layers from optical coherence tomography images using an active contour approach,” IEEE T. Med. Imaging 30(2), 484–496 (2011). 44. B. M. Williams, J. A. Spencer, K. Chen, Y. Zheng, and S. Harding, “An effective variational model for simultaneous reconstruction and segmentation of blurred images,” J. Algor. Comput. Technol. 10(4), 244–264 (2016). 45. T. Goldstein and S. Osher, “The split Bregman method for L1-regularized problems,” SIAM J. Imaging Sci. 2(2), 323–343 (2009). 46. A. Chambolle and T. Pock, “A first-order primal-dual algorithm for convex problems with applications to imaging,” J. Math. Imaging Vis. 40(1), 120–145 (2011). 47. B. Ghanbari, L. Rada, and K. Chen, “A restarted iterative homotopy analysis method for two nonlinear models from image processing,” Int. J. Comput. Math. 91(3), 661–687 (2014).


Introduction
The purpose of applying paint coating to automotive bodies is not only corrosion protection but also aesthetic enhancement [1,2].The majority of modern automotive paint systems consist of four layers: electro-coat (E-coat), primer coat, base coat and clear coat [1,2].The base coat, the most expensive layer in automotive paint systems [2], provides choices of colour to vehicle buyers.This layer consists of a mixture of primary colouring pigment and metallic or mica flakes which are compressed into a base coat binder formulated either of acrylic or polyester polymers together with melamine.The industrial paint process requires spray-painting with significant manual craftsmanship or automated computer-controlled spray guns.Important parameters, such as spraying pistol type, spraying speed, spraying pattern, nozzle size, air pressure and distance between pistol and object, have key effects on controlling flake orientation.Meanwhile, the flake size, weight and geometry along with the viscosity of surrounding media also influence the flake orientation since flakes are hard sediments in coating formulations [3].The small flakes, which are approximately 10µm in radius, are dispersed in the base coat and give the metallic sparkle effect of the paint system.The alignment of these flakes has a critical effect on achieving the desired appearance from all angles.Light hitting the base coat results in specular reflection at the centre of the flakes and diffusive scattering at the edge.The size and orientation of each flake differs with the statistical distribution of these parameters over the whole surface determining the macroscopic appearance.Hence, the measurement of these parameters is significant to achieving a desired appearance.Resolving these flakes and calculating their size and orientation requires three-dimensional (3D) data with sufficiently high spatial (axial and lateral) resolution to assure that each flake can be clearly resolved and distinguished from the others.
The most common industrial method for measuring automotive paint layers is ultrasound testing [4,5], which relies on acoustic echo waves to determine the layer surface position and thus calculate layer thickness.This technique is based on contact measurement with hand-held scanners and is very powerful since it is easy to use, portable and fast.However, it requires a smooth, flat, hard surface for the ultrasonic sensor head to get high precision results, so non-smooth surfaces have the potential to result in measurement error.Importantly, the spatial resolution of ultrasound testing is insufficient for resolving small individual flakes such as those present in car paint of radius approximately 10µm.Another commercial method for measuring paint layer thickness, eddy-current testing [6,7], uses a coil of conductive wire with an electrical current to produce a magnetic field.This is used to sense defects in conductive samples by making contact with them and monitoring phase and amplitude change of the eddy current.Because eddy-current testing can only be applied to non-conductive and non-magnetisable coatings on electrical conducting substrate material and the film builds of automotive paint are all non-magnetisable, this method can only measure the overall coating thickness of automotive paint layers [8] and it is impossible for it to resolve small flakes.Both hand-held ultrasound and eddy current instruments involve contact with the surface, which may not be suitable for online in-situ quality control, and neither achieves sufficient spatial resolution to resolve small flakes.
Recently, non-contact terahertz pulsed imaging (TPI) has been applied to automotive coating measurements [8][9][10].TPI focuses a terahertz pulse onto a sample, then collects and characterises the reflected and backscattered pulse [11][12][13].By measuring the time delay between terahertz pulses reflected on the sample surface and its inner structure, the layer thickness can be determined.It has been demonstrated as a tool for measuring the thickness of individual paint layers and mapping the thickness distribution of multi-layered automotive paint samples [8][9][10].However, the lateral resolution of TPI is limited by its wavelength to no lower than 150 -250µm [13].Thus, TPI is unsuitable for characterising the small flakes in automotive base coats.
Confocal laser scanning microscopy (CLSM) [14] can achieve a sufficiently high lateral resolution to resolve flakes.It is a non-destructive and non-invasive optical imaging technique using a spatial pin hole placed at the confocal plane of the lens to remove out-of-focus light and increase the contrast of micrographs [15].Since CLSM can image 3D structures from obtained data, the flake orientation angles can also be calculated from the measurement of the optical reflection on the flake surface [16,17].
The automotive industry currently utilises infrared thermography (IRT) as a non-destructive tool to test for cracks and defects in vehicle's body.IRT is a technique based on infrared radiation, acquiring and processing thermal information from non-contact measurement devices by a thermal camera [18].Previous research has proven its capability of detecting dents and defects of car shells regardless of the shell geometry and location of defects [19].Since IRT provides a two-dimensional facial temperature map, it is not able to obtain the orientation information of flakes within the basecoat layer in 3D.
Optical coherence tomography (OCT) [20,21] is a non-destructive and non-contact analytical tool for imaging optical scattering media that is able to achieve micrometre spatial resolution.OCT has been used in many medical related areas including ophthalmology [22,23], dermatology [24], pharmaceutical tablet [25][26][27], and pellet coating analysis [28,29].Recently, the capability of OCT to analyse clear coat and base coat thickness distribution in automotive paint systems has been demonstrated [30,31].The principle of OCT is similar to that of ultrasound but using light instead of sound.The high spatial resolution, including both axial and lateral resolution, makes OCT a potential technique to resolve the individual metallic or mica flakes and measure their size and orientation statistics.In this paper, we present our improved full-field OCT system to achieve an accurate measurement of flake sizes and orientation as well as number.
In addition to high resolution 3D image data, the measurement of the flakes' properties requires robust 3D segmentation.We aim to resolve the metallic flakes and compute measurements of their properties including size, number and orientation, by extracting them from the background using segmentation [32,33] which is an important technique in image analysis aiming to capture the edges of either all objects of an image [33] or only select ones [34].In practice, this is often done by thresholding intensity values by a parameter selected either manually or automatically using a technique such as Otsu's [35].While this can yield results quickly and may be favoured particularly for large 3D datasets, threshold parameters can require empirical manual selection and are not well suited to problems involving poorly-defined boundaries, varying contrast and particularly noise, which are characteristic of images resulting from OCT. Methods aimed at the automatic segmentation of OCT images can be largely classified as graph-theoretical, machine learning and variational approaches.
Garvin et al. [36] proposed a graph-cut approach to segmenting five layers of macular OCT scans, presenting segmentation as a minimum-cost-cut problem on a graph using edge and region information.A graph-theoretical approach was also presented by Chiu et al. [37] who used dynamic programming to optimise the segmentation.A shortest path search was also used by Yang et al. [38] to optimise the edge selection in a two-step segmentation schema.A common benefit of graph-theoretical methods is solution speed and it is typically used for segmenting layered structures, which is not similar to our problem.While graph-search may be adapted to our problem, we are more concerned with accuracy and robustness than with speed.More recently, machine learning approaches have become popular due to their ability to obtain accurate results quickly.Fuller et al. [39] used support vector machines (SVM) to perform semi-automatic segmentation of OCT retinal images to calculate layer thickness for comparison with healthy volunteers and Vermeer et al. [40] has similarly used machine learning for OCT segmentation.Classifiers were trained from manually labelled samples and refined by the level set method.These methods can segment an image very quickly but require large amounts of training data, expensive equipment with a large number of processing cores such as high-end Graphics Processor Units and can take a long time to train.The lack of available data makes this method unfeasible for testing.
In this work, we develop a variational modelling method for achieving segmentation due to its ability to achieve accurate results, robustness and potentially fast solution speeds.Mumford and Shah (MS) [32] proposed a more robust segmentation technique by building a variational model combining both intensity and region information.This was formulated as an optimisation problem with a trade-off between data fitting and contour length which aims to provide a smoother contour and reduce the likelihood of noise being regarded as an object.Chan and Vese (CV) [33] later provided an active contour solution to the Mumford-Shah problem by building in the level set function of Osher and Sethian [41] and a smooth approximation to the Heaviside step function.They also used the popular total variation semi-norm [42] for regularisation of the contour length.While not the only solution of the MS segmentation problem, active contours remains a robust technique for segmenting images from many different modalities including OCT [43] on which many developments in segmentation have been based [34,43,44].
In this paper, we combine these two hardware and software approaches to demonstrate for the first time that the size, number and orientation of individual metallic flakes within the base coat of industrial automotive paint can be quantitatively measured by combining high resolution timedomain full-field OCT (TD-FF-OCT) measurements with robust variational image segmentation.Our TD-FF-OCT system achieves a high lateral resolution of 4.4µm, which is well-suited to resolving small flakes.Additionally, our segmentation method may also be applied to other OCT setups and other 3D imaging techniques such as confocal microscopy.

FF-OCT system
We design an FF-OCT system based on a Michelson interferometer.Figure 1(a) shows the schematic diagram of our FF-OCT system.The light beam from an infrared LED light source (centre wavelength of 850nm and bandwidth of 80nm) is split between a reference arm and a sample arm by a non-polarizing 50/50 beam splitter.The collimated light beam after lens (L1) illuminates both the sample and the reference mirror.The scattered light from the sample and the reflected light from the reference mirror are collected and then focused onto a complementary metal-oxide semiconductor (CMOS) camera using a pair of achromatic lenses.Interference fringes occur when the difference in optical path length between the sample and reference arm is within the coherence length.A set of en-face images of a sample is captured by a high speed USB3.0 CMOS camera (Point Grey, GS3-U3-23S6M-C).Lenses L2 ( f = 50mm) and L3 ( f = 250mm) are placed such that the distance between them is the sum of their focus length and the CMOS camera is placed at the focus point of the lens (L3).The frame rate was set to 100 frames/s and the total imaging time for the captured 3D volumes was 30 seconds.The magnification power is given by the ratio of the focus lengths of L2 and L3 which for our experiments is 5, giving a pixel size of 1.17µm, which allows flakes to be measured and retains a large lateral range.Figure 1(b) shows an OCT en-face image of a USAF 1951 resolution target measured by our system.The smallest pattern we can resolve is the 6th element in the 7th group.This demonstrates that our system is able to achieve a high lateral resolution of 4.4µm, which is sufficient to resolve small metallic flakes approximately 10µm in radius.The axial resolution was 4.0µm and signal-to-noise ratio was 54dB.

Sample preparation
In this study, five automotive paint samples with the same coating layers were measured, including two Indus silver samples, one Mauritius blue, one Barolo black and one Santorini black.For each sample, nine 2.25 × 1.4mm 2 sections were scanned as shown in Fig. 1(d).The entire paint coating consists of four layers including clear coat, base coat, primer coat and E-coat (see Fig. 1(c)).The first layer (clear coat) consists of uniform organic resins, which are transparent to visible light.The second layer (base coat) contains flakes which provide a sparkle effect.Because light cannot penetrate metal material and the third layer absorbs most of the light passing through gaps between the metallic flakes, our system can only resolve the top two layers which, since our interest is in the metallic flakes, is sufficient for our purpose.

Data processing
The procedure of our data processing is as follows: • Data acquisition with FF-OCT system • Convolution process, Hilbert transform and base coat isolation • 3D segmentation and labelling • Measurement of flakes properties: size, number and orientation Firstly, five samples were scanned with our FF-OCT system.Secondly the base coat layer was isolated from each group of raw OCT data manually (although this may be achieved automatically by region intensity thresholding).Thirdly, background noise was reduced and the signal intensity of the flakes enhanced by a convolution process with the reference signal and an application of the Hilbert transform to the isolated data.
Given the processed data, we aim to automatically measure the properties of the imaged metallic flakes, particularly the size and orientation.To do this, we first define a method of segmenting the flakes, which allows them to be distinguished from background noise.We then obtain an index which allows us to identify individual flakes and finally fit the flake surface to a plane to calculate the desired measurements.We present this work in the remainder of this section.

Segmentation of the metallic flakes
Segmenting objects by thresholding or other intensity-based methods alone can result in poor results, particularly for images containing significant amounts of noise, such as those acquired by OCT.We aim to improve on this by incorporating spatial information.Chan and Vese [33] proposed a method of segmenting objects in images using region-intensity and contour length information.They proposed to solve the problem of Mumford and Shah [32] using the idea of level sets [41] to fit a contour to objects of interest.The problem is as where c = (c 1 , c 2 ) ∈ R 2 , denotes the average intensities of the flakes (c 1 ) and the background (c 2 ), and φ := φ(x) : Ω → R is a function whose zero-level set {x | φ(x) = 0} defines the boundaries of the flakes.The term f F (c, φ) is a data fitting term which should be minimised when the correct boundary is found and H(φ) denotes the Heaviside function.Note that if φ(x) > 0 for x within the flakes then H(φ) is equal to one on the flake and zero elsewhere.The final term f R (φ) is a regularisation term designed to obtain a smooth contour around the flakes and prevent oscillations by constraining the length.In this case, regularisation is provided by a smooth approximation to the total variation semi-norm [42].In our case, we have depth as well as lateral information which results in 3D data and so x = (x 1 , x 2 , x 3 ) ∈ Ω ⊂ R 3 , and we replace the Heaviside with the differentiable approximation H ε (φ) = 1/2 + tan −1 (x/ε)/π, ε ∈ R >0 , which tends to the Heaviside as ǫ tends to zero.We solve the optimisation problem (1) by alternately minimising the objective functional with respect to c 1 , c 2 and φ.We thus derive the first order optimality conditions with respect to these functions.For c 1 and c 2 , we have We are looking for the zero points of these equations; equating them to zero and rearranging, we have explicit equations for c 1 and c 2 given by We also try to find the function φ which solves the optimisation problem (1) Similarly, we have where Γ = ∂Ω denotes the boundary of Ω.We thus obtain the Euler-Lagrange equation We aim to find the zero point of the Euler-Lagrange equation (Eq.3).A common method of doing this is to use time marching.That is, we aim to solve the initial value problem which we can achieve by discretising in terms of time, selecting a suitable time step and defining an initial estimate of the function φ(x).In our case, we use a binary image of small spheres as φ 0 .While the choice of initialisation can affect the result, we found in testing that varying the number and diameter of the spheres did not significantly change the outcome.While this is a commonly used method, in order to find a solution, the time step δ t must be chosen sufficiently small, which makes this method slow.More recent approaches to solving this problem have been developed such as Additive Operator Splitting, split-Bregman [45] and Chambolle-Pock [46].A fast solution technique for this problem was recently proposed for the two-dimensional (2D) case by the authors of [47] who proposed a restarted iterative homotopy approach to solving (4).The idea of the homotopy method is to transfer the non-linear problem of solving to a high-order linear approximation L. We thus construct the zero-order deformation equation where φ 0 (x; t) is an initial estimate of the level set function, is a non-zero auxiliary parameter, H and q ∈ [0, 1] is an embedding parameter and ϕ(x; t, q) is a function of t and q If the parameters and functions are chosen such that the approximation converges at q = 1 then we have Differentiating the zero-order deformation equation (Eq.5) m times with respect to q, diving by m! and setting q = 0, we have where ì φ k (x; t) = {φ 0 (x; t), . . ., φ k (x; t)} denotes the vector of solutions and we have We choose the linear operator L[ϕ(x; t, q)] = ϕ t (x; t, q) + θϕ(x; t, q) s.t.L −1 = e −θt ∫ t 0 e θτ ϕ(x; τ, q)dτ which results in setting H = e −2t .Then we aim to find Returning to our particular case, we aim to solve the non-linear parabolic equation We make an initial estimate φ 0 (x) of the level set function.We require the function R 1 in order to calculate φ 1 : since R 1 ..... is a function of space but of time.Now, we aim to find φ 2 and similarly, we have We proceed by beginning with φ 0 equal to the initial estimate and calculate to solutions Finally, we set the solution to be given by the heaviside φ := H(φ k ) to obtain a binary result.We then define the corresponding matrices φ h and ρ h which are achieved by labelling the connected components.This provides us with an index of flakes and allows us to isolate individual flakes using the non-zero parts of for the ith flake.

Measurement of the metallic flakes
Given the segmentation result and index of distinct flakes, we aim to measure their properties.Letting P i denote the set of points for each flake, we calculate the number of flakes as the size of the set P i and the orientation and surface area of the flakes by calculating the best-fit 2D plane G i defined by where pi = ( pi 1 , pi 2 , pi 3 ), lying on the plane, is the mean of the coordinates of the flake F i , is the unit norm which gives the plane the best fit to the data.That is, it allows the plain to have minimal overall distance from the points p j i ∈ P i in the normal direction, satisfying the least squares problem min Then we can give the normal n i as the first eigenvector of the Hadamard product Q i • Q i where Q i = {p − pi |p ∈ P i } denotes the set P i minus its mean triple pi .Given the best-fit plane, we use this to calculate the orientation with respect to the horizontal (lateral-lateral) plane by calculating the acute angle between the normals since both vectors are normalised.We now calculate the flake size.We first project the flake data onto the fitting plane along with a horizontal integer-spaced grid Z = {z ∈ Z 3 |z 3 = 0} along its normal, giving and project each modified data point P 1 (p i ) along the plane to its nearest projected grid point giving the set where each element is distinct in terms of coordinate values.We can then measure the surface area in µm 2 as where |S i | is the number of elements in the set S i and r 1 , r 2 and r 3 are the sizes of the pixels in µm in the two lateral and depth directions respectively.To report the results, we filter out remaining noise by removing grouped points which are too few to represent a flake (≤ 5% expected flake size).We remove flake conjunctions from consideration by filtering those which are much too large (≥ 10 times expected size) and excluding those whose mean depth values differ considerably from the fitted plane, indicating a considerable joint angle which is unexpected in a single flake.Since our segmentation approach is sensitive, the number of flakes considered to be conjoined should be small.While ruling conjoined flakes out inevitably affects the calculated number of flakes, this affects only a small proportion of the flakes so that the overall number should not be considerably affected

Results and discussion
In this study, 5 paint samples were scanned with our FF-OCT system in 9 different regions.The top two layers, clear coat and base coat, were focused in order to analyse the characteristics of the metallic flakes in the base coat.

Cross-section image of automotive paint samples
Figure 2 shows cross-sectional images of the Indus silver #1, Mauritius blue, Barolo black and Santorini black paint samples and their depth profiles.The clear coat and base coat can be determined as the first and second layers since the clear coat is transparent and the base coat has strong scattering metallic flakes inside.It can be noted from the figure that the number of flakes in the Indus silver and Mauritius blue samples is higher than that in the Barolo black and Santorini black samples.It should be noted that the OCT images are not photographic images of flakes.The thickness of the flakes in Fig. 2 represent axial resolution of 4.0µm at the surface position of the flakes.The high intensity peaks in OCT cross-section images indicate reflections at the interface between two different media with different refractive indices.Figure 2 shows cross-sectional images of the Indus silver #1, Mauritius blue, Barolo black and Santorini black paint samples and their depth profiles.The clear coat and base coat can be determined as the first and second layers since the clear coat is transparent and the base coat has strong scattering metallic flakes inside.In order to quantify the metallic flakes in base coat layer, the 3D OCT data of the base coat layer is isolated from the raw data and the flakes within are segmented in 3D. Figure 3(a) shows the small metallic flakes in the base coat after 3D segmentation.Cross section images of the flakes are shown in Fig. 3(b) and 3(d).Figure 3(c) shows the top view (en-face image) of the flakes from which the flake size in 2D could be estimated.Since en-face images do not give information of the flake orientation, the method of calculating flake size in 3D is not desirable, as discussed in a later section.

Analysis of metallic flakes
In order to characterise the flakes' size, number and orientation in each sample, each section is scanned with our FF-OCT, the base coat is isolated and 3D segmentation applied (as shown in Fig. 4(a-c)).A labelling process is subsequently applied to each section of the automotive paint samples to calculate the number of flakes and create an index.Each segmented flake is projected onto a best-fit plane and the size and orientation angle of each flake is calculated, as shown in Fig. 4(d-f).The segmentation is calculated on the whole 3D volume rather than slice-by-slice.For each individual flake, the orientation is defined as the angle between the fitting plane of the flake and horizontal plane and calculated using their normal vectors.Given the orientation, we measure a flake (d) by flattening it to a plane (e) and rotating it to be parallel with the horizontal plane (f).
The mean numbers of flakes for the two Indus silver samples across nine sections were 1994 ± 187 (633 ± 59/mm 2 ) and 1923 ± 189 (610 ± 60/mm 2 ) respectively, as shown in Table 1.The results show that the Mauritius blue sample has a similar density of flakes to the two Indus silver samples at 626 ± 17/mm 2 , while the Barolo black and Santorini black samples have fewer flakes at 202 ± 14/mm 2 and 368 ± 51/mm 2 respectively.In addition to flake number, the results in Table 1 also show that the size of the flakes in the two Indus silver and Mauritius blue samples is similar, while the size of those in the Barolo black and Santorini black samples is smaller.The orientation of a single flake is defined as the acute angle between the automotive panel surface (the horizontal plane), and the flake surface.By fitting each flake surface with a plane, the orientation angle can be calculated as the acute angle between a plane which is fit to the flake surface and the horizontal plane.Table 1 shows the mean orientations for each sample and their standard deviations.The flakes in the two black samples have a slightly smaller angle than the silver and blue samples.
To check the repeatability of the OCT measurements, the scanning and processing of section number 5 of the Indus silver #1 automotive paint sample were repeated five times.Figure 5 shows the measured results of the number of flakes and mean flake size.The consistency of these results demonstrates the repeatability of our OCT measurements.Additionally, Fig. 5 shows a set of en-face images of repeated OCT data slices and their segmented results.The mean flake number of the five repeated measurements is calculated as 2133±30 (677 ± 10/mm 2 ).The mean flake size is 10.13 ± 1.35µm (radius).The mean orientation angle is 7.58 ± 0.22 • .This demonstrates consistency and repeatability of the OCT measurements.In order to further validate our experimental results, we cut and polish the samples, and obtain cross sectional images with high magnification microscopy, as shown in Fig. 6 (right column).Using this 2D data, we can segment the flakes and calculate their angle to the horizontal line.Doing this for a series of cross-section images of the Indus silver #2 Mauritius blue, Barolo black and Santorini black, the mean angles are calculated as 6.5, 5.9, 2.8, 3.8 degrees.The estimated angles in 3D agree with our OCT results as shown in Table 2. Table 2 also shows that the difference between the angle of flakes obtained using OCT and microscope increases when the angle becomes smaller.This discrepancy, although still within the standard deviation of the measurements, might be caused by the limited lateral resolution of about 4µm and the relatively large pixel size of 1µm of our OCT system.By using better quality and larger magnification imaging lenses in the OCT system, better lateral resolution and measurement precision could be achieved.The cross-sectional micrographs provide only 2D information while our system is capable of imaging in 3D.The micrographs achieve a good quality result for validation, but necessitate destruction of the sample while our device keeps it intact.One limitation of our measurement method is that a small number of physically conjunct flakes, which were recognised as single flakes, were excluded from the segmentation results in order to get a more accurate result of the mean flake size.Although we have identified such flakes automatically by excluding those whose mean distances from the fitting plane were greater than µm, the problem of segmenting these flake conjunctions is sophisticated, related to the conjunction angle between several flakes, and will be studied in future work.Another limitation is that the light source of our OCT system is near-infrared, which cannot penetrate metal.Therefore, we have only measured the clear coat and base coat of automotive paint layers.We have demonstrated that our FF-OCT system is capable of identifying, resolving and measuring small flakes in a non-destructive and non-contact manner.
Previous methods, including ultrasound, eddy-current testing and TPI, do not have sufficient resolution to resolve each individual flake.The high lateral resolution of our TD-FF-OCT system makes it possible to resolve individual flakes within the base coat of automotive paint which is not achievable by current commercial methods.While CLSM can achieve sufficient resolution, our OCT has a longer working distance and only requires a depth (z−axis) scan to capture 3D data yet CLSM is a scanning point system and requires all three axes to be scanned (x − y − z−axis).Moreover, CLSM has not been demonstrated on real industrial car paint samples before.
Our 3D variational segmentation method allows the calculation of the flakes' sizes in 3D space instead of a 2D surface peak intensity map which neglects that the flakes are projected onto the horizontal plane which distorts the measurement.It is novel to segment and label the acquired 3D OCT data of these small flakes in order to calculate their properties accurately and precisely.In addition, our variational segmentation method is not restricted to our FF-TD-OCT system and can be applied other OCT setups and other 3D imaging techniques such as CLSM.

Conclusion
In conclusion, we have developed a TD-FF-OCT system along with integrated 3D analysis algorithms which allow us to determine in 3D space the number, size and orientation of flakes within the base coat layer of automotive paint.To the best of our knowledge, the work reported in this paper represents the first system capable of measuring such intricate properties of such metallic flakes in automotive panels and suitable for industrial use.We have demonstrated the capability of our system as a non-contact and non-destructive analytical tool for measuring small flakes in automotive paint.The clear advantages of our system, including the high resolution and automatic segmentation and analysis method, along with its non-destructive and non-contact nature, make it the preferred choice for the future QA of automotive paint coating systems which it has the potential to considerably benefit.

Fig. 1 .
Fig. 1.(a) Schematic of our FF-OCT system showing the beam splitter (BS), plano-convex lenses (L1, L2, L3), complementary metal-oxide semiconductor camera (CMOS), reference mirror (RM) and infrared light-emitting diode light source (LED).(b) An OCT en-face image of USAF 1951 resolution target measured by our FF-OCT system.(c) Schematic diagram of the depth profile of the car paint sample.(d) Photograph of car paint panel used in this work where the nine sections of the measured areas are highlighted in red.

2. 3 . 2 .
Strategy for finding the level set function

Fig. 2 .
Fig. 2. Cross-section images of four samples (right side) and their corresponding average depth profiles (left side).(a) Indus silver sample #1; (b) Mauritius blue sample; (c) Barolo black sample; (d) Santorini black sample; The cross-sectional images show that there are more flakes in the Indus silver and Mauritius blue samples than Barolo black.(n is the refractive index of the sample.)

Fig. 3 .
Fig. 3. 3D view and cross-section images of base coat of Indus silver #1 after 3D segmentation.(a) 3D view of segmented flakes.(b), (c), (d) show three cross-section images of flakes within base coat layer after segmentation in three orthogonal planes.

Fig. 4 .
Fig. 4. Example showing part of the segmentation of an en-face OCT image of car paint.An en-face OCT volume image (a) of metallic flakes is segmented by determining the level set function φ (b) in order to obtain the segmentation result (c).The segmentation is calculated on the whole 3D volume rather than slice-by-slice.For each individual flake, the orientation is defined as the angle between the fitting plane of the flake and horizontal plane and calculated using their normal vectors.Given the orientation, we measure a flake (d) by flattening it to a plane (e) and rotating it to be parallel with the horizontal plane (f).

Fig. 5 .
Fig. 5.A set of en-face images of 5 repeated OCT measurements with their segmentation results overlaid.The consistency between repeated data demonstrates the repeatability of our OCT system and segmentation method.Each column represents 5 different repeated data and each row denotes two different optical depths (72µm and 76µm).

Fig. 6 .
Fig. 6.Comparison of B-scans from our OCT device (left column) with micrographs (right column) for four samples: Indus silver, Mauritius blue, Barolo black and Santorini black.