This application claims priority to Chinese Patent Application No. 201310487898.5 filed on Oct. 17, 2013, the contents of which are incorporated by reference herein.
Embodiments of the present disclosure relate to a simulation technology, and particularly to a computing device and a simulation method for processing an object.
A computerized numerical control (CNC) machine is used to process a component of an object (for example, a shell of a mobile phone), and measure an object to capture images of the object. After the CNC machine has processed the component of the object, the CNC needs to measure the object.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
Several definitions that apply throughout this disclosure will now be presented. The term “module” refers to logic embodied in computing 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 erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing 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 term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
The computing device 1 can be, but is not limited to, a tablet computer, a server, a personal computer, a mobile phone, or any other computing device. In the example embodiment, the computing device 1 includes, but is not limited to, an image measurement system 10, a storage device 20, at least one processor 30, and a displaying device 40.
In at least one embodiment, the storage device 20 can be an internal storage device, such as a flash memory, a random access memory (RAM) for temporary storage of information, and/or a read-only memory (ROM) for permanent storage of information. The storage device 20 can also be an external storage device, such as an external hard disk, a storage card, or a data storage medium. The at least one processor 30 can be a central processing unit (CPU), a microprocessor, or other data processor chip that performs functions of the computing device 1. The storage device 20 stores the images of the object. The displaying device 40 displays the images of the object.
The CNC machine 2 includes a CNC principle axis 21, a fixture 22, a CNC measurement unit 23, and a CNC processing program 24 which is stored in a medium of the CNC machine. The CNC processing program 24 is an array program which consists of a plurality of reference point coordinates. The reference points are predetermined to generate a reference object designed by an application (for example, computer aided design, CAD). In addition, the CNC processing program can be, but is not limited to, a TXT format file.
In at least embodiment, the CNC measurement unit 23 can include a protection box 231, a light system 232, a lens 233, and a charge coupled device (CCD) 234. As shown in
The image measurement system 10 comprises, but is not limited to, a first control module 11, a second control module 12, a first measurement module 13, an image processing module 14, a second measurement module 15, a point obtaining module 16, a simulation module 17, and a coordinate compensating module 18. Modules 11-18 can comprise computerized instructions in the form of one or more computer-readable programs that can be stored in a non-transitory computer-readable medium, for example the storage device 20, and executed by the at least one processor 30 of the computing device 1. A detailed description of the functions of the modules 11-18 is given below in reference to
Referring to
In block 301, a first control module 11 starts a CNC machine 2 and drives a motor 235 located at the bottom of a protection box 231 to open a cover of the protection box 231. In at least one embodiment, the cover of the protection box 231 is opened, so that a light system 232, a lens 233 and a CCD 234 are uncovered. That is, the light system 232 can project light on the surface of the object, the lens 233 can capture images of the object and the CCD 234 can generate images of the object.
In block 302, a second control module 12 starts the light system 232 to project light from the first light source and the second light source on the surface of the object.
In block 303, a first measurement module 13 controls the CNC machine 2 to move along a principle axis, and captures images of the object and obtains coordinates corresponding to each image during the movement of the CNC machine 2. The coordinates corresponding to each image are the coordinates of the CCD 234 when the image is captured by the CCD 234. In at least one embodiment, the CCD 234 captures an image every a predetermined time (for example, every one second). The CNC machine 2 includes a grating ruler for obtaining the coordinates of the lens 233 when the lens 233 captures images of the object. In addition, the images of the object and the coordinates corresponding to each image are saved into the storage device 20.
In block 304, an image processing module 14 processes the images to obtain a focus of the lens 233 of the CNC machine 2, and obtains a first image corresponding to the focus. In at least one embodiment, the image processing module 14 processes the images of the object using a binary processing method to generate a pixel gray value of each image. The image processing module 14 further generates a line chart (as shown in
In block 305, a second measurement module 15 controls the CNC machine 2 to move to the focus of the lens 233 and controls the CCD 234 to capture a second image of the object. The image processing module 14 processes the second image using the binary processing method.
In block 306, a point obtaining module 16 obtains measurement points according to the second image. In at least one embodiment, after the second image is processed by a binary processing method, a contour of the object is generated, as shown in black portion in
In block 307, a simulation module 17 simulates the measurement points to a geometrical element using a predetermined algorithm according to a predetermined type of element. The predetermined type of the element can be, but is not limited to, a line type, a circle type or a surface type. The geometrical element can be, but is not limited to, a line, a circle or a surface. If the predetermined type of the element is the line type, the line is simulated. If the predetermined type of the element is the circle type, the circle is simulated. If the predetermined type of the element is the surface type, the surface is simulated. The predetermined algorithm can be, but is not limited to, a triangulation algorithm, a least square method, a singular value decomposition (SVD) method, or a quaternion algorithm. As shown in
In block 308, a coordinate compensating module 18 establishes a coordinate system according to the geometrical element, determines coordinates of the measurement points in the coordinate system, and calculates a difference between the determined coordinates of each measurement point and reference coordinates of a reference point corresponding to each measurement point. As shown in
In other blocks, after the image measurement of the object, the protection box 231 drives the motor 235 to close the cover of the protection box 231, and the light system 232 turns off the first light source and the second source.
The embodiments shown and described above are only examples. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, including in particular the matters of shape, size and arrangement of parts within the principles of the present disclosure, up to and including the full extent established by the broad general meaning of the terms used in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201310487898.5 | Oct 2013 | CN | national |