1. Technical Field
The present disclosure relates to adjusting systems, and particularly to a brightness-adjusting system and a method thereof, and an electronic device using same.
2. Description of Related Art
Cameras connected to electronic devices through USB ports or embedded therein are used to capture images. However, the quality of the images is easily influenced by the environment, such as ambient light.
Therefore, what is needed is a brightness-adjusting system to overcome the above described limitations.
Referring to
The processing unit 10 executes instructions to perform functions of a dividing module 12, a determining module 15, a brightness value-acquiring module 13, a detection module 14, and a controlling module 16.
The dividing module 12 divides the first image into a number of sub-images. The brightness value-acquiring module 13 acquires an average brightness value of each sub-image. The detection module 14 detects whether or not the average brightness value of each sub-image falls within a predetermined brightness value range. If a sub-image has an average brightness value that falls outside a predetermined brightness value range, the determining module 15 determines which driving controller 40 controls the light-emitting unit 30 associated with the sub-image that has an average brightness value that does not fall within the predetermined brightness value range. The controlling module 16 controls the determined driving controller 40 to adjust the current flowing to the light-emitting unit 30 to adjust the illumination value of the light-emitting unit 30. The controlling module 16 further controls the lens module 20 to capture a second image of the object after the driving controller 40 has adjusted the current flowing to the light-emitting unit 30. The controlling module 16 does not do any operation when the average brightness value of each sub-image falls within the predetermined brightness value range.
The controlling module 16 controls the driving controller 40 to increase the current flowing to a light-emitting unit 30 when the average brightness value of the corresponding sub-image is lower than the predetermined brightness value range, and controls the driving controller 40 to decrease the current flowing to a light-emitting unit 30 when the average brightness value of the corresponding sub-image is greater than the predetermined brightness value range.
Each sub-image includes a number of pixels. The brightness value-acquiring module 13 acquires the brightness value of each pixel of the sub-image, and calculates the average brightness value of the number of pixels. The average brightness value of the number of pixels is the average brightness value of the sub-image.
The processing unit 10 further includes a deleting module 17. The deleting module 17 deletes the first image after the second image is captured by the lens module 20, thereby displaying the second image to a user.
In step S601, the lens module 20 captures the first image in response to the user operation.
In step S602, the dividing module 12 divides the first image into the number of sub-images.
In step S603, the brightness value-acquiring module 13 acquires an average brightness value of each sub-image.
In step S604, the detection module 14 detects whether or not the average brightness value of each sub-image falls within a predetermined brightness value range; if yes, the procedure goes to ends; if no, the procedure goes to step S605.
In step S605, the determining module 15 determines the driving controller 40 associated with the light-emitting unit 30 associated with the sub-image that has an average brightness value that does not fall within the predetermined brightness value range.
In step S606, the controlling module 16 controls the driving controller 40 associated with the determined light-emitting unit 30 to adjust the current flowing to the light-emitting unit 30 to adjust the illumination value of the light-emitting unit 30.
In step S607, the controlling module 16 controls the lens module 20 to capture a second image of the object after the driving controller 40 has adjusted the current flowing to the light-emitting unit 30.
The method further includes a sub step: the deleting module 17 deletes the first image captured by the lens module 20 after the second image is captured by the lens module 20.
Although various embodiments have been specifically described, the disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiments without departing from the scope and spirit of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
101149475 | Dec 2012 | TW | national |