Proceedings of the 9th International Conference on Computer Recognition Systems CORES 2015 pp 631-640 | Cite as

# Defect Detection in Furniture Elements with the Hough Transform Applied to 3D Data

## Abstract

Defects in furniture elements were detected using data from a commercially available structured light 3D scanner. Out-of-plane deviations down to 0.15 mm were analyzed successfully. The hierarchical, iterated version of the Hough transform was used. The calculation of position of the plane could be separated from that of its direction due to the assumption of nearly horizontal location of the plane, which is natural when the tested elements lie on a horizontal surface.

### Keywords

Defect detection Quality inspection Furniture elements Iterated Hierarchical Hough transform 3D scanner Structured light## 1 Introduction

Coordinatemeasuring techniques, including the noncontact 3D measurement methods, are appliedmoreandmorefrequently in differentareas and are one of the fastest growing areas of modern metrology. Three-dimensional scanning, thanks to its high measurement precision and speed, can be an effective tool for monitoring the dimensional and shape accuracy of products manufactured in the various branches of timber industry, including the manufacturing of furniture elements. A key aspect of modern furniture production is striving to ensure high quality, in accordance with the increasing requirements of potential customers [1, 2, 3, 4]. This implies the need for automated quality inspection of furniture parts, including the dimension and shape accuracy. One of the effective tools for this task could be machine vision understood as automatic analysis of images [5, 6]. The use of 3D scanning would be another step forward. At the moment, however, 3D scanners are used in furniture industry only occasionally, and almost exclusively in the reconstruction of missing pieces of furniture (reverse engineering), or to duplicate reference objects of complex shapes. There are no reports of any practical application in the field of technical inspection of mass-production of furniture. However, it can be expected that a fully functional and inexpensive automatic identification systems of dimensional inspection for typical furniture elements, using the universal structured light 3D scanners which are widely available, could prove to be quite interesting for furniture manufacturers who face the stringent quality requirements. Detecting the deviations from the specifications during and at the end of the technological processes can minimize the number of defects, which leads to reduction in manufacturing costs. The domain of quality control of furniture elements should be strictly distinguished from the domain of automatic analysis of anatomical defects in timber. There are many solutions to the latter problem and industrial systems for analyzing, cutting, and sorting are available on the market (see, e.g., [7, 8, 9] to name but a few). There exists extensive literature on this subject (see, e.g., [10, 11] for reviews). The reason for this situation can be probably attributed to that the production of raw timber is a mass production, while the furniture designs are varied to a much larger extent. In this paper, we shall concentrate on the detection of defects which can be defined as a deviation from a plane. For the detection of planes in 3D we shall use the Hough transform (HT). The range of the literature on HT is very wide; however, relatively little attention has been paid to the detection of planes. In [12] the classical Hough transform is used for detecting a plane in 3D parameter space, which is relatively time and memory consuming; therefore, in conclusion another method of plane detection chosen as more efficient. In [13] a number of Hough space architectures is reviewed and an original version is proposed in the form of a ball to receive even accuracy in the solution space and good rotation invariance. The three-point randomized version is finally chosen, where three parameters of the plane are calculated together from random 3-tuples of points. In [14], the classical HT formulation is used. Standard HT is used, but much attention is paid to the problem of manipulating the plane representation within the frames of the conformal geometric algebra. In [15] the observation that the scans made with the LIDAR technique have the shape of conics is used to speed up the accumulation. The curvatures found from the data are used. In [16] the data are used with the known neighborhood information, so the calculations can be started from finding the local direction in such data, so the accumulation of direction and distance can be decoupled. In [17] the points are first clustered and for the Hough transform the clusters with known centroids are used, so the direction can also be easily found. In our work we use the Hough transform for the most general case of raw data with no information on the neighborhood of a data point. Therefore, no local information on the directions or derivatives in such data is available. However, for the furniture elements which lie on a flat surface it is possible to make an assumption that the interesting plane is close to horizontal (within some margin). This will make it possible to use the hierarchical HT. To make the calculations simpler no nonlinear equations will be used. The approach used will be close to that used previously in [18] in another application. We shall also use some experience from our previous work on defect detection [19, 20, 21]. We shall investigate the potential of using the data from a 3D scanner working according to the principle of structured light. The scanners of this type available on the market attain the measurement accuracy well below 1 mm for the objects having the length over 1 m. This is a very moderate cost solution in comparison to the laser (LIDAR) scanners on one side and the professional measurement systems for timber on the other. The remainder of this paper is organized as follows. The data sets used and the problem to be solved are described in Sect. 2. The method proposed is presented in Sect. 3. Results are shown and discussed in Sect. 4 and the paper is concluded in Sect. 5.

