Abstract:
A method for automatically setting illumination intensity of light sources used within either positional recognition devices or quality control devices that, in turn, are used in devices that automatically equip components on a printed circuit board or ceramic substrates. The individual light sources are successively varied and an image of a component to be placed on a printed circuit board or substrate is registered by a camera. The resulting picture elements are registered as grayscale values and stored in an image evaluation unit. The grayscale values are either represented as useful structures of the component or unwanted structures of the component dependent on the illumination intensity of the individual light sources. The stored grayscale values for all of the light sources are summed according to respective useful and unwanted structures of the component and then compared to one another. Using a linear optimization methodology, either maximum or minimum difference values are set dependent on whether the difference between the grayscale value sums of the useful and unwanted structures yield a large difference value. The illumination and intensities of the light sources are set at an optimum illumination and intensity based on either the maximum difference or minimum difference.

Description:
BACKGROUND OF THE INVENTION 
     The invention is directed to a method for automatically setting illumination intensity for positional recognition devices and quality control devices during automatic placement of components on a printed circuit board or ceramic substrate. 
     When automatically equipping printed circuit boards or ceramic substrates with components, particularly surface mounted device (SMD) components, the position of the components relative to the placement position on the printed circuit board is identified before mounting the components using means for positional recognition. All articles capable of being equipped, for example shielding plates as well, are covered below by the term components. Optical system, comprised of a camera (e.g., a CCD camera), an illumination means are generally utilized as positional recognition devices. Visual inspection of the components ensues in analogously constructed devices for quality control. Illumination for these devices is selected such that useful structures (generally the terminals of the components) are shown with extremely high contrast, whereas unwanted structures (for example the body of the components) are suppressed. 
     Methods are known for the above purposes wherein the components are eliminated from different angles with different intensities with the assistance of illumination devices that are subdivided into a plurality of light sources each having a respectively separately controllable intensity. 
     JP 8-152311 (A), for example, discloses the illumination of soldered connections from different directions in order to inspect the quality of the soldered connections. The grayscale values identified in the individual illuminations are summed in an image evaluation unit. However, no teaching is given the document as to how illumination can be realized in an automatically adjustable way. 
     WO 96/21343, as another example, discloses a method wherein the components are not uniformly illuminated from all angles with the assistance of segmented ring illumination. Rather, no light is incident onto the structure from specific angles. Imagings of unwanted structures that may particularly emerge from these specific angles are thus suppressed. 
     A disadvantage of the known methods using a plurality of light sources is that an optimum illumination for the component must be manually set by an operator for each new component. To that end, the intensities of the individual light sources must be regulated by the operator until, under visual supervision, he has achieved an illumination adequate for the positional recognition or quality control. Hence, intensity setting in these known methods is user-specific and not reproducible, as would be required for equipping numerous circuit boards with large numbers of components. 
     U.S. Pat. No. 5,454,049 discloses a method for automatically setting illumination light source, wherein grayscale values registered with a camera and stored in an image evaluation unit are modified by an intensity control means such that the existing grayscale range of the image evaluation unit is optimized. However, this method is not suitable for illumination with a plurality of light sources, since the influence of the intensities of the individual light sources is not taken into consideration. 
     SUMMARY OF THE INVENTION 
     The present invention featured a reproducible, automatic method with which the intensity setting of the illumination is assured without fault in other-words at least two light sources used for positional recognition and quality control during equipping of a printed circuit board or substrate with components. 
     In order to achieve these features, the present invention includes a method for automatically setting illumination intensity for positional recognition devices and quality control devices used in automatic devices for placing components. Each of the positional recognition and quality control devices includes at least two or more light sources controlled by respective intensity control devices, a camera for registering an image of a component to be placed and an image evaluation unit connected to the camera that rasters the image of the component into picture elements in the form of grayscale values and registers at least a portion of the registered image. Further, picture elements of the image are divided into elements representing useful structures of the component and unwanted structures of the component. These respective structure elements are then allocated within the image evaluation unit to represent useful and unwanted structures. 
     The method includes these steps of successively eliminating the component according to varied illumination intensities by each respective light source. The image;of the component is then registered with the camera for each successive illumination. Grayscale values of the image registered by the camera are stored as grayscaled value parts in the image evaluation unit and respectively allocated as either representing useful structures or unwanted structures of the component, wherein the grayscale value ranges of the useful and unwanted structures are identified dependent on the illumination intensity of the individual light sources. The stored grayscale value parts are then summed in the evaluation unit for all of the light sources according to both the useful and the unwanted structures of the component, respectively. The respective grayscale values sums of the unwanted structures are then compared to the grayscale values of the useful structures. 
     Determination is then made whether the useful structures can be distinguished from the unwanted structures by identifying whether the difference between the grayscale:value sums of the unwanted and useful structures yields a substantially large difference. When at least one light source yields a substantial large difference between the grayscale value sums of the unwanted and the useful, structures, a desired maximum difference value is established. If the difference between the grayscale value sums does not yield a substantially large difference, a desired minimum difference value is-established. The difference values, whether maximum or minimum, are established utilizing a linear optimization. Finally, the illumination and intensities of the light sources are set at an optimum intensity based-on either the maximum difference value or the minimum difference value. 
     Compared to the known methods, the inventive method offers the advantage of achieving an automatic illumination setting that sequences independent of a user and in an automated fashion, (i.e., without involved, time-consuming trials) assuring a faultless illumination of a component in devices for positional recognition and quality control within an automatic equipping unit. 
     Additional advantages and novel features of the invention will be set forth in part in the description that follows and, in part, will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the present invention may be realized and attained by means of instrumentalities and combinations particularly pointed out in the appended claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Reference is made to the attached drawings, wherein elements having the same reference numeral represent like elements throughout and wherein: 
     FIG. 1 is an illustration of an apparatus used by the present method for automatically setting intensity of illumination within either positional recognition device or a quality control device. 
     FIG. 2 illustrates the operation of the device of FIG. 1 when component leads have non-linear surfaces according to embodiments of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In an automatic equipping unit for equipping a printed circuit board, as illuminated in FIG. 1 components  3  are picked up from supplied containers by a suction pipette  2  secured to an equipping head  1  and are investigated by a positional recognition means for their relative position at the suction pipette  2 , in that the components  3  are illuminated by an illumination means composed of a plurality of light sources  4 . The intensity of each light source  4  can be separately controlled by an allocated intensity control means  5 . The image of the component  3  is registered by a camera  6  and an image evaluation unit  7  and is stored in the image evaluation unit  7 . Work is usually performed with a CCD camera, whose smallest resolution is called a pixel. A grayscale value is allocated to each pixel, whereby a higher grayscale corresponds to a greater brightness. Given the employment of a color camera, values are stored that correspond to the detected color. These values are likewise referred to below under the term of grayscale value, since the inventive method is equally suitable for color cameras as well. By comparing the registered position of the terminals  9  or, in other words the useful structures  9  of the components  3  as shown in FIG. 2 to stored comparison patterns, the image evaluation unit  7  can recognize the current position of the component  3  on the suction pipette  2 , calculate a correction, and forward the correction to a central control unit (not shown) of the automatic equipping unit. Hence, the position of the suction pipette  2  or of the printed circuit board is correspondingly varied such that the component  3  is placed in the correct position on the printed circuit board. 
     In order to determine an unambiguous relationship between comparison patterns the registered image of the component  3 , useful structures  9  (for example, terminals) must be imaged with high contrast along with the simultaneous suppression of unwanted structures  8  (for example, the body of the component  3 ), through the intensity setting of the illumination. 
     An exemplary embodiment of the method of the present invention achieves an optimum, automatic illumination setting in the means for positional recognition and quality control in that an allocation of the pixels of the camera to useful  9  and unwanted  8  structures of the component  3  is performed on the basis of a unit of the components  3  to be placed on the circuit board or substrate. The allocation may be performed, for example, on the basis of a theoretical description of the geometrical structure of the component  3  that is stored in the image evaluation unit  7  for example. A further possibility is the presentation of the registered image of the component  3  on a picture screen (not shown) connected to the image evaluation unit  7  with which an operator can visually identify useful  9  and unwanted  8  structure. The allocation then may be accomplished manually by the operator in that he identifies respectively allocated regions on the picture screen, these then being stored in the image evaluation unit  7 . This possibility offers the advantage that a manual adjustment of the component  3  in the position recognition means belonging to the method can ensue during the course of the visual; identification of unwanted  8  and useful  9  structures. 
     The speed of the present method can be increased by reducing the resolution through combining a plurality of pixels to form what are referred to as “moxels”. An average grayscale value is thereby allocated to the moxels by averaging the grayscale values allocated to the pixels. 
     The following values are subsequently determined according to the present method: 
     a) the maximum grayscale value N max  of the useful structures  9 , 
     b) the average value N of the grayscale values of the useful structures  9 , 
     c) the minimum grayscale value N min  of the useful structures  9 , 
     d) The maximum grayscale value S max  of the unwanted structures  8 , 
     e) the average value S of the grayscale values of the unwanted structures  8 . 
     Given illumination with a plurality i of light sources  4  with respective intensity X i , the grayscale values are derived as a sum of respective grayscale value parts that are identified in the illumination with only one light source  4 . Assuming that saturation effects in the camera are negligible, linear dependencies can be derived between the intensities x i  of the individual light sources  4  and the grayscale value parts expressed by corresponding coefficients: 
     a n,max,i  for maximum grayscale value parts of the useful structures  9 ; 
     a n,i  for average values of the grayscale value parts of the useful structures  9 ; 
     a n,min,i  for minimum grayscale value parts of the useful structures  9 ; 
     a s,max,i  for maximum grayscale value parts of the unwanted structures  8 ; and 
     a s,i  for average values of the grayscale value parts of the unwanted structures  8 . 
     The grayscale values indicated under items a) through e) on the previous page thus are derived as linear combinations of the coefficients and the corresponding intensities x i  according to the following equations:                N   max     =       ∑   i                     (       a     n   ,   max   ,   i       ·     x   i       )               (   1   )               N   =       ∑   i                     (       a     n   ,   i       ·     x   i       )               (   2   )                 N   min     =       ∑   i                     (       a     n   ,   min   ,   i       ·     x   i       )               (   3   )                 S   max     =       ∑   i                     (       a     s   ,   max   ,   i       ·     x   i       )               (   4   )               S   =       ∑   i                     (       a     s   ,   i       ·     x   i       )               (   5   )                                
     When the coefficients a n,max,i , a n,min,i , a s,max,i  and a s,i  are combined in line vectors A n,max , A n , A n,min , A s,max  and A s  with i an a ba′ of columns and the intensities x i  are combined into a column vector X having i rows, then equations (1) through (5) can also be written as scalar product of vectors: 
     
       
           N   max   =A   n,max   ·X   (6) 
       
     
     
       
           N=A   n   ·X   (7) 
       
     
     
       
         N min   =A   n,min   ·X   (8) 
       
     
     
       
           S   max   =A   s,max   ·X   (9) 
       
     
     
       
           S=A·X   (10) 
       
     
     To determine the coefficients, the intensities x i  of all light sources  4  are first set to a predetermined value, (e.g., equal to zero) the intensities x i  of the individual light sources are successively varied and once again set to the predetermined value. The camera  6  then registers the image of the component  3  and the grayscale value parts for the intensities x i  respectively set for the respective light sources are determined by the prior allocation of pixels (or, moxels) to unwanted  8  and useful  9  structures. By dividing the grayscale value parts by the intensities x i  that have been set, the coefficients that are stored in the image evaluation unit  7  are derived. 
     For example, given six light sources  4 , five coefficients have thus been determinated after the implementation of the measurement of the grayscale a value parts for each of the six light sources. With the assistance of a linear optimization, the optimum illumination can now be automatically determined from these thirty coefficients that have been identified. 
     In a first embodiment, limit values for the grayscale values or differences between them are initially defined. The difference of the maximum grayscale value N max  of the useful structures  9  and the average value N of the grayscale values of the useful structures  9  should be lower than a predetermined, first limit value GW 1  as represented in the following relationship 
     
       
           N   max   −N =( A   n,max   −A   n )· X≦GW   1   (11) 
       
     
     The difference of the average value N of the grayscale values and the minimum grayscale value N min  of the useful structures  9  should be smaller than a predetermined, second limit value GW 2  according to the following relationship 
       N−N   min =( A   n   −A   n,min )· X≦GW   2   (12) 
     The difference of the maximum grayscale value S max  and the average value S of the A grayscale values of the unwanted structures  8  should be smaller than a predetermined, third limit value GW 3 , according to the following relationship 
     
       
           S   max   −S =( A   s,max   −A   s )· X≦GW   3   (13) 
       
     
     The average value N of the grayscale values of the useful structures  9  should be higher than a predetermined, fourth limit value GW 4 , according to the following relationship 
     
       
           N=A   N   ·X≧GW   4   (14) 
       
     
     or 
     
       
         − A   N   ·X≦−GW   4   (15) 
       
     
     The intensity should be greater than zero, which, after introduction of an auxiliary vector  1  with elements that have the units of intensity and the value 1, can be vectorially written: 
     
       
         1 ·X ≧0  (16) 
       
     
     or 
     
       
         −1 ·X ≦0  (17). 
       
     
     By introducing a vector B and a matrix A, equations (11), (12), (13), (15), and (17) can be combined:              B   =     (         GW1           GW2           GW3             -   GW4             0         )             (   18   )               B   =     (             A     n   ,   max       -     A   n                   A   n     -     A     n   -   min                     A     s   ,   max       -     A   s                 -     A   n                 -   1           )             (   19   )                                A·X≦B   (20). 
     A subsequent check is made to see whether the useful structures  9  can be distinguished from the unwanted structures  8 , this being the case when a substantially large difference between the coefficients a n,1  and a s,i  of the averages of the grayscale values of useful  9  and unwanted  8  structures occurs for at least one light source i according to the following conditions 
     positive contrast: 
     
       
           a   n,1   &gt;&gt;a   s,i   (21) 
       
     
     negative contrast: 
     
       
           a   n,1   &lt;&lt;a   s,i   (22) 
       
     
     What this generally expresses is that the grayscale value ranges of useful  9  and unwanted  8  structures have an adequately large spacing. 
     The optimization condition then reads that the difference between the average values N and S of the grayscale value of the useful  9  and of the unwanted  8  structures should be equal to a maximum value Max: 
     
       
           N−S =Max  (23) 
       
     
     or, correspondingly, (with a minimum value Min): 
     
       
         −( N−S )=Min  (24) 
       
     
     which, with the line vector C 
     
       
           C =( A   n   −A   s )  (25) 
       
     
     can also be written as: 
     
       
         − C·X =Min  (26) 
       
     
     The spacing of the grayscale value ranges of unwanted  8  and useful  9  structures is thus selected to be optimally large. 
     When no light source i is found whose allocated coefficients of the average values of the grayscale values  9  of useful and unwanted  8  structures differ as greatly as in equations (21, 22), then useful and unwanted structures  9 , 8  cannot be separated. 
     In the event of this condition, the optimization condition utilized assumes the difference between the average values N and S of the grayscale values of useful  9  and unwanted  8  structures is a minimum value Min according to the equations: 
     
       
           N−S =Min  (27) 
       
     
     or, with equation (25): 
       C·X =Min  (28). 
     The optimum illumination will then supply approximately identical grayscale values for useful  9  and unwanted  8  structures so that the position of the component  3  is recognized on the basis of the external shape of the component  3  against a background. The condition for the predetermined fourth limit value GW 4  (equations 14 and 15) refers to the average value S of the grayscale values of the unwanted structures  8  in this case wherein: 
     
       
           S=A   s   ·X≧GW   4   (29) 
       
     
     or 
     
       
         − A   s   ·X≦−GW   4   (30) 
       
     
     Equation (20) is correspondingly adapted in this case. 
     The distance between the grayscale value ranges of unwanted  8  and useful  9  structures thus becomes minimal. 
     Equations (20) and (26) or, equations (20) and (28) are solved with the assistance of a linear optimization method, for example a revised simplex algorithm (see, e.g., Bronstein, Semendjajew, Taschenbuch der Mathematik, 24th Edition, Harri Deutsch, publishers, Thun and Frankfurt/Main, pages 711 ff), within a program in the image evaluation unit  7  that sets the desired intensities x i  of the individual light sources i at an optimum illumination level. 
     A second exemplary embodiment, as shown in FIG. 2, is especially suited for components  3  having  9  (i.e., the useful structure) having an actual terminal surface, wherein the image of the terminals  9  registered by the camera  6  is divided as useful structure  9  into regions R 1 , R 2  that are separately investigated. An individual light source  4   a  or,  4   b  does not generate a uniform illumination of the useful structure  9 . Rather, regional bright spots arise whereas the remainder of the useful structure  9  remains dark. The pixel or moxel having the maximum grayscale value of the structure is not fixed but changes with changing illumination direction due to different light sources  4   a ,  4   b . For this reason, the difference between the maximum grayscale value N max  and the average value N cannot be represented as linear combination of the intensity values x i  or the light sources  4   a ,  4   b . The analogous case also applies for the difference between the average value N and the minimum grayscale value N min  as well as for the difference between the maximum grayscale value S max  of the unwanted structure and the average value S. 
     In order to achieve a uniform presentation of the useful structures  9  (the analogous case applies to the unwanted structures  8 ), regional coefficients a n,R1,i  a n,R2,i  for the respective average value N R1 , N R2  of the grayscale values of the useful structures  9  are identified in the respective regions R 1 , R 2 . Given two light sources  4   a  and two regions R 1 , R 2 , a total of four regional coefficients a n,R1,i  a n,R2,i  are identified. The plurality of light sources  4  and of regions R 1 , R 2  can be varied dependent on the problem. The average values N R1 , NR 2  of the grayscale values in the regions R 1 , R 2  analogously derive as linear combination of the regional coefficients a n,R1,i  a n,R2,i  and the intensities x i  of the light sources  4   a ,  4   b . It should be taken note of as boundary condition that the average values N R1 , N R2  of the grayscale values of the regions R 1 , R 2  are not greater than a fifth limit value GW 5 , so that the signal limitation of the camera  6  is not exceeded. 
     
       
           N   R1   , N   R2   ≦GW   5   (31). 
       
     
     In the determination of the coefficients a n,1  for the average values N R1 , N R2  of the grayscale values of the useful structure  9 , it is assumed that all light sources  4   a ,  4   b  are utilized for illumination. Accordingly, the coefficients a n,i  for the average values N R1 , NR 2  of the grayscale values of the useful structure derives as arithmetic average of the regional coefficients a n,R1,i  a n,R2,i . 
     The determination of the optimum illumination then ensues analogous to the described, first exemplary embodiment.