JP2016201601A - Image processing apparatus, imaging device, image processing method, image processing program, and storage medium - Google Patents

Image processing apparatus, imaging device, image processing method, image processing program, and storage medium Download PDF

Info

Publication number
JP2016201601A
JP2016201601A JP2015078640A JP2015078640A JP2016201601A JP 2016201601 A JP2016201601 A JP 2016201601A JP 2015078640 A JP2015078640 A JP 2015078640A JP 2015078640 A JP2015078640 A JP 2015078640A JP 2016201601 A JP2016201601 A JP 2016201601A
Authority
JP
Japan
Prior art keywords
color
image
color blur
image processing
optical information
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
JP2015078640A
Other languages
Japanese (ja)
Other versions
JP2016201601A5 (en
JP6604737B2 (en
Inventor
貴嘉 横山
Takayoshi Yokoyama
貴嘉 横山
弘至 畠山
Hiroyuki Hatakeyama
弘至 畠山
崇 鬼木
Takashi Oniki
崇 鬼木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015078640A priority Critical patent/JP6604737B2/en
Publication of JP2016201601A publication Critical patent/JP2016201601A/en
Publication of JP2016201601A5 publication Critical patent/JP2016201601A5/ja
Application granted granted Critical
Publication of JP6604737B2 publication Critical patent/JP6604737B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus that can reduce an influence due to a manufacturing error and effectively reduce color blur in a color image.SOLUTION: An image processing apparatus 100 comprises: detection means 102 that detects a first area where a signal level in a color plane corresponding at least to one color filter in an image that is obtained from an imaging element including a plurality of color filters, or a signal level of a luminance plane that is generated from the image, is monotonously increased or monotonously decreased in a first direction in a predetermined section; determination means 103 that determines a second area where color blur occurs on the basis of first optical information on color blur in an imaging optical system, second optical information on a variation in asymmetric chromatic aberration with respect to an optical axis of the imaging optical system, and information on the first area; and correction means 104 that corrects the image to reduce color blur.SELECTED DRAWING: Figure 1B

Description

本発明は、カラー画像における色にじみを低減する画像処理装置に関する。   The present invention relates to an image processing apparatus that reduces color bleeding in a color image.

従来から、撮影光学系の色収差により、カラー画像の明るい部分の周囲に本来存在しない色が色にじみとして生じる場合がある。撮影光学系の色収差は、異なる分散を有する材料からなる複数のレンズを組み合わせることにより、ある程度光学的に低減することができる。しかし近年では、撮像装置の小型化が進み、撮像素子に用いられるセンサの高解像度化および撮影光学系の小型化が要求され、撮影光学系の構成により色収差を十分に抑制することは困難である。   Conventionally, a color that does not originally exist around a bright portion of a color image may occur as a color blur due to chromatic aberration of the photographing optical system. The chromatic aberration of the photographing optical system can be optically reduced to some extent by combining a plurality of lenses made of materials having different dispersions. However, in recent years, the size of image pickup apparatuses has been reduced, and it has been required to increase the resolution of sensors used in image pickup elements and to reduce the size of imaging optical systems. It is difficult to sufficiently suppress chromatic aberration by the configuration of the imaging optical system. .

色収差は、横色収差(倍率色収差)と縦色収差(軸上色収差)に大別される。横色収差は、結像位置が波長により像面に沿う方向にずれる現象である。縦色収差は、結像位置が波長により光軸に沿う方向にずれる現象である。特許文献1に開示されているように、横色収差は、R(赤)、G(緑)、B(青)の各色プレーンに対して幾何変換処理を行うことにより補正することができる。一方、縦色収差は、上記の幾何変換処理では補正できない。   Chromatic aberration is roughly classified into lateral chromatic aberration (magnification chromatic aberration) and longitudinal chromatic aberration (axial chromatic aberration). Lateral chromatic aberration is a phenomenon in which the image formation position shifts in the direction along the image plane depending on the wavelength. Longitudinal chromatic aberration is a phenomenon in which the imaging position shifts in the direction along the optical axis depending on the wavelength. As disclosed in Patent Document 1, lateral chromatic aberration can be corrected by performing a geometric transformation process on each color plane of R (red), G (green), and B (blue). On the other hand, longitudinal chromatic aberration cannot be corrected by the geometric conversion process.

特許文献2には、色にじみが主に白とび(予め設定した信号の飽和領域)周辺に生じる特性を利用して、G(緑)プレーンの飽和している領域を探索し、その周辺の領域の画素を積分して補正量を算出する方法が開示されている。特許文献3には、カラー画像における色プレーンの画素値が単調増加または単調減少している領域を色にじみ発生領域と判定し、色にじみを除去する方法が開示されている。   In Patent Document 2, a region in which a G (green) plane is saturated is searched using a characteristic in which color blur is mainly generated in the vicinity of a whiteout (a saturated region of a preset signal), and a region around the region is searched. A method of calculating a correction amount by integrating the pixels is disclosed. Patent Document 3 discloses a method of determining a region where a color plane pixel value in a color image monotonously increases or decreases as a color blur generation region and removing the color blur.

米国特許第6724702号US Pat. No. 6,724,702 特開2007−133592号公報JP 2007-133582 A 特開2009−268033号公報JP 2009-268033 A

しかしながら、特許文献2に開示されている方法では、白とびしていない領域にも観察者にとって違和感のある色にじみが生じるため、色にじみの補正は不十分である。また特許文献3に開示されている方法によれば、白とびしていない領域の色にじみも補正が可能である。しかしながら、色にじみは、撮影光学系の収差により発生するため、コマ収差などの非対称な収差を有する撮影光学系では、被写体に対して色にじみが発生する方向や発生しない方向が存在する。被写体の色が色にじみと同系色の場合、本来は色にじみが発生しない方向でも被写体の色を色にじみとして誤判定し、被写体の本来の色を除去してしまう可能性がある。   However, in the method disclosed in Patent Document 2, color blur that causes discomfort to the observer also occurs in a region that is not overexposed, and thus correction of color blur is insufficient. Further, according to the method disclosed in Patent Document 3, it is possible to correct the color blur of the region that is not overexposed. However, since color blur occurs due to aberrations in the photographing optical system, there are directions in which color blur occurs and does not occur in a subject in a photographing optical system having asymmetric aberrations such as coma aberration. When the color of the subject is similar to the color blur, there is a possibility that the subject color is erroneously determined as a color blur even in a direction where the color blur does not occur, and the original color of the subject is removed.

また、撮影光学系を構成するレンズの製造誤差やレンズを保持する鏡筒の製造誤差などにより生じる偏芯収差により、撮影光学系の性能(光学性能)はばらつく(製造ばらつきが生じる)。従来、このような製造ばらつきの影響を低減するため、撮影光学系の一部の要素や撮像素子を偏芯させることにより、製造誤差により生じる偏芯収差を打ち消すように補正(偏芯調整)を行っていた。しかしながら、偏芯調整をした場合でも、光学性能のばらつきを効果的に補正することは困難である。このため、光軸に関して回転対称な撮影光学系においても、製造誤差により、光軸に関して回転非対称に色にじみが発生する場合がある。   Further, the performance (optical performance) of the photographing optical system varies (manufacturing variation occurs) due to decentration aberration caused by a manufacturing error of a lens constituting the photographing optical system or a manufacturing error of a lens barrel holding the lens. Conventionally, in order to reduce the influence of such manufacturing variations, correction (eccentric adjustment) is performed so as to cancel out decentration aberrations caused by manufacturing errors by decentering some elements of the photographic optical system and image sensor. I was going. However, even when the eccentricity adjustment is performed, it is difficult to effectively correct the variation in optical performance. For this reason, even in a photographing optical system that is rotationally symmetric with respect to the optical axis, color blur may occur in a rotationally asymmetric manner with respect to the optical axis due to manufacturing errors.

そこで本発明は、製造誤差による影響を低減するとともに、カラー画像における色にじみを効果的に低減可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供する。   Therefore, the present invention provides an image processing device, an imaging device, an image processing method, an image processing program, and a storage medium that can reduce the influence of manufacturing errors and effectively reduce color bleeding in a color image.

本発明の一側面としての画像処理装置は、複数のカラーフィルタを備えた撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出する検出手段と、撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定する判定手段と、前記色にじみを低減させるように前記画像を修正する修正手段とを有する。   An image processing apparatus according to one aspect of the present invention includes a signal level of a color plane corresponding to at least one color filter of an image obtained from an imaging device including a plurality of color filters, or luminance generated from the image. Detection means for detecting a first region in which the signal level of the plane monotonously increases or decreases monotonously in a first direction in a predetermined section, first optical information relating to color blur of the imaging optical system, and the imaging Determination means for determining a second region in which the color blur is generated based on second optical information relating to variations in chromatic aberration that is asymmetric with respect to the optical axis of the optical system and information relating to the first region; Correction means for correcting the image so as to reduce the color blur.

本発明の他の側面としての撮像装置は、撮影光学系を介して形成された光学像を光電変換する撮像素子と、複数のカラーフィルタを備えた前記撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出する検出手段と、前記撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定する判定手段と、前記色にじみを低減させるように前記画像を修正する修正手段とを有する。   An image pickup apparatus according to another aspect of the present invention provides an image pickup device that photoelectrically converts an optical image formed through a photographing optical system, and at least one of images obtained from the image pickup device including a plurality of color filters. A first region in which the signal level of the color plane corresponding to the color filter or the signal level of the luminance plane generated from the image is monotonously increased or monotonously decreased in the first direction in a predetermined section is detected. Based on detection means, first optical information relating to color blur of the photographing optical system, second optical information relating to chromatic aberration variation asymmetric with respect to the optical axis of the photographing optical system, and information relating to the first region. And determining means for determining the second area where the color blur occurs, and correcting means for correcting the image so as to reduce the color blur.

本発明の他の側面としての画像処理方法は、複数のカラーフィルタを備えた撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出するステップと、撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定するステップと、前記色にじみを低減させるように前記画像を修正するステップとを有する。   An image processing method according to another aspect of the present invention is generated from a signal level of a color plane corresponding to at least one color filter of an image obtained from an image sensor including a plurality of color filters, or from the image. Detecting a first region in which a signal level of the luminance plane monotonously increases or decreases monotonously in a first direction in a predetermined section; first optical information relating to color blur of the photographing optical system; and the photographing Determining a second region in which the color blur has occurred based on second optical information regarding variations in chromatic aberration that is asymmetric with respect to the optical axis of the optical system and information regarding the first region; Modifying the image to reduce color blur.

本発明の他の側面としての画像処理プログラムは、複数のカラーフィルタを備えた撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出するステップと、撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定するステップと、前記色にじみを低減させるように前記画像を修正するステップと、をコンピュータに実行させるように構成されている。   An image processing program according to another aspect of the present invention is generated from a signal level of a color plane corresponding to at least one color filter of an image obtained from an imaging device including a plurality of color filters, or from the image. Detecting a first region in which a signal level of the luminance plane monotonously increases or decreases monotonously in a first direction in a predetermined section; first optical information relating to color blur of the photographing optical system; and the photographing Determining a second region in which the color blur has occurred based on second optical information regarding variations in chromatic aberration that is asymmetric with respect to the optical axis of the optical system and information regarding the first region; Modifying the image to reduce color bleed, and causing the computer to execute.

本発明の他の側面としての記憶媒体は、前記画像処理プログラムを記憶している。   A storage medium according to another aspect of the present invention stores the image processing program.

本発明の他の目的及び特徴は、以下の実施形態において説明される。   Other objects and features of the invention are described in the following embodiments.

本発明によれば、製造誤差による影響を低減するとともに、カラー画像における色にじみを効果的に低減可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供することができる。   According to the present invention, it is possible to provide an image processing device, an imaging device, an image processing method, an image processing program, and a storage medium that can reduce the influence of manufacturing errors and can effectively reduce color blur in a color image. Can do.

本実施形態における画像処理装置のブロック図である。It is a block diagram of the image processing apparatus in this embodiment. 本実施形態における画像処理方法を示すフローチャートである。It is a flowchart which shows the image processing method in this embodiment. 本実施形態における単調増減判定処理を示すフローチャートである。It is a flowchart which shows the monotonous increase / decrease determination process in this embodiment. 本実施形態において、単調増減判定対象の画素区間が単調増減特性を有する場合の一例を示す図である。In this embodiment, it is a figure which shows an example in case the pixel area of the monotonous increase / decrease determination object has a monotonous increase / decrease characteristic. 本実施形態において、単調増減判定対象の画素区間が単調増減特性を有しない場合の一例を示す図である。In this embodiment, it is a figure which shows an example in case the pixel area of the monotonous increase / decrease determination object does not have a monotonous increase / decrease characteristic. 本実施形態において、注目画素を中心とした単調増減判定用の画素区間を示す図である。In this embodiment, it is a figure which shows the pixel area for the monotone increase / decrease determination centering on an attention pixel. 本実施形態において、注目画素を端の点とした単調増減判定用の画素区間を示す図である。In this embodiment, it is a figure which shows the pixel area for the monotone increase / decrease determination which used the attention pixel as the end point. 本実施形態において、画像内の3×3画素の領域を示す図である。In this embodiment, it is a figure which shows the area | region of 3x3 pixel in an image. 本実施形態において、画像内の3×3画素の領域の各画素に対してローパスフィルタを適用した結果を示す図である。In this embodiment, it is a figure which shows the result of having applied the low-pass filter with respect to each pixel of the area | region of 3x3 pixel in an image. 本実施形態において、各画素に対してローパスフィルタを適用した場合の入力信号の変化の例を示す図である。In this embodiment, it is a figure which shows the example of the change of an input signal at the time of applying a low-pass filter with respect to each pixel. 本実施形態において、対称な収差を有する撮影光学系の単調増減検出の例を示す図である。In this embodiment, it is a figure which shows the example of the monotone increase / decrease detection of the imaging optical system which has a symmetrical aberration. 本実施形態において、非対称な収差を有する撮影光学系の単調増減検出の例を示す図である。In this embodiment, it is a figure which shows the example of the monotone increase / decrease detection of the imaging optical system which has an asymmetrical aberration. 本実施形態における光学情報の説明図である。It is explanatory drawing of the optical information in this embodiment. 本実施形態において、光学情報および単調増減検出結果に基づいて色にじみ領域を判定する例を示す図である。In this embodiment, it is a figure which shows the example which determines a color bleeding area | region based on optical information and a monotonous increase / decrease detection result. 本実施形態における2次元の光学情報の説明図である。It is explanatory drawing of the two-dimensional optical information in this embodiment. 本実施形態において、光学情報を用いた色にじみ判定処理を示す図である。In this embodiment, it is a figure which shows the color blur determination process using optical information. 本実施形態における光学情報の算出方法の説明図である。It is explanatory drawing of the calculation method of the optical information in this embodiment. 本実施形態において、青色にじみの典型的な画素値変化を示す図である。In this embodiment, it is a figure which shows the typical pixel value change of a blue blur. 本実施形態において、Bプレーンの画素値に対する非線形変換の特性図である。In this embodiment, it is a characteristic view of the nonlinear conversion with respect to the pixel value of B plane. 本実施形態における色度座標ab面を示す図である。It is a figure which shows the chromaticity coordinate ab surface in this embodiment. 本実施形態において、単調増減判定結果によるBプレーン内の3×3画素の領域を示す図である。In this embodiment, it is a figure which shows the area | region of 3 * 3 pixel in B plane by a monotone increase / decrease determination result. 実施例1における撮像装置の構成図である。1 is a configuration diagram of an imaging apparatus in Embodiment 1. FIG. 実施例2における画像処理システムの構成図である。FIG. 6 is a configuration diagram of an image processing system in Embodiment 2. 本実施形態における変形例としての画像処理方法を示すフローチャートである。It is a flowchart which shows the image processing method as a modification in this embodiment. 撮影光学系の製造誤差による色にじみ発生方向の説明図である。It is explanatory drawing of the color bleeding generation | occurrence | production direction by the manufacturing error of an imaging optical system. 本実施形態において、単調増減検出結果と光学情報と光学性能ばらつき情報とを用いた色にじみ判定処理を示す図である。In this embodiment, it is a figure which shows the color blur determination process using the monotone increase / decrease detection result, optical information, and optical performance variation information. 本実施形態において、光学性能ばらつき情報として色にじみ強度情報を追加した説明図である。In this embodiment, it is explanatory drawing which added color bleed intensity | strength information as optical performance variation information. 偏芯収差による色にじみ発生方向の説明図である。It is explanatory drawing of the color blur generation | occurrence | production direction by decentration aberration.

以下、本発明の実施形態について、図面を参照しながら詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

まず、図1Aおよび図1Bを参照して、本実施形態における画像処理装置および画像処理方法について説明する。ここで説明される画像処理装置および画像処理方法は、後述の各実施例において適宜用いられる。図1Aは、本実施形態における画像処理装置100のブロック図である。図1Bは、本実施形態における画像処理方法(画像処理プログラム)のフローチャートである。図1Bの各ステップは、画像処理装置100の指令に基づいて、すなわち画像処理装置100の各手段により実行される。   First, an image processing apparatus and an image processing method in this embodiment will be described with reference to FIGS. 1A and 1B. The image processing apparatus and the image processing method described here are appropriately used in each embodiment described later. FIG. 1A is a block diagram of an image processing apparatus 100 in the present embodiment. FIG. 1B is a flowchart of an image processing method (image processing program) in the present embodiment. Each step in FIG. 1B is executed based on a command from the image processing apparatus 100, that is, by each unit of the image processing apparatus 100.

図1Aに示されるように、画像処理装置100は、入力手段101、検出手段102、判定手段103、修正手段104、出力手段105、取得手段106、および、記憶手段107を備えている。まず、図1BのステップS1において、画像処理装置100(入力手段101)は、撮影画像を入力画像として取得する。入力画像は、撮影光学系を介して撮像素子で受光することにより得られたデジタル画像(撮影画像)であり、レンズと各種の光学フィルタ類を含む撮影光学系の収差(軸上色収差など)により劣化している。撮影光学系は、レンズだけでなく曲率を有するミラー(反射面)を用いて構成することもできる。   As shown in FIG. 1A, the image processing apparatus 100 includes an input unit 101, a detection unit 102, a determination unit 103, a correction unit 104, an output unit 105, an acquisition unit 106, and a storage unit 107. First, in step S1 of FIG. 1B, the image processing apparatus 100 (input unit 101) acquires a captured image as an input image. The input image is a digital image (photographed image) obtained by receiving light with an image pickup device via a photographing optical system, and due to aberrations (such as axial chromatic aberration) of the photographing optical system including a lens and various optical filters. It has deteriorated. The photographing optical system can be configured using not only a lens but also a mirror (reflection surface) having a curvature.

入力画像の色成分は、例えばRGB色成分の情報を有する。色成分としては、これ以外にもLCHで表現される明度、色相、彩度や、YCbCrで表現される輝度、色差信号など一般に用いられている色空間を選択して用いることができる。その他の色空間として、XYZ、Lab、Yuv、JChを用いることが可能である。また、色温度を用いてもよい。撮影画像は、撮像装置と画像処理装置とを有線または無線で接続して取得することができる。また撮影画像は、記憶媒体を介して取得することもできる。   The color component of the input image has information on RGB color components, for example. As the color component, other commonly used color spaces such as brightness, hue, and saturation expressed in LCH, luminance expressed in YCbCr, and color difference signals can be selected and used. As other color spaces, XYZ, Lab, Yuv, and JCh can be used. Color temperature may also be used. The captured image can be acquired by connecting the imaging device and the image processing device by wire or wirelessly. The captured image can also be acquired via a storage medium.

続いてステップS2において、画像処理装置100(検出手段102)は、カラー画像を構成する複数の色プレーンのうちいずれかの色プレーンの画素値(信号レベル)が単調増加または単調減少している領域を検出する。そして検出手段102は、検出した領域を色にじみ発生領域と仮判定する(単調増減検出工程)。単調増減検出工程において色にじみ発生領域を判定する方法としては、いくつかの方法が考えられる。本実施形態では、一定の画素区間(所定の区間)の色にじみの画素値の変化特性に基づいて判定を行う。   Subsequently, in step S2, the image processing apparatus 100 (detection means 102) is a region where the pixel value (signal level) of any one of the color planes constituting the color image is monotonously increasing or monotonically decreasing. Is detected. Then, the detection unit 102 tentatively determines the detected area as a color blur generation area (monotonic increase / decrease detection step). Several methods are conceivable as a method of determining the color blur generation region in the monotonous increase / decrease detection step. In the present embodiment, the determination is made based on the change characteristic of the pixel value that blurs in a certain pixel section (predetermined section).

色にじみは、結像位置が波長により光軸に沿う方向にずれることで発生するため、例えば青色のにじみの場合、青色プレーン(Bプレーン)の焦点が合わない(ピンボケしている)ことになる。ピンボケによる色にじみは、一定の画素区間に渡って存在し、その際の色にじみの画素値変化は、画像のハイライト部からシャドウ部にかけて緩やかに減少する特性を有する。従って、一定の画素区間の色にじみの画素値変化が単調増加または単調減少の特性を有する場合、色にじみが発生している可能性があるため、色にじみ発生領域として仮判定する。   Since color blur occurs when the imaging position shifts in the direction along the optical axis depending on the wavelength, for example, in the case of blue blur, the blue plane (B plane) is out of focus (out of focus). . The color blur due to the defocusing exists over a certain pixel section, and the pixel value change of the color blur at that time has a characteristic of gradually decreasing from the highlight portion to the shadow portion of the image. Therefore, when the pixel value change of color blur in a certain pixel section has a monotonous increase or monotonic decrease characteristic, there is a possibility that color blur has occurred, so that it is temporarily determined as a color blur generation region.

このように本実施形態において、撮像素子は、複数のカラーフィルタを備えている。そして検出手段102は、撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル(画素値)が、所定の区間においていずれかの方向(第1の方向)に単調増加または単調減少している領域(第1の領域)を検出する。ただし本実施形態はこれに限定されるものではなく、色プレーンの信号レベルに代えて、例えば、撮像素子から得られた画像から生成される輝度プレーン(Yプレーン)の信号レベルが単調増加または単調減少している領域を検出するように構成してもよい。   As described above, in the present embodiment, the image sensor includes a plurality of color filters. The detecting unit 102 monotonically increases the signal level (pixel value) of the color plane corresponding to at least one color filter of the image obtained from the image sensor in any direction (first direction) in a predetermined section. Alternatively, a monotonically decreasing area (first area) is detected. However, the present embodiment is not limited to this, and instead of the signal level of the color plane, for example, the signal level of the luminance plane (Y plane) generated from the image obtained from the image sensor increases monotonously or monotonically. You may comprise so that the area | region which is reducing may be detected.

ところで、実際には、撮影光学系がコマ収差などの光軸(中心軸)に関して非対称(回転非対称)な収差を有する場合、撮影光学系により発生する色にじみは、被写体に対して発生する方向と発生しない方向が存在する。このため、単調増減のみから色にじみ発生領域を判定すると、被写体が色にじみと同系色である場合、被写体の色を色にじみと誤判定する可能性がある。従って、単調増減検出のみでは色にじみ発生領域を正しく判定することができない。   Actually, when the photographing optical system has an asymmetrical (rotationally asymmetric) aberration with respect to the optical axis (center axis) such as coma aberration, the color blur generated by the photographing optical system is the direction in which the subject is generated. There is a direction that does not occur. For this reason, if the color blur generation area is determined only from monotonous increase / decrease, if the subject has a color similar to the color blur, the subject color may be erroneously determined to be color blur. Accordingly, it is not possible to correctly determine the color blur generation area only by monotonic increase / decrease detection.

本実施形態において、単調増加または単調減少を検出する領域は、カラー画像の注目画素を中心とした水平方向、垂直方向、または、斜め方向の画素区間、注目画素を端の点とした水平方向、垂直方向、または、斜め方向の画素区間、のいずれかを含む。   In the present embodiment, the region for detecting monotonic increase or monotonic decrease is a horizontal, vertical or diagonal pixel section centered on the target pixel of the color image, a horizontal direction with the target pixel as an end point, It includes either a vertical or diagonal pixel section.

単調増減の検出は、まず、色プレーンの画素値傾斜を計算することにより行われる。入力画像が、例えば、Gプレーン、Bプレーン、Rプレーンの3色の色プレーンで構成されている場合、Bプレーンを色にじみ除去対象とし、基準プレーンとしてGプレーンを用いる。Bプレーン、Gプレーンに対するそれぞれの輝度傾斜Blea、Gleaは、以下の式(1)で表されるように算出される。   Detection of monotonic increase / decrease is performed by first calculating the pixel value gradient of the color plane. When the input image is composed of, for example, three color planes of the G plane, the B plane, and the R plane, the B plane is set as a color blur removal target, and the G plane is used as a reference plane. The respective luminance gradients Blea and Glea with respect to the B plane and the G plane are calculated as represented by the following expression (1).

式(1)において、G(x+1,y)、B(x+1,y)は、それぞれ、Gプレーン、Bプレーンにおける注目画素の右隣の画素値である。G(x−1,y)、B(x−1,y)は、それぞれ、Gプレーン、Bプレーンにおける注目画素の左隣の画素値である。G(x,y+1)、B(x,y+1)は、それぞれ、Gプレーン、Bプレーンにおける注目画素の下隣の画素値である。G(x,y−1)、B(x,y−1)は、それぞれ、Gプレーン、Bプレーンにおける注目画素の上隣の画素値である。本実施形態は、3色の色プレーンで説明するが、画像を構成する色プレーン数により任意の色プレーンで処理を行うことが可能である。   In Expression (1), G (x + 1, y) and B (x + 1, y) are pixel values on the right side of the target pixel in the G plane and B plane, respectively. G (x−1, y) and B (x−1, y) are pixel values on the left side of the target pixel in the G plane and the B plane, respectively. G (x, y + 1) and B (x, y + 1) are pixel values below the pixel of interest in the G plane and B plane, respectively. G (x, y-1) and B (x, y-1) are pixel values above and below the pixel of interest in the G plane and B plane, respectively. Although this embodiment will be described with three color planes, processing can be performed with any color plane depending on the number of color planes constituting the image.

次に、図2乃至図4を参照して、単調増減検出工程の色にじみ発生領域の判定方法について説明する。図2は、本実施形態における単調増減判定処理(単調増減検出工程:ステップS2)を示すフローチャートである。図2の各ステップは、主に、画像処理装置100(検出手段102)により実行される。まずステップS1520において、画像処理装置100は、ISO感度が高いか否か(ISO感度が所定の感度よりも高いか否か)を判定する。ISO感度が高い場合、ステップS1521に移行する。一方、ISO感度が高くない場合、ステップS1522に移行する。   Next, with reference to FIGS. 2 to 4, a method for determining a color blur occurrence area in the monotonous increase / decrease detection process will be described. FIG. 2 is a flowchart showing a monotonous increase / decrease determination process (monotonic increase / decrease detection step: step S2) in the present embodiment. Each step in FIG. 2 is mainly executed by the image processing apparatus 100 (detection unit 102). First, in step S1520, the image processing apparatus 100 determines whether the ISO sensitivity is high (whether the ISO sensitivity is higher than a predetermined sensitivity). If the ISO sensitivity is high, the process proceeds to step S1521. On the other hand, if the ISO sensitivity is not high, the process proceeds to step S1522.

ステップS1522において、画像処理装置100は、入力画像の注目画素を中心とした時の縦・横・斜めの画素区間(所定の区間)に対して、入力信号の画素値変化を解析する。そしてステップS1523において、画像処理装置100は、上記画素区間の入力信号の画素値変化が単調増減の特性を有するか否かを判定(検出)する。その判定の結果、上記の画素区間の入力信号の画素値変化が単調増減の特性を有さない場合、ステップS1524において、画像処理装置100は、注目画素を端の点とした時の縦・横・斜めの画素区間に対して入力信号の画素値変化を解析する。そしてステップS1525において、画像処理装置100は、上記の画素区間の入力信号の画素値変化が単調増減の特性を有するか否かを判定する。   In step S1522, the image processing apparatus 100 analyzes a change in the pixel value of the input signal with respect to vertical, horizontal, and diagonal pixel sections (predetermined sections) when the pixel of interest of the input image is the center. In step S1523, the image processing apparatus 100 determines (detects) whether or not the change in the pixel value of the input signal in the pixel section has a monotonous increase / decrease characteristic. As a result of the determination, if the change in the pixel value of the input signal in the pixel section does not have a monotonous increase / decrease characteristic, in step S1524, the image processing apparatus 100 displays the vertical / horizontal when the target pixel is the end point.・ A pixel value change of an input signal is analyzed for an oblique pixel section. In step S1525, the image processing apparatus 100 determines whether the change in the pixel value of the input signal in the pixel section has a monotonous increase / decrease characteristic.

図3は、単調増減判定対象の画素区間が単調増減特性を有する場合の一例を示す図であり、縦軸は画素値、横軸は距離をそれぞれ示している。図4は、単調増減判定対象の画素区間が単調増減特性を有しない場合の一例を示す図であり、縦軸は画素値、横軸は距離をそれぞれ示している。図3および図4に示されるような画素値変化を有する入力信号に対して、画像処理装置100は単調増減判定を行う。図3および図4のそれぞれ示される白い四角は注目画素である。   FIG. 3 is a diagram illustrating an example of a case where a pixel section subject to monotonous increase / decrease determination has a monotonous increase / decrease characteristic, where the vertical axis indicates the pixel value and the horizontal axis indicates the distance. FIG. 4 is a diagram illustrating an example of a case where a pixel section for which monotonous increase / decrease is determined does not have a monotonous increase / decrease characteristic, where the vertical axis indicates the pixel value and the horizontal axis indicates the distance. The image processing apparatus 100 performs monotonous increase / decrease determination on an input signal having a change in pixel value as shown in FIGS. The white squares shown in FIGS. 3 and 4 are the target pixels.

図3に示されるように、入力信号の画素値変化が単調増減の特性を有する画像は、単調増減判定を行う画素区間内において単調増減の特性を有する。このためステップS1522またはS1524の解析の結果、ステップS1523またはS1525において、画像処理装置100は、画素区間内において単調増減の特性を有すると判定する。一方、図4に示されるような入力信号の画素値変化の特性を有する画像に対しては、単調増減の特性を有さないと判定する。   As shown in FIG. 3, an image in which a change in the pixel value of the input signal has a monotonous increase / decrease characteristic has a monotonous increase / decrease characteristic in a pixel section where the monotonous increase / decrease determination is performed. Therefore, as a result of the analysis in step S1522 or S1524, in step S1523 or S1525, the image processing apparatus 100 determines that the pixel section has a monotonous increase / decrease characteristic. On the other hand, it is determined that the image having the change characteristic of the pixel value of the input signal as shown in FIG. 4 does not have the monotonous increase / decrease characteristic.

上記の画素区間の入力信号の画素値変化が単調増減の特性(単調増加の特性または単調減少の特性)を有している場合、ステップS1527において、画像処理装置100は単調増減フラグを立てる。一方、上記の画素区間の入力信号の画素値変化が単調増減の特性(単調増加の特性または単調減少の特性)を有していない場合、ステップS1526において、画像処理装置100は単調増減フラグを立てない。   If the change in the pixel value of the input signal in the pixel section has a monotonous increase / decrease characteristic (monotonic increase characteristic or monotonic decrease characteristic), the image processing apparatus 100 sets a monotonous increase / decrease flag in step S1527. On the other hand, if the change in the pixel value of the input signal in the pixel section does not have a monotonous increase / decrease characteristic (monotonic increase characteristic or monotonic decrease characteristic), the image processing apparatus 100 sets a monotonous increase / decrease flag in step S1526. Absent.

上述した単調増減判定を、Bプレーンの各画素に対して適用する。その結果、各画素において単調増減フラグが立っていれば「1」、単調増減フラグが立っていなければ「0」をそれぞれ対応させ、単調増減判定結果プレーンとして生成して保持し、後述の色にじみ判定(図1BのステップS5)で利用する。単調増減判定結果プレーンの利用方法の詳細については後述する。   The monotonous increase / decrease determination described above is applied to each pixel of the B plane. As a result, each pixel is associated with “1” if the monotonous increase / decrease flag is set, and “0” if the monotone increase / decrease flag is not set, and is generated and held as a monotone increase / decrease determination result plane. Used in determination (step S5 in FIG. 1B). Details of the method of using the monotonous increase / decrease determination result plane will be described later.

次に、図5および図6を参照して、注目画素に対する単調増減判定を行う画素区間の設定方法について説明する。図5(a)〜(d)は、注目画素を中心とした単調増減判定用の画素区間を示す図である。図6(a)〜(h)は、注目画素を端の点とした単調増減判定用の画素区間を示す図である。注目画素を中心とした画素区間の設定方法および注目画素を端の点とした画素区間の設定方法のうち、注目画素を中心とした画素区間の設定方法としては、図5(a)、(b)のように注目画素を中心として水平方向および垂直方向に設定する方法が考えられる。   Next, with reference to FIG. 5 and FIG. 6, a method for setting a pixel section for performing monotonous increase / decrease determination on the target pixel will be described. FIGS. 5A to 5D are diagrams illustrating a monotonic increase / decrease pixel section centered on a target pixel. FIGS. 6A to 6H are diagrams showing a monotone increase / decrease pixel section with the target pixel as an end point. Of the method of setting the pixel section centered on the target pixel and the method of setting the pixel section centered on the target pixel, the method of setting the pixel section centered on the target pixel is shown in FIGS. A method of setting the horizontal direction and the vertical direction around the target pixel as in FIG.

また、注目画素を中心とした画素区間の設定方法としては、図5(c)、(d)に示されるように注目画素を中心として斜め方向に設定する方法が考えられる。すなわち、斜め方向についても水平方向または垂直方向と同程度の距離の画素区間を設定すれば、等方性を持たせることができる。この場合、斜め方向の角度は、図5(c)、(d)に示されるように水平方向または垂直方向に対して45度の設定に限定される。ただし本実施形態はこれに限定されるものではなく、45度以外の任意の角度を設定することができる。その際の画素区間の距離dは、以下の式(2)を用いて算出される。   Further, as a method for setting a pixel section centered on the target pixel, a method of setting the target pixel in an oblique direction as shown in FIGS. 5C and 5D can be considered. In other words, the isotropic property can be imparted to the diagonal direction by setting a pixel section having a distance similar to that in the horizontal direction or the vertical direction. In this case, the angle in the oblique direction is limited to a setting of 45 degrees with respect to the horizontal direction or the vertical direction as shown in FIGS. However, the present embodiment is not limited to this, and an arbitrary angle other than 45 degrees can be set. The distance d of the pixel section at that time is calculated using the following equation (2).

式(2)において、xは水平方向、θは水平からの角度をそれぞれ示す。 In Expression (2), x represents the horizontal direction, and θ represents the angle from the horizontal.

一方、画像におけるハイライト部周辺の色にじみやシャドウ部周辺の色にじみは、それぞれ、飽和やノイズの影響を受けることにより、色にじみが存在するにも関わらず、判定対象の画素区間内では単調増減の特性を持たず正しく判定できない場合がある。その場合、図6に示されるように、注目画素を端の点として画素区間を設定する方法が効果的である。以上のような方法で単調増減判定を行い、図5および図6に示される画素区間のいずれか1つでも単調増減の特性を有する画素区間が存在する場合、注目画素は単調増減の特性を有する画素であると判定される。   On the other hand, the color blur around the highlight area and the color blur around the shadow area in the image are affected by saturation and noise, respectively. There is a case where it cannot be judged correctly because it does not have an increase / decrease characteristic. In that case, as shown in FIG. 6, a method of setting a pixel section with the target pixel as an end point is effective. When the monotonous increase / decrease determination is performed by the method as described above and there is a pixel section having the monotonous increase / decrease characteristics in any one of the pixel sections shown in FIGS. 5 and 6, the target pixel has the monotonous increase / decrease characteristics. It is determined to be a pixel.

本実施形態では、単調増減判定を行う対象として入力信号の画素値を利用しているが、輝度傾斜を利用しても構わない。その場合、一定の画素区間において輝度傾斜の変化が1回だけ反転する特性を有する場合が色にじみであると判定する。画素区間の画素数の適正値は、撮像装置のある撮影条件にて発生する色にじみのうち、最小の色にじみのにじみ幅に合わせるのが効果的である。   In the present embodiment, the pixel value of the input signal is used as a target for monotonic increase / decrease determination, but luminance gradient may be used. In that case, it is determined that the color blur is caused when the change in the luminance gradient is reversed only once in a certain pixel section. It is effective to set the appropriate value of the number of pixels in the pixel section to the minimum color blur width among the color blurs generated under certain shooting conditions of the imaging apparatus.

色にじみのにじみ幅は、撮像装置の撮影条件(絞り値、焦点距離、フォーカシング精度、画像面内におけるフォーカス位置、撮像素子上の座標など)により様々である。このため、画素区間の画素数の適正値を、各種の撮影条件により発生する様々な色にじみの最小幅の色にじみに合わせることで、最小幅の色にじみを検出することが可能となる。最大幅の色にじみに関しては、最小幅の色にじみ用に合わせた画素区間を利用しても検出は可能である。   The color blur width varies depending on the imaging conditions of the imaging apparatus (aperture value, focal length, focusing accuracy, focus position in the image plane, coordinates on the image sensor, etc.). For this reason, it is possible to detect the color blur of the minimum width by matching the appropriate value of the number of pixels in the pixel section with the color blur of the minimum width of various color blurs generated under various shooting conditions. The maximum width color blur can be detected even by using a pixel section adapted for the minimum width color blur.

以上のように単調増減判定を行うことにより、検出したい色にじみを抽出することが可能となる。ただし、高いISO感度などの撮影条件によっては、入力信号にノイズが含まれることによりS/N比が低下し、その結果、色にじみが単調増減の特性を有しなくなることが考えられる。その場合、図2のステップS1521において、入力信号に対してデジタルフィルタによるフィルタリング処理を行うことが有効である。本実施形態では、デジタルフィルタをローパスフィルタとした場合について説明するが、これに限定されるものではない。   By performing monotonous increase / decrease determination as described above, it is possible to extract a color blur to be detected. However, depending on the shooting conditions such as high ISO sensitivity, the S / N ratio may decrease due to noise included in the input signal, and as a result, the color blur may not have a monotonous increase / decrease characteristic. In that case, it is effective to perform a filtering process with a digital filter on the input signal in step S1521 in FIG. In the present embodiment, a case where the digital filter is a low-pass filter will be described, but the present invention is not limited to this.

入力信号にローパスフィルタを適用する方法としては、いくつかの方法が考えられる。例えば、注目画素の重み係数を隣接する画素の2倍の係数とする[1 2 1]のローパスフィルタを適用する場合について説明する。図7は、画像内の3×3画素の領域を示す図である。図7に示されるように画像内の3×3画素のある領域においてpを注目画素としたとき、まず、[1 2 1]のローパスフィルタを水平方向に適用する。このとき、注目画素は以下の式(3)のように表される。   There are several methods for applying a low-pass filter to the input signal. For example, a case will be described in which a [1 2 1] low-pass filter in which the weighting coefficient of the pixel of interest is twice as large as that of adjacent pixels is applied. FIG. 7 is a diagram showing an area of 3 × 3 pixels in an image. As shown in FIG. 7, when p is a target pixel in a certain region of 3 × 3 pixels in an image, first, a low-pass filter of [1 2 1] is applied in the horizontal direction. At this time, the target pixel is expressed as the following Expression (3).

P=(d・1+p・2+e・1)/4 … (3)
隣接する画素も同様に計算すると、図8に示されるようになる。図8は、画像内の3×3画素の領域の各画素に対してローパスフィルタを適用した結果を示す図である。続いて、[1 2 1]のローパスフィルタを垂直方向に適用すると、注目画素は以下の式(4)のように表される。
P = (d · 1 + p · 2 + e · 1) / 4 (3)
When the adjacent pixels are calculated in the same manner, they are as shown in FIG. FIG. 8 is a diagram illustrating a result of applying a low-pass filter to each pixel in a 3 × 3 pixel region in an image. Subsequently, when the low-pass filter of [1 2 1] is applied in the vertical direction, the target pixel is expressed as the following Expression (4).

PP=(B・1+P・2+G・1)/4 … (4)
図9を参照して、ローパスフィルタを適用したときの入力信号の変化の一例について説明する。図9は、各画素に対してローパスフィルタを適用した場合の入力信号の変化の例を示す図である。図9において、横軸は距離(画像上の断面、すなわち注目画素からの画素区間)、縦軸はプレーンの画素値をそれぞれ示している。
PP = (B · 1 + P · 2 + G · 1) / 4 (4)
With reference to FIG. 9, an example of a change in the input signal when the low-pass filter is applied will be described. FIG. 9 is a diagram illustrating an example of a change in an input signal when a low pass filter is applied to each pixel. In FIG. 9, the horizontal axis indicates the distance (cross section on the image, that is, the pixel section from the target pixel), and the vertical axis indicates the pixel value of the plane.

図9中の実線はローパスフィルタを適用しない場合、細かい破線は[1 2 1]のローパスフィルタを適用した場合、粗い破線は[1 4 6 4 1]のローパスフィルタを適用した場合をそれぞれ示している。ここで、[1 4 6 4 1]は、注目画素と隣接する画素と更にもう1画素分離れた画素にも重み係数をかけてローパスフィルタを適用することを意味する。このようにローパスフィルタを適用して入力信号を滑らかにすることで、色にじみが本来持つ単調増減の特性を際立たせることが可能となる。なお本実施形態では、ローパスフィルタを水平方向、垂直方向の順番で適用しているが、これに限定されるものではない。ローパスフィルタを逆の順番、すなわち垂直方向、水平方向の順番で適用しても構わない。また、2次元のローパスフィルタ係数を算出してローパスフィルタを水平方向および垂直方向に同時に適用することもできる。   The solid line in FIG. 9 indicates the case where the low-pass filter is not applied, the fine broken line indicates the case where the low-pass filter [1 2 1] is applied, and the coarse broken line indicates the case where the low-pass filter [1 4 6 4 1] is applied. Yes. Here, [1 4 6 4 1] means that a low-pass filter is applied by applying a weighting factor to a pixel adjacent to the target pixel and a pixel separated by another pixel. By smoothing the input signal by applying the low-pass filter in this way, it is possible to highlight the monotonous increase / decrease characteristics inherent in color fringing. In this embodiment, the low-pass filter is applied in the order of the horizontal direction and the vertical direction, but the present invention is not limited to this. The low-pass filter may be applied in the reverse order, that is, in the order of the vertical direction and the horizontal direction. It is also possible to calculate a two-dimensional low-pass filter coefficient and apply the low-pass filter simultaneously in the horizontal direction and the vertical direction.

続いて、図1BのステップS3において、画像処理装置100(取得手段106)は、撮影光学系の色にじみに関する光学情報(第1の光学情報)を取得する。第1の光学情報は、撮影光学系の光学設計値に関する情報である。またステップS4において、取得手段106は、撮影光学系の光軸(中心軸)に関して非対称(回転非対称)な色収差のばらつきに関する光学情報(第2の光学情報)を取得する。第2の光学情報は、撮影光学系の製造誤差に関する情報(光学性能ばらつき情報)である。光学性能ばらつき情報は、後述のように、撮影光学系の製造誤差(偏芯収差)を、ステップS3にて取得した第1の光学情報に反映させることにより、より高精度に色にじみ発生領域を判定するために用いられる。ステップS4では、撮影光学系の製造時に、偏芯収差を含む実際の色にじみ発生方向を測定して生成された光学性能ばらつき情報を取得する。   Subsequently, in step S3 of FIG. 1B, the image processing apparatus 100 (acquisition unit 106) acquires optical information (first optical information) related to color blur of the photographing optical system. The first optical information is information related to the optical design value of the photographing optical system. In step S4, the acquisition unit 106 acquires optical information (second optical information) regarding variations in chromatic aberration that is asymmetric (rotationally asymmetric) with respect to the optical axis (center axis) of the imaging optical system. The second optical information is information (optical performance variation information) regarding manufacturing errors of the photographing optical system. As will be described later, the optical performance variation information reflects the manufacturing error (eccentric aberration) of the photographing optical system in the first optical information acquired in step S3, so that the color bleed generation region can be determined with higher accuracy. Used to determine. In step S4, the optical performance variation information generated by measuring the actual color blur generation direction including the decentration aberration at the time of manufacturing the photographing optical system is acquired.

第1の光学情報および第2の光学情報は、画像処理装置100の記憶手段107や後述の撮像装置200の記憶部208などに予め記憶しておき、記憶された各光学情報を呼び出して取得することができる。また、光学性能ばらつき情報は、撮像装置200と画像処理装置100とを有線または無線で接続して、または、記憶媒体を介して取得することもできる。またステップS4では、例えば、特開2012−195927号公報に開示されているように、撮影画像に基づいて決定された偏芯収差量を光学性能ばらつき情報として取得してもよい。   The first optical information and the second optical information are stored in advance in the storage unit 107 of the image processing apparatus 100, a storage unit 208 of the imaging apparatus 200 described later, and the optical information stored is called up and acquired. be able to. The optical performance variation information can also be acquired by connecting the imaging device 200 and the image processing device 100 by wire or wirelessly or via a storage medium. In step S4, for example, as disclosed in Japanese Patent Application Laid-Open No. 2012-195927, the amount of decentration aberration determined based on the captured image may be acquired as optical performance variation information.

続いてステップS5において、画像処理装置100(判定手段103)は、ステップS2にて検出手段102により色にじみ発生領域と仮判定された領域(第1の領域)が、色にじみ発生領域(第2の領域)であるか否かを判定する(色にじみ判定工程)。このとき判定手段103は、ステップS3にて取得した光学情報(第1の光学情報)およびステップS4にて取得した光学性能ばらつき情報(第2の光学情報)を利用する。
すなわち判定手段103は、撮影光学系の色にじみに関する第1の光学情報と、撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、第1の領域に関する情報とに基づいて、色にじみが発生している領域(第2の領域)を判定する。
Subsequently, in step S5, the image processing apparatus 100 (determination unit 103) determines that the region (first region) temporarily determined as the color blur generation region by the detection unit 102 in step S2 is the color blur generation region (second region). (Region of color blur determination step). At this time, the determination unit 103 uses the optical information (first optical information) acquired in step S3 and the optical performance variation information (second optical information) acquired in step S4.
That is, the determination unit 103 is based on the first optical information relating to the color blur of the photographing optical system, the second optical information relating to the chromatic aberration variation asymmetric with respect to the optical axis of the photographing optical system, and the information relating to the first region. Then, a region (second region) in which color blur is generated is determined.

例えば、判定手段103は、第1の光学情報と第2の光学情報とに基づいて、撮影光学系の色にじみに関する第3の光学情報(光学設計値に製造誤差を反映させた情報)を取得する。そして判定手段103は、第3の光学情報と第1の領域に関する情報とに基づいて、第2の領域を判定する。ここで、第3の光学情報は、撮影光学系の色にじみが発生する第2の方向に関する情報(色にじみ発生方向の光学情報)である。また、第3の光学情報は、撮影光学系の光学性能ばらつき情報(撮影光学系の製造誤差による色収差のばらつき)を第1の光学情報に反映させて得られた、第2の方向に関する情報である。本実施形態において、色にじみ発生領域は、入力画像を撮影した撮影光学系の色にじみ発生方向の光学情報(第1の光学情報)と、撮影光学系の光学性能ばらつき情報(第2の光学情報)とを用いて判定される。   For example, the determination unit 103 acquires third optical information (information in which a manufacturing error is reflected in the optical design value) related to the color blur of the photographing optical system based on the first optical information and the second optical information. To do. Then, the determination unit 103 determines the second area based on the third optical information and the information related to the first area. Here, the third optical information is information regarding the second direction in which color blur occurs in the photographing optical system (optical information in the color blur generation direction). The third optical information is information regarding the second direction obtained by reflecting optical performance variation information of the photographing optical system (variation of chromatic aberration due to manufacturing errors of the photographing optical system) in the first optical information. is there. In the present embodiment, the color blur generation area includes optical information (first optical information) of the color blur generation direction of the photographing optical system that captured the input image, and optical performance variation information (second optical information) of the photographing optical system. ).

本実施形態において、判定手段103は、第1の方向(信号レベルが単調増加または単調減少する方向)と第2の方向(撮影光学系の色にじみが発生する方向)とを比較することにより第2の領域を判定する。判定手段103は、例えば第1の方向と第2の方向とが互いに一致する場合(または、略一致と評価される所定の範囲にある場合)、第1の領域(ステップS2にて検出された領域)が第2の領域(色にじみが発生している領域)であると判定する。   In the present embodiment, the determination unit 103 compares the first direction (the direction in which the signal level monotonously increases or decreases monotonously) with the second direction (the direction in which the color blur of the photographing optical system occurs). 2 areas are determined. For example, when the first direction and the second direction match each other (or when they are within a predetermined range that is evaluated as substantially matching), the determination unit 103 detects the first region (detected in step S2). It is determined that the (region) is the second region (region where color bleeding is generated).

ここで、図10および図11を参照して、単調増減検出工程のみから色にじみ領域を判定した場合の弊害について説明する。デジタルカメラなどの撮像装置により被写体を撮像して得られた画像には、撮影光学系の球面収差、コマ収差、像面湾曲、非点収差などに起因する画像劣化成分としてのぼけ成分が含まれる。このようなぼけ成分は、無収差で回折の影響もない場合に被写体の一点から出た光束が撮像面上で再度一点に集まるべきものが、ある広がりをもって像を結ぶことで発生する。   Here, with reference to FIG. 10 and FIG. 11, an adverse effect in the case where the color blur area is determined only from the monotonous increase / decrease detection process will be described. An image obtained by imaging a subject with an imaging device such as a digital camera includes a blur component as an image degradation component caused by spherical aberration, coma aberration, field curvature, astigmatism, etc. of the photographing optical system. . Such a blur component is generated when a light beam emitted from one point of a subject to be collected again at one point on the imaging surface when an aberration is not caused and there is no influence of diffraction is formed by forming an image with a certain spread.

ぼけ成分は、光学的には、点像分布関数(Point Spread Function:PSF)により表され、ピントのずれによるぼけとは異なる。また、カラー画像での色にじみも、光学系の軸上色収差、色の球面収差、色のコマ収差が原因であるものに関しては、光の波長ごとのぼけ方の相違ということができる。さらに、横方向の色ずれも、光学系の倍率色収差が原因であるものに関しては、光の波長ごとの撮像倍率の相違による位置ずれまたは位相ずれということができる。   The blur component is optically represented by a point spread function (PSF), and is different from blur due to a focus shift. In addition, color blur in a color image can also be said to be a difference in blurring for each wavelength of light with respect to axial chromatic aberration, spherical spherical aberration, and color coma aberration of the optical system. Further, the lateral color misregistration can also be referred to as a positional misalignment or a phase misalignment due to a difference in imaging magnification for each wavelength of light when the lateral chromatic aberration is caused by the optical system.

点像分布関数(PSF)をフーリエ変換して得られる光学伝達関数(Optical TransferFunction:OTF)は、収差の周波数成分情報であり、複素数で表される。光学伝達関数(OTF)の絶対値、すなわち振幅成分を、MTF(Modulation Transfer Function)といい、位相成分をPTF(Phase Transfer Function)という。MTFおよびPTFはそれぞれ、収差による画像劣化の振幅成分および位相成分の周波数特性である。ここでは、位相成分を位相角として、以下の式(5)のように表される。   An optical transfer function (OTF) obtained by Fourier-transforming the point spread function (PSF) is frequency component information of aberration and is represented by a complex number. The absolute value of the optical transfer function (OTF), that is, the amplitude component, is referred to as MTF (Modulation Transfer Function), and the phase component is referred to as PTF (Phase Transfer Function). MTF and PTF are frequency characteristics of an amplitude component and a phase component of image degradation due to aberration, respectively. Here, the phase component is expressed as the following equation (5) with the phase angle as the phase angle.

PTF=tan−1(Im(OTF)/Re(OTF)) … (5)
式(5)において、Re(OTF)およびIm(OTF)はそれぞれ、OTFの実部および虚部である。
PTF = tan −1 (Im (OTF) / Re (OTF)) (5)
In formula (5), Re (OTF) and Im (OTF) are the real part and the imaginary part of OTF, respectively.

このように、光学系の光学伝達関数(OTF)は、画像の振幅成分と位相成分に対して劣化を与えるため、劣化画像は被写体の各点がコマ収差のように光軸に関して非対称にぼけた状態になる。   As described above, since the optical transfer function (OTF) of the optical system deteriorates the amplitude component and the phase component of the image, each point of the subject is asymmetrically blurred with respect to the optical axis like coma aberration. It becomes a state.

図10は、被写体の各点が球面収差のような光軸に関して対称(回転対称)にぼける光学特性の状態で撮影された画像に対し、単調増減検出を行う場合を説明した図である。図10(a)は被写体の画素値断面、図10(b)は撮影光学系のPSF断面、図10(c)は撮影光学系で撮影された被写体の画素値断面を示している。図10(b)に示されるように、撮影光学系が光軸に関して対称(回転対称)な収差特性を有しPSFが対称である場合、被写体の両側のエッジ断面は、両方とも劣化した画像として図10(c)の実線のように撮影される。図10(c)では、比較のため、図10(a)に示される被写体の輝度断面を点線で示している。図10(c)の白い四角を注目画素として、単調増減判定を行うとすると、両エッジとも単調増減領域として判定される。また、色のにじみも実際に発生するため、色にじみ発生領域の判定としては正しく判定される。   FIG. 10 is a diagram for explaining a case where monotonous increase / decrease detection is performed on an image captured in a state of optical characteristics in which each point of a subject is symmetric (rotationally symmetric) with respect to the optical axis such as spherical aberration. 10A shows a pixel value section of the subject, FIG. 10B shows a PSF section of the photographing optical system, and FIG. 10C shows a pixel value section of the subject photographed by the photographing optical system. As shown in FIG. 10B, when the photographing optical system has an aberration characteristic that is symmetric (rotationally symmetric) with respect to the optical axis and the PSF is symmetric, the edge cross sections on both sides of the subject are both degraded images. Photographed as shown by the solid line in FIG. In FIG. 10C, for comparison, the luminance cross section of the subject shown in FIG. If the white square in FIG. 10C is used as the target pixel and the monotone increase / decrease determination is performed, both edges are determined as the monotone increase / decrease area. Further, since color blur actually occurs, the color blur generation region is correctly determined.

図11は、被写体の各点がコマ収差のような光軸に関して非対称(回転非対称)にぼける光学特性の状態で撮影された画像に対し、単調増減検出を行う場合を説明した図である。図11(a)は被写体の画素値断面、図11(b)は撮影光学系のPSF断面、図11(c)は撮影光学系で撮影された被写体の画素断面である。図11(b)に示されるように、撮影光学系が光軸に関して非対称な収差特性を有しPSFが非対称な場合、特に片側のエッジのみ大きく劣化する光学特性では、被写体のエッジ断面は、片側のみ大きく劣化した画像として図11(c)の実線のように撮影される。このような撮影画像に対し単調増減検出を行うと、両エッジとも単調増減領域として判定されるが、実際に撮影光学系により発生する色にじみは片側のみであるため、被写体本来の色を色にじみとして判定してしまう弊害が発生する。単調増減のみで色にじみ補正を行うと被写体本来の色を除去することになり、不自然な画像となる場合がある。これを回避しようとすると補正が弱くなってしまう。   FIG. 11 is a diagram illustrating a case where monotonous increase / decrease detection is performed on an image captured with optical characteristics in which each point of a subject is asymmetric (rotationally asymmetric) with respect to the optical axis such as coma. 11A is a pixel value cross section of the subject, FIG. 11B is a PSF cross section of the photographing optical system, and FIG. 11C is a pixel cross section of the subject photographed by the photographing optical system. As shown in FIG. 11B, when the photographing optical system has an asymmetric aberration characteristic with respect to the optical axis and the PSF is asymmetric, the edge cross section of the subject is one side particularly in the optical characteristic that greatly deteriorates only on one side edge. Only an image that is greatly degraded is taken as shown by the solid line in FIG. When monotonous increase / decrease detection is performed on such a photographed image, both edges are determined as monotonous increase / decrease areas, but since the color blur actually generated by the photographing optical system is only on one side, the original color of the subject is blurred. As a result, an adverse effect occurs. If the color blur correction is performed only by monotonous increase / decrease, the original color of the subject is removed, which may result in an unnatural image. If you try to avoid this, the correction will be weak.

そこで本実施形態において、画像処理装置100は、図10(b)や図11(b)に示されるような撮影光学系の色にじみ発生方向に関する光学情報(第1の光学情報および第2の光学情報)を保持または取得する。そして画像処理装置100は、単調増減検出の単調増減方向と色にじみ発生方向が一致した場合、色にじみ発生領域である判定する。ここで一致とは、厳密に一致する場合だけでなく実質的に一致である場合も含む意味である。   Therefore, in the present embodiment, the image processing apparatus 100 includes optical information (first optical information and second optical information) regarding the color blur generation direction of the photographing optical system as shown in FIGS. 10B and 11B. Information). When the monotonous increase / decrease direction of the monotonic increase / decrease detection matches the color blur generation direction, the image processing apparatus 100 determines that the color blur generation region is present. Here, the term “matching” means not only the case of exact matching but also the case of substantial matching.

