WO2003085989A1 - Dispositif de traitement d'images, programme de traitement d'images et procede de traitement d'images - Google Patents

Dispositif de traitement d'images, programme de traitement d'images et procede de traitement d'images Download PDF

Info

Publication number
WO2003085989A1
WO2003085989A1 PCT/JP2003/004327 JP0304327W WO03085989A1 WO 2003085989 A1 WO2003085989 A1 WO 2003085989A1 JP 0304327 W JP0304327 W JP 0304327W WO 03085989 A1 WO03085989 A1 WO 03085989A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
gradation
image processing
information
image
Prior art date
Application number
PCT/JP2003/004327
Other languages
English (en)
French (fr)
Inventor
Hideyasu Kuniba
Original Assignee
Nikon Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corporation filed Critical Nikon Corporation
Priority to JP2003583033A priority Critical patent/JP3801177B2/ja
Priority to AU2003221024A priority patent/AU2003221024A1/en
Publication of WO2003085989A1 publication Critical patent/WO2003085989A1/ja

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Definitions

  • the present invention relates to an image processing device, an image processing program, and an image processing method.
  • the present invention relates to a technique for obtaining information on a photographing light source of image data.
  • FIG. 18 is a diagram showing the relationship between “distribution plotted in RB color space” and “color temperature of photographing light source” cited from this document.
  • the distribution in the RB color space moves from the R-axis direction to the B-axis direction as the color temperature of the imaging light source rises.
  • the estimation method described in the above document estimates the color temperature of the photographic light source based on which color temperature distribution range (the frame shown in Fig. 18 for each color temperature) falls within this RB color space distribution. I have. Disclosure of the invention
  • An object of the present invention is to update image data in order to accurately obtain information on a photographing light source. To provide new analysis techniques.
  • An image processing apparatus is an image processing apparatus that processes image data including data of a plurality of pixels and obtains information regarding an imaging light source of the image data, and includes a classification unit and a determination unit.
  • the classification unit obtains a frequency distribution of the gradation information for each color information section from the color information and the gradation information of the pixel.
  • the frequency distribution obtained in this manner is referred to as “gradation distribution for each color”.
  • the judgment unit can regard the gradation variation (in other words, gradation variation, gradation diversity, gradation richness, almost continuous). (Gradation width) is evaluated for each color information division unit. Then, the determination unit determines the color information evaluated as having a large number of gradation variations as color information reflecting the influence of the imaging light source.
  • the “color information of a pixel” is “information on the color of a pixel” obtained from data of the pixel or the like.
  • the determination unit calculates a product of frequencies for a tone distribution in color units, and determines a tone variation based on the value of the product.
  • the determination unit evaluates that the color information having a larger value of the product has a larger gradation variation.
  • the classification unit includes a space classification unit and a normalization unit as described below.
  • the space classification unit obtains a frequency distribution in the color-one-tone space based on the color information and the tone information of the pixel. That is, a frequency distribution of pixels is obtained in a space in which colors and gradations are used as coordinate axes.
  • the normalization unit normalizes this frequency distribution for each section of the gradation information to obtain the gradation information. Suppress frequency variations due to differences in report values.
  • the classification unit obtains a gradation distribution for each color from the frequency distribution normalized by the normalization unit.
  • the normalization unit compensates a small value that does not impair the overall tendency of the frequency distribution, at the time of the normalization, at a position where the frequency is zero in the frequency distribution.
  • the image processing apparatus of the present invention performs the following preprocessing in the classification unit. That is, the classification unit extracts a plurality of image areas from the image data, and calculates an average color for each of the image areas.
  • the classification unit obtains the above-described gradation distribution in color units for the image region selected by the preprocessing.
  • the classification unit and the determination unit execute the above-described processing for each of a plurality of image regions partially extracted from the image data.
  • the classification unit obtains a gradation distribution in color units for each of the individual image regions.
  • the determination unit obtains color information with many gradation variations for each image region.
  • the determination unit calculates a representative value from the “color information with many gradation variations” obtained for each of the image areas, and sets this representative value as color information reflecting the influence of the imaging light source.
  • the determination unit performs white balance correction of the image data based on the color information determined to reflect the influence of the imaging light source.
  • the determination unit determines that the influence of the imaging light source is reflected.
  • White balance correction of image data is performed so that the converted color information is converted to achromatic color.
  • An image processing program causes a computer to function as the classification unit and the determination unit according to any one of the above (1) to (7).
  • An image processing method is an image processing method for processing image data including data of a plurality of pixels to obtain information on a photographic light source of the image data, and includes a classification step and a determination step.
  • the frequency distribution of the gradation information is obtained for each color information section based on the color information and the gradation information of the pixel.
  • the gradation variation is evaluated in color units from the gradation distribution in color units, and the color information evaluated as having many gradation variations is determined as color information reflecting the influence of the imaging light source.
  • FIG. 1 is a diagram showing a configuration of an electronic camera 11 (including an image processing device).
  • FIG. 2 is a flowchart illustrating white balance correction according to the first embodiment.
  • Fig. 3 is a graph showing the trajectory of the color information ( ⁇ '/ K') of the achromatic subject while changing the color temperature of the imaging light source.
  • FIG. 4 is a diagram created by dithering the image data to show an example of a pattern of the image data.
  • FIG. 5 is a distribution diagram in which color information and gradation information for each pixel are plotted on a color-gradation space.
  • Figure 6 shows the frequency distribution in the color-one gradation space. .
  • FIG. 8 is a graph showing the sum of the frequencies.
  • FIG. 9 is a flowchart illustrating white balance correction according to the second embodiment.
  • FIG. 10 is a graph showing the product of the frequencies.
  • Figure 11 shows the frequency distribution after normalization.
  • FIG. 12 is a flowchart illustrating white balance correction according to the third embodiment.
  • FIG. 13 is a graph showing the product of the frequencies.
  • FIG. 14 is a diagram showing a frequency distribution after normalization.
  • FIG. 15 is a flowchart illustrating white balance correction according to the fourth embodiment.
  • FIG. 16 is a diagram showing an example of an achromatic color range used for selecting an image area.
  • FIG. 17 is a diagram illustrating a result of obtaining color information having many gradation variations in units of image areas.
  • FIG. 18 is a diagram showing the relationship between “pixel distribution plotted in RB color space” and “color temperature of imaging light source”.
  • the first embodiment is an embodiment corresponding to claims 1, 3, 7, and 9.
  • FIG. 1 is a diagram showing a configuration of an electronic camera 11 (including an image processing device).
  • a photographing lens 12 is attached to an electronic camera 11.
  • the light receiving surface of the image sensor 13 is arranged in the image space of the photographing lens 12.
  • the image data generated by the image sensor 13 is digitized via an A / D converter 14 and then temporarily stored in an image memory 15.
  • the image processing unit 16 performs image processing such as white balance correction on the image data in the image memory 15.
  • the compression recording unit 17 compresses and records the image data on which the image processing has been completed on the recording medium 18.
  • the classification unit described in the claims corresponds to “a part for obtaining a gradation distribution in color units from image data” of the image processing unit 16.
  • the determining unit described in the claims corresponds to “a part for obtaining color information reflecting the influence of the imaging light source based on the gradation distribution in color units” of the image processing unit 16.
  • FIG. 2 is a flowchart illustrating white balance correction according to the first embodiment. Hereinafter, the processing operation of the white balance correction will be described along the step numbers shown in FIG.
  • Step S 0 The image processing section 16 acquires RGB data to be used as an estimation material of the light source for photographing from the image data in the image memory 15.
  • the image processing unit 16 performs the following standardization to make the signal levels of the RGB data uniform.
  • Imax MAX [VR 2 + G 2 + B 2 ] .. '(1)
  • Step SI The image processing section 16 calculates color information based on the normalized R'G'B 'component.
  • the index value adopted as the color information is preferably a value that has a one-to-one correspondence with the characteristics (eg, color temperature) of the imaging light source. Furthermore, a value that responds sensitively to the difference in the imaging light source is preferable.
  • the following color information is employed from the viewpoint of good correspondence with the color temperature.
  • Figure 3 shows the data obtained by changing the color information ( ⁇ '/ R') for an achromatic subject while changing the color temperature of the photographic light source.
  • the color information ( ⁇ ′ / ⁇ ′) substantially corresponds one-to-one with the color temperature of the imaging light source, and is sensitive to a change in the color temperature of the imaging light source.
  • Step S2 Subsequently, the image processing section 16 calculates gradation information based on the R'G '' 'component of each pixel.
  • the following gradation information is employed.
  • Step S3 The image processing section 16 classifies each pixel on the basis of the color information and gradation information thus obtained, and obtains a frequency distribution as shown in FIG.
  • Figure 4 is an example of image data. Since this image data was taken in fine weather, the color temperature of the photographing light source is approximately 600 °.
  • the image processing unit 16 calculates the color information and the gradation information by using Expressions 3 and 4 described above.
  • FIG. 5 shows a pixel distribution in which the color information and the gradation information are plotted on a color-one gradation space.
  • the color-one-tone space here is a space in which colors and gradations are set on coordinate axes.
  • the image processing unit 16 provides a plurality of areas on the color-one-tone space.
  • the size of these regions may be any size that does not affect the estimation accuracy of the imaging light source practically.
  • the shape of the region may be any shape such as a rectangle or a circle.
  • an area defined by the following conditional expression is adopted as the plurality of areas.
  • Tone division k 1, 2, 3 ⁇ ⁇ ⁇ 1 0
  • the image processing unit 16 substitutes the color information and gradation information of each pixel into this conditional expression, and searches for an area where the conditional expression is satisfied (that is, values of the gradation division and the color division satisfying the conditional expression). I do.
  • the image processing unit 16 increases the frequency of the area by “1” each time an area where the conditional expression is satisfied is found.
  • Step S4 The image processing section 16 normalizes the obtained frequency distribution for each gradation section k.
  • the normalization is performed so that the maximum value of the frequency of the gradation section k is “10000”. Such normalization suppresses frequency variation for each gradation section k.
  • FIG. 7 is a diagram showing the frequency distribution after such normalization.
  • the frequency distribution after the normalization is divided for each color classification, and corresponds to the “gradation distribution for each color” in the first embodiment.
  • Step S5 The image processing section 16 calculates the sum of the frequencies for each of these tone distributions in color units. Since the frequency variation for each gradation section k is suppressed in step S4, the sum of the frequencies reflects the degree of gradation variation well. Therefore, the image processing unit 16 determines that the color information having the larger total of the frequencies has more gradation variations and is color information reflecting the influence of the imaging light source.
  • FIG. 8 is a graph in which the values of color information are plotted on the horizontal axis and the sum of the frequencies is plotted.
  • the color information 2.0 is determined to be the color information that most reflects the influence of the imaging light source. From the correspondence graph shown in FIG. 3, the color temperature of the photographing light source at this time is approximately 690K.
  • Step S6 The image processing section 16 obtains a coefficient (white balance correction value) for correcting the color deviation of the image data based on the color information determined to reflect the influence of the imaging light source by referring to a table or the like. . That is, in the case of FIG. 8 described above, the image processing unit 16 obtains a white balance correction value for correcting the color balance of the color temperature of 690 OK.
  • Step S7 The image processing section 16 performs white balance correction on the image data in the image memory 15 using the obtained white balance correction value.
  • the estimated color temperature 6900 K in the first embodiment is slightly higher than the actual color temperature 600 K.
  • this time is blue sky, there was a possibility that it would have been originally estimated to be a higher color temperature. Considering this fact, it can be seen that in the present embodiment, a good estimation result is obtained in which the effect of the large area (blue sky) is appropriately suppressed.
  • the present embodiment has a frequency distribution as shown in FIG. Therefore, the frequency distribution S of the blue sky is widely dispersed in the axial direction of the color information, reflecting the subtle color change of the blue sky. Therefore, in the above-described processing, the frequency distribution S of the blue sky is subdivided into color information sections. As a result, in the evaluation for each category of color information, the gradation variation of the blue sky is evaluated to be small. Therefore, in the present embodiment, a good estimation result can be obtained without being distracted by the large-area blue sky.
  • the object scene has objects having various reflectances and reflection angles and various shadows.
  • the light from the light source is modulated in the light and dark directions by these factors, so that there is a high probability that various gradations will be generated.
  • the frequency variation for each gradation section k is suppressed by the normalization processing in step S4.
  • the frequency for each gradation varies depending on the pattern of the image data. This variation makes it difficult to determine gradation variations on a uniform scale.
  • the frequency variation is reduced by the above-described normalization processing, and the frequencies in the gradation direction are evenly equalized. Therefore, it is easy to determine the gradation variation on a unified scale regardless of the difference in the pattern.
  • the second embodiment is an embodiment corresponding to claims 1, 2, 3, 4, 7, and 9.
  • FIG. 9 is a flowchart illustrating white balance correction according to the second embodiment. Hereinafter, the processing operation of the white balance correction will be described along the step numbers shown in FIG.
  • Step S 0 Processing similar to step S 0 of the first embodiment.
  • Step S1 Processing similar to step S1 of the first embodiment.
  • Step S2 Processing similar to step S2 of the first embodiment.
  • Step S3 Processing similar to step S3 of the first embodiment.
  • Step S4 The image processing unit 16 captures a small value that does not impair the overall tendency of the frequency distribution obtained in step S13, at a zero frequency point in the frequency distribution.
  • the minimum frequency “1” is uniformly added to the entire frequency distribution (see FIG. 6).
  • Step S15 The image processing section 16 normalizes the frequency distribution in the color-one gradation space for each gradation section k.
  • normalization is performed so that the maximum value of the frequency in the gradation section k is “10000”. Such normalization suppresses frequency variations for each gradation section k.
  • FIG. 11 is a diagram showing the frequency distribution after this normalization.
  • the frequency distribution after this normalization is divided for each color classification, which is the “gradation distribution for each color” in the second embodiment.
  • Step S16 The image processing section 16 calculates the product of the frequencies for each of the gradation distributions in each color.
  • the product of the frequencies well reflects the degree of gradation variation. That is, the image processing unit 16 determines that the color information having a larger product of the frequencies has more gradation variations and is color information reflecting the influence of the imaging light source.
  • FIG. 10 is a graph in which the value of the color information is plotted on the horizontal axis. In the case of the graph shown in Fig. 10, the color information is determined to be 1.8 force S, which is the color information that most reflects the influence of the imaging light source. From the correspondence graph shown in FIG. 3, the color temperature of the imaging light source at this time is estimated to be approximately 6200K.
  • Step S17 Processing similar to step S6 of the first embodiment.
  • Step S18 Processing similar to step S7 of the first embodiment.
  • the estimated color temperature 6200 K in the second embodiment is a good estimation result in which the effect of the blue sky is well suppressed.
  • Such a good estimation result is a result of estimating the photographing light source using the gradation variation as a scale.
  • the product of the frequencies is calculated for the tone distribution of each color, and the tone variation is determined based on the value of the product.
  • the difference in gradation variation appears remarkably as the magnitude of the numerical value, it is possible to clearly determine the gradation variation.
  • the frequency variation for each gradation section k is suppressed by the normalization processing in step S13. As a result, it is possible to correct a difference in gradation distribution depending on a picture and determine a gradation variation more accurately.
  • a portion where the frequency is zero is supplemented by a small value (here, the minimum frequency “1”) that does not impair the overall tendency of the frequency distribution. Therefore, when calculating the product of the frequencies, it is not necessary to bother to eliminate the frequency of zero, and the calculation process can be simplified.
  • the third embodiment is an embodiment corresponding to claims 1, 2, 3, 4, 7, and 9.
  • FIG. 12 is a flowchart illustrating white balance correction according to the third embodiment. Hereinafter, the processing operation of the white balance correction will be described along the step numbers shown in FIGS.
  • Step SS2200 Processing similar to step S10 of the second embodiment.
  • Step S2 1 Processing similar to step S11 of the second embodiment.
  • Step S2 2 Processing similar to step S12 of the second embodiment.
  • Step S2 3 Processing similar to step S13 of the second embodiment.
  • Step S2 4 Processing similar to step S14 of the second embodiment.
  • Step SS2255 The image processing unit 16 normalizes the frequency distribution of the color-gradation space for each gradation division k. Here, normalization is performed so that the sum of the frequencies in the gradation section k becomes “1 0 0 0”. Such normalization suppresses frequency variations for each gradation section k.
  • FIG. 14 is a diagram showing the frequency distribution after this normalization.
  • the frequency distribution after the normalization is divided for each color classification, which is the “gradation distribution for each color” in the third embodiment.
  • Step S26 The image processing section 16 calculates the product of the frequencies for each of the gradation distributions in each color.
  • the product of the frequencies well reflects the degree of gradation variation.
  • the image processing unit 16 determines that color information having a larger product of the frequencies has more gradation variations and is color information reflecting the influence of the imaging light source.
  • FIG. 13 is a graph in which the product of the frequencies is plotted with the value of the color information as the horizontal axis.
  • the color information 1.8 is determined to be the color information that most reflects the influence of the imaging light source. From the correspondence graph shown in FIG. 3, the color temperature of the imaging light source in this case is estimated to be approximately 6200K.
  • Step S27 Processing similar to step S17 of the second embodiment.
  • Step S28 Processing similar to step S18 of the second embodiment.
  • the fourth embodiment is an embodiment corresponding to claims 1 to 7 and 9.
  • FIG. 15 is a flowchart illustrating white balance correction according to the fourth embodiment. Hereinafter, the processing operation of the white balance correction will be described along the step numbers shown in FIG.
  • Step S31 The image processing section 16 divides the image data in the image memory 15 into a plurality of image areas. For example, image data is divided into 4 parts vertically and six parts horizontally to create 24 image areas. It is preferable to change the section size of the image area here according to the fineness and complexity of the color pattern in the image data. Further, it is preferable to change the position of the dividing line of the image area here according to the positional relationship of the color pattern in the screen.
  • Step S32 The image processing section 16 averages the pixel values for each of the image areas for each RGB to obtain an average color.
  • Step S33 The image processing section 16 obtains (BZG) and (R / B) from the average color RGB data for each of the image areas.
  • the image processing unit 16 determines whether or not the average color falls within a predetermined achromatic color range, using the obtained (B / G) and (R / B) as a scale.
  • FIG. 16 is a diagram showing an achromatic color range A (shaded area in FIG. 16) as an example.
  • the achromatic range A here is determined as follows.
  • a chromaticity space is set using (B_G) and (RZB) as coordinate axes, and the curve of the blackbody locus B is plotted on the chromaticity space.
  • This black body locus B Thus, the color temperature is normally limited in advance to the expected color temperature range. That is, the upper limit (for example, 1400 K or more) and the lower limit (for example, 2000 K or less) of the color temperature of the imaging light source are excluded from the blackbody locus B in advance.
  • the upper limit for example, 1400 K or more
  • the lower limit for example, 2000 K or less
  • the specific achromatic color range A is preferably determined based on a subjective test such as whether or not each point in the chromaticity space is close to achromatic.
  • the image processing unit 16 determines whether or not each of the average colors obtained in step S32 falls within the achromatic range. From this determination result, the image processing unit 16 selects, from the plurality of image regions, those whose average colors fall within the achromatic range.
  • the image areas indicated by numerals in FIG. 17 are the image areas selected in this manner.
  • the image area indicated by “1” in FIG. 17 is an image area that was not selected because the average color was out of the achromatic range A.
  • the original image in FIG. 17 is an image photographed in an amusement park, and is an image in which chromatic colors unique to the amusement park are locally arranged.
  • Step S34 The image processing section 16 counts the number of selected image areas. Here, if the number of selected image areas is equal to or less than the predetermined number and it is determined that the number is too narrow to obtain the color information of the imaging light source, the image processing unit 16 shifts the operation to step S35. I do.
  • the image processing unit 16 shifts the operation to step S36.
  • Step S35 Here, since the number of selected image areas is small, it is expected that chromatic colors occupy the entire image data.
  • the image processing section 16 gives up estimating the photographing light source from the image data, and selects a preset standard white balance correction value (a preset value or the like).
  • the image processing unit 16 shifts the operation to step S40 in order to perform adjustment according to the standard white balance correction value.
  • Step S36 Here, since the number of selected image areas is larger than the predetermined number, The estimation of the imaging light source is continued. That is, the image processing unit 16 obtains a gradation distribution in color units for each of the selected image areas. Note that details of this processing are the same as those of the first to third embodiments except that the processing is performed for each image area, and a description thereof will be omitted.
  • Step S37 The image processing section 16 obtains color information having many gradation variations from the gradation distribution of each color in each of the selected image areas.
  • the details of this processing are the same as those of the first to third embodiments, except that the processing is performed for each image area, and thus description thereof will be omitted.
  • the numerical value shown for each image area is the (BZR) value of the color information that maximizes the gradation variation in the image area.
  • Step S38 The image processing section 16 removes the maximum value and the minimum value from the color information obtained in step S37 as extreme values.
  • the image processing unit 16 averages the remaining color information and sets the average as the representative value of the color information.
  • the image processing unit 16 determines the representative value of the color information as color information that reflects the influence of the imaging light source.
  • the calculation for obtaining the representative value here is not limited to the average calculation.
  • a representative value may be obtained by a median operation, a majority operation, or the like.
  • the representative value may be obtained by a weighted average calculation in which the weight is changed according to the position of each image area in the screen. In this case, the weight at the center of the screen may be increased, or the weight of the selected part of the focus detection area may be increased.
  • Step S39 The image processing section 16 obtains a coefficient (white balance correction value) for correcting the color deviation of the image data based on the representative value of the color information by referring to a table or the like.
  • Step S40 The image processing unit 16 performs white balance correction on the image data in the image memory 15 using the obtained white balance correction value.
  • the image area in which the average color falls within the achromatic range is set. Estimate the shooting light source by limiting the range to. In this case, since the image area biased to a specific color is previously removed from the image data, there is an advantage that the imaging light source can be accurately estimated without being affected by the specific color.
  • the situation of the imaging light source is individually analyzed for each image region, and finally, a representative value is obtained from the individual analysis results.
  • the effects of local colors in the screen can be confined to that local image area.
  • the influence of local chromatic colors does not spread to the analysis results of other image areas.
  • an image processing program (corresponding to claim 8) may be created by converting the above processing operations into program codes.
  • the computer can execute the white balance correction of the present embodiment.
  • the image processing method according to the present embodiment be provided as a service via a communication line such as the Internet.
  • a server such as an image album or a print service can provide image processing services such as the above-described analysis of a photographing light source and white balance adjustment for image data uploaded from a client.
  • the gradation variation is determined based on the sum or the product of the frequencies.
  • the gradation variation can be determined by obtaining the degree of spread of the gradation distribution of the color unit.
  • the gradation variation may be determined from the variance (standard deviation) of the gradation distribution in color units.
  • the color information having the largest gradation variation is selected as the color information reflecting the influence of the imaging light source.
  • the present invention is not limited to this. For example, by interpolating the gradation variation near the peak and then detecting the peak position, the color information having the largest gradation variation may be accurately obtained. Through such processing, it is possible to accurately determine the difference between the imaging light sources.
  • the normalization process is performed after the small value “1” is compensated for the location where the frequency is zero.
  • the present invention is not limited to this.
  • the processing may be performed in the order of normalization processing and compensation.
  • the color information is a color index value, a color scale, or a color characteristic that changes depending on a difference in a light source.
  • (B ⁇ R) hue, chromaticity, or chromaticity coordinates may be adopted as the color information.
  • the present invention employs a R 2 + 2 as the gradation information.
  • Power ⁇ the present invention is not limited to this.
  • gradation information when the light of the imaging light source is modulated by the shadow of the object scene, the reflectance, the angle of the irradiation surface, etc., the index value of the gradation that derives various variations and the gradation value It is preferable that the characteristics are scale and gradation characteristics. For example, a luminance value, a color component value, or the like may be employed as the gradation information.
  • the photographing light source is estimated using only the gradation variation as a scale.
  • the present invention is not limited to this. By combining other estimation techniques with the present invention, it is of course possible to more accurately estimate the imaging light source.
  • a gradation variation is obtained for each color, and it is determined that the color information having a larger gradation variation has a stronger influence of the imaging light source.
  • the inventors have color information that reflects the influence of the imaging light source has many gradation variations, less color information affected by the imaging light source is c present invention have found that the tone variations limited utilizes this finding As a result, it has become possible to accurately detect color information that reflects the effects of the shooting light source.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Description

