Embodiments of the present disclosure relate to detection technology, and particularly to an electronic device and method for detecting a surface flaw of a sample using the electronic device.
A testing sample (e.g. a sample of a phone) can include surface flaws. Sometimes a surface flaw cannot be clearly or completely imaged under a light source with a fixed direction. Different images may be generated because of the light source located with different angles. Therefore, it is important to detect the surface flaw of the testing sample.
Implementations of the present disclosure will be described, by way of example only, with reference to the following drawings. The modules in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding portions throughout the views.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references can mean “at least one,” or “one or more.”
In the present disclosure, “module,” refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a program language. In one embodiment, the program language can be Java, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an EPROM. The modules described herein can be implemented as either software and/or hardware modules and can be stored in any type of non-transitory computer-readable media or storage medium. Non-limiting examples of a non-transitory computer-readable medium include CDs, DVDs, flash memory, and hard disk drives.
In one embodiment, the electronic device 2 is connected to a detection device 4 through a data cable (not shown). As shown in
As shown in
In one embodiment, the horizontal rotation platform 42 is connected to the optical filter 45 through a first connecting rod 51. The horizontal rotation platform 42 is further connected to the light source 43 through a second connecting rod 52. The horizontal rotation platform 42 includes a driving motor for rotating the horizontal rotation platform 42 to adjust positions of the optical filter 45 or the light source 43. The driving motor may be a stepper motor or a servo motor.
In block 10, the controlling module 240 controls the horizontal rotation platform 42 to locate to an initial position. In one embodiment, the initial position is denoted as a zero starting position of the horizontal rotation platform 42. As shown in
In block 11, the controlling module 240 controls the camera unit 40 to capture an image of the testing sample 60, and adjusts a position of the optical filter 45 according to the captured image until intensities of the light source 43 projecting on different positions of the testing sample 60 are uniform. In one embodiment, when luminance values of all pixels of the captured image are identical, the intensities of the light source projected on different positions are determined to be uniform. If not all of luminance values of the pixels are identical, the intensities of the light source projected on different positions are determined to be not uniform. When a difference of the luminance values between any two pixels is within a predetermined range, the luminance values of all pixels are deemed identical.
When intensities of the light source 43 projected on different positions of the testing sample 60 are not uniform, the controlling module 240 controls the first connecting rod 51 to move (as shown in
After intensities of the light source 43 projected on different positions of the testing sample 60 are determined to be uniform, in block 12, the controlling module 240 controls the horizontal rotation platform 42 to rotate, and the acquisition module 241 obtains images of the testing sample 60 at different angles from the camera unit 40 as the horizontal rotation platform 42 rotates. In one embodiment, the controlling module 240 may control the horizontal rotation platform 42 to execute a 360 degree rotation using the driving motor. For example, when the horizontal rotation platform 42 is rotated in an increment of one degree, the camera unit 40 captures two images of the testing sample 60.
In block 13, the processing module 242 obtains processed images of the testing sample 60 by converting colors of specified pixels of the obtained images into a specified color. In one embodiment, the specified color may be a black color having a luminance value “0” or be a white color having a luminance value “255”. Luminance values of the specified pixels are within a luminance tolerance range. For example, the luminance tolerance range may be set to be between 150 and 180. As shown in
In block 14, the analysis module 243 detects a surface flaw of each of the processed images, and generates a detection list including results of whether each of the processed images includes the surface flaw or not. In one embodiment, when one of the processed images includes one or more luminous points or shadow blocks (as shown in
If the specified color is a black color, luminance values of the one or more luminous points or shadow blocks are greater than an upper limit of the luminance tolerance range. If the specified color is a white color, the luminance values of the one or more luminous points or shadow blocks are lower than a lower limit of the luminance tolerance range.
In block 15, the outputting module 244 outputs a result to be displayed on the display device 20 according to the detection list, and sorts the testing sample 60 according to the result. In one embodiment, if none of the processed images have any surface flaw in the detection list, the outputting module 244 outputs a result that the testing sample 60 has no surface flaw, and sorts the testing sample 60 to a qualified product. If one or more processed images have the surface flaws in the detection list, the outputting module 244 outputs a result that the testing sample 60 has the surface flaw, and sorts the testing sample 60 to an unqualified product.
In other embodiments, the surface flaw detection system 24 may be in the detection device 4, or some modules of the surface flaw detection system 24 are run in the detection device 4 and other modules of the surface flaw detection system 24 are run in the electronic device 2. For example, the modules of 240-242 are executed by a microprocessor of the detection device 4, and the modules of 243-244 are executed by the processor 25 of the electronic device 2.
All of the processes described above may be embodied in, and fully automated via, functional code modules executed by one or more general purpose processors such as the processor 25. The code modules may be stored in any type of non-transitory readable medium or other storage device such as the storage device 23. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory readable medium may be a hard disk drive, a compact disc, a digital versatile disc, a tape drive, or other suitable storage medium.
The described embodiments are merely examples of implementations, and have been set forth for a clear understanding of the principles of the present disclosure. Variations and modifications may be made without departing substantially from the spirit and principles of the present disclosure. All such modifications and variations are intended to be included within the scope of this disclosure and the described inventive embodiments, and the present disclosure is protected by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
102114817 | Apr 2013 | TW | national |