System and method for lead foot angle inspection using multiview stereo vision

The present invention includes a system and method for three-dimensional imaging and analysis of electronic components. Specifically, it permits rapid and reliable inspection of the lead foot angle in integrated circuit packages. A first image capturing device, a second image capturing device and a third image capturing device are arranged in a “corner shape” or “L-shape.” The first image capturing device forms the corner and obtains an image of the bottom of the component. The perspective viewing angle of the second image capturing device and the perspective viewing angle of the third image capturing device are orthogonal to each other to allow accurate three-dimensional reconstruction of the lead angles and detection of flaws or bends.

CROSS REFERENCE TO RELATED APPLICATION

This application is a U.S. National Phase application under 35 U.S.C. § 371 of International Application No. PCT/SG2017/050232 filed on 2 May 2017, the disclosure of which is incorporated herein by reference.

TECHNICAL FIELD

The present invention relates to a system and method for determining the lead foot angle in Integrated Circuit (IC) packages with leads that extend outward such as Quad Flat Package (QFP) and Thin Small Outline Package (TSOP).

BACKGROUND

Stereo vision is the extraction of three-dimensional information from two or more digital images. It is particularly important to many industrial applications. For example, stereoscopic images are used to analyze and evaluate components of semiconductor chips. Microelectronics are typically made and packaged in large volumes in high-precision manufacturing environments. It is important for each of completed object to be inspected. Because of the small size of the components and large volume of small pieces, the inspection must be automated. Three-dimensional vision is essential because the inspection involves examining specific critical three-dimensional features of each package.

In traditional stereo vision, two cameras are usually displaced horizontally from one another in a manner similar to human binocular vision. For example, U.S. Pat. No. 8,107,719 discloses a vision system for the three-dimensional metrology of a rapidly moving semiconductor or packaged electronic objects. The system includes three cameras mounted to a back plate. The cameras are disposed on the same plane and are symmetrically arranged so that one camera is disposed at an acute angle, another camera is disposed at an obtuse angle and the third camera is disposed orthogonally relative to the field of view. This arrangement allows for the determination of the three-dimensional imaging and analysis of an object.

U.S. Pat. No. 8,885,040 discloses a stereo vision inspection system for ball and like protrusions of electronic components. It describes a method of full calibration of the stereo vision system, by which both the interior and the exterior parameters of the stereo cameras are determined. A rectified stereo camera system is then established. Conjugate points are detected on the rectified images and are used for reconstruction of the three-dimensional location information. The information is further used for three-dimensional measurement.

U.S. Pat. No. 9,594,028 discloses an improved stereo vision inspection system for determining coplanarity of three-dimensional features in integrated circuit packages. The system includes two side view cameras with tiltable lens arranged according to the Scheimpflug principle. The system improves the accuracy of the measurement by producing well-focused images of uniform light intensity.

In the above-mentioned systems, the stereo cameras are all arranged on one plane. While suitable for some uses, these systems have limitations. For example, these systems are not capable of inspecting the lead foot angle of all the leads in a Quad Flat Package (QFP) or similar device. They cannot detect the lead foot angle or a bend in a lead that extends parallel (or nearly parallel) to the cameras plane. As a QFP device has leads extending out on all four sides of its substrate, inspection of the lead foot angle of all the leads requires viewing the device at multiple angles. The inspection of the lead foot angle of all the leads is essential as a bent lead can affect reliability of the circuit and lead to a defective product.

A need, therefore, exists for an improved system and method that overcomes these limitations. It is, therefore, a motivation of the present invention to provide a three-dimensional vision inspection system that allows complete inspection of the lead foot angles of all the leads in the QFP devices. The system should be capable of rapidly inspecting a high volume of objects with high accuracy, precision and reliability.

SUMMARY

We describe a system for analyzing the lead foot angle of an object, such as a Quad Flat Package (QFP) or a Thin Small Outline Package (TSOP). It includes (a) a support, (b) a light source, (c) a first image capturing device, (d) a second image capturing device and (e) a third image capturing device. The first image capturing device is mounted at a first bottom viewing angle that is perpendicular to a plane where the object is placed for capturing a first bottom view image. The second image capturing device is mounted at a second perspective viewing angle from the object for capturing a second perspective view image. A third image capturing device is mounted at a third perspective viewing angle from the object for capturing a third perspective view image. The second perspective viewing angle and the third perspective viewing angle are orthogonal to each other.

