JP4359662B2 - Color image exposure compensation method - Google Patents

Color image exposure compensation method Download PDF

Info

Publication number
JP4359662B2
JP4359662B2 JP2005342982A JP2005342982A JP4359662B2 JP 4359662 B2 JP4359662 B2 JP 4359662B2 JP 2005342982 A JP2005342982 A JP 2005342982A JP 2005342982 A JP2005342982 A JP 2005342982A JP 4359662 B2 JP4359662 B2 JP 4359662B2
Authority
JP
Japan
Prior art keywords
image
color
frequency
created
images
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2005342982A
Other languages
Japanese (ja)
Other versions
JP2006186983A (en
Inventor
俊一郎 大恵
利幸 柏木
圭 高木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Tokushima
Tokushima Prefecture
Original Assignee
University of Tokushima
Tokushima Prefecture
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 University of Tokushima , Tokushima Prefecture filed Critical University of Tokushima
Priority to JP2005342982A priority Critical patent/JP4359662B2/en
Publication of JP2006186983A publication Critical patent/JP2006186983A/en
Application granted granted Critical
Publication of JP4359662B2 publication Critical patent/JP4359662B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はカラー画像の露出補正方法に関し、特に、ディジタルカメラで逆光シーン等の悪条件下の撮影環境において取得されたカラー画像に見られる「白とび」や「つぶれ」と言われる露出の不適正な領域を、視覚的に自然な画像に補正するための、カラー画像の露出補正方法に関する。   The present invention relates to a method for correcting exposure of a color image, and in particular, improper exposure that is referred to as “overexposure” or “collapse” in a color image obtained in a shooting environment under adverse conditions such as a backlight scene with a digital camera. The present invention relates to a color image exposure correction method for correcting an image area to a visually natural image.

今日、家庭でのパーソナルコンピュータの普及と共に、ディジタルカメラの需要が増えている。しかし、ディジタルカメラは、手軽に取り扱える反面、逆光などの撮影環境により、色の白飛びや潰れという露出が適正でない画像が取得されることがある。人間はこのようなシーンでも無意識に瞳孔を調整して認識できるが、ディジタルカメラでは、再現できる明るさの範囲が狭いために、人間の感覚とは異なった画像となる。   Today, with the spread of personal computers at home, the demand for digital cameras is increasing. However, while digital cameras can be handled easily, images with inadequate exposure due to overexposure or loss of color may be acquired depending on the shooting environment such as backlight. Humans can recognize and recognize pupils even in such a scene, but with digital cameras, the range of brightness that can be reproduced is narrow, resulting in images that differ from human senses.

このような「とび」や「つぶれ」の部分を補正し、視認性を改善するために、輝度分布ヒストグラムの特徴を利用するなどの手法である線形濃度変換やヒストグラム平坦化などの方法により、コントラストを強調した画像に変換する手法が提案されている(非特許文献1、2、3)。しかし、これらの手法は、その画像中のみの情報をもとに強調を行うため、極度に露出の不適正な領域においては強調に限界がある。また1枚の画像中に露出の適正な領域と不適正な領域が混在するような画像においては、露出の不適正な領域を強調するあまり、露出の適正な領域まで過度に強調してしまい、視覚的に不自然な画像に変換されるという欠点がある。   In order to correct such “skipping” and “collapsed” parts and improve visibility, contrast is obtained by methods such as linear density conversion and histogram flattening, which are methods using the characteristics of the luminance distribution histogram. Has been proposed (Non-Patent Documents 1, 2, and 3). However, since these methods perform enhancement based on information only in the image, there is a limit to enhancement in a region where exposure is extremely inappropriate. In addition, in an image in which a proper exposure area and an inappropriate exposure area are mixed in one image, too much emphasis is placed on the inappropriate exposure area, and the proper exposure area is excessively emphasized. There is a drawback that it is converted into a visually unnatural image.

また別の技術として、特許文献1は、「逆光」、「白つぶれ」、「黒つぶれ」を補正する手法として、輝度ヒストグラムを利用する信号処理方法を開示する。さらに特許文献2および特許文献3は、RAWモードを利用した画像処理プログラム及び方法を開示する。しかし、それぞれ、カラーヒストグラムより求められた頻度画像及びLabカラーヒストグラムの情報を利用しておらず、人の目で見たような自然な画像に処理する技術を開示していない。したがって、これらの技術では前記した白飛びや潰れの問題を解決して視覚的に自然な画像に補正する画像処理技術までには至っていない。
「コンピュータ画像処理入門」(田村秀行著)総研出版、1985 「C言語による画像処理」(安居院猛、中嶋正之、木見尻秀子著) 昭晃堂、1990 酒井幸市:Visual Basic & Visual C++によるデジタル画像処理入門、 CQ出版社、2002 特開2003−179809号公報 特開2004−220438号公報 特開2004―222076号公報
As another technique, Patent Document 1 discloses a signal processing method using a luminance histogram as a technique for correcting “backlight”, “whiteout”, and “blackout”. Further, Patent Document 2 and Patent Document 3 disclose an image processing program and method using the RAW mode. However, the frequency image obtained from the color histogram and the information of the L * a * b * color histogram are not used, and a technique for processing a natural image as seen by human eyes is not disclosed. . Therefore, these techniques have not yet led to an image processing technique that solves the above-described problems of overexposure and collapse and corrects the image to a visually natural image.
“Introduction to Computer Image Processing” (by Hideyuki Tamura), Research Institute Publishing, 1985 “Image processing in C language” (by Takeshi Yasui, Masayuki Nakajima, Hideko Kimijiri) Shosodo, 1990 Yukiichi Sakai: Introduction to Digital Image Processing with Visual Basic & Visual C ++, CQ Publisher, 2002 JP 2003-179809 A JP 2004-220438 A Japanese Patent Application Laid-Open No. 2004-222076

本発明の目的は、ディジタルカメラの画像情報から取得したデータを基にカラー画像を処理する方法において、逆光等による白とびやつぶれの補正に関し、従来技術では視覚的に自然な画像に処理できないという問題点を解決することが可能なカラー画像の露出補正方法を提供することにある。   An object of the present invention relates to correction of overexposure and collapse due to backlight or the like in a method for processing a color image based on data acquired from image information of a digital camera, and it cannot be processed into a visually natural image by the related art. An object of the present invention is to provide a color image exposure correction method capable of solving the problems.

上記目的を達成するための本発明のカラー画像の露出補正方法は、同一シーンについて露出を変えて複数枚のカラー画像系列を取得し、これら複数枚のカラー画像系列における2枚のカラー画像について画像の各部分ごとに色の出現頻度の比を求め、前記各部分において、前記色の出現頻度の比にしたがって頻度の小さい方が頻度の大きい方よりも多くブレンドされるようなブレンド比を求め、画像全体についてブレンド比マップを作成し、このブレンド比マップにしたがって前記2枚のカラー画像を前記各部分ごとにブレンドして1枚の露出補正画像を作成するものである。 Exposure correction method for a color image of the present invention for achieving the above object, by changing the exposure for the same scene to obtain a plurality of color images sequence, for the two color image definitive to the plurality of color images sequence Obtain the ratio of the color appearance frequency for each part of the image, and obtain the blend ratio such that the smaller frequency is blended more than the greater frequency in each part according to the color appearance frequency ratio. A blend ratio map is created for the entire image, and the two color images are blended for each of the portions in accordance with the blend ratio map to create one exposure-corrected image .

そして本発明は、上記において、2枚のカラー画像について画像の各部分ごとに色の出現頻度の比を求め、前記各部分において、前記色の出現頻度の比にしたがって頻度の小さい方が頻度の大きい方よりも多くブレンドされるようなブレンド比を求め、画像全体についてブレンド比マップを作成し、このブレンド比マップにしたがって前記2枚のカラー画像を前記各部分ごとにブレンドして1枚の露出補正画像を作成するものである。   In the above, the present invention obtains the ratio of the color appearance frequency for each part of the image for the two color images, and the frequency is smaller in each part according to the color appearance frequency ratio. Find a blend ratio that blends more than the larger one, create a blend ratio map for the entire image, and blend the two color images for each part according to this blend ratio map to get one exposure A corrected image is created.

本発明は、上記において、元のカラー画像のカラー値をその色の出現頻度に置き換えた第1の頻度画像と、この第1の頻度画像の頻度値に人間が差を感じない色の重みを大きくした係数を乗じて得られる第2の頻度画像とのいずれかを用いて、ブレンド比マップを作成するものである。   According to the present invention, in the above, the first frequency image in which the color value of the original color image is replaced with the appearance frequency of the color, and the weight of the color that humans do not feel a difference in the frequency value of the first frequency image. A blend ratio map is created using any one of the second frequency images obtained by multiplying the increased coefficient.

本発明は、上記において、原画像の暗い部分を明るくするように露出を補正した露出オーバー画像と、原画像を前記露出オーバー画像の色数に近くなるように補正した露出アンダー画像との2枚の補正画像を作成して用いるものである。   In the above, the present invention provides two images: an overexposed image in which exposure is corrected so as to brighten dark portions of the original image, and an underexposed image in which the original image is corrected so as to be close to the number of colors of the overexposed image. The corrected image is created and used.

本発明の手法の一つは、上記において、原画像を前景部分と背景部分とに分け、前記原画像の前景部分を明るくするように露出を補正して露出オーバー画像を作成するとともに、原画像または原画像を露出補正した画像を露出アンダー画像とするものである。   One of the techniques of the present invention is that, in the above, the original image is divided into a foreground portion and a background portion, and an overexposed image is created by correcting exposure so that the foreground portion of the original image is brightened. Alternatively, an image obtained by correcting the exposure of the original image is used as an underexposed image.

本発明は、上記において、露出アンダー画像と露出オーバー画像の中間の明るさの画像を1枚または複数枚作成し、これら中間の明るさの画像および露出アンダー画像からなる複数枚の画像のそれぞれにおける色の出現頻度と、露出オーバー画像における色の出現頻度との比を用いて複数枚のブレンド比マップを作成し、これら複数枚のブレンド比マップから新たなブレンド比マップを作成するものである。   In the above, the present invention creates one or a plurality of intermediate brightness images between the underexposed image and the overexposed image, and each of the plurality of images including the intermediate brightness image and the underexposed image. A plurality of blend ratio maps are created using the ratio between the color appearance frequency and the color appearance frequency in the overexposed image, and a new blend ratio map is created from the plurality of blend ratio maps.

本発明の手法の他の一つは、上記において、画像のRAWデータを用いて、明るさの異なる2枚の画像を現像し、この2枚の画像を用いるものである。
本発明は、上記において、明るさの異なる明るい画像と暗い画像のほかに、中間の明るさの画像を1枚または複数枚現像し、前記中間の明るさの画像および前記暗い画像からなる複数枚の画像のそれぞれにおける色の出現頻度と、前記明るい画像における色の出現頻度との比を用いて複数枚のブレンド比マップを作成し、これら複数枚のブレンド比マップから新たなブレンド比マップを作成するものである。
Another method of the present invention is to develop two images having different brightness using the RAW data of the image and use the two images.
In the above, the present invention develops one or a plurality of intermediate brightness images, in addition to a bright image and a dark image having different brightness, and a plurality of images composed of the intermediate brightness image and the dark image. Create multiple blend ratio maps using the ratio of the color appearance frequency in each of the images and the color appearance frequency in the bright image, and create a new blend ratio map from these multiple blend ratio maps. To do.

本発明によれば、ブレンド比マップをエッジの画像におけるそのエッジの強度に応じたガウシアンフィルタによりスムージングすることにより、エッジ付近の平滑度を小さくし、エッジ以外の平滑度を大きくした新たなブレンド比マップを作成することが好適である。 According to the present invention, the blend ratio map is smoothed by a Gaussian filter according to the intensity of the edge in the image of the edge, thereby reducing the smoothness near the edge and increasing the smoothness other than the edge. It is preferable to create a map.

また本発明によれば、RGB表色系にて作成された2枚のカラー画像のそれぞれから、Ycc表色系などの人間の知覚にもとづく表色系に変換した画像を作成し、これらの変換された2つの画像をブレンド比マップにしたがってブレンドして1枚の画像を作成し、この画像を元のRGB表色系に変換してカラー画像を作成することが好適である。   Further, according to the present invention, an image converted into a color system based on human perception such as a Ycc color system is created from each of two color images created in the RGB color system, and these conversions are made. It is preferable to create a single image by blending these two images according to the blend ratio map, and converting this image into the original RGB color system to create a color image.

また本発明によれば、原画像からそのサイズを小さくした縮小画像を作成し、作成した縮小画像から縮小サイズのブレンド比マップを作成し、この縮小サイズのブレンド比マップより元のサイズに拡大したブレンド比マップを作成して用いることが好適である。   Further, according to the present invention, a reduced image having a reduced size is created from the original image, a reduced size blend ratio map is created from the created reduced image, and the original size is enlarged from the reduced size blend ratio map. It is preferable to create and use a blend ratio map.

本発明は、前記特徴を持つことにより、逆光や明暗の領域が混在するシーンを撮影して「白とび」や「つぶれ」といった露出の悪い領域のある画像を取得した場合であっても、特別な装置を必要とすることなく、ユーザーのニーズに応じて容易に、露出の不適正な領域のない視覚的に自然な画像を得ることが出来る。   The present invention has the characteristics described above, so that even when an image having a poorly exposed region such as “whiteout” or “collapsed” is acquired by capturing a scene in which backlight and light / dark regions are mixed, Therefore, it is possible to easily obtain a visually natural image without an improperly exposed area according to the user's needs without requiring a special device.

すなわち、露出の不適正な領域は、一般に各画素の色の差が小さく、露出の適正な領域に比べて画像中で同じ色の頻度が大きいという特徴を持っている。このことを利用して、本発明は、色の出現頻度が低い画像を、その画像位置における露出が適正な画像であると判断するものである。   That is, a region with an inappropriate exposure generally has a small color difference between pixels, and has a feature that the frequency of the same color is higher in an image than a region with an appropriate exposure. Utilizing this fact, the present invention determines that an image with a low color appearance frequency is an image with an appropriate exposure at the image position.

また本発明は、上記の特徴を、人間の知覚に基づいて設計した新たなカラーヒストグラムを用いて抽出し、視覚的に自然な補正を行うものである。このとき、露出の適正さを評価するために、本発明者らが先に開発した、カラーヒストグラム空間上に頻度情報と位置情報を持たせたカラー画像処理技術(特開2001−155173号公報)より求められる頻度の違いを視覚的に表す頻度画像技術を用いる。そのため本発明は、露出の不適正な領域を空間的に検出するような領域分割処理を必要とせずに、局所領域の露出を補正できるといった特徴を持っている。   In the present invention, the above features are extracted using a new color histogram designed based on human perception, and visually natural correction is performed. At this time, in order to evaluate the appropriateness of exposure, a color image processing technique developed by the present inventors and having frequency information and position information on a color histogram space (Japanese Patent Laid-Open No. 2001-155173). A frequency image technique that visually expresses the difference in frequency required is used. Therefore, the present invention has a feature that the exposure of the local area can be corrected without requiring an area dividing process for spatially detecting an inappropriate area of exposure.

また本発明は、原画像または撮影した1枚の画像データから、明るさの異なる複数枚の画像を生成するので、特別の撮影手段を必要としない所に大きな特徴がある。また本発明は、領域分割を行う必要が無く、画素単位でブレンド比を決定でき、取り扱うことができるところに、大きな特徴がある。   In addition, the present invention is characterized in that a plurality of images with different brightnesses are generated from an original image or a single imaged image data, so that no special photographing means is required. Further, the present invention has a great feature in that it is not necessary to divide the region, and the blend ratio can be determined and handled in units of pixels.

さらにまた本発明は、ブレンド比を決める際に、人間の知覚特性に応じたカラーヒストグラムを作成し、そのヒストグラムから得られるカラーの頻度情報を基に決定するので、あらかじめ小領域の分割を行う必要が無く、画素単位にブレンド比を決定することができる。   Furthermore, according to the present invention, when determining the blend ratio, a color histogram corresponding to human perceptual characteristics is created and determined based on color frequency information obtained from the histogram. The blend ratio can be determined on a pixel-by-pixel basis.

すなわち本発明によれば、露出の不適正な領域を視覚的に自然に補正することができ、その補正結果によって、「白とび」や「つぶれ」のあるシーンでも、明部および暗部両方ともほぼ適正な露出で見える画像が得られる。これにより、視覚的に自然に影の領域の露出を補正することができ、得られた画像には露出の不適正な領域が無いようにすることができる。   That is, according to the present invention, it is possible to visually correct an inappropriate exposure area, and depending on the correction result, even in a scene with “overexposure” or “collapse”, both bright and dark areas are almost equal. An image that can be viewed with proper exposure is obtained. As a result, the exposure of the shadow area can be corrected visually and naturally, and the obtained image can be free from an inappropriate exposure area.

また本発明によると、露出の不適正な領域を検出するための領域分割処理を必要とせずに、局所領域の露出を補正することができる。また、特別な装置を必要とせずに、あらゆる種類のディジタルカメラに適用可能であり、汎用性にも優れるという効果がある。   In addition, according to the present invention, it is possible to correct the exposure of the local area without requiring an area dividing process for detecting an inappropriately exposed area. In addition, the present invention can be applied to any kind of digital camera without requiring a special device, and has an effect of excellent versatility.

[露出と色の出現頻度]
写真撮影の際に、同じシーンを露出を変えて複数撮影したときに、注目している物体の見やすさと色の出現頻度との関係について説明する。図1は、図2の同一シーンを、露出を変えて9通りに撮影した画像群であり、それぞれの画像に1〜9の番号を付している。図2に示すように、机の上にはプラスチック製の鉢が置いてあり、机の下にはプラスチック製の鳥の人形が置いてある。鉢に対して適正な露出を合わせると、鳥の人形が暗くつぶれてしまう。逆に鳥の人形に露出を合わせると、鉢は白くとんでしまう。
[Exposure frequency of exposure and color]
A description will be given of the relationship between the visibility of an object of interest and the appearance frequency of colors when a plurality of images of the same scene are captured with different exposures. FIG. 1 is a group of images obtained by photographing the same scene of FIG. 2 in nine ways with different exposures, and numbers 1 to 9 are assigned to the respective images. As shown in FIG. 2, a plastic bowl is placed on the desk, and a plastic bird doll is placed under the desk. Matching the correct exposure to the bowl will cause the bird doll to collapse darkly. On the other hand, if you match the exposure to a bird doll, the bowl will turn white.

図1のNo.5の画像とNo.9の画像とにおける鳥の人形部分の拡大図を図3(a)(b)に示す。No.5の画像では鳥の人形部分はつぶれ気味であり、No.9の画像では鳥の人形は露出が適正である。また、No.5の画像とNo.9の画像とにおける鳥の人形部分だけの領域をRGBカラーヒストグラム空間にプロットすると、図4(a)(b)のようになる。これより、RGB空間では適正な露出の部分は、広がってプロットされ、つぶれ気味の部分は、レベルの低い領域に集中してプロットされることが分かる。   No. 1 in FIG. No. 5 and No. 5 image. 3A and 3B are enlarged views of the bird doll portion in the nine images. No. In the image of No. 5, the bird doll part is crushed. In the image of 9, the bird doll is properly exposed. No. No. 5 and No. 5 image. When the area of only the bird doll part in the image of 9 is plotted in the RGB color histogram space, it is as shown in FIGS. From this, it can be seen that in the RGB space, the part of the appropriate exposure is plotted in a broad manner, and the part of the collapsed part is plotted in a concentrated manner in a low level area.

いま、このRGB空間の各位置に色の出現頻度を持たせると、露出の適正な部分の色は、分散しているためその出現頻度は低くなる。反対に、つぶれたり、とび気味の部分は、同じような色が集まっているため、色の出現頻度は高くなる。   Now, if the appearance frequency of the color is given to each position in the RGB space, the color of the appropriate part of the exposure is dispersed and thus the appearance frequency becomes low. On the other hand, since the same color is gathered in the portion that is crushed or jumped, the frequency of appearance of the color increases.

したがって、露出を変えて撮影した複数枚の画像において、同一領域についての色の出現頻度を比べると、色の出現頻度の低い画像ほど適正な露出であると言える。   Accordingly, when comparing the appearance frequency of colors for the same region in a plurality of images taken with different exposures, it can be said that an image with a lower frequency of appearance has a more appropriate exposure.

[頻度画像]
色の頻度情報を有するカラーヒストグラム空間において、その頻度を調べることで、露出を変えて撮影した画像の適正な露出を判断することができる。以下、これを具体的に説明する。
[Frequency image]
By examining the frequency in a color histogram space having color frequency information, it is possible to determine an appropriate exposure of an image taken with different exposures. This will be specifically described below.

まず、カラー画像を、その座標を表す2つの独立変数x、yの関数f(x,y)によって表現すると、図5に示すように、カラー画像f(x,y)のRGB値(たとえば「赤」)を、カラーヒストグラム空間より得られる頻度値(たとえば「2」)に置き換えることにより、頻度画像g(x,y)が得られる。この頻度画像g(x,y)は、カラーヒストグラムより求められた頻度の違いを視覚的に表すものである。   First, when a color image is expressed by a function f (x, y) of two independent variables x and y representing the coordinates, as shown in FIG. The frequency image g (x, y) is obtained by replacing “red”) with a frequency value (for example, “2”) obtained from the color histogram space. This frequency image g (x, y) visually represents the difference in frequency obtained from the color histogram.

