The present invention relates to a shape inspection method and an inspection apparatus therefor.
In order to secure quality of products during working and assembling in manufacturing, working tools and inspection techniques of shape/surface states of products are required that are capable of feedback to a quantitative manufacturing process less susceptible to skills of a visual inspector However, inspection objects may have complicated shapes in many cases and it may be difficult to perform an automatic inspection.
In Patent Literature 1, proposed is a method for performing three-dimensional shape measurement having excellent accuracy by adjusting a laser light amount so that a reflected light amount is fixed even when a color or a shade is added to a three-dimensional shape, in three-dimensional shape measurement capable of performing three-dimensional shape measurement in a wide range on the basis of a light-section method by scanning a laser beam
In Patent Literature 2, a three-dimensional shape measuring apparatus is described that is configured by including a supporting device on which an inspection object is mounted, an image pickup device that illuminates the inspection object mounted on the supporting device, receives light from the inspection object, and images the inspection object, a measurement processing unit that measures the inspection object on the basis of an image of the inspection object imaged by the image pickup device, a moving mechanism that supports the supporting device and the image pickup device such that at least three relative movements among relative rotation movements around three axes perpendicular to one another and relative horizontal movements in the three axis directions are possible, and a drive control device that controls the supporting device and the image pickup device to move relative to each other; further, the drive control device has a first operation control mode for performing the relative movement control of the image pickup device and the supporting device in order to scan an imaging part on the inspection object by the image pickup device, and a second operation control mode for performing the relative movement control of the image pickup device and the supporting device by maintaining a state in which the image pickup device can image the imaging part.
In Patent Literature 1, control of a relative position between an inspection object and an irradiation laser beam is not considered. Therefore, measurement accuracy in the light-section method is different due to the irradiation laser beam and an inclination of a surface as well as reflection characteristics of the surface in the inspection object, and as a result complicated shapes cannot be stably measured.
Further, in Patent Literature 2, the three-dimensional shape measuring apparatus has a mechanism capable of controlling a relative position between the supporting device and the image pickup device of the inspection object in order to secure measurement accuracy. However, it is difficult to control the relative position so that the relative position between the supporting device and the image pickup device is measured stably and with high accuracy on the basis of measurement characteristics of the image pickup device. Further, it takes time to teach a control method and a variation occurs in the measurement accuracy depending on a worker that performs the teaching.
To cope with problems, in view of the foregoing, it is an object of the present invention to provide a shape inspection method and apparatus that are capable of measuring, stably and with high accuracy, complicated three-dimensional shapes.
To solve the foregoing problems, according to one aspect of the present invention, provided is a shape inspection apparatus comprising a three-dimensional shape sensor that obtains shape data of an inspection target, a path setting unit that sets a path through which a relative position of the three-dimensional shape sensor relative to the inspection target passes during inspection by using reference data representing the shape data of the inspection target, and a driving unit that controls the relative position of the three-dimensional shape sensor relative to the inspection target.
Further, according to another aspect of the present invention, provided is a shape inspection method comprising setting, by using reference data representing shape data of an inspection target, a path through which a relative position of a three-dimensional shape sensor relative to the inspection target passes during inspection, controlling the relative position of the three-dimensional shape sensor relative to the inspection target so as to pass through the set path, and obtaining the shape data of the inspection target by the three-dimensional shape sensor.
According to the present invention, it is possible to provide the shape inspection method and apparatus that are capable of measuring, stably and with high accuracy, complicated three-dimensional shapes.
A first embodiment of the present invention will be described with reference to
In
Further, all of inspection object 1, holding mechanisms 101 and 102, and servomotor 103 are held by base 105, and base 105 is mounted on x stage 106, y stage 107, and goniostage 108. A rotation direction of goniostage 108 is within a y-z plane, and an axis of rotation is in a direction of an x axis. X stage 106, y stage 107, goniostage 108, and base 105 are mounted on vibration isolation surface plate 110. By using a PC for control 140, operations of servomotor 103 are controlled via a motor controller 104, and operations of three of x stage 106, y stage 107, and goniostage 108 are controlled via stage controller 109 of three axes.
In the three-dimensional measuring apparatus illustrated in
Control unit 140 performs synchronization control of each stage and distance measuring unit 130 and measures point clouds, and integrates a lot of point clouds as one shape data by point cloud integration unit 1401. By defect quantification unit 1402, control unit 140 calculates a difference between the shape data and reference shape data 142 representing a design shape or an ideal shape, such as CAD (Computer Aided Design) data, and quantifies the above difference. Further, by defect determination unit 1403, control unit 140 performs threshold processing and determines whether or not a defect occurs.
Hereinafter, a three-dimensional shape measurement/inspection method having an optimization function on the relative position between the inspection object and the distance measuring sensor in the present embodiment will he described in detail.
An inspection flow is illustrated in
Hereinafter, each step will be described in detail.
(S100)
Depending on distance measuring sensor 131 to be used, distance measuring unit 130 differs in characteristics thereof In a noncontact technique using light, reflected light or diffused light from inspection object 1 is generally used, and therefore measurement accuracy is changed in accordance with an inclination degree of a laser beam irradiated from distance measuring sensor 131 and a measurement spot of inspection object 1. In path setting unit 150, an optimum value for control on the relative position between path setting unit 150 and inspection object 1 is derived in accordance with the measurement accuracy of distance measuring sensor 131 on the basis of shape information to be measured of the CAD data etc. Details of path setting unit 150 will be described below.
(S101)
The relative position between inspection object 1 and distance measuring unit 130 is controlled by servomotor 103, x stage 106, y stage 107, and goniostage 108. Each stage is controlled so as to cover a measurement area of inspection object 1, and the point cloud representing the coordinates in the 3D space is obtained. The postures are determined by x stage 106 and goniostage 108, and servomotor 103 and y stage 107 are scanned. By distance measuring unit 130, a distance between a surface of inspection object 1 and distance measuring unit 130 is measured, and therefore the distance is converted into the coordinates of the 3D space by positional information of each stage.
(S102)
In the point clouds measured by distance measuring unit 130, an exception value is generated due to the measurement error of distance measuring unit 130. The above exception value is generally removed for statistical properties of the measured point clouds. For example, differences in positions of the point clouds that are densely packed in a certain noted range are indicated by standard deviation, and processing is considered in which a point from which a distance of N times the standard deviation is separated is set to be an exception value.
(S103)
The point cloud and the CAD data are compared, and defect of shape is quantified. Further, in the case in which the CAD data is not present, the point cloud is compared with nondefective unit shape data in which a nondefective unit is digitalized by procedures of S100 to S103, and the defect of shape can be quantified. Further, in the case in which the point cloud obtained at S102 is compared with the CAD data or the like, the point cloud may be converted into mesh data having normal information. As a conversion method, a Ball-Pivoting method, a Power Crust method, or the like can be used
(S104)
A threshold is previously set to a defect-of-shape value quantified at S103, and an OK/NG determination is automatically performed in which the threshold or less is set to be OK and the threshold or more is set to be NG The threshold represents deviation from an ideal value or a design value of inspection object 1 and a user arbitrarily sets the threshold as usage.
Hereinafter, details of path setting unit 150 will be described. By using measurement accuracy characteristics of distance measuring sensor 131 and reference data representing a shape of inspection object 1 such as the CAD data previously prepared or the shape data previously obtained in the path setting unit, an appropriate setting value on the relative position between distance measuring sensor 131 and inspection object 1 is derived. The measurement accuracy characteristics indicate the accuracy dependence according to a distance between inspection object 1 and distance measuring sensor 131 or the like, such as the accuracy dependence of an angle formed by a measurement surface of inspection object 1 and a laser beam irradiated from distance measuring sensor 131, the accuracy dependence of amount of light that is reflected by inspection object 1 and is returned to distance measuring sensor 131, and the accuracy dependence of plane roughness of inspection object 1. In the present embodiment, a calculation procedure is illustrated in
(S200)
The CAD data or the shape data measured separately of inspection object 1 is read. A format includes a CAD format, a mesh format, a point cloud format, and the like.
(S201)
A shape measuring apparatus illustrated in FIG.) includes servomotor 103, x stage 106, y stage 107, and goniostage 108 as a movable portion. In x stage 106 and goniostage 108, initial positions of inspection object 1 and distance measuring sensor 131 are determined, and a distance between inspection object 1 and a laser beam irradiated from distance measuring sensor 131 is calculated while changing a rotation angle θ of servomotor 103 and a position y of y stage 107.
At this time, a movable range and an interval Δx of x stage 106 as well as a movable range and an interval Δg of goniostage 108 at the time of setting conditions are input. In these values, in consideration of a size of the shape data input at S200, the movable ranges of the x stage and the goniostage may be automatically set so that the entire measurement can be performed, and the intervals Δx and Δg may be set automatically depending on performances of the stages mounted on the actual apparatus Further, as the intervals are shorter, calculation conditions are increased more and a calculation time is required more hugely; therefore, the intervals Δx and Δg can be determined in consideration of the calculation time. Further, resolutions Δθ and Δy of θ and y at the time of the calculation are also input. Note, however, that the resolution may be determined automatically, such as the resolution is calculated in the same level as in a spatial resolution of the shape data input at S200, or the resolution is calculated by multiplying the spatial resolution by a certain coefficient. In addition, the number of the point clouds obtained at the time of the calculation is determined depending on the resolutions of θ and y. The number of combinations of x stage 106 and goniostage 108 capable of appropriately measuring the entire shape of inspection object 1, and the combinations thereof are determined. Since appropriate combinations are required, the movable range and the interval are given to x stage 106 and goniostage 108, and calculations of S202 are performed below in respective positions.
(S202)
Next, an angle formed by inspection object 1 and a laser beam irradiated from the distance measuring sensor is derived in each local area of the shape data read at S200. In general, the performances of the optical distance measuring sensor 131 largely depend on an angle α formed by inspection object 1 and a laser beam irradiated from distance measuring sensor 131. Here, the angle a is used as an index indicating the measurement accuracy. The angle α formed by inspection object 1 and a laser beam irradiated from distance measuring sensor 131 can be calculated mechanically when a position of each stage is determined. When a certain stage position is set, a spot in which an irradiation laser beam 1301 irradiated from distance measuring sensor 131 is radiated on inspection object 1 is a measurement point 11 as illustrated in
(S203)
A threshold at is provided for a in each surface calculated at S202, and a determination is performed in which the threshold or more is set to be OK and the threshold or less is set to be NG. The threshold at is determined by characteristics of distance measuring sensor 131 and is derived from a relationship between an inclination of the surface and accuracy necessary for the measurement. A relationship between the accuracy necessary for the measurement and the inclination α of the surface is illustrated in
(S204)
When x stage 106 and goniostage 108 are set at S202 and S203, an angle formed by each surface configuring the shape data representing inspection object 1 and distance measuring sensor 131 is calculated and the OK/NG determination based on the threshold processing is performed A calculation of S202 and S203 is repeated as much as the number of the combinations N of respective positions x and g of x stage 106 and goniostage 108 to be assumed.
(S205)
The number of times of the measurement M is specified and appropriate combinations of M times are selected from among N-ways of measurement conditions. In the case in which the shape data is mesh data, descriptions will be made. As illustrated in
(S206)
S205 is performed to all the combinations of NCM, and the measurement condition having a highest cover rate is selected as an optimum value. In addition, the measurement condition having the highest cover rate is not selected, but one of the measurement conditions more than a predetermined cover rate may be selected.
(S207)
The measurement condition is determined at S206, an order for measurement needs to be also determined in the case of actual measurement, and a measurement path needs to be set. M-ways of measurements are put in an appropriate order, and therefore optimization is performed, such as the measurement time is minimized and the measurement path (the moving amount of the relative position of distance measuring unit 130 relative to inspection object 1) is minimized. In addition, all the M-ways of measurements are not performed, but the measurement time is calculated about the predetermined number of paths, and the measurement time may be shortened so as to be minimized in the measurement time.
Hereinafter, an embodiment in the case of minimizing the measurement time will be described. With regard to M-ways of measurement positions, positions of x stage 106 are set as xi, positions of the goniostage are set as gi, and i=1, 2, 3, . . . M is set. An order of i is determined so that the measurement time is minimized. When the moving amount is set as Sxi(=|xi−xi+1|), acceleration is set as ax, deceleration is set as ax′, and velocity is set as vx at the time in which x stage 106 moves from a status i to a status i+1, a time required for movement can be described as Txi=Sxi/vx+0.5vx(1/ax+1/ax′). Similarly, when the moving amount of the goniostage is set as Sgi(=|gi−gi+1|), acceleration is set as ag, deceleration is set as gx′, and velocity is set as vg, a time required for movement can be described as Tgi=Sgi/vg+0.5vg(1/ag+1/ag′). An order of i in which E=Σ(Txi+Tgi) is minimized is derived by an optimized calculation, and thereby a shortest path is derived. In the above calculation, a portion in which movement is performed at a fixed velocity is supposed to be present, and when a smaller velocity of acceleration/deceleration is set as a, |v2/a|>S is supposed to hold. Thereby, the measurement time of inspection object 1 by distance measuring unit 130 can be shortened.
The point cloud measured as described above is compared with a design shape in CAD or the like, or an ideal shape. In the present embodiment, each position of x stage 106 and goniostage 108 is set as a parameter, and the measurement is performed more than once. When the point cloud is compared with the CAD or the like, two methods are considered in which data is separately compared more than once, or data is integrated and compared. In the case in which a rough shape can be grasped in a single measurement, the point cloud may be compared with individual data. On the other hand, in the case in which an area that can be measured once is short because of a complicated shape of inspection object 1, the data may be integrated and compared.
Here, a method for integrating, by point cloud integration unit 1401, a plurality of measurement data obtained by distance measuring sensor 131 through a path set by path setting unit 150 will be described. When operations of x stage 106 and goniostage 108 are accurately compensated so as not to affect the measurement accuracy, it is enough to convert a coordinate system moved on the stage in the integration of each data. In the case in which this compensation is insufficient, both the point cloud data after the measurement need to be aligned and integrated. To integrate both the point clouds, a method using as a base an ICP (Iterative Closest Point) algorithm is widely used. In this algorithm, an arrangement of both the point clouds is optimized so that consistency is most taken from a portion of overlap in a plurality of point clouds. Therefore, the portion of overlap is essential for each point cloud. In
A plurality of measurement data are integrated, and thereby measurement results having high accuracy can be obtained over the entire inspection area.
(S405)
M-ways of combinations specified as the number of times of the measurement are selected from N-ways of combinations of x stage 106 and goniostage 108.
(S406)
Two measurement conditions are selected from M-ways of measurement conditions, and the duplication rate is calculated. The duplication rate is calculated as much as MC2-ways of combinations of all the conditions.
(S407)
A minimum value is calculated in the MC2-ways of duplication rates calculated at S406, and is compared with ε. If the minimum value is equal to or more than ε, subsequent calculations are continued; if the minimum value is equal to or less than ε, the combinations selected at S405 are not appropriate for the measurement conditions and further calculations are not performed.
(S408)
A cover rate is calculated to the combination in which the minimum value of the duplication rate is determined to be equal to or more than E at S407.
(S409)
S405 to S408 are performed as much as NCM-ways of combinations. Up to here, a method for fixing the number of times of the measurement M and calculating the cover rate is described; further, the threshold is provided in the cover rate, and the number of times of the measurement M satisfying the threshold can be calculated. In this case, until the cover rate is equal to or more than the threshold, it is enough to repeat the calculation of a path derivation flow illustrated in
An example of a GUI (Graphical User Interface) that operates a measurement path setting unit described above is illustrated in
From the above, according to the present embodiment, an inspection path through which the relative position of distance measuring unit 130 relative to inspection object 1 passes at the time of the inspection is set by path setting unit 150; thereby, a variation of the measurement accuracy is prevented from occurring depending on a worker and a complicated three-dimensional shape can be measured stably
A second embodiment of the present invention will be described with reference to
A configuration is illustrated in
As a method for obtaining shapes from images imaged by the two-dimensional camera 123, a stereo method based on a trigonometrical survey, a lens focus method in which a distance is measured by moving a focus of a lens and focusing the lens on an object, a moire method in which a grating pattern is projected on an object and a shape is measured from a pattern deformed in accordance with a shape on an object surface, or the like is used. Further, as a method for detecting a surface irregularity, a photometric stereo in which a difference in a shade due to an illumination direction is used and a direction of a normal vector of a surface on a target object is estimated, or the like is used.
Hereinafter, a case of using the stereo method in which distance measuring sensor 131 and a difference between viewpoints of a plurality of images are used and a three-dimensional shape is restored will be described in detail. The stereo method is appropriate for a shape measurement of an edge part in which a change in light and darkness is largely indicated as compared to a surrounding area in an image. Therefore, the edge part is measured by the image pickup unit 120 and a smooth surface is measured by distance measuring unit 130, and thereby a stable measurement/inspection is realized. In
(S500)
The CAD data or the shape data separately measured of inspection object 1 is read. A format includes a CAD format, a mesh format, and a point cloud format.
(S501)
The edge part is recognized from the shape data read at S500 Details of a recognition method of the edge part will be described below.
(S502)
On the basis of the determination whether the measurement unit is the edge unit or not, the measurement is performed by the image pickup unit 120 or distance measuring unit 130.
(S503)
In the case in which the measurement unit is not the edge part, the measurement is performed by distance measuring unit 130. With respect to a non-edge part in which the edge part is excluded, the measurement path is determined by path setting unit 150 through a method illustrated in
(S504)
With regard to the edge part, a stereo measurement is performed by the image pickup unit 120. At this time, a camera is set and fixed so as to be focused on a position of the measurement object, and a parallax error caused by rotation of inspection object 1 due to servoinotor 103 is used.
(S505)
The point clouds measured at S503 and S504 are integrated by conversion of the coordinate system. In distance measuring unit 130 and the image pickup unit 120, a portion of overlap is short at points to be measured due to characteristics thereof, and it is difficult to integrate the point clouds by a method such as an ICP algorithm
(S506)
In the point clouds measured by distance measuring unit 130 and the image pickup unit 120, exception values are included due to respective measurement errors. The above exception values are generally removed by a statistical property of the measurement point cloud. For example, processing is considered in which a difference in positions of the point clouds that are densely packed within a certain noted range is indicated by the standard deviation, a point from which a distance of N times the standard deviation is separated is set to be the exception value, or the like.
(S507)
The point cloud and the CAD data are compared and the defect of shape is quantified. Further, in the case in which the CAD data is not present, the point cloud is compared with the nondefective unit shape data in which the nondefective unit is digitalized by procedures of S500 to S506, and the defect of shape can be quantified. Further, in the case in which the point cloud obtained at S102 is compared with the CAD data or the like, the point cloud may be converted into mesh data having the normal information As the conversion method, the Ball-Pivoting method, the Power Crust method, or the like can be used.
(S508)
A threshold is previously set to the defect-of-shape value quantified at S103, and the OK/NG determination is automatically performed in which the threshold or less is set to be OK and the threshold or more is set to be NG. The threshold represents deviation from an ideal value or a design value of inspection object 1 and a user arbitrarily sets the threshold as usage.
Next, the recognition method of the edge part will be described In FIG flow is illustrated.
(S600)
In
(S601)
The threshold is provided and it is determined whether the curvature is equal to or more than γ, or equal to or less than γ.
(S602)
A portion in which the curvature is equal to or more than γ is recognized to be the edge part.
(S603)
A portion in which the curvature is less than γ is recognized to be the non-edge part.
From the above, according to the present embodiment, the non-edge part is measured by distance measuring unit 130, and the edge part is measured by the image pickup unit 120; thereby, the measurement having high accuracy can be performed in response to a shape of inspection object 1.
In should be noted that any of the above-described embodiments are merely concrete examples to implement the present invention, and it is to be understood that the technical scope of the present invention will not be construed restrictively by these embodiments. In other words, the present invention can be realized in various forms without departing from the technological spirit and the main features thereof
Number | Date | Country | Kind |
---|---|---|---|
2013-042494 | Mar 2013 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2014/051441 | 1/24/2014 | WO | 00 |