図12を参照して、光学情報について説明する。図12は、本実施形態における光学情報の説明図であり、撮影光学系のPSF断面および光学情報を示している。図12(a)は、図10(b)に示される、撮影光学系のPSFが光軸に関して対称な場合の光学情報である。図12(b)は、図11(b)に示される、撮影光学系のPSFが光軸に関して非対称な場合の光学情報である。例えば、撮影光学系の収差により色にじみが発生する方向には1を持ち、発生しない場合は0を持つ。図12(a)は、色にじみが対称に両側で発生するため光学情報は両側とも1の値を持つ。図12(b)では、色にじみが非対称に発生しており、左側エッジでは色にじみが発生しないため0、右側エッジでは色にじみが発生するため1の値を持つ。   The optical information will be described with reference to FIG. FIG. 12 is an explanatory diagram of optical information in the present embodiment, and shows a PSF cross section and optical information of the photographing optical system. FIG. 12A shows optical information when the PSF of the photographing optical system shown in FIG. 10B is symmetric with respect to the optical axis. FIG. 12B shows optical information when the PSF of the imaging optical system shown in FIG. 11B is asymmetric with respect to the optical axis. For example, it has 1 in the direction in which color blur occurs due to the aberration of the photographing optical system, and 0 if it does not occur. In FIG. 12A, since the color blur occurs symmetrically on both sides, the optical information has a value of 1 on both sides. In FIG. 12B, color blur is generated asymmetrically, and no color blur is generated at the left edge, and a value of 1 is generated because color blur is generated at the right edge.

