JP2012133462A - Image processing method, image processing program, image processing apparatus and imaging apparatus - Google Patents

Image processing method, image processing program, image processing apparatus and imaging apparatus Download PDF

Info

Publication number
JP2012133462A
JP2012133462A JP2010283188A JP2010283188A JP2012133462A JP 2012133462 A JP2012133462 A JP 2012133462A JP 2010283188 A JP2010283188 A JP 2010283188A JP 2010283188 A JP2010283188 A JP 2010283188A JP 2012133462 A JP2012133462 A JP 2012133462A
Authority
JP
Japan
Prior art keywords
color
flare
component
area
image
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.)
Granted
Application number
JP2010283188A
Other languages
Japanese (ja)
Other versions
JP5163735B2 (en
Inventor
Kentaro Hikosaka
健太郎 彦坂
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Corp filed Critical Nikon Corp
Priority to JP2010283188A priority Critical patent/JP5163735B2/en
Priority to US13/073,372 priority patent/US8989436B2/en
Priority to CN201110083636.3A priority patent/CN102236896B/en
Publication of JP2012133462A publication Critical patent/JP2012133462A/en
Application granted granted Critical
Publication of JP5163735B2 publication Critical patent/JP5163735B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To accurately extract influence of a color flare from the color flare occurrence region in a captured image.SOLUTION: An image processing method comprises: an input step of inputting a color image to be processed having been captured by a photographic optical system; a determination step (S191) of determining whether or not color correction has been conducted on a color flare occurrence region in the image to be processed; a restoration step (S192-S195) of restoring a color distribution in the occurrence region to a state prior to the color correction when it is determined that the color correction has been conducted on the occurrence region; and a flare estimation step of estimating influence of the color flare on the occurrence region on the basis of the restored color distribution in the occurrence region.

Description

本発明は、撮影画像からフレアの情報を抽出する画像処理方法、画像処理プログラム、画像処理装置、及び撮像装置に関する。   The present invention relates to an image processing method, an image processing program, an image processing apparatus, and an imaging apparatus that extract flare information from a captured image.

回折光学素子(DOE:Diffractive Optical Element)を有する撮影光学系で撮影を行う際、極めて高輝度な物体(輝点)が撮影画角内に存在していた場合には、撮影画像上の輝点像の周辺に色滲みを伴うフレア(色フレア)が発生する。この色フレアは無色のフレアと比較すると著しく不自然である。   When photographing with a photographing optical system having a diffractive optical element (DOE), if an extremely bright object (bright spot) exists within the field angle, the bright spot on the photographed image Flares with color blur (color flare) occur around the image. This color flare is significantly unnatural compared to the colorless flare.

因みに、特許文献1には、撮影光学系の結像特性データを予め記憶し、そのデータと、撮影画像上の輝点の位置とに基づきフレア成分を推定し、それを撮影画像から除去する電子カメラが開示されている。   Incidentally, in Patent Document 1, image formation characteristic data of a photographing optical system is stored in advance, a flare component is estimated based on the data and the position of a bright spot on the photographed image, and an electronic device that removes it from the photographed image. A camera is disclosed.

特許第4250513号公報Japanese Patent No. 4250513

しかしながら、JPEG画像などの通常の撮影画像には現像処理が施されていることも多いので、結像特性データが仮に既知であったとしても、フレア成分の推定に失敗する可能性がある。   However, since a normal captured image such as a JPEG image is often subjected to development processing, there is a possibility that flare component estimation may fail even if the imaging characteristic data is known.

そこで本発明は、撮影画像における色フレアの発生領域から、その色フレアの影響を正確に抽出することの可能な画像処理方法、画像処理プログラム、画像処理装置、及び撮像装置を提供する。   Therefore, the present invention provides an image processing method, an image processing program, an image processing apparatus, and an imaging apparatus capable of accurately extracting the influence of the color flare from the color flare occurrence area in the photographed image.

本発明の画像処理方法の一態様は、撮影光学系により取得されたカラーの処理対象画像を入力する入力手順と、前記処理対象画像上の色フレアの発生領域に色補正が施されているか否かを判別する判別手順と、前記発生領域に色補正が施されていた場合には、前記発生領域の色分布を色補正前の状態に復元する復元手順と、前記色フレアが前記発生領域に与えた影響を、復元後の前記発生領域の色分布に基づき推定するフレア推定手順と、を含む。   According to one aspect of the image processing method of the present invention, an input procedure for inputting a color processing target image acquired by a photographing optical system and whether or not a color flare generation area on the processing target image is subjected to color correction. And a restoration procedure for restoring the color distribution of the generation area to a state before color correction when the generation area has been subjected to color correction, and the color flare in the generation area. And a flare estimation procedure for estimating the applied influence based on the color distribution of the generated area after restoration.

本発明の画像処理プログラムの一態様は、撮影光学系により取得されたカラーの処理対象画像を入力する入力手順と、前記処理対象画像上の色フレアの発生領域に色補正が施されているか否かを判別する判別手順と、前記発生領域に色補正が施されていた場合には、前記発生領域の色分布を色補正前の状態に復元する復元手順と、前記色フレアが前記発生領域に与えた影響を、復元後の前記発生領域の色分布に基づき推定するフレア推定手順と、をコンピュータに実行させる。   According to one aspect of the image processing program of the present invention, an input procedure for inputting a color processing target image acquired by a photographing optical system, and whether or not color correction is performed on a color flare generation area on the processing target image. And a restoration procedure for restoring the color distribution of the generation area to a state before color correction when the generation area has been subjected to color correction, and the color flare in the generation area. And causing the computer to execute a flare estimation procedure for estimating the applied influence based on the color distribution of the generated area after restoration.

本発明の画像処理装置の一態様は、撮影光学系により取得されたカラーの処理対象画像を入力する入力手段と、前記処理対象画像上の色フレアの発生領域に色補正が施されているか否かを判別する判別手段と、前記発生領域に色補正が施されていた場合には、前記発生領域の色分布を色補正前の状態に復元する復元手段と、前記色フレアが前記発生領域に与えた影響を、復元後の前記発生領域の色分布に基づき推定するフレア推定手段と、を備える。   According to an aspect of the image processing apparatus of the present invention, color correction is performed on an input unit that inputs a color processing target image acquired by a photographing optical system and a color flare generation area on the processing target image. Determination means for determining whether or not color generation has been performed on the generation area, restoration means for restoring the color distribution of the generation area to a state before color correction, and the color flare in the generation area. Flare estimation means for estimating the applied effect based on the color distribution of the generated area after restoration.

本発明の撮像装置の一態様は、撮影光学系が結像した被写体像を撮像する撮像素子と、本発明の画像処理装置の一態様と、を備える。   One aspect of the imaging apparatus of the present invention includes an imaging element that captures a subject image formed by a photographing optical system, and one aspect of the image processing apparatus of the present invention.

本発明によれば、撮影画像における色フレアの発生領域から、その色フレアの影響を正確に抽出することの可能な画像処理方法、画像処理プログラム、画像処理装置、及び撮像装置が実現する。   According to the present invention, an image processing method, an image processing program, an image processing apparatus, and an imaging apparatus that can accurately extract the influence of a color flare from a color flare occurrence region in a captured image are realized.

第1実施形態の画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus of 1st Embodiment. CPU14によるフレア色成分除去処理の動作フローチャートである。4 is an operation flowchart of flare color component removal processing by a CPU. 色補正成分抽出処理部22による色補正成分抽出処理のフローチャートである。4 is a flowchart of color correction component extraction processing by a color correction component extraction processing unit 22; フレア色成分抽出処理部21によるフレア抽出処理のフローチャートである。4 is a flowchart of flare extraction processing by a flare color component extraction processing unit 21. 入力画像の例である。It is an example of an input image. 検出された高輝度領域の例である。It is an example of the detected high-intensity area | region. フレアに起因した高輝度領域(飽和領域)の例である。It is an example of the high-intensity area | region (saturation area | region) resulting from a flare. ラベリングされた飽和領域の例である。It is an example of a labeled saturation region. 飽和領域Sとフレア領域Aと処理領域A’との関係を説明する図である。It is a figure explaining the relationship between saturation area | region Si , flare area | region Ai, and process area | region Ai '. 彩度強調前の或る処理領域A’の画素プロファイルと、彩度強調後の同じ処理領域A’の画素プロファイルとを比較する図である。It is a figure which compares the pixel profile of a certain process area A i ′ before saturation enhancement with the pixel profile of the same process area A i ′ after saturation enhancement. 基準画像の作成手順を説明する模式図である。It is a schematic diagram explaining the preparation procedure of a reference | standard image. 色補正成分の抽出手順を説明する模式図である。It is a schematic diagram explaining the extraction procedure of a color correction component. 二値のマスク画像を説明する図である。It is a figure explaining a binary mask image. グレースケールマスク画像を説明する図である。It is a figure explaining a gray scale mask image. 処理領域A’のR成分(フレア色成分有り)とG成分との関係を示す図である。It is a figure which shows the relationship between R component (with a flare color component) and G component of process area | region Ai '. フレア色成分の抽出手順を説明する模式図である。It is a schematic diagram explaining the extraction procedure of a flare color component. 処理領域A’のR成分(フレア色成分無し)とG成分との関係を示す図である。It is a figure which shows the relationship between R component (there is no flare color component) and G component of process area | region Ai '. 色補正成分の抽出手順の変形例を説明する模式図である。It is a schematic diagram explaining the modification of the extraction procedure of a color correction component. 第2実施形態の電子カメラの構成例を示すブロック図である。It is a block diagram which shows the structural example of the electronic camera of 2nd Embodiment.

[第1実施形態]
以下、本発明の第1実施形態を説明する。
[First Embodiment]
Hereinafter, a first embodiment of the present invention will be described.

図1は、本実施形態の画像処理装置の構成例を示すブロック図である。本実施形態の画像処理装置は、画像処理プログラムがインストールされたコンピュータ11で構成される。   FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to the present embodiment. The image processing apparatus according to this embodiment includes a computer 11 in which an image processing program is installed.

図1に示すコンピュータ11は、データ読込部12、記憶装置13、CPU14、メモリ15および入出力I/F16、バス17を有している。データ読込部12、記憶装置13、CPU14、メモリ15および入出力I/F16は、バス17を介して相互に接続されている。さらに、コンピュータ11には、入出力I/F16を介して、入力デバイス18(キーボード、ポインティングデバイスなど)とモニタ19とがそれぞれ接続されている。なお、入出力I/F16は、入力デバイス18からの各種入力を受け付けるとともに、モニタ19に対して表示用のデータを出力する。   A computer 11 illustrated in FIG. 1 includes a data reading unit 12, a storage device 13, a CPU 14, a memory 15, an input / output I / F 16, and a bus 17. The data reading unit 12, the storage device 13, the CPU 14, the memory 15, and the input / output I / F 16 are connected to each other via a bus 17. Further, an input device 18 (keyboard, pointing device, etc.) and a monitor 19 are connected to the computer 11 via an input / output I / F 16. The input / output I / F 16 receives various inputs from the input device 18 and outputs display data to the monitor 19.

データ読込部12は、画像処理対象となる画像データを外部から読み込むときに用いられる。例えば、データ読込部12は、データ読込部12に挿入された記憶媒体から画像データを取得する読込デバイス(光ディスクドライブ、磁気ディスクドライブ、光磁気ディスクドライブなど)や、公知の通信規格に準拠して外部の装置と通信を行う通信デバイス(USBインターフェース、LANモジュール、無線LANモジュールなど)で構成される。   The data reading unit 12 is used when reading image data to be subjected to image processing from the outside. For example, the data reading unit 12 conforms to a reading device (such as an optical disk drive, a magnetic disk drive, or a magneto-optical disk drive) that acquires image data from a storage medium inserted into the data reading unit 12 or a known communication standard. It is composed of communication devices (USB interface, LAN module, wireless LAN module, etc.) that communicate with external devices.

記憶装置13は、例えば、ハードディスクや、不揮発性の半導体メモリなどの記憶媒体で構成される。この記憶装置13には、画像処理プログラムが記録されている。なお、記憶装置13には、データ読込部12から読み込まれた画像データを記憶しておくこともできる。   The storage device 13 is configured by a storage medium such as a hard disk or a nonvolatile semiconductor memory. The storage device 13 stores an image processing program. The storage device 13 can also store image data read from the data reading unit 12.

CPU14は、記憶装置13に記憶された画像処理プログラムを実行し、コンピュータ11の各部を統括的に制御するプロセッサである。ここで、本実施形態の画像処理プログラムにはフレア色成分除去処理の機能が搭載されており、フレア色成分除去処理を実行する際、CPU14は、各部を制御する制御部として機能する他に、フレア色成分抽出処理部21、色補正成分抽出処理部22としても機能する(フレア色成分抽出処理部21、色補正成分抽出処理部22の動作は後述する)。   The CPU 14 is a processor that executes an image processing program stored in the storage device 13 and comprehensively controls each unit of the computer 11. Here, the image processing program of the present embodiment has a function of flare color component removal processing, and when executing the flare color component removal processing, the CPU 14 functions as a control unit that controls each unit. It also functions as a flare color component extraction processing unit 21 and a color correction component extraction processing unit 22 (the operations of the flare color component extraction processing unit 21 and the color correction component extraction processing unit 22 will be described later).

メモリ15は、画像処理プログラムでの各種演算結果を一時的に記憶する。このメモリ15は、例えば揮発性のSDRAMなどで構成される。   The memory 15 temporarily stores various calculation results in the image processing program. The memory 15 is composed of, for example, a volatile SDRAM.

図2は、CPU14によるフレア色成分除去処理の動作フローチャートである。以下、各ステップを順に説明する。   FIG. 2 is an operation flowchart of flare color component removal processing by the CPU 14. Hereinafter, each step will be described in order.

ステップS11:CPU14は、ユーザがフレア色成分除去処理の対象として指定したカラー画像の画像データを、メモリ15上に読み込む(以下、これを「入力画像」と称す。)。この入力画像は、例えば、データ読込部12の記憶媒体に書き込まれていた画像である。   Step S11: The CPU 14 reads image data of a color image designated as a target of flare color component removal processing by the user onto the memory 15 (hereinafter referred to as “input image”). This input image is an image written in the storage medium of the data reading unit 12, for example.

ここで、入力画像は、色フレアの発生した画像である。色フレアの発生した画像は、DOEを含む撮影光学系で撮影された画像であって、例えば図5に示すとおりである(但し、図5はモノクロ画像なので、色フレアの色付きは現れていない。)。色フレアは通常、輪帯状又はそれに近いパターンをしているが、そのパターンは完全な輪帯状になるとは限らず、撮影条件(画像の撮影に使用された撮影光学系の結像特性、撮影時に画角内に存在していた輝点の波長スペクトルなど)に依存する。また、色フレアの色づき分布(フレア色成分)も、撮影条件に依存する。   Here, the input image is an image in which color flare has occurred. The image in which the color flare is generated is an image taken by the photographing optical system including the DOE, for example, as shown in FIG. 5 (however, since FIG. 5 is a monochrome image, the color flare is not colored. ). The color flare usually has a zonal pattern or a pattern close to it, but the pattern does not always form a complete zonal pattern, and the shooting conditions (imaging characteristics of the photographic optical system used to shoot the image, It depends on the wavelength spectrum of the bright spot that existed in the angle of view. The color flare distribution (flare color component) also depends on the shooting conditions.

しかし、本実施形態のフレア色成分除去処理は色フレアのパターン及び色付き分布が未知であっても実行可能であるので、入力画像には、撮影条件データが付随していなくても構わない。   However, since the flare color component removal processing of this embodiment can be executed even when the color flare pattern and the distribution with color are unknown, the input image may not be accompanied by the shooting condition data.

ステップS12:CPU14は、メモリ15上へ読み込んだ入力画像に対してサイズ縮小処理を施す。以下、サイズ縮小後の入力画像を「縮小画像」と称す。なお、入力画像に対してサイズ縮小処理を施すのは、続くステップS13〜S19、S23の演算負荷を軽減するためである。   Step S12: The CPU 14 performs size reduction processing on the input image read into the memory 15. Hereinafter, the input image after size reduction is referred to as a “reduced image”. The reason why the size reduction process is performed on the input image is to reduce the calculation load of subsequent steps S13 to S19 and S23.

ステップS13:CPU14は、縮小画像の各画素の輝度を所定値(ここでは飽和レベルとする。)と比較することにより、輝度が所定値を超過するような明るい領域(高輝度領域)を縮小画像から検出する(図6参照)。図6に示すとおり、検出された高輝度領域の中には、フレアに起因した高輝度領域だけでなく、フレアとは無関係な高輝度領域も混在している可能性がある。   Step S13: The CPU 14 compares a brightness of each pixel of the reduced image with a predetermined value (here, a saturation level), thereby reducing a bright area (high brightness area) where the luminance exceeds the predetermined value. (See FIG. 6). As shown in FIG. 6, the detected high luminance area may include not only a high luminance area caused by flare but also a high luminance area unrelated to flare.

なお、本ステップでは演算負荷を軽減するため、各画素の輝度の指標として、各画素の輝度値(R、G、Bの重み付け和)を使用する代わりに、各画素の各色成分の和(R、G、Bの和)を使用してもよい。或いは、各画素の輝度の指標として、各画素を代表する色成分の値(G強度)を使用してもよい。また、このような演算負荷の軽減方法は、画素の輝度を扱う他のステップでも採用することができる。   In this step, in order to reduce the calculation load, instead of using the luminance value (R, G, B weighted sum) of each pixel as an index of the luminance of each pixel, the sum of each color component (R , G, B) may be used. Alternatively, a color component value (G intensity) representing each pixel may be used as an index of luminance of each pixel. Further, such a method of reducing the calculation load can be employed in other steps for handling the luminance of the pixel.

ステップS14:CPU14は、ステップS13で検出された高輝度領域の各々がフレアに起因したものであるか否かを判別し、フレアに起因したもの以外を排除する(図7参照。)。   Step S14: The CPU 14 determines whether or not each of the high luminance areas detected in step S13 is caused by flare, and excludes those other than those caused by flare (see FIG. 7).

なお、個々の高輝度領域がフレアに起因したものであるか否かの判定は、例えば次のとおり行われる。すなわち、CPU14は、高輝度領域と予め用意した円形パターンとを比較し、両者の相関度が一定以上である場合には、その高輝度領域をフレアに起因したものとみなし、相関度が一定未満である場合には、その高輝度領域をフレアに起因したものではないとみなす。なお、比較対象となる円形パターンとしては、フレアに起因した高輝度領域として平均的なものを使用すればよい。   For example, the determination as to whether or not each high-luminance region is caused by flare is performed as follows. That is, the CPU 14 compares the high luminance area with a circular pattern prepared in advance, and if the correlation between the two is greater than or equal to a certain level, the CPU 14 regards the high luminance area as being caused by flare and the correlation is less than a certain level If it is, the high brightness area is not considered to be caused by flare. As a circular pattern to be compared, an average pattern may be used as a high luminance area caused by flare.

或いは、個々の高輝度領域がフレアに起因したものであるか否かの判定は、次のとおり行われてもよい。すなわち、CPU14は、高輝度領域の中心から所定半径を有した円形領域を設定し、その円形領域の全域に高輝度領域が存在していた場合には、その高輝度領域をフレアに起因したものとみなし、円形領域の少なくとも1部が高輝度領域から外れていた場合には、その高輝度領域をフレアに起因したものではないとみなす。なお、円形領域の半径は、フレアに起因した高輝度領域として最も小さいものの半径と同程度に設定される。   Alternatively, the determination as to whether or not each high brightness area is caused by flare may be performed as follows. That is, the CPU 14 sets a circular area having a predetermined radius from the center of the high luminance area, and when there is a high luminance area in the entire circular area, the high luminance area is caused by the flare. If at least a part of the circular area is out of the high luminance area, the high luminance area is not attributed to flare. Note that the radius of the circular region is set to be approximately the same as the radius of the smallest high-luminance region caused by flare.

したがって、本ステップで除外されなかった高輝度領域は、フレアの中心部における飽和領域に相当する。以下、本ステップで除外されなかった高輝度領域を、単に「飽和領域」と称す。   Therefore, the high luminance area that is not excluded in this step corresponds to a saturated area in the center of the flare. Hereinafter, the high luminance area that is not excluded in this step is simply referred to as “saturated area”.

ステップS15:CPU14は、ステップS14で検出された1又は複数の飽和領域に対してラベリングを行い、通し番号(フレア番号i=1、2、…)を付与する(図8参照)。これによって、入力画像に発生しているフレアの総数(すなわち、フレア番号iの最終値)が確定する。   Step S15: The CPU 14 labels the one or more saturated regions detected in step S14 and assigns serial numbers (flare numbers i = 1, 2,...) (See FIG. 8). As a result, the total number of flares occurring in the input image (that is, the final value of the flare number i) is determined.

ステップS16:CPU14は、フレア番号iを初期値(1)に設定する。   Step S16: The CPU 14 sets the flare number i to an initial value (1).

ステップS17:CPU14は、図9に示すとおり、縮小画像上でフレア番号iに対応する飽和領域Sに着目すると、飽和領域Sの輝度重心に相当する座標gを算出し、座標gから飽和領域Sの輪郭までの平均距離を飽和領域Sの半径rとして算出する。さらに、CPU14は、縮小画像上で座標gを中心とし、かつ半径が(α×r)である円形領域を、フレア番号iに対応したフレア領域Aに設定する(但し、α>1)。 Step S17: As shown in FIG. 9, when focusing on the saturation region S i corresponding to the flare number i on the reduced image, the CPU 14 calculates a coordinate g i corresponding to the luminance center of gravity of the saturation region S i and coordinates g i the average distance from to the contour of the saturation region S i is calculated as the radius r i of the saturation region S i. Further, CPU 14 is centered on the coordinates g i on the reduced image, and radius of the circular area is (α × r i), set to the flare region A i corresponding to the flare number i (where, alpha> 1 ).

ここで仮に、フレア領域Aに発生しているフレアが色フレアであった場合、図9の斜線部で示す領域にフレア色成分が重畳されると考えられる。 Here if, when the flare is generated in the flare region A i was color flare believed flare color component is superimposed on the region indicated by hatched portion in FIG.

さらに、CPU14は、縮小画像上でフレア領域Aの全体を包含し、かつ一定のマージンγを持った包含領域を、フレア番号iに対応した処理領域A’に設定する(但し、γ>0)。 Furthermore, the CPU 14 sets the inclusion area that includes the entire flare area A i on the reduced image and has a certain margin γ as the processing area A i ′ corresponding to the flare number i (where γ> 0).

なお、ここでは、処理領域A’のサイズをフレア番号i毎に設定したが、処理領域A’がフレア領域Aを包含できるのであれば、処理領域A’のサイズを全てのフレア番号iの間で共通としてもよい。また、処理領域A’の形状は、円形でも矩形でも構わない。また、処理領域A’の中心は、フレア領域Aの中心から外れていても構わない。また、ここでは、飽和領域Sの輝度重心を座標gとしたが、演算負荷を軽減するために、飽和領域Sの中心を座標gとしてもよい。 Here, 'although the size of the set for each flare number i, the processing area A i' processing area A i if the can include a flared region A i, all flare size of the processing area A i ' It may be common among the numbers i. Further, the shape of the processing area A i ′ may be circular or rectangular. Further, the center of the processing area A i ′ may be deviated from the center of the flare area A i . Further, here, the luminance center of the saturation region S i and a coordinate g i, in order to reduce the computational load, the center of the saturation region S i may coordinate g i.

ステップS18:CPU14は、フレア番号iに対応するフレア領域Aに着目すると、そのフレア領域Aに発生しているフレアが色フレアであるか否かを判別し、色フレアであった場合は、処理領域A’に関する色補正成分抽出処理及びフレア色抽出処理を実行するべくステップS19へ移行し、色フレアでなかった場合は、処理領域A’に関する色補正成分抽出処理及びフレア色成分抽出処理を省略するべく、ステップS26へ移行する。 Step S18: When paying attention to the flare area A i corresponding to the flare number i, the CPU 14 determines whether or not the flare generated in the flare area A i is a color flare. , the processing area a i 'goes to step S19 in order to execute a color correction component extraction process and flare color extracting process related, if not the color flare, the processing area a i' color correction component extraction processing related and flare color component In order to omit the extraction process, the process proceeds to step S26.

ここで、フレア領域Aに発生しているフレアが色フレアであるか否かの判別は、例えば次のとおり行われる。すなわちCPU14は、フレア領域Aの平均値を色成分毎に(RGB別に)算出し、それら平均値の色成分間のばらつきが所定範囲を超過していた場合には、フレア領域Aのフレアは色フレアであるとみなし、超過していなかった場合には、そのフレアは色フレアではない(無色のフレアである)とみなす。 Here, the determination as to whether or not the flare occurring in the flare area A i is a color flare is performed as follows, for example. That is, the CPU 14 calculates the average value of the flare area A i for each color component (for each RGB), and if the variation between the color components of the average value exceeds the predetermined range, the flare of the flare area A i is calculated. Is considered to be a color flare, and if not exceeded, the flare is not a color flare (a colorless flare).

ステップS19:CPU14は、フレア番号iに対応する処理領域A’に対して色補正成分抽出処理を施すよう色補正成分抽出処理部22へ指示を与える。色補正成分抽出処理部22は、色補正成分抽出処理を実行し、処理領域A’に対して予め施されていた色補正(彩度強調処理、色バランス調整、色変換処理など)の色補正成分を推定する。なお、本ステップで推定される色補正成分は、1色又は2色の色補正成分からなる。本ステップの詳細は、後述する。 Step S19: The CPU 14 instructs the color correction component extraction processing unit 22 to perform color correction component extraction processing on the processing area A i ′ corresponding to the flare number i. The color correction component extraction processing unit 22 executes color correction component extraction processing, and performs color correction (saturation emphasis processing, color balance adjustment, color conversion processing, etc.) previously applied to the processing area A i ′. Estimate the correction component. The color correction component estimated in this step is composed of one or two color correction components. Details of this step will be described later.

ステップS20:CPU14は、ステップS19で推定された色補正成分(1色又は2色の色補正成分)を、処理領域A’から減算する。これによって、処理領域A’の色が、色補正前の状態に復元される。 Step S20: The CPU 14 subtracts the color correction component (one color or two color correction components) estimated in step S19 from the processing area A i ′. As a result, the color of the processing area A i ′ is restored to the state before the color correction.

ステップS21:CPU14は、ステップS19で推定された色補正成分(1色又は2色の色補正成分)へサイズ拡大処理を施す。なお、前述したステップS12のサイズ縮小処理で入力画像のサイズを1/M倍にした場合、本ステップにおけるサイズ拡大処理では色補正成分(1色又は2色の色補正成分)のサイズをM倍にする。よって、本ステップでは、入力画像に対応するサイズの色補正成分(1色又は2色の色補正成分)が取得される。   Step S21: The CPU 14 performs size enlargement processing on the color correction component (one color or two color correction components) estimated in step S19. When the size of the input image is reduced to 1 / M times in the size reduction process in step S12 described above, the size of the color correction component (one color correction component or two color correction components) is increased M times in the size enlargement process in this step. To. Therefore, in this step, a color correction component having a size corresponding to the input image (one color or two color correction components) is acquired.

ステップS22:CPU14は、サイズ拡大処理後の色補正成分(1色又は2色の色補正成分)を、入力画像上で処理領域A’に対応する領域から減算する。但し、減算に当たりCPU14は、縮小画像上の座標gと前述した倍率Mとに基づき、座標gに対応する入力画像上の座標g’を求め、その座標g’に対して色補正成分(1色又は2色の色補正成分)の中心を一致させておく。これによって、入力画像上で処理領域A’に対応する領域の色が、色補正前の状態に復元される。 Step S22: The CPU 14 subtracts the color correction component (one color correction component or two color correction components) after the size enlargement process from the area corresponding to the processing area A i ′ on the input image. However, in the subtraction, the CPU 14 obtains a coordinate g i ′ on the input image corresponding to the coordinate g i based on the coordinate g i on the reduced image and the magnification M described above, and performs color correction on the coordinate g i ′. The centers of the components (one color correction component or two color correction components) are matched. As a result, the color of the area corresponding to the processing area A i ′ on the input image is restored to the state before color correction.

ステップS23:CPU14は、フレア番号iに対応する処理領域A’(復元後の処理領域A’)に対してフレア色成分抽出処理を施すようフレア色成分抽出処理部21へ指示を与える。フレア色成分抽出処理部21は、フレア色成分抽出処理を実行し、処理領域A’に発生しているフレア色成分を推定する。なお、本ステップで推定されるフレア色成分は、2色のフレア色成分からなる。本ステップの詳細は、後述する。 Step S23: The CPU 14 instructs the flare color component extraction processing unit 21 to perform the flare color component extraction processing on the processing area A i ′ (restored processing area A i ′) corresponding to the flare number i. The flare color component extraction processing unit 21 executes the flare color component extraction process and estimates the flare color component generated in the processing area A i ′. The flare color component estimated in this step is composed of two flare color components. Details of this step will be described later.

ステップS24:CPU14は、ステップS23で推定されたフレア色成分(2色のフレア色成分)へサイズ拡大処理を施す。なお、前述したステップS12のサイズ縮小処理で入力画像のサイズを1/M倍にした場合、本ステップにおけるサイズ拡大処理ではフレア色成分(2色分のフレア色成分)のサイズをM倍にする。よって、本ステップでは、入力画像に対応するサイズのフレア色成分(2色のフレア色成分)が取得される。   Step S24: The CPU 14 performs size enlargement processing on the flare color components (two flare color components) estimated in step S23. When the size of the input image is 1 / M times in the size reduction process in step S12 described above, the size of the flare color component (flare color components for two colors) is increased M times in the size enlargement process in this step. . Therefore, in this step, flare color components of a size corresponding to the input image (two flare color components) are acquired.

ステップS25:CPU14は、サイズ拡大処理後のフレア色成分(2色のフレア色成分)を、入力画像(復元後の入力画像)上で処理領域A’に対応する領域から減算する。但し、減算に当たりCPU14は、縮小画像上の座標gと前述した倍率Mとに基づき、座標gに対応する入力画像上の座標g’を求め、その座標g’に対してフレア色成分(2色のフレア色成分)の中心を一致させておく。これによって、入力画像上で処理領域A’に対応する領域に発生していた色フレアのフレア色成分が除去される。つまり、その領域に発生していた色フレアは、無色のフレアとなる。 Step S25: The CPU 14 subtracts the flare color components after the size enlargement process (two flare color components) from the area corresponding to the processing area A i ′ on the input image (the input image after restoration). However, in the subtraction, the CPU 14 obtains the coordinate g i ′ on the input image corresponding to the coordinate g i based on the coordinate g i on the reduced image and the magnification M described above, and the flare color with respect to the coordinate g i ′. The centers of the components (two flare color components) are made to coincide. As a result, the flare color component of the color flare generated in the area corresponding to the processing area A i ′ on the input image is removed. That is, the color flare generated in the area is a colorless flare.

ステップS26:CPU14は、フレア番号iが最終値に達したか否かを判別し、達していなかった場合はステップS27へ移行し、達していた場合はステップS28へ移行する。   Step S26: The CPU 14 determines whether or not the flare number i has reached the final value. If the flare number i has not been reached, the process proceeds to step S27, and if it has reached, the process proceeds to step S28.

ステップS27:CPU14は、フレア番号iをインクリメントしてからステップS17へ移行する。したがって、全てのフレア番号の色補正成分及びフレア色成分が、入力画像から順次に除去されることになる。   Step S27: The CPU 14 increments the flare number i and then proceeds to step S17. Therefore, the color correction components and flare color components of all flare numbers are sequentially removed from the input image.

ステップS28:CPU14は、色補正成分及びフレア色成分の除去された入力画像(以下、「最終画像」と称す。)をモニタ19へ表示する。その後、ユーザから保存指示が入力された場合には、最終画像をユーザが指定した保存先(例えば、データ読込部12に挿入された記憶媒体)へ保存し、フローを終了する。   Step S28: The CPU 14 displays the input image from which the color correction component and the flare color component are removed (hereinafter referred to as “final image”) on the monitor 19. Thereafter, when a save instruction is input from the user, the final image is saved in a save destination designated by the user (for example, a storage medium inserted in the data reading unit 12), and the flow ends.

図3は、色補正成分抽出処理部22による色補正成分抽出処理のフローチャートである。以下、各ステップを順に説明する。   FIG. 3 is a flowchart of color correction component extraction processing by the color correction component extraction processing unit 22. Hereinafter, each step will be described in order.

ステップS191:色補正成分抽出処理部22は、フレア番号iに対応するフレア領域Aの各色成分(R成分、G成分、B成分)を参照すると、そのフレア領域Aの中に色補正画素が存在するか否かを判別し、色補正画素が少なくとも1つ存在する場合には、色補正成分抽出処理を実行するべくステップS192へ移行し、色補正画素が1つも存在しない場合には色補正成分抽出処理のフローを終了する。 Step S191: When the color correction component extraction processing unit 22 refers to each color component (R component, G component, B component) of the flare area A i corresponding to the flare number i, the color correction pixel is included in the flare area A i. If there is at least one color correction pixel, the process proceeds to step S192 to execute the color correction component extraction process. If there is no color correction pixel, color is detected. The flow of the correction component extraction process is terminated.

ここで、色補正画素とは、色補正前のフレア領域Aの画素としては不自然な色を有した画素のことである。以下、色補正が彩度強調であった場合を想定して説明する。 Here, the color correction pixel is a pixel having an unnatural color as a pixel of the flare area A i before color correction. Hereinafter, the case where the color correction is saturation enhancement will be described.

図10(A)は、彩度強調前の或る処理領域A’の画素プロファイル(中心線上の画素プロファイル)であり、図10(B)は、彩度強調後の同じ処理領域A’の画素プロファイルである。この処理領域A’に施された彩度強調は、G成分及びB成分をR成分に比して相対的に強調するための彩度強調である。 10A shows a pixel profile (pixel profile on the center line) of a certain processing area A i ′ before saturation enhancement, and FIG. 10B shows the same processing area A i ′ after saturation enhancement. This is a pixel profile. The saturation enhancement applied to the processing area A i ′ is saturation enhancement for enhancing the G component and the B component relative to the R component.

図10(A)に示すとおり、彩度強調前の処理領域A’には、全色成分がノイズレベルT1以上となった画素しか存在していないのに対し、図10(B)に示すとおり、彩度強調後の処理領域A’には、R成分がノイズレベルT1未満となった画素が発生している。しかも、そのような画素の少なくとも一部の画素は、G成分とB成分との少なくとも一方が飽和レベルT2に達している。このように、少なくとも1つの色成分が飽和レベルT2に達しており、かつ他の少なくとも1つの色成分がノイズレベルT1未満となっているような画素が、色補正画素である。 As shown in FIG. 10A, in the processing area A i ′ before saturation enhancement, there are only pixels in which all color components are equal to or higher than the noise level T1, whereas FIG. As described above, pixels in which the R component is less than the noise level T1 are generated in the processing region A i ′ after saturation enhancement. In addition, in at least some of the pixels, at least one of the G component and the B component reaches the saturation level T2. Thus, a pixel in which at least one color component has reached the saturation level T2 and the other at least one color component is less than the noise level T1 is a color correction pixel.

因みに、色補正画素が発生するのは、図10(B)に示すとおり、フレア領域Aの内側かつ飽和領域Sの外側の領域であって、この領域は、フレア色成分の重畳された領域に相当する。なぜなら、この領域の多くの画素のG成分及びB成分は、彩度強調前の時点で飽和レベルT2に達していたので、彩度強調では、そのような画素のG成分及びB成分を相対的に強調するために、R成分の値をノイズレベルT1以下に押し下げる必要があったからである。このような色補正画素は、処理領域A’に色フレアが発生していたからこそ発生するものである。 Incidentally, as shown in FIG. 10B, the color correction pixel is generated in the area inside the flare area A i and outside the saturation area S i , and this area is superimposed with the flare color component. Corresponds to the area. This is because the G component and B component of many pixels in this region have reached the saturation level T2 at the time before saturation enhancement. This is because it was necessary to push the value of the R component below the noise level T1 in order to emphasize it. Such a color correction pixel is generated because color flare is generated in the processing area A i ′.

但し、色補正画素を含んだままの処理領域A’に対して後述するフレア色成分抽出処理を施しても、フレア色成分を正しく推測できない虞があるので、本実施形態では、色補正成分を予め抽出・除去しておく必要がある。 However, even if the flare color component extraction process described later is performed on the processing area A i ′ that includes the color correction pixel, the flare color component may not be correctly estimated. Must be extracted and removed in advance.

ステップS192:色補正成分抽出処理部22は、フレア領域Aから全ての色補正画素を検出し、その中から、ノイズレベルT1未満となった画素の個数を色成分毎に(RGB別に)算出し、その個数が一定以上(ここではゼロ以上とする。)である1又は2つの色成分を見出し、その1又は2つの色成分を、補正対象色成分に定める。なお、図10に示した例では、R成分のみが補正対象色成分に定められる。以下では、補正対象色成分がR成分のみであったと仮定する。 Step S192: The color correction component extraction processing unit 22 detects all color correction pixels from the flare area A i, and calculates the number of pixels having a noise level less than T1 from the flare area A i for each color component (for each RGB). Then, one or two color components having a certain number or more (here, zero or more) are found, and the one or two color components are determined as correction target color components. In the example shown in FIG. 10, only the R component is determined as the correction target color component. In the following, it is assumed that the correction target color component is only the R component.

ステップS193:色補正成分抽出処理部22は、図11(A)の左側に示すとおり処理領域A’のR成分に着目し、そのR成分のうち周辺と比較して値の低い領域のみを平滑化することにより、図11(B)に示すような基準画像I”を作成する。この基準画像I”は、色補正成分の算出基準として使用される。ここで、基準画像I”の作成は、図11(A)→図11(B)に示す手順によって行うことができる。 Step S193: The color correction component extraction processing unit 22 pays attention to the R component of the processing area A i ′ as shown on the left side of FIG. By smoothing, a reference image I R ″ as shown in FIG. 11B is created. This reference image I R ″ is used as a reference for calculating a color correction component. Here, the creation of the reference image I R ″ can be performed by the procedure shown in FIG. 11 (A) → FIG. 11 (B).

すなわち、色補正成分抽出処理部22は、先ず、図11(A)の左側に示したR成分Iを、ガウシアンフィルタなどの平滑化フィルタで空間的に平滑化することにより、図11(B)に示すようなR成分I’を取得する。この平滑化によると、周辺と比較して値の低い領域(点線枠部分)の画素値は、平滑化前よりも高めになり、周辺と比較して値の高い領域の画素値は、平滑化前よりも低めになる。続いて、色補正成分抽出処理部22は、平滑化前後の2つのR成分I、I’を画素毎に比較し、値の高かった方の画素を集めて1枚の合成画像を作成し、その合成画像を基準画像I”とする(図11(B))。この基準画像I”は、元のR成分Iにおいて周辺と比較して値の低かった領域(点線枠部分)のみを平滑化したものに相当する。 That is, the color correction component extraction unit 22, first, the R component I R shown on the left side in FIG. 11 (A), by spatially smoothed by smoothing filter such as a Gaussian filter, FIG. 11 (B R component I R ′ as shown in FIG. According to this smoothing, the pixel value of the region having a low value (dotted line frame portion) compared to the surrounding area is higher than that before the smoothing, and the pixel value of the region having a high value compared to the surrounding region is smoothed. Lower than before. Subsequently, the color correction component extraction processing unit 22 compares the two R components I R and I R ′ before and after smoothing for each pixel, and collects the pixels with the higher value to create one composite image. Then, the synthesized image is set as a reference image I R ″ (FIG. 11B). This reference image I R ″ is an area (dotted line frame portion) whose value is lower than that of the periphery in the original R component I R. ) Only.

ステップS194:色補正成分抽出処理部22は、図12(A)に示すとおり、元のR成分Iから基準画像I”を差し引くことにより、図12(B)に示すような色補正成分Iを算出する。但し、ここで算出された色補正成分Iには、高周波数の誤差が残存している。 Step S194: As shown in FIG. 12A, the color correction component extraction processing unit 22 subtracts the reference image I R ″ from the original R component I R to obtain a color correction component as shown in FIG. I D is calculated, however, a high frequency error remains in the color correction component I D calculated here.

ステップS195:色補正成分抽出処理部22は、色補正成分Iをガウシアンフィルタなどの平滑化フィルタで空間的に平滑化することにより、図12(C)に示すような色補正成分Iを算出する。この色補正成分Iが、R成分に関する色補正成分である。 Step S195: The color correction component extraction processing unit 22 spatially smoothes the color correction component ID with a smoothing filter such as a Gaussian filter, thereby obtaining a color correction component I C as shown in FIG. calculate. The color correction component I C is the color correction component for R component.

ステップS196:色補正成分抽出処理部22は、色補正成分Iの推定が、全ての補正対象色成分について完了したか否かを判別し、完了していなかった場合にはステップS193へ戻り、残った補正対象色成分に関する推定を行い、完了していた場合には、図3のフローを終了する(以上、ステップS196)。 Step S196: The color correction component extraction processing unit 22 determines whether or not the estimation of the color correction component I C has been completed for all the correction target color components. If not, the process returns to Step S193. When the remaining correction target color components are estimated and completed, the flow in FIG. 3 is terminated (step S196).

図4は、フレア色成分抽出処理部21によるフレア抽出処理のフローチャートである。以下、各ステップを順に説明する。   FIG. 4 is a flowchart of flare extraction processing by the flare color component extraction processing unit 21. Hereinafter, each step will be described in order.

ステップS231:フレア色成分抽出処理部21は、フレア番号iに対応する復元後のフレア領域Aの平均値を色成分毎に(RGB別に)算出し、平均値が最小であった1つの色成分を、基準色成分に定める。以下、G成分が基準色成分に設定されたと仮定する。その場合、フレア色成分の推定は、G成分以外の色成分、すなわちR成分及びB成分の各々に関して行われる。 Step S231: The flare color component extraction processing unit 21 calculates an average value of the restored flare area A i corresponding to the flare number i for each color component (for each RGB), and one color whose average value is the smallest The component is defined as a reference color component. Hereinafter, it is assumed that the G component is set as the reference color component. In this case, the flare color component is estimated for each color component other than the G component, that is, each of the R component and the B component.

ステップS232:フレア色成分抽出処理部21は、フレア番号iに対応したマスク画像を作成する。マスク画像は、図13に示すとおり、処理領域A’と同形同サイズのマスク画像であって、フレア領域Aに対応する領域に開口部を設けた二値のマスク画像である。さらに、フレア色成分抽出処理部21は、そのマスク画像を、ガウシアンフィルタなどの平滑化フィルタで空間的に平滑化することにより、図14に示すようなグレースケールマスク画像を作成する。グレースケールマスク画像は、二値のマスク画像において、開口部と非開口部との境界のコントラストを意図的に低下させたものに相当する。このグレースケールマスク画像の単位面積当たりの平均値は、処理領域A’の中央から周辺に向かって低下している。 Step S232: The flare color component extraction processing unit 21 creates a mask image corresponding to the flare number i. As shown in FIG. 13, the mask image is a mask image having the same shape and size as the processing area A i ′, and a binary mask image in which an opening is provided in the area corresponding to the flare area A i . Further, the flare color component extraction processing unit 21 creates a gray scale mask image as shown in FIG. 14 by spatially smoothing the mask image with a smoothing filter such as a Gaussian filter. The gray scale mask image corresponds to a binary mask image in which the contrast of the boundary between the opening and the non-opening is intentionally reduced. The average value per unit area of the gray scale mask image decreases from the center to the periphery of the processing area A i ′.

なお、本ステップで使用される平滑化フィルタのサイズ(フィルタ径)は、フレア領域Aのサイズが大きいときほど大きく設定されることが望ましい。 Note that the size of the smoothing filter (filter diameter) used in this step is desirably set larger as the flare area A i is larger.

ステップS233:フレア色成分抽出処理部21は、基準色成分(ここではG成分)以外の1つの色成分を着目色成分に設定する。以下、R成分が着目色成分に設定されたと仮定する。図15は、或る処理領域A’のR成分と、同じ処理領域A’のG成分との関係を示す図(画素プロファイル)である。図15に示すとおり、R成分においては、フレア領域Aの内側かつ飽和領域Sの外側の領域に、フレア色成分が重畳されている。つまり、その領域のR成分は、同じ領域のG成分と比較して著しく高い値となっている。 Step S233: The flare color component extraction processing unit 21 sets one color component other than the reference color component (here, the G component) as the target color component. Hereinafter, it is assumed that the R component is set as the target color component. FIG. 15 is a diagram (pixel profile) showing the relationship between the R component of a certain processing area A i ′ and the G component of the same processing area A i ′. As shown in FIG. 15, in the R component, a flare color component is superimposed on a region inside the flare region A i and outside the saturation region S i . That is, the R component in that region is significantly higher than the G component in the same region.

本ステップのフレア色成分抽出処理部21は、処理領域A’のR成分を処理領域A’のG成分で画素毎に除算することにより、G成分を基準としたR成分の相関色分布画像IGRを作成する。図16(A)の左側に示すのは、相関色分布画像IGRの模式図である。 Flare color component extraction section 21 of this step, by dividing each pixel in the G component of the 'R component of the processing area A i' processing area A i, correlated color distribution of the R component relative to the G component Create an image IGR . A schematic diagram of the correlated color distribution image IGR is shown on the left side of FIG.

ここで、相関色分布画像IGRの中央領域aの多くの画素は、1に近い画素値を有しており、中央領域aの周辺に位置するリング状領域bの多くの画素は、1よりも高い画素値を有しており、リング状領域bの外側に位置する最周辺領域cの多くの画素は、リング状領域bよりも低い画素値を有している。このうち、中央領域aは、図15に示した飽和領域Sに対応しており、リング状領域bは、図15に示したフレア領域Aの内側かつ飽和領域Sの外側の領域、すなわち、フレア色成分の重畳された領域に対応している。 Here, many pixels in the central region a of the correlated color distribution image IGR have pixel values close to 1, and many pixels in the ring-shaped region b located around the central region a are more than 1. And many pixels in the outermost peripheral region c located outside the ring-shaped region b have lower pixel values than the ring-shaped region b. Among these, the central region a corresponds to the saturation region S i shown in FIG. 15, and the ring-shaped region b is a region inside the flare region A i and outside the saturation region S i shown in FIG. That is, it corresponds to a region where flare color components are superimposed.

ステップS234:フレア色成分抽出処理部21は、相関色分布画像IGRのうち、周辺と比較して値の低い領域(中央領域a及び最周辺領域c)のみを平滑化することにより、図16(B)に示すような相関色分布画像IGR”を取得する。なお、相関色分布画像IGR”の取得は、図16(A)→図16(B)に示す手順によって行うことができる。 Step S234: The flare color component extraction processing unit 21 smoothes only the regions (the central region a and the most peripheral region c) whose values are lower than those in the periphery in the correlated color distribution image IGR . The correlated color distribution image IGR "as shown in (B) is acquired. The acquisition of the correlated color distribution image IGR " can be performed by the procedure shown in FIG. 16 (A) → FIG. 16 (B). .

すなわち、フレア色成分抽出処理部21は、先ず、図16(A)の左側に示した相関色分布画像IGRの全体を、ガウシアンフィルタなどの平滑化フィルタで空間的に平滑化することにより、図16(A)の右側に示すような相関色分布画像IGR’を取得する。この平滑化によると、周辺と比較して値の低い領域の値は、平滑化前よりも高めになり、周辺と比較して値の高い領域の値は、平滑化前よりも低めになる。続いて、フレア色成分抽出処理部21は、平滑化前後の2つの相関色分布画像IGR、IGR’を画素毎に比較し、値の高かった方の画素を集めて1枚の合成画像を作成し、その合成画像を相関色分布画像IGR”とする(図16(B))。この相関色分布画像IGR”は、元の相関色分布画像IGRにおいて、フレア色成分の重畳されていなかった領域(点線枠部分)のみを平滑化したものに相当する。 That is, the flare color component extraction processing unit 21 first spatially smoothes the entire correlated color distribution image IGR shown on the left side of FIG. 16A with a smoothing filter such as a Gaussian filter. A correlated color distribution image I GR ′ as shown on the right side of FIG. According to this smoothing, the value of the region having a low value compared to the surroundings is higher than that before the smoothing, and the value of the region having a high value compared to the surroundings is lower than that before the smoothing. Subsequently, the flare color component extraction processing unit 21 compares the two correlated color distribution images I GR and I GR ′ before and after smoothing for each pixel, collects the pixels having the higher value, and forms one composite image. And the synthesized image is set as a correlated color distribution image I GR ″ (FIG. 16B). This correlated color distribution image I GR ″ is a superposition of flare color components in the original correlated color distribution image I GR . This corresponds to a smoothed area (dotted line frame portion) that has not been performed.

ステップS235:フレア色成分抽出処理部21は、相関色分布画像IGR”に対して最小値フィルタ等による収縮処理を施すことにより、相関色分布画像IGR”において周辺と比較して値の高い領域の面積を収縮し、図16(C)に示すような相関色分布画像Iを取得する。さらに、フレア色成分抽出処理部21は、相関色分布画像Iをガウシアンフィルタなどの平滑化フィルタで空間的に平滑化することにより、図16(D)に示すような相関色分布画像I’を取得する。この相関色分布画像I’は、元の相関色分布画像IGRにおいてフレア色成分の重畳されていた領域を周辺の領域(点線枠部分)によって補間したものに相当する。 Step S235: flare color component extracting unit 21 "by performing contraction processing by the minimum value filter or the like to the correlated color distribution image I GR" correlated color distribution image I GR high values as compared to peripheral in shrink the area of the region, to obtain a correlated color distribution image I H as shown in FIG. 16 (C). Furthermore, flare color component extracting unit 21, by spatially smoothing the correlated color distribution image I H smoothing filter such as a Gaussian filter, correlated color as shown in FIG. 16 (D) distribution image I H 'Get. This correlated color distribution image I H ′ corresponds to an image obtained by interpolating the area where the flare color component is superimposed in the original correlated color distribution image I GR with the surrounding area (dotted line frame portion).

ステップS236:フレア色成分抽出処理部21は、処理領域A’の基準色成分(ここではG成分)に対して相関色分布画像I’を画素毎に乗算することにより、フレア色成分の除去されたR成分IRnewを算出する。これによって、処理領域A’からR成分に関するフレア色成分が除去されたことになる。なお、図17は、除去後の処理領域A’の画素プロファイルである。 Step S236: The flare color component extraction processing unit 21 multiplies the correlation color distribution image I H ′ for each pixel by the reference color component (G component in this case) of the processing area A i ′ to thereby calculate the flare color component. The removed R component I Rnew is calculated. As a result, the flare color component related to the R component is removed from the processing area A i ′. FIG. 17 is a pixel profile of the processing area A i ′ after removal.

この図17を図15と比較すれば明らかなとおり、除去後には、フレア色成分の重畳されていた領域(フレア領域Aの内側かつ飽和領域Sの外側の領域)のR強度は、同じ領域のG強度に近づけられているのがわかる。また、除去後には、フレア色成分の重畳されていた領域のR/G強度は、フレア領域Aの外側の領域のR/G強度と、飽和領域Sの内側のR/G強度とによって補間されているのがわかる。また、除去後には、フレア色成分の重畳されていた領域のR強度分布形状は、同じ領域のG強度分布形状に対応した形状となっているのがわかる。 As apparent from a comparison of FIG. 17 with FIG. 15, after removal, the R intensity of the region where the flare color component is superimposed (the region inside the flare region A i and outside the saturation region S i ) is the same. It can be seen that it is close to the G intensity of the region. After the removal, the R / G intensity of the area where the flare color component is superimposed is determined by the R / G intensity of the area outside the flare area A i and the R / G intensity inside the saturation area S i . You can see that it is interpolated. Further, after the removal, it can be seen that the R intensity distribution shape of the region where the flare color component is superimposed is a shape corresponding to the G intensity distribution shape of the same region.

なお、本ステップのフレア色成分抽出処理部21は、フレア色成分の除去されたR成分IRnewを、元のR成分から差し引くことにより、R成分に関するフレア色成分IFRを算出しておく(フレア色成分の除去されたR成分IRnewを、フレア色成分IFRに換算しておく。)。なぜなら、本実施形態では、最終画像を算出する前に、フレア色成分IFRに対して幾つかの処理(マスク処理やサイズ拡大処理など)を施す必要があるからである。 Note that the flare color component extraction processing unit 21 in this step calculates the flare color component I FR related to the R component by subtracting the R component I Rnew from which the flare color component has been removed from the original R component ( The R component I Rnew from which the flare color component is removed is converted into the flare color component I FR .) This is because in this embodiment, it is necessary to perform some processing (mask processing, size enlargement processing, etc.) on the flare color component I FR before calculating the final image.

ステップS237:フレア色成分抽出処理部21は、ステップS236で取得したフレア色成分IFRに対してステップS232で作成したグレースケールマスクを適用することにより、フレア色成分IFRの周辺部をぼかす。このように周辺部をぼかしておけば、処理領域A’のR成分からフレア色成分IFRを除去(減算)した際に、処理領域A’に不自然な階調段差が発生することを防げるからである。また、上述したとおり、グレースケールマスクの作成時に使用された平滑化フィルタのサイズは、フレア領域Aのサイズに応じたサイズに設定されたので、マスク適用後のフレア色成分IFRの周辺部は、より自然なものとなる。これによって、R成分に関するフレア色成分IFRの推定は、完了である。 Step S237: The flare color component extraction processing unit 21 applies the grayscale mask created in Step S232 to the flare color component I FR acquired in Step S236, thereby blurring the peripheral portion of the flare color component I FR . If blurring in this way the peripheral portion, 'upon removal of the flare color component I FR from R components (subtraction) processing area A i' processing area A i an unnatural gradation level difference is generated in the It is because it can prevent. Further, as described above, the size of the smoothing filter used at the time of creating the grayscale mask is set to a size according to the size of the flare area A i , so that the peripheral portion of the flare color component I FR after applying the mask Will be more natural. Thereby, the estimation of the flare color component I FR regarding the R component is completed.

ステップS238:フレア色成分抽出処理部21は、基準色成分以外の全ての色成分(ここではR成分、B成分)に関する推定が完了したか否かを判別し、完了していなければ未推定である色成分の推定を行うべくステップS233へ移行し、完了していればフローを終了する。なお、ここでは、R成分に関する推定しか説明しなかったが、B成分に関する推定は、R成分に関する推定と同様なので、説明を省略する(以上、ステップS238)。   Step S238: The flare color component extraction processing unit 21 determines whether or not the estimation for all the color components other than the reference color component (here, the R component and the B component) has been completed. The process proceeds to step S233 to estimate a certain color component, and if completed, the flow ends. Although only the estimation regarding the R component has been described here, the estimation regarding the B component is the same as the estimation regarding the R component, and thus the description thereof is omitted (step S238).

以上、本実施形態では、フレア領域Aに重畳されたフレア色成分の推定を、フレア領域Aの色分布に基づき行うが、その推定に先立ち、フレア領域Aに色補正が施されているか否かを判別し、色補正が施されていた場合には、フレア領域Aの色分布を色補正前の状態に復元するので、フレア色成分の推定に失敗する可能性は抑えられる。 Above, in this embodiment, the estimation of the flare color component superposed on the flare region A i, is performed based on the color distribution of the flare area A i, prior to the estimation, the color correction is subjected to the flare region A i If the color correction has been performed, the color distribution of the flare area A i is restored to the state before the color correction, so that the possibility of failure in estimating the flare color component can be suppressed.

因みに、フレア色成分の推定前に色分布の復元を行わなかった場合には、フレア色成分が誤って推定され、その結果、不自然な黒いリング状のノイズが最終画像上に発生してしまう。   Incidentally, if the color distribution is not restored before the flare color component is estimated, the flare color component is erroneously estimated, and as a result, an unnatural black ring noise is generated on the final image. .

また、本実施形態の色分布の復元では、フレア領域Aを包含する処理領域A’を設定し、処理領域A’の補正対象色成分において周辺と比較して値の低い領域を平滑化し、平滑化前後における補正対象色成分の差分に基づき、補正対象色成分に関する色補正成分を推定するので(図11、図12参照。)、正確な復元が可能である。 Further, in the restoration of the color distribution of the present embodiment, a processing area A i ′ that includes the flare area A i is set, and the correction target color component of the processing area A i ′ is smoothed in an area that has a lower value than the surrounding area. Since the color correction component related to the correction target color component is estimated based on the difference between the correction target color components before and after smoothing (see FIGS. 11 and 12), accurate restoration is possible.

また、本実施形態のフレア色成分の推定では、フレア領域Aを包含する処理領域A’を設定すると共に、フレア領域Aの各色成分の中で基準となる基準色成分を特定し、処理領域A’における基準色成分と着目色成分との間の相関と、フレア領域Aの基準色成分とに基づき、フレア領域Aに含まれるフレア色成分を推定する。すなわち、本実施形態では、フレア成分それ自体をを抽出する代わりに、フレア色成分(=色フレアの色付き分布)を抽出する。このフレア色成分を使用すれば、色フレアを無色のフレアにすることができるので、色フレアに特有の不自然さを確実に解消することができる。 In the flare color component estimation of the present embodiment, a processing area A i ′ that includes the flare area A i is set, and a reference color component that is a reference among the color components of the flare area A i is specified. a reference color component in the processing area a i 'and the correlation between the target color component, based on the reference color component of the flare area a i, estimating the flare color component contained in the flare area a i. That is, in this embodiment, instead of extracting the flare component itself, a flare color component (= colored flare distribution) is extracted. If this flare color component is used, the color flare can be a colorless flare, so that unnaturalness peculiar to the color flare can be surely eliminated.

また、本実施形態のフレア色成分の推定では、処理領域A’の相関色分布を算出し、その相関色分布のうち周辺と比較して値の低い領域を平滑化し、平滑化後の相関色分布のうち周辺と比較して値の高い領域の面積を収縮し、収縮後の相関色分布を、処理領域A’の基準色成分へ乗算することにより、処理領域Aの非フレア色成分を算出する(図16、図17参照。)。したがって、本実施形態では、非フレア色成分をほぼ正確に推定することができる。 Further, in the estimation of the flare color component of the present embodiment, the correlation color distribution of the processing area A i ′ is calculated, the area of the correlation color distribution having a lower value than the surroundings is smoothed, and the correlation after smoothing is calculated. shrink the area of the high value region compared to the peripheral of the color distribution, the correlated color distribution after shrinking by multiplying the reference color component of the processing area a i ', non-flared color processing area a i The component is calculated (see FIGS. 16 and 17). Therefore, in this embodiment, the non-flare color component can be estimated almost accurately.

また、本実施形態では、非フレア色成分を処理領域A’から減算することにより、処理領域A’に含まれるフレア色成分を算出し、そのフレア色成分に対してフレア領域Aと同じ形状の開口部を有したマスクを適用してから、フレア色成分を処理領域A’から減算する。そして、本実施形態では、そのマスクとして、開口部の輪郭部の値が平滑化されたグレースケールマスク(図14)を使用する。したがって、本実施形態では、不自然な階調段差が最終画像に発生することを防げる。 Further, in the present embodiment, 'by subtracting from, the processing area A i' non flare color component processing area A i is calculated flare color component contained in the flare area A i for the flare color component After applying a mask having openings of the same shape, the flare color component is subtracted from the processing area A i ′. In this embodiment, a gray scale mask (FIG. 14) in which the value of the contour of the opening is smoothed is used as the mask. Therefore, in this embodiment, it is possible to prevent an unnatural gradation step from occurring in the final image.

また、本実施形態の色補正成分の推定及びフレア色成分の推定では、入力画像を使用する代わりに入力画像のサイズ縮小版を使用するので、演算負荷を抑えることができる。   Further, in the estimation of the color correction component and the flare color component of the present embodiment, the size reduction version of the input image is used instead of using the input image, so that the calculation load can be suppressed.

[第1実施形態の変形例]
なお、第1実施形態の色補正成分抽出処理部22は、ステップS193〜S195において基準画像I”を作成したが、基準画像I”の作成を省略してもよい。その場合、色補正成分抽出処理部22は、ステップS193〜195の代わりに、以下のステップS193’〜S195’を実行すればよい。なお、ここでも、補正対象色成分がR成分であったと仮定する。
[Modification of First Embodiment]
Note that the color correction component extraction processing unit 22 according to the first embodiment creates the reference image I R ″ in steps S193 to S195, but the creation of the reference image I R ″ may be omitted. In that case, the color correction component extraction processing unit 22 may execute the following steps S193 ′ to S195 ′ instead of steps S193 to 195. Here again, it is assumed that the color component to be corrected is an R component.

ステップS193’:色補正成分抽出処理部22は、フレア領域Aの内側かつ飽和領域Sの外側におけるR成分を参照すると、そのR成分の最大値を算出し、その値を基準値Tに設定する。この基準値Tは、色補正成分の算出基準として使用される。 Step S193 ′: The color correction component extraction processing unit 22 refers to the R component inside the flare area A i and outside the saturation area S i , calculates the maximum value of the R component, and sets the value as the reference value T. Set. This reference value T is used as a reference for calculating the color correction component.

ステップS194’:色補正成分抽出処理部22は、図18(A)に示すとおり、処理領域A’のR成分Iから基準値Tを差し引くことにより、図18(B)に示すようなオフセットR成分I’を算出する。そして、色補正成分抽出処理部22は、オフセットR成分I’において正の値を有する画素の値をゼロへと置換することにより、図18(C)に示すような色補正成分Iを取得する。但し、ここで算出された色補正成分Iには、高周波数の誤差が残存している。 Step S194 ': color correction component extraction unit 22, as shown in FIG. 18 (A), the processing area A i' by subtracting the reference value T from the R component I R of, as shown in FIG. 18 (B) An offset R component I R ′ is calculated. Then, the color correction component extraction processing unit 22 replaces the value of the pixel having a positive value in the offset R component I R ′ with zero, thereby changing the color correction component ID as shown in FIG. get. However, a high frequency error remains in the color correction component ID calculated here.

ステップS195’:色補正成分抽出処理部22は、色補正成分Iをガウシアンフィルタなどの平滑化フィルタで空間的に平滑化することにより、図18(D)に示すような色補正成分Iを算出する。この色補正成分Iが、R成分に関する色補正成分である(以上、ステップS195’)。 Step S195 ′: The color correction component extraction processing unit 22 spatially smoothes the color correction component ID with a smoothing filter such as a Gaussian filter, so that the color correction component I C as shown in FIG. Is calculated. The color correction component I C is the color correction component for R-component (or, the step S195 ').

また、第1実施形態の色補正成分抽出処理部22は、フレア領域Aに色補正が施されているか否かをフレア領域Aに基づき自動的に判定したが、入力画像がRAW画像(現像処理前の画像)であった場合には、色補正が施されている可能性は無いので、フレア領域Aに基づくことなく即座に色補正が施されていないと判定して構わない。 Further, the color correction component extraction processing unit 22 of the first embodiment automatically determines whether or not the flare area A i is color-corrected based on the flare area A i , but the input image is a RAW image ( In the case of an image before development processing), there is no possibility that color correction has been performed, so it may be determined that color correction has not been performed immediately without being based on the flare area A i .

また、入力画像がRAW画像でなかったとしても、色補正の内容を表すパラメータが入力画像に付加されていた場合は、色補正成分抽出処理部22は、フレア領域Aに基づく代わりに、そのパラメータに基づくことにより、色補正成分を算出してもよい。 Even if the input image is not a RAW image, if a parameter indicating the content of the color correction is added to the input image, the color correction component extraction processing unit 22 does not use the flare area A i , The color correction component may be calculated based on the parameter.

また、第1実施形態のフレア色成分抽出処理部21は、フレア色成分の推定を基準色成分以外の2つの色成分の各々について行ったが、2つの色成分のうち一方の色成分に関する推定を省略してもよい。G成分が基準色成分であると仮定したならば、例えば、フレア領域AにおけるG成分の平均値とB成分の平均値との差が所定範囲内であった場合、つまり、G成分とB成分とに差異が無かった場合には、B成分に関する推定を省略してもよい。 In addition, the flare color component extraction processing unit 21 according to the first embodiment performs the estimation of the flare color component for each of the two color components other than the reference color component, but the estimation for one of the two color components. May be omitted. Assuming that the G component is the reference color component, for example, when the difference between the average value of the G component and the average value of the B component in the flare area A i is within a predetermined range, that is, the G component and the B component. If there is no difference from the component, estimation regarding the B component may be omitted.

また、第1実施形態のフレア色成分抽出処理部21は、基準色成分を自動的に設定したが、ユーザに指定させてもよい。   In addition, although the flare color component extraction processing unit 21 of the first embodiment has automatically set the reference color component, the user may specify it.

また、上述したフレア色成分除去処理では、ステップS13〜S19、S23における演算負荷を軽減するために、入力画像をそのまま使用する代わりに入力画像のサイズ縮小版(縮小画像)を使用したが、演算負荷の軽減よりも精度向上を優先させたい場合には、入力画像をそのまま使用してもよい。なお、その場合、ステップS21、S22、S24の処理は省略される。   In the flare color component removal process described above, a reduced size version (reduced image) of the input image is used instead of using the input image as it is in order to reduce the calculation load in steps S13 to S19 and S23. When it is desired to prioritize accuracy improvement over load reduction, the input image may be used as it is. In this case, the processes in steps S21, S22, and S24 are omitted.

また、上述したフレア色成分除去処理では、入力画像におけるフレアの発生位置をCPU14が自動的に検出したが、ユーザに指定させてもよい。   In the flare color component removal process described above, the CPU 14 automatically detects the flare occurrence position in the input image.

また、上述したフレア色成分除去処理では、フレア領域AをCPU14が自動的に検出したが、ユーザに指定させてもよい。 Further, in the above-described flare color component removal treatment is a flare region A i CPU 14 detects automatically, it may be specified by the user.

また、上述したフレア色成分除去処理では、処理領域A’をCPU14が自動的に設定したが、ユーザに設定させてもよい。 In the flare color component removal process described above, the processing area A i ′ is automatically set by the CPU 14, but may be set by the user.

また、上述したフレア色成分除去処理では、フレア領域Aに発生しているフレアが色フレアであるか否かをCPU14が自動的に判別したが、ユーザに判別させてもよい。 In the flare color component removal process described above, the CPU 14 automatically determines whether or not the flare occurring in the flare area A i is a color flare, but it may be determined by the user.

また、本実施形態のフレア色成分抽出処理部21は、フレア領域Aのフレア色成分を、処理領域Aにおける基準色成分と着目色成分との間の相関と、フレア領域Aの基準色成分とに基づき推定したが、フレア領域Aの色分布に基づく他の手法により推定しても構わない。 Further, the flare color component extraction processing unit 21 of the present embodiment determines the flare color component of the flare area A i , the correlation between the reference color component and the target color component in the processing area A i, and the reference of the flare area A i . Although the estimation is based on the color components, the estimation may be performed by another method based on the color distribution of the flare area A i .

[第2実施形態]
以下、本実施形態の第2実施形態を説明する。
[Second Embodiment]
Hereinafter, a second embodiment of the present embodiment will be described.

図19は、電子カメラの概略構成を示すブロック図である。図19に示すとおり、電子カメラ111は、撮像光学系112と、レンズ駆動部113と、絞り114と、絞り駆動部115と、カラー撮像素子116と、AFE117と、画像処理エンジン118と、第1メモリ119と、第2メモリ120と、メディアI/F121と、通信I/F122と、モニタ123と、レリーズ釦124とを有しており、この中でレンズ駆動部113、絞り駆動部115、AFE117、第1メモリ119、第2メモリ120、メディアI/F121、通信I/F122、モニタ123、レリーズ釦124の各々は、画像処理エンジン118に接続されている。また、撮影光学系112は、例えば、DOEレンズを含んだ高機能な撮影光学系である。   FIG. 19 is a block diagram illustrating a schematic configuration of the electronic camera. As shown in FIG. 19, the electronic camera 111 includes an imaging optical system 112, a lens driving unit 113, a diaphragm 114, a diaphragm driving unit 115, a color imaging element 116, an AFE 117, an image processing engine 118, and a first. It has a memory 119, a second memory 120, a media I / F 121, a communication I / F 122, a monitor 123, and a release button 124. Among these, a lens driving unit 113, an aperture driving unit 115, and an AFE 117 are provided. The first memory 119, the second memory 120, the media I / F 121, the communication I / F 122, the monitor 123, and the release button 124 are each connected to the image processing engine 118. The photographing optical system 112 is a high-functional photographing optical system including a DOE lens, for example.

第1メモリ119は、揮発性の記憶媒体(SDRAMなど)で構成されており、画像処理エンジン118による画像処理の前工程や後工程で撮像画像を一時的に記憶する。一方、第2メモリ120は、フラッシュメモリ等の不揮発性の記憶媒体で構成されており、画像処理エンジン118によって実行されるプログラムを長期的に記憶する。   The first memory 119 is composed of a volatile storage medium (SDRAM or the like), and temporarily stores a captured image in a pre-process or post-process of image processing by the image processing engine 118. On the other hand, the second memory 120 is configured by a nonvolatile storage medium such as a flash memory, and stores a program executed by the image processing engine 118 for a long period of time.

この第1メモリ119には、画像処理エンジン118が実行すべき画像処理プログラムが格納されており、この画像処理プログラムには、第1実施形態と同様のフレア色成分除去処理の機能が搭載されている。フレア色成分除去処理を実行する際、画像処理エンジン118は、フレア色成分抽出処理部125、色補正成分抽出処理部126として機能する。このフレア色成分抽出処理部125、色補正成分抽出処理部126は、第1実施形態のフレア色成分抽出処理部21と同様に動作する。   The first memory 119 stores an image processing program to be executed by the image processing engine 118, and this image processing program has the same flare color component removal processing function as that of the first embodiment. Yes. When executing the flare color component removal processing, the image processing engine 118 functions as the flare color component extraction processing unit 125 and the color correction component extraction processing unit 126. The flare color component extraction processing unit 125 and the color correction component extraction processing unit 126 operate in the same manner as the flare color component extraction processing unit 21 of the first embodiment.

したがって、本実施形態の画像処理エンジン118は、電子カメラ111が撮影で取得した画像や、メディアI/F121(又は通信I/F122)を介して読み込まれた画像に対して、第1実施形態と同様のフレア色成分除去処理を施すことができる。   Therefore, the image processing engine 118 of the present embodiment is the same as that of the first embodiment for images acquired by the electronic camera 111 by shooting or images read via the media I / F 121 (or communication I / F 122). A similar flare color component removal process can be performed.

なお、本実施形態のフレア色成分除去処理は、撮影条件データを必要としないので、図19において点線で示した部分は、電子カメラ111に対して交換可能であっても構わない。また、言うまでもないが、本実施形態のフレア色成分除去処理は、撮影条件データを必要としないので、撮影光学系112の結像特性データを画像処理エンジン118が読み込む必要も無い。   Note that the flare color component removal processing of the present embodiment does not require shooting condition data, and therefore the portion indicated by the dotted line in FIG. 19 may be replaceable with the electronic camera 111. Needless to say, the flare color component removal processing of the present embodiment does not require imaging condition data, and therefore the image processing engine 118 does not need to read the imaging characteristic data of the imaging optical system 112.

また、本実施形態のフレア色成分除去処理も、第1実施形態のそれと同様に変形することが可能である。   Further, the flare color component removal processing of the present embodiment can be modified similarly to that of the first embodiment.

11…コンピュータ、12…データ読込部、13…記憶装置、14…CPU、15…メモリ、16…入出力I/F、17…バス   DESCRIPTION OF SYMBOLS 11 ... Computer, 12 ... Data reading part, 13 ... Memory | storage device, 14 ... CPU, 15 ... Memory, 16 ... Input-output I / F, 17 ... Bus

Claims (11)

撮影光学系により取得されたカラーの処理対象画像を入力する入力手順と、
前記処理対象画像上の色フレアの発生領域に色補正が施されているか否かを判別する判別手順と、
前記発生領域に色補正が施されていた場合には、前記発生領域の色分布を色補正前の状態に復元する復元手順と、
前記色フレアが前記発生領域に与えた影響を、復元後の前記発生領域の色分布に基づき推定するフレア推定手順と、
を含むことを特徴とする画像処理方法。
An input procedure for inputting a color processing target image acquired by the photographing optical system;
A determination procedure for determining whether or not color correction has been performed on a color flare generation region on the processing target image;
When color correction has been performed on the generation area, a restoration procedure for restoring the color distribution of the generation area to a state before color correction;
A flare estimation procedure for estimating the influence of the color flare on the occurrence area based on the color distribution of the occurrence area after restoration;
An image processing method comprising:
請求項1に記載の画像処理方法において、
前記色補正は、彩度強調である
ことを特徴とする画像処理方法。
The image processing method according to claim 1,
The image processing method, wherein the color correction is saturation enhancement.
請求項2に記載の画像処理方法において、
前記判別手順では、
ノイズレベル未満の第1色成分と飽和レベル以上の第2色成分とを有した色補正画素が前記発生領域に少なくとも1つ存在していた場合には、前記発生領域に色補正が施された可能性があるとみなす
ことを特徴とする画像処理方法。
The image processing method according to claim 2,
In the determination procedure,
When at least one color correction pixel having a first color component lower than the noise level and a second color component equal to or higher than the saturation level is present in the generation area, the generation area is subjected to color correction. An image processing method characterized in that it is considered possible.
請求項3に記載の画像処理方法において、
前記復元手順は、
前記発生領域を包含する処理領域を前記処理対象画像上に設定する領域設定手順と、
前記処理領域の着目色成分のうち周辺と比較して値の低い領域を平滑化する平滑化手順と、
平滑化前後における前記着目色成分の差分に基づき、前記着目色成分における色補正成分を算出する補正成分算出手順と
を含むことを特徴とする画像処理方法。
The image processing method according to claim 3.
The restoration procedure is:
An area setting procedure for setting a processing area including the generation area on the processing target image;
A smoothing procedure for smoothing a region having a low value compared to the surroundings in the target color component of the processing region;
A correction component calculation procedure for calculating a color correction component for the target color component based on a difference between the target color components before and after smoothing.
請求項1〜請求項4の何れか一項に記載の画像処理方法において、
前記フレア推定手順は、
前記発生領域を包含する処理領域を前記処理対象画像上に設定する領域設定手順と、
前記発生領域の各色成分の中で基準となる基準色成分を設定する基準色設定手順と、
前記処理領域における基準色成分と他の色成分との間の相関を示す相関情報を算出する相関算出手順と、
前記色フレアの色付き分布であるフレア色成分を、前記処理領域の前記相関情報と前記発生領域の基準色成分とに基づき推定するフレア色成分推定手順と、
を含むことを特徴とする画像処理方法。
In the image processing method according to any one of claims 1 to 4,
The flare estimation procedure includes:
An area setting procedure for setting a processing area including the generation area on the processing target image;
A reference color setting procedure for setting a reference color component to be a reference among the color components of the generation region;
A correlation calculation procedure for calculating correlation information indicating a correlation between a reference color component and other color components in the processing region;
A flare color component estimation procedure for estimating a flare color component which is a colored distribution of the color flare based on the correlation information of the processing region and a reference color component of the generation region;
An image processing method comprising:
請求項1〜請求項5の何れか一項に記載の画像処理方法において、
前記復元手順及び前記フレア推定手順では、
前記処理対象画像を使用する代わりに前記処理対象画像のサイズ縮小版を使用する
ことを特徴とする画像処理方法。
In the image processing method according to any one of claims 1 to 5,
In the restoration procedure and the flare estimation procedure,
An image processing method comprising using a reduced size version of the processing target image instead of using the processing target image.
撮影光学系により取得されたカラーの処理対象画像を入力する入力手順と、
前記処理対象画像上の色フレアの発生領域に色補正が施されているか否かを判別する判別手順と、
前記発生領域に色補正が施されていた場合には、前記発生領域の色分布を色補正前の状態に復元する復元手順と、
前記色フレアが前記発生領域に与えた影響を、復元後の前記発生領域の色分布に基づき推定するフレア推定手順と、
をコンピュータに実行させることを特徴とする画像処理プログラム。
An input procedure for inputting a color processing target image acquired by the photographing optical system;
A determination procedure for determining whether or not color correction has been performed on a color flare generation region on the processing target image;
When color correction has been performed on the generation area, a restoration procedure for restoring the color distribution of the generation area to a state before color correction;
A flare estimation procedure for estimating the influence of the color flare on the occurrence area based on the color distribution of the occurrence area after restoration;
An image processing program for causing a computer to execute.
撮影光学系により取得されたカラーの処理対象画像を入力する入力手段と、
前記処理対象画像上の色フレアの発生領域に色補正が施されているか否かを判別する判別手段と、
前記発生領域に色補正が施されていた場合には、前記発生領域の色分布を色補正前の状態に復元する復元手段と、
前記色フレアが前記発生領域に与えた影響を、復元後の前記発生領域の色分布に基づき推定するフレア推定手段と、
を備えることを特徴とする画像処理装置。
Input means for inputting a color processing target image acquired by the photographing optical system;
A discriminating means for discriminating whether or not color correction is applied to a color flare generation region on the processing target image;
When color correction has been performed on the generation area, restoration means for restoring the color distribution of the generation area to a state before color correction;
Flare estimation means for estimating the influence of the color flare on the occurrence area based on the color distribution of the occurrence area after restoration;
An image processing apparatus comprising:
撮影光学系が結像した被写体像を撮像する撮像素子と、
請求項8に記載の画像処理装置と、
を備えたことを特徴とする撮像装置。
An image sensor that captures a subject image formed by the imaging optical system;
An image processing apparatus according to claim 8,
An imaging apparatus comprising:
請求項9に記載の撮像装置において、
回折光学素子を含む撮影レンズを更に備えた
ことを特徴とする撮像装置。
The imaging device according to claim 9,
An imaging apparatus, further comprising a photographic lens including a diffractive optical element.
請求項9に記載の撮像装置において、
回折光学素子を含む撮影レンズを装着可能である
ことを特徴とする撮像装置。
The imaging device according to claim 9,
An imaging device, characterized in that a photographic lens including a diffractive optical element can be attached.
JP2010283188A 2010-03-30 2010-12-20 Image processing method, image processing program, image processing apparatus, and imaging apparatus Active JP5163735B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2010283188A JP5163735B2 (en) 2010-12-20 2010-12-20 Image processing method, image processing program, image processing apparatus, and imaging apparatus
US13/073,372 US8989436B2 (en) 2010-03-30 2011-03-28 Image processing method, computer-readable storage medium, image processing apparatus, and imaging apparatus
CN201110083636.3A CN102236896B (en) 2010-03-30 2011-03-30 Image processing method, device and photographic attachment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010283188A JP5163735B2 (en) 2010-12-20 2010-12-20 Image processing method, image processing program, image processing apparatus, and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2012133462A true JP2012133462A (en) 2012-07-12
JP5163735B2 JP5163735B2 (en) 2013-03-13

Family

ID=46649013

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010283188A Active JP5163735B2 (en) 2010-03-30 2010-12-20 Image processing method, image processing program, image processing apparatus, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP5163735B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018198456A (en) * 2018-08-23 2018-12-13 株式会社ニコン Image processing program, image processing apparatus, and imaging apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005136852A (en) * 2003-10-31 2005-05-26 Canon Inc Image processing method, image processing apparatus and image processing program
JP2005136917A (en) * 2003-10-31 2005-05-26 Canon Inc Image processing method, image processing apparatus, image processing program and image-taking system
JP2006129113A (en) * 2004-10-29 2006-05-18 Fuji Photo Film Co Ltd Flare correction device and gamma correction circuit of image data
JP2006303996A (en) * 2005-04-21 2006-11-02 Fuji Photo Film Co Ltd Conversion parameter calculation method, conversion parameter calculation program, and image processing apparatus
JP2007293686A (en) * 2006-04-26 2007-11-08 Konica Minolta Photo Imaging Inc Imaging apparatus, image processing apparatus, image processing method and image processing program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005136852A (en) * 2003-10-31 2005-05-26 Canon Inc Image processing method, image processing apparatus and image processing program
JP2005136917A (en) * 2003-10-31 2005-05-26 Canon Inc Image processing method, image processing apparatus, image processing program and image-taking system
JP2006129113A (en) * 2004-10-29 2006-05-18 Fuji Photo Film Co Ltd Flare correction device and gamma correction circuit of image data
JP2006303996A (en) * 2005-04-21 2006-11-02 Fuji Photo Film Co Ltd Conversion parameter calculation method, conversion parameter calculation program, and image processing apparatus
JP2007293686A (en) * 2006-04-26 2007-11-08 Konica Minolta Photo Imaging Inc Imaging apparatus, image processing apparatus, image processing method and image processing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018198456A (en) * 2018-08-23 2018-12-13 株式会社ニコン Image processing program, image processing apparatus, and imaging apparatus

Also Published As

Publication number Publication date
JP5163735B2 (en) 2013-03-13

Similar Documents

Publication Publication Date Title
JP5113514B2 (en) White balance control device and white balance control method
US8989436B2 (en) Image processing method, computer-readable storage medium, image processing apparatus, and imaging apparatus
JP5398156B2 (en) WHITE BALANCE CONTROL DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE
JP5200645B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP2009171318A (en) Image processor, image processing method, and imaging device
KR20120016476A (en) Image processing method and image processing apparatus
JP2005136852A (en) Image processing method, image processing apparatus and image processing program
JP2015156615A (en) Image processing system, image processing method, control program, and recording medium
JP6711396B2 (en) Image processing device, imaging device, image processing method, and program
JP4818393B2 (en) Image processing method and image processing apparatus
JP5423663B2 (en) Image processing method, image processing program, image processing apparatus, and imaging apparatus
JP5215775B2 (en) White balance control device, imaging device using the same, and white balance control method
JP6415063B2 (en) Image processing apparatus, image processing method, control program, and recording medium
JP5163735B2 (en) Image processing method, image processing program, image processing apparatus, and imaging apparatus
JP6098227B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2018198456A (en) Image processing program, image processing apparatus, and imaging apparatus
JP6232808B2 (en) Image processing program, image processing apparatus, and imaging apparatus
JP5106311B2 (en) White balance control device, imaging device using the same, and white balance control method
JP6390779B2 (en) Image processing program, image processing apparatus, and imaging apparatus
JP6115183B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5677485B2 (en) White balance control device, imaging device using the same, and white balance control method
JP7020387B2 (en) Imaging control device, imaging device and imaging control program
JP5147912B2 (en) Image processing method, image processing apparatus, program, and recording medium
US20220254139A1 (en) Image processing method and apparatus, training method and apparatus of machine learning model, and storage medium
JP2008147714A (en) Image processor and image processing method

Legal Events

Date Code Title Description
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: 20121120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121203

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

Free format text: PAYMENT UNTIL: 20151228

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5163735

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: 20151228

Year of fee payment: 3

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

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