This non-provisional application claims priority under 35 U.S.C. ยง119(a) on Patent Application No(s). 097136087 filed in Taiwan, R.O.C. on Sep. 19, 2008 the entire contents of which are hereby incorporated by reference.
1. Field of the Invention
The present invention relates to an image processing method and a device thereof, and more particularly to an image brightness compensation method and a digital camera device.
2. Related Art
As camera devices having been increasingly prevailing, they are more and more widely used in various applications. When a camera device is used for shooting an image, the shooting brightness may directly affect the quality and recognizability of the final image. Especially, when the light in the shooting site is inadequate or the exposure time fails to meet the requirement of the safety shutter, a flash lamp is required to compensate the brightness of the shooting environment. Therefore, the brightness of the shot image is compensated by the flash lamp, such that the shot image may not have any unrecognizable area due to the excessively inadequate brightness.
Then, a main flash is fired according to the main flash duration, and a raw image is shot (Step S140). Finally, an image processing is performed on the raw image, so as to output a preset image file (Step S150). Through the above steps, when capturing an image, the camera device determines the occasion when a flash lamp is needed for image shooting. Furthermore,
The conventional camera device has to fire a pre-flash before shooting, so as to detect a distance between the camera device and the shot object. In order to detect the distance between the camera device and the shot object, a detection unit and a corresponding circuit need to be additionally disposed in the camera device. As such, not only the volume and weight of the camera device are increased, but the manufacturing cost also rises.
In order to solve the above problems, the present invention is mainly directed to an image brightness compensation method, suitable for adjusting a brightness of a digital image shot by a digital camera device, especially when the shot object is located outside a maximum output range of a flash lamp.
To achieve the above objective, the present invention provides an image brightness compensation method, which includes the steps of: pre-capturing a target image, and recording a target information; triggering a flash lamp, and meanwhile capturing a raw image; determining whether the raw image satisfies a brightness threshold or not according to a brightness difference between the target information and the raw image; if the raw image fails to satisfy the brightness threshold, executing a brightness compensation program on the raw image according to the target information; and finally generating an output image.
The present invention is further directed to a digital camera device with an image brightness compensation function.
To achieve the above objective, the present invention provides a digital camera device with an image brightness compensation function, which includes a photo-sensitive unit, a flash lamp, a storage unit, a brightness compensation program, and a processing unit. The photo-sensitive unit captures a signal of a digital image. The flash lamp performs brightness compensation on an external environment of the digital image. The storage unit is electrically connected to the photo-sensitive unit, for storing the brightness compensation program and the digital image. The processing unit is electrically connected to the photo-sensitive unit, the flash lamp, and the storage unit, for executing the brightness compensation program. The brightness compensation program includes the steps of: pre-capturing a target image, and recording a target information; triggering the flash lamp, and meanwhile capturing a raw image; determining whether the raw image satisfies a brightness threshold or not according to a brightness difference between the target information and the raw image; if the raw image fails to satisfy the brightness threshold, executing a brightness compensation program on the raw image according to the target information; and generating an output image after the brightness compensation.
The present invention provides a digital image brightness compensation method and a digital camera device. Therefore, a desired compensation effect of a flash lamp at an appropriate intensity can be achieved without firing a pre-flash.
The present invention will become more fully understood from the detailed description given herein below for illustration only, and thus is not limitative of the present invention, and wherein:
The objective and method of the present invention are described in detail below through preferred embodiments, and the concept of the present invention may also be applied to other scopes. The following embodiments are only intended to illustrate the objective and method of the present invention, instead of limiting the scope of the present invention.
It is determined whether the raw image satisfies a brightness threshold or not according to a brightness difference between the target information and the raw image (Step S340). If the raw image fails to satisfy the brightness threshold, a brightness compensation program is executed on the raw image according to the target information (Step S350). A brightness gain of the target image and a brightness gain of the raw image are calculated (Step S351). The brightness gain of the raw image is adjusted, such that the brightness gain of the target image is consistent with the brightness gain of the raw image (Step S352). Finally, an output image is generated according to the adjusted target image (Step S360). An example is given below to clearly illustrate the spirit of the present invention, and the adopted parameters are not limited herein.
Then, an output mode of the flash lamp 220 is set in a full-flash activation mode. The farthest coverage of the full-flash activation mode is set as a first distance. The distance between the shot object and the digital camera device 200 is set as a second distance. The digital camera device 200 activates the flash lamp 220 when shooting a raw image, so as to obtain an image of the shot object compensated by the flash lamp 220. As the movement of the shot object may not be too abrupt during the process from automatic focusing to shooting, it is assumed that the displacement variation of the shot object in the target image and that in the raw image can be ignored.
It is determined whether the raw image satisfies a brightness threshold or not according to a brightness difference between the target information and the raw image. In this implementation aspect, the target information is, for example, the face brightness.
Next, the processing unit 240 compares the second brightness information of the raw image with the first brightness information. As the shot object in the raw image is located outside the maximum output range of the flash lamp 220, the lights received by the shot object from the flash lamp 220 are insufficient when the raw image is shot. Thus, the raw image is adjusted according to the brightness information of the target image.
If the raw image fails to satisfy the brightness threshold, the processing unit 240 executes the brightness compensation program 231, so as to adjust the brightness of the raw image to the brightness level of the target image. Particularly, a brightness gain of the target image and a brightness gain of the raw image are calculated. The brightness gain of the raw image is adjusted, such that the brightness gain of the target image is consistent with the brightness gain of the raw image.
The present invention provides a digital image brightness compensation method and a digital camera device. Therefore, a desired compensation effect of the flash lamp 220 at an appropriate intensity can be achieved without firing a pre-flash.
Number | Date | Country | Kind |
---|---|---|---|
097136087 | Sep 2008 | TW | national |