図13は、光学情報および単調増減検出結果に基づいて色にじみ領域を判定する例を示す図である。図13(a)に示されるように、単調増減検出により、例えば、単調減少が検出された場合、その単調減少方向の光学情報を参照し、1を有していれば色にじみ補正領域と判定する。また、図13(b)に示されるように、単調減少方向の光学情報を参照し、0を有していれば被写体の色であると判定する。このように、撮影光学系の収差として色収差が発生する方向と、発生しない方向の情報を有することで、被写体の色と色にじみを正しく判定することができるため、色にじみ補正の精度を向上させることが可能となる。なお、色にじみの発生方向を1、発生しない方向を0としたが、発生の方向がわかればよく、0と1である必要はない。撮影光学系の収差は、像高により変化するため、複数の像高での光学情報を有しておくことで、高精度に補正を行うことが可能となる。補正値を持たない像高では、近傍の補正値より補間生成してもよい。また、撮影光学系の収差は、撮影条件(撮影光学系の焦点距離、被写体距離、絞り値(Fno))でも変化するため、撮影条件ごとに光学情報(第1の光学情報および第2の光学情報)を記憶または取得することにより、高精度に補正を行うことが可能となる。   FIG. 13 is a diagram illustrating an example of determining a color blur area based on optical information and a monotonous increase / decrease detection result. As shown in FIG. 13 (a), for example, when monotonic decrease is detected by monotone increase / decrease detection, the optical information in the monotonic decrease direction is referred to. To do. Further, as shown in FIG. 13B, the optical information in the monotonously decreasing direction is referred to, and if it has 0, it is determined that the color of the subject. As described above, by having information on the direction in which chromatic aberration occurs and the direction in which chromatic aberration does not occur as the aberration of the photographing optical system, it is possible to correctly determine the color and color blur of the subject, thereby improving the accuracy of color blur correction. It becomes possible. Although the direction of occurrence of color blur is 1 and the direction of non-occurrence is 0, it is only necessary to know the direction of occurrence, and it is not necessary to be 0 and 1. Since the aberration of the photographic optical system changes depending on the image height, it is possible to correct with high accuracy by having optical information at a plurality of image heights. For image heights that do not have correction values, interpolation may be generated from nearby correction values. In addition, since the aberration of the photographing optical system changes depending on photographing conditions (focal length of the photographing optical system, subject distance, aperture value (Fno)), the optical information (first optical information and second optical information) for each photographing condition. By storing or acquiring (information), correction can be performed with high accuracy.

