<figure><img src="image_1.png" /></figure>

HAL
open science

# A System for the Quality Inspection of Surfaces of Watch Parts

Giuseppe Zamuner, Jacques Jacot

► To cite this version:

Giuseppe Zamuner, Jacques Jacot. A System for the Quality Inspection of Surfaces of Watch Parts. 6th International Precision Assembly Seminar (IPAS), Feb 2012, Chamonix, France. pp.134-143, 10.1007/978-3-642-28163-1_17. hal-01363894

HAL Id: hal-01363894

https://inria.hal.science/hal-01363894

Submitted on 12 Sep 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# A System for the Quality Inspection of Surfaces of Watch Parts

Giuseppe Zamuner and Jacques Jacot

Laboratoire de Production Microtechnique,
Ecole Polytechnique Fédérale de Lausanne, Switzerland
{giuseppe.zamuner, jacques.jacot}@epfl.ch

**Abstract.** In luxury industry and, in particular in watch making, the quality of a surface is fully associated with its visual appearance and represents a corollary to the technical mastery necessary to manufacture valuable products. Traditionally, the inspection of these surfaces is carried out by human experts. Their judgment is influenced by several factors, which are not easy to control and which introduce variability in quality inspection. Nevertheless, experts have the capacity to handle different situations and they only give access to the specific knowledge related to the inspection of aesthetic surfaces. For these reasons, in the development of systems for automated visual inspection, experts are considered as the reference. The main goal of the work presented in this paper is to provide automated tools for the quantitative estimation of the quality of aesthetic surfaces, in order to reduce the variability of the inspection. The different parts of an artificial vision system for surface quality control are investigated and a parallel is drawn with the inspection carried out by human experts. The adopted inspection process is based on three steps: the identification of defects, their quantification and the judgment about their acceptability.

## 1. Introduction

This system is being developed for the inspection of the ballbearings manufactured by Micro Precision Systems AG for the watchmaking industry. Figure 1 shows a cutaway drawing of a ballbearing. To give an idea of the size of the ballbearing, the external diameter of the inspected ballbearing is about 6-8 mm. The two sides of the ballbearing need to be inspected and the visual inspection focuses in particular on the surfaces of the core, the cone and the ring (including the cogs).

<figure><img src="image_3.png" /><figcaption>**Figure 1.** Cutaway drawing of a ballbearing.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Ballbearings manufactured by Micro Precision Systems AG. The surfaces of the ballbearings present different surface finishing.</figcaption></figure>

At first, we have decided to focus on the three models of ballbearings shown in figure 2, which, for their characteristics, are representative of the wide variety of ballbearing produced by the manufacturer.
The surfaces are decorated with different types of finishing, such as black polish, sunray brushing, snail finish or diamond finish. The system is required to inspect the surfaces of the ballbearing and to determine their quality in accordance with the evaluations provided by the experts. The proposed methods will be later extended to other models of ballbearing.

## 2. Collaboration with human experts

In the development of systems for the inspection of surface quality, human experts are considered as the reference. Their role is fundamental and they only give access to the specific knowledge related to the inspection of aesthetic surfaces. In order to favour the collaboration in the development process, the collaboration framework shown in figure 3 has been defined.

<figure><img src="image_5.png" /><figcaption>**Figure 3.** Development process undertaken in collaboration with human experts.</figcaption></figure>

It is assumed that the inspection process is based on three steps [1]:

1. *Exploration*, during which the expert observes the surface in order to detect the anomalies. In the development of the automated vision system, the focus is set on the choice of an appropriate acquisition setup and the development of algorithms for the detection of the anomalies.

2. *Evaluation*, which is performed on a specific anomaly that has been detected during the exploration step and which consist in evaluating the seriousness of the anomaly. In the development of the automated system, classification algorithms are developed in order to emulate the evaluations provided by the experts.

3. *Decision*, which is based on the evaluations of the anomalies but also on other criteria that could depend, for example, on the surface region that has been affected by the anomaly or on the number of occurrences of a specific anomaly. As another example, the evaluations of multiple anomalies could be aggregated together in order to issue a joint decision. This step is related to the judgement issued on the quality of the overall surface or part.

