Abstract:
The present invention relates to a method for measuring and evaluating surface irregularities, comprising: illuminating a surface ( 8 ) by means of at least two sources of light ( 2, 3, 13, 14 ) arranged along a row which is substantially perpendicular to a reference plane ( 4 ) along which said surface ( 8 ) is arranged, each one of said sources of light ( 2, 4, 13, 14 ) presenting an angle of incidence (β 1 , β 2 , β 3 , β 4 ) to at least one partial surface ( 1 ) forming part of said surface ( 8 ), generating by means of each source of light ( 2, 3, 13, 14 ) a set of reflections respectively from said surface ( 8 ), wherein each set contains at least one reflection from said partial surface ( 1 ), and detecting said sets of reflections by means of a light-sensitive detector ( 7 ). The invention is characterized in that it comprises: extrapolating, for each partial surface ( 1 ) and by means of detected light intensities (P) for each one of the at least two light sources ( 1, 2, 13, 14 ) and their associated angles of incidence (β 1 , β 2 , β 3 , β 4 ), an imaginary angle of incidence (β 0 ) for which no reflection would be detected, providing by means of said imaginary angle of incidence (β 0 ) a surface slope value (α) of said partial surface ( 1 ) in the direction of said sources of light ( 2, 3 ), and acquiring a height profile for said surface ( 8 ) by means of the slope values (α) for the partial surfaces ( 1 ) of said surface ( 8 ). The invention also relates to an arrangement for measuring and evaluating surface irregularities. By means of the invention, an improved method for examining painted or unpainted surfaces is provided, for providing measurements of the waviness of such surfaces.