図10および図11では、光学情報を1次元の情報として説明したが、撮影画像が2次元配列のデータの場合、光学情報も2次元のデータとして保持してもよい。図14は、光学情報が2次元である場合の説明図である。図14(c)は、光学情報を画面上下左右、斜め45度、135度の8方向のデータとして保持する場合の例を示している。図14では、撮影光学系の色のコマ収差が画面上方向に発生しており、その発生方向に1の光学情報を保持する。色にじみの発生しない方向には0を保持する。単調増減検出を前記8方向で行い、単調減少が検出された方向に光学情報の1が保持されていた場合に色にじみと判定される。単調減少が検出されても、検出された方向に光学情報の1が保持されていなければ被写体の色と判定を行う。   10 and 11, the optical information has been described as one-dimensional information. However, when the captured image is two-dimensional array data, the optical information may be held as two-dimensional data. FIG. 14 is an explanatory diagram when the optical information is two-dimensional. FIG. 14C shows an example in which optical information is held as data in eight directions of up / down / left / right, 45 degrees oblique and 135 degrees on the screen. In FIG. 14, color coma in the photographing optical system is generated in the upward direction of the screen, and 1 optical information is held in the generation direction. 0 is maintained in the direction where no color blur occurs. Monotonic increase / decrease detection is performed in the above eight directions, and it is determined that the color is blurred when 1 of the optical information is held in the direction in which the monotonic decrease is detected. Even if a monotonic decrease is detected, if the optical information 1 is not held in the detected direction, it is determined as the color of the subject.

以上のように、画像処理装置100は、撮影光学系の色にじみが発生する方向に関する光学情報(第1の光学情報および第2の光学情報)を保持または取得する。好ましくは、画像処理装置100は、第1の光学情報および第2の光学情報を記憶する記憶手段107を有する。より好ましくは、記憶手段107は、撮影条件ごとに第1の光学情報および第2の光学情報を記憶する。撮影条件は、撮影光学系の焦点距離、被写体距離、絞り値の少なくとも一つを含む。なお、記憶手段107は、画像処理装置100の外部に設けられていてもよい。例えば、後述の記憶部208に各光学情報を記憶させておくことができる。   As described above, the image processing apparatus 100 holds or acquires the optical information (first optical information and second optical information) regarding the direction in which the color blur of the photographing optical system occurs. Preferably, the image processing apparatus 100 includes a storage unit 107 that stores the first optical information and the second optical information. More preferably, the storage unit 107 stores the first optical information and the second optical information for each photographing condition. The photographing condition includes at least one of a focal length, a subject distance, and an aperture value of the photographing optical system. Note that the storage unit 107 may be provided outside the image processing apparatus 100. For example, each optical information can be stored in the storage unit 208 described later.

そして、画像処理装置100は、単調増減検出時に検出方向と、第1の光学情報(光学情報)と、第2の光学情報(光学性能ばらつき情報)とを参照することにより、高精度に色にじみ領域を判定することが可能となる。なお本実施形態では、単調増減判定を単調減少方向で説明したが、単調増加方向を使用して色にじみ判定を行ってもよい。また、単調増減判定と光学情報の補正値を8方向で説明したが、8方向に限定されるものではない。精度を向上させるため、検出方向の数を増加させてもよい。または、光学情報に関するデータ量を削減するため、検出方向の数を減少させてもよい。   Then, the image processing apparatus 100 refers to the detection direction, the first optical information (optical information), and the second optical information (optical performance variation information) at the time of monotonic increase / decrease detection, thereby blurring the color with high accuracy. The area can be determined. In the present embodiment, the monotonous increase / decrease determination has been described in the monotonic decrease direction. However, the color blur determination may be performed using the monotone increase direction. In addition, the monotonous increase / decrease determination and the correction value of the optical information have been described in eight directions, but are not limited to eight directions. In order to improve accuracy, the number of detection directions may be increased. Alternatively, the number of detection directions may be reduced in order to reduce the amount of data related to optical information.

ところで、前述のように、撮影光学系は製造誤差や偏芯調整のために偏芯収差が発生し、光軸に関して非対称(回転非対称)に色にじみが発生する。このため、単調増減判定結果と、撮影光学系の設計値の色にじみ発生方向に関する光学情報(第1の光学情報)とを用いた色にじみ補正では、正しく補正できない場合がある。   Incidentally, as described above, in the photographing optical system, decentration aberrations occur due to manufacturing errors and decentration adjustment, and color blur occurs asymmetrically (rotationally asymmetrically) with respect to the optical axis. For this reason, correction by color blur using the monotonous increase / decrease determination result and optical information (first optical information) regarding the color blur generation direction of the design value of the photographing optical system may not be corrected correctly.

ここで、図27を参照して、偏芯収差による色にじみ発生方向について説明する。図27は、偏芯収差による色にじみ発生方向の説明図である。図27(a)は、偏芯が発生していない状態で、撮影光学系がコマ収差を有する場合の模式図である。偏芯が発生しない場合、収差は光軸に関して対称に発生する。このため、光学情報としては、撮影画面の光軸を通る1方向の各像高で色にじみ発生方向に関する情報を持てばよい。収差は光軸に関して対称に発生するため、算出した1方向の光学情報を回転補間して使用すると、撮影画面全体で補正データを持つよりもデータ量を削減することができる。また、補間の演算時間短縮のため、撮影画面全体で補正データを持つことも可能である。   Here, with reference to FIG. 27, the color blur generation direction due to decentration aberration will be described. FIG. 27 is an explanatory diagram of the direction of occurrence of color blur due to decentration aberration. FIG. 27A is a schematic diagram when the photographing optical system has coma aberration in a state where no eccentricity occurs. When decentration does not occur, the aberration occurs symmetrically with respect to the optical axis. For this reason, as the optical information, it is only necessary to have information regarding the color blur occurrence direction at each image height in one direction passing through the optical axis of the photographing screen. Since aberration occurs symmetrically with respect to the optical axis, using the calculated optical information in one direction after rotational interpolation can reduce the amount of data compared to having correction data for the entire photographing screen. It is also possible to have correction data for the entire shooting screen in order to shorten the interpolation calculation time.

図27(b)は、撮影光学系の1つの光学要素が偏芯した場合の偏芯コマ収差の模式図である。偏芯コマ収差は、光軸に関して非対称に発生し、光学要素の偏芯方向に向かってコマ収差が発生する。実際には、図27(a)に示されるように、撮影光学系が設計値として有する収差に偏芯収差が加わるため、画面全体で非対称に色にじみが発生する。このため、撮影光学系の設計値の光学情報(第1の光学情報)と、単調増減判定結果とに基づいて色にじみ補正を行うと、設計値と実際に製造された撮影光学系の収差との間の生じる差により、正しく補正できない場合がある。   FIG. 27B is a schematic diagram of decentration coma aberration when one optical element of the photographing optical system is decentered. Eccentric coma occurs asymmetrically with respect to the optical axis, and coma occurs in the decentering direction of the optical element. Actually, as shown in FIG. 27A, decentration aberration is added to the aberration that the photographing optical system has as a design value, so that color blur occurs asymmetrically on the entire screen. For this reason, when color blur correction is performed based on the optical information (first optical information) of the design value of the photographing optical system and the monotonous increase / decrease determination result, the design value and the aberration of the actually produced photographing optical system are calculated. Due to the difference between the two, correct correction may not be possible.

