1. Technical Field
Embodiments of the present disclosure relate to systems and methods of product measurement, and more particularly to an electronic device and a method of optimizing a measurement path for a measurement machine when measuring a product.
2. Description of Related Art
In the field of manufacturing, most products are measured by measurement machines. Usually, when measuring a product using a measurement machine, the measurement machine needs to move along a measurement path to take all measurements (e.g., measurement elements) of the product. The measurement elements include, for example, points, lines, planes, and circles.
In the past, the measurement path of the measurement machine when taking measurements of a product is determined by the sequence of creating the measurement elements. Referring to
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The electronic device 1 is electronically connected with a measurement machine 2. The measurement machine 2 includes a data reading and transmitting module 20, a lens 21, and a platform 22. Using the lens 21, the measurement machine 2 captures images of a product 3 placed on the platform 22. The data reading and transmitting module 20 reads information of the measurement elements created on the product 3 from the images, and transmits the information to the electronic device 1. In one embodiment, the information includes a quantity, positional coordinates, and feature values of the measurement elements. The measurement elements include points, lines, planes, and circles, for example. The positional coordinates of a measurement element are the coordinates of points that are used for creating the measurement element. For example, a line is created based on at least two points, thus, the positional coordinates of the line may include the coordinates of the at least two points. For another example, a circle is created based on at least three points, thus, the positional coordinates of the circle may include the coordinates of the at least three points. The feature value of a measurement element indicates whether the measurement element is a point, a line, a plane, or a circle. For example, feature value 1 may indicate that the measurement element is a point, feature value 2 may indicate that the measurement element is a line.
The measurement path optimization system 10 may be used to compute an optimized measurement path for the measurement machine 2 when measuring the product 3 according to the above-mentioned information regarding each measurement element on the product 3.
In block S10, the data receiving module 100 receives information of the measurement elements on the product 3 from the measurement machine 2. As mentioned above, the information includes a quantity, positional coordinates, and feature values of the measurement elements.
In block S11, the minimum bounding box computation module 101 computes a minimum bounding box of the measurement elements on the product 3 according to the positional coordinates. The minimum bounding box is the smallest box that can enclose all of the measurement elements. In one embodiment, the method of computing the minimum bounding box is given as follows: the minimum bounding box computation module 101 finds the maximum X-axis coordinate “Xmax”, the maximum Y-axis coordinate “Ymax”, the minimum X-axis coordinate “Xmin”, and the minimum Y-axis coordinate “Ymin” from the positional coordinates of the measurement elements, then determines the four points which respectively have the coordinates of (Xmax, Ymax), (Xmax, Ymin), (Xmin, Xmax), and (Xmin, Ymin), and finally locates the minimum bounding box according to those four points (i.e. Xmax, Ymax), (Xmax, Ymin), (Xmin, Xmax), and (Xmin, Ymin).
In block S12, the capturing range determination module 102 computes a capturing range of the lens 21 according to a magnification of the lens 21. The capturing range and the magnification have an internal relationship. For example, if the magnification of the lens 21 is 2:1, the capturing range may be 10 cm2, and if the magnification is 4:1, the capturing range may be 20 cm2, and if the magnification of the lens 21 is 8:1, the capturing range may be 40 cm2.
In block S13, the dividing module 103 divides the minimum bounding box into M*N partitions according to the capturing range of the lens 21. In one embodiment, if the capturing range has a length L and a width W, then, M=(Xmax−Xmin)/L, N=(Ymax−Ymin)/W; or M=(Xmax−Xmin)/W, N=(Ymax−Ymin)/L.
In block S14, the dividing module 103 assigns a number to each of the M*N partitions.
In block S15, the minimum bounding region computation module 104 computes the minimum bounding region S of each measurement element according to the positional coordinates of the measurement element. In one embodiment, the method of computing the minimum bounding region S is similar to the method of computing the minimum bounding box given above.
In block S16, the array module 105 selects one measurement element. In one embodiment, this selection is random.
In block S17, the array module 105 determines if the minimum bounding region S of the selected measurement element falls within a single partition.
In block S18, the array module 105 puts the number of the partition which exclusively encloses the selected measurement element into a first array. In block S19, the array module 105 puts a number set that includes the numbers of all the partitions which enclose the selected measurement element into a second array. In the example in
In block S20, the array module 105 determines if all the measurement elements have been selected according to the received quantity. Block S16 is repeated if any measurement elements has not been selected. Block S21 is implemented if all the measurement elements have been selected.
In block S21, the path generation module 106 lists the numbers of the partitions in order according to the first array and the second array to generate a measurement path of the measurement machine 2. In detail, the path generation module 106 selects numbers from the first array and the second array in ascending order. If the number is from the first array, the path generation module 106 inserts the number into the measurement path, and if the number is from the second array, the path generation module 106 inserts a number set which includes that number into the measurement path. If a number or a number set has been inserted into the measurement path, the path generation module 106 does not select the number or numbers in the number set any more. In the example of the first array including numbers of 2, 6, 8, 10, 17, 25, 27, and 28, and the second array including numbers of (12, 13, 16, 17), (20, 23), (13, 14, 15), the measurement path may follow the order of 2, 6, 8, 10, (12, 13, 16, 17), (13, 14, 15), (20, 23), 25, 27, and 28, as in the measurement path (the dashed arrow) shown in
In block S22, the storage module 107 stores the measurement path into the storage medium 11, and by this method, the measurements of the product are taken more quickly and efficiently.
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 |
---|---|---|---|
201010545613.5 | Nov 2010 | CN | national |