頻度画像を有限の諧調で表示する場合は、頻度の閾値をdとして、dより小さい頻度の画像を、その頻度値に応じて濃淡表示する。この頻度値に応じて濃淡表示された画像を頻度特徴検出画像と呼ぶ。その詳細は、特開2001−155173号公報に記載されている通りである。   When displaying a frequency image with a finite gradation, the frequency threshold is set to d, and an image with a frequency smaller than d is displayed in shades according to the frequency value. An image displayed in grayscale according to this frequency value is called a frequency feature detection image. The details are as described in JP 2001-155173 A.

図6(a)(b)に、閾値dを同じにしたときの図3(a)(b)についての頻度特徴検出画像を示す。ここでは、頻度が低い部分ほど暗く表示され、反対に頻度が高い部分ほど明るく表示されている。   FIGS. 6A and 6B show frequency feature detection images for FIGS. 3A and 3B when the threshold value d is the same. Here, the lower frequency portion is displayed darker, and the higher frequency portion is displayed brighter.

頻度画像を用いて求めた図1における鉢と鳥の人形部分の領域の平均頻度の変化を図7(a)(b)に示す。これらより、平均頻度の最も小さくなる露出が、最も見やすくなっていることが分かる。   Changes in the average frequency of the pot and bird doll region in FIG. 1 obtained using the frequency image are shown in FIGS. From these, it can be seen that the exposure with the lowest average frequency is the most visible.