ここで、図24を参照して、撮影光学系の製造誤差により偏芯収差が発生した場合の弊害について説明する。図24は、撮影光学系の製造誤差による色にじみ発生方向の説明図である。図24(a)は、設計値として色コマ収差を有する撮影光学系において、撮影光学系に偏芯収差が発生していない場合の色にじみ補正処理の説明図である。図24(a)中の四角で囲まれた注目画素1について色にじみ発生領域の判定を行う場合、まず、注目画素1を中心として上下左右、斜め45度、斜め135度の8方向について単調減少判定を行う。高輝度被写体が注目画素1の左下に位置するため、注目画素1の単調減少が判定される方向は、上、右上、右、右下であると判定される。このとき、撮影光学系の色にじみ発生方向である、上、右上、右(第1の光学情報)と一致するため、注目画素1は色にじみ発生領域であると判定される。   Here, with reference to FIG. 24, an adverse effect in the case where decentration aberration occurs due to a manufacturing error of the photographing optical system will be described. FIG. 24 is an explanatory diagram of the direction of occurrence of color blur due to a manufacturing error of the photographing optical system. FIG. 24A is an explanatory diagram of a color blur correction process when no decentering aberration is generated in the photographing optical system in the photographing optical system having chromatic coma as a design value. When determining the color blur generation area for the target pixel 1 surrounded by the square in FIG. 24A, first, monotonously decrease in the eight directions of up and down, left and right, 45 degrees oblique, and 135 degrees oblique with the target pixel 1 as the center. Make a decision. Since the high-luminance subject is located at the lower left of the target pixel 1, the directions in which the monotonic decrease of the target pixel 1 is determined are determined to be upper, upper right, right, and lower right. At this time, since the color blur generation direction of the photographing optical system coincides with upper, upper right, and right (first optical information), the target pixel 1 is determined to be a color blur generation region.

図24(b)は、製造誤差により、撮影光学系に偏芯コマ収差や偏芯像面湾曲などの光軸に関して非対称な収差が発生し、図24(a)の設計値では発生しない高輝度被写体の下側にも色にじみが発生した例を示している。ここで、図24(b)の注目画素2について色にじみ発生領域の判定を行う場合について説明する。高輝度被写体は注目画素2の上側に位置するため、注目画素2の単調減少が判定される方向は、左下、下、右下となる。一方、撮影光学系の設計値に基づいて生成された色にじみ発生方向に関する光学情報(第1の光学情報)は、この方向には色にじみが発生しないという情報を有する。このため、第1の光学情報にのみ基づいて判定を行うと、注目画素2は色にじみ発生領域とは判定されず、色にじみ補正処理が行われないという問題が生じる。   FIG. 24B shows a high luminance that does not occur with the design value of FIG. 24A due to a manufacturing error that causes an asymmetric aberration with respect to the optical axis such as decentering coma and decentered field curvature in the photographing optical system. An example is shown in which color blur has also occurred on the lower side of the subject. Here, a case where the color blur generation area is determined for the target pixel 2 in FIG. Since the high-intensity subject is located above the target pixel 2, the direction in which the monotonic decrease of the target pixel 2 is determined is the lower left, the lower, and the lower right. On the other hand, the optical information (first optical information) regarding the color blur generation direction generated based on the design value of the photographing optical system has information that no color blur occurs in this direction. For this reason, if the determination is performed based only on the first optical information, the target pixel 2 is not determined to be a color blur generation region, and there is a problem that the color blur correction process is not performed.

そこで本実施形態は、撮影光学系の製造誤差(偏芯収差)を考慮して色にじみ補正処理をより高精度に行うため、単調増減判定結果と、光学情報(第1の光学情報)とに加え、製造誤差による光学性能ばらつき情報(第2の光学情報)を用いる。   Therefore, in the present embodiment, in order to perform the color blur correction process with higher accuracy in consideration of the manufacturing error (eccentric aberration) of the photographing optical system, the monotonous increase / decrease determination result and the optical information (first optical information) are included. In addition, optical performance variation information (second optical information) due to manufacturing errors is used.

ここで、図25を参照して、本実施形態における色にじみ補正判定について説明する。図25は、単調増減検出結果と光学情報と光学性能ばらつき情報とを用いた色にじみ判定処理を示す図である。   Here, with reference to FIG. 25, the color blur correction determination in the present embodiment will be described. FIG. 25 is a diagram showing color blur determination processing using the monotonous increase / decrease detection result, optical information, and optical performance variation information.

図25(a)は、撮影光学系の光学設計値、すなわち撮影光学系に製造誤差がない状態における光学情報(第1の光学情報)を示している。図25(b)は、撮影光学系の製造誤差により、高輝度被写体の下方向へ偏芯収差が発生し、光学設計値では本来発生しない方向に色にじみが発生した場合を示している。この場合、画像処理装置100は、例えば偏芯収差により色にじみが発生する方向に1、発生しない方向を0とした光学性能ばらつき情報(偏芯収差発生方向、すなわち第2の光学情報)を保持または取得する。そして、図25(b)に示される第2の光学情報を用いて、図25(a)に示される第1の光学情報を補正し、色にじみ発生方向情報(第3の光学情報)を作成する。図25(b)に示されるように、第3の光学情報は、第1の光学情報(光学情報)と第2の光学情報(偏芯収差発生方向)とを合算した情報であり、本実施形態では全方位で1となり、全方位で色にじみが発生することを示す。最後に、第3の光学情報と単調増減判定結果とを比較して、色にじみ発生領域を判定する。補正後の色にじみ発生方向に関する情報は、全方位で色にじみが発生することを示している。このため、高輝度被写体の下方においても、単調減少判定結果と光学情報の色にじみ発生方向とが互いに一致するため、色にじみ補正画素として判定される。   FIG. 25A shows the optical design value of the photographing optical system, that is, optical information (first optical information) in a state where there is no manufacturing error in the photographing optical system. FIG. 25B shows a case where decentration aberration occurs in the downward direction of the high-luminance subject due to a manufacturing error of the photographing optical system, and color blur occurs in a direction that does not originally occur in the optical design value. In this case, the image processing apparatus 100 holds, for example, optical performance variation information (eccentric aberration occurrence direction, that is, second optical information) where 1 is a direction in which color blur occurs due to decentration aberration and 0 is a direction in which color blur does not occur. Or get. Then, using the second optical information shown in FIG. 25 (b), the first optical information shown in FIG. 25 (a) is corrected to create color blur generation direction information (third optical information). To do. As shown in FIG. 25B, the third optical information is information obtained by adding the first optical information (optical information) and the second optical information (decentration aberration generation direction). In the form, it is 1 in all directions, and indicates that color bleeding occurs in all directions. Finally, the third optical information and the monotonous increase / decrease determination result are compared to determine the color blur generation region. Information about the color blur generation direction after correction indicates that color blur occurs in all directions. For this reason, the monotonic decrease determination result and the color blur generation direction of the optical information coincide with each other even under the high-brightness subject, so that it is determined as a color blur correction pixel.

また図25(c)に示されるように、画像処理装置100は、偏芯収差成分を含む実際の撮影光学系の色にじみ方向と、設計値の光学情報との差分を光学性能ばらつき情報として保持または取得してもよい。なお、光学性能ばらつき情報は、これらの形態に限定されるものではなく、撮影光学系の設計値である光学情報(第1の光学情報)に基づいて撮影光学系の実際の偏芯収差を含む(製造誤差を反映した)色にじみ発生方向に補正可能な情報であればよい。   As shown in FIG. 25C, the image processing apparatus 100 holds, as optical performance variation information, the difference between the color blur direction of the actual photographing optical system including the decentration aberration component and the optical information of the design value. Or you may acquire. The optical performance variation information is not limited to these forms, and includes actual decentration aberrations of the photographing optical system based on optical information (first optical information) that is a design value of the photographing optical system. Any information that can be corrected in the direction of occurrence of color blur (reflecting a manufacturing error) may be used.

以上のように、本実施形態では、カラー画像の色にじみ補正処理の際、各色プレーンの画素値の単調増加または単調減少判定と撮影光学系の色にじみ発生方向に関する光学情報と撮影光学系の光学性能のばらつき情報とを用いる。これにより、製造誤差を有する撮影光学系で撮影された被写体の本来の色が除去されてしまうという弊害を低減することができ、効果的に色にじみを補正することが可能となる。   As described above, in the present embodiment, in the color blur correction process of a color image, the monotonic increase or monotonic decrease determination of the pixel value of each color plane, the optical information regarding the color blur generation direction of the photographing optical system, and the optical of the photographing optical system Performance variation information is used. As a result, it is possible to reduce the adverse effect of removing the original color of the subject photographed by the photographing optical system having a manufacturing error, and to effectively correct the color blur.

ところで、偏芯収差は光軸に関して非対称に発生するため、光学性能ばらつき情報は、例えば撮影画像の右上方向と左下方向とで互いに異なる値を持つ必要がある。しかしながら、偏芯による色にじみ発生方向を、例えば撮影画像全体の重心方向として定義し、撮影画像の全画素一律に1つの偏芯収差発生方向の情報で処理することにより、処理の高速化を行ってもよい。また、偏芯収差による光学性能のばらつき情報を8方向のデータとして説明したが、この形態に限定されるものではない。例えば、前述のように、偏芯による色にじみ発生方向を、画面全体の重心方向とし、その方向を示す1つの値を光学性能ばらつき情報としてもよい。   By the way, since the eccentric aberration occurs asymmetrically with respect to the optical axis, the optical performance variation information needs to have different values in the upper right direction and the lower left direction of the captured image, for example. However, the direction of occurrence of color blur due to decentration is defined as, for example, the center of gravity direction of the entire photographed image, and processing is performed at high speed by processing all pixels uniformly in the photographed image with information on the direction of occurrence of decentration aberration. May be. Moreover, although the variation information of the optical performance due to decentration aberration has been described as data in eight directions, it is not limited to this form. For example, as described above, the color blur generation direction due to eccentricity may be the center of gravity direction of the entire screen, and one value indicating the direction may be the optical performance variation information.

また画像処理装置100は、光学情報として、色にじみ発生方向に加え、色にじみの強度に関する情報(色にじみの強度情報)を保持または取得するように構成してもよい。この場合、更に高精度に補正を行うことが可能となる。図14(b)に示されるように、一般に撮影光学系の収差による色にじみの発生量は方向により異なる。そこで、図14(d)に示されるように、色にじみの発生する方向に色にじみの発生量に関する色にじみの強度情報を追加してもよい。   Further, the image processing apparatus 100 may be configured to hold or acquire information regarding the color blur intensity (color blur intensity information) as optical information in addition to the color blur generation direction. In this case, correction can be performed with higher accuracy. As shown in FIG. 14B, in general, the amount of color blur due to the aberration of the photographing optical system differs depending on the direction. Therefore, as shown in FIG. 14D, color blur intensity information regarding the amount of color blur may be added in the direction in which color blur occurs.

続いて、図15を参照して、色にじみ強度情報を用いた場合の色にじみ判定について説明する。図15は、光学情報を用いた色にじみ判定処理を示す図であり、光学情報に色にじみ発生方向のみを持つ場合の例を示している。図中の四角で囲まれた注目画素1について色にじみ発生領域の判定を行う場合、まず、注目画素を中心に上下左右、斜め45度、斜め135度の8方向について単調減少判定を行う。図15(a)の場合、高輝度被写体が注目画素の下側に位置するため、注目画素1の単調減少が検出される方向は、上と右上、左上の3箇所が判定される。その3方向の光学情報は色にじみ発生方向を示す「1」であるため、この注目画素1は色にじみ発生領域と判定される。また、同様に注目画素2についても検出を行うと、単調減少方向は上、右上、右、右下が判定される。しかしながら、光学情報の色にじみ発生方向は、右下に発生しない方向を表す「0」を保持しているため、単調減少と光学情報より、最終的な注目画素2の色にじみ検出方向は、上、右上、右の3方向となる。注目画素1、注目画素2共に色にじみが発生すると判定されるが、図14(b)に示されるように、撮影光学系の色にじみ発生量は方向により異なるため、注目画素1と注目画素2では、色にじみの発生量が異なっている。光学情報に強度情報を持たない場合、色にじみ量を判定できないため、このあとの色にじみ補正工程において補正の強さを変えて補正を行うことができない。よって、注目画素1にあわせて色にじみ補正を強くすると注目画素2では過補正となり、注目画素2にあわせて色にじみ補正を弱くすると注目画素1では、補正不足となってしまう。   Next, with reference to FIG. 15, the color blur determination when the color blur intensity information is used will be described. FIG. 15 is a diagram illustrating a color blur determination process using optical information, and illustrates an example in which the optical information has only the color blur generation direction. When determining the color blur generation region for the pixel of interest 1 surrounded by the square in the figure, first, monotonic decrease determination is performed in eight directions, up and down, left and right, 45 degrees oblique, and 135 degrees oblique, with the pixel of interest at the center. In the case of FIG. 15A, since the high-luminance subject is located below the target pixel, the upper, upper right, and upper left are determined as directions in which the monotonic decrease of the target pixel 1 is detected. Since the optical information in the three directions is “1” indicating the color blur generation direction, the target pixel 1 is determined to be a color blur generation region. Similarly, if the pixel of interest 2 is also detected, the monotone decreasing direction is determined to be upper, upper right, right, and lower right. However, since the color blur occurrence direction of the optical information holds “0” indicating a direction that does not occur in the lower right, the final color blur detection direction of the target pixel 2 is monotonically decreased and the optical information is higher than the optical information. , Upper right and right. Although it is determined that both the target pixel 1 and the target pixel 2 cause color blurring, as shown in FIG. 14B, the amount of color blur generation in the photographing optical system differs depending on the direction. Then, the amount of color blur is different. If the optical information does not have intensity information, the amount of color blur cannot be determined, so that correction cannot be performed by changing the intensity of correction in the subsequent color blur correction process. Therefore, if the color blur correction is increased in accordance with the target pixel 1, the target pixel 2 is overcorrected, and if the color blur correction is decreased in accordance with the target pixel 2, the target pixel 1 is insufficiently corrected.

そこで、図14(d)のように、光学情報に色にじみの発生方向と、その方向の色にじみ強度情報を追加することが好ましい。図15(a)、(b)は、光学情報に色にじみ強度情報も付加した場合の色にじみ領域の判定方法を示している。図15(b)の注目画素3では、単調減少判定にて上、左上、右上の3方向が判定されるが、光学情報の色にじみ強度もそれぞれ2、3、2と強い色にじみ強度と検出することができる。図15(c)の注目画素4においては、上、右上、左下の3方向が判定されるが、その方向の光学情報の色にじみ強度はそれぞれ3、2、1と注目画素3に対して弱い色にじみ強度が検出される。よって、例えば、検出された方向の色にじみ強度の平均値により、この後の色にじみ補正処理の補正の強さ(画像を修正する強度)を変更することで、色にじみの発生量が方向で異なる場合でもより正確な補正が可能となる。   Therefore, as shown in FIG. 14D, it is preferable to add the color blur generation direction and the color blur intensity information in the direction to the optical information. FIGS. 15A and 15B show a method for determining a color blur area when color blur intensity information is also added to the optical information. In the target pixel 3 in FIG. 15B, the three directions of upper, upper left, and upper right are determined by monotonic decrease determination, but the color blur intensity of the optical information is also detected as strong color blur intensity of 2, 3, and 2, respectively. can do. In the target pixel 4 in FIG. 15C, the three directions of upper, upper right, and lower left are determined, but the color blur intensity of the optical information in that direction is 3, 2, 1 and weaker than the target pixel 3, respectively. A color blur intensity is detected. Therefore, for example, by changing the intensity of correction (image correction intensity) of the subsequent color blur correction process according to the average value of the color blur intensity in the detected direction, Even when different, more accurate correction is possible.

注目画素3では色にじみ強度の平均値が約2.3であり、また、注目画素4では色にじみ強度の平均値が2.0となり、この値を使って補正の強さを変えることが可能となる。なお本実施形態では、色にじみ強度の平均値を使用する説明を行ったが、これに限定されるものではない。例えば、色にじみ方向と検出された複数の方向の重心方向の色にじみ強度値を使用して色にじみ補正係数を変えてもよい。注目画素3では重心方向が上となるため色にじみ強度は3、注目画素4では重心方向が右上となるため色にじみ強度は2となり、この値を使って補正の強さを変えることが可能となる。重心方向を採用する場合、例えば上、右上、右、右下の4方向の重心を計算すると、重心方向に最も近い方向は右上、右の2方向となる場合がある。この場合、2方向の平均値、2方向のうち大きい方の色にじみ強度、または、2方向のうち小さいほうの色にじみ強度を用いるなどが考えられる。なお本実施形態において、平均値、重心方向を利用することについて説明したが、光学情報の色にじみ強度情報を任意に演算して色にじみ補正時の補正の強さを変えてもよい。光学情報と同様に、光学性能ばらつき情報の偏芯収差による色にじみ発生方向についても、偏芯による色にじみの発生方向に加え、色にじみの強度情報を加えることにより、補正の精度を更に高めることが可能となる。   The target pixel 3 has an average color blur intensity value of about 2.3, and the target pixel 4 has an average color blur intensity value of 2.0, which can be used to change the correction strength. It becomes. In the present embodiment, the description has been made using the average value of the color blur intensity. However, the present invention is not limited to this. For example, the color blur correction coefficient may be changed using the color blur intensity value in the centroid direction of a plurality of detected directions as the color blur direction. At the target pixel 3, the direction of the center of gravity is upward, so the color blur intensity is 3, and at the target pixel 4, the direction of the center of gravity is upper right, so the color blur intensity is 2, and this value can be used to change the correction strength. Become. When the center of gravity direction is adopted, for example, when the center of gravity in the four directions of upper, upper right, right, and lower right is calculated, the direction closest to the center of gravity direction may be the two directions of upper right and right. In this case, it is conceivable to use an average value in two directions, a color blur intensity of the larger one of the two directions, or a color blur intensity of the smaller of the two directions. In the present embodiment, the use of the average value and the direction of the center of gravity has been described. However, the color blur intensity information of the optical information may be arbitrarily calculated to change the correction strength at the time of color blur correction. As with optical information, the color blur generation direction due to decentration aberrations in optical performance variation information is further enhanced by adding color blur intensity information in addition to the direction of color blur generation due to decentration. Is possible.

