MACHINE VISION SYSTEM FOR QUALITY CONTROL
FIELD OF THE INVENTION
The invention relates to quality control by using a machine vision system.
BACKGROUND OF THE INVENTION
Machine vision has been used for many different applications. One of the most important is quality control. In a quality control application the quality of a manufactured item is verified by machine vision or a similar system. The implementation of the system depends on the object to be inspected. For example, in timber the quality may depend on the number of knot¬ holes. This can be inspected by taking an image with a camera and then analyzing the image.
In addition to acquiring ordinary images it is possible to use different methods. For example, in order to determine the shape of the object to be meas¬ ured a plurality of points can be projected to the ob- ject. Then the object is imaged by using multiple cam¬ eras so that real coordinates of the object can be computed from the projected points and thus the cor¬ rect shape may be verified.
When analyzing surface quality the tradition- al approach is to use a surface scanner instead of a camera. A surface scanner provides good results but the scanning process is slower than imaging and it provides more data to be analyzed which slows the pro¬ cess even further. A further drawback with surface scanning is the requirement of space as the surface scanning is operated by a robot hand.
One example of such a portion is a seam be¬ tween parts that have been joined together. It is com¬ mon that objects are manufactured by combining a plu- rality of parts. These parts are joined together, for example, by welding, soldering, gluing, sewing or sim-
ilar. The method for joining or connecting depends on the materials that need to be joined. In many cases an experienced person sees from a seam if the joining fulfills the quality requirement. As the quality con- trol in seams may need to be accurate, surface scan¬ ners are commonly used. High accuracy requirement is very typical in objects wherein the inadequate quality of the object or part would endanger human lives or could lead into serious accidents. One example of such parts is car parts.
SUMMARY
The invention discloses a method for inspect¬ ing a portion of an object. In the method a portion of an object is first inspected by using at least one camera. In the imaging step a plurality of different images are taken. Then a value from said images is computed based on at least one sample image, wherein the value represents the quality of the inspected por- tions of an object. The imaging is typically done by using ordinary digital cameras and the taken images are typically common photographs; however, also spe¬ cial equipment may be used. The term "different" here means that there is an essential difference between the images. Examples of such differences are different angle, zoom, focus, lighting, exposure and similar.
In the most typical case the inspected por¬ tion is a seam, such as a welding seam. The seam may be divided into segments and each of the segments may be analyzed respectively. Typically the plurality of different images is taken by using a plurality of cam¬ eras. It is common to calibrate at least a portion of the used cameras .
In an embodiment the plurality of different images is acquired by using different lighting condi¬ tions when imaging. The change of lighting may be com-
bined with the plurality of cameras. Thus, it is pos¬ sible to acquire a large number of images in short time with a reasonable number of cameras.
The invention is typically implemented as a system for inspecting a portion of an object, which system comprises at least one camera and a server for controlling said at least one camera and receiving im¬ ages from said at least one camera. The system is con¬ figured to acquire a plurality of different images and compute a value representing a quality from said imag¬ es based on at least one sample image, wherein the value represents the quality of the inspected portions of an object. Typically the system comprises a plural¬ ity of cameras that are fixed to their locations by using a frame so that the object to be inspected is located inside the frame. In an embodiment of the in¬ vention the frame further comprises a plurality of lights for providing different lighting conditions. The system may be calibrated. In an embodiment of the present invention the system is configured to perform the method disclosed above.
The benefit of the invention is that it pro¬ vides a reliable method for quality controlling from images acquired by an ordinary camera. The invention is particularly suitable for controlling the quality of seams. The method according to the invention is able to perform the quality inspection by using small¬ er amount of data and thus the computing phase does not require as much computing power as prior art meth- ods . This means that more details can be inspected by machine vision and the need for human inspection is reduced. This leads into faster inspection rate and improved quality. BRIEF DESCRIPTION OF THE DRAWINGS
The accompanying drawings, which are included to provide a further understanding of the invention
and constitute a part of this specification, illus¬ trate embodiments of the invention and together with the description help to explain the principles of the invention. In the drawings:
Fig. 1 is a block diagram of an example embodiment of the present invention,
Fig. 2 is a flow chart of a method according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
Reference will now be made in detail to the embodiments of the present invention, examples of which are illustrated in the accompanying drawings.
In figure 1 a block diagram according to an embodiment of the invention is shown. In the Figure two plates 10a and 10b are welded together by a seam 11. These seamed plates form an object to be inspect¬ ed. The welding seam 11 in Figure 1 is the most inter¬ esting part of the object. If the quality of welding is inadequate the object may break into two pieces.
In figure 1 there is a plurality of cameras C and lights L that are attached to rails 13. The rails act as a support for the cameras C and lights L. The cameras C and lights L are coupled to a server 14. The connection may be wireless or wired. The server is configured to instruct the lights and cameras when im¬ aging and then receive acquired images. The acquired images may be processed in the server 14; however, it is possible that the server sends the acquired images to a further server or workstation.
In figure 1 the welding seam 11 is divided into four segments. The number of segments is deter¬ mined by the programmer of the system. Small details may be processed as one segment and longer seams are divided into a plurality of segments.
In figure 2 a method according the present invention is disclosed. The method is explained with references to the embodiment of Figure 1.
First, the system is programmed, step 20. In the programming phase the system is taught with examples what an acceptable seam is. Correspondingly the teaching process may include examples of an unaccepta¬ ble seam. This is done by using positive and negative references. The programming step may be amended later if the system rejects acceptable objects. The number of segments is also determined in this step. In the example of Figure 1 the number of segments is four. All of the segments are located on the welding seam 11 so that the whole seam is covered. The number and con- figuration of the used lighting conditions is also de¬ termined at this step. The number of different light¬ ing conditions is represented by N.
After programming, typically a plurality of objects is inspected. First the initial lighting is set, step 21. The inspection is done by acquiring images by using a plurality of cameras C, step 22. Typi¬ cally all cameras acquire images even if the seam 11 cannot be seen by all of them as it is beneficial to combine other quality inspections to the same measure- ments. Steps 21 and 22 are repeated N times. When the images have been acquired, the lighting is reset dif¬ ferently, step 21. The change of lighting provides a different view of the object to be inspected. After N rounds the images are processed, step 23. For example, in Figure 1 there are six cameras. The maximum number of images acquired is then 6*N. However, it is not necessary to have the same value of N for all cameras. If the programmer has decided to acquire images in 8 different lighting conditions there are up to 48 imag- es from each segment. The change of lighting condi¬ tions is a particularly good way to produce different images as some of the seam defects show better in dif-
ferent lighting and thus it provides a plurality of different images from the same angle.
In the processing step each of the images is processed so that the visible segments in each image are compared to the reference images. The comparison provides a value that indicates how well the imaged segment matches with a reference segment. It must be noted that even if the method is represented here as sequential, the processing may be started in parallel as soon as the first images are acquired.
Lastly a result is computed, step 24. The re¬ sult may be simply an indication that the inspected object is allowable or must be rejected. Other indica¬ tors are also possible. For example, different quali- ties of the same part may be acceptable in different applications so the result may be an indication of how much the object deviates from the sample. The result may be displayed to the object as a whole or for each segment respectively.
The following is an example of the result computing according to the present invention. In the computing process the images taken from one segment are combined. The combining step is repeated for each of the segments. In the programming phase a threshold value is determined. Each of the segments is compared to the predetermined threshold value. If at least one of the segments does not exceed the required threshold quality the complete seam is considered to be unac¬ ceptable and the object is rejected. Sometimes the system rejects acceptable objects. When the operator of the system notices this he can reprogram the system and teach an additional example of an acceptable ob¬ ject. This is a continuous process and will lead to more accurate quality control. Typically in demanding applications the automatic control is configured with very strict conditions. In these cases more accurate
quality control will save money as the acceptable ob¬ jects are not wasted.
It is obvious to a person skilled in the art that with the advancement of technology, the basic idea of the invention may be implemented in various ways. The invention and its embodiments are thus not limited to the examples described above; instead they may vary within the scope of the claims.