[頻度画像の作成]
実シーンでは、画素のRGB値は種々のノイズの影響を受けることが多いため、複数枚の同じシーンを連続して取得したカラー画像を用いて頻度画像を作成する。具体的な手順を以下に示す。
(1)時刻tに取得したカラー画像をf(t)とし、f(t)をカラーヒストグラム空間上にプロットしたものをh(t)とする。h(t)はf(t)の各画素の座標値とその座標における頻度とを持っている。
(2)取得画像f(t)の濃度値をh(t)より得られる頻度値に置き換えると、f(t)は、濃度値の出現頻度を表す濃淡画像となる。この画像を頻度画像g(t)と呼ぶ。
(3){f(t);t=1,2,…,n}から得られるn枚の頻度画像g(t)の合計Sを次式により求める。
[Create frequency image]
In an actual scene, the RGB value of a pixel is often affected by various noises, so a frequency image is created using a color image obtained by continuously acquiring a plurality of the same scenes. The specific procedure is shown below.
(1) A color image acquired at time t is denoted by f (t), and f (t) plotted on the color histogram space is denoted by h (t) . h (t) has the coordinate value of each pixel of f (t) and the frequency at that coordinate.
(2) When the density value of the acquired image f (t) is replaced with a frequency value obtained from h (t) , f (t) becomes a grayscale image representing the appearance frequency of the density value. This image is called a frequency image g (t) .
(3) A total S of n frequency images g (t) obtained from {f (t) ; t = 1, 2,.

Figure 0004359662
さらに、頻度画像の平均をgmとすると、gmは次のように表される。
Figure 0004359662
Further, assuming that the average frequency image is gm, gm is expressed as follows.

Figure 0004359662
gmを平均頻度画像と呼び、gmの各画素の値は実数値を取るものとする。
(4)画像として表現する頻度の閾値をdとし、これを検出平均頻度と呼ぶ。iビットの画像メモリを用いて、検出平均頻度dまでを表した頻度画像は次式のようになる。
Figure 0004359662
gm is called an average frequency image, and the value of each pixel of gm takes a real value.
(4) The threshold value of the frequency of representation as an image is d, which is called the detection average frequency. A frequency image representing the detection average frequency d using an i-bit image memory is represented by the following equation.

Figure 0004359662
検出した濃淡画像gを頻度特徴検出画像と呼ぶ。なお、式(3)でdから1を減じているのは、最低の頻度値を0にするためである。gにおいて暗い領域が低頻度領域を表し、明るい領域が高頻度領域を表す。以後、頻度画像g(t)、頻度特徴検出画像gをまとめて頻度画像と呼ぶ。
Figure 0004359662
The detected grayscale image g d is referred to as a frequency feature detection image. The reason why 1 is subtracted from d in equation (3) is to set the lowest frequency value to 0. g dark regions in d represent low frequency region, the bright region represents a high frequency region. Hereinafter, the frequency image g (t) and the frequency feature detection image g d are collectively referred to as a frequency image.

以上の作成手順を図8に示す。図8ではカラー画像f(t)を基に頻度画像を作成する方法を示している。カラー画像f(t)をカラーヒストグラムにプロットし、同時に濃度値の出現頻度をカウントする。このときのカラーヒストグラムをhとする。もとの画像f(t)の濃度値をhより得られる頻度値を加算枚数で割った値に置き換えた画像が頻度画像gである。頻度画像gでは、頻度をグレースケールで表している。 The above creation procedure is shown in FIG. FIG. 8 shows a method of creating a frequency image based on the color image f (t) . The color image f (t) is plotted on the color histogram, and at the same time, the frequency of appearance of density values is counted. Let the color histogram at this time be h. The frequency image g is an image obtained by replacing the density value of the original image f (t) with a value obtained by dividing the frequency value obtained from h by the number of added sheets. In the frequency image g, the frequency is expressed in gray scale.

以下においては、実際の使用時のことを考慮し、平均頻度画像は作成せず、1枚の取得画像から頻度画像を作成する方法を用いる。   In the following, in consideration of actual use, a method of creating a frequency image from one acquired image is used without creating an average frequency image.

[均等色空間の性質を持つRGB表色系のカラーヒストグラム]
RGBカラーヒストグラム空間では、同じ色の距離であっても、その位置により人間には異なった距離に感じることが知られている。たとえば、緑付近の色の差と青付近の色の差がRGB空間で同じであっても人間には青付近の方がより差を感じる。
[Color histogram of RGB color system with uniform color space]
In the RGB color histogram space, it is known that even if the distance is the same color, a human feels a different distance depending on the position. For example, even if the color difference near green and the color difference near blue are the same in the RGB space, humans feel a difference near blue.

このため、RGBカラーヒストグラム空間より得られる頻度情報をそのまま用いると、人間の感覚と合わない不自然な結果となる場合がある。そこで、人間が同じ色差に見える色どうしの距離を均等にしたL表色系の色空間を参考にして、RGB空間にこの均等色空間の性質を持たせる。 For this reason, if the frequency information obtained from the RGB color histogram space is used as it is, an unnatural result that does not match the human sense may be obtained. Therefore, the RGB space is given the property of this uniform color space with reference to the color space of the L * a * b * color system in which the distances between colors that appear to be the same color difference by humans are made equal.

そのための手法は、頻度情報を持つRGB空間の各位置の頻度に、その位置により異なる重みを乗じたものを、その位置の頻度とするものである。この重みは、人間が差を感じない色はカラーヒストグラム空間上で高い頻度となるように設定したものであり、L表色系と同じ性質を、このカラーヒストグラムに持たせることができる。 As a technique for that, the frequency of each position in the RGB space having frequency information is multiplied by a weight different depending on the position, and the frequency of the position is obtained. These weights are set so that colors that humans do not feel a difference have a high frequency on the color histogram space, and this color histogram should have the same properties as the L * a * b * color system. Can do.

なお、L表色系は人間の知覚に合った色空間と言われており、色再現といった応用では微妙な色の差はあまり問題にならないため性能が良く、あらゆる分野で用いられている。 The L * a * b * color system is said to be a color space suitable for human perception, and in applications such as color reproduction, subtle color differences do not cause much problem, so performance is good and used in all fields. It has been.

表色系は
:明度
:値が大きいほど赤、小さいほど緑
:値が大きいほど黄、小さいほど青
の3つの値で色を表す。
L * a * b * color system is L * : lightness a * : the larger the value, the more red, the smaller the green b * : the larger the value, the yellow, and the smaller the blue, the color is represented by three values.

以下、詳しく説明する。L表色系の変換式は以下の式(4)のようになる。 This will be described in detail below. The conversion formula of L * a * b * color system is as shown in the following formula (4).

Figure 0004359662
なお、式(4)のX、Y、Zは以下の式(5)で表され、Xn、Yn、Znは白色の三刺激値であり環境によって設定する。本発明では6500Kの色温度照明における白基準値としてXn=94.045、Yn=100.0、Zn=108.892を用いることができる。
Figure 0004359662
In addition, X, Y, and Z of Formula (4) are represented by the following Formula (5), and Xn, Yn, and Zn are white tristimulus values and are set according to the environment. In the present invention, Xn = 94.045, Yn = 100.0, and Zn = 108.892 can be used as white reference values in color temperature illumination of 6500K.

Figure 0004359662
しかし、このL表色系をカラーヒストグラムとすると、以下のような問題点が生じる。(i)負の値が存在し、プログラム上、空間の設定が難しい。(ii)画像の全ての画素を毎回RGBからLに変換する必要があり、処理時間がかかる。(iii)RGBからLへの変換が1対1対応ではないため非可逆である。
Figure 0004359662
However, if this L * a * b * color system is a color histogram, the following problems occur. (I) Negative values exist, and it is difficult to set a space on the program. (Ii) It is necessary to convert all the pixels of the image from RGB to L * a * b * each time, which takes processing time. (Iii) Since conversion from RGB to L * a * b * is not one-to-one correspondence, it is irreversible.

そこで、RGB表色系を用いたカラーヒストグラムにL表色系の性質を持たせる。具体的な手順を次に説明する。
(1)Lカラーヒストグラムを用意し、全点の頻度を0に設定する。
(2)RGB表色系で表される全ての色をLカラーヒストグラムにプロットする。
(3)RGB表色系カラーヒストグラムを用意し、全点の頻度を0に設定する。
(4)RGB表色系カラーヒストグラムの1点1点をLに変換し、Lカラーヒストグラムの頻度値を調べ、その頻度値をRGBカラーヒストグラムに格納する。その結果、頻度値が均等でないRGBカラーヒストグラムができる。このとき、頻度の高い色は人間が差を感じない色であり、頻度の低い色は人間が差を感じる色であると言える。
(5)作成されたRGB表色系カラーヒストグラムの頻度分布に対応した重みテーブルを作る。RGB表色系カラーヒストグラム内で最低の頻度は1、最高の頻度は77であることから、重みは線形に0.1〜7.7とすることができる。RGBカラーヒストグラムを作成する際、プロットされた点の重みを頻度にかけて、頻度を足していく。この手順を図9に示す。
Therefore, a color histogram using the RGB color system has the properties of the L * a * b * color system. A specific procedure will be described next.
(1) An L * a * b * color histogram is prepared and the frequency of all points is set to zero.
(2) All colors represented by the RGB color system are plotted on the L * a * b * color histogram.
(3) An RGB color system color histogram is prepared, and the frequency of all points is set to zero.
(4) Convert the point by point in the RGB color system color histogram in L * a * b *, L * a * b * examine the frequency values of the color histogram, and stores the frequency values in the RGB color histogram. As a result, an RGB color histogram with non-uniform frequency values is created. At this time, it can be said that a color with high frequency is a color that humans do not feel a difference, and a color with low frequency is a color that humans feel a difference.
(5) Create a weight table corresponding to the frequency distribution of the created RGB color system color histogram. Since the lowest frequency is 1 and the highest frequency is 77 in the RGB color system color histogram, the weight can be linearly set to 0.1 to 7.7. When the RGB color histogram is created, the weight of the plotted points is multiplied by the frequency, and the frequency is added. This procedure is shown in FIG.

このように重みテーブルを一度作成すれば、人間が差を感じない色はカラーヒストグラム上で高い頻度となる、L表色系と同じ性質を持つRGBカラーヒストグラムを作成することができる。本発明ではこのL表色系の性質を持ったカラーヒストグラムにより作成される頻度画像を用いて露出を評価し、補正する。 Once the weight table is created in this way, an RGB color histogram having the same properties as the L * a * b * color system can be created. it can. In the present invention, exposure is evaluated and corrected using a frequency image created by a color histogram having the properties of the L * a * b * color system.

この重み付けを行う重みテーブルは、一度作成しておけば毎回作り直す必要はない。カラー画像をこのカラーヒストグラム空間にプロットした後の頻度に、重みテーブルより得られる係数を乗じて、その値を基に頻度画像を作成し、この画像を露出の評価に使用する。この頻度画像の作成過程は、元のカラー画像のカラー値をその色の出現頻度に置き換えて作成した頻度画像の各頻度値に、後から、元のカラー画像の色についての前記重みテーブルの係数を乗じて、新たに頻度画像を作成することと同じである。   Once the weighting table for weighting is created, it is not necessary to recreate it every time. The frequency after the color image is plotted in the color histogram space is multiplied by a coefficient obtained from the weight table, and a frequency image is created based on the value, and this image is used for exposure evaluation. This frequency image creation process is performed by replacing each frequency value of the frequency image created by replacing the color value of the original color image with the appearance frequency of the color, and then adding the coefficient of the weight table for the color of the original color image. This is the same as creating a new frequency image by multiplying.

[露出の補正方法−1]
(基本的な考え方)
ディジタルカメラなどから得られる24ビットフルカラー画像を用いた場合の露出補正の基本的な考え方は次の二つである。
[Exposure Correction Method-1]
(basic way of thinking)
There are two basic concepts of exposure correction when a 24-bit full color image obtained from a digital camera or the like is used.

(A)露出補正の必要な原画像は、露出オーバー気味な部分と露出アンダー気味な部分との、大きく2つの領域に分けて考えることができる。このとき、露出アンダー気味な部分は、逆光での人物の撮影のようにシーンの前部にくることが多いので、これを「前景」とし、それ以外の露出オーバー気味な部分を「背景」とする。   (A) The original image that needs to be corrected for exposure can be divided into two areas, an overexposed part and an underexposed part. At this time, the underexposed part often comes to the front of the scene like shooting a person in the backlight, so this is called “foreground”, and the other overexposed part is called “background” To do.

(B)原画像より、前景の露出が最適な画像f(x,y)を作成するとともに、背景の露出が最適な別の画像f(x,y)を作成する。そして、それぞれの画像より得られる頻度画像についての画素ごとの頻度の比によって、2枚の画像をブレンドする。 (B) From the original image, an image f o (x, y) having the optimum foreground exposure is created, and another image f u (x, y) having the optimum background exposure is created. Then, the two images are blended according to the frequency ratio of each pixel with respect to the frequency image obtained from each image.

以下、上記の二つの考え方に基づいた具体的な露出補正方法を説明する。   Hereinafter, a specific exposure correction method based on the above two concepts will be described.

(前景と背景の決定)
原画像をL表色系のLの値で2値化する。この時の閾値は判別分析法により自動で決定し、閾値より明度の低い部分を前景とし、明度の高い部分を背景とする。
(Determination of foreground and background)
The original image is binarized with the L * value of the L * a * b * color system. The threshold at this time is automatically determined by a discriminant analysis method, and a portion having a lightness lower than the threshold is used as the foreground, and a portion having a high lightness is used as the background.

(f(x,y)とf(x,y)の作成)
前景部分の最適露出画像f(x,y)は、上記のフルカラー画像の暗部の明るさを線形濃度変換により強調して作成したものとする。このとき、濃度変換直線の傾きを少しずつ変化させて、前景部分の明度のエントロピーが最大になるものを求める。
(Create f o (x, y) and f u (x, y))
It is assumed that the optimal exposure image f o (x, y) of the foreground part is created by enhancing the brightness of the dark part of the full-color image by linear density conversion. At this time, the gradient of the density conversion straight line is changed little by little to find the one that maximizes the lightness entropy of the foreground portion.

明度のレベルIの画素の出現確立をP(I)とすると、エントロピーEは次の式により求められる。   Assuming that the appearance of a pixel of lightness level I is P (I), the entropy E is obtained by the following equation.

Figure 0004359662
背景部分の最適露出画像f(x,y)は、原画像を利用することができる。ただし、他の画像でもよい。なお、後述の理由により、後述のようにして、背景部分の最適露出画像f(x,y)の色数を、前景部分の最適露出画像f(x,y)の色数に合わせておく。
Figure 0004359662
An original image can be used as the optimal exposure image f u (x, y) of the background portion. However, other images may be used. For reasons described later, as described later, the number of colors of the optimal exposure image f u (x, y) in the background portion is matched with the number of colors of the optimal exposure image f o (x, y) in the foreground portion. deep.

(頻度画像の作成)
求めた最適露出画像f(x,y)、f(x,y)を、上述の均等色空間の性質を持つRGBカラーヒストグラム空間にそれぞれプロットして、それぞれの頻度画像g(x,y)、g(x,y)を作成する。
(Create frequency images)
The obtained optimum exposure images f o (x, y) and f u (x, y) are respectively plotted in the RGB color histogram space having the above-mentioned uniform color space property, and the respective frequency images g o (x, y, y) and g u (x, y) are created.

(ブレンド比の作成)
頻度の低い領域ほど露出が適正なので、2枚の頻度画像で同じ位置の頻度を比べ、頻度の低い方が多くブレンドされるように、下記の式によって画素ごとにブレンド比r(x,y)、r(x,y)を決める。
(Create blend ratio)
Since the exposure is more appropriate in the region with lower frequency, the frequency of the same position is compared in two frequency images, and the blend ratio r o (x, y) is calculated for each pixel by the following formula so that the lower frequency is blended more. ), R u (x, y) is determined.

