This invention relates generally to methods and systems for aligning and comparing free-form surfaces.
Free-form surfaces, or complex surfaces, are used widely in many fields with applications growing continuously from traditional tool and die making, the design and manufacturing of patterns and models, plastics, automotive, aerospace, biomedical, entertainment and geographical data. Specifically, in designing and manufacturing a free form surface, a manufactured or reconstructed part is compared to the free form surface of design specifications to verify conformance.
Accurate alignment of free form surfaces is required before a comparison between the two free form surfaces can be made. Unfortunately, the necessary accurate alignment is difficult to achieve. Methods disclosed in U.S. Pat. No. 5,481,483 and U.S. Pat. No. 5,384,717 use the determination of dimensional information of a boundary, such as the location and radius of a circular reference feature. The method disclosed in U.S. Pat. No. 5,319,567 uses the determination of dimensional information of a selected reference feature having a planar boundary. The method disclosed in U.S. Pat. No. 5,991,703 obtains measurement data of free-form surfaces based on local shapes such as mountain, valley, and peak using principal curvature as an evaluation model. The method disclosed in U.S. Pat. No. 5,546,328 requires that the two free-form surfaces be in crude alignment in the same coordinate frame before a more accurate automatic alignment can be performed. The selection of a reference feature or crude alignment in coordinate frame, characteristic of the prior art methods typically require the time and expense of a skilled operator.
Therefore, there is a need in the art for methods and systems for aligning and comparing free-form surfaces which are automatic or less labour intensive than those found in the prior art.
This invention provides for a method for automatically aligning free-form surfaces having arbitrary initial positions based on the determination of corresponding regions followed by the determination of corresponding points for determining the differences between those free-form surfaces.
In one aspect, the invention comprises a computer-implemented method of:
In another aspect, the invention comprises a system for comparing a first free-form surface with a second free-form surface, comprising:
In another aspect, the invention may comprise storage medium encoded with machine-readable computer program code for comparing a first free-form surface with a second free-form surface, the storage medium including instructions for causing a computer system to implement a method of the present invention as described and claimed herein.
The invention may now be described with reference to the following drawings.
The present invention provides a method and system for comparing two free-form surfaces. One free-form surface, alternatively called a first surface, or a reference surface is a design model which represents the surface shape which is intended to be produced. The other free-form surface, alternatively called a second surface, or a measurement surface, is the manufactured or produced model. The present invention provides means for determining the differences between the manufactured model from the design model.
A schematic flowchart representation of one embodiment of the present invention is shown in
As used herein, a “free-form surface” shall mean a surface which is not defined analytically such as conic surfaces such that its shape is not constrained by classical analytical forms. A free-form surface is defined by a set of control points, as with Bézier, b-spline, and NURBS surfaces. Free-form surfaces are also known as sculptured surfaces. A free-form surface may have surface information or surface characteristics such as Gauss curvature, mean curvature, principle curvatures, shape index, shape scale and regional area relevant to an individual region within the surface area.
Once a measurement set for each of the first and second surfaces is available, the next step is to extract surface information from each of the first and second free-from surfaces for determining surface characteristics. Surface information may include principle curvatures, Gaussian curvature, mean curvature, shape index and shape scale are calculated. In one example, a free-form surface in the parametric form is denoted as P, and the parameters describing the surface are u and v. The following information may be calculated at each surface point:
The first and second derivatives, and the surface normal of the surface are:
Based on the above, the principle curvatures k1 and k2 may be calculated:
Once the above information is available, a surface information matrix is created to store these values.
If the surface is not described in parametric form, the above surface information can be calculated by fitting surface patches then obtaining the required information, or by direct estimation from the surface data.
After surface information has been extracted, each of the first and second free-form surfaces may be partitioned into at least three regions, wherein each region is characterized by at least one surface characteristic.
Based on the analysis of surface information matrix, points of the surface are categorized into different groups or regions based on their similarities of the shape characteristics including, without limitation, concave, convex, saddle, and plane. By doing so, both the first surface and the second surface will be partitioned into a plurality of regions, each containing points with identical or similar shape characteristics. As used herein, a “region” shall mean an area consisting of points that are neighboring to each other and have similar surface shape type such as concave, convex, saddle or plane. As shown in
For each surface, the average values obtained from all the points inside an individual region are taken as the surface information of this region. In addition, the area of a region is also calculated as an item surface information. The values of these surface characteristics will be used as the comparison criteria in selecting matching regions between the first and the second surfaces.
It is then possible to determine the position of each region relative to other regions, for each of the first and the second free-from surfaces. As used herein, “position” shall mean the location and orientation of a geometric element such as a point, a surface patch and the like in three-dimensional space.
In three-dimensional space, an arbitrary region A of a surface has positional relationship with other regions of the surface, which includes:
The relative positional relationships between these regions may then be used as an evaluation criterion for region matching.
The next step is to compare regions of the first free-form surface regions with those of the second free-form surface to determine corresponding or matching regions. Corresponding regions are those regions, one each from the reference and measurement surfaces, which have the most similar surface characteristics.
In one embodiment, correspondence between the first surface and the second surface is firstly established based on selecting the corresponding regions between these two surfaces. The corresponding regions of these two surfaces are determined based on the evaluation of:
After evaluation, two regions with the smallest difference in these comparison criteria are marked as the matching regions.
Once corresponding regions are identified in the first and second surfaces, the next step is to determine matching pairs of corresponding points from the two surfaces. For every point on reference surface, there exists a corresponding point on the measurement surface, which is manufactured according to the design model. This pair of points is referred to herein as corresponding points. The corresponding points of the two surfaces can be selected from the relative center points of two corresponding regions. Alternatively, the corresponding points may be selected from the points having the most similar surface characteristics from inside the corresponding regions. In one embodiment, at least three pairs of corresponding points are determined from the two surfaces.
In one embodiment, localization of the first free-form surface to the second free-form surface is carried out in two steps. First a general localization is performed followed by a specific localization. Localization is a process where the measurement surface is compared with the reference surface after aligning the two surfaces in a common coordinate system.
Based on the above correspondence in points, general localization is carried out to localize one surface to the other. In one embodiment, this is implemented by applying a rigid 3D transformation(s) to that surface being localized. In one embodiment, a linear process model is utilized to determine transformation matrix T based on the corresponding relationship and the minimization of the surfaces distance using the least square principle. As used herein, “transformation” means the operation of changing (as by rotation, translation or mapping) one configuration or expression into another in accordance with a mathematical rule; or a change of variables or coordinates in which a function of new variables or coordinates is substituted for each original variable or coordinate. Similarly, a “translation” means a transformation of coordinates in which the new axes are parallel to the old ones, or uniform motion of a body in a straight line. The term “rotation” means the action or process of rotating on or as if on an axis or center. In this application, it indicates the process of surface rotation around an arbitrary axis.
Transformation matrix T is determined as follows. If ri* denote an arbitrary point on the first surface and ri denote the corresponding point from the second surface, than transformation matrix T that localizes the first surface to the second surface can be determined by following process:
At first, calculate the distance between localized point ri* and its corresponding point ri:
di=Tr*−ri
Then find the squared distance between these two points:
fi=di2=(Tri*−ri)T(Tri*−ri)
The total of the squared distances of all the above points on these two surfaces is F
Transformation matrix, T, can be decided based on the criterion that it will make F minimum. By minimizing F with respect to the elements of T, the elements of matrix T can be calculated
General localization aligns those two surfaces close to each other. The next step is to carry out the fine localization so as to enable the surface comparison. To do so, more corresponding points from these two surfaces need to be decided for the fine localization.
These corresponding points are selected from inside of the corresponding regions of the two surfaces. The criteria for selecting the corresponding points in this step are:
Corresponding points may be determined by an Iterative Closest Point (ICP) algorithm which is a method that decides corresponding points by choosing the closest points on reference and measurement surfaces in an iterative way. An iterative process is one in which repetition of a sequence of operations yields results successively closer to a desired result. Iterative processes may include the repetition of a sequence of computer instructions a specified number of times or until a specified condition is met.
In one embodiment, the Newton method is used to find the closest point in the process of selecting corresponding points. In some cases, particularly the boundary points of the surfaces, this method may not be stable or may not give solutions. In this event, a subdivision method may be utilized to solve the problem. In a subdivision method, the closest point is firstly chosen from a selected region. Then the search continues with the subdivision of that region, which reduces the search range to a smaller portion of the area. The search of the closest point will stop when the subdivision step is small enough.
After general localization and matching of corresponding points, a fine localization of the first surface to the second surface may be performed.
Based on the corresponding result obtained from the above step, the fine localization can be carried out to localize the first surface to the second surface such that the sum of the squared differences between all the corresponding points is minimized. The 3D transformation in this operation is determined in a similar manner as in the general localization process.
Once a general and a fine localization has been carried out, the difference between the points in each pair of the corresponding point sets may be determined. The difference between two corresponding points is calculated on a point by point basis. Fine localization is complete when the sum of the squared differences reaches a pre-defined threshold value. If the threshold value is not reached, the fine localization process may be repeated until the threshold is reached.
As described above, the present invention can be embodied in the form of computer-implemented processes and apparatuses for practicing those processes. The present invention can also be embodied in the form of computer program code containing instructions embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other computer-readable storage medium, wherein, when the computer program code is loaded into and executed by a computer, the computer becomes an apparatus for practicing the invention. The present invention can also be embodied in the form of computer program code, for example, whether stored in a storage medium, loaded into and/or executed by a computer, or transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via electromagnetic radiation, wherein, when the computer program code is loaded into and executed by a computer, the computer becomes an apparatus for practicing the invention. When implemented on a general-purpose microprocessor, the computer program code segments configure the microprocessor to create specific logic circuits.
One embodiment of a system of the present invention is shown schematically in a block diagram in
The computer system (10) includes both primary storage (24) and secondary storage (26). The secondary storage (26) may include a number of different types of persistent storage. For example, the secondary storage (26) may include CD-ROM, floppy disks, hard disks and or any other suitable computer-readable medium, including other devices that use optical, magnetic or other recording material. The primary storage (24) may also include a number of different types of well-known storage, such as DRAM, SRAM, and the like.
The computer system (10) further includes a facility for generating a mathematical model of an object or a free-form surface. The system may be linked to a laser scanner (28) or similar equipment. Additionally, or alternatively, a computer-aided design system (CAD/CAM) may be incorporated for producing a model corresponding to surfaces of an object or an assembly of a plurality of objects. In one embodiment, the CAD/CAM system is used to provide the reference free-form surface, while the measurement surface is obtained from the laser scanner system. The display unit (16) can provide a visual depiction of either or both the free-form surfaces.
The secondary storage device (26) may store executable instructions for aligning and comparing two free-form surfaces in accordance with the methods of the present invention. Those skilled in the art will appreciate that the computer system shown in
As will be apparent to those skilled in the art, various modifications, adaptations and variations of the foregoing specific disclosure can be made without departing from the scope of the invention claimed herein. The various features and elements of the described invention may be combined in a manner different from the combinations described or claimed herein, without departing from the scope of the invention.
Number | Date | Country | |
---|---|---|---|
60320288 | Jun 2003 | US |