The description of the anomalies and of the defects is supported by a database, which should cover the variability arising from all the different situations that can be encountered during inspection. The use of descriptors helps to structure the database in a coherent way. In the development of the automated system, in order to reproduce the evaluations issued by the experts, it is important to define the gravity of each anomaly and to describe it in terms of its main characteristics, such as size, brightness, regularity, etc.

As an example, figure 4 shows a form indicating the locations and the intensities of anomalies found on the surface of a ballbearing. The ballbearing is rejected as defective. The anomalies are evaluated with three intensities (1, 2 and 3), corresponding to levels of increasing seriousness of the anomaly (negligible, possible defect, serious defect).
<figure><img src="image_6.png" /><figcaption>**Figure 4.** Example of form collecting the labelled anomalies found on a ballbearing. The ballbearing is rejected as defective. The anomalies are evaluated with three intensities (1, 2 and 3), corresponding to levels of increasing seriousness of the anomaly (negligible, possible defect, serious defect).</figcaption></figure>

<table><thead><tr><th>Anomaly</th><th>Intensity</th><th>Anomaly</th><th>Intensity</th><th>Anomaly</th><th>Intensity</th></tr></thead><tbody><tr><td>A</td><td>3</td><td>I</td><td>2</td><td>Q</td><td>2</td></tr><tr><td>B</td><td>1</td><td>J</td><td>2</td><td>R</td><td>2</td></tr><tr><td>C</td><td>3</td><td>K</td><td>3</td><td>S</td><td>3</td></tr><tr><td>D</td><td>2</td><td>L</td><td>1</td><td>T</td><td>3</td></tr><tr><td>E</td><td>3</td><td>M</td><td>1</td><td>U</td><td>1</td></tr><tr><td>F</td><td>1</td><td>N</td><td>3</td><td>V</td><td>1</td></tr><tr><td>G</td><td>3</td><td>O</td><td>3</td><td>W</td><td>1</td></tr><tr><td>H</td><td>1</td><td>P</td><td>2</td><td></td><td></td></tr></tbody></table>

### 3. Overview of the system

<caption>**Figure 5.** Block diagram of the system.</caption>

Figure 5 shows the block diagram of the system, which is essentially composed of two main parts:

* The acquisition setup, resulting from an appropriate choice of illumination, optics and camera. In treating this part, we will focus in particular on the use of illumination to highlight the defects. The choice of the appropriate optics and camera is determined by the application and its description is beyond the scope of this paper.

* The software, implementing the following main functional blocks:
* The Image Processing block, whose main function is to extract the appropriate features from the acquired images. The analysis of local aspect proceeds in two steps, the anomalies detection and the features extraction. In the first step, the global properties of the surface are estimated and the anomalies that do not comply with these global properties are detected and isolated from the rest of the surface. Then, in the second step, features are computed for the characterization of the detected anomalies.

* The Classification block, which processes the features obtained to characterise the global aspect and the local aspect.

* User Configurable Decision block, which implements an additional degree of flexibility, allowing the system to classify parts on the basis of criteria that cannot be translated in term of features used to describe the global or the local aspects. This is the case, for example, of the more tolerant decision criteria, which intervene when the anomalies appear on the surfaces of watch components that are hidden in the finally assembled movement.

* Controls block, which implements all operations needed for the control of the camera, the illumination and the automation.

* Human Machine Interface block, which allows the users to interact with the system, by providing them with a feed-back about classification and the criteria employed for the classification.

In the following sections, we will describe more in details the acquisition setup, the image processing and the classification blocks.

## 1.1 The acquisition setup

<figure><img src="image_7.png" /><figcaption>**Figure 6.** Acquisition setup for the inspection of the ballbearings. The axis of the camera is perpendicular to the plane of inspection. The setup allows the use of different illuminations: backlight, ringlight and directional illuminations at elevations of 50° and 70°.</figcaption></figure>

The developed acquisition setup is shown in figure 6. In order to simplify the inspection process, the camera is positioned perpendicular to the plane of inspection and the setup allows to acquire images with the following types of illumination:

* Backlight.

* Ringlight.

* Directional illuminations at different elevation angles.