Figure 0004359662
Figure 0004359662

(ブレンド比マップの作成)
次に、上記で求めた最適露出画像f(x,y)、f(x,y)のブレンド比r(x,y)、r(x,y)を濃淡画像で表したブレンド比マップの画像を作成する。この画像は、前景部分の露出が適正である画像f(x,y)のブレンド割合が高いほど明るい画像となる。
(Create blend ratio map)
Next, a blend image representing the blend ratios r o (x, y) and r u (x, y) of the optimum exposure images f o (x, y) and f u (x, y) obtained as described above as grayscale images. Create a ratio map image. This image becomes brighter as the blend ratio of the image f o (x, y) in which the exposure of the foreground portion is appropriate is higher.

(ブレンド比マップのスムージング)
ノイズの影響を避けるためブレンド比マップをスムージングする。単にスムージングすると画像中におけるエッジの付近がぼけてしまうため、画像中の場所によって動的に重みが変わるスムージングフィルタを利用する。このフィルタは図10に示すようなガウシアンフィルタであるが、図10(a)に示すようにエッジ付近では分散値を小さく、図10(b)に示すようにエッジから離れるに従って分散値σを大きく設定する。
(Smoothing of blend ratio map)
Smooth the blend ratio map to avoid the effects of noise. If the smoothing is simply performed, the vicinity of the edge in the image is blurred. Therefore, a smoothing filter whose weight is dynamically changed depending on the location in the image is used. This filter is a Gaussian filter as shown in FIG. 10, but the variance value decreases near the edge as shown in FIG. 10A, and the variance value σ increases as the distance from the edge increases as shown in FIG. 10B. Set.

ガウシアンフィルタとは、重みが式(8)より得られる正規分布に従って割り当てられるフィルタであり、与えるσによってぼけ具合が変わる(FEST Project編集委員会:新実践画像処理、Linx、 2002)。図10はσによる重みをグラフ化したものであり、図10(a)はσが5である場合を示し、同図(b)はσが21である場合を示す。   The Gaussian filter is a filter in which weights are assigned according to a normal distribution obtained from Expression (8), and the degree of blur varies depending on σ to be given (FEST Project Editorial Board: New Practice Image Processing, Linx, 2002). FIG. 10 is a graph of the weight by σ. FIG. 10A shows a case where σ is 5, and FIG. 10B shows a case where σ is 21.