In an embodiment, the first, second and third image capturing devices are arranged to form an L-shape or corner-shape. The first image capturing device is on the corner, the second image capturing device is on the left (or right) and the third image capturing device on the front (or back). Each of the image capturing devices includes a lens and a sensor, and has an optical axis passing through the center of its lens and the center of its sensor. The optical axis of the first image capturing device and the optical axis of the second image capturing device form a first alignment plane. And the optical axis of the first image capturing device and the optical axis of the third image capturing device form a second alignment plane. The said first alignment plane and the said second alignment plane are orthogonal to each other. An object such as a QFP with leads on four sides is placed below the first image capturing device. The first image capturing device and the second image capturing device are used to determine the lead foot angles of the leads that extend along the normal direction of the first alignment plane. The first image capturing device and the third image capturing device are used to determine the lead foot angles of the other leads that extend along the normal direction of the second alignment plane.

In an alternative embodiment, a fourth and a fifth image capturing device are added to the system. The fourth image capturing device is added on the opposite side of the second image capturing device with respect to the first image capturing device. The fifth image capturing device is added on the opposite side of the third image capturing device with respect to the first image capturing device. The first, second, third, fourth and fifth image capturing devices therefore form a cross-shape centered on the first image capturing device, with the second image capturing device and the fourth image capturing device being on the opposite sides of each other, and the third image capturing device and the fifth image capturing device being on the opposite sides of each other. The optical axis of the fourth image capturing device is on the first alignment plane formed by the optical axis of the first image capturing device and the optical axis of the second image capturing device. The optical axis of the fifth image capturing device is on the second alignment plane formed by the optical axis of the first image capturing device and the optical axis of the third image capturing device. The fourth image capturing device is used together with the first and the second image capturing device to determine the lead foot angles of the leads that extend along the normal direction of the first alignment plane. The fifth image capturing device is used together with the first and the third image capturing device to determine the lead foot angles of the other leads that extend along the normal direction of the second alignment plane.

We also describe a method of analyzing the lead foot angle of the leads on an object with leads on its substrate, such as a Quad Flat Package (QFP), that includes the steps of (1) obtaining a first bottom view image with the said first image capturing device from a first bottom view of the object, (2) obtaining a second perspective view image with the said second image capturing device from a second perspective viewing angle of the object, (3) obtaining a third perspective view image with the said third image capturing device from a third perspective viewing angle of the object that is orthogonal to the second perspective viewing angle, (4) combining the first bottom view image and the second perspective view image to determine the lead foot angle of the leads that extend along the normal direction of the first alignment plane formed by the optical axis of the first image capturing device and the optical axis of the second image capturing device and (5) combining the first bottom view image and the third perspective view image to determine the lead foot angle of the leads that extend along the normal direction of the second alignment plane formed by the optical axis of the first image capturing device and the optical axis of the third image capturing device. These steps can be repeated with a fourth and a fifth image capturing device (arranged in a cross-shape) to improve the accuracy and robustness of the system.

Further, we describe a method of combining the first bottom view image, the second perspective view image and the third perspective view image to determine the lead foot angle of the leads on an object with leads on its substrate, such as a Quad Flat Package (QFP), that includes the steps of (1) for those leads of the object that extend along the normal direction of the first alignment plane formed by the optical axis of the first image capturing device and the optical axis of the second image capturing device, detecting the lead tip point and at least one additional point that is at a specified distance from the lead tip point on the lead foot in the first bottom view image and the second perspective view image, (2) for those leads of the object that extend along the normal direction of the second alignment plane formed by the optical axis of the first image capturing device and the optical axis of the third image capturing device, detecting the lead tip point and at least one additional point that is at a specified distance from the lead tip point on the lead foot in the first bottom view image and the third perspective view image, (3) reconstructing the three-dimensional coordinates of each lead tip point and each additional point on the lead foot, (4) constructing a reference plane using the three-dimensional coordinates of all the lead tip points, (5) constructing the lead foot line of each lead using the three-dimensional coordinates of the lead tip point and the additional point on the lead foot and (6) determining the lead foot angle as the acute angle between the lead foot line and the reference plane.

INTRODUCTION

A first aspect of the invention is a system and method of three-dimensional imaging that uses three cameras arranged in an “L-shape” or “corner shape.”

A second aspect of the invention is a system and method for inspecting the leads in an Integrated Circuit (IC) package such as a Quad Flat Package (QFP) or a Thin Small Outline Package (TSOP) to determine the lead foot angle and whether the package meets particular manufacturing specifications.