The images obtained with these illuminations are shown in figure 7.
The image obtained with the *backlight illumination* allows to locate the ballbearing on the plane of inspection and to extract the external outline of the ballbearing. The position and the contour of the ballbearing are automatically combined with some information about the geometry of the ballbearing. This information about the geometry, which is used to define the surfaces that need to be inspected, is manually selected for each model of ballbearing, by using a graphical interface.

<figure><img src="image_8.png" /><figcaption>**Figure 7.** Images of the ballbearing obtained using different illuminations: backlight (on the left), ringlight (at the center) and directional illumination (on the right).</figcaption></figure>

The advantage of using *ringlight* is that the surface is illuminated in a uniform way from all azimuthal directions. For example, the low angle ringlight is adapted to highlight surface textures for the characterisation of the global aspect. In the application presented in this paper, the ringlight is used to highlight the defects, which mainly consist of marks of blow appearing on the outer edges of the cogs. The vertical position of the ringlight is a critical parameter that needs to be appropriately chosen in order to make the defects appear on the images.

<figure><img src="image_9.png" /><figcaption>**Figure 8.** Polished surfaces of a ballbearing, illuminated by a light source at different elevations: 40° (image 1), 50° (image 2), 60° (image 3) and 70° (image 4).</figcaption></figure>

The *directional illuminations* are used to highlight the local defects that appear on these metallic surfaces. The anomalies should be visible on the acquired images, in order to be detected and segmented. Furthermore, the pixel intensity of the anomalies should be representative of their brightness as it is perceived by the experts. Because of the way the light is reflected from metallic surfaces [2], the illumination and viewing angles determine the appearance of the anomalies in the acquired images. The elevation of the directional illumination influences the
contrast between the anomalies and their surrounding regions and the elevation giving the best contrast depends on the surface finishing. This can be easily explained observing that the surface roughness influences the shape of the specular lobe of the scattered light. For block polish, sunray brushing and snail finish, the elevation of 70° yields good contrast in the acquired images, while for diamond finish the elevation of 50° has been chosen. Figure 8 shows the influence of directional illumination on the contrast of an anomaly in the acquired image. Also the azimuthal angle determines how an anomaly is viewed from the camera. For example, a scratch appears with higher contrast when its direction is perpendicular to the illumination direction. Consequently, in order to make all the anomalies of the surface visible, it is necessary to acquire images with several directional sources covering 360°. As it is shown in figure 6, the directional illuminations consist of two rings of 30 LEDs, at 50° and 70°. The number of LEDs depends on the minimum angular spacing (in this case, 12°) necessary to highlight appropriately all possible anomalies present on the surface. In order to reduce the number of acquired images, multiple adjacent LEDs are turned on simultaneously. The limitation is that, increasing the number of LEDs, also the diffuse illumination is increased and, consequently, the contrast in the acquired images is reduced. For the prototype in figure 6, the choice that represents a good compromise consists in turning on 3 LEDs simultaneously at each image acquisition, which results in a total number of 10 images acquired for each ring of LEDs. The realization of the directional illumination can be improved by using more directional light sources in order to limit the diffuse light that reduces the contrast. This would allow to reduce the number of images acquired per each ring of LEDs.

## 2.1 The image processing and classification blocks

As we have already explained the first step of the processing of the acquired images consist in the detection of the anomalies that appear on the surfaces. Since the anomalies are considered as undesired variations of specific surface properties, a representative model for each inspected surface should be determined. We used two types of models, depending on the texture of the surface to be inspected:

* Autoregressive moving average models [3].

* Statistical models [4].

These models serve as a reference, in order to isolate the regions of the surface that do not share the same properties with the rest of the surface. Figure 9 shows an example of detection.

<figure><img src="image_10.png" /><figcaption>**Figure 9.** Example of anomalies detected on a surface. The first image, on the left, shows the ballbearing being inspected and the second image, at the center, shows the detail of the surface at the center of the ballbearing. The third image, on the right, shows the result of the segmentation: the detected anomalies are highlighted by the uniform grey pattern, while the surface without anomalies is identified by the chess pattern.</figcaption></figure>