次に、図26を参照して、光学性能ばらつき情報(第2の光学情報)として、偏芯による色にじみ発生方向に加えて強度情報を含む例について説明する。図26は、光学性能ばらつき情報として色にじみ強度情報を追加した説明図である。   Next, an example in which intensity information is included as optical performance variation information (second optical information) in addition to the color blur generation direction due to decentration will be described with reference to FIG. FIG. 26 is an explanatory diagram in which color blur intensity information is added as optical performance variation information.

図26(a)は、撮影光学系の光学設計値、すなわち撮影光学系に製造誤差がない状態での光学情報(設計値としての第1の光学情報)を示している。図26(b)は、撮影光学系の製造誤差により、高輝度被写体の左上方向へ偏芯収差が発生し、設計値では本来発生しない方向に色にじみが発生している場合の例である。図26(c)も同様に、撮影光学系の製造誤差により、高輝度被写体の左上方向へ偏芯収差が発生し、設計値では本来発生しない方向に色にじみが発生している場合の例である。図26(c)は、図26(b)よりも偏芯による色にじみが大きく発生している場合を示す例である。図26では、光学性能ばらつき情報(第2の光学情報)として、設計値の光学情報(第1の光学情報)に対して偏芯収差による色にじみ発生量の補正を差分値として持つ場合を示している。   FIG. 26A shows the optical design value of the photographing optical system, that is, the optical information (first optical information as the design value) when there is no manufacturing error in the photographing optical system. FIG. 26B shows an example of a case where decentration aberration occurs in the upper left direction of a high-luminance subject due to a manufacturing error of the photographing optical system, and color blur occurs in a direction that does not originally occur in the design value. Similarly, FIG. 26C shows an example in which a decentration aberration occurs in the upper left direction of a high-brightness subject due to a manufacturing error of the photographing optical system, and a color blur occurs in a direction that does not originally occur in the design value. is there. FIG. 26C shows an example in which color blurring due to eccentricity occurs more than in FIG. 26B. FIG. 26 shows a case where, as optical performance variation information (second optical information), correction of a color blur generation amount due to decentration aberration is included as a difference value with respect to optical information (first optical information) of a design value. ing.

偏芯による色にじみ発生量は、撮影光学系を構成する光学要素の製造時などの偏芯量に応じて変化し、一定ではない。すなわち、図26(b)や図26(c)に示されるように偏芯方向が一致する場合でも、色にじみ発生量は、偏芯量に応じて異なる。このため、光学性能ばらつき情報(第2の光学情報)として、偏芯による色にじみ発生方向を有するだけでは、正しい補正量を与えることができない場合もある。そこで、図26(c)に示されるように、光学性能ばらつき情報(第2の光学情報)として、偏芯による色にじみ発生方向に加えて、色にじみ発生量に関する強度情報を含ませることにより、より高精度に補正を行うことが可能となる。   The amount of occurrence of color blur due to decentering changes according to the amount of decentering at the time of manufacturing the optical element constituting the photographing optical system, and is not constant. That is, as shown in FIG. 26B and FIG. 26C, even when the eccentric directions coincide, the amount of color blur generation differs depending on the eccentric amount. For this reason, there is a case where the correct correction amount cannot be given only by having the color blur generation direction due to the eccentricity as the optical performance variation information (second optical information). Therefore, as shown in FIG. 26 (c), as the optical performance variation information (second optical information), in addition to the color blur occurrence direction due to decentration, intensity information regarding the color blur generation amount is included. Correction can be performed with higher accuracy.

なお本実施形態において、光学性能ばらつき情報(第2の光学情報)は、設計値に基づく光学情報(第1の光学情報)からの差分値であるとして説明したが、これに限定されるものではない。また本実施形態において、第2の光学情報は、8方向のデータであるとして説明したが、これに限定されるものではない。偏芯による色にじみの発生方向と強度に関する情報であって、かつ第1の光学情報を補正できる情報であれば、他の形態であってもよい。   In the present embodiment, the optical performance variation information (second optical information) has been described as a difference value from the optical information (first optical information) based on the design value. However, the present invention is not limited to this. Absent. In the present embodiment, the second optical information has been described as data in eight directions, but the present invention is not limited to this. Other forms may be used as long as they are information on the direction and intensity of occurrence of color blur due to eccentricity and can correct the first optical information.

好ましくは、修正手段104は、第1の方向(信号レベルが単調増加または単調減少する方向)と第2の方向(色にじみが発生する方向)とが複数の方向において互いに一致する場合、複数の方向における色にじみの強度に関する情報を演算して画像を修正する。より好ましくは、修正手段104は、第1の方向と第2の方向とが複数の方向において互いに一致する場合、複数の方向の重心方向における色にじみの強度に関する情報または平均値を用いて画像を修正する。   Preferably, when the first direction (the direction in which the signal level monotonously increases or decreases monotonically) and the second direction (the direction in which color blur occurs) match each other in a plurality of directions, the correcting unit 104 preferably The image is corrected by calculating information on the intensity of color blur in the direction. More preferably, when the first direction and the second direction match each other in a plurality of directions, the correcting unit 104 uses the information regarding the intensity of color blurring in the centroid direction in the plurality of directions or the average value as an image. Correct it.

続いて、図16を参照して、光学情報(第1の光学情報)の算出方法について説明する。図16は、光学情報の算出方法の説明図であり、光学情報として保持する任意の方向での、撮影光学系のGプレーンのPSF断面(実線)とBプレーンのPSF断面(点線)を示している。ここでは、Gプレーンを基準プレーンとし、Bプレーンの色にじみに関して光学情報を算出する方法について説明する。   Next, a method for calculating optical information (first optical information) will be described with reference to FIG. FIG. 16 is an explanatory diagram of a method for calculating optical information, and shows a PSF cross section (solid line) of the G plane of the photographing optical system and a PSF cross section (dotted line) of the B plane in an arbitrary direction held as optical information. Yes. Here, a method for calculating the optical information regarding the color blur of the B plane using the G plane as a reference plane will be described.

撮影光学系の色収差により、Gプレーン、Bプレーンは、それぞれの波長帯での収差により、異なったPSF形状となる。また、倍率色収差により、Gプレーン、Bプレーンは、それぞれ、ずれた位置に結像するため、それぞれのPSFのピーク位置も図16(a)に示されるように、ずれた位置で算出される。倍率色収差による各色プレーンのずれは、従来から行われている、各色プレーンに対し異なる歪曲を加える幾何学変換により補正することができる。そのため、図16(b)に示されるように、Gプレーン、BプレーンのそれぞれのPSFのピーク位置を一致させて、図の斜線部にあたる基準であるGプレーンとBプレーンのPSF面積差を色にじみ強度として採用する方法が考えられる。   Due to the chromatic aberration of the photographing optical system, the G plane and the B plane have different PSF shapes depending on the aberration in each wavelength band. Further, since the G plane and the B plane are imaged at shifted positions due to lateral chromatic aberration, the peak positions of the respective PSFs are also calculated at shifted positions as shown in FIG. The displacement of each color plane due to lateral chromatic aberration can be corrected by a conventional geometric transformation that applies different distortions to each color plane. Therefore, as shown in FIG. 16B, the PSF peak positions of the G plane and the B plane are made to coincide with each other, and the difference between the PSF areas of the G plane and the B plane, which are the hatched portions in the figure, is blurred. A method of adopting the strength can be considered.

図16(b)では、ピークよりも左側エッジの面積差よりも右側エッジの面積差が大きいため、右側エッジで大きく色にじみが発生することがわかる。この面積が小さければ色にじみは目立たないため、面積が小さい場合を色にじみが発生しない方向とすることができる。また、面積比より、色にじみ強度を決定することが可能となる。以上により、光学情報の色にじみが発生する方向や色にじみ強度を算出できるが、算出方法としてPSFの面積差を使用する方法に限定されるものではない。例えば、図16(b)において、GプレーンとBプレーンのエッジの傾き差を使用する方法が考えられる。色にじみが発生する場合、エッジの傾きは緩くなる傾向にあるため、傾き差などを利用することにより、光学情報を決定するなどしてもよい。   In FIG. 16B, the area difference of the right edge is larger than the area difference of the left edge than the peak, so that it can be seen that the color blur is greatly generated at the right edge. If this area is small, the color blur is inconspicuous, and therefore, when the area is small, the direction in which the color blur does not occur can be set. Further, the color blur intensity can be determined from the area ratio. As described above, the direction in which color blur occurs in the optical information and the color blur intensity can be calculated, but the calculation method is not limited to the method using the area difference of the PSF. For example, in FIG. 16B, a method of using the difference in inclination between the edges of the G plane and the B plane can be considered. When color blurring occurs, the inclination of the edge tends to be gentle, and thus optical information may be determined by using a difference in inclination.

本実施例では、色にじみ強度を計算する際にピーク値を一致させる方法で説明しているが、ピーク値ではなくPSFの重心を一致させて色にじみ強度を算出してもよい。このように本実施形態によれば、光学情報の色にじみ発生方向と、色にじみ強度情報を算出することができる。   In this embodiment, the method of matching the peak values when calculating the color blur intensity is described. However, the color blur intensity may be calculated by matching the center of gravity of the PSF instead of the peak value. As described above, according to the present embodiment, it is possible to calculate the color blur generation direction and the color blur intensity information of the optical information.

図1Bに戻り、ステップS6において、画像処理装置100(修正手段104)は、ステップS5にて判定手段103により色にじみ領域と判定された領域(第2の領域)に対し、色にじみを補正する処理(画像を修正する処理)を行う(色にじみ補正工程)。すなわち修正手段104は、色にじみを低減させるように画像を修正する。   Referring back to FIG. 1B, in step S6, the image processing apparatus 100 (correction unit 104) corrects color blur for the region (second region) determined as the color blur region by the determination unit 103 in step S5. Processing (processing for correcting an image) is performed (color blur correction step). That is, the correcting unit 104 corrects the image so as to reduce color blur.

図17は、青色にじみの典型的な画素値変化を示す図である。図17において、横軸は距離(画像上の断面)であり、縦軸はBプレーン及びGプレーンの画素値である。図17では、左端に飽和輝度を超える高輝度被写体が存在するものとする。そして、本来明るくない光源周囲も、収差やフレアにより光源からにじんだ光により、画素値変化の裾が指数関数的に拡がる。   FIG. 17 is a diagram illustrating a typical pixel value change of blue blur. In FIG. 17, the horizontal axis is the distance (cross section on the image), and the vertical axis is the pixel value of the B plane and the G plane. In FIG. 17, it is assumed that there is a high brightness subject exceeding the saturation brightness at the left end. Further, the tail of the pixel value change exponentially spreads around the light source, which is originally not bright, due to light that oozes from the light source due to aberration or flare.

基準プレーンであるGプレーンでもにじみは無いわけではなく、ある程度の拡がりが存在する。しかし、それは色にじみ除去対象のBプレーンに比べると小さい。また、撮像素子は一定の飽和レベル以上の画素値を測定することはできない。このような画素値変化において、色にじみ除去対象のBプレーンの強度が基準プレーンであるGプレーンの強度を上回ると、青色にじみとなる。   The G plane which is the reference plane is not free from bleeding, but has a certain extent. However, it is smaller than the B-plane that is subject to color blur removal. Further, the image sensor cannot measure pixel values above a certain saturation level. In such a pixel value change, if the intensity of the B-plane to be subjected to color bleeding removal exceeds the intensity of the G-plane that is the reference plane, blue bleeding occurs.

本実施形態では、画像処理装置100は、色にじみ除去対象のBプレーンの画素値変化の傾きによりBプレーンのにじみ量を推定する。そこで、Bプレーンの輝度傾斜Bleaの絶対値に係数k1を乗じることにより、以下の式(6)で表されるように第1の推定にじみ量E1とする。   In the present embodiment, the image processing apparatus 100 estimates the amount of blurring of the B plane based on the slope of the change in pixel value of the B plane that is subject to color blur removal. Therefore, by multiplying the absolute value of the brightness gradient Blea of the B plane by the coefficient k1, the first estimated blur amount E1 is obtained as expressed by the following equation (6).

E1=k1|Blea| … (6)
式(6)において、k1は正値である。ただし、Bプレーンが飽和している領域A1では画素値傾斜は0になってしまい飽和前の輝度傾斜が得られない。
E1 = k1 | Blea | (6)
In Expression (6), k1 is a positive value. However, in the area A1 where the B plane is saturated, the pixel value gradient becomes 0, and the luminance gradient before saturation cannot be obtained.

そこで、Bプレーンが飽和している領域A1に対する推定にじみ量E2を、以下の式(7)に示されるように、Gプレーンの画素値変化の輝度傾斜Gleaに基づいて推定する。   Therefore, the estimated bleeding amount E2 for the region A1 where the B plane is saturated is estimated based on the luminance gradient Glea of the pixel value change of the G plane, as shown in the following equation (7).

E2=k2|Glea| … (7)
式(7)において、k2は正値である。
E2 = k2 | Glea | (7)
In Expression (7), k2 is a positive value.

次に、Bプレーンの画素値に対する非線形変換を行い、飽和度Sを生成する。この非線形変換は、Bプレーンが飽和しているか否かを示すものであり、Bプレーンの強度が飽和している領域では飽和度Sが1となり、Bプレーンの強度が小さい領域では飽和度Sは0となる。飽和度Sは0、1の2値でもよいが、図18に示されるように、飽和度Sは0〜1にかけて連続的に変化する値としてもよい。図18は、Bプレーンの画素値に対する非線形変換の特性図である。   Next, nonlinear conversion is performed on the pixel values of the B plane to generate the saturation S. This non-linear transformation indicates whether or not the B plane is saturated. In the region where the intensity of the B plane is saturated, the saturation S is 1, and in the region where the intensity of the B plane is low, the saturation S is 0. Although the saturation S may be a binary value of 0 or 1, the saturation S may be a value that continuously varies from 0 to 1 as shown in FIG. FIG. 18 is a characteristic diagram of nonlinear conversion with respect to the pixel value of the B plane.

そして、上記の生成した飽和度Sにより、上記のように算出した推定にじみ量E1または推定にじみ量E2を選択する。すなわち、飽和度Sが0、1の2値であれば新たな推定にじみ量Eを、
E=E1 (S=0の場合)
E=E2 (S=1の場合)
とする。また、飽和度Sが0〜1にかけて連続的に変化する値であれば、新たな推定にじみ量Eを、
E=(1−S)E1+SE2
とする。
Based on the generated saturation S, the estimated blur amount E1 or the estimated blur amount E2 calculated as described above is selected. That is, if the saturation S is a binary value of 0 and 1, a new estimated bleeding amount E is obtained.
E = E1 (when S = 0)
E = E2 (when S = 1)
And If the saturation S is a value that continuously changes from 0 to 1, a new estimated bleeding amount E is
E = (1-S) E1 + SE2
And

次に、上記の推定にじみ量Eを修正し、実際に除去する量E’を決定する。推定にじみ量(除去量)は、一定のモデルに沿ったものであり、実際のにじみ量とは必ずしも一致しない。例えば、同じBプレーンに検出される光であっても、波長450nmの光と波長400nmの光ではにじみ方が変化するが、ステップS5(色にじみ判定工程)では、これを考慮していない。推定にじみ量(除去量)が過小である場合、青色にじみの除去後も若干の青みが残る。一方、推定にじみ量(除去量)が過大である場合、灰色の背景に対してBプレーンを減らし過ぎ、黄緑色になる場合がある。   Next, the estimated blur amount E is corrected to determine the amount E ′ to be actually removed. The estimated bleeding amount (removal amount) is in line with a certain model and does not necessarily match the actual bleeding amount. For example, even in the case of light detected on the same B plane, the blurring method varies between light having a wavelength of 450 nm and light having a wavelength of 400 nm, but this is not considered in step S5 (color blur determination step). When the estimated amount of blurring (removal amount) is too small, a slight amount of blueness remains after the removal of blue blurring. On the other hand, if the estimated blurring amount (removal amount) is excessive, the B plane may be excessively reduced with respect to the gray background, resulting in a yellowish green color.

特に後者(黄緑色になる場合)は、不自然で観察者に大きな違和感を与える。そこで、ステップS6(色にじみ補正工程)では、一定の色相範囲内でのみ、にじみ除去が作用するよう制限する。このため、まずステップS6において、画素の色度を計算する。R、G、Bの各プレーンの強度に対し、以下の式(8)が成立する。   In particular, the latter (when it becomes yellowish green) is unnatural and gives the viewer a great sense of discomfort. Accordingly, in step S6 (color blur correction process), the blur removal is limited to operate only within a certain hue range. For this reason, first, in step S6, the chromaticity of the pixel is calculated. The following equation (8) is established for the strengths of the R, G, and B planes.