A third aspect of the invention is a more accurate and efficient inspection system for determining the lead foot angle in IC packages such as a QFP or TSOP.

A fourth aspect of the invention is a system that uses three cameras arranged in an “L-shape” or “corner shape” to analyze an object such as a QFP or TSOP in three dimensions.

A fourth aspect of the invention is a system that uses five cameras arranged in a “cross shape” to analyze an object such as a QFP or TSOP in three dimensions.

A fifth aspect of the invention is a method of analyzing an electronic package such as a QFP or TSOP using the images obtained by three, four or five cameras arranged to take images of the package from different angles.

These and other aspects of the invention will become apparent from the following description, taken in connection with the accompanying drawings, wherein, by way of illustration and example, at least one embodiment of the present invention is disclosed.

DETAILED DESCRIPTION OF THE INVENTION

Definitions

While the invention is primarily described for detecting defects in electronic components, it is understood that the invention is not so limited and can be used to assist with other endeavors that require rapid three-dimensional imaging and/or inspection of objects. For example, the system can be used to analyze the physical condition of any small object, such as its orientation, the dimensions of a particular feature on an object, the presence/absence of features on an object and/or the coplanarity of features on an object.

Reference in this specification to “one embodiment/aspect” or “an embodiment/aspect” means that a particular feature, structure, or characteristic described in connection with the embodiment/aspect is included in at least one embodiment/aspect of the disclosure. The use of the phrase “in one embodiment/aspect” or “in another embodiment/aspect” in various places in the specification are not necessarily all referring to the same embodiment/aspect, nor are separate or alternative embodiments/aspects mutually exclusive of other embodiments/aspects. Moreover, various features are described which may be exhibited by some embodiments/aspects and not by others. Similarly, various requirements are described which may be requirements for some embodiments/aspects but not other embodiments/aspects. Embodiment and aspect can be in certain instances be used interchangeably.

The term “optical axis” refers to a line along which there is some degree of rotational symmetry in an optical system such as a camera lens or microscope. The optical axis is an imaginary line that defines the path along which light propagates through the system, up to first approximation.

The term “orthogonal” refers to intersecting or lying at right angles to one another.

The term “Quad Flat Package” or “QFP” refers to a surface mount integrated circuit package with “gull wing” leads extending from each of the four sides.

The term “seating plane” refers to a reference plane upon which to analyze individual leads for lead “foot” angle inspection.

The term “Thin Small Outline Package” or “TSOP” refers to a type of surface mount Integrated Circuit (IC) package. They typically have leads on two sides and are often used for RAM or Flash memory ICs due to their high pin count and small volume.

The term “integrated circuit” or “IC” refers to a small complex of electronic components and their connections that is produced in or on a small slice of material such as silicon.

It will be appreciated that terms such as “left,” “right,” “front,” “back,” “top,” “bottom,” “up,” “down,” and “below” used herein are merely for ease of description and refer to the orientation of the components as shown in the figures. It should be understood that any orientation of the components described herein is within the scope of the present invention.

Other technical terms used herein have their ordinary meaning in the art that they are used, as exemplified by a variety of technical dictionaries.

DESCRIPTION OF PREFERRED EMBODIMENTS

FIG. 1represents an embodiment of the invention for lead foot angle inspection of a Quad Flat Package (QFP) component. The object to be inspected20is supported by a pickup head10. The object has “gull wing” leads30on all four sides of its substrate. The leads extend slightly out, then down and out again.

Here, the object20is illuminated by a light source40and a diffusive reflector50. The light emitted from the light source40is reflected by the diffusive reflector50to illuminate the object to be inspected20.

The system includes at least three image capturing devices. The first image capturing device includes a lens71and a sensor81and is mounted perpendicular to the object to be inspected20to capture a first bottom view image of the object. The second image capturing device also includes a lens72and a sensor82but is mounted at a slanted angle to the object to capture a second (or left) perspective view image. Likewise, the third image capturing device includes a lens73and a sensor83and is mounted at another slanted angle to the object to capture a third (or front) perspective view image. The second image capturing device and the third image capturing device are arranged in such a way that the second (or left) perspective viewing angle is orthogonal to the third (or front) perspective viewing angle. Mirrors (62,63) are included for the second and third image capturing devices.

The optical axis of the first image capturing device (i.e. the line passing through the center of the lens71and the center of the sensor81) and the optical axis of the second image capturing device (i.e. the line passing through the center of the lens72and the center of the sensor82) form a first alignment plane.