As it is shown in figure 10, the blobs detected on separate images, which belong to the same anomaly (first two images, on the left and at the center), are processed jointly in order to extract the appropriate features. The blobs from the two images are joined together by calculating the maximum between the pixels of the blob in one image and the pixels at the same locations in the other image. The result is shown in the image on the right of figure 10. The feature extraction process takes place on the anomaly resulting from this combination.
<figure><img src="image_11.png" /></figure>

Figure 10. The blobs of the same anomaly, which are detected on images acquired with different directional illumination, are combined together and processed jointly in order to extract features. The blobs from the two images are joined together by calculating the maximum between the pixels of the blob in one image and the pixels at the same locations in the other image. The result is shown in the image on the right.

The following features are calculated:

* The area of the resulting anomaly.

* The sum of the areas of the blobs detected in the different images.

* The length of the resulting blob.

* The mean of the pixels of the resulting blob.

* The empirical standard deviation of the pixels of the resulting blob.

<figure><img src="image_12.png" /></figure>

**Figure 11.** Linear discriminant analysis applied to the features extracted from the anomalies detected on the surface of the ballbearing.

The resulting linear discriminant analysis [5] is shown in figure 11. Table 1 shows the correlation between the features and the first discriminant function, which is the direction along which the distance between the classes, expressed in terms of discriminant ratio, is maximised. The mean pixel intensity of the resulting anomaly is well
correlated with this axis, as well the mean pixel intensity of all blobs. The correlation of the length of the resulting anomaly and the discriminant function is not significant. It can be seen that this simple list of features allows a rough separation of the classes provided by the experts. The clusters corresponding to the negligible anomalies and the serious defects are clearly separated. The cluster of possible defects is not clearly separated from the other two clusters and this is surely related to the variability of the expert. At this stage of the development, this restrained number of features is sufficient to continue the development further, in order to compare more extensively the obtained results with the classification provided by the experts.

<table><caption>**Table 1.** Correlation between the features and the the 1st discriminant function.</caption><thead><tr><td>Feature</td><td>Correlation</td></tr></thead><tbody><tr><td>Area of the resulting anomaly</td><td>0.382</td></tr><tr><td>Sum of the area of all detected blobs</td><td>0.575</td></tr><tr><td>Length of the resulting anomaly</td><td>0.064</td></tr><tr><td>Pixels mean of the resulting anomaly</td><td>0.853</td></tr><tr><td>Pixel mean of all detected blobs</td><td>0.792</td></tr><tr><td>Standard deviation of the resulting anomaly</td><td>0.897</td></tr></tbody></table>

## 4. Conclusion

This paper presents an artificial vision system for the inspection of surfaces of watch parts. The proposed approach is based on a tight collaboration with the human experts that the system is designed to emulate. The presented application shows the various improvements that the proposed method can bring to surface inspection:

* The adoption of an approach, based on the separation of the inspection process in distinct phases, which allows a tight collaboration with human experts providing the initial classification.

* The use of directional illumination in order to enhance the local contrast and the acquisition of multiple images with different illumination directions, in order to provide an appropriate description of the aspect of a surface.

* The characterization of anomalies based on the features extracted from the blobs detected in the multiple images, which have been acquired with the different directional illuminations. In particular, we have shown that the processing of features obtained from multiple images brings about an improved classification.

## Reference

[1] Guerra, Anne-Sophie. «Métrologie sensorielle dans le cadre du contrôle qualité visuel». PhD Thesis, Université de Savoie, Laboratoire Systèmes et Matériaux pour la Mécatronique (SYMME) (2008).

[2] Nayar, Shree K, Katushi Ikeuchi, et Takeo Kanade. «Surface Reflection: Physical and Geometrical Perspectives». *Transactions on Pattern Analysis and Machine Intelligence* 13 (1991): 611-634.

[3] Zielinski, Jerzy, Nidhal Bouaynaya, et Dan Schonfeld. «Two-Dimensional ARMA Modeling for Breast Cancer Detection and Classification». *International Conference on Signal Processing and Communications (SPCOM).* Bangalore, 2010. 1-4.

[4] Unser, Michael. «Local linear transforms for texture measurements». *Signal Processing* 11, n° 1 (July 1986): 61-79.

[5] Johnson, Richard, et Dean W. Wichern. *Applied Multivariate Statistical Analysis (6th Edition)*. Prentice Hall, 2007.