Figure 0004359662
式(8)のwは重みでありx,yは座標、σはフィルタの広がりを示す値である。図10(a)(b)から分かるように、σが小さいほど画像はぼけず、大きいほどぼける。この特性を利用して、エッジ付近ではσを小さく、エッジから離れるに従ってσが大きくなるようにスムージングを行う。この処理をたとえば2枚の画像の平均画像より検出したエッジを参考に行う。平均画像とは、単にブレンドする2枚の画像の同じ位置の画素のRGBの値を加算し、2で除して得られるRGBの値によって画像を構成したものである。また、エッジは公知の画像処理手法であるPrewittオペレータを用いて検出する。Prewittオペレータとは、画像中のエッジを検出するための手法である。
Figure 0004359662
In Equation (8), w is a weight, x and y are coordinates, and σ is a value indicating the spread of the filter. As can be seen from FIGS. 10A and 10B, the smaller the σ, the less the image is blurred, and the larger the image, the more blurred. Using this characteristic, smoothing is performed so that σ is small near the edge and σ increases as the distance from the edge increases. This processing is performed with reference to an edge detected from an average image of two images, for example. An average image is an image formed by adding RGB values of pixels at the same position of two images to be blended and dividing the result by two. Further, the edge is detected by using a Prewitt operator which is a known image processing method. The Prewitt operator is a method for detecting an edge in an image.

(ブレンド)
前景最適露出画像f(x,y)と背景最適露出画像f(x,y)の各画素のRGB値を用いてブレンド比r(x,y)、r(x,y)によって実際にブレンドを行う際、画素のRGBの値は、下記の式(9)を用いていったん公知のY/C分離信号に変換し、Y成分とC成分を別々にブレンドした後、式(9)をRGBに関して解いた式(10)を用いてRGBの値に逆変換し、画像とする。
(blend)
By using the RGB values of each pixel of the foreground optimum exposure image f o (x, y) and the background optimum exposure image f u (x, y), the blend ratios r o (x, y) and r u (x, y) When actually blending, the RGB values of the pixels are once converted into known Y / C separation signals using the following equation (9), and the Y component and the C component are blended separately, and then the equation (9 ) Is inversely converted into RGB values using the equation (10) solved for RGB to obtain an image.

Figure 0004359662
Figure 0004359662

Figure 0004359662
Y成分は輝度であり、C成分は色である。このようにするのは、RGBのバランスが崩れないようにするためである。この処理を全ての画素に対して行い、露出補正画像を作成する。
Figure 0004359662
The Y component is luminance, and the C component is color. This is to prevent the RGB balance from being lost. This process is performed on all the pixels to create an exposure correction image.

(具体例)
デジタルカメラで撮影したJPEG画像から24ビットのフルカラー画像を得て、これを原画像として実験を行った。
(Concrete example)
A 24-bit full-color image was obtained from a JPEG image taken with a digital camera, and the experiment was performed using this as an original image.

図11は原画像である。まず、この原画像から、二値化により前景と背景を決めた。ここでは、二人の人物を前景とするとともに、それ以外は背景とした。次に前景のエントロピーを算出して、前景部分の最適露出画像f(x,y)を求めた。これを図12に示す。背景部分の最適露出画像f(x,y)は、原画像をf(x,y)と同じ色数まで減色して作成した。 FIG. 11 shows an original image. First, the foreground and background were determined from this original image by binarization. Here, two people are used as the foreground, and the others are used as the background. Next, the foreground entropy was calculated to obtain the optimal exposure image f o (x, y) of the foreground portion. This is shown in FIG. The optimal exposure image f u (x, y) of the background portion was created by reducing the original image to the same number of colors as f o (x, y).

次に最適露出画像f(x,y)、f(x,y)の頻度画像g(x,y)、g(x,y)を作成した。図13は図11を減色した後の頻度画像g(x,y)を示し、図14は図12の頻度画像g(x,y)を示す。露出の適正な部分は頻度が低く、頻度画像において濃度が高く、図13、14において暗い部分となった。反対に露出が適正でない部分は頻度が高く、頻度画像において濃度が低く、図13、14において明るい部分となった。 Next best exposure image f o (x, y), the frequency image g o (x, y) of f u (x, y), created a g u (x, y). FIG. 13 shows the frequency image g u (x, y) after color reduction of FIG. 11, and FIG. 14 shows the frequency image g o (x, y) of FIG. The appropriate part of the exposure was infrequent, the density was high in the frequency image, and the dark part in FIGS. On the contrary, the portion where the exposure is not appropriate has a high frequency, the density is low in the frequency image, and the bright portion in FIGS.

ブレンド比r(x,y)、r(x,y)を決め、図15のブレンド比マップの画像を作成した。この画像は、上述のように、前景部分の露出が適正である画像f(x,y)のブレンド割合が高いほど明るい画像となった。 Blend ratios r o (x, y) and r u (x, y) were determined, and an image of the blend ratio map of FIG. 15 was created. As described above, this image becomes brighter as the blend ratio of the image f o (x, y) in which the exposure of the foreground portion is appropriate is higher.

そして上述のブレンド比マップのスムージングを行い、ブレンドを行った。その結果を図16に示す。この図16の画像は、前景、背景とも適正露出であり、背景が適正露出であるが前景が露出アンダーである図11の画像や、反対に前景は適正露出であるが背景が露出オーバーである図12の画像に比べ、違和感なく露出の補正を行うことができた。   The blend ratio map was smoothed and blended. The result is shown in FIG. The image of FIG. 16 has proper exposure for both the foreground and the background, the image of FIG. 11 where the background is properly exposed but the foreground is underexposed, and conversely the foreground is properly exposed but the background is overexposed. Compared with the image of FIG. 12, exposure correction could be performed without a sense of incongruity.

(まとめ)
以上のようにして、24ビットフルカラー画像を用いて、局所的に露出の不適正な部分を補正することができる。これは、同一シーンにおいて露出を変えて撮影した画像において、露出の適正な部分は、色の出現頻度が低くなるという知見に基づくものである。本手法は、カラー画像の明度情報を基にブレンドや補正を行う手法と異なり、人間の知覚に基づいたカラー空間より得られる情報を用いるため、視覚的に違和感のない自然な補正画像を作成することができる。
(Summary)
As described above, it is possible to locally correct an inappropriately exposed portion using a 24-bit full color image. This is based on the knowledge that, in an image shot with different exposures in the same scene, the appropriate exposure part has a lower color appearance frequency. Unlike the method of blending and correcting based on the brightness information of a color image, this method uses information obtained from a color space based on human perception, so it creates a natural corrected image that is visually uncomfortable. be able to.

(中間画像の利用)
次に、本発明にもとづき中間画像を利用する場合について説明する。この処理では、たとえば原画像を減色した背景画像と原画像を明るくした前景画像の2枚を用いるとともに、その2枚以外に、背景画像と前景画像の中間の明るさの、単数または複数の中間画像を作成する。
(Use of intermediate images)
Next, a case where an intermediate image is used according to the present invention will be described. In this process, for example, a background image obtained by reducing the color of the original image and a foreground image obtained by increasing the brightness of the original image are used. Create an image.

このとき、原画像を明るくした前景画像を作成すると、オリジナルのJPEG画像はRGB8ビットであるため、前景画像は原画像に比べて色数が減る。
フルカラーの画像ではRGBがそれぞれ256階調あり、色数は256×256×256存在する。
At this time, if a foreground image with a brightened original image is created, the original JPEG image is RGB 8-bit, so the foreground image has fewer colors than the original image.
In a full-color image, there are 256 gradations of RGB, and there are 256 × 256 × 256 colors.

前景画像は、原画像をある明るさまで拡大して作成する。この明るさをRGBそれぞれ64とすると、0〜64の部分を0〜255に割り当てて明るい画像を作成する。ただし、元々の暗い部分は64×64×64の色数しかなかったため、0〜255に割り当てても色数は少ないままである。ここで、中間画像の作成の際には、色数を前景画像に合わせる。   The foreground image is created by enlarging the original image to a certain brightness. If this brightness is 64 for each of RGB, a portion of 0 to 64 is assigned to 0 to 255 to create a bright image. However, since the original dark portion has only 64 × 64 × 64 colors, the number of colors remains small even when assigned to 0 to 255. Here, when the intermediate image is created, the number of colors is matched with the foreground image.

このように色数を合わせる理由は、同じ階調のカラー画像より頻度画像を作成しないと頻度のバランスがくずれるからである。たとえば、同じシーンをRGB各256階調で撮る場合と、RGB各64階調で撮る場合とでは、頻度画像にしたときに、同じ場所で露出の程度が同じであっても、前者は頻度が低めになり、後者は頻度が高めになる。   The reason for matching the number of colors in this way is that the frequency balance is lost unless a frequency image is created from a color image of the same gradation. For example, when shooting the same scene with 256 gradations for each of RGB and shooting with 64 gradations for each of RGB, even if the exposure level is the same at the same place, The latter is less frequent and the latter is more frequent.

ブレンド比マップは、たとえば中間画像を3枚作成する場合は、
背景画像より作成した頻度画像:中間画像1より作成した頻度画像
背景画像より作成した頻度画像:中間画像2より作成した頻度画像
背景画像より作成した頻度画像:中間画像3より作成した頻度画像
背景画像より作成した頻度画像:前景画像より作成した頻度画像
のように、背景画像と、単数または複数の中間画像および前景画像とで、それぞれブレンド比マップを作成し、これらを用いて新たなブレンド比マップを得る。具体的には、各ブレンド比マップの平均や、各ブレンド比マップにそれぞれ係数を乗じて加え合わせたものなどを、新たなブレンド比マップとすることができる。各ブレンド比マップにそれぞれ係数を乗じる場合には、たとえば、背景画像と前景画像によるブレンド比マップに乗じる係数の値を、中間画像を用いた場合のブレンド比マップに乗じる係数の値よりも大きな値とすることができる。
For example, when creating 3 intermediate images,
Frequency image created from background image: Frequency image created from intermediate image 1 Frequency image created from background image: Frequency image created from intermediate image 2 Frequency image created from background image: Frequency image created from intermediate image 3 Background image More frequent images: Like the frequency images created from the foreground image, create a blend ratio map for each of the background image, one or more intermediate images, and the foreground image, and use them to create a new blend ratio map. Get. Specifically, an average of each blend ratio map, a result obtained by multiplying each blend ratio map by a coefficient, and the like can be used as a new blend ratio map. When each blend ratio map is multiplied by a coefficient, for example, the coefficient value multiplied by the blend ratio map of the background image and the foreground image is larger than the coefficient value multiplied by the blend ratio map when the intermediate image is used. It can be.