The optical axis of the first image capturing device (i.e. the line passing through the center of the lens71and the center of the sensor81) and the optical axis of the third image capturing device (i.e. the line passing through the center of the lens73and the center of the sensor83) form a second alignment plane. The first alignment plane and the second alignment plane are orthogonal to each other. This is further illustrated inFIG. 2.

FIG. 2depicts a bottom view of the arrangement of the three image capturing devices. The three image capturing devices form a “corner shape,” “L-shape,” or “backwards L-shape” whereby the first image capturing device81is in the center, the second image capturing device82is on the left side of the first image capturing device81, and the third image capturing device83is on the front side of the first image capturing device81.

The three image capturing devices are calibrated with multi-view stereo vision principles so that the internal parameters of the respective image capturing devices and the exterior parameters or the relative poses of the three image capturing devices can be determined. These parameters are later used to reconstruct the three-dimensional coordinates of the points of interest on the object to be inspected.

FIGS. 3A and 3Bdepict an object, such as a QFP, to be inspected20.FIG. 3Adepicts the bottom view of the object andFIG. 3Bdepicts a lateral view. The object has four rows of leads, with each row of leads on one side of the object. The four rows are designated top row of leads31, bottom row of leads32, left row of leads33, and right row of leads34. Each lead has a lead shoulder35, a lead leg36and a lead foot37. The end of lead foot is lead tip38. Lead foot angle is the angle of the lead foot37with respect to a reference plane. The reference plane can be a seating plane formed by the lead tips of the few lowest leads or a least mean square plane fitted through the lead tips of all the leads.

The system can also be used to inspect objects with alternative designs such as Thin Small Outline Packages (TSOP). For example, a chip or an electronic component can have two rows of leads only, such as top row of leads and bottom row of leads, or left row of leads and right row of leads (not shown).

To establish the reference plane, the leads tips of all the leads are detected. For example, refer to the top row of leads31. For each lead in the top row31, the lead tip point41is detected in the bottom view image as shown inFIG. 4A. For the same lead, the lead tip point51is detected in the left perspective view image as shown inFIG. 4B. The detected lead tip point41and the detected lead tip point51can be referred to as “conjugate points” which correspond to the same physical lead tip yet in images taken from different cameras. From the detected conjugate points and the calibration results, the three-dimensional coordinates of the physical lead tip of the corresponding lead in the top row31can be determined.

Similarly, for each lead in the bottom row32, the lead tip point43is detected in the bottom view image and the lead tip point53is detected in the left perspective view image. From the detected conjugate points43and53, and the calibration results, the three-dimensional coordinates of the physical lead tip of the corresponding lead in the bottom row32can be determined.

For each lead in the left row33, the lead tip point45is detected in the bottom view image as shown inFIG. 4A. For the same lead, the lead tip point55is detected in the front perspective view image as shown inFIG. 4C. The detected lead tip point45and the detected lead tip point55are conjugate points. From the conjugate points and the calibration results, the three-dimensional coordinates of the lead tip of the corresponding lead in the left row33can be determined.

Similarly, for each lead in the right row34, the lead tip point47is detected in the bottom view image and the lead tip point57is detected in the front perspective view image. From the detected conjugate points47and57, and the calibration results, the three-dimensional coordinates of the lead tip of the corresponding lead in the right row34can be determined.

With the three-dimensional coordinates of the lead tips of all the leads in the rows (31,32,33,34) a reference plane can be established in the three-dimensional space. The reference plane can be a seating plane formed by the lead tips of the few lowest leads or a least mean square plane fitted through the lead tips of all the leads. The reference plane will be the base plane for determining the lead foot angle of each lead.

To determine the lead foot angle of each lead, it is necessary to detect at least one more point on the lead foot. Take the top row of leads31again as an example. For each lead in the top row31, another point42on the lead foot, which is at a preset distance away from the lead tip point41, is detected in the bottom view image as shown inFIG. 4A. For the same lead, a point52on the lead foot, which is at the same distance away from the lead tip point51, is detected in the left perspective view image as shown inFIG. 4B. The detected point42and the detected point52are conjugate points as well. From the conjugate points and the calibration results, the three-dimensional coordinates of the corresponding point on the lead foot of the corresponding lead in the top row31can be determined.

Similarly, for each lead in the bottom row32, a point44on the lead foot, which is at a preset distance away from the lead tip point43, is detected in the bottom view image, and a point54on the lead foot, which is at the same distance away from the lead tip point53, is detected in the left perspective view image. From the detected conjugate points44and54, and the calibration results, the three-dimensional coordinates of the corresponding point on the lead foot of the corresponding lead in the bottom row32can be determined.

