This application claims the priority benefit of Taiwan application serial no. 99139566, filed Nov. 17, 2010. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
1. Field of the Invention
The invention generally relates to a system and a method for measuring a size, and more particularly, to a system and a method for measuring a three-dimensional (3D) size.
2. Description of Related Art
Object measuring is usually categorized into two-dimensional (2D) picture measuring and three-dimensional (3D) object measuring. In 2D picture measuring, an image of the picture to be measured is captured by using an image capturing apparatus with a charge-coupled device (CCD), and image processing (for example, smoothing process, edge enhancement process, and noise elimination process) is then performed on the captured image to increase the quality of the image. Thereafter, the size of the 2D picture is calculated based on an image measuring principle according to the size and pixel size of the CCD. However, the technique of measuring a size according to an image captured by a CCD is only applicable to 2D pictures.
In 3D object measuring, a depth information is further associated with each pixel of a 2D image to transform the 2D image into a 3D image. After that, 3D measuring (for example, triangulation, structured light scanning, and time of flight) is performed in a contactless manner (for example, through sound waves or optical measurement). However, a common problem of existing 3D measuring techniques is that a specific video camera and a special transmitting apparatus (for example, an apparatus that can emit a laser or infrared beam or a structured light in a specific mode) have to be adopted, and 3D measuring can only be performed on an 3D object after the transmitting apparatus transmits a sound wave or optical wave and the specific video camera receives the sound wave or optical wave reflected by the 3D object. Thereby, the cost of equipment deployment is increased.
Accordingly, the invention is directed to a system and a method for measuring a three-dimensional (3D) size and a computer-readable recording medium, wherein the size of a 3D object in an irregular shape is measured according to an indicating mark, and a rear measuring point on the object can be measured when the indicating mark is not completely shielded, so that the convenience in using the system and the measurement accuracy are both improved.
The invention provides a 3D size measuring system for measuring an object in a space according to an indicating mark, wherein the indicating mark is used to point to one of a plurality of measuring points on the object. The 3D size measuring system includes an image capturing module, a spatial vector calculating module, and a measuring module. The image capturing module captures an image of the space. According to the indicating mark pointing to each of the measuring points on the object in the image, the spatial vector calculating module respectively calculates a spatial vector corresponding to the indicating mark pointing to each of the measuring points. The measuring module calculates spatial coordinate of each of the measuring points according to the spatial vectors, so as to obtain a 3D size of the object.
The invention also provides a 3D size measuring method adaptable to an electronic device for measuring an object in a space according to an indicating mark, wherein the indicating mark is used to point to one of a plurality of measuring points on the object. The electronic device executes following steps of the 3D size measuring method. An image of the space is captured. According to the indicating mark pointing to each of the measuring points on the object in the image, a spatial vector corresponding to the indicating mark pointing to each of the measuring points is respectively calculated. Spatial coordinate of each of the measuring points are calculated according to the spatial vectors to obtain a 3D size of the object.
The invention further provides a computer-readable recording medium for storing a 3D size measuring program, wherein the 3D size measuring program allows an electronic device to measure an object in a space according to an indicating mark, and the indicating mark is used to point to one of a plurality of measuring points on the object. The 3D size measuring program has a plurality of instructions for executing following steps. An image of the space is captured. According to the indicating mark pointing to each of the measuring points on the object in the image, a spatial vector corresponding to the indicating mark pointing to each of the measuring points is respectively calculated. Spatial coordinate of each of the measuring points are calculated according to the spatial vectors to obtain a 3D size of the object.
According to another embodiment of the invention, in the 3D size measuring system, the 3D size measuring method, and the computer-readable recording medium described above, at least one mark reference parameter of the indicating mark may be recorded in advance.
According to another embodiment of the invention, in the 3D size measuring system, the 3D size measuring method, and the computer-readable recording medium described above, the step of respectively calculating the spatial vector corresponding to the indicating mark pointing to each of the measuring points on the object further includes following sub-steps. A regional image corresponding to the indicating mark is determined in the image. The regional image is compared with the mark reference parameter provided by an indicating mark parameter module. A correlation reliability between the regional image and the indicating mark is determined. When the correlation reliability is high, the moving regional images around the regional image is tracked so that the spatial vectors corresponding to the indicating mark pointing to each of the measuring points is calculated according to a comparison made by the compare module between each of the moving regional image and at least one mark reference parameter provided by the indicating mark parameter module. When the correlation reliability is low, the regional image corresponding to the indicating mark pointing to each of the measuring points is re-determined in the image, so as to calculate the spatial vectors corresponding to the indicating mark pointing to each of the measuring points according to the comparison made by the compare module between each of the regional image and the mark reference parameter provided by the indicating mark parameter module.
As described above, the invention provides a 3D size measuring system, a 3D size measuring method, and a computer-readable recording medium, wherein a spatial vector of an indicating mark in a space is instantly calculated according to a measuring point on an object pointed by the indicating mark, and spatial coordinates of the measuring point is then calculated according to the spatial vector. The 3D size of the object can be obtained based on the spatial coordinates of a plurality of measuring points. Moreover, the indicating mark includes a mark portion and an indicator portion extending outwards from the mark portion. The indicator portion is used to point to the measuring points on the object, and measuring points at the rear (which is not displayed in the image captured by the system) of the object can be pointed by the indicator portion and measured as long as the indicating mark is not completely shielded in the captured image. Thereby, both the convenience in using the system and the measurement accuracy are greatly improved.
These and other exemplary embodiments, features, aspects, and advantages of the invention will be described and become more apparent from the detailed description of exemplary embodiments when read in conjunction with accompanying drawings.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
Referring to
It should be noted that in the present embodiment, the indicating mark 102 may include a mark portion 102a (having at least one identification pattern 102b, referring to
Additionally, the 3D size measuring system 100 may further include an indicating mark parameter module 210 for recording at least one mark reference parameter of the indicating mark 102. Namely, mark reference parameters related to the indicating mark 102 at different positions or different rotation angles or deflections relative to the image capturing module 202 are recorded in advance, wherein the mark reference parameters may be the relative coordinates of a specific point in the mark portion 102a, the size and color of each side or a line between two end points of the mark portion 102a, the relative coordinates of a specific point in the identification pattern, the size and color of each side or a line between two end points of the identification pattern, or other parameters that can be used for feature identification. In an embodiment of the invention, the indicating mark parameter module 210 records mark reference parameters of the indicating mark 102 that fronts the image capturing module 202 and also records mark reference parameters which are rotated and deflected to the image capturing module 202, and then the indicating mark parameter module 210 compensates according to the mark reference parameters of the indicating mark 102 fronting the image capturing module 202. Generally speaking, the more mark reference parameters of the indicating mark 102 for various degree rotation and deflection in the space are recorded by the indicating mark parameter module 210, the faster the spatial vectors corresponding to the measuring points are calculated.
Referring to
The image processing module 300 determines a regional image corresponding to the indicating mark in the captured image. In other embodiments, the image processing module 300 may process the captured image through following steps. First, the image processing module 300 performs a color simplification process (for example, different color scales (including gray scale) processing on the captured image. Then, the image processing module 300 averages image values of the captured image to uniform the brightness of the entire captured image. Next, the image processing module 300 scans the captured image to differentiate various color blocks in the image according to the mark reference parameters of the mark portion 102a provided by the indicating mark parameter module 210, and the image processing module 300 obtains candidate image blocks that could be the mark portion of the indicating mark through image segmentation and block merging. Thereafter, the image processing module 300 performs geometrical feature comparison and shape filters according to the mark reference parameters of the identification pattern 102b provided by the indicating mark parameter module 210 and selects one of the candidate image blocks as the regional image corresponding to the indicating mark 102 in the space 104. Namely, a regional image corresponding to the indicating mark 102 in the space is determined in the captured image through a series of image processing operations (including color differentiation, image segmentation and merging, geometrical feature comparison, and shape selection) according to identification features in the identification pattern.
The compare module 302 compares the regional image with the mark reference parameters provided by the indicating mark parameter module 210. The reliability judgement module 304 determines a correlation reliability (i.e., similarity) between the regional image and the indicating mark. The correlation reliability may be determined by comparing the regional image with the characteristic values of the indicating mark. One technique for determining the correlation reliability is to average the product of a band transfer function and a discrete cosine transform (DCT). The level of the similarity can be determined based on a threshold. For example, if the threshold is 0.5, the similarity level is determined to be high if the value thereof is over 0.5.
When the correlation reliability (i.e., the similarity level) is high, the dynamic tracking module 306 tracks the moving regional images respectively corresponding to the indicating mark 102 pointing to the measuring points on the object around the regional image, so that the dynamic tracking module 306 calculates the spatial vectors corresponding to the indicating mark when the indicating mark 102 is used to point to each of the measuring points according to a comparison made by the compare module 302 between each of the moving regional image and the at least one mark reference parameter provided by the indicating mark parameter module 210.
For example, when the indicating mark 102 is used to point to a measuring point on the object 106, since the correlation reliability between the regional image and the indicating mark is high, the system needs not to scan the entire captured image or re-determine the regional image corresponding to the indicating mark if the indicating mark 102 continuously moves to other positions and the image capturing module 202 keeps capturing images. Instead, the system simply tracks the moving regional images corresponding to the moving indicating mark around the determined regional image. Thereby, the quantity of data to be processed is reduced.
When the correlation reliability is low, the real-time compare module 308 re-determines the regional image corresponding to the indicating mark 102 in the image through the image processing module 300 so as to calculate the spatial vectors corresponding to the indicating mark when the indicating mark is used to point to the measuring points according to the comparison made by the compare module 302 between each of the regional image and the mark reference parameters provided by the indicating mark parameter module 210. Namely, when the indicating mark 102 is moved and used to point to the measuring points on the object 106, because the correlation reliability between the determined regional image and the indicating mark is low, the entire captured image needs to be re-scanned and the regional image corresponding to the moved indicating mark 102 needs to be re-determined every time when the indicating mark 102 moves in order to calculate the spatial vectors corresponding to the indicating mark 102.
In another embodiment, the indicator portion 102c of the indicating mark 102 is used to point to a measuring point on an object or any point in the space, and can be any shape and graphics for pointing to a specific point, such as a long arrow (as shown in
On the other hand, when the image capturing module 202 captures an image of the space in which the object 106 is located, if the mark portion 102a is not shielded in the captured image, the spatial vector calculating module 206 can also calculate the spatial coordinates of the rear measuring point on the object even the indicator portion 102c is used to point to a rear measuring point on the object opposite to the image capturing module 202. In other words, the 3D size measuring system in the invention can measure the 3D spatial coordinates of the object in 360°. Namely, besides calculating the spatial coordinates of measuring points on the front of the object 106 in the image captured by the image capturing module 202, the spatial coordinates of rear measuring points on the object can also be calculated by appropriately rotating and placing the indicating mark 102 to make the mark portion 102a of the indicating mark 102 not be shielded and the indicator portion 102c be used to point to and contacts the rear of the object 106. In other words, the measuring of the 3D size of the object can still be performed by the 3D size measuring system in the invention when the indicator portion 102c is partially or completely shielded. The 3D size measuring system also can be used to measure the measuring points on the object that are not shown in the captured image (for example, on the side or back of the object, or the measuring point which is be shielded).
For example, referring to
In another embodiment, the measuring module 208 in the 3D size measuring system further includes a line segment measuring module. The line segment measuring module calculates the distance between any two of a plurality of measuring points on the object 106 according to the spatial coordinates of the measuring points.
On the other hand, in yet another embodiment, the measuring module 208 in the 3D size measuring system further includes a track recording module. The track recording module records the spatial coordinates of the measuring points on the object 106 according to a sequence of the measuring points on the object 106 which the indicating mark 102 is used to sequentially point to, so as to calculate a measurement path of the indicating mark 102. For example, besides establishing the measurement path of the indicating mark 102, the total length of the measurement path can be further calculated through an integral operation based on the spatial coordinates of the measuring points on the object 106 sequentially recorded by the track recording module. The image capturing frequency on the measurement path can be determined according to the specification of the camera. In general, the image capturing frequency is 24 or 30 pages per second, and it can be up to 60 pages per second for higher quality.
Embodiments of the 3D size measuring system and the 3D size measuring method provided by the invention are described above, wherein the spatial coordinates and size of a 3D object in a space are measured. However, the invention is not limited thereto. Below, how to measure a spatial relationship between the 3D size of an object and a virtual space and plot a digital model by using the 3D size measuring system and the 3D size measuring method in the invention will be described with reference to some embodiments and accompanying drawings. It should be noted that in following embodiments, those elements that are the same as or similar to those in foregoing embodiments will be marked with the same reference numerals.
For example, as shown in
Additionally, in another embodiment, the 3D size measuring system 100 further includes a graphing module 406. The graphing module 406 plots a digital content of the object 106 according to the spatial coordinates of the measuring points obtained by the measuring module 208, wherein the digital content can be a 3D virtual image, a 3D model, or a picture of the object 106. Namely, a digital content (for example, a 3D virtual image) of a physical object is rendered according to the spatial coordinates of the measuring points, such that a user can develop various digital applications (for example, animation and simulation) based on the 3D virtual image.
In other embodiments, the present 3D size measuring method further includes following steps after step S515 or S615. In step S711, a corresponding digital content is plotted according to the spatial coordinates of the measuring points, wherein the digital content is a 3D virtual image, a 3D model, or a picture of the object.
In foregoing embodiment, the 3D size measuring method provided by the invention may be realized by executing a computer-readable program, and the 3D size measuring system may also be presented as foregoing computer-readable program. The computer-readable program can be stored in a computer-readable recording medium, and a plurality of instructions of the computer-readable program is executed by a processor to realize the 3D size measuring method in the invention. The steps of the 3D size measuring method have been described in detail in foregoing embodiments therefore will not be described herein.
In summary, the invention provides a 3D size measuring system and a 3D size measuring method, wherein a spatial vector of an indicating mark in a space can be instantly calculated by pointing the indicating mark to a measuring point and comparing the present regional image corresponding to the indicating mark with mark reference parameters, and spatial coordinates of the measuring point can be further calculated according to the spatial vector. A 3D size can be obtained according to the spatial coordinates of a plurality of measuring points. Because an indicator portion of the indicating mark extends outwards and is used to point to the measuring points, the spatial coordinates of a measuring point on a portion (for example, the side or back) of the object that cannot be seen in the captured image can still be measured by pointing the indicator portion to the measuring point that is not shown in the captured image as long as the mark portion of the indicating mark is not shielded in the captured image. Thereby, the convenience in using the system and the measurement accuracy are both improved. Moreover, regarding the measurement of the size of an object in an irregular shape, since the indicator portion of the indicating mark is used to point to the surface of the object, the spatial coordinates of the measuring points can be accurately calculated. The size of the irregular object can be accurately measured when the number of the measuring points reaches a certain extent. Furthermore, in the 3D size measuring system and 3D size measuring method provided by the invention, when the 3D size of an object is measured, the measuring range is determined by the indicating mark and is not affected by how accurate the object is identified in the captured image and requires no data training in advance. Accordingly, the cost for deploying the system is reduced.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
99139566 | Nov 2010 | TW | national |