図19は、式(8)のaを横軸とし、bを縦軸とする色度座標ab面である。図19に示されるように、青色は色度座標ab面の斜線で示す第4象限にある(尚、赤、黄、紫は第1象限、緑、白は第2象限、青緑は第3象限にある)。Bプレーンの強度から推定にじみ量Eを除去すると、B=B−Eとなり、色度座標ab面上では点線矢印のように左上方向へ移動する。矢印の始点が推定にじみ量Eの除去前の色度であり、終点が推定にじみ量Eの除去後の色度である。このことから、作用する色相範囲をa>0かつb<0に制限すると、以下の式(9)が成立する。   FIG. 19 is a chromaticity coordinate ab plane in which a in equation (8) is the horizontal axis and b is the vertical axis. As shown in FIG. 19, blue is in the fourth quadrant indicated by the diagonal lines on the chromaticity coordinate ab plane (note that red, yellow and purple are the first quadrant, green and white are the second quadrant, and blue-green is the third quadrant. In the quadrant). When the estimated blur amount E is removed from the intensity of the B plane, B = B−E, and the chromaticity coordinate ab plane moves in the upper left direction as indicated by a dotted arrow. The starting point of the arrow is the chromaticity before the estimated blur amount E is removed, and the end point is the chromaticity after the estimated blur amount E is removed. Therefore, when the working hue range is limited to a> 0 and b <0, the following equation (9) is established.

B>0.22R+0.68G かつ B>−1.84R+3.30G … (9)
このため、式(9)を満たさない画素に対し、実際に除去する除去量E’=0とし、色にじみ除去対象から外す。これにより、式(9)を満たさない画素は、画素値が影響を受けることがない。図19では、斜線で示す第4象限の領域のみが除去対象となる。
B> 0.22R + 0.68G and B> −1.84R + 3.30G (9)
For this reason, the pixel E that does not satisfy Expression (9) is set to the removal amount E ′ = 0 that is actually removed, and is excluded from the color blur removal target. As a result, the pixel value of the pixel that does not satisfy Expression (9) is not affected. In FIG. 19, only the region in the fourth quadrant indicated by diagonal lines is the removal target.

更に、式(9)を満たす画素に対しても、除去量E’を、以下の式(10)を満たすように設定する。   Further, the removal amount E ′ is set so as to satisfy the following expression (10) even for a pixel satisfying the expression (9).

E’=min(E,B−(0.22R+0.68G),B−(−1.84R+3.30G)) … (10)
これにより、除去量E’の除去による色度変化は、図19中の実線矢印で示されるように、第4象限内に留まるようになる。
E ′ = min (E, B− (0.22R + 0.68G), B − (− 1.84R + 3.30G)) (10)
As a result, the change in chromaticity due to the removal of the removal amount E ′ remains in the fourth quadrant as indicated by the solid line arrow in FIG.

なお本実施形態において、色度座標ab面の第4象限で制限したが、これに限定されるものではなく、任意の角度で制限してもよい。このとき、以下の式(11)を満たす必要がある。   In the present embodiment, the restriction is made in the fourth quadrant of the chromaticity coordinate ab plane. However, the present invention is not limited to this, and the restriction may be made at an arbitrary angle. At this time, it is necessary to satisfy the following formula (11).

B>r1・G+r2・R かつ B>r3・G+r4・R … (11)
式(11)において、r1〜r4は制限角θを用いて、以下の式(12)のように算出される。色相制限は、色度座標ab面の原点を通る2本の直線で定義され、θ1、θ2はその2本の直線を表す角度である。
B> r1 · G + r2 · R and B> r3 · G + r4 · R (11)
In the equation (11), r1 to r4 are calculated as the following equation (12) using the limit angle θ. The hue limit is defined by two straight lines passing through the origin of the chromaticity coordinate ab plane, and θ1 and θ2 are angles representing the two straight lines.

これにより、色相制限範囲を超えてBプレーンが減少するのを防ぐことができる。以上のようにして算出した、色にじみの除去対象とする色プレーンの除去量E’を除去量プレーンとして保持し、色にじみ補正処理を行う。除去量プレーンに対しては、上記のローパスフィルタを適用する。なお本実施形態では、色相制限に簡易的なa*b*平面を用いているが、これに限定されるものではなく、3×3のRGB→YUVマトリクスを用いてuv平面にて色相制限処理を行っても構わない。   As a result, it is possible to prevent the B plane from decreasing beyond the hue limit range. The color plane removal amount E ′ calculated as described above is retained as the removal amount plane, and color blur correction processing is performed. The above-described low-pass filter is applied to the removal amount plane. In this embodiment, a simple a * b * plane is used for hue restriction. However, the present invention is not limited to this, and hue restriction processing is performed on the uv plane using a 3 × 3 RGB → YUV matrix. You may do.

上記の除去量E’をBプレーンの強度から差し引くことにより、新たなBプレーンを作成する。色にじみ除去対象としては、色にじみ判定ステップS4にて色にじみ領域と判定された画素のみとする。従って、新たなBプレーンの強度は、単調増減判定フラグが「1」ならば、
B=B−E’
単調増減判定フラグが「0」ならば、
B=B
となる。このように、図1のステップS7において、画像処理装置100(出力手段105)は、Bプレーンを修正したカラー画像を出力画像として出力する。
A new B plane is created by subtracting the removal amount E ′ from the strength of the B plane. Only the pixels that have been determined as the color blur area in the color blur determination step S4 are to be removed from the color blur. Therefore, the strength of the new B plane is as follows:
B = BE '
If the monotonous increase / decrease determination flag is “0”,
B = B
It becomes. As described above, in step S7 in FIG. 1, the image processing apparatus 100 (output unit 105) outputs a color image obtained by correcting the B plane as an output image.

ここで、図7に示される画像内の3×3画素のある領域における単調増減判定結果が、図19に示されるように隣接する画素で単調増減判定フラグの値が切り替わる場合を考える。このような場合、画素の境界部では除去量がばたつき(隣接する画素で除去される場合と除去されない場合が混在すること)、画素値の変化が急峻になり、不自然で観察者に違和感を与える場合がある。そこで、生成した除去量プレーンに対してローパスフィルタを適用する方法が有効である。   Here, consider a case where the monotonic increase / decrease determination result in a certain region of 3 × 3 pixels in the image shown in FIG. 7 switches the value of the monotonic increase / decrease determination flag in adjacent pixels as shown in FIG. In such a case, the removal amount fluctuates in the boundary portion of the pixel (a case where the pixel is removed by a neighboring pixel and a case where the pixel is not removed is mixed), and the change of the pixel value becomes steep, unnatural and uncomfortable to the observer. May give. Therefore, a method of applying a low-pass filter to the generated removal amount plane is effective.

また、以下の式(13)により、単調増減判定結果プレーンを用いて色プレーンの各画素のゲインを算出し、除去量に乗算することで、境界部(単調増減判定結果プレーン)に対するスムージング処理を行ってもよい。   Also, the following equation (13) calculates the gain of each pixel of the color plane using the monotonic increase / decrease determination result plane, and multiplies the removal amount to perform smoothing processing on the boundary portion (monotonous increase / decrease determination result plane). You may go.

図20に示される例において、画素pの除去量E’’は、以下の式(14)のように表される。   In the example shown in FIG. 20, the removal amount E ″ of the pixel p is expressed as the following Expression (14).

以上の方法で、色にじみのみを違和感なく除去することが可能となる。   With the above method, it is possible to remove only the color blur without a sense of incongruity.

なお、図1Bを参照して説明した本実施形態の画像処理方法(色にじみ補正処理)において、各ステップの順序は、図1Bに示されるステップの順序に限定されるものではく、適宜変更可能である。例えば、図1B中のステップS2、S3、S4の順序を、ステップS4、S3、S2の順に変更してもよい。   In the image processing method (color blur correction process) of this embodiment described with reference to FIG. 1B, the order of the steps is not limited to the order of steps shown in FIG. 1B, and can be changed as appropriate. It is. For example, the order of steps S2, S3, and S4 in FIG. 1B may be changed to the order of steps S4, S3, and S2.

次に、本実施形態の変形例について説明する。図1Bに示されるフローチャートでは、光学設計値に基づく光学情報(第1の光学情報)と光学性能ばらつき情報(第2の光学情報)とが互いに独立した情報であるとして、すなわち第1の光学情報と第2の光学情報の両方を取得する場合について説明している。ただし本実施形態は、これに限定されるものではなく、光学設計値に基づく光学情報と製造誤差による光学性能のばらつき情報とを含む情報を光学情報(第3の光学情報)として取得してもよい。   Next, a modification of this embodiment will be described. In the flowchart shown in FIG. 1B, it is assumed that the optical information (first optical information) based on the optical design value and the optical performance variation information (second optical information) are information independent from each other, that is, the first optical information. The case where both the second optical information and the second optical information are acquired is described. However, the present embodiment is not limited to this, and information including optical information based on optical design values and variation information on optical performance due to manufacturing errors may be acquired as optical information (third optical information). Good.

図23は、本実施形態における変形例としての画像処理方法のフローチャートである。図23の各ステップは、画像処理装置100の指令に基づいて、すなわち画像処理装置100の各手段により実行される。図23のフローチャートは、ステップS3、S4に代えて、ステップS13が設けられている点で、図1Bのフローチャートと異なる。図23中のステップS11、S12、S14〜S16は、図1B中のステップS1、S2、S5〜S7とそれぞれ同様であるため、それらの説明は省略する。   FIG. 23 is a flowchart of an image processing method as a modification of the present embodiment. Each step in FIG. 23 is executed based on a command from the image processing apparatus 100, that is, by each unit of the image processing apparatus 100. The flowchart in FIG. 23 differs from the flowchart in FIG. 1B in that step S13 is provided instead of steps S3 and S4. Steps S11, S12, and S14 to S16 in FIG. 23 are the same as steps S1, S2, and S5 to S7 in FIG.

ステップS13において、画像処理装置100(取得手段106)は、撮影光学系の製造誤差を反映させた、撮影光学系の色にじみ(色にじみ発生情報)に関する光学情報(第3の光学情報)を取得する。ステップS13にて取得される第3の光学情報は、図1BのステップS3にて取得される第1の光学情報と、図1BのステップS4にて取得される第2の光学情報とを反映させて得られた光学情報(光学設計値に製造誤差を反映させた情報)に相当する。第3の光学情報は、記憶手段(例えば、記憶手段107または記憶部208)に記憶させておくことができる。そしてステップS14において、判定手段103は、第3の光学情報と第1の領域に関する情報とに基づいて、第2の領域を判定する。なお、図23のフローチャートにおいても、各ステップの順序は適宜変更可能である。   In step S <b> 13, the image processing apparatus 100 (acquisition unit 106) acquires optical information (third optical information) related to color blur (color blur occurrence information) of the photographing optical system that reflects a manufacturing error of the photographing optical system. To do. The third optical information acquired in step S13 reflects the first optical information acquired in step S3 of FIG. 1B and the second optical information acquired in step S4 of FIG. 1B. It corresponds to the optical information obtained in this way (information in which a manufacturing error is reflected in the optical design value). The third optical information can be stored in a storage unit (for example, the storage unit 107 or the storage unit 208). In step S14, the determination unit 103 determines the second area based on the third optical information and the information related to the first area. In addition, also in the flowchart of FIG. 23, the order of each step can be changed suitably.

次に、図21を参照して、本発明の実施例1における撮像装置について説明する。図21は、本実施例における撮像装置200の構成図である。撮像装置200には、撮影画像の色にじみ補正処理(上述の画像処理方法)を行う画像処理プログラムがインストールされており、この色にじみ補正処理は撮像装置200の内部の画像処理部204(画像処理装置)により実行される。   Next, with reference to FIG. 21, an imaging apparatus according to Embodiment 1 of the present invention will be described. FIG. 21 is a configuration diagram of the imaging apparatus 200 in the present embodiment. The imaging apparatus 200 is installed with an image processing program for performing color blur correction processing (the above-described image processing method) of a captured image. This color blur correction processing is performed by an image processing unit 204 (image processing) in the imaging apparatus 200. Device).

撮像装置200は、撮影光学系201(レンズ)および撮像装置本体(カメラ本体)を備えて構成されている。撮影光学系201は、絞り201aおよびフォーカスレンズ201bを備え、撮像装置本体(カメラ本体)と一体的に構成されている。ただし本実施例はこれに限定されるものではなく、撮影光学系201が撮像装置本体に対して交換可能に装着される撮像装置にも適用可能である。   The imaging device 200 includes a photographing optical system 201 (lens) and an imaging device main body (camera main body). The photographing optical system 201 includes a diaphragm 201a and a focus lens 201b, and is configured integrally with an imaging apparatus main body (camera main body). However, the present embodiment is not limited to this, and can also be applied to an imaging apparatus in which the imaging optical system 201 is replaceably attached to the imaging apparatus main body.

撮像素子202は、撮影光学系201を介して形成された被写体像(光学像)を光電変換して画像(撮影画像)を得る。すなわち被写体像は、撮像素子202により光電変換が行われてアナログ信号(電気信号)に変換される。そして、このアナログ信号はA/Dコンバータ203によりデジタル信号に変換され、このデジタル信号は画像処理部204に入力される。   The image sensor 202 photoelectrically converts a subject image (optical image) formed via the photographing optical system 201 to obtain an image (captured image). That is, the subject image is photoelectrically converted by the image sensor 202 and converted into an analog signal (electric signal). The analog signal is converted into a digital signal by the A / D converter 203, and the digital signal is input to the image processing unit 204.

画像処理部204(画像処理装置100に相当する)は、このデジタル信号に対して所定の処理を行うとともに、上述の色にじみ補正処理を行う。まず画像処理部204(取得手段106)は、状態検知部207から撮像装置200(撮影光学系201)の撮影条件(撮影条件情報)を取得する。撮影条件情報とは、絞り、撮影距離、または、ズームレンズの焦点距離等に関する情報である。状態検知部207は、システムコントローラ210から直接に撮影条件情報を取得することができるが、これに限定されるものではない。例えば撮影光学系201に関する撮影条件情報は、光学系制御部206から取得することもできる。なお、本実施例の色にじみ補正処理(画像処理方法)は、図1を参照して説明したとおりである。   An image processing unit 204 (corresponding to the image processing apparatus 100) performs predetermined processing on the digital signal and performs the above-described color blur correction processing. First, the image processing unit 204 (acquiring unit 106) acquires the imaging conditions (imaging condition information) of the imaging apparatus 200 (imaging optical system 201) from the state detection unit 207. The shooting condition information is information related to an aperture, a shooting distance, a focal length of a zoom lens, and the like. The state detection unit 207 can acquire the shooting condition information directly from the system controller 210, but is not limited thereto. For example, shooting condition information related to the shooting optical system 201 can be acquired from the optical system control unit 206. Note that the color blur correction process (image processing method) of this embodiment is as described with reference to FIG.

撮影光学系201の色にじみ発生方向に関する光学情報(第1の光学情報および第2の光学情報、または、第3の光学情報)は、記憶部208に保持することができる。画像処理部204は、撮影条件情報に該当する光学情報(第1の光学情報および第2の光学情報、または、第3の光学情報)を記憶部208より取得し、色にじみ補正処理を行い、その出力画像は、画像記録媒体209に所定のフォーマットで保存される。表示部205には、本実施例の色にじみ補正処理を行った画像に表示用の所定の処理を行った画像が表示される。ただし本実施例はこれに限定されるものではなく、高速表示のために簡易処理を行った画像を表示部205に表示するように構成してもよい。   Optical information (first optical information and second optical information or third optical information) regarding the color blur generation direction of the photographing optical system 201 can be held in the storage unit 208. The image processing unit 204 acquires optical information (first optical information and second optical information, or third optical information) corresponding to the shooting condition information from the storage unit 208, performs color blur correction processing, The output image is stored in the image recording medium 209 in a predetermined format. The display unit 205 displays an image obtained by performing a predetermined display process on the image subjected to the color blur correction process of the present embodiment. However, the present embodiment is not limited to this, and an image subjected to simple processing for high-speed display may be displayed on the display unit 205.

本実施例における一連の制御はシステムコントローラ210により行われ、撮影光学系201の機械的な駆動はシステムコントローラ210の指示に基づいて光学系制御部206により行われる。光学系制御部206は、Fナンバーの撮影状態設定として、絞り201aの開口径を制御する。また光学系制御部206は、被写体距離に応じてピント調整を行うため、不図示のオートフォーカス(AF)機構や手動のマニュアルフォーカス機構により、フォーカスレンズ201bの位置を制御する。なお、絞り201aの開口径制御やマニュアルフォーカスなどの機能は、撮像装置200の仕様に応じて実行しなくてもよい。また、撮影光学系201には、ローパスフィルタや赤外線カットフィルタなどの光学素子を設けることができる。   A series of controls in this embodiment is performed by the system controller 210, and the imaging optical system 201 is mechanically driven by the optical system control unit 206 based on an instruction from the system controller 210. The optical system control unit 206 controls the aperture diameter of the aperture 201a as the F number shooting state setting. The optical system control unit 206 controls the position of the focus lens 201b by an unillustrated autofocus (AF) mechanism or a manual manual focus mechanism in order to perform focus adjustment according to the subject distance. Note that functions such as aperture diameter control and manual focus of the aperture 201a may not be executed according to the specifications of the imaging apparatus 200. The photographing optical system 201 can be provided with optical elements such as a low-pass filter and an infrared cut filter.