1 明細書 画像処理装置、 画像処理プログラム、 および画像処理方法 技術分野
本発明は、画像処理装置、画像処理プログラム、および画像処理方法に関する。 特に、 本発明は、 画像データの撮影光源に関する情報を求める技術に関する。 背景技術
電子カメラで画像データを撮影すると、 撮影光源の種類によって画像データに 色の偏りが生じる。 従来、 この色の偏りを補正するため、 電子カメラは、 画像デ ータにホワイ トバランス補正を行っていた。 このホワイ トバランス補正では、 撮 影光源による色の偏りを、 「画面全体の色平均」 、 「高頻度の出現色」 、 または 「高輝度箇所の色」 から求めていた (例えば、 特開200 0— 1 4 8 9 7 8号公 報) 。
一方、 撮影光源の色温度を画像データから推定する手法として、 文献 『Shoji Tominaga, Satoru Ebisui, and Brian A. Wandell: Color Temperature Estimation of Scene Illumination, Proc. The Seventh Color Imaging Conference: Color Science, Systems and Applications, pp.42-47, Scottsdale, Arizona, Nov. 1999.』 が知られている。
図 1 8は、 この文献から引用した 『RB色空間にプロッ トした分布』 と 『撮影 光源の色温度』 との関係を示す図である。
図 1 8に示されるように、 撮影光源の色温度上昇に伴って、 RB色空間上の分 布は R軸方向から B軸方向へと位置が移動する。 上記文献の推定方法は、 この R B色空間の分布が、 どの色温度の分布域 (色温度ごとに図 1 8に示す枠) に収ま るかに基づいて、 撮影光源の色温度を推定している。 発明の開示
本発明の目的は、 撮影光源に関する情報を正確に得るために、 画像データの新 しい解析技術を提供することである。
以下、 本発明について説明する。
( 1 )
本発明の画像処理装置は、 複数の画素のデータを含む画像データを処理して、 画像データの撮影光源に関する情報を求める画像処理装置であって、 分類部およ び判定部を備える。
この分類部は、画素が有する色情報および階調情報から、色情報の区分ごとに、 階調情報の度数分布を求める。 ここでは、 このように求めた度数分布を 『色単位 の階調分布』 という。
一方、 判定部は、 この色単位の階調分布から、 階調のバリエーション (言い換 えると、 階調のバラツキ具合、 階調の多様性、 階調の豊かさ、 ほぼ連続している と見なせる階調の幅) を色情報の区分単位に評価する。 そして、 判定部は、 この 階調バリエーションが多いと評価された色情報を、 撮影光源の影響を反映した色 情報と判定する。
例えば、 上記の 『画素が有する色情報』 とは、 その画素のデータなどから得ら れる 『画素の色に関する情報』 である。
( 2 )
なお好ましくは、 本発明の画像処理装置は、 上記の判定部が、 色単位の階調分 布について度数の積を算出し、 この積の値に基づいて階調バリエーションを判定 する。
さらに好ましくは、 上記の判定部が、 この積の値が大きい色情報ほど、 階調バ リエーションが多いと評価する。
( 3 )
なお好ましくは、 本発明の画像処理装置は、 上記の分類部が、 次のような空間 分類部および正規化部を有する。
この空間分類部は、 画素の色情報および階調情報を基準にして、 色一階調空間 上の度数分布を求める。すなわち、色および階調を座標軸にした空間上において、 画素の度数分布を得る。
一方、 正規化部は、 この度数分布を階調情報の区分ごとに正規化して、 階調情 報の値の違いによる度数バラツキを抑制する。
この場合、 分類部は、 この正規化部で正規化された度数分布から、 色単位の階 調分布を得る。
( 4 )
なお好ましくは、 本発明の画像処理装置は、 上記の正規化部が、 正規化に際し て、 度数分布の全体傾向を損なわない小さな値を、 度数分布の度数ゼロの箇所に 補填する。
( 5 )
なお好ましくは、 本発明の画像処理装置は、 上記の分類部において、 次のよう な前処理を実施する。 すなわち、 分類部は、 画像データから複数の画像領域を抽 出し、 これら画像領域ごとに平均色を求める。
さらに、 これら画像領域の平均色が、 予め定められた無彩色範囲に収まるか否 かを判定し、 無彩色範囲に収まる画像領域を選抜する。
分類部は、 この前処理によって選抜された画像領域について、 上述した色単位 の階調分布を求める。
( 6 )
なお好ましくは、 本発明の画像処理装置では、 分類部と判定部が、 画像データ から部分的に抽出した複数の画像領域ごとに、 上記処理を実行する。
すなわち、 分類部は、 個々の画像領域それぞれについて、 色単位の階調分布を 求める。 一方、 判定部は、 個々の画像領域それぞれについて、 階調バリエーショ ンの多い色情報を求める。
さらに、 判定部は、 これら画像領域ごとに求めた 『階調バリエーションの多い 色情報』 から代表となる値を算出し、 この代表値を前記撮影光源の影響を反映し た色情報とする。
( 7 )
なお好ましくは、 本発明の画像処理装置は、 上記の判定部が、 撮影光源の影響 を反映すると判定された色情報に基づいて、 画像データのホワイ トバランス補正 を行う。
さらに好ましくは、 上記の判定部は、 この撮影光源の影響を反映すると判定さ れた色情報を無彩色に変換するように、 画像データのホワイ トバランス補正を行
5 o
( 8 )
本発明の画像処理プログラムは、 コンピュータを、 上記 (1 ) 〜 (7 ) のいず れか 1つに記載の分類部および判定部として機能させることを特徴とする。
( 9 )
本発明の画像処理方法は、 複数の画素のデータを含む画像データを処理して、 画像データの撮影光源に関する情報を求める画像処理方法であって、 分類ステッ プおよび判定ステップを有する。
この分類ステップでは、 画素が有する色情報および階調情報を基準にして、 階 調情報の度数分布を色情報の区分ごとに求める。
一方、 判定ステップでは、 この色単位の階調分布から階調のバリエーションを 色単位に評価し、 階調バリエーションが多いと評価された色情報を、 撮影光源の 影響を反映した色情報と判定する。 図面の簡単な説明
なお、 本発明における上述した目的およびそれ以外の目的は、 以下の説明と添 付図面とによって容易に確認することができる。
図 1は、 電子カメラ 1 1 (画像処理装置を含む) の構成を示す図である。
図 2は、 第 1の実施形態におけるホワイ トバランス補正を説明する流れ図であ る。
図 3は、 撮影光源の色温度を変えながら、 無彩色被写体の色情報 (Β ' / K ' ) の軌跡を求めたグラフである。
図 4は、 画像データの絵柄の一例を示すため、 画像データにディザ化を施して 作成した図である。
図 5は、 画素単位の色情報および階調情報を、 色—階調空間上にプロットした 分布図である。
図 6は、 色一階調空間上の度数分布である。 .
図 7は、 正規化後の度数分布である。 図 8は、 度数の総和を示すグラフである。
図 9は、 第 2の実施形態におけるホワイ トバランス補正を説明する流れ図であ る。
図 1 0は、 度数の積を示すグラフである。
図 1 1は、 正規化後の度数分布である。
図 1 2は、 第 3の実施形態におけるホワイ トバランス補正を説明する流れ図で ある。
図 1 3は、 度数の積を示すグラフである。
図 1 4は、 正規化後の度数分布を示す図である。
図 1 5は、 第 4の実施形態におけるホワイ トバランス補正を説明する流れ図で ある。
図 1 6は、 画像領域の選抜に使用される無彩色範囲の一例を示す図である。 図 1 7は、 画像領域の単位に、 階調バリエーションの多い色情報を求めた結果 を示す図である。
図 1 8は、 『R B色空間にプロットした画素分布』 と 『撮影光源の色温度』 と の関係を示す図である。 発明を実施するための最良の形態
以下、 図面に基づいて本発明にかかる実施形態を説明する。
《第 1の実施形態》
第 1の実施形態は、 請求項 1 , 3 , 7, および 9に対応する実施形態である。
[第 1の実施形態の構成]
図 1は、 電子カメラ 1 1 (画像処理装置を含む) の構成を示す図である。 図 1において、 電子カメラ 1 1には、 撮影レンズ 1 2が装着される。 この撮影 レンズ 1 2の像空間には、 撮像素子 1 3の受光面が配置される。
この撮像素子 1 3で生成される画像データは、 A/ D変換部 1 4を介してデジ タル化された後、 画像メモリ 1 5に一時記憶される。
画像処理部 1 6は、 画像メモリ 1 5内の画像データに対して、 ホワイ トバラン ス補正などの画像処理を実施する。 圧縮記録部 1 7は、 画像処理の完了した画像データを、 記録媒体 1 8に圧縮記 録する。
[発明との対応関係]
以下、 発明と第 1の実施形態との対応関係について説明する。 なお、 ここでの 対応関係は、 発明の理解を容易にするために例示するものであり、 発明をこの対 応関係に限定するものではない。
請求項記載の分類部は、 画像処理部 1 6の 『画像データから色単位の階調分布 を求める部分』 に対応する。
請求項記載の判定部は、 画像処理部 1 6の 『色単位の階調分布に基づいて、 撮 影光源の影響を反映する色情報を求める部分』 に対応する。
[第 1の実施形態の動作説明]
図 2は、 第 1の実施形態におけるホワイ トバランス補正を説明する流れ図であ る。 以下、 図 2に示すステップ番号に沿って、 ホワイ トバランス補正の処理動作 を説明する。
ステップ S 0 : 画像処理部 1 6は、 画像メモリ 1 5内の画像データから、 撮影 光源の推定材料とする RGBデータを取得する。
この段階での RGBデータは、 画像データの絵柄の違いによって、 明るさや色 の信号レベルが一定しない。そこで、画像処理部 1 6は、下式の規格化を実施し、 RGBデータの信号レベルを揃える。
Imax = MAX[VR2 +G2 +B2] ..'(1)
(R' , G' , B' ) = (R, G, B) / I max · · · (2)
ステップ S I : 画像処理部 1 6は、 規格化後の R' G' B' 成分に基づいて、 色情報を算出する。
ここで、 色情報として採用する指標値は、 撮影光源の特性 (例えば色温度) と 一対一に対応する値が好ましい。 さらには、 撮影光源の違いに敏感に反応する値 が好ましい。
第 1の実施形態では、 色温度とよく対応するという観点から、 次のような色情 報を採用する。
色情報- B' /R' · · · (3) 図 3は、 撮影光源の色温度を変えながら、 無彩色被写体について色情報 (Β' /R' ) の変化を求めたデータである。 この図 3に示されるように、色情報(Β' /Κ' ) は、 撮影光源の色温度とほぼ一対一に対応し、 かつ撮影光源の色温度の 変化に敏感に反応する。
ステップ S 2 : 続いて、 画像処理部 1 6は、 各画素の R' G' Β' 成分に基づ いて、 階調情報を算出する。
第 1の実施形態では、 次のような階調情報を採用する。
Ρ皆調情報 = A/(R'2 + 2) ·'·(4)
ステップ S 3 : 画像処理部 1 6は、 このように求めた色情報および階調情報を 基準にして各画素を分類し、 図 6に示すような度数分布を求める。
以下、 この図 6の度数分布を求めるまでの処理手順を具体的に説明する。 図 4は、 画像データの一例である。 この画像データは、 晴天時に撮影されたも ので、 撮影光源の色温度はおおよそ 6 0 0 0 Κである。
画像処理部 1 6は、 上述した式 3および式 4を用いて、 色情報および階調情報 を算出する。
図 5は、 この色情報および階調情報を、 色一階調空間上にプロッ トした画素分 布である。ここでの色一階調空間は、色および階調を座標軸にとった空間である。 画像処理部 1 6は、 この色一階調空間上に複数の領域を設ける。 これら領域の サイズは、 撮影光源の推定精度に実用上影響のない程度の大きさであればよい。 また、 領域の形状は、 矩形や円形など、 何でもよい。
第 1の実施形態では、 これら複数の領域として、 下記の条件式で規定される領 域を採用する。
(式 5)
Figure imgf000009_0001
ただし、 σ = 0. 2 5 , kmax= 1 0である。
この条件式に、
階調区分 k = 1, 2 , 3 · · · 1 0
色区分 (Β' /R' ) „= 0. 0, 0. 2, 0. 4 4. 8
の値を組み合わせて代入することにより、 複数の領域が規定される。 画像処理部 1 6は、 各画素の色情報および階調情報をこの条件式に代入し、 条 件式が成立する領域 (すなわち、 条件式を満足する階調区分および色区分の値) を探索する。 画像処理部 1 6は、 条件式が成立する領域が見つかるたびに、 その 領域の度数を 『 1』 増やす。
このようなカウント処理により、 図 6に示すような度数分布が得られる。 ステップ S 4 : 画像処理部 1 6は、 求めた度数分布を、 階調区分 kごとに正規 化する。 ここでは、 階調区分 kの度数の最大値が 『1 0 0 0』 になるように、 正 規化を行う。 このような正規化により、 階調区分 kごとの度数バラツキが抑制さ れる。
図 7は、 このような正規化後の度数分布を示す図である。
この正規化後の度数分布を、 色区分ごとに分割したものが、 第 1の実施形態に おける 『色単位の階調分布』 に該当する。
ステップ S 5 : 画像処理部 1 6は、 これら色単位の階調分布ごとに、 度数の総 和を算出する。 ステップ S 4において階調区分 kごとの度数バラツキを抑制して いるため、 この度数の総和は、 階調バリエーションの度合いをよく反映する。 そ こで、 画像処理部 1 6は、 この度数の総和が大きい色情報ほど、 階調バリエーシ ョンが多く、 撮影光源の影響を反映した色情報であると判定する。
図 8は、 色情報の値を横軸にして、 この度数の総和をプロッ トしたグラフであ る。 図 8に示したグラフの場合、 色情報 2 . 0が、 撮影光源の影響を一番反映し た色情報と判断される。 図 3に示した対応グラフから、 このときの撮影光源の色 温度は、 おおよそ 6 9 0 O Kとなる。
ステップ S 6 : 画像処理部 1 6は、 撮影光源の影響を反映すると判定された色 情報に基づいて、 画像データの色の偏りを補正する係数 (ホワイ トバランス補正 値) をテーブル参照などによって得る。 すなわち、 上記の図 8のケースでは、 画 像処理部 1 6は、 色温度 6 9 0 O Kのカラーバランスを補正するホワイ トバラン ス補正値を得る。
ステップ S 7: 画像処理部 1 6は、得られたホワイ トバランス補正値を使って、 画像メモリ 1 5内の画像データに対して、 ホワイ トバランス補正を実施する。
[第 1の実施形態の効果など] 第 1の実施形態における色温度の推定値 6 9 0 0 Kは、 実際の色温度 6 0 0 0 Kに比べて若干高めである。 しかしながら、 今回の画像データ (図 4 ) の大部分 が青空であるため、 本来はもつと高めの色温度と推定されるおそれがあった。 そ のことを考慮すると、 本実施形態では、 大面積部分 (青空) の影響を適度に抑え た良好な推定結果を得ていることが分かる。
例えば、 図 1 8に示した従来技術では、 大面積の青空を含む場合、 B軸の近く に度数分布が集中する。 その結果、 この従来技術では、 もっと高い色温度と推定 されるおそれがあった。
ところが、 本実施形態は、 図 5に示すように度数分布をとる。 そのため、 青空 の微妙な色変化を反映して、青空の度数分布 Sは色情報の軸方向に広く分散する。 そのため、 上述した処理では、 青空の度数分布 Sが、 色情報の区分に細分化され る。 その結果、 色情報の区分ごとの評価では、 青空の階調バリエーションは少な く評価される。 したがって、 本実施形態では、 大面積の青空に惑わされることな く、 良好な推定結果を得ることができる。
すなわち、 このような良好な推定結果は、 色単位の階調バリエーションを尺度 とした結果である。 通常、 被写界には、 様々な反射率や反射角度を有する被写体 や、 種々の陰影が存在する。 撮影光源の光は、 これらによって明暗方向に変調さ れるため、 多様な階調を生じる確率が高い。
一方、 撮影光源の影響を素直に反映しない固有色や空色などは、 その色自体の 限られた階調範囲や、 その色自体の色変化を含んで、 画像データ中に現れる。 そこで、 色単位の階調バリエーションを尺度にすることにより、 これら固有色 の影響を排除して、 撮影光源の影響を反映した色情報を的確に推定できる。
さらに、 第 1の実施形態では、 ステップ S 4の正規化処理により、 階調区分 k ごとの度数バラツキを抑制している。 通常、 画像データの絵柄の違いによって、 階調区分ごとの度数はばらつく。 このバラツキにより、 階調バリエーションを統 一的な尺度で判定することが困難になる。 しかしながら、 本発明では、 上述した 正規化処理により、 この度数バラツキを低減させ、 階調方向の度数をなるベく均 等化する。 そのため、 階調バリエーションを、 絵柄の違いに係わらず、 統一的な 尺度で判定することが容易になる。 次に、 別の実施形態について説明する。
《第 2の実施形態》
第 2の実施形態は、 請求項 1 , 2, 3, 4 , 7, および 9に対応する実施形態 である。
なお、 「第 2の実施形態の構成」 および 「発明との対応関係」 については、 第 1の実施形態と同様であるため、 ここでの説明を省略する。
[第 2の実施形態の動作説明]
図 9は、 第 2の実施形態におけるホワイ トバランス補正を説明する流れ図であ る。 以下、 図 9に示すステップ番号に沿って、 ホワイ トバランス補正の処理動作 を説明する。
ステップ S 0 第 1の実施形態のステップ S 0と同様の処理。
ステップ S 1 第 1の実施形態のステップ S 1と同様の処理。
ステップ S 2 第 1の実施形態のステップ S 2と同様の処理。
ステップ S 3 第 1の実施形態のステップ S 3と同様の処理。
ステップ S 4 画像処理部 1 6は、 ステップ S 1 3で求めた度数分布の全体 傾向を損なわない程度の小さな値を、 度数分布の度数ゼロの箇所に捕填する。 こ の実施形態では、 度数分布 (図 6参照) の全体に最小度数 『1』 を一様に加算し ている。
ステップ S 1 5 : 画像処理部 1 6は、 色一階調空間の度数分布を、 階調区分 k ごとに正規化する。 ここでは、 階調区分 kにおける度数の最大値が 『1 0 0 0』 になるように、 正規化を行う。 このような正規化により、 階調区分 kごとの度数 バラツキが抑制される。
図 1 1は、 この正規化後の度数分布を示す図である。
この正規化後の度数分布を、 色区分ごとに分割したものが、 第 2の実施形態に おける 『色単位の階調分布』 である。
ステップ S 1 6 : 画像処理部 1 6は、 これら色単位の階調分布ごとに、 度数の 積を算出する。 この度数の積は、 階調バリエーションの度合いをよく反映する。 すなわち、 画像処理部 1 6は、 この度数の積が大きい色情報ほど、 階調バリエ一 ションが多く、 撮影光源の影響を反映した色情報であると判定する。 図 1 0は、 色情報の値を横軸にして、 この度数の積をプロッ トしたグラフであ る。 図 1 0に示したグラフの場合、 色情報 1 . 8力 S、 撮影光源の影響を一番反映 した色情報と判断される。 図 3に示した対応グラフから、 このときの撮影光源の 色温度は、 おおよそ 6 2 0 0 Kと推定される。
ステップ S 1 7 : 第 1の実施形態のステップ S 6と同様の処理。
ステップ S 1 8 : 第 1の実施形態のステップ S 7と同様の処理。
[第 2の実施形態の効果など]
第 2の実施形態における色温度の推定値 6 2 0 0 Kは、 青空の影響をよく抑制 した良好な推定結果である。 このような良好な推定結果は、 階調バリエーション を尺度にして、 撮影光源を推定した結果である。
特に、 第 2の実施形態では、 色単位の階調分布について度数の積を算出し、 そ の積の値により階調バリエーションを判定している。 この積の演算では、 階調バ リエーションの違いが数値の大小として顕著に現れるため、 階調バリエーション を明確に判定することが可能になる。
また、 第 2の実施形態では、 ステップ S 1 3の正規化処理により、 階調区分 k ごとの度数バラツキを抑制している。 その結果、 絵柄による階調分布の違いを補 正して、 階調バリエーションをより的確に判定することが可能になる。
さらに、 第 2の実施形態では、 度数分布の全体傾向を損なわない程度の小さな 値 (ここでは最小度数 『 1』 ) で度数ゼロの箇所を補填している。 したがって、 度数の積の演算に際して、 度数ゼロをわざわざ排除する必要がなく、 演算処理を 単純化することが可能になる。
ちなみに、 このような度数ゼロの箇所は、 絵柄によってばらつく。 このバラッ キは、 階調バリエーションを判定する際に弊害となる。 しかしながら、 本実施形 態では、この度数ゼロの箇所を補填した後で、正規化処理を実行する。その結果、 度数ゼロの箇所は、一様かつ適当な度数値(図 1 1に示す k = 8〜 1 0の列など) で包括的に埋められる。 この包絡的な度数分布を用いて階調バリエーションを判 定することにより、 絵柄 (特に階調欠落) による度数ゼロの発生バラツキを排除 し、 階調バリエーションを的確かつ容易に判定することが可能になる。
次に、 別の実施形態について説明する。 《第 3の実施形態》
第 3の実施形態は、 請求項 1, 2 , 3, 4 , 7 , および 9に対応する実施形態 である。
なお、 「第 3の実施形態の構成」 および 「発明との対応関係」 については、 第 1の実施形態と同様であるため、 ここでの説明を省略する。
[第 3の実施形態の動作説明]
図 1 2は、 第 3の実施形態におけるホワイ トバランス補正を説明する流れ図で ある。 以下、 図 1 2に示すステップ番号に沿って、 ホワイ トバランス補正の処理 動作を説明する。
スステテッッププ SS 22 00 : 第 2の実施形態のステップ S 1 0と同様の処理。
ステップ S 2 1 第 2の実施形態のステップ S 1 1と同様の処理。
ステップ S 2 2 第 2の実施形態のステップ S 1 2と同様の処理。
ステップ S 2 3 第 2の実施形態のステップ S 1 3と同様の処理。
ステップ S 2 4 第 2の実施形態のステップ S 1 4と同様の処理。
スステテッッププ SS 22 55 : 画像処理部 1 6は、 色—階調空間の度数分布度を、 階調区分 kごとに正規化する。 ここでは、 階調区分 kにおける度数の総和が 『1 0 0 0』 になるように、 正規化を行う。 このような正規化により、 階調区分 kごとの度数 バラツキが抑制される。
図 1 4は、 この正規化後の度数分布を示す図である。
この正規化後の度数分布を、 色区分ごとに分割したものが、 第 3の実施形態に おける 『色単位の階調分布』 である。
ステップ S 2 6 : 画像処理部 1 6は、 これら色単位の階調分布ごとに、 度数の 積を算出する。 この度数の積は、 階調バリエーションの度合いをよく反映する。 画像処理部 1 6は、 この度数の積が大きい色情報ほど、 階調バリエーションが多 く、 撮影光源の影響を反映した色情報であると判定する。
図 1 3は、 色情報の値を横軸にして、 この度数の積をプロットしたグラフであ る。 図 1 3に示したグラフの場合、 色情報 1 . 8が、 撮影光源の影響を一番反映 した色情報と判断される。 図 3に示した対応グラフから、 この場合の撮影光源の 色温度は、 おおよそ 6 2 0 0 Kと推定される。 ステップ S 2 7 : 第 2の実施形態のステップ S 1 7と同様の処理。 ステップ S 28 : 第 2の実施形態のステップ S 1 8と同様の処理。
[第 3の実施形態の効果など]
第 3の実施形態においても、 第 2の実施形態とほぼ同様の効果を得ることがで さる。
《第 4の実施形態》
第 4の実施形態は、 請求項 1〜7, および 9に対応する実施形態である。
なお、 「第 4の実施形態の構成」 および 「発明との対応関係」 については、 第 1の実施形態と同様であるため、 ここでの説明を省略する。
[第 4の実施形態の動作説明]
図 1 5は、 第 4の実施形態におけるホワイ トバランス補正を説明する流れ図で ある。 以下、 図 1 5に示すステップ番号に沿って、 ホワイ トバランス補正の処理 動作を説明する。
ステップ S 3 1 : 画像処理部 1 6は、 画像メモリ 1 5内の画像データを、 複数 の画像領域に区分する。 例えば、 画像データを縦 4分割、 横 6分割して、 24個 の画像領域を作成する。 なお、 ここでの画像領域の区分サイズを、 画像データに おける色パターンの細かさや複雑さなどに応じて変更することが好ましレ、。また、 ここでの画像領域の区分線の位置を、 画面内における色パターンの位置関係など に応じて変更することが好ましい。
ステップ S 3 2 : 画像処理部 1 6は、 画像領域の一つ一つについて、 画素値を RGBごとに平均化して、 平均色を求める。
ステップ S 3 3 : 画像処理部 1 6は、 画像領域の一つ一つについて、 平均色の RGBデータから (BZG) および (R/B) を求める。 画像処理部 1 6は、 求 めた (B/G) および (R/B) を尺度にして、 予め定められた無彩色範囲に平 均色が収まるか否かを判定する。
図 1 6は、一例として、無彩色範囲 A (図 1 6中の斜線範囲) を示す図である。 ここでの無彩色範囲 Aは、 次のように決定される。
まず、 (B_ G) および (RZB) を座標軸とした色度空間を設定し、 その色 度空間上に黒体軌跡 Bのカーブをプロットする。 この黒体軌跡 Bは、 撮影光源と して通常予想される色温度範囲に予め制限される。 すなわち、 撮影光源の色温度 の上限域 (例えば 1 4 0 0 0 K以上) および下限域 (例えば 2 0 0 0 K以下) に ついては、 黒体軌跡 Bから予め除かれる。 この色度空間上において、 (1 ) 黒体 軌跡 Bに近接し、 かつ (2 ) 被写体固有の色の影響をさほど受けずに撮影光源の 色を反映していると判断できる範囲を定めて、 無彩色範囲 Aとする。
具体的な無彩色範囲 Aは、 色度空間上の各点が無彩色に近いか否かといった主 観テストに基づいて決定することが好ましい。
画像処理部 1 6は、 ステップ S 3 2で求めた平均色それぞれについて、 無彩色 範囲に収まるか否かを判定する。 この判定結果から、 画像処理部 1 6は、 複数の 画像領域から、 平均色が無彩色範囲に収まるものを選別する。
図 1 7中に数字を示した画像領域は、 このように選別された画像領域である。 一方、 図 1 7中に 『一』 で示した画像領域は、 平均色が無彩色範囲 Aから外れた ために、 選抜されなかった画像領域である。
ちなみに、 この図 1 7の元画像は、 遊園地で撮影された画像であり、 遊園地に 特有の有彩色が局所的に配置された画像である。
ステップ S 3 4: 画像処理部 1 6は、選抜された画像領域の数をカウントする。 ここで、 選抜された画像領域の数が所定数以下であり、 撮影光源の色情報を求 めるのに狭すぎると判断される場合、 画像処理部 1 6はステップ S 3 5に動作を 移行する。
一方、 選抜された画像領域の数が所定数より多く、 撮影光源の色情報を求める のに十分であると判断される場合、 画像処理部 1 6はステップ S 3 6に動作を移 行する。
ステップ S 3 5 : ここでは、 選抜された画像領域の数が少ないために、 画像デ ータ全体を有彩色が占めているなどの状況が予想される。 この場合、 画像処理部 1 6は、 画像データから撮影光源を推定することを諦め、 予め設定された標準的 なホワイ トバランス補正値 (予めプリセッ ト設定された値など) を選択する。 画 像処理部 1 6は、 この標準的なホワイ トバランス補正値に従った調整を実施する ため、 ステップ S 4 0に動作を移行する。
ステップ S 3 6: ここでは、選抜された画像領域の数が所定数よりも多いため、 撮影光源の推定を続行する。 すなわち、 画像処理部 1 6は、 選抜した画像領域の 一つ一つについて、 色単位の階調分布を求める。 なお、 この処理の詳細について は、 個々の画像領域ごとに実施する点を除けば、 第 1〜第 3の実施形態と同様で あるため、 ここでの説明を省略する。
ステップ S 3 7 : 画像処理部 1 6は、 選抜した画像領域の一つ一つにおいて、 色単位の階調分布から、 階調バリエーションが多い色情報を求める。 なお、 この 処理の詳細については、 個々の画像領域ごとに実施する点を除けば、 第 1〜第 3 の実施形態と同様であるため、 ここでの説明を省略する。
図 1 7において、 画像領域ごとに示す数値は、 その画像領域において階調バリ エーシヨンが最大となる色情報の (B Z R ) 値である。
ステップ S 3 8 : 画像処理部 1 6は、 ステップ S 3 7で求めた色情報の中から 最大値および最小値を、 極端な値として除く。 画像処理部 1 6は、 残った色情報 について平均をとつて、 色情報の代表値とする。 画像処理部 1 6は、 この色情報 の代表値を、 撮影光源の影響を反映する色情報と判断する。
図 1 7のケースでは、 色情報から最大値 3 . 9および最小値 0 . 7が除かれ、 残りの色情報について平均を取ることにより、 代表値 (Bノ R ) = 1 . 5 6とな る。 この値は、 5 5 0 0 K程度の色温度に該当する。
なお、 ここでの代表値を求める演算は、 平均演算だけに限定されるものではな い。例えば、メディアン演算や多数決演算などによって、代表値を求めてもよい。 また、 各画像領域の画面内位置に応じて重みを変えた加重平均演算により、 代 表値を求めてもよい。 この場合、 画面中央の重みを増やしたり、 焦点検出エリア の選択箇所の重みを増やすなどしてもよい。
ステップ S 3 9 : 画像処理部 1 6は、 色情報の代表値に基づいて、 画像データ の色の偏りを補正する係数 (ホワイ トバランス補正値) をテーブル参照などによ つて得る。
ステップ S 4 0 : 画像処理部 1 6は、 得られたホワイ トバランス補正値を使つ て、画像メモリ 1 5内の画像データに対して、ホワイ トバランス補正を実施する。
[第 4の実施形態の効果など]
上述したように、 第 4の実施形態では、 平均色が無彩色範囲に収まる画像領域 に範囲限定して、 撮影光源の推定を行う。 この場合、 画像データ中から特定色に 偏った画像領域を予め除くため、 特定色の影響をあまり受けず、 的確に撮影光源 を推定できるという利点がある。
さらに、第 4の実施形態では、画像領域ごとに撮影光源の状況を個別に解析し、 最終的に、 これら個別の解析結果から代表値を求める。 したがって、 画面内の局 所的な色の影響は、その局所的な画像領域に閉じこめることができる。その結果、 局所的な有彩色の影響が、その他の画像領域の解析結果まで波及することがない。
さらに、 この局所的な有彩色の影響は、 ステップ S 38における代表値の算出 過程において、 排除できる。 その結果、 撮影光源の推定をより正確に実施できる という利点がある。
以下、 他のホワイ トバランス調整と比較した実験結果から、 第 4の実施形態の 効果を示す。
まず、 屋外および屋内の 60シーンの画像データについて、 下記のホワイ トバ ランス調整をそれぞれ実施した。
(A) 画面全体の平均色を無彩色に変換するホワイ トバランス調整
(B) 画像データから平均色が無彩色に近い領域のみを選別し、 その領域の平均 色を無彩色に変換するホワイ トバランス調整
(C) 第 4の実施形態のホワイ トバランス調整
これら 3通りの方法で得たホワイ トバランス補正値 Wb, Wrと、 本来の撮影 光源から求めたホワイ トバランス補正値 Wb o , Wr oとの誤差 δを、
Figure imgf000018_0001
により算出する。 すると、 60シーン分の誤差 δの平均は、
(Α) の方法 · · · 0. 43 2
(Β) の方法 · · · (}. 28 2
(C) の方法 · · · (). 202
であった。 この結果から、 第 4の実施形態である (C) 、 3通りの方法の中で、 一番正解に近いホワイ トバランス補正となった。
《実施形態の補足事項》
なお、 上述した実施形態では、 電子カメラ 1 1について説明した。 しかしなが ら、 本発明はこれに限定されるものではない。 例えば、 上述した処理動作をプロ グラムコード化することにより、 画像処理プログラム (請求項 8に対応) を作成 してもよい。 このような画像処理プログラムを使用することにより、 コンビユー タは、 本実施形態のホワイ トバランス捕正を実行することが可能になる。
また、 本実施形態の画像処理方法を、 インターネット等の通信回線を介して、 サービス提供することも好ましい。 例えば、 画像アルバムやプリントサービスな どのサーバーにおいて、 クライアントからアップロードされた画像データに対し て、 上述した撮影光源の解析や、 ホワイ トバランス調整などの画像処理サービス を提供することができる。
また、 上述した実施形態では、 度数の和または積によって階調バリエーション を判定している。 しかしながら、 本発明はこれに限定されるものではない。 色単 位の階調分布の広がり具合を求めることよって、 階調バリエーションを判定する ことができる。 例えば、 色単位の階調分布の分散値 (標準偏差) から、 階調バリ ェ一ションを判定してもよい。
なお、 上述した実施形態では、 階調バリエーションが最も多い色情報を選択し て、 撮影光源の影響を反映した色情報としている。 しかしながら、 本発明はこれ に限定されるものではない。 例えば、 ピーク付近の階調バリエーションを補間し た後にピーク位置を検出することにより、 最も階調バリエーショ ンが多い色情報 を正確に求めてもよい。 このような処理により、 撮影光源の違いを正確に判別す ることができるようになる。
また、 上述した実施形態では、 小さな値 『1』 を度数ゼロの箇所に補填した後 に、 正規化処理を実施している。 しかしながら、 本発明はこれに限定されるもの ではない。 例えば、 正規化処理、 補填の順番で処理を行ってもよい。
なお、 上述した実施形態では、 色情報として (B / R ) を採用している。 しか しながら、 本発明はこれに限定されるものではない。 一般に、 色情報としては、 撮影光源の違いによって変化する色の指標値, 色の尺度, または色の特性である ことが好ましい。 例えば、 色情報として、 (B— R ) , 色相, 色度, または色度 座標などを採用してもよい。
また、 上述した実施形態では、 階調情報として R2 + 2を採用している。 し力 ^ しながら、本発明はこれに限定されるものではなレ、。一般に、階調情報としては、 撮影光源の光が、 被写界の陰影や反射率や照射面の角度などによって変調された 際に、 多様なバリエーションを派生する階調の指標値、 階調の尺度、 階調の特性 であることが好ましい。 例えば、 輝度値や色成分値などを階調情報として採用し てもよい。
なお、 上述した実施形態では、 階調バリエーションのみを尺度にして、 撮影光 源を推定している。 しかしながら、 本発明はこれに限定されるものではない。 そ の他の推定技術と本発明とを組み合わせることにより、 撮影光源をより厳密に推 定しても勿論よい。
なお、 本発明は、 その精神または主要な特徴から逸脱することなく、 他のいろ いろな形で実施することができる。 そのため、 前述の実施例はあらゆる点で単な る例示に過ぎず、 限定的に解釈してはならない。 本発明の範囲は、 特許請求の範 囲によって示すものであって、 明細書本文には、 なんら拘束されない。 さらに、 特許請求の範囲の均等範囲に属する変形や変更は、 すべて本発明の範囲内のもの である。 産業上の利用可能性
以上説明したように、 本発明では、 色単位に階調バリエーションを求め、 この 階調バリエーションが多い色情報ほど、 撮影光源の影響が強いと判定する。
本願発明者は、撮影光源の影響を反映する色情報は階調バリエーションが多く、 撮影光源の影響の少ない色情報は階調バリエーションが限られることを発見した c 本発明は、 この知見を利用することで、 撮影光源の影響を反映する色情報を的確 に検出することを可能にした。

Claims

請求の範囲
1 . 複数の画素のデータを含む画像データを処理して、 前記画像データの撮影 光源に関する情報を求める画像処理装置であって、
前記画素が有する色情報および階調情報を基準にして、 前記色情報の区分ごと に前記階調情報の度数分布 (以下 『色単位の階調分布』 という) を求める分類部 と、
前記色単位の階調分布から階調のバリエーションを色単位に評価し、 前記階調 バリエーションが多いと評価された色情報を、 前記撮影光源の影響を反映した色 情報と判定する判定部と
を備えたことを特徴とする画像処理装置。
2 . 請求項 1に記載の画像処理装置において、
前記判定部は、
前記色単位の階調分布について度数の積を算出し、 前記積の値に基づいて前記 階調バリエーションを評価する
ことを特徴とする画像処理装置。
3 . 請求項 1ないし請求項 2のいずれか 1項に記載の画像処理装置において、 前記分類部は、
前記画素の前記色情報および前記階調情報を基準にして、 色一階調空間上の度 数分布を求める空間分類部と、
前記度数分布を前記階調情報の区分ごとに正規化して、 前記階調情報の値の違 いによる度数バラツキを抑制する正規化部とを備え、
前記分類部は、 前記正規化部により正規化された前記度数分布から、 前記色単 位の階調分布を得る
ことを特徴とする画像処理装置。
4 . 請求項 3に記載の画像処理装置において、
前記正規化部は、
前記正規化に際して、 前記度数分布の全体傾向を損なわない小さな値を、 前記 度数分布の度数ゼロの箇所に補填する
ことを特徴とする画像処理装置。
5 . 請求項 1ないし請求項 4のいずれか 1項に記載の画像処理装置において、 前記分類部は、
前記画像データを区分して得た複数の画像領域ごとに平均色を求め、 予め定め られた無彩色範囲に前記平均色が収まる画像領域を選抜し、 選抜された前記画像 領域について前記色単位の階調分布を求める
ことを特徴とする画像処理装置。
6 . 請求項 1ないし請求項 5のいずれか 1項に記載の画像処理装置において、 前記分類部は、
前記画像データから部分的に抽出した複数の画像領域ごとに、 前記色単位の階 調分布を求め、
前記判定部は、
前記画像領域ごとに求めた前記色単位の階調分布に基づいて、 個々の前記画像 領域ごとに 『階調バリエーションの多い色情報』 を求め、 これら 『階調バリエ一 シヨンの多い色情報』 から代表値を算出して、 前記撮影光源の影響を反映した色 情報と判定する
ことを特徴とする画像処理装置。
7 . 請求項 1ないし請求項 6のいずれか 1項に記載の画像処理装置において、 前記判定部は、 前記撮影光源の影響を反映すると判定された前記色情報に基づ いて、 前記画像データのホワイ トバランス補正を行う
ことを特徴とする画像処理装置。
8 . コンピュータを、 請求項 1ないし請求項 7のいずれか 1項に記載の前記分 類部および前記判定部として機能させる
ことを特徴とする画像処理プログラム。
9 . 複数の画素のデータを含む画像データを処理して、 前記画像データの撮影 光源に関する情報を求める画像処理方法であって、
前記画素が有する色情報および階調情報を基準にして、 前記色情報の区分ごと に前記階調情報の度数分布 (以下 『色単位の階調分布』 という) を求める分類ス テツプと、
前記色単位の階調分布から階調のバリエーションを色単位に評価し、 前記階調 バリエ一ションが多いと評価された色情報を、 前記撮影光源の影響を反映した色 情報と判定する判定ステップと
を有することを特徴とする画像処理方法。
PCT/JP2003/004327 2002-04-04 2003-04-04 Dispositif de traitement d'images, programme de traitement d'images et procede de traitement d'images WO2003085989A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2003583033A JP3801177B2 (ja) 2002-04-04 2003-04-04 画像処理装置、画像処理プログラム、および画像処理方法
AU2003221024A AU2003221024A1 (en) 2002-04-04 2003-04-04 Image processing device, image processing program, and image processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002-102902 2002-04-04
JP2002102902 2002-04-04

Publications (1)

Publication Number Publication Date
WO2003085989A1 true WO2003085989A1 (fr) 2003-10-16

Family

ID=28786277

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2003/004327 WO2003085989A1 (fr) 2002-04-04 2003-04-04 Dispositif de traitement d'images, programme de traitement d'images et procede de traitement d'images

Country Status (3)

Country Link
JP (1) JP3801177B2 (ja)
AU (1) AU2003221024A1 (ja)
WO (1) WO2003085989A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007295062A (ja) * 2006-04-21 2007-11-08 Megachips Lsi Solutions Inc ホワイトバランス調整方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0670345A (ja) * 1992-08-21 1994-03-11 Matsushita Electric Ind Co Ltd カラーチャート認識装置と画像データ判定装置と光源色度推定装置と光源推定装置
JP2000148978A (ja) * 1998-11-10 2000-05-30 Fuji Photo Film Co Ltd 撮影光源推定方法および装置、画像処理方法および装置、並びに記録媒体
JP2000209598A (ja) * 1999-01-20 2000-07-28 Nikon Corp ホワイトバランス調整機能を備える電子カメラ
JP2001112019A (ja) * 1999-10-04 2001-04-20 Eastman Kodak Japan Ltd オートホワイトバランス装置及び方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0670345A (ja) * 1992-08-21 1994-03-11 Matsushita Electric Ind Co Ltd カラーチャート認識装置と画像データ判定装置と光源色度推定装置と光源推定装置
JP2000148978A (ja) * 1998-11-10 2000-05-30 Fuji Photo Film Co Ltd 撮影光源推定方法および装置、画像処理方法および装置、並びに記録媒体
JP2000209598A (ja) * 1999-01-20 2000-07-28 Nikon Corp ホワイトバランス調整機能を備える電子カメラ
JP2001112019A (ja) * 1999-10-04 2001-04-20 Eastman Kodak Japan Ltd オートホワイトバランス装置及び方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007295062A (ja) * 2006-04-21 2007-11-08 Megachips Lsi Solutions Inc ホワイトバランス調整方法

Also Published As

Publication number Publication date
JPWO2003085989A1 (ja) 2005-08-18
JP3801177B2 (ja) 2006-07-26
AU2003221024A1 (en) 2003-10-20

Similar Documents

Publication Publication Date Title
US11849224B2 (en) Global tone mapping
US8264574B2 (en) Electronic image capture with reduced noise
CN102740082B (zh) 图像处理装置及控制方法
RU2550150C2 (ru) Способ и система для определения цвета из изображения
JP5772991B2 (ja) 電子機器
JP5234211B2 (ja) 画像処理装置
US7639940B2 (en) Photography apparatus, photography method, and photography program using lighting condition parameters
US7430002B2 (en) Digital imaging system and method for adjusting image-capturing parameters using image comparisons
JP5250996B2 (ja) ホワイトバランス調整装置、撮像装置、およびホワイトバランス調整プログラム
US20130021484A1 (en) Dynamic computation of lens shading
WO2004045219A1 (ja) 光源推定装置、光源推定方法、撮像装置および画像処理方法
US20070071316A1 (en) Image correcting method and image correcting system
US20020135743A1 (en) Digital image processing method and apparatus for brightness adjustment of digital images
CN102724400A (zh) 图像处理设备及其控制方法
WO2004077816A2 (en) Digital image exposure correction
CN101904166A (zh) 使用预览图像选择曝光的摄像装置
US20110235945A1 (en) Image processing apparatus, image processsing method, and program
JP2001141569A (ja) 認知光源とハイライトとを利用した照明色度推定及び変換装置及びそのための方法並びにそのためのプログラムを記録したコンピュータが読める記録媒体
TWI549511B (zh) 影像感測裝置及色彩校正矩陣修正方法與查找表建立方法
JP4066803B2 (ja) 画像処理装置、画像処理プログラム、画像処理方法および電子カメラ
US20170024865A1 (en) Image processing appartatus and method, recording medium storing image processing program readable by computer, and imaging apparatus
JP2005277981A (ja) 画像処理のための対象画像の選択
JPH11331738A (ja) 画像処理方法および装置
US20060177128A1 (en) White balance with zone weighting
CN113132695A (zh) 镜头阴影校正方法、装置及电子设备

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NI NO NZ OM PH PL PT RO RU SC SD SE SG SK SL TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2003583033

Country of ref document: JP

122 Ep: pct application non-entry in european phase