このようにすることで、より良い結果を得ることができる。
上述の露出補正方法に、さらに中間画像をも利用した処理のアルゴリズムの例を、図17に示す。
By doing so, better results can be obtained.
FIG. 17 shows an example of a processing algorithm that uses an intermediate image in addition to the exposure correction method described above.

(高速化アルゴリズム)
図18に示すように、高速化アルゴリズムのために、原画像より縮小した縮小画像を作成する。縮小は、最近傍法、線形補間法、三次補間法などの一般的なアルゴリズムを使用する。この縮小画像を原画像として、上述と同様の処理により、ブレンド比マップを作成する。
(Acceleration algorithm)
As shown in FIG. 18, a reduced image that is reduced from the original image is created for the speed-up algorithm. The reduction uses a general algorithm such as nearest neighbor method, linear interpolation method, and cubic interpolation method. Using this reduced image as the original image, a blend ratio map is created by the same processing as described above.

次に上記のようにして得られたブレンド比マップを、最近傍法、線形補間法、三次補間法により原画像のサイズに拡大する。拡大したブレンド比マップを用いて、原画像と、原画像を明るくして作成した前景画像とにより、露出補正画像を作成する。   Next, the blend ratio map obtained as described above is enlarged to the size of the original image by the nearest neighbor method, the linear interpolation method, and the cubic interpolation method. Using the enlarged blend ratio map, an exposure correction image is created from the original image and the foreground image created by brightening the original image.

このように縮小画像を原画像としてブレンド比マップを作成することで、処理の高速化を図ることができる。   By creating a blend ratio map using the reduced image as the original image in this way, the processing speed can be increased.