次に、図22を参照して、本発明の実施例2における画像処理システムについて説明する。図22は、本実施例における画像処理システム300の構成図である。なお、本実施例の色にじみ補正処理(画像処理方法)は、図1を参照して説明したとおりであるため、その説明は省略する。   Next, an image processing system according to the second embodiment of the present invention will be described with reference to FIG. FIG. 22 is a configuration diagram of an image processing system 300 in the present embodiment. Note that the color blur correction process (image processing method) of the present embodiment is as described with reference to FIG.

図22において、画像処理装置301(画像処理装置100に相当する)は、本実施例の画像処理方法をコンピュータに実行させるための画像処理ソフトウエア306を搭載したコンピュータ機器である。撮像機器302は、カメラ、顕微鏡、内視鏡、または、スキャナなどの撮像装置である。記憶媒体303は、半導体メモリ、ハードディスク、または、ネットワーク上のサーバなど、撮影画像を記憶した記憶手段である。   In FIG. 22, an image processing apparatus 301 (corresponding to the image processing apparatus 100) is a computer device equipped with image processing software 306 for causing a computer to execute the image processing method of this embodiment. The imaging device 302 is an imaging device such as a camera, a microscope, an endoscope, or a scanner. The storage medium 303 is a storage unit that stores captured images, such as a semiconductor memory, a hard disk, or a server on a network.

画像処理装置301は、撮像機器302または記憶媒体303から撮影画像データを取得し、所定の画像処理を行った画像データを出力機器305、撮像機器302、記憶媒体303のいずれか一つまたは複数に出力する。また、その出力先を画像処理装置301に内蔵された記憶部に保存することもできる。出力機器305は、例えばプリンタである。また、ネットワークまたはCD−ROM307などの記憶媒体から画像処理ソフトウエア306を画像処理装置301にインストールすることもできる。   The image processing apparatus 301 acquires captured image data from the imaging device 302 or the storage medium 303, and outputs the image data subjected to predetermined image processing to one or more of the output device 305, the imaging device 302, and the storage medium 303. Output. Further, the output destination can be stored in a storage unit built in the image processing apparatus 301. The output device 305 is a printer, for example. Further, the image processing software 306 can be installed in the image processing apparatus 301 from a network or a storage medium such as a CD-ROM 307.

画像処理装置301には、モニタである表示機器304が接続されている。このため、ユーザは表示機器304を通して画像処理作業を行うとともに、補正された画像を評価することができる。画像処理ソフトウエア306は、本実施例の色にじみ補正処理(画像処理方法)を行うほか、必要に応じて現像やその他の画像処理を行う。   A display device 304 that is a monitor is connected to the image processing apparatus 301. Therefore, the user can perform the image processing work through the display device 304 and evaluate the corrected image. The image processing software 306 performs color blur correction processing (image processing method) of the present embodiment, and performs development and other image processing as necessary.

なお、本実施例における画像処理を行うためのデータの内容や機器間での受け渡しなどに関する情報(補正情報)については、個々の画像データに付帯させることが好ましい。必要な補正情報を画像データに付帯させることで、本実施例の画像処理装置を搭載した機器であれば、適切に本実施例の補正処理を行うことが可能である。   It should be noted that information (correction information) related to the contents of data for image processing and the transfer between devices in this embodiment is preferably attached to individual image data. By adding necessary correction information to the image data, the correction processing of the present embodiment can be appropriately performed as long as the device is equipped with the image processing apparatus of the present embodiment.

各実施例によれば、撮影光学系の色にじみ発生方向に関する光学情報と光学性能ばらつき情報とを保持し、単調増減検出手段の結果、光学情報と光学性能ばらつき情報とに基づいて色にじみ補正領域を決定する。これにより、被写体の色を除去する弊害を低減することができ、高品質な画像を得ることが可能となる。従って、各実施例によれば、良好な画像回復処理が可能な画像処理方法、画像処理装置、撮像装置、および、画像処理プログラムを提供することができる。   According to each embodiment, the optical blur related to the color blur generation direction of the photographing optical system and the optical performance variation information are held, and the color blur correction region is based on the optical information and the optical performance variation information as a result of the monotonous increase / decrease detection means To decide. As a result, the adverse effect of removing the color of the subject can be reduced, and a high-quality image can be obtained. Therefore, according to each embodiment, it is possible to provide an image processing method, an image processing apparatus, an imaging apparatus, and an image processing program capable of performing a good image restoration process.

なお、撮影光学系の色にじみ発生方向に関する光学情報は、本実施例の画像処理装置を搭載した機器の記録部から読み出す方法だけでなく、ネットワークを介して取得してもよいし、PCやカメラ、レンズ等から情報を取得してもよい。   Note that the optical information related to the color blur generation direction of the photographing optical system may be acquired through a network as well as a method of reading out from a recording unit of a device equipped with the image processing apparatus of the present embodiment, or may be a PC or a camera. Information may be acquired from a lens or the like.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

各実施例において、カラー画像の色にじみ補正処理の際、各色プレーンの画素値の単調増減判定情報、撮影光学系の色にじみ発生方向に関する情報、および、撮影光学系の光学性能のばらつき情報を用いる。これにより、製造誤差を有する撮影光学系で撮影された被写体に対し、被写体本来の色を除去する弊害を低減しつつ、効果的に色にじみを補正することが可能となる。従って、各実施例によれば、光学系の製造誤差による影響を低減するとともに、カラー画像における色にじみを効果的に低減可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供することができる。   In each embodiment, when performing color blur correction processing of a color image, monotonic increase / decrease determination information of pixel values of each color plane, information on the color blur occurrence direction of the photographing optical system, and variation information on optical performance of the photographing optical system are used. . As a result, it is possible to effectively correct the color blur while reducing the adverse effect of removing the original color of the subject on the subject photographed by the photographing optical system having a manufacturing error. Therefore, according to each embodiment, an image processing apparatus, an imaging apparatus, an image processing method, an image processing program, and an image processing apparatus capable of effectively reducing color blur in a color image while reducing the influence due to manufacturing errors of the optical system, and A storage medium can be provided.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

100 画像処理装置
102 検出手段
103 判定手段
104 修正手段
DESCRIPTION OF SYMBOLS 100 Image processing apparatus 102 Detection means 103 Determination means 104 Correction means

Claims (17)

複数のカラーフィルタを備えた撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出する検出手段と、
撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定する判定手段と、
前記色にじみを低減させるように前記画像を修正する修正手段と、を有することを特徴とする画像処理装置。
A signal level of a color plane corresponding to at least one color filter of an image obtained from an image sensor having a plurality of color filters or a signal level of a luminance plane generated from the image is first in a predetermined section. Detecting means for detecting a first region monotonously increasing or monotonically decreasing in the direction of
Based on the first optical information relating to the color blur of the photographing optical system, the second optical information relating to the variation of chromatic aberration that is asymmetric with respect to the optical axis of the photographing optical system, and the information relating to the first region, the color blur. Determining means for determining the second region where the
An image processing apparatus comprising: correction means for correcting the image so as to reduce the color blur.
前記第1の光学情報は、前記撮影光学系の光学設計値に関する情報であり、
前記第2の光学情報は、前記撮影光学系の製造誤差に関する情報であることを特徴とする請求項1に記載の画像処理装置。
The first optical information is information relating to an optical design value of the photographing optical system,
The image processing apparatus according to claim 1, wherein the second optical information is information relating to a manufacturing error of the photographing optical system.
前記第1の光学情報および前記第2の光学情報を記憶する記憶手段を更に有し、
前記判定手段は、
前記第1の光学情報と前記第2の光学情報とに基づいて、前記撮影光学系の前記色にじみに関する第3の光学情報を取得し、
前記第3の光学情報と前記第1の領域に関する情報とに基づいて、前記第2の領域を判定することを特徴とする請求項1または2に記載の画像処理装置。
And further comprising storage means for storing the first optical information and the second optical information,
The determination means includes
Based on the first optical information and the second optical information, obtain third optical information related to the color blur of the photographing optical system,
The image processing apparatus according to claim 1, wherein the second area is determined based on the third optical information and information related to the first area.
前記記憶手段は、撮影条件ごとに前記第1の光学情報および前記第2の光学情報を記憶していることを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the storage unit stores the first optical information and the second optical information for each photographing condition. 前記撮影条件は、前記撮影光学系の焦点距離、被写体距離、絞り値の少なくとも一つを含むことを特徴とする請求項4に記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the photographing condition includes at least one of a focal length, a subject distance, and an aperture value of the photographing optical system. 前記撮影光学系の色にじみに関する第3の光学情報を記憶する記憶手段を更に有し、
前記第3の光学情報は、前記第1の光学情報と前記第2の光学情報とを反映させて得られた情報であり、
前記判定手段は、前記第3の光学情報と前記第1の領域に関する情報とに基づいて、前記第2の領域を判定することを特徴とする請求項1または2に記載の画像処理装置。
Storage means for storing third optical information relating to color blur of the photographing optical system;
The third optical information is information obtained by reflecting the first optical information and the second optical information,
The image processing apparatus according to claim 1, wherein the determination unit determines the second area based on the third optical information and information related to the first area.
前記第3の光学情報は、前記撮影光学系の前記色にじみが発生する第2の方向に関する情報であることを特徴とする請求項3乃至6のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the third optical information is information related to a second direction in which the color blur of the photographing optical system occurs. 前記判定手段は、前記第1の方向と前記第2の方向とを比較することにより前記第2の領域を判定することを特徴とする請求項7に記載の画像処理装置。   The image processing apparatus according to claim 7, wherein the determination unit determines the second area by comparing the first direction with the second direction. 前記判定手段は、前記第1の方向と前記第2の方向とが互いに一致する場合、前記第1の領域が前記第2の領域であると判定することを特徴とする請求項8に記載の画像処理装置。   9. The determination unit according to claim 8, wherein the determination unit determines that the first region is the second region when the first direction and the second direction coincide with each other. Image processing device. 前記第3の光学情報は、前記撮影光学系の前記色にじみの強度に関する情報であることを特徴とする請求項3乃至9のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the third optical information is information related to the intensity of the color blur of the photographing optical system. 前記修正手段は、前記色にじみの前記強度に関する情報に基づいて、前記画像を修正する強度を変更することを特徴とする請求項10に記載の画像処理装置。   The image processing apparatus according to claim 10, wherein the correction unit changes a strength for correcting the image based on information on the strength of the color blur. 前記修正手段は、前記第1の方向と前記第2の方向とが複数の方向において互いに一致する場合、該複数の方向における色にじみの強度に関する情報を演算して前記画像を修正することを特徴とする請求項9に記載の画像処理装置。   When the first direction and the second direction coincide with each other in a plurality of directions, the correcting unit calculates the information on the intensity of color blur in the plurality of directions and corrects the image. The image processing apparatus according to claim 9. 前記修正手段は、前記第1の方向と前記第2の方向とが複数の方向において互いに一致する場合、該複数の方向の重心方向における色にじみの強度に関する情報を用いて前記画像を修正することを特徴とする請求項9に記載の画像処理装置。   When the first direction and the second direction coincide with each other in a plurality of directions, the correction unit corrects the image using information on the intensity of color blur in the centroid direction of the plurality of directions. The image processing apparatus according to claim 9. 撮影光学系を介して形成された光学像を光電変換する撮像素子と、
複数のカラーフィルタを備えた前記撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出する検出手段と、
前記撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定する判定手段と、
前記色にじみを低減させるように前記画像を修正する修正手段と、を有することを特徴とする撮像装置。
An image sensor that photoelectrically converts an optical image formed through the imaging optical system;
A signal level of a color plane corresponding to at least one color filter of an image obtained from the image pickup device including a plurality of color filters or a signal level of a luminance plane generated from the image is set in a predetermined section. Detecting means for detecting a first region monotonously increasing or monotonically decreasing in the direction of 1;
Based on the first optical information relating to the color blur of the photographing optical system, the second optical information relating to chromatic aberration variation asymmetric with respect to the optical axis of the photographing optical system, and the information relating to the first region, the color Determination means for determining the second area where the blur occurs;
An imaging apparatus comprising: correction means for correcting the image so as to reduce the color blur.
複数のカラーフィルタを備えた撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出するステップと、
撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定するステップと、
前記色にじみを低減させるように前記画像を修正するステップと、を有することを特徴とする画像処理方法。
A signal level of a color plane corresponding to at least one color filter of an image obtained from an image sensor having a plurality of color filters or a signal level of a luminance plane generated from the image is first in a predetermined section. Detecting a first region monotonically increasing or monotonically decreasing in the direction of
Based on the first optical information relating to the color blur of the photographing optical system, the second optical information relating to the variation of chromatic aberration that is asymmetric with respect to the optical axis of the photographing optical system, and the information relating to the first region, the color blur. Determining a second region in which occurrence occurs;
Correcting the image so as to reduce the color blur. An image processing method comprising:
複数のカラーフィルタを備えた撮像素子から得られた画像の少なくとも一つのカラーフィルタに対応する色プレーンの信号レベル、または、該画像から生成される輝度プレーンの信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出するステップと、
撮影光学系の色にじみに関する第1の光学情報と、該撮影光学系の光軸に関して非対称な色収差のばらつきに関する第2の光学情報と、前記第1の領域に関する情報とに基づいて、該色にじみが発生している第2の領域を判定するステップと、
前記色にじみを低減させるように前記画像を修正するステップと、をコンピュータに実行させるように構成されていることを特徴とする画像処理プログラム。
A signal level of a color plane corresponding to at least one color filter of an image obtained from an image sensor having a plurality of color filters or a signal level of a luminance plane generated from the image is first in a predetermined section. Detecting a first region monotonically increasing or monotonically decreasing in the direction of
Based on the first optical information relating to the color blur of the photographing optical system, the second optical information relating to the variation of chromatic aberration that is asymmetric with respect to the optical axis of the photographing optical system, and the information relating to the first region, the color blur. Determining a second region in which occurrence occurs;
An image processing program configured to cause a computer to execute the step of correcting the image so as to reduce the color blur.
請求項16に記載の画像処理プログラムを記憶していることを特徴とする記憶媒体。   A storage medium storing the image processing program according to claim 16.
JP2015078640A 2015-04-07 2015-04-07 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium Active JP6604737B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015078640A JP6604737B2 (en) 2015-04-07 2015-04-07 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015078640A JP6604737B2 (en) 2015-04-07 2015-04-07 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium

Publications (3)

Publication Number Publication Date
JP2016201601A true JP2016201601A (en) 2016-12-01
JP2016201601A5 JP2016201601A5 (en) 2018-05-24
JP6604737B2 JP6604737B2 (en) 2019-11-13

Family

ID=57424517

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015078640A Active JP6604737B2 (en) 2015-04-07 2015-04-07 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP6604737B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009268033A (en) * 2008-04-30 2009-11-12 Canon Inc Image processing device, imaging device, control method, program, and memory medium
JP2012015781A (en) * 2010-06-30 2012-01-19 Sony Corp Image processing apparatus, image processing method, and program
JP2012070046A (en) * 2010-09-21 2012-04-05 Sony Corp Aberration correction device, aberration correction method and program
JP2012191607A (en) * 2011-02-21 2012-10-04 Canon Inc Image processing system, image processing method and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009268033A (en) * 2008-04-30 2009-11-12 Canon Inc Image processing device, imaging device, control method, program, and memory medium
JP2012015781A (en) * 2010-06-30 2012-01-19 Sony Corp Image processing apparatus, image processing method, and program
JP2012070046A (en) * 2010-09-21 2012-04-05 Sony Corp Aberration correction device, aberration correction method and program
JP2012191607A (en) * 2011-02-21 2012-10-04 Canon Inc Image processing system, image processing method and program

Also Published As

Publication number Publication date
JP6604737B2 (en) 2019-11-13

Similar Documents

Publication Publication Date Title
JP5188651B2 (en) Image processing apparatus and imaging apparatus using the same
JP5284537B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus using the same
JP6327922B2 (en) Image processing apparatus, image processing method, and program
US8849055B2 (en) Image processing apparatus and method
JP6525718B2 (en) Image processing apparatus, control method therefor, and control program
JP5959976B2 (en) Image processing method, image processing program, image processing apparatus, and imaging apparatus
EP2860974B1 (en) Image processing apparatus, image pickup apparatus, image pickup system, image processing method, image processing program, and storage medium
US20180182075A1 (en) Image processing apparatus, image capturing apparatus, method of image processing, and storage medium
JP2011215707A (en) Image processing apparatus, imaging apparatus, image processing method, and program
WO2011121763A1 (en) Image processing apparatus and image capturing apparatus using same
JP5528139B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5653464B2 (en) Imaging apparatus, image processing apparatus, image processing method, image processing program, and storage medium
US10810714B2 (en) Image restoration processing utilizing settings for image correction
JP2011160255A5 (en)
JP2015115733A (en) Image processing method, image processor, imaging device, and image processing program
JP6415108B2 (en) Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium
JP6436840B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP5645981B2 (en) Imaging apparatus, image processing apparatus, image processing method, image processing program, and storage medium
JP5425136B2 (en) Image processing method, image processing apparatus, imaging apparatus, and image processing program
JP6238673B2 (en) Image processing apparatus, imaging apparatus, imaging system, image processing method, image processing program, and storage medium
JP6604737B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP6486076B2 (en) Image processing apparatus and image processing method
JP2017118293A (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP2019176302A (en) Image processing device, image processing method, and program
JP2017224906A (en) Image processing method, imaging apparatus using the same, image processing system, and image processing program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180403

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180403

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190319

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190517

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190709

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190904

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191015

R151 Written notification of patent or utility model registration

Ref document number: 6604737

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151