For each lead in the left row33, a point46on the lead foot, which is at a preset distance away from the lead tip point45, is detected in the bottom view image as shown inFIG. 4A. For the same lead, a point56on the lead foot, which is at the same distance away from the lead tip point55, is detected in the front perspective view image as shown inFIG. 4C. From the detected conjugate points46and56, and the calibration results, the three-dimensional coordinates of the corresponding point on the lead foot of the corresponding lead in the left row33can be determined.

Similarly, for each lead in the right row34, a point48on the lead foot, which is at a preset distance away from the lead tip point47, is detected in the bottom view image, and a point58on the lead foot, which is the same distance away from the lead tip point57, is detected in the front perspective view image. From the detected conjugate points48and58, and the calibration results, the three-dimensional coordinates of the corresponding point on the lead foot of the corresponding lead in the right row34can be determined.

FIGS. 5A and 5Billustrate the detailed method of detecting the lead tip point and the additional point on the lead foot for one lead in the top row31.FIG. 5Adepicts the bottom view image andFIG. 5Bdepicts the left perspective view image.

As shown inFIG. 5A, a horizontal edge detection window64is put near the lead tip. Two edge points14and24are detected as the sharpest transitions in the vertical projection profile. Let the x coordinate of the edge point14be x1and the x coordinate of the edge point24be x2. Let the middle of x1and x2be x0. A vertical edge detection window66is put on the lead tip. One edge point94is detected as the sharpest transition in the horizontal projection profile. Let the y coordinate of the edge point94be y0. Then, the x, y coordinates of the detected lead tip point on the lead will be (x0, y0). Another horizontal edge detection window65is put at a preset distance99away from the lead tip point94. Two edge points15and25are detected as the sharpest transitions in the vertically projection profile. The middle point95between the point15and the point25will be the detected additional point on the lead foot.

Similarly, the lead tip point97and the middle point98on the lead foot of the same lead are detected in the left perspective view image as shown inFIG. 5B. A horizontal edge detection window67is put near the lead tip. Two edge points17and27are detected as the sharpest transitions in the vertical projection profile. A vertical edge detection window69is put on the lead tip. The edge point97is detected as the sharpest transition in the horizontal projection profile. The middle of the x coordinates of the edge points17and27will be the x coordinate of the detected lead tip point on the lead. The y coordinate of the edge point97will be the y coordinate of the detected lead tip point on the lead. Another horizontal edge detection window68is put at the same preset distance99away from the lead tip point97. Two edge points18and68are detected as the sharpest transitions in the vertically projection profile. The middle point98between the points18and28will be the detected additional point on the lead foot.

The lead tip point94on the bottom view image inFIG. 5Aand the lead tip point97on the left perspective view image inFIG. 5Bare conjugate points. They correspond to the lead tip of the same physical lead. From the conjugate points94and97, and the calibration results, the three-dimensional coordinates of the physical lead tip91as shown inFIG. 5Ccan be reconstructed.

The point95on the lead foot on the bottom view image inFIG. 5Aand the point98on the lead foot on the left perspective view image are conjugate points. They correspond to the same physical point on the lead foot of the same lead. From the conjugate points95and98, and the calibration results, the three-dimensional coordinates of the physical point92on the lead foot as shown inFIG. 5Ccan be reconstructed.

As shown inFIG. 5C, the physical point92on the lead foot and the physical lead tip91form a three-dimensional line in the three dimensional space. This is the lead foot line of the lead. The acute angle between the three-dimensional lead foot line and the three-dimensional reference plane90will be the lead foot angle93of the lead.

The lead foot angle of a lead can be positive or negative. With a positive lead foot angle, the lead foot is directed toward the reference plane90as shown inFIG. 5C. With a negative lead foot angle, the lead foot is directed away from the reference plane90as shown inFIG. 5D.

Multiple additional points on the lead foot can be detected to improve the accuracy and the robustness of the method as shown inFIG. 6A,FIG. 6BandFIG. 6C. In this case, a three-dimensional lead foot line is fit through the three-dimensional coordinates of all the detected points. The lead foot angle is the acute angle between the three-dimensional lead foot line and the three-dimensional reference plane.