## 2 Data and Problem Statement

In this study three defects with three levels of expected difficulty were taken into consideration. The difficulty was related to the size of the defect. Images of the objects with these defects are shown in Figs. 2a–d, 3a–d and 4a in the sequence according to the expected difficulty. The large defect in Fig. 2a is a *chipping* resulting form the fracture during the process of machining the cut-out. The defect in Fig. 3a is a *gap* which resulted in the process of machining and assembling a finger joint (the face view of the joint itself is not shown). The defect in Fig. 4a is an *orange peel* which emerged during the process of painting a surface of an element. The expected difficulty of detecting this defect is large due to that the depth of the irregularities is close to or below the limit of accuracy of the measuring device. The objects were scanned with the structured light scanner *Smarttech scan 3D DUAL VOLUME* [22] with a 5 Mpix sensor. The scans were taken from the distance 500 mm. At this distance the density of points is around 8 points/mm in each direction *x*, *y* and the accuracy in direction *z* is 0.4\(-\)0.8 mm, depending on the reflecting properties of the surface. The data for the objects are displayed in Figs. 2b–d, 3a–d and 4a, b, respectively. In this introductory study, we shall consider the defects which can be considered as the deviation of dimensions from the largest plane present in the data, which will also serve as the reference line for dimensions. The approach using the same principle can be extended to more numerous geometrical defects, with the use of the hierarchy principle. Here, we wish to concentrate upon the testing of the limits to which the dimensions can be derived from the images considered.

## 3 Method

*Oxyz*(let

*Oz*be vertical) is

*Oz*. Therefore, Eq. (1) becomes

*Oz*. When \(z_0\) is known the remaining parameters \(n_x,n_y\) can be found in a 2D Hough transform according to (2). To make the result more stable with respect to the estimate of \(z_0\) the data are expressed in the barycentric coordinates. Now, the \(n_x,n_y\) found are substituted into (2) and new \(z_0\) is found in a 1D transform. These steps are repeated until the parameters stabilize. The iterative HT was originally proposed in [23], in a different application. The resolution of the accumulators used was 0.01 mm for \(z_0\) (range according to data), and 0.001 for \(n_x,n_y\) in the range \(\langle -1,1\rangle \) in the example of Fig. 2 and 0.0001 in the range \(\langle -0.1,0.1\rangle \) in the examples of Figs. 3 and 4. The stop criterion was zero change in the parameters. Now, the out-of-plane distances of points can be found. The model of the object is used to extract the part of the infinite plane which is actually present in the object (this can be seen in Fig. 2a, d where the points belonging to the cut-out in the object were removed). Then, the distances are thresholded with a set of thresholds, according to the expected size of the defect. The points for which the distance is beyond the threshold represent the defect. The way the calculations proceed, for two from the examples considered, is shown in Fig. 1. Please note that in the first iteration the accumulator for \(z_0\) has a flat maximum. This indicates that the assumption of initial closeness to planarity is important in this approach. Please note also a characteristic circle-like shape in the accumulator for the normal vector elements. When \(z_0\) is not accurate the normal sort of turns around the accurate position to minimize at least the part of the distances. This is the reason why it is profitable to express the measurement points in the coordinate system in which the points are possibly close to the origin. The calculations for data containing several hundred thousands of data points took up to 30 s to analyze. The process could be accelerated by using the randomized approach and variable resolution in subsequent iterations [18]. The method can be extended to hierarchically find multiple shapes by eliminating the shapes already found from the data, which is a generally known technique in HT. The methods for detection of other shapes, like lines and circles in 2D or cylinders in 3D, are known and can be adapted to the problem of interest.

