1. Technical Field
Embodiments of the present disclosure relate to image measuring techniques, and more particularly to a computing device and a method of establishing coordinate systems on surfaces of objects.
2. Description of Related Art
Image measuring techniques are widely used in the measurement field for precisely, accurately, and speedily measuring objects. During measurement of an object, a coordinate system needs to be established. Usually, the coordinate system is established by selecting a point, a line, and a plane on surfaces of the object.
However, a spherical object has no flat plane on its surface, thus such a coordinate system cannot engender precision in measurements.
In general, the word “module,” as used hereinafter, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or Assembly. One or more software instructions in the modules may be embedded in firmware. It will be appreciated that modules may comprised connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
The coordinate system establishing system 10 includes computerized codes in the form of one or more programs, which are stored in the storage device 11. In present embodiment, the one or more programs of the coordinate system establishing system 10 are described in the form of function modules (see
The storage device 11 may include some type(s) of non-transitory computer-readable storage mediums, such as a hard disk drive, a compact disc, a digital video disc, or a tape drive. In one embodiment, the storage device 11 stores data needed when establishing the coordinate system on the surface of the object 3. The data may include a computer aided design (CAD) file of each surface of the object 3. The CAD files are obtained from the scans carried out by the measurement equipment 2 and includes controlling points, weights, and nodes of the surface.
The controlling device 12 may be a processor, a microprocessor, an application-specific integrated circuit (ASIC), and a field programmable gate array, (FPGA) for example.
The display device 13 displays visible data such as graphic representations of the object 3.
Referring to
In step S2, the model constructing module 100 converts the CAD model to a two dimensional (2D) UV plane. The letters “U” and “V” denote a horizontal axis and vertical axis of a 2D plane. In one embodiment, the model constructing module 100 maps the CAD model into a 2D space to convert the CAD model to the UV plane. For example, if the CAD model is a sphere, it is represented in the UV plane as a circle.
In step S3, the model constructing module 100 computes intersection points of borders of the UV plane and equidistant lines in a U direction and in a V direction, as shown in
In step S4, the model constructing module 100 selects one of UV boxes which are formed by the equidistant lines. The UV boxes can be seen in
In step S5, the model constructing module 100 determines if the selected UV box contains at least one of the intersection points. If the selected UV box contains at least one of the intersection points, the steps in
In step S6, the model constructing module 100 divides the selected UV box into two triangles. Referring to
In step S7, the model constructing module 100 adds the two triangles into a triangle array. The process goes to step S1 after step S7.
Referring to
In step S9, the model constructing module 100 adds the points into a first point array.
In step S10, the model constructing module 100 selects one point from the first point array as a first point. The selection of the first point may be random or according to a predetermined sequence.
In step S11, the model constructing module 100 selects one point which is nearest to the first point from the first point array as a second point.
In step S12, the model constructing module 100 further selects one point from the first point array as a third point, and constructs a triangle using the first point, the second point, and the third point. The third point may be any point in the first point array excluding the first point and the second point.
In step S13, the model constructing module 100 determines if any point in the first point array is contained in a circumscribed circle of the constructed triangle. If any point in the first point array is contained in a circumscribed circle of the constructed triangle, the process goes back to Step S12 Otherwise, if no point in the first point array is contained in a circumscribed circle of the constructed triangle, the process goes to step S14.
In step S14, the model constructing module 100 adds the constructed triangle into the triangle array.
In step S15, the model constructing module 100 determines if any point in the first point array has not been selected as the first point. If any point in the first point array has not been selected as the first point, the process goes back to step S10. Otherwise, if each of the points in the first point array have been selected as the first point, the process goes to step S16.
Referring to
In step S17, the model constructing module 100 triangularly meshes the CAD model according to the conversion between the CAD model and the UV plane, using the triangle array to generate a triangular mesh model.
Referring to
In step S19, the first acquiring module 101 constructs a cubic box which is centered at the selected point and has a length of N units. In one embodiment, the length of the unit N is equal to lengths of the UV boxes.
In step S20, the first acquiring module 101 searches for a triangle from the triangular mesh model, wherein the triangle is contained in the cubic box and a distance between the center of the searched triangle and the selected point is greater than a predetermined distance, and an angle between a vector of the searched triangle and the triangle which contains the selected point is less than a predetermined angle.
In step S21, the first acquiring module 101 determines if the searched triangle exists. If the searched triangle does not exist, t he process goes to step S22. Otherwise, if the searched triangle exists, the process goes to step S23.
In step S22, the first acquiring module 101 replaces N with N+1. For example, if N=3, then the first acquiring module 101 replaces 3 with 4. After step S22, the process goes to step S19.
In step S23, the first acquiring module 101 computes a distance between a line and the CAD model, where the line is formed by the center of the searched triangle and the selected point.
In step S24, the first acquiring module 101 determines if the computed distance is less than a predetermined tolerance. If the computed distance is less than the predetermined tolerance, the process goes back to step S22 to replace N with N+1.
Otherwise, if the computed distance is not less than the predetermined tolerance, the process goes to step S25. In one embodiment, when the computed distance is less than the predetermined tolerance, the potential for collisions exists when the measurement device 2 measures the object 3.
In step S25, the first acquiring module 101 adds the center of the searched triangle and the vector of the searched triangle into the second point array.
In step S26, the first acquiring module 101 determines if a number of the points in the second point array has reached a predetermined number. If the number of the points in the second point array is less than the predetermined number, the process goes to step S27. Otherwise, if the number of the points in the second point array has reached the predetermined number, the steps in
In step S27, the first acquiring module 101 replaces the selected point with the center of the searched triangle. The process goes to step S19 after step S27.
Referring to
In step S29, the second acquiring module 102 samples points on the surface of the object 3 using the I++ measurement program, and obtains real points corresponding to the points in the second point array. Such real points are points sampled on the surface of the object 3, and the points in the second point array are points selected on the CAD model of the surface of the object 3.
In step S30, the aligning module 103 computes a conversion matrix by aligning the real points and the points in the second point array.
In step S31, the coordinate system establishing module 104 establishes a coordinate system of the surface of the object 3 according to the conversion matrix.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2012101614849 | May 2012 | CN | national |