This application claims the benefit under 35 U.S.C. §119 from Russian Patent Application No. 2005126348, filed on Aug. 19, 2005 in the Rospatent, and Korean Patent Application No. 2006-71781, filed Jul. 28, 2006 in the Korean Intellectual Property Office, the disclosures of which are incorporated herein by reference.
1. Field of the Invention
Aspects of the present invention relate to an image processing device to determine image quality and a method thereof, and more particularly, to an image processing device and a method thereof, which can precisely determine the image quality by dividing an image and judging the quality of the whole image using luminance histograms of the respective divided images.
2. Description of the Related Art
Recently, with the development of the electronic and optical technologies, imaging devices having diverse designs and performances have been developed and spread. Such an imaging device may be a digital camera, a portable phone, a PDA, a notebook PC, a desktop PC, and other like devices. One of the functions used in to such an imaging device is an auto photofinishing function. This auto photofinishing function is a function that automatically judges whether the photographed data is low-quality data that is not data worth photofinishing.
The quality of the photographed image may differ due to various causes, such as the degree of exposure, flash state, noise, defects in a compression process, color unevenness, abnormal color tone, and other like causes. Among these causes, the exposure problem is regarded as an important factor that may occur most frequently. Since the data photographed in a bad exposure state may be developed as an image that is beyond recognition by a user, it is required to discard the image or to improve the image by performing a separate image improvement process. For this, it is required to perform a process of judging the quality of the image data before the photofinishing.
Many patent applications have been filed that describe the process of judging the quality of image data. For instance, U.S. Patent Publication No. 2002/109854 discloses a system and method of displaying and printing a digital image. According to this system and method, the determination and detection of image defect characteristics are performed as the basic work for image compensation, such as the determination of the number of image compensation methods, the degree of compensation, the preferential compensation type, and others.
Additionally, U.S. Patent Publication No. 2003/151674 discloses a method of determining the quality of an image captured in a digital camera. According to this method, the result of determining the image quality is fed back to a camera user, so that the user can determine whether to store the captured image or to re-photograph the image.
Also, U.S. Patent Publication No. 2004/120599 discloses a method of analyzing luminance histograms of an image to determine the image quality.
In addition, U.S. Patent Publication No. 2004/258308 and U.S. Pat. No. 6,826,310 disclose the determination of an image quality.
However, the above-described techniques determine the image quality in consideration of the luminance of the whole image and so on. Accordingly, it is quite possible that luminance histograms of a low-quality image are measured in the similar manner to those of a high-quality image. In this case, even the low-quality image may be judged as the high-quality image. By contrast, even the high-quality image may be determined as the low-quality image and then discarded by reason that the luminance histograms are not properly distributed. As described above, according to the prior art techniques, it is difficult to accurately judge the image quality.
Aspects of the present invention provide an image processing device and a method thereof, which can precisely determine the image quality by dividing a photographed image and judging the quality of the whole image using luminance histograms of the respective divided images.
An image processing device, according to an aspect of the present invention, includes a division unit dividing image data into a plurality of divided images, a calculation unit calculating luminance histograms of the respective divided images, and a judgment unit judging qualities of the respective divided images using the luminance histograms of the divided images and judging the quality of the image data in consideration of rates of the judged qualities.
According to an aspect of the invention, the image processing device further includes a contrast adjustment unit adjusting the whole contrast of the image data and providing the adjusted contrast to the division unit.
According to an aspect of the invention, the contrast adjustment unit adjusts the whole contrast of the image data using the following equations,
where, low and high denote lower and upper limit values for contrast adjustment, i luminance, H(i) luminance frequency, r and c horizontal and vertical coordinates of a pixel, T a threshold value for preventing an image from being excessively dark, H0 a threshold value of histogram levels, n the number of image bits, and R(r, c), G(r, c), and B(r, c) are R, G, and B component values, respectively.
According to an aspect of the invention, the judgment unit judges the divided image, of which an average value of the luminance histograms is below a preset first threshold value, as an underexposed image, judges the divided image, of which the average value of the luminance histograms is over a preset second threshold value, as an overexposed image, judges the divided image, of which the average value of the luminance histograms is over the preset first threshold value and is below the preset second threshold value, and of which the standard deviation is below a preset threshold value of the standard deviation, as a low-contrast image, and judges the divided image, of which the average value of the luminance histograms is over the preset first threshold value and is below the preset second threshold value, and of which the standard deviation is over the preset threshold value of the standard deviation, as a normal image.
According to an aspect of the invention, the judgment unit judges the image data as a low-quality data if the rate of the divided image that is judged as the normal image among the plurality of divided images is below a preset threshold rate.
According to an aspect of the invention, the division unit divides the image data into the plurality of divided images after converting the image data into a gamut in the form in which luminance information and color information are separated from the image data.
According to an aspect of the invention, the image processing device further includes a storage unit storing the image data.
According to an aspect of the invention, the division unit reads the image data stored in the storage unit, and divides the read image data into the plurality of divided images.
According to an aspect of the invention, the image processing device further includes an input unit receiving the image data from an outside.
According to an aspect of the invention, the division unit may divide the image data received through the input unit into the plurality of divided images.
According to an aspect of the invention, the image processing device further includes a control unit discarding the image data if the image data is judged as the low-quality data.
According to an aspect of the invention, the image processing device further includes an image processor performing an image process for improving the quality of the image data when the image data is judged as the low-quality data.
In another aspect of the present invention, there is provided an image determining method, which includes dividing image data into a plurality of divided images, calculating luminance histograms of the respective divided images, judging qualities of the respective divided images using the luminance histograms of the divided images, and judging the quality of the image data in consideration of rates of the judged qualities.
According to an aspect of the invention, the image determining method further includes adjusting the whole contrast of the image data before dividing the image data.
According to an aspect of the invention, the, the step of adjusting the contrast comprises using the following equations,
where, low and high denote lower and upper limit values for contrast adjustment, i luminance, H(i) luminance frequency, r and c horizontal and vertical coordinates of a pixel, T a threshold value for preventing an image from being excessively dark, H0 a threshold value of histogram levels, n the number of image bits, and R(r, c), G(r, c), and B(r, c) are R, G, and B component values, respectively.
According to an aspect of the invention, the judging the qualities of the respective divided images includes judging the divided image, of which an average value of the luminance histograms is below a preset first threshold value, as an underexposed image, judging the divided image, of which the average value of the luminance histograms is over a preset second threshold value, as an overexposed image, judging the divided image, of which the average value of the luminance histograms is over the preset first threshold value and is below the preset second threshold value, and of which the standard deviation is below a preset threshold value of the standard deviation, as a low-contrast image, and judging the divided image, of which the average value of the luminance histograms is over the preset first threshold value and is below the preset second threshold value, and of which the standard deviation is over the preset threshold value of the standard deviation, as a normal image.
According to an aspect of the invention, the judging the quality of the image data includes judging the image data as a low-quality data when the rate of the divided image that is judged as the normal image among the plurality of divided images is below a preset threshold rate.
According to an aspect of the invention, the dividing the image data includes dividing the image data into the plurality of divided images after converting the image data into a gamut in the form in which luminance information and color information are separated from the image data.
In still another aspect of the present invention, there is provided a computer-readable medium in which a program used by a computer to perform an image-quality judgment process is stored, the image-quality judgment process including dividing image data into a plurality of divided images, calculating luminance histograms of the respective divided images, judging qualities of the respective divided images using the luminance histograms of the divided images, and judging the quality of the image data in consideration of rates of the judged qualities.
According to an aspect of the invention, the image-quality judgment process further includes adjusting the whole contrast of the image data before dividing the image data.
According to an aspect of the invention, in the image-quality judgment process, the judging qualities of the respective divided images including judging the divided image, of which an average value of the luminance histograms is below a preset first threshold value, as an underexposed image, judging the divided image, of which the average value of the luminance histograms is over a preset second threshold value, as an overexposed image, judging the divided image, of which the average value of the luminance histograms is over the preset first threshold value and is below the preset second threshold value, and of which the standard deviation is below a preset threshold value of the standard deviation, as a low-contrast image, and judging the divided image, of which the average value of the luminance histograms is over the preset first threshold value and is below the preset second threshold value, and of which the standard deviation is over the preset threshold value of the standard deviation, as a normal image.
According to an aspect of the invention, in the image-quality judgment process, the judging the quality of the image data including judging the image data as a low-quality data if the ratio of the divided image that is judged as the normal image among the plurality of divided images is below a preset threshold rate.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the U.S. Patent and Trademark Office upon request and payment of the necessary fee. The above and other aspects and/or features of the present invention will be more apparent and more readily appreciated by describing in detail certain embodiments of the present invention with reference to the accompanying drawings, in which:
a and 4b are views explaining an image dividing method in the image processing device according to an embodiment of the present invention;
a and 5b are views illustrating an example of a normal image and its luminance histograms;
a and 6b are views illustrating an example of an underexposed image and its luminance histograms;
a and 7b are views illustrating an example of an overexposed image and its luminance histograms;
a and 8b are views illustrating an example of a low-contrast image and its luminance histograms;
a and 9b are views illustrating an example of an image and its luminance histograms;
a and 10b are views illustrating qualities and rates of divided images when the image of
a and 11b are views illustrating qualities and rates of divided images when the image of
Certain embodiments of the present invention will be described in greater detail with reference to the accompanying drawings. In the following description, same drawing reference numerals are used for the same elements even in different drawings. The matters defined in the description such as a detailed construction and elements are nothing but the ones provided to assist in a comprehensive understanding of the invention. Thus, it is apparent that aspects of the present invention can be carried out without those defined matters. Also, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.
The division unit 110 divides the whole image by n*m in width and length. In this example, n and m may be the same value or may be of different values. Details of such image division are disclosed in the theses “An Extendible Hash for Multi-Precision Similarity Querying of Image Databases” announced by L. Shu, M. T. Ozsu, V. Oria, and R. Ng, in 27th International Conference for VLDB (Very Large Database system) held in Rome, Italy, on September 2001, and “Image Quality Improvement by Adaptive Exposure Correction techniques” announced by G. Messina, A. Castorina, S. Battiato, and A. Bosco, in IEEE ICME'03 International Conference and Expo for Multimedia, held in Baltimore, U.S.A., on July 2003, the disclosures of which are incorporated by reference.
The division rate of the division unit 110 may be optionally determined. If the size of the divided image is too large, the accuracy of the quality determination for important parts of the image is degraded. By contrast, if the size of the divided image is too small, the respective divided images may have a uniform color, and may be judged as the low-contrast regions. Accordingly, it is preferable to properly divide the whole image according to the purpose of the design. In practice, it is preferable to divide the image by 2*2, 3*3, and 4*4. Additionally, while described as being of the same size, it would be possible to divide the image in unequal sizes, such as where certain parts of the picture are more critical than others and require a finer mesh for the luminance histograms to accurately determine image quality.
The division unit 110 may convert the image data into a color gamut having luminance information that is separated from color information before it divides the image. Specifically and while not limited thereto, the division unit 110 converts the image into a YUV color gamut using Equation (1).
Y=0.299*R+0.587*G+0.114*B
U=−0.147*R−0.289*G+0.436*B (1)
V=0.615*R−0.515*G−0.100*B
In addition, the division unit 110 may convert the image data into HIS color model in addition to or instead of the YUV color gamut. After the image quality determination work is completed, the converted model may be converted into the original color model. However, it is understood that the division unit 110 need not be included in the image processing device in all aspects of the invention, such as where the image is divided prior to being received at the device.
The calculation unit 120 calculates luminance histograms of the respective images divided by the division unit 110. Specifically, the calculation unit 120 calculates the occurrence frequency of the respective luminance values by confirming all the luminance values of the respective pixels in the divided images.
The judgment unit 130 judges the qualities of the respective divided images using the luminance histograms calculated for the respective divided images. Then, the judgment unit 130 judges the quality of the whole image in consideration of the rates of the qualities of the respective divided images. Specifically, the judgment unit 130 calculates an average value of luminance histograms for each divided image. By way of example, the average value can be calculated by Equation (2).
In Equation (2), Hmean denotes an average value of luminance histograms, i a luminance value, H(i) luminance frequency, and N the number of luminance histograms, respectively.
The judgment unit 130 judges the qualities of the respective divided images using the calculated average values. By way of example, the judgment unit 130 judges the divided image as an underexposed image when the average value of the luminance histograms is below a preset first threshold value. The judgment unit 130 judges the divided image as an overexposed image when the average value of the luminance histograms is over a preset second threshold value. Here, the second threshold value is larger than the first threshold value. However, other numbers of thresholds can be used in other aspects of the invention.
By way of example, if the whole luminance range is 0 to 255, the first threshold value may be set to 64, and the second threshold value may be set to 192. In this example, if the calculated average value is in the range of 0 to 63, the judgment unit 130 judges the corresponding divided image as an underexposed image. If the average value is in the range of 192 to 255, the judgment unit 130 judges the corresponding divided image as an overexposed image. If the average value is at or between the first threshold value (64) and the second threshold value (192), the judgment unit 130 confirms the standard deviation of the corresponding divided image.
While not required in all aspects, the judgment unit 130 can calculate the standard deviation using Equation (3).
In Equation (3), σ denotes the standard deviation.
The judgment unit 130 judges the divided image, of which the calculated standard deviation value is below a threshold value of the standard deviation, as the low contrast image. By contrast, the judgment unit 130 judges the divided image, of which the calculated standard deviation value is over the threshold value of the standard deviation, as the normal image. That is, the judgment unit 130 judges the divided image as the overexposed image, the underexposed image, the low-contrast image, or the normal image, according to the average value and the standard deviation. In this embodiment of the present invention, it is exemplified that the image is classified into four kinds of images. However, it is also possible to classify the image in more detail in other embodiments.
The judgment unit 130 judges the quality of the whole image using the rates of the qualities of the respective divided images. That is, if the rate of the normal images to the divided images is below the preset threshold rate, the judgment unit 130 judges the whole image as the low-quality image. In this case, the judgment unit 130 may discard the low-quality image or improve the quality of the image by performing a separate image improving process. In addition, the judgment unit 130 may store the low-quality images in a separate storage space so as to discriminate them from high-quality images.
Also, the judgment unit 130 can alert a user of the low quality image to allow the user a choice of saving, deletion and/or image improvements. The grade according to the rate of the normal images to the whole divided images may be defined as Table 1 in an aspect of the invention.
According to Table 1, the judgment unit 130 judges the whole image as the low-quality image if the rate of the normal images to the whole divided images is below the threshold rate (e.g., 55%). However, it is understood that more or fewer threshold rates can be used, and that such rates could vary according to image type (i.e., low light, moving subject, etc.)
The contrast adjustment unit 140 makes the luminance histograms of the whole image be evenly distributed by adjusting the contrast of the image data before the image data quality determining work is performed at units 110, 120, 130. That is, the whole luminance of the image may be high or low in accordance with the characteristic of the photographed object. Accordingly, the contrast adjustment unit 140 adjusts the contrast of the image so that the determination of the image qualities can be performed under the same condition.
While not required in all aspects, the shown embodiment of the contrast adjustment unit 140 first defines the lower limit value and the upper limit value for the contrast adjustment of the whole image data. The lower limit value and the upper limit value can be defined as Equation (4).
In Equation (4), low and high denote the lower and upper limit values for the contrast adjustment, i the luminance, H(i) the luminance frequency, r and c the horizontal and vertical coordinates of a pixel, T the threshold value for preventing the image from being excessively dark, and H0 the threshold value of histogram levels.
The contrast adjustment unit 140 can adjust the whole contrast by substituting the terms low and high as defined in Equation (4) in Equation (5).
R(r,c)′=(2n−1)*{(R(r,c)−low}/(high−low)
G(r,c)′=(2n−1)*{(G(r,c)−low}/(high−low) (5)
B(r,c)′=(2n−1)*{(B(r,c)−low}/(high−low)
In Equation (5), n denotes the number of image bits, and R(r, c), G(r, c), and B(r, c) denote the R, G, and B component values. According to Equation (5), the R, G, and B components of the pixel at a point (r, c) are adjusted to new values by the low and high values. Accordingly, the contrast of the whole image is adjusted. According to an aspect of the invention, the above-described contrast adjustment may be performed only when the luminance frequency corresponding to the luminance, i=0, 1, is “0”, or the luminance frequency corresponding to the luminance, i=254, 255, is “0”.
If the luminance histograms of the whole image are adjusted to be evenly distributed by the contrast adjustment unit 140, the adjusted image data is provided to the division unit 110. The division unit 110 divides the contrast-adjusted image data, and the calculation unit 120 calculates the luminance histograms of the respective divided images. The judgment unit 130 judges the qualities of the divided images and the quality of the whole image using the calculated luminance histograms. This operation is the generally same as that as explained with reference to
The input unit 150 receives the image data from an outside source, such as a camera or a network. The storage unit 160 stores the image data received through the input unit 150 or image data photographed through an internal imaging module (not illustrated). The storage unit 160 may be implemented by a magnetic disk, flash memory, SD card, a magnetic tape, a cassette, a CD-ROM, a CD-RW, a DVD, or other memories. While not required, it is understood that the input unit 150 can be the image sensors of a camera and the storage unit 160 can be removable and/or permanent memories in aspects of the invention.
The image processing device according to the present invention can determine the image quality of the image data received through the input unit 150 or the image data stored in the storage unit 160. That is, the division unit 110 divides the image data, the calculation unit 120 calculates the luminance histograms of the divided image data, and the judgment unit 130 judges the qualities of the divided images and the quality of the whole image using the calculated luminance histograms. In this example, the contrast adjustment unit 140 may adjust the contrast of the image data and provide the contrast-adjusted image data to the division unit 110. However, it is understood the contrast adjustment unit 140 need not be used in all aspects.
On the other hand, the control unit 170 processes the image data according to the result of judgment performed by the judgment unit 130. That is, if it is judged that the image data is low-quality data, the control unit 170 may discard the image data. If a storage space for separately managing the image data judged as the low-quality data is provided in the storage unit 160, the control unit 170 may instead store the low-quality data in the corresponding storage space. The control unit 170 can also alert a user to the low quality to allow a user to re-take the image.
Also, the control unit 170 may control the image processor 180 to improve the quality of the low-quality data. The image processor 180 can adjust the quality of the image data by performing an image process. Specifically, if the image is judged as the overexposed image, the image processor 180 may lower the luminance of the whole image, while if the image is judged as the underexposed image, the processor 180 may heighten the luminance of the whole image. If the image is judged as the low-contrast image, the image processor 180 may perform the contrast adjustment process as Equations (4) and (5) according to an aspect of the invention. However, any conventional image processing technology can be used instead of or addition to Equations (4) and (5) in aspects of the invention.
On the other hand, if it is judged that the image data is not the low-quality data, the control unit 170 can normally use the corresponding image data. Specifically, the control unit 170 controls the storage unit 160 to store the image data as the normal data, or controls an output means (not illustrated) to transmit the image data to an outside device (such as a display, to another device across a network, or a printer). In addition, and while not required in all aspects, the control unit 170 controls a printing module (not illustrated) to print the image data, transmit the image across a network to be shared at another device, and/or controls a display (not illustrated) to display the image data.
The bus 190 serves as data transmission paths among the respective constituent elements.
While not required in all aspects, the contrast adjustment unit 140, the division unit 110, the calculation unit 120, the judgment unit 130, and/or the control unit 170 may be implemented by a microprocessor or processors. In this embodiment, the microprocessor performs the above-described processes by successively reading and executing programs, which include an image quality judgment process, stored in a main memory and/or the storage unit 160.
a and 4b are views explaining an image dividing method in the image processing device according to an embodiment of the present invention. As shown in
a to 8b are views illustrating examples of diverse images and their luminance histograms. First,
a shows an example of an underexposed image and
a shows an example of an overexposed image and
a shows an example of a low-contrast image and
a shows the qualities of four divided images obtained by dividing the image of
a and 11b are views illustrating qualities and rates of divided images when the image of
Then, the luminance histograms of the respective divided images are calculated (S220). The qualities of the respective divided images are judged using their average value of luminance histogram and the standard deviation (S230). Accordingly, the divided image can be classified into one of an underexposed image, an overexposed image, a normal image, and a low-contrast image.
The quality of the whole image is judged in consideration of the rates of the qualities of the respective divided images (S240). That is, if the quality of the normal image is over a predetermined rate, the whole image is judged as the high-quality image. If the quality of the normal image is below the predetermined rate, the whole image is judged as a low-quality image. After the judgment, the low-quality image may be discarded or separately managed, or the quality of the image may be improved by applying an image improvement process to the low-quality image. By contrast, in the case of the high-quality image, it may be used in diverse manners. That is, the high-quality image may be stored in the memory, transmitted to an external device, and/or printed.
The contrast of the image data is adjusted using the lower limit value and the upper limit value (S320). In this example, Equation (5) as described above may be used.
Thereafter, the color gamut of the image data is converted (S330). In this case, it is preferable, but not required, that the image data is converted into a YUV color gamut such as using equation (1) or an HIS color gamut, in which luminance information is separated from color information. If the original color gamut of the image data is in the YUV or HIS color gamut, the color gamut conversion work is omitted.
Then, the image is divided into a plurality of divided images (S340), the luminance histograms of the divided image calculated (S350), and then quality judgment of the divided images (S360) and quality judgment of the whole image (S370) are performed. Since these operations have been explained with reference to
If the average value is below the second threshold value, the standard deviation of the divided image is compared with the predetermined threshold value of the standard deviation (S450). If the standard deviation of the divided image is below the threshold value, it is judged as the low-contrast image (S460). If the standard deviation of the divided image is over the threshold value, it is judged as the normal image (S470). Through the above processes, the respective divided image can be judged as one of the underexposed image, overexposed image, low-contrast image, and normal image.
A computer program that performs the all or portions of the algorithm as illustrated in FIGS. 12 to 14 may be stored in diverse computer-readable media, such as a hard disk memory, floppy disk, CD, DVD, memory card, and others, to be implemented on one or more computers and/or processors.
As described above, according to aspects of the present invention, the image data is divided into a plurality of divided images, the qualities of the divided images are determined, and then the quality of the whole image is determined by combining the result of quality determination. Accordingly, the quality of the image data can be judged more accurately and more precisely. This accurate judgment of the image data can prevent any normal data from being discarded due to the misrecognition of the image quality, and will be of great help in determining whether to process the image.
The foregoing embodiment and advantages are merely exemplary and are not to be construed as limiting the present invention, the definition of which is set forth in the accompanying claims and equivalents thereof. The present teaching can be readily applied to other types of apparatuses. Also, the description of the embodiments of the present invention is intended to be illustrative, and not to limit the scope of the claims, and many alternatives, modifications, and variations will be apparent to those skilled in the art.
Number | Date | Country | Kind |
---|---|---|---|
2005126348 | Aug 2005 | RU | national |
2006-71781 | Jul 2006 | KR | national |