Description:
TECHNICAL FIELD  
         [0001]    The present invention relates to a method for measuring and evaluating surface irregularities. The present invention also relates to an apparatus for measuring and evaluating surface irregularities.  
         BACKGROUND  
         [0002]    In many fields of industry, for example the car industry, there is an interest in detecting and analyzing surface irregularities of a component. In this regard, there is a desire to acquire quantitative measurements of surface defects, i.e., the degree of waviness, of unpainted as well as painted surfaces. One common method to analyze a typical object with a non-planar surface is to optically break it up into a finite number of planar elements, and to determine the inclination of each one of these small planar elements.  
           [0003]    The U.S. Pat. No. 4,988,202 describes a previously known arrangement in which several light sources illuminate a surface, for producing a reflected pattern that is detected by a camera. From the detected intensity values, the surface orientation of solder joints is acquired, by noting from which incident light source the most intense reflection is acquired for each small planar surface.  
           [0004]    According to WO 01/59404 A1, a pattern is created on a surface by a pattern projector. Information about the shape and location of an object in relation to the projector and a camera is created. When the shape and position of the object is known, the microstructure of the object is calculated.  
           [0005]    It is, however, desired to perform this type of measurement and evaluation in a more robust and general way. This problem is particularly relevant as regards relatively small waviness defects having relatively long wavelengths (for example, defects having a depth of the magnitude 10 μm and a length of the magnitude 10 cm).  
         SUMMARY OF THE INVENTION  
         [0006]    It is an object of the invention to provide an improved method and arrangement for detecting and measuring surface irregularities, in particular for evaluating relatively small waviness defects.  
           [0007]    Said object is accomplished by means of a method as claimed in subsequent claim  1 , i.e. a method for measuring and evalutating surface irregularities, comprising illuminating a surface by means of at least two sources of light arranged along a row which is substantially perpendicular to a reference plane along which said surface is arranged, each one of said sources of light presenting an angle of incidence to at least one partial surface forming part of said surface, generating by means of each source of light a set of reflections respectively from said surface, wherein each set contains at least one reflection from said partial surface, detecting said sets of reflections by means of a light-sensitive detector. Said method is characterized in that comprises: extrapolating, for each partial surface and by means of detected light intensities for each one of the at least two light sources and their associated angles of incidence, an imaginary angle of incidence for which no reflection would be detected, providing by means of said imaginary angle of incidence a surface slope value of said partial surface in the direction of said sources of light, and acquiring a height profile for said surface by means of the slope values for the partial surfaces of said surface.  
           [0008]    Said object is also accomplished by means of an arrangement according to subsequent claim  6 , i.e. an arrangement for measuring and evaluating surface irregularities, which arrangement comprises at least two sources of light arranged so as to illuminate a surface, said sources of light being arranged along a row which is substantially perpendicular to a reference plane along which said surface is arranged, each one of said sources of light presenting an angle of incidence to at least one partial surface forming part of said surface, said arrangement also comprising a control unit arranged so as to generate, by means of each source of light, a set of reflections respectively from said surface, wherein each set contains at least one reflection from said partial surface, and a light-sensitive detector arranged to detect said sets of reflections. Said arrangement is characterized in that said control unit is adapted for extrapolating, for each partial surface and by means of detected light intensities for each one of the at least two light sources and their associated angles of incidence, an imaginary angle of incidence for which no reflection would be detected, said control unit furthermore being adapted for providing by means of said imaginary angle of incidence a surface slope value of said partial surface in the direction of said sources of light, and for acquiring a height profile for said surface by means of the slope values for the partial surfaces of said surface.  
           [0009]    The invention relies on the basic principle that a surface to be examined is illuminated from different angles by means of corresponding lamps. Irregularities that occur in the surface give rise to shadowing effects, which are registered, preferably by means of a digital camera. The surface height profile is then evaluated based on the camera images.  
           [0010]    By means of the invention, certain advantages will be obtained. Firstly, it can be noted that the invention can be used to give quantitative measurements of surface defects, i.e., the degree of waviness, on unpainted and painted surfaces.  
           [0011]    An additional advantage is that no pre-preparation of the surface to be examined is needed. Also, the measurements can be made in a quick manner, and the same equipment can be used for different types of surface defects.  
           [0012]    Other advantages and features of the present invention will become apparent when viewed in light of the detailed description of the preferred embodiment when taken in conjunction with the attached drawings and appended claims. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]    [0013]FIG. 1 shows a side view of a partial surface that is illuminated from different angles and directions.  
         [0014]    [0014]FIG. 2 a  shows a principle system layout in a perspective view.  
         [0015]    [0015]FIG. 2 b  shows a principle system layout in a side view.  
         [0016]    [0016]FIG. 3 shows a side view of a partial surface that is illuminated from different angles.  
         [0017]    [0017]FIG. 4 a  shows a graph showing an image light intensity P as a function of an angle of incidence β.  
         [0018]    [0018]FIG. 4 b  shows a graph of the same type as shown in FIG. 4 a , but in which the partial surface becomes reflecting for small angles of incidence β.  
         [0019]    [0019]FIG. 4 c  shows a graph according of the same type as shown in FIG. 4 a , but in which the lamp reflex appears in the camera field of view for large angles β.  
         [0020]    [0020]FIG. 5 shows a schematic top view of the arrangement.  
         [0021]    [0021]FIG. 6 shows a top view of a small part of the relevant surface. 
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT  
       [0022]    The principal function of the system according to the invention is based on the fact that a surface is illuminated from different angles. Irregularities in the surface will result in shadowing effects, which are registered by means of a light-sensitive detector such as a digital camera having for example 1280×1024 pixels, thus giving a horizontal resolution of approximately 1 mm for a 1 square meter measuring area. The surface height profile is then evaluated from the camera images. This method and arrangement will be described in greater detail below.  
         [0023]    A schematic view of the principal arrangement according to the invention is presented with reference to FIG. 1. A partial surface  1  of the type as mentioned above and having a length dx is illuminated with a first light source  2  and a second light source  3  from different directions. The light sources  2 ,  3  are preferably in the form of flash lamps which are furthermore arranged so as to be activated one at a time. Generally, the lamps  2 ,  3  are arranged along a row which is substantially perpendicular to a reference plane  4  along which the partial surface  1  is arranged. In the embodiment shown in FIG. 1, the lamps  2 ,  3  are arranged along a vertically oriented row.  
         [0024]    A so-called slope value a is defined as the angle that the partial surface  1  presents relative to the reference level  4 , as regarded in a vertical plane intersecting the partial surface  1  and the lamps  2 ,  3 . In the following, references to angles of incidence β 1  and β 2  as indicated in FIG. 1 refer to angles between two imaginary lines  5 ,  6 , each extending between the centre of a respective lamp  2 ,  3  and the centre of the partial surface  1  in question. According to an embodiment of the invention, the angle of incidence of the light from the first lamp  2  is β 1  and the angle of incidence for the light from the second lamp  3  is β 2 . However, additional lamps may be used, as will be described below. The definitions of the angles α, β above, is valid for all sets of lamps.  
         [0025]    The invention is based on the principle that irregularities in the total surface will result in shadowing effects, which are registered by means of a light-sensitive detector, preferably in the form of a digital camera  7 . This camera  7  is adapted for registering a digital image for each individual lamp  2 ,  3  when it is activated so as to illuminate the partial surface  1 . In a manner which is previously known per se, the registered digital image is composed by a number of digital pixels, which together make up the resolution for the images registered by digital camera  7 . Preferably, each pixel corresponds to a respective partial surface  1 . The intensity detected by the digital camera  7  as a function of the light incident angles β 1  and β 2  is obtained for every point, by means of the camera images. In this regard, the number of pixels depends on the resolution of the camera  7 . Furthermore, as will be described in greater detail below, the slope value a of each partial surface  1  can be obtained from the camera images. This means also that the surface height profile can be calculated for an entire surface being composed of a plurality of partial surfaces.  
         [0026]    [0026]FIG. 2 a  indicates how the total surface  8  which is intended to be analyzed is placed in or near the centre of a measuring system. In FIG. 2 a , showing a preferred embodiment, four arrays  9 ,  10 ,  11 ,  12  are provided. For example, a first array  9  has four flash lamps  2 ,  3 ,  13 ,  14  which are positioned on different vertical levels in a vertical row, i.e. in a row which is substantially perpendicular to an imaginary reference plane along which the surface  8  is oriented. The remaining arrays  10 ,  11 ,  12  are arranged in a similar manner as the first array  9 .  
         [0027]    The four arrays  9 ,  10 ,  11 ,  12  are located in the four corners of a square, so that the total surface  8  can be illuminated from different directions and height angles β. The positions of these vertically oriented lamp arrays  9 ,  10 ,  11 ,  12  will be described later. The use of flash lamps makes it possible to operate the measuring system in daylight. A pattern generator  15  may also be used for obtaining initial height values, which will be described later. There are alternative methods of obtaining said initial height values, and using any of those methods, the pattern generator  15  will not be needed. A side view of the system set-up is shown in FIG. 2 b , in which the total surface  8  that is intended to be examined is placed on a carriage  16 . As shown in FIG. 2 b  (but not in FIG. 2 a ), a supply box  17  and power meter  18  are also connected to the system. The supply box  17  constitutes an interface between the arrays  9 ,  10 ,  11 ,  12  of flash lamps and a control unit (not shown), which is computer-based and preferably in the form of a PC type computer. The supply box  17  is also adapted so as to deliver correct power to the flash lamps. The power meter  18  is adapted to measure the flash lamp power from the lamp arrays  9 ,  10 ,  11 ,  12 . Accurate values of the flash lamp powers are needed for the evaluation of measurements in the control unit.  
         [0028]    The principles of the present invention will now be described. Referring to FIGS. 3 and 4 a , each partial surface  1  with its slope α is illuminated from different angles. More precisely, a first angle β 1  corresponds to a first lamp  2  (see FIG. 3), a second angle β 2  corresponds to a second lamp  3 , a third angle β 3  corresponds to a third lamp  13  and a fourth angle β 4  corresponds to a fourth lamp  14 . One image is collected for every angle, i.e. one image is registered for each lamp  2 ,  3 ,  13 ,  14 . As previously mentioned, every partial surface  1  preferably corresponds to a pixel of the digital camera  7 . Then, for every pixel of the digital camera  7 , the image intensity P as a function of β is collected and stored. The intensity P as a function of the angle of incidence β may be shown by means of a graph, see FIG. 4 a . The measured values are then, for every pixel/partial surface  1 , extrapolated to zero intensity P, where there is no reflection at all. The obtained value of the angle of incidence at zero image intensity P is denoted with reference numeral β 0  in FIG. 4 a . It is important to note that this “zero value” β 0  of the angle of incidence equals the slope value α, since an imaginary lamp that is placed at an angle α with respect to the reference level  4  would result in no reflected light. One value of α is thus collected for every individual pixel/partial surface  1  for one vertical array of lamps  9 ,  10 ,  11 ,  12 . This procedure gives the surface slope value α in the direction from the actual partial surface  1  to the lamp position. This information is extracted from the registered digital images for every individual pixel, where one image has been registered for each lamp.  
         [0029]    With renewed reference to FIG. 2 a , an embodiment is shown having in total four arrays of lamps, as indicated by means of reference numerals  9 ,  10 ,  11 ,  12 . A first array  9  and a second array  10  are positioned in such a way that they illuminate the surface substantially along an x-axis  19 , whereas a third array  11  and a fourth array  12  are positioned in such a way that they illuminate said surface substantially along a y-axis  20 . The result of this is that the slope values in the x- and y-directions α x (x,y) and α y (x,y) can be calculated for every individual image pixel. Furthermore, in order to substantially cancel out certain errors, which will be described later, it is also advantageous to place the arrays of lamps in pairs substantially opposite to each other, with the surface  8  that shall be evaluated placed between them. In order to obtain the slopes values in the x- and y-directions, i.e. α x (x,y) and α y (x,y), and also to substantially cancel out errors, two pairs of vertical lamp arrays, i.e. four arrays  9 ,  10 ,  11 ,  12 , should be used. The two pairs of lamp arrays  9 ,  10 ;  11 ,  12  should then be positioned in such a way that the x-axis  19  and the y-axis  20  extend substantially between the respective lamp array pair. Thus, by using four vertical lamp arrays  9 ,  10 ,  11 ,  12 , the surface slope values a is obtained in more than one horizontal direction (i.e. four distinct directions according to the described embodiment), and thus the slopes values in the x- and y-directions α x (x,y) and α y (x,y), respectively, can be calculated for every individual image pixel/partial surface  1 . This principle is also indicated in FIG. 5.  
         [0030]    It is to be noted that a system using four lamp arrays is just an example of a preferred embodiment of the invention, and other numbers and set-ups of lamp arrays are possible.  
         [0031]    The light power from a lamp which strikes and illuminates one camera pixel after having been reflected on the surface in question can be expressed according to the following (see FIG. 3):  
           P   camera   =const·R   surface   ·f   scattering (φ, β−α)· I   lamp    
         [0032]    where the following terms have been used:  
         [0033]    const is a constant for the actual pixel,  
         [0034]    R surface  is the reflectance of the surface for the actual pixel,  
         [0035]    f scattering  is a scattering function for the surface for the actual pixel, and  
         [0036]    I lamp  is the light intensity at the surface.  
         [0037]    For a diffuse surface, the following can be assumed:  
           f   scattering =sin(β−α)  
         [0038]    Experiments show that:  
           f   scattering (φ, β−α)≈ f   φ (φ)· f   β (β−α)  
         [0039]    A normalised image power can therefore be written as:  
           P   m   =P   camerma   /I   lamp   ≈constb·f   β (β−α)  
         [0040]    If the surface is diffuse, P m  becomes:  
           P   m   =constb· sin(β−α), see FIG.  4   a.    
         [0041]    The dependence of φ does not have to be taken into account, as φ is a constant for each pixel that is evaluated. The angle φ changes from pixel to pixel, which does not affect the measurements, as they are relative measurements.  
         [0042]    Certain non-linear situations involving the present invention will now be described with reference to FIGS. 4 b  and  4   c . Firstly, it should be noted that for some surfaces, the partial surface  1  becomes reflecting for small angles β, and thus the surface becomes more like a mirror. This is indicated in FIG. 4 b , which shows the manner in which the partial surface becomes reflecting for small angles β. This means that a lower light intensity is detected by means of the camera  7 , since the incoming light is reflected in a less diffuse way. Due to the fact that a higher light intensity generally is detected by the camera  7  when the reflection is more diffuse, the detected intensity is lower for the small angles β where the surface becomes reflecting.  
         [0043]    Sometimes the lamp reflex gets into the camera field of view for large angles β, see FIG. 4 c . This is another type of non-linear situation, in which the detected intensity is higher for the large angles β where the lamp reflex gets into the camera field.  
         [0044]    However, if several lamps  2 ,  3 ,  13 ,  14  are used at each lamp position  9 ,  10 ,  11 ,  12 , as shown in FIG. 3, the extrapolation to zero intensity can be done even if the function P versus β is non-linear, as mentioned above with reference to FIGS. 4 b  and  4   c . If the scattering behaviour is known for the actual surface, the extrapolation algorithm can use an already known non-linear extrapolation function. The scattering behaviour may be previously known by means of, for example, studies of a special kind of material that is used frequently.  
         [0045]    As mentioned earlier, by using more than one array of lamps, e.g. four  9 ,  10 ,  11 ,  12 , the surface slopes in the x- and y-direction can be calculated.  
         [0046]    The problems that occur when extrapolating a non-linear behaviour of the P versus β relationship to zero intensity may also be avoided by using more than one array of lamps positioned in pairs substantially opposite to each other, e.g. four  9 ,  10 ,  11 ,  12 . The errors that have been described may be cancelled, more or less, if using lamps or arrays of lamps at several opposite positions, also shown in FIG. 5. With reference to FIG. 5, we may write for every image pixel:  
         α   x     =           ∑   m            α   m     ·     cos        (     γ   m     )               ∑   m            cos   2          (     γ   m     )           -       α   y     ·         ∑   m            sin        (     γ   m     )       ·     cos        (     γ   m     )               ∑   m            cos   2          (     γ   m     )                         α   y     =           ∑   m            α   m     ·     sin        (     γ   m     )               ∑   m            sin   2          (     γ   m     )           -       α   x     ·         ∑   m            sin        (     γ   m     )       ·     cos        (     γ   m     )               ∑   m            sin   2          (     γ   m     )                                    m   =     the                 different                 lamp                 modules                     (     1   ,     …                 4       )     .                               
 
         [0047]    Using these equations, α x  and α y  are calculated for every image pixel (x, y). The different α m  angles are obtained from more or less opposite directions (m=1 and 3, m=2 and 4). Experiments show that most of the errors are therefore cancelled.  
         [0048]    To integrate all the acquired slopes α x (x,y) and α y (x,y) into a surface z(x,y), every image pixel is to be given an initial height value. This initial height value is supposed to be a start value for the iteration process, and the better the start value is, the less time consuming the iteration becomes. This initial height value may be acquired by means of the pattern generator  13 , the camera  7  and triangulating technique, as described in WO 01/79404 A1. Also, the flash lamps  2 ,  3 ,  13 ,  14  may be used.  
         [0049]    A first method using the flash lamps  2 ,  3 ,  13 ,  14  to acquire the initial height value, needs at least two substantially opposing arrays of lamps  7 ,  8 ;  9 ,  10 , as shown in FIG. 2 a . Firstly, it can be assumed that the slope value α for a partial surface  1  is zero. Then, the P versus β relationship can be obtained and extrapolated to zero intensity according to what has been described above. After such a step, an estimation of the height for the imaginary lamp, that would have resulted in the angle of incidence β 0  that equals α, can be carried out. By making this procedure for said two opposing arrays of lamps  9 ,  10 ;  11 ,  12  and then calculating the mean height value, many of the errors are cancelled. This method is repeated for every partial surface  1 , i.e. for every pixel in a digital image registered by the digital camera  7 .  
         [0050]    A second method using the flash lamps is to use the iteration process described below as a pre-processing stage in order to acquire initial height values.  
         [0051]    A more rough method is to solely guess an initial height value.  
         [0052]    During the integration of the height values, there may be differing values at the edges of each partial surface  1 . This is indicated in FIG. 6, wherein the edges are marked with small circles. A height correction value corr(x,y) is therefore calculated for every pixel as the mean height difference between the edges of the partial surface/pixel  1  and its four neighbours  17 ,  16 ,  17 ,  18 .  
         [0053]    The iteration process is executed as described in the following.  
         [0054]    1. Every image pixel gets an initial height value z(x,y).  
         [0055]    2. Every pixel is tilted accordingly to α x (x,y) and α y (x,y).  
         [0056]    3. A height correction value corr(x,y) is calculated for every pixel as the mean height difference between the edges (see the circles in FIG. 6) of the pixel and its four neighbours.  
         [0057]    4. For every pixel: z(x,y)=z old (x,y)−corr(x,y)  
         [0058]    5. Points 3 and 4 are repeated e.g. 100 times.  
         [0059]    In order to obtain an iteration that is less time consuming, the procedure above can first be carried out on larger surface elements consisting of e.g. 64×64 pixels. This gives initial height values for iteration with 32×32 pixel elements and so on.  
         [0060]    It is to be noted that the embodiment example described above is only an example of how the invention may be applied. The number of lamps  2 ,  3 ,  13 ,  14  in every vertical lamp array  9 ,  10 ,  11 ,  12  may vary from two and more, and the number of arrays may also vary within the scope of the invention. The reflections that are referred to, are normally in the form of diffuse reflections.  
         [0061]    The invention is not limited to what has been described above, but may be varied freely within the scope of the appended claims. For example, in the system according to FIG. 2 a , at least one vertical array of lamps with at least two lamps at each array is used for executing the present invention. Also, the lamps used may for example be constituted by any sufficient light source.  
         [0062]    While particular embodiments of the invention have been shown and described, numerous variations and alternate embodiments will occur to those skilled in the art. Accordingly, it is intended that the invention be limited only in terms of the appended claims.