[露出の補正方法−2]
ここでは、画像のRAWデータを用いて処理を行う。
(RAWデータと現像)
RAWデータとは、ディジタルカメラにおいて撮影時に撮像素子が生成したRAWモードのデータであり、画像ではない。一般にディジタルカメラで出力される画像は、ガンマ値、明るさ、色、ホワイトバランスなどのパラメータを設定して、RAWデータから生成されたものである。この処理を一般に「現像」という。現在までに公開されている現像ソフトでは上に挙げたパラメータを任意に設定できない。そのため、例えば図19のように影の領域や空の領域に色の変化が見られない。そこで、ここではRAWデータを直接処理することのできる「dcraw」というフリーライセンスの現像ソフト(“RAW Digital Photo Decoding in Linux”、http://www.cybercom.net/dcoffin/dcraw/)を用いる。dcrawを用いると、図20、21に示すように明るさの異なる2枚の画像を現像できる。
[Exposure Correction Method-2]
Here, processing is performed using RAW data of the image.
(RAW data and development)
The RAW data is RAW mode data generated by the image sensor at the time of shooting in the digital camera, and is not an image. In general, an image output by a digital camera is generated from RAW data by setting parameters such as a gamma value, brightness, color, and white balance. This process is generally called “development”. The parameters listed above cannot be set arbitrarily with development software released so far. Therefore, for example, as shown in FIG. 19, no color change is observed in the shadow area or the sky area. So, here in developing software free license of "dcraw" that can process the RAW data directly ( "RAW Digital Photo Decoding in Linux ", http: //www.cybercom.net/ ~ dcoffin / dcraw /) using the . When dcraw is used, two images having different brightness can be developed as shown in FIGS.

それに続く頻度画像の作成、ブレンド比の作成、ブレンド比マップの作成、ブレンド比マップのスムージングは、上述の「露出の補正方法−1」の場合と同様である。以下、ブレンド比マップのスムージングの具体例について説明する。ここでは、上述のように、スムージングを、2枚の画像の平均画像より検出したエッジを参考に行う。上述のように、平均画像は、単にブレンドする2枚の画像の同じ位置の画素のRGBの値を加算し、2で除して得られるRGBの値によって画像を構成したものである。図20、21の画像の平均画像を図22に示す。図22に対してPrewittオペレータを適用してエッジを検出した結果を図23に示す。図23はグレースケール画像であり、黒いところほど勾配の急なエッジである。よって、このエッジの急峻さに対応したガウシアンフィルタのσを決めればよい。   Subsequent generation of a frequency image, creation of a blend ratio, creation of a blend ratio map, and smoothing of the blend ratio map are the same as in the case of “Exposure correction method-1” described above. Hereinafter, a specific example of smoothing of the blend ratio map will be described. Here, as described above, smoothing is performed with reference to the edge detected from the average image of the two images. As described above, the average image is obtained by simply adding the RGB values of the pixels at the same position in the two images to be blended and dividing the result by 2 to form an image. An average image of the images of FIGS. 20 and 21 is shown in FIG. FIG. 23 shows the result of detecting edges by applying the Prewitt operator to FIG. FIG. 23 is a grayscale image, where the black part is a sharper edge. Therefore, the σ of the Gaussian filter corresponding to the sharpness of the edge may be determined.

以上の処理により図20、21に示す画像をブレンドした結果とそのときのブレンド比マップとを、それぞれ図24、25に示す。また、スムージングしない場合のブレンド比マップを図26に、σの変化の様子を色により確認できる分布図を図27に示す。ブレンド結果ではノイズや不自然な境界はなく、σの分布図ではエッジ付近でσが小さくなっていることが確認できる。   The result of blending the images shown in FIGS. 20 and 21 by the above processing and the blend ratio map at that time are shown in FIGS. 24 and 25, respectively. Further, FIG. 26 shows a blend ratio map when smoothing is not performed, and FIG. 27 shows a distribution chart in which the state of change of σ can be confirmed by color. There is no noise or unnatural boundary in the blend result, and it can be confirmed that σ is small near the edge in the distribution diagram of σ.

(複数枚の明るさの異なる画像を用いたブレンド比マップの作成)
2枚の画像をブレンドすることによって露出の補正を行った図24のブレンド結果は初見では不自然だと感じることはないが、原画像と共に見ると人物の左肩にある影が不自然である。これはブレンドする2枚の画像の明るさに差があるため、オーバー気味な画像において飛んでいる領域の面積が増え、頻度が極度に大きくなりブレンドに無理が生じたためである。そこで、最適なブレンド比マップを作成する方法について説明する。
(Create a blend ratio map using multiple images with different brightness)
The blending result of FIG. 24 in which the exposure is corrected by blending two images does not feel unnatural at first glance, but the shadow on the left shoulder of the person is unnatural when viewed together with the original image. This is because there is a difference in the brightness of the two images to be blended, so that the area of the flying region in the overexposed image is increased, the frequency becomes extremely high, and the blending becomes impossible. Therefore, a method for creating an optimum blend ratio map will be described.

これには、上述の「中間画像の利用」の場合と同様に、実際にブレンドする2枚の画像だけではなく、その中間の明るさの画像を用いる。具体的には、アンダー気味な画像と中間の明るさの画像とをブレンドしたときに得られるブレンド比マップ数枚と、図25に示したブレンド比マップとの平均画像を作成し、これをブレンド比マップとする。この処理を図28に示す。このとき、前記したブレンド比マップのスムージングは、作成される最適なブレンド比マップに対してのみ適用する。これは処理時間を短縮するためである。なお、ブレンドに用いるRGB値は、最も明るさの離れた2枚の画像のデータを用いる。図28の場合は図中の左側および右下の明るさ1の画像と明るさ2.5の画像である。図20、21に示す画像において、3枚のブレンド比マップからブレンド比マップを作成してブレンドした結果と、そのときのブレンド比マップを、それぞれ図29、30に示す。人物の左肩の影もなくなりより良い結果が得られている。   For this purpose, as in the case of “use of intermediate image” described above, not only two images to be actually blended but also an image having an intermediate brightness is used. Specifically, an average image of several blend ratio maps obtained by blending an under-ish image and an intermediate brightness image and the blend ratio map shown in FIG. 25 is created and blended. A ratio map is used. This process is shown in FIG. At this time, the smoothing of the blend ratio map described above is applied only to the optimum blend ratio map to be created. This is to shorten the processing time. Note that the RGB values used for blending are data of two images that are the most distant from each other. In the case of FIG. 28, an image with brightness 1 and an image with brightness 2.5 on the left and lower right in the figure. In the images shown in FIGS. 20 and 21, the blend ratio map created from the three blend ratio maps and blended are shown in FIGS. 29 and 30, respectively. The shadow of the person's left shoulder disappears and better results are obtained.

なお、上述のように複数のブレンド比マップの平均画像を作成することに代えて、たとえばこれら複数の各ブレンド比マップにそれぞれ適宜の係数を乗じたものを加算して新たなブレンド比マップとするなどの、適宜の手法を用いることもできる。   Instead of creating an average image of a plurality of blend ratio maps as described above, for example, a plurality of blend ratio maps multiplied by appropriate coefficients are added to form a new blend ratio map. It is also possible to use an appropriate method such as.

(高速化アルゴリズム)
このRAWデータを用いて処理を行う場合も、同様に、原画像より縮小した縮小画像を作成する。この縮小画像を原画像としてブレンド比マップを作成し、得られたブレンド比マップを原画像のサイズに拡大し、この拡大したブレンド比マップを用いて露出補正画像を作成することができ、これによって処理の高速化を図ることができる。
(Acceleration algorithm)
Similarly, when processing is performed using the RAW data, a reduced image reduced from the original image is created. Using this reduced image as the original image, a blend ratio map can be created, and the resulting blend ratio map can be enlarged to the size of the original image, and this enlarged blend ratio map can be used to create an exposure compensation image. Processing speed can be increased.

(処理のフローチャート)
以上の処理をフローチャートで表したものを図31に示す。この処理は、以下の各工程を含む。
(Process flowchart)
FIG. 31 shows the above processing in a flowchart. This process includes the following steps.

(a)画像情報を取得する工程、
(b)露出アンダー(I)及び露出オーバー(I)の各1枚の画像と、中間の露出のN枚(但し、Nは0又は1以上の自然数)の画像とをRGB表色系で作成する工程、
(c)重みテーブルを用いて、L表色系の性質を持つRGB表色系のカラーヒストグラムを作成する工程、
(d)IとIの頻度画像を作成する工程、
(e)IとIの平均画像Iを作成し、Iの急峻さを検出して位置可変のガウシアンフィルタのパラメータを決定する工程、
(f)各画素毎にブレンド比を決定し、ガウシアンフィルタを用いて補正されたブレンド比マップを作成する工程、
(g)各画像におけるRGB値のY/C分離を行う工程、
(h)Y成分及びC成分毎にブレンド比を用いて合成画像を作成する工程、
(i)Y成分及びC成分からRGB表色系へ変換する工程、
(j)画像表示(最終画像)を得る工程、
(A) acquiring image information;
(B) An RGB color system using one image each of underexposed (I u ) and overexposed (I o ) and intermediately exposed N images (where N is a natural number of 0 or 1). The process to create in
(C) creating an RGB color system color histogram having L * a * b * color system properties using a weight table;
(D) creating a frequency image of I u and I o ;
(E) creating an average image I m of I u and I o , detecting steepness of I m and determining parameters of a position-variable Gaussian filter;
(F) determining a blend ratio for each pixel and creating a corrected blend ratio map using a Gaussian filter;
(G) a step of performing Y / C separation of RGB values in each image;
(H) creating a composite image using a blend ratio for each of the Y component and the C component;
(I) a step of converting the Y component and the C component into an RGB color system;
(J) obtaining an image display (final image);

(具体例)
本発明の有効性を検証するために、露出の不適正な領域と適正な領域が混在する画像を取得し、実験を行った。実験に用いた画像は、ディジタルカメラCanon EOS D30のRAWモードにて撮影し、サイズを半分にして現像した1088×724[pixel]のRGB各8bitのフルカラー画像である。処理はAthlon XP 2500+のCPU、512MB RAMのメモリを搭載したパーソナルコンピュータを用いて行った。処理時間は、画像によって差はあるが、約2.5(min)であった。
(Concrete example)
In order to verify the effectiveness of the present invention, an image in which an improperly exposed area and an appropriate area are mixed was acquired and experimented. The image used in the experiment is a 1088 × 724 [pixel] RGB 8-bit full-color image captured in the RAW mode of the digital camera Canon EOS D30 and developed in half. The processing was performed using a personal computer equipped with an Athlon XP 2500+ CPU and 512 MB RAM memory. The processing time was about 2.5 (min) although there were differences depending on the images.

実験の処理対象となる各2枚の原画像を、図32と33、および図36と37にそれぞれ示す。市販現像ソフトにより現像した結果を図34および38に示し、一方、本発明の方法によって露出の不適正な領域を補正した画像を図35および39に示す。   Two original images to be processed in the experiment are shown in FIGS. 32 and 33 and FIGS. 36 and 37, respectively. FIGS. 34 and 38 show the results of development using commercially available development software, while FIGS. 35 and 39 show images obtained by correcting areas with inappropriate exposure by the method of the present invention.

実験の結果、図32に示す露出アンダー気味の画像では室内が逆光によりつぶれており、図33に示す露出オーバー気味の画像では窓の外の風景が飛んでおり、それぞれ確認できなくなっている。図34の画像は市販ソフトによる現像結果であるが、室内はつぶれており、空の領域にも色の変化が見られない。   As a result of the experiment, in the underexposed image shown in FIG. 32, the room is crushed by backlight, and in the overexposed image shown in FIG. 33, the scenery outside the window is flying and cannot be confirmed. The image in FIG. 34 is the result of development by commercially available software, but the room is crushed and no color change is seen in the empty area.

また別な実験結果である図36に示す画像では、左側半分に影があり暗くなっている。また図37では影の領域は見やすい明るさになっているが、それ以外の領域が飛んでいる。これらを市販ソフトによって補正した図38に示す現像結果は、全体的に暗く見にくい画像となっている。   In the image shown in FIG. 36, which is another experimental result, the left half is shaded and dark. In FIG. 37, the shadow area is bright enough to be seen, but other areas are flying. The development results shown in FIG. 38 in which these are corrected by commercially available software are images that are generally dark and difficult to see.

これらに対し、本発明のカラー画像の露出補正方法を適用した実験結果を示す図35の画像は、室内外とも様子が良く確認できる画像となっている。また本発明にもとづく別の実験結果を示す図39の画像は、露出の不適正な領域はなく、視覚的に自然に影の領域の露出が補正できていることが分かる。   On the other hand, the image of FIG. 35 which shows the experimental result to which the color image exposure correction method of the present invention is applied is an image that can be confirmed well both indoors and outdoors. Further, it can be seen that the image of FIG. 39 showing another experimental result based on the present invention does not have an improperly exposed area, and the exposure of the shadow area can be corrected visually and naturally.

以上詳述したように、本発明のカラー画像の露出補正方法によると、逆光や影などの明るい領域と暗い領域が混在するシーンのある画像から、実際に人の肉眼で自然に見えるように、露出の不適正な領域のない視覚的に自然な画像を得ることができる。   As described above in detail, according to the color image exposure correction method of the present invention, from an image with a scene in which bright areas and dark areas such as backlight and shadow are mixed, so that it actually looks natural to the human eye, It is possible to obtain a visually natural image without an inappropriate area of exposure.

なお、上述の「露出の補正方法−1」において説明した手法と、「露出の補正方法−2」において説明した手法とは、それぞれの補正方法において可能な範囲で相互に利用することができる。   It should be noted that the method described in “Exposure correction method-1” and the method described in “Exposure correction method-2” can be mutually used as much as possible in each correction method.

本発明の原理を説明するための、段階的に露出の異なる画像群の例を示す図である。It is a figure which shows the example of the image group from which exposure differs in steps for demonstrating the principle of this invention. 図1の画像群のためのシーンの拡大図である。FIG. 2 is an enlarged view of a scene for the image group of FIG. 1. 図1における要部の拡大図である。It is an enlarged view of the principal part in FIG. 図3の領域をRGBカラーヒストグラム空間にプロットした図である。FIG. 4 is a diagram in which the region of FIG. 3 is plotted in an RGB color histogram space. 本発明にもとづく頻度画像を説明する図である。It is a figure explaining the frequency image based on this invention. 図3の頻度画像を示す図である。It is a figure which shows the frequency image of FIG. 図1の要部の平均頻度の変化を示す図である。It is a figure which shows the change of the average frequency of the principal part of FIG. 本発明にもとづく頻度画像の作成手順を説明する図である。It is a figure explaining the creation procedure of the frequency image based on this invention. 本発明にもとづく、RGB表色系を用いたカラーヒストグラムにL表色系の性質を持たせるための具体的な手順を説明する図である。It is a figure explaining the specific procedure for giving the property of L * a * b * color system to the color histogram using RGB color system based on this invention. 本発明にもとづく、ガウシアンフィルタのσ値による重みの形を示す図である。It is a figure which shows the form of the weight by (sigma) value of a Gaussian filter based on this invention. 本発明の露出補正方法を実施するための原画像の一例を示す図である。It is a figure which shows an example of the original image for enforcing the exposure correction method of this invention. 図11における前景部分の最適露出画像を示す図である。It is a figure which shows the optimal exposure image of the foreground part in FIG. 図11の画像についての頻度画像を示す図である。It is a figure which shows the frequency image about the image of FIG. 図12の画像についての頻度画像を示す図である。It is a figure which shows the frequency image about the image of FIG. 前景部分と背景部分とのブレンド比マップの画像である。It is an image of the blend ratio map of a foreground part and a background part. ブレンド結果を示す図である。It is a figure which shows a blend result. 中間画像を利用する例を説明する図である。It is a figure explaining the example using an intermediate image. 縮小画像を作成することによる高速化アルゴリズムを説明する図である。It is a figure explaining the speed-up algorithm by producing a reduced image. 本発明の露出補正方法を実施するための、ある実写画像についての、市販品の現像ソフトでの現像結果を示す図である。It is a figure which shows the image development result by the developing software of a commercial item about a certain real image for implementing the exposure correction method of this invention. 同実写画像についての現像ソフトによる明るさ1の画像を示す図である。It is a figure which shows the image of the brightness 1 by the development software about the same photographed image. 同実写画像についての現像ソフトによる明るさ2.5の画像を示す図である。It is a figure which shows the image of the brightness 2.5 by the development software about the same photographed image. 図20の画像と図21の画像の平均画像を示す図である。It is a figure which shows the average image of the image of FIG. 20, and the image of FIG. Prewittオペレータによる図22のエッジ検出画像を示す図である。It is a figure which shows the edge detection image of FIG. 22 by a Prewitt operator. 図20と図21の画像のブレンドとスムージングとの結果を表す画像を示す図である。It is a figure which shows the image showing the result of the blend and smoothing of the image of FIG. 20 and FIG. 図24の画像を得るために用いたブレンド比マップを示す図である。It is a figure which shows the blend ratio map used in order to obtain the image of FIG. 図20と図21の画像の、スムージングしないブレンド比マップを示す図である。It is a figure which shows the blend ratio map which does not smooth of the image of FIG. 20 and FIG. ガウシアンフィルタにおけるσの変化を画像上に表した、σの分布図である。FIG. 6 is a distribution diagram of σ showing changes in σ in a Gaussian filter on an image. 本発明にもとづく最適なブレンド比マップの作成方法を説明する概念図である。It is a conceptual diagram explaining the preparation method of the optimal blend ratio map based on this invention. 本発明にもとづき明るさの異なる複数枚の画像を用いたブレンド結果を表す画像を示す図である。It is a figure which shows the image showing the blend result using the several image from which brightness differs based on this invention. 図29の画像を得るために用いたブレンド比マップを示す図である。It is a figure which shows the blend ratio map used in order to obtain the image of FIG. 本発明の露出補正方法の一例のフローチャートである。It is a flowchart of an example of the exposure correction method of this invention. 他の実写画像であって、露出アンダー気味の原画像を示す図である。It is a figure which is another actual image and is an original image of the under-exposure. 図32と同じ対象についての実写画像であって、露出オーバー気味の原画像を示す図である。FIG. 33 is a photographed image of the same target as that in FIG. 32 and showing an overexposed original image. 図32および図33の対象についての市販ソフトによる現像結果を表す画像を示す図である。It is a figure which shows the image showing the image development result by the commercial software about the object of FIG. 32 and FIG. 図32および図33の対象についての本発明の方法による現像結果を表す画像を示す図である。It is a figure which shows the image showing the image of the image development by the method of this invention about the object of FIG. さらに他の実写画像であって、露出アンダー気味の原画像を示す図である。It is a figure which is another actual image and is an original image of the underexposure. 図36と同じ対象についての実写画像であって、露出オーバー気味の原画像を示す図である。FIG. 37 is a photographed image of the same target as in FIG. 36 and showing an overexposed original image. 図36および図37の対象についての市販ソフトによる現像結果を表す画像を示す図である。It is a figure which shows the image showing the image development result by the commercial software about the object of FIG. 図36および図37の対象についての本発明の方法による現像結果を表す画像を示す図である。It is a figure which shows the image showing the image development result by the method of this invention about the object of FIG. 36 and FIG.

Claims (10)

同一シーンについて露出を変えて複数枚のカラー画像系列を取得し、これら複数枚のカラー画像系列における2枚のカラー画像について画像の各部分ごとに色の出現頻度の比を求め、前記各部分において、前記色の出現頻度の比にしたがって頻度の小さい方が頻度の大きい方よりも多くブレンドされるようなブレンド比を求め、画像全体についてブレンド比マップを作成し、このブレンド比マップにしたがって前記2枚のカラー画像を前記各部分ごとにブレンドして1枚の露出補正画像を作成することを特徴とするカラー画像の露出補正方法。 A plurality of color image series is obtained by changing the exposure for the same scene, and a ratio of color appearance frequency is obtained for each part of the image for two color images in the plurality of color image series . In accordance with the ratio of the appearance frequencies of the colors, a blend ratio is determined such that a smaller frequency is blended more than a larger frequency, and a blend ratio map is created for the entire image. An exposure correction method for a color image, wherein one exposure correction image is created by blending one color image for each portion . 元のカラー画像のカラー値をその色の出現頻度に置き換えた第1の頻度画像と、この第1の頻度画像の頻度値に人間が差を感じない色の重みを大きくした係数を乗じて得られる第2の頻度画像とのいずれかを用いて、ブレンド比マップを作成することを特徴とする請求項1記載のカラー画像の露出補正方法。   Obtained by multiplying the frequency value of the first frequency image by replacing the color value of the original color image with the appearance frequency of the color and the frequency value of the first frequency image multiplied by a coefficient that increases the weight of the color that humans do not feel a difference. The color image exposure correction method according to claim 1, wherein a blend ratio map is created using any one of the second frequency images. 原画像の暗い部分を明るくするように露出を補正した露出オーバー画像と、原画像を前記露出オーバー画像の色数に近くなるように補正した露出アンダー画像との2枚の補正画像を作成して用いることを特徴とする請求項1または2記載のカラー画像の露出補正方法。   Two corrected images are created: an overexposed image in which exposure is corrected so that dark portions of the original image are brightened, and an underexposed image in which the original image is corrected to be close to the number of colors of the overexposed image. 3. The color image exposure correction method according to claim 1, wherein the color image exposure correction method is used. 原画像を前景部分と背景部分とに分け、前記原画像の前景部分を明るくするように露出を補正して露出オーバー画像を作成するとともに、原画像または原画像を露出補正した画像を露出アンダー画像とすることを特徴とする請求項3記載のカラー画像の露出補正方法。   The original image is divided into a foreground portion and a background portion, and an overexposure image is created by correcting exposure so that the foreground portion of the original image is brightened. The color image exposure correction method according to claim 3, wherein: 露出アンダー画像と露出オーバー画像の中間の明るさの画像を1枚または複数枚作成し、これら中間の明るさの画像および露出アンダー画像からなる複数枚の画像のそれぞれにおける色の出現頻度と、露出オーバー画像における色の出現頻度との比を用いて複数枚のブレンド比マップを作成し、これら複数枚のブレンド比マップから新たなブレンド比マップを作成することを特徴とする請求項3または4記載のカラー画像の露出補正方法。   Create one or more images with intermediate brightness between underexposed and overexposed images, and the frequency of color appearance and exposure for each of the images with intermediate brightness and underexposed images. 5. The blend ratio map of a plurality of sheets is created using a ratio with the appearance frequency of the color in the over image, and a new blend ratio map is created from the blend ratio map of the plurality of sheets. Color image exposure compensation method. 画像のRAWデータを用いて、明るさの異なる2枚の画像を現像し、この2枚の画像を用いることを特徴とする請求項1または2記載のカラー画像の露出補正方法。   3. The color image exposure correction method according to claim 1, wherein two images having different brightness are developed using RAW data of the image, and the two images are used. 明るさの異なる明るい画像と暗い画像のほかに、中間の明るさの画像を1枚または複数枚現像し、前記中間の明るさの画像および前記暗い画像からなる複数枚の画像のそれぞれにおける色の出現頻度と、前記明るい画像における色の出現頻度との比を用いて複数枚のブレンド比マップを作成し、これら複数枚のブレンド比マップから新たなブレンド比マップを作成することを特徴とする請求項6記載のカラー画像の露出補正方法。   In addition to a bright image and a dark image having different brightness, one or a plurality of intermediate brightness images are developed, and the color of each of the plurality of images including the intermediate brightness image and the dark image is changed. A plurality of blend ratio maps are created using a ratio between an appearance frequency and a color appearance frequency in the bright image, and a new blend ratio map is created from the plurality of blend ratio maps. Item 7. A color image exposure correction method according to Item 6. ブレンド比マップをエッジの画像におけるそのエッジの強度に応じたガウシアンフィルタによりスムージングすることにより、エッジ付近の平滑度を小さくし、エッジ以外の平滑度を大きくした新たなブレンド比マップを作成することを特徴とする請求項1から7までのいずれか1項記載のカラー画像の露出補正方法。 By smoothing the blend ratio map with a Gaussian filter according to the edge intensity in the edge image, the smoothness near the edge is reduced, and a new blend ratio map is created in which the smoothness other than the edge is increased. 8. The color image exposure correction method according to claim 1, wherein the color image exposure is corrected. RGB表色系にて作成された2枚のカラー画像のそれぞれから、Ycc表色系などの人間の知覚にもとづく表色系に変換した画像を作成し、これらの変換された2つの画像をブレンド比マップにしたがってブレンドして1枚の画像を作成し、この画像を元のRGB表色系に変換してカラー画像を作成することを特徴とする請求項1から8までのいずれか1項記載のカラー画像の露出補正方法。   From each of the two color images created in the RGB color system, an image converted to a color system based on human perception such as the Ycc color system is created, and the two converted images are blended. 9. The method according to claim 1, wherein a single image is created by blending according to a ratio map, and a color image is created by converting the image into an original RGB color system. Color image exposure compensation method. 原画像からそのサイズを小さくした縮小画像を作成し、作成した縮小画像から縮小サイズのブレンド比マップを作成し、この縮小サイズのブレンド比マップより元のサイズに拡大したブレンド比マップを作成して用いることを特徴とする請求項1から9までのいずれか1項記載のカラー画像の露出補正方法。   Create a reduced image with a reduced size from the original image, create a reduced size blend ratio map from the created reduced image, and create a blend ratio map enlarged to the original size from this reduced size blend ratio map 10. The color image exposure correction method according to claim 1, wherein the color image exposure correction method is used.
JP2005342982A 2004-12-01 2005-11-29 Color image exposure compensation method Active JP4359662B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005342982A JP4359662B2 (en) 2004-12-01 2005-11-29 Color image exposure compensation method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004347925 2004-12-01
JP2005342982A JP4359662B2 (en) 2004-12-01 2005-11-29 Color image exposure compensation method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2009119369A Division JP5050141B2 (en) 2004-12-01 2009-05-18 Color image exposure evaluation method

Publications (2)

Publication Number Publication Date
JP2006186983A JP2006186983A (en) 2006-07-13
JP4359662B2 true JP4359662B2 (en) 2009-11-04

Family

ID=36739691

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005342982A Active JP4359662B2 (en) 2004-12-01 2005-11-29 Color image exposure compensation method

Country Status (1)

Country Link
JP (1) JP4359662B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4797039B2 (en) * 2008-03-27 2011-10-19 日本電信電話株式会社 Image composition method and apparatus
JP6202238B2 (en) * 2012-02-27 2017-09-27 カシオ計算機株式会社 Image processing apparatus, image processing method, and program
CN107852453B (en) 2015-07-10 2020-06-23 深圳市大疆创新科技有限公司 Dual lens system with beam splitter
CN112070692B (en) * 2020-08-26 2023-10-20 西安理工大学 Single backlight image enhancement method based on virtual exposure

Also Published As

Publication number Publication date
JP2006186983A (en) 2006-07-13

Similar Documents

Publication Publication Date Title
US9852499B2 (en) Automatic selection of optimum algorithms for high dynamic range image processing based on scene classification
EP2624204B1 (en) Image processing apparatus and method of controlling the same
Phillips et al. Camera image quality benchmarking
JP4208909B2 (en) Image processing device and photographing device
Boitard et al. Temporal coherency for video tone mapping
CN108668093A (en) The generation method and device of HDR image
JP2010220184A (en) Dark space exposure compensation method for simulating high dynamic range by single image and image processor employing the same
US8665348B2 (en) Image processing apparatus and method using forward and inverse local adaptation processing and dynamic range processing
US8861849B2 (en) Image processing
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
JP2018006912A (en) Imaging apparatus, image processing apparatus, and control method and program of the same
WO2012015020A1 (en) Method and device for image enhancement
JP2016086246A (en) Image processing apparatus and method, and imaging device
WO2008102296A2 (en) Method for enhancing the depth sensation of an image
JP4359662B2 (en) Color image exposure compensation method
US9092889B2 (en) Image processing apparatus, image processing method, and program storage medium
CN113450266A (en) Image processing apparatus, image processing system, and image processing method
JP5050141B2 (en) Color image exposure evaluation method
JP6627530B2 (en) Image processing device and program
CN110246086A (en) The image processing method and its image processing system of color image enhancement
JP7277156B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
CN115689903A (en) Image processing method and device, equipment and storage medium
JP4445026B2 (en) Image processing method, apparatus, and program
Lakshmi et al. Analysis of tone mapping operators on high dynamic range images
JP2005004582A (en) Image processing apparatus, image processing program, and electronic camera

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080430

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080617

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090317

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090518

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090609

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090707

R150 Certificate of patent or registration of utility model

Ref document number: 4359662

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120821

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120821

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150821

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250