1. Technical Field
Embodiments of the present disclosure relate to image management systems and methods, and particularly to a system and a method for splicing images of a workpiece.
2. Description of Related Art
A video measuring system (VMS) is used for scanning images of a workpiece. If a workpiece is too large, the VMS may only scan a portion of the workpiece at one time and obtain a number of images of surfaces of the workpiece. If a user wants to analyze characteristics of surfaces of the workpiece as a whole, the images separately are not helpful for the user. Therefore, there is room for improvement in the art.
The application is illustrated by way of examples and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
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 may include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
In an exemplary embodiment, the computer 1 includes at least one processor 11 and a storage system 12. The splicing system 10 may include one or more modules (also described in
As shown in
The receiving module 100 receives a splicing type selected by a user. The slicing type includes a two-dimensional (2D) image, a 2D measurement image, and a three-dimensional (3D) measurement image. In one embodiment, the 2D/3D measurement image includes coordinate values of a center of the 2D/3D measurement image as well as including image data. The 2D image only includes image data.
The setting module 101 receives splicing parameters set by the user corresponding to the received splicing type. The splicing parameters may include a splicing scale and a storage type. The storage type selectable may be on-board memory or hard disk.
The selecting module 102 selects an area on the 3D model of the workpiece 3 according to the user's requirement. The selected area is a portion of the surface of the 3D model of the workpiece 3. In one embodiment, the user can select a start position and an end position of the surface of the workpiece 3 to determine the selected area.
The first calculating module 103 calculates a first size of the selected area corresponding to the resolution of the images captured by the CCD 20. The first size of the selected area includes a length and a width of the selected area. If the first size is 6400*4800, the length is 6400 and the width is 4800. The length and the width indicate the number of pixel points in the area. The first calculating module 103 determines the number of images which are required and a second size of a complete bitmap of the selected area which has been spliced together from the images according to the calculated first size. For example, if the splicing type is the 2D image and the first area is 6400*4800 and the resolution of each image is 640*480, then the number of images required is determined as ten. That is, ten images need to be spliced together to generate the complete bitmap. The second size of the complete bitmap is the same as the first size.
The obtaining module 104 retrieves the determined number of images in relation to the selected area and obtains information as to each of the images from the storage system 12.
The second calculating module 105 calculates coordinate values of the pixel points of each image according to the splicing type and coordinate values of the center point of each image. For example, if the splicing type is a 2D measurement image, the second calculating module 105 calculates the coordinate values of each pixel point according to the coordinate values of an x-axis value and a y-axis value of the center point of each image of the workpiece 3.
The splicing module 106 puts each pixel point of the images into a corresponding position of the bitmap window according to the coordinate values of each pixel point of each image, as governed by the splicing parameters from the user, to splice together a complete bitmap.
The storing module 107 stores the complete bitmap to the storage system 12. In one embodiment, if the splicing type of the complete bitmap is a 2D type, the storing module 107 further provides a function of previewing the complete bitmap.
In step S30, the receiving module 100 receives the splicing type selected by a user. In some embodiments, the slicing types available may include a two-dimensional (2D) image, a 2D measurement image, and a three-dimensional (3D) measurement image.
In step S31, the setting module 101 receives splicing parameters set by the user corresponding to the received splicing type.
In step S32, the selecting module 102 determines the area on the 3D model of the workpiece 3 which has been selected by the user.
In step S33, the first calculating module 103 calculates a first size of the selected image corresponding to the resolution of the images captured by the CCD 20.
In step S34, the obtaining module 104 obtains the required number of images in relation to the selected area according to a determination, and obtains information of the images within the required number from the storage system 12.
In step S35, the second calculating module 105 calculates coordinate values of the pixel points of each scattered obtained image according to the splicing type and coordinate values of the center point of each image of the workpiece 3.
In step S36, the splicing module 106 maps the coordinate values of each pixel point of the images into a position according to the coordinate values of each pixel point of each image and the splicing parameters to splice together and produce the complete bitmap.
In step S37, the storing module 107 stores the complete bitmap to the storage system 12. In one embodiment, if the splicing type of the complete bitmap is a 2D type, the storing module 107 further provides a function of previewing the complete bitmap.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
| Number | Date | Country | Kind |
|---|---|---|---|
| 201110173593.8 | Jun 2011 | CN | national |