1. Field of the Invention
Embodiments of the present disclosure relate to systems and methods for adjusting light sources in measurement of object images, and more particularly, to a system and method for adjusting backlight in measurement of a profile image.
2. Description of Related Art
Product quality has long been one of the most important factors in maintaining a typical manufacturing enterprise's competitiveness. Ways of improving the quality of products is an important ongoing pursuit of such enterprises. It is essential to verify the correctness of an object before a batch production of the object. In recent years, a user can use an image measuring machine installed with a charge coupled device (CCD) to obtain a profile image of an object by scanning the object. In the measuring method, backlight source adjusting, which is usually performed by a user, is an essential problem in the measuring procedure. In normal cases, when the user adjusts the backlight source to measure the profile image of the object, errors are often occurred, and labor intensity of the user is high.
What is needed, therefore, is a system and method for adjusting backlight in measurement of the profile image, so as to overcome the above-described shortcomings.
All of the processes described below may be embodied in, and fully automated via, software code modules executed by one or more general purpose computers or processors. The code modules may be stored in any type of computer-readable medium or other computer storage device. Some or all of the methods may alternatively be embodied in specialized computer hardware.
In one embodiment, the light source 12 adopts 101 intensity levels to reflect the backlight intensity. The 101 intensity levels are ranging from 0-100 intensity levels.
In another embodiment, the backlight intensity can be expressed by gray values of the profile image. Generally, a maximum distribution range of the gray values is [0, 255] (i.e., in the range from about 0 to about 255). In the embodiment, if the light source 12 is adjusted to the level 0, the profile image may be black, the backlight intensity is low, and the gray value of the profile image is about 0; otherwise, if the light source 12 is adjusted to the level 100, the profile image may be white, the backlight intensity is high, and the gray value of the profile image is about 255. See
The image processing module 300 is configured for performing a mean filter processing and a binary image processing on a profile image of the object 2 after a user uses the light source regulator 10 to adjust the backlight intensity of the light source 12 to an original intensity level. In the embodiment, the mean filter processing and binary image processing are used for enhancing the contrast of the profile image, reducing image noises of the profile image, and eliminating uneven gray-level distribution.
The calculating module 302 is configured for setting a plurality of intensity variables to adjust the backlight intensity of the light source 12, and using the intensity variables to calculate an optimum intensity level of the backlight intensity by utilizing an iterative method. It may be understood that the iterative method is defined as solving a problem (for example an equation or system of equations) by finding successive approximations to the solution starting from an initial guess. The solution may be the optimum intensity level calculation, and the initial guess may be the original intensity level. In the embodiment, the intensity variables may include an upper approach level and a lower approach level as will be explained in greater detail below.
The adjusting module 304 is configured for adjusting the backlight intensity of the light source 12 to the optimum intensity level for obtaining an optimum profile image of the object 2.
The reporting module 306 is configured for storing the optimum profile image and the optimum intensity level into the storage system 34 of the computer 3, and reporting and displaying the optimum profile image. In one embodiment, the storage system 34 is at least one of a hard disk drive, a compact disc, a digital video disc, and a tape drive. The optimum profile image may be output and displayed on a display of the computer 3 to the user.
In block S400, the CCD 14 obtains a profile image of the object 2 that is laid on a platform of the image measuring machine 1, and selects a portion from the profile image corresponding the backlight intensity that needs to be adjusted.
In block S402, the adjusting module 304 controls the light source regulator 10 to set backlight intensity of the light source 12 to an original intensity level. In the embodiment, the original intensity level is in the range from the levels 0-100 intensity levels, but cannot be the level 0 or the level 100. The present embodiment gives an example that the original intensity level equals the level 10.
In block S404, the image processing module 300 obtains the selected portion image, and performs the mean filter processing and binary image processing on the portion image, in order to enhance a contrast of the portion image, reduce image noises of the portion image, and eliminate uneven gray-level distribution of the portion image.
In block S406, the calculating module 302 sets a plurality of intensity variables for adjusting the backlight intensity of the light source 12. The intensity variables may include an upper approach level and a lower approach level.
In block S408, the calculating module 302 uses the intensity variables to calculate an optimum intensity level of the backlight intensity by utilizing an iterative method. The iterative method will be described in the following
In block S410, the adjusting module 304 controls the light source regulator 10 to adjust the backlight intensity of the light source 12 to the optimum intensity level, and the CCD 14 obtains an optimum profile image from the portion image.
In block S412, the reporting module 306 reports and displays the optimum profile image, and stores the optimum profile image and the optimum intensity level into the storage system 34 of the computer 3.
In block S500, the calculating module 302 initializes the intensity variables to set the upper approach level (symbolically depicted as “Vm”) to the level 100, and to set the lower approach level (symbolically depicted as “Vn”) to the level 1.
In block S502, the adjusting module 304 controls the light resource regulator 10 to adjust the backlight intensity of the light source 12 to an adjusted intensity level, the image processing module 300 obtains an adjusted image of the selected portion image based on the adjusted intensity level, and the calculating module 302 calculates a gray value of the adjusted image. In the embodiment, the adjusted intensity level (symbolically depicted as “Vc”) is equal to one half of a sum value of the upper approach level Vm, and the lower approach level Vn, namely the adjusted intensity level Vc=(Vm+Vn)/2.
In block S504, the calculating module 302 determines whether the gray value of the adjusted image is less than an optimum gray value (symbolically depicted as “Gp”) preset by the user. In the embodiment, the optimum gray value Gp is a middle value in the range from 0-255 gray levels, and is a gray value of the optimum profile image. The present embodiment gives an example that the optimum gray value Gp is equal to 125.
If the gray value equals the optimum gray value Gp, the flow directly enters block S512. If the gray value of the adjusted image is less than the optimum gray value Gp, in block S506, the calculating module 302 sets the adjusted intensity level Vc as the lower approach level Vn, and the flow may enter into block S510.
Otherwise, if the gray value of the adjusted image is greater than the optimum gray value Gp, in block S508, the calculating module 302 sets the adjusted intensity level Vc as the upper approach level Vm, and the flow may enter into block S510.
In block S510, the calculating module 302 determines whether a difference between the upper approach level Vm and the lower approach level Vn is less than a predetermined value preset by the user. In the embodiment, the predetermined value equals 2.
If the difference is no less than the predetermined value, in block S512, the calculating module 302 determines that the optimum intensity level Vp is equal to the adjusted intensity level Vc.
Otherwise, if the difference is less than the predetermined value, the flow may return block S502 to calculate the optimum intensity level Vp according to the above method. For example, if the adjusted intensity level Vc set in block S502 is equal to Vc1 and the gray value of the adjusted image is equal to Gc1, the calculating module 302 uses the formula Vc=(Vm+Vn)/2 to calculate an adjusted intensity level Vc2, and obtains a corresponding gray value Gc2 of the adjusted image (see
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 |
---|---|---|---|
2008 1 0302252 | Jun 2008 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
5631976 | Bolle et al. | May 1997 | A |
6542180 | Wasserman et al. | Apr 2003 | B1 |
20020074480 | Wasserman | Jun 2002 | A1 |
20030035061 | Iwaki et al. | Feb 2003 | A1 |
20070237363 | Hagio et al. | Oct 2007 | A1 |
Number | Date | Country | |
---|---|---|---|
20090317018 A1 | Dec 2009 | US |