As described above, for the top row of leads31and the bottom row of leads32, whereby the direction of the leads are along the normal direction of the alignment plane formed by the bottom viewing angle and the left perspective viewing angle, the additional points on the lead foot are detected in the bottom view image and the left perspective view image respectively. Whereas, for the left row of leads33and the right row of leads34, whereby the direction of the leads are along the normal direction of the alignment plane formed by the bottom viewing angle and the front perspective viewing angle, the additional points on the lead foot are detected in the bottom view image and the front perspective view image.

The reasoning behind this method is as follows. The additional point on the lead foot is defined as a point at a preset distance away from the lead tip. As shown inFIG. 4B, for the top row of leads31and the bottom row of leads32, the point on the lead foot are defined at a certain distance away from the lead tip along the y axis or in the vertical direction. As the distance is a preset fixed value, it does not contain any three-dimensional information. So the three-dimensional information for the point on the lead foot can only be extracted along the x axis or in the horizontal direction. The left perspective view image contains this information.

Take the top row of leads31as an example. As shown inFIG. 5B, the point98is the additional point defined on the lead foot. The distance from the point98to the lead tip point97is preset, which is the offset of the y coordinate of the point98with respect to the point97. So, the y coordinate of the point98has no three-dimensional information. The offset of the x coordinate does contain the three-dimensional information on the left perspective view image.

Similarly, as shown inFIG. 4C, for the left row of leads33and the right row of leads34, the point on the lead foot is defined as a point at a certain distance away from the lead tip point along the x axis or in the horizontal direction. So the x coordinate does not contain the three-dimensional information of the point. The three-dimensional information of the point must be extracted along the y axis or in the vertical direction. The front perspective view image contains this information exactly.

This also helps explain the L-shape arrangement of the three image capturing devices in the system. The combination of the bottom view image capturing device and the left perspective view image capturing device is used for lead foot angle inspection for the top row of leads and the bottom row of leads. The combination of the bottom view image capturing device and the front perspective view image capturing device is used for lead foot angle inspection for the left row of leads and the right row of leads.

Additional image capturing devices can be added to improve the accuracy and the robustness of the apparatus. As shown inFIG. 7, a fourth image capturing device84can be added and be mounted in a position symmetric to the second image capturing device82with respect to the first image capturing device81. And a fifth image capturing device85can be added and be mounted in a position symmetric to the third image capturing device83with respect to the first image capturing device81. As a whole, the five image capturing devices form a cross-shape. The fourth image capturing device84captures a right perspective view image of the object to be inspected. The fifth image capturing device85captures a back perspective view image of the object to be inspected.

In the cross-shape configuration, the combination of the bottom view image, the left perspective view image and the right perspective view image is used to inspect the lead foot angle of the top row of leads and the bottom row of leads, and the combination of the bottom view image, the front perspective view image and the back perspective view image is used to inspect the lead foot angle of the left row of leads and the right row of leads.

Each of the fourth and the fifth image capturing device has a lens and a sensor as well. The optical axis of the fourth image capturing device (i.e. the line passing through the center of the lens and the center of the sensor), the optical axis of the first image capturing device and the optical axis of the second image capturing device form a first alignment plane.

The optical axis of the fifth image capturing device (the line passing through the center of the lens and the center of the sensor), the optical axis of the first image capturing device and the optical axis of the third image capturing device form a second alignment plane. The first alignment plane and the second alignment plane are orthogonal to each other.

The cross-shape configuration can be more accurate and more robust than the L-shape configuration.

The steps of analyzing the lead foot angle are depicted inFIG. 9. First, the lead tip is detected in the bottom view image and the left (or front) perspective view image as depicted at step105and110. The three-dimensional coordinates of the lead tip are reconstructed using stereo vision techniques as depicted at step115. Repeat the steps105,110and115for all the other leads. Using the three-dimensional coordinates of the lead tips, a reference plane can be established in the three-dimensional space125.

Next, one or multiple additional points on the lead foot area are detected in the bottom view image and the left (or front) perspective view image as depicted at step130and135. The three-dimensional coordinates of the additional points are reconstructed using stereo vision techniques as depicted at step140. By connecting the lead tip and the additional points, the lead foot line can be constructed as depicted at step145. The acute angle between the lead foot line and the reference plane will be the lead foot angle as depicted at step150. Repeat the steps (130,135,140,145, and150) for all the other leads155.

Finally, the object such as the QFP is determined to be accepted or rejected based on lead foot angles as at step160. A lead bent beyond a specific angle (positive or negative) can indicate a defective or damaged QFP. When the lead foot angles of all the leads are within the desired tolerance, the QFP is acceptable.