## 4 Results and Discussion

The data shown in Figs. 2b–d, 3a–d and 4a, b transformed to show the distances from the main planar surface are shown in Figs. 2c, d, 3a–d and 4a–c, respectively. In Figs. 2d, 3a–d and 4a–d the distances thresholded at subsequent levels are shown, which represent the final results. For the *chipping* in the machined element in Fig. 2 the result is close to expected and the defect is clearly visible. However, the distribution out-of-plane distances across the object is not even—there are larger values in the right-hand side. Therefore, the resolution for the normal vector was increased in the following examples. The results for the *gap* in the finger joint in Fig. 3 show that the out-of-plane distances are evenly distributed for the object besides the defect. This indicates that the accuracy of the plane detection was high enough. The defect is also visible clearly; it is well within the capability of the measuring device. The defect *orange peel* in Fig. 4 is an example where the defect is at the border of the scanner accuracy which was 0.08 mm in this case. The defects can not be distinguished in Fig. 4d. It should be noted that better accuracy could be attained with the scanner used if the scanning mode with a smaller field of view were used. This example is shown, however, to indicate that some defects should be detected separately from the others.

## 5 Conclusion

To our best knowledge, automatic quality inspection of furniture elements is a subject which is virtually absent in the literature. We have performed an introductory study on the detection of defects with the use of a 3D structured light scanner. The experience gained is very promising. The measuring method allowed us to reliably find the defects of the dimension down to 0.15 mm out-of-plane deviation which is in conformity with the accuracy of the scanner used. The two-level hierarchical iterative Hough transform performed well in finding the most distinct plane in the data, provided that an assumption of closeness to horizontal location of this plane is valid, which is natural in the problem considered. The methodology used can be extended to shapes containing more than one plane and other shape patterns used in the design of furniture elements.

### References

- 1.Young, T., Winistorfer, P., Siqun, W.: Multivariate control charts of MDF and OSB vertical density profile attributes. For. Prod. J.
**49**(5), 79–86 (1999)Google Scholar - 2.Zakrzewski, W., Staniszewska, A.: Accuracy of Woodwork Cutting (in Polish). Wydaw. Akademii Rolniczej im. Augusta Cieszkowskiego, Poznań (2002)Google Scholar
- 3.Lăzărescu, C.N., Lăzărescu, C.: Tolerances and Dimensional Control in Wood Industry. Editura Universităţii Transilvania, Braşov (2005)MATHGoogle Scholar
- 4.Laszewicz, K., Górski, J.: Control charts as a tool for the management of dimensional accuracy of mechanical wood processing (in Russian). Ann. Wars. Univ. Life Sci.-SGGW, For. Wood Technol
**65**, 88–92 (2008)Google Scholar - 5.Laszewicz, K.: Machining Accuracy of MDF Boards Milling Process (in Polish). Ph.D. thesis. Warsaw University of Life Sciences, Faculty of Wood Technology, Warsaw (2011)Google Scholar
- 6.Laszewicz, K., Górski, J., Wilkowski, J.: Long-term accuracy of MDF milling process-development of adaptive control system corresponding to progression of tool wear. Eur. J. Wood Wood Prod.
**71**(3), 383–385 (2013). doi:10.1007/s00107-013-0679-2 CrossRefGoogle Scholar - 7.Innovativ vision: woodeye. http://woodeye.se/en/ (2015). Accessed 09 Mar 2015
- 8.WEINING: company. http://www.weinig.com (2015). Accessed 09 Mar 2015
- 9.MiCROTEC: company. http://www.microtec.eu (2015). Accessed 09 Mar 2015
- 10.Bucur, V.: Techniques for high resolution imaging of wood structure: a review. Meas. Sci. Technol.
**14**(12), R91 (2003). doi:10.1088/0957-0233/14/12/R01 CrossRefGoogle Scholar - 11.Longuetaud, F., Mothe, F., Kerautret, B., Krähenbühl, A., Hory, L., Leban, J., Debled-Rennesson, I.: Automatic knot detection and measurements from X-ray CT images of wood: a review and validation of an improved algorithm on softwood samples. Comput. Electron. Agric.
**85**, 77–89 (2012). doi:10.1016/j.compag.2012.03.013 CrossRefGoogle Scholar - 12.Tarsha-Kurdi, F., Grussenmeyer, P.: Hough-transform and extended RANSAC algorithms for automatic detection of 3D building roof planes from Lidar data. In: Proceedings of the ISPRS Workshop on Laser Scanning 2007 and SilviLaser 2007. vol. XXXVI-3/W52., Espoo, Finland, pp. 407–412 (Sep 2007)Google Scholar
- 13.Borrmann, D., Elseberg, J., Lingemann, K., Nüchter, A.: The 3D hough transform for plane detection in point clouds: a review and a new accumulator design. 3D Res.
**2**(2), 1–13 (2011). doi:10.1007/3DRes.02(2011)3 - 14.Bernal-Marin, M., Bayro-Corrochano, E.: Integration of Hough transform of lines and planes in the framework of conformal geometric algebra for 2D and 3D robot vision. Pattern Recognit. Lett.
**32**(16), 2213–2223 (2011). doi:10.1016/10.1016/j.patrec.2011.05.014 CrossRefGoogle Scholar - 15.Grant, W., Voorhies, R., Itti, L.: Finding planes in LiDAR point clouds for real-time registration. In: Proceedings of the 2013 IEEE/RSJ International Conference Intelligent Robots and Systems IROS, pp. 4347–4354 (Nov 2013). doi:10.1109/IROS.2013.6696980
- 16.Hulik, R., et al.: Continuous plane detection in point-cloud data based on 3D Hough Transform. J. Vis. Commun. Image Represent.
**25**(1), 86–97 (2014). doi:10.1016/j.jvcir.2013.04.001 CrossRefGoogle Scholar - 17.Limberger, F.A., Oliveira, M.M.: Real-time detection of planar regions in unorganized point clouds. Pattern Recognit.
**48**(6), 2043–2053 (2015). doi:10.1016/j.patcog.2014.12.020 CrossRefGoogle Scholar - 18.Chmielewski, L., Orłowski, A.: Ground level recovery from terrestrial laser scanning data with the variably randomized iterated hierarchical hough transform. In: Azzopardi, G., Petnov, N., (ed.) Proceedings of the International Conference on Computer Analysis of Images and Patterns CAIP 2015, vol. 9256 of LNCS., Valletta, Malta, Springer Verlag (2–4 Sep 2015) pp. 630–641 (Part I). doi:10.1007/978-3-319-23192-1_53
- 19.Nieniewski, M., Chmielewski, L., Jóźwik, A., Skłodowski, M.: Morphological detection and feature-based classification of cracked regions in ferrites. Mach. Gr. Vis.
**8**(4), 699–712 (1999)Google Scholar - 20.Jóźwik, A., Chmielewski, L., Skłodowski, M., Cudny, W.: A parallel net of (1-NN, k-NN) classifiers for optical inspection of surface defects in ferrites. Mach. Gr. Vis.
**7**(1–2), 99–112 (1998)Google Scholar - 21.Mari, M., et al.: The CRASH Project: Defect detection and classification in ferrite cores. In: Bimbo, A.D., (ed.) Proceedings of the 9th International Conference on Image Analysis and Processing, vol. 1310 of LNCS., Florence, Italy, Springer Verlag (17–19 Sep 1997) pp. 781–787 (vol. II)Google Scholar
- 22.SMARTTECH Ltd.: Scanner scan3D dual volume (2015). http://smarttech3dscanner.com/3d-scanners/for-industry/scan3d-dual-volume/. Accessed 09 Mar 2015
- 23.Habib, A., Schenk, T.: New approach for matching surfaces from laser scanners and optical sensors. In: Csatho, B.M., (ed.): Proceedings of the Joint Workshop of ISPRS III/5 and III/2 on Mapping Surface Structure and Topography by Air-borne and Space-borne Lasers, La Jolla, San Diego, CA (9–11 Nov 1999)Google Scholar