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

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

Info

Publication number
JP2017118293A
JP2017118293A JP2015251142A JP2015251142A JP2017118293A JP 2017118293 A JP2017118293 A JP 2017118293A JP 2015251142 A JP2015251142 A JP 2015251142A JP 2015251142 A JP2015251142 A JP 2015251142A JP 2017118293 A JP2017118293 A JP 2017118293A
Authority
JP
Japan
Prior art keywords
image
image processing
color
color blur
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.)
Pending
Application number
JP2015251142A
Other languages
Japanese (ja)
Inventor
弘至 畠山
Hiroyuki Hatakeyama
弘至 畠山
貴嘉 横山
Takayoshi Yokoyama
貴嘉 横山
崇 鬼木
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 JP2015251142A priority Critical patent/JP2017118293A/en
Publication of JP2017118293A publication Critical patent/JP2017118293A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of effectively reducing color bleeding in a color image even when color bleeding property differs depending on a subject distance like a three-dimensional subject.SOLUTION: The image processing apparatus comprises: an acquisition part (104a) which acquires information relating to a defocus amount of an image formed via an imaging optical system; and a determination part (104b) which determines whether or not to correct the image so as to reduce color bleeding, by using the information relating to the defocus amount and optical information relating to the color bleeding of the imaging optical system.SELECTED DRAWING: Figure 1

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 imaging optical system. In visible light color imaging with an imaging device, color blur tends to occur in areas away from green, which is the central wavelength of the imaging optical system, and blue, red, or purple artifacts mixed with both are blurred. Or purple fringe.

撮像光学系の色収差は、異なる分散を有する材料からなる複数のレンズを組み合わせることにより、ある程度光学的に低減することができる。しかし近年では、撮像装置の小型化が進み、撮像素子に用いられるセンサの高解像度化および撮像光学系の小型化が要求され、撮像光学系の構成により色収差を十分に抑制することは困難である。   The chromatic aberration of the imaging 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 downsizing of the image pickup apparatus has progressed, and it is required to increase the resolution of the sensor used for the image pickup element and the size of the image pickup optical system, and it is difficult to sufficiently suppress chromatic aberration by the configuration of the image pickup optical system. .

色収差は、横色収差(倍率色収差)と縦色収差(軸上色収差)に大別される。横色収差は、結像位置が波長により像面に沿う方向にずれる現象である。縦色収差は、結像位置が波長により光軸に沿う方向にずれる現象である。特許文献1には、R(赤)、G(緑)、B(青)の各色プレーンに対して異なる歪曲を加える幾何変換処理を行うことにより、横色収差を補正する方法が開示されている。一方、縦色収差は、例えば可視光域の中心波長を担うG(緑)プレーンで合焦した画像においては、可視光域端部となるR(赤)プレーンや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. Patent Document 1 discloses a method of correcting lateral chromatic aberration by performing geometric transformation processing that adds different distortion to each of the R (red), G (green), and B (blue) color planes. On the other hand, the longitudinal chromatic aberration is focused on the subject in the R (red) plane and the B (blue) plane, which are the ends of the visible light region, in an image focused on the G (green) plane that bears the center wavelength of the visible light region, for example. Does not match, resulting in a blurred image (out-of-focus image). For this reason, longitudinal chromatic aberration cannot be corrected using geometric transformation.

特許文献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 aberration of the imaging optical system, there are directions where color blur occurs and does not occur with respect to the subject in an imaging optical system having asymmetric aberrations such as coma. 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.

また、立体被写体においては、合焦距離からのずれ量(デフォーカス量)に応じて色にじみの色味(色にじみ特性)が異なる。これは、デフォーカス量に応じて波長ごとの結像位置が異なるためである。このため、合焦距離(ピントが合った被写体)と非合焦距離(ピントがぼけた被写体)に関して、色にじみ補正の対象とすべき色は異なる。この点、特許文献2、3に開示されている方法では、ピントが合った被写体とぼけた被写体のそれぞれの色にじみを補正することができない。   In a three-dimensional object, the color blur (color blur characteristic) varies depending on the shift amount (defocus amount) from the in-focus distance. This is because the imaging position for each wavelength differs according to the defocus amount. For this reason, the colors to be subjected to color blur correction are different with respect to the in-focus distance (in-focus subject) and the out-of-focus distance (in-focus subject). In this regard, the methods disclosed in Patent Documents 2 and 3 cannot correct the color blurs of the focused subject and the blurred subject.

そこで本発明は、立体被写体のように被写体距離に応じて色にじみ特性が異なる場合でも、カラー画像における色にじみを効果的に低減可能な画像処理装置、撮像装置、画像処理方法、画像処理プログラム、および、記憶媒体を提供する。   Therefore, the present invention provides an image processing device, an imaging device, an image processing method, an image processing program, and an image processing device that can effectively reduce color blur in a color image even when the color blur characteristic varies depending on the subject distance, such as a three-dimensional subject. And a storage medium.

本発明の一側面としての画像処理装置は、撮像光学系を介して形成された画像のデフォーカス量に関する情報を取得する取得部と、前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定する判定部とを有する。   An image processing apparatus according to an aspect of the present invention relates to an acquisition unit that acquires information about a defocus amount of an image formed via an imaging optical system, and information about the defocus amount and color blurring of the imaging optical system. And a determination unit that determines whether to correct the image so as to reduce the color blur using the optical information.

本発明の他の側面としての撮像装置は、撮像光学系を介して形成された光学像を光電変換して画像を出力する撮像素子と、前記画像のデフォーカス量に関する情報を取得する取得部と、前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定する判定部とを有する。   An imaging device according to another aspect of the present invention includes an imaging element that photoelectrically converts an optical image formed via an imaging optical system and outputs an image, and an acquisition unit that acquires information about the defocus amount of the image And a determination unit that determines whether to correct the image so as to reduce the color blur using the information regarding the defocus amount and the optical information regarding the color blur of the imaging optical system.

本発明の他の側面としての画像処理方法は、撮像光学系を介して形成された画像のデフォーカス量に関する情報を取得するステップと、前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定するステップとを有する。   An image processing method according to another aspect of the present invention relates to a step of acquiring information related to a defocus amount of an image formed through an imaging optical system, and information related to the defocus amount and color blurring of the imaging optical system. Determining whether to correct the image using optical information so as to reduce the color blur.

本発明の他の側面としての画像処理プログラムは、撮像光学系を介して形成された画像のデフォーカス量に関する情報を取得するステップと、前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定するステップと、をコンピュータに実行させるように構成されている。   An image processing program according to another aspect of the present invention relates to a step of acquiring information relating to a defocus amount of an image formed through an imaging optical system, and information relating to the defocus amount and color blurring of the imaging optical system. Determining whether to correct the image so as to reduce the color blur using optical information, and causing the computer to execute the step.

本発明の他の側面としての記憶媒体は、前記画像処理プログラムを記憶している。   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, an image processing device, an imaging device, an image processing method, and an image processing program capable of effectively reducing color blur in a color image even when the color blur characteristic varies depending on the subject distance as in a three-dimensional subject. And a storage medium can be provided.

本実施形態における画像処理方法を示すフローチャートである。It is a flowchart which shows the image processing method 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, and a figure which shows the result of having applied the low-pass filter with respect to each pixel. 本実施形態において、各画素に対してローパスフィルタを適用した場合の入力信号の変化の例を示す図である。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. 本実施形態において、デフォーカス量に応じた色にじみ補正データの一例である。In the present embodiment, it is an example of color blur correction data corresponding to a defocus amount. 実施例1における撮像装置の構成図である。1 is a configuration diagram of an imaging apparatus in Embodiment 1. FIG. 実施例1における撮像系の模式図である。1 is a schematic diagram of an imaging system in Embodiment 1. FIG. 実施例1における撮像系を示す図である。1 is a diagram illustrating an imaging system in Embodiment 1. FIG. 実施例1における撮像系を示す図である。1 is a diagram illustrating an imaging system in Embodiment 1. FIG. 実施例1における撮像系を示す図である。1 is a diagram illustrating an imaging system in Embodiment 1. FIG. 従来の撮像素子を示す図である。It is a figure which shows the conventional image pick-up element. 図22の撮像系により得られた画像を示す図である。It is a figure which shows the image obtained by the imaging system of FIG. 図23および図24の撮像系により得られた画像を示す図である。It is a figure which shows the image obtained by the imaging system of FIG. 23 and FIG. 実施例1における撮像装置の例を示す図である。1 is a diagram illustrating an example of an imaging device in Embodiment 1. FIG. 実施例1における撮像装置の例を示す図である。1 is a diagram illustrating an example of an imaging device in Embodiment 1. FIG. 実施例2における画像処理システムの構成図である。FIG. 6 is a configuration diagram of an image processing system in Embodiment 2. 被写体距離に応じた縦色収差の説明図である。It is explanatory drawing of the longitudinal chromatic aberration according to a to-be-photographed object distance. 被写体距離に応じた縦色収差の説明図である。It is explanatory drawing of the longitudinal chromatic aberration according to a to-be-photographed object distance. 被写体距離に応じた縦色収差の説明図である。It is explanatory drawing of the longitudinal chromatic aberration according to a to-be-photographed object distance. 被写体距離に応じた縦色収差の説明図である。It is explanatory drawing of the longitudinal chromatic aberration according to a to-be-photographed object distance. 本実施形態におけるデフォーカスマップの説明図である。It is explanatory drawing of the defocus map in this embodiment.

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

まず、図1を参照して、本実施形態における画像処理方法について説明する。ここで説明される画像処理方法は、例えば、後述の各実施例の画像処理装置(画像処理部104、画像処理装置201)の各部により実行される。図1は、本実施形態における画像処理方法(画像処理プログラム)のフローチャートである。図1の各ステップは、例えば、記憶部(メモリ)に記憶された画像処理プログラムを実行するコンピュータ(プロセッサ)の指令に基づいて、画像処理装置の各手段により実現される。メモリまたはプロセッサは、画像処理装置の内部または外部のいずれに設けられていてもよい。   First, an image processing method in this embodiment will be described with reference to FIG. The image processing method described here is executed, for example, by each unit of an image processing apparatus (image processing unit 104, image processing apparatus 201) of each embodiment described later. FIG. 1 is a flowchart of an image processing method (image processing program) in the present embodiment. Each step of FIG. 1 is realized by each unit of the image processing apparatus based on a command of a computer (processor) that executes an image processing program stored in a storage unit (memory), for example. The memory or the processor may be provided either inside or outside the image processing apparatus.

まず、ステップS101において、画像処理装置(取得部)は、撮影画像を入力画像として取得する。入力画像は、撮像光学系を介して撮像素子で受光することにより得られたデジタル画像(撮影画像)であり、レンズと各種の光学フィルタ類を含む撮像光学系の収差により劣化している。なお撮像光学系は、レンズだけでなく曲率を有するミラー(反射面)を用いて構成することもできる。   First, in step S101, the image processing apparatus (acquisition unit) acquires a captured image as an input image. The input image is a digital image (captured image) obtained by receiving light with the image sensor via the imaging optical system, and is deteriorated by the aberration of the imaging optical system including the lens and various optical filters. Note that the imaging 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.

続いてステップS102において、画像処理装置(取得部)は、撮像光学系の撮影条件(撮影条件情報)を取得する。撮影条件とは、焦点距離、絞り値、および、撮影距離(フォーカスレンズの位置)などの撮像光学系の状態である。撮影条件は、例えばExif情報のように画像に付加された情報から取得することができる。   Subsequently, in step S102, the image processing apparatus (acquisition unit) acquires imaging conditions (imaging condition information) of the imaging optical system. The imaging conditions are the state of the imaging optical system such as the focal length, aperture value, and imaging distance (focus lens position). The shooting condition can be acquired from information added to the image such as Exif information.

続いてステップS103において、画像処理装置(取得部)は、デフォーカスマップを生成する。デフォーカスマップの生成方法については後述する。デフォーカスマップは、撮像光学系の合焦距離からの画角内の各被写体距離のずれ量に関するデータである。デフォーカスマップは、各被写体までの距離に変換した被写体距離マップでもよい。   Subsequently, in step S103, the image processing apparatus (acquisition unit) generates a defocus map. A method for generating the defocus map will be described later. The defocus map is data relating to the shift amount of each subject distance within the angle of view from the focusing distance of the imaging optical system. The defocus map may be a subject distance map converted into a distance to each subject.

ステップS113において、画像処理装置(取得部)は、撮影条件に対応する色にじみに関する光学情報を取得する。光学情報は、撮像光学系の光学設計値に関する情報であって、色にじみの補正データである。また光学情報は、撮像光学系の設計値や製造工程で測定したデータに基づいて、撮像装置や画像処理装置の記憶部(メモリ)により予め保持されているデータである。例えば、撮像装置が補正データを保持しており画像処理装置が補正データを保持していない場合、通信により撮像装置から画像処理装置へ伝送するか、または、補正データを画像データに付加することにより間接的に伝送することができる。   In step S <b> 113, the image processing apparatus (acquisition unit) acquires optical information related to color blur corresponding to the shooting condition. The optical information is information related to the optical design value of the imaging optical system, and is correction data for color blur. The optical information is data that is stored in advance in a storage unit (memory) of the imaging device or the image processing device based on design values of the imaging optical system or data measured in the manufacturing process. For example, when the imaging device holds correction data and the image processing device does not hold correction data, it is transmitted from the imaging device to the image processing device by communication, or the correction data is added to the image data. It can be transmitted indirectly.

続いてステップS104において、画像処理装置(判定部)は、デフォーカス量(デフォーカスマップ)に応じて画像を複数の領域に分割する。例えば、合焦被写体と背景の計2つや、合焦距離に対して前側、後側の計3つや、さらに細かく分割する。そしてステップS105において、画像処理装置(判定部)は、デフォーカス量(デフォーカスマップ)に応じてステップS104にて分割した複数の領域ごとの基準色を設定(決定)する。基準色としては、例えばRGBのいずれかが用いられる。そして判定部は、デフォーカス量に関する情報(デフォーカスマップなど)に応じて異なる色(基準色以外の色)の色にじみを低減するように画像を修正するか否かを判定する。なお光学情報は、好ましくは、デフォーカス量に応じて異なる色の色にじみに関する光学情報である。   Subsequently, in step S104, the image processing apparatus (determination unit) divides the image into a plurality of regions according to the defocus amount (defocus map). For example, a total of two in-focus subjects and the background, three in total on the front side and rear side with respect to the in-focus distance, and more finely divided. In step S105, the image processing apparatus (determination unit) sets (determines) a reference color for each of the plurality of areas divided in step S104 according to the defocus amount (defocus map). For example, one of RGB is used as the reference color. Then, the determination unit determines whether or not to correct the image so as to reduce the color bleeding of a different color (a color other than the reference color) according to the information about the defocus amount (defocus map or the like). The optical information is preferably optical information related to color bleeding of different colors depending on the defocus amount.

ここで、図31乃至図34を参照して、デフォーカス量に応じて色にじみの色味が異なることについて説明する。図31乃至図34は、被写体距離に応じた縦色収差の説明図である。   Here, with reference to FIG. 31 to FIG. 34, it will be described that the color blur color varies depending on the defocus amount. 31 to 34 are explanatory diagrams of longitudinal chromatic aberration according to the subject distance.

図31は、近点から遠点に向かって斜めに配置された黒い棒(被写体611〜615)を撮像装置601で撮像している状況を示している。ピントは被写体613に合焦している。図32は、図31の状態で撮像された画像を示している。図33は、図32中の被写体611、613、615の矢印の部分の断面図である。図33に示されるように、被写体613は合焦距離に位置し、被写体611は合焦距離より近距離に位置し、被写体615は合焦距離より遠距離に位置している。図33中の合焦距離被写体613の断面図はG成分に合焦しているため、G成分のエッジのぼけが最も少ない。R成分およびB成分は、略同じ量であり、G成分に比べてぼけている。   FIG. 31 illustrates a situation in which the imaging device 601 captures black bars (subjects 611 to 615) that are arranged obliquely from the near point to the far point. The focus is on the subject 613. FIG. 32 shows an image captured in the state of FIG. FIG. 33 is a cross-sectional view of the arrowed portions of the subjects 611, 613, and 615 in FIG. As shown in FIG. 33, the subject 613 is located at the in-focus distance, the subject 611 is located closer to the in-focus distance, and the subject 615 is located farther than the in-focus distance. The cross-sectional view of the in-focus distance subject 613 in FIG. 33 is focused on the G component, so that the edge blur of the G component is the least. The R component and the B component are substantially the same amount and are blurred compared to the G component.

図34は、図33の状況における撮像光学系の模式的な光路図である。図34は、各被写体距離における、撮像素子102への入射光を示している。前述の合焦距離の場合、G成分は撮像素子上で結像しているが、R成分およびB成分は撮像素子上で広がりを有する。また、遠距離の場合、R成分およびB成分は撮像素子上で結像しているが、G成分は撮像素子上では広がりを有する。また、遠距離の場合、RGB成分共に広がりを有し、特にR成分およびB成分はG成分よりも大きな広がりを有する。図34は、軸上色収差に関して説明しているが、画角のついた位置においても基本の結像特性に非対称性が発生するものの、色の変動については同様の現象が発生する。   FIG. 34 is a schematic optical path diagram of the imaging optical system in the situation of FIG. FIG. 34 shows incident light on the image sensor 102 at each subject distance. In the case of the above-described focusing distance, the G component forms an image on the image sensor, but the R component and the B component have a spread on the image sensor. In the case of a long distance, the R component and the B component are imaged on the image sensor, but the G component has a spread on the image sensor. In the case of a long distance, both the RGB components have a spread, and in particular, the R component and the B component have a larger spread than the G component. FIG. 34 describes axial chromatic aberration, but a similar phenomenon occurs with respect to color variation, although asymmetry occurs in the basic imaging characteristics even at a position with a field angle.

次に、図35を参照して、デフォーカスマップについて説明する。図35は、本実施形態におけるデフォーカスマップの説明図である。図35(a)は、被写体としての人物に合焦して撮影した画像である。図35(b)〜(d)は、デフォーカス量に応じて分割された領域を示している。各図において、白い領域は、同一距離として分割された領域である。また、デフォーカス量に応じて撮像光学系の色にじみ特性(色収差)が変化するため、各デフォーカス量での最も合焦している色プレーンを基準色(基準色プレーン)としている。   Next, the defocus map will be described with reference to FIG. FIG. 35 is an explanatory diagram of a defocus map in the present embodiment. FIG. 35 (a) is an image taken while focusing on a person as a subject. FIGS. 35B to 35D show regions divided according to the defocus amount. In each figure, the white area is an area divided as the same distance. In addition, since the color blur characteristic (chromatic aberration) of the imaging optical system changes in accordance with the defocus amount, the most focused color plane at each defocus amount is used as the reference color (reference color plane).

続いてステップS106〜S110、S114における単調増減検出工程について説明する。画像処理装置(検出部)は、カラー画像を構成する複数の色プレーンのうちいずれかの色プレーンの画素値(信号レベル)が単調増加または単調減少している領域(第1の領域)を検出する。そして画像処理装置(検出部)は、検出した領域を色にじみ発生領域と仮判定する。単調増減検出工程において色にじみ発生領域を判定する方法としては、いくつかの方法が考えられる。本実施形態では、一定の画素区間(所定の区間)の色にじみの画素値の変化特性に基づいて判定を行う。   Next, the monotonous increase / decrease detection process in steps S106 to S110 and S114 will be described. The image processing apparatus (detection unit) detects a region (first region) in which the pixel value (signal level) of any one of the color planes constituting the color image monotonously increases or decreases To do. Then, the image processing apparatus (detection unit) tentatively determines the detected area as a color blur generation area. 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.

ところで、実際には、撮像光学系がコマ収差などの光軸(中心軸)に関して非対称(回転非対称)な収差を有する場合、撮像光学系により発生する色にじみは、被写体に対して発生する方向と発生しない方向が存在する。このため、単調増減のみから色にじみ発生領域を判定すると、被写体が色にじみと同系色である場合、被写体の色を色にじみと誤判定する可能性がある。従って、単調増減検出のみでは色にじみ発生領域を正しく判定することができない場合があるため、ここでは仮判定としている。   Actually, when the imaging optical system has an asymmetric (rotationally asymmetric) aberration with respect to the optical axis (center axis) such as coma aberration, the color blur generated by the imaging 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, the color blur occurrence region may not be correctly determined only by monotonous increase / decrease detection, and therefore, the provisional determination is made here.

本実施形態において、単調増加または単調減少を検出する領域は、カラー画像の注目画素を中心とした水平方向、垂直方向、または、斜め方向の画素区間、注目画素を端の点とした水平方向、垂直方向、または、斜め方向の画素区間、のいずれかを含む。   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. For example, when the input image is composed of three color planes, ie, a G plane, a B plane, and an R plane, the B plane is set as a color blur removal target, and the G plane is used as a reference plane (reference color). The respective luminance gradients Blea and Glea with respect to the B plane and the G plane are calculated as in the following equation (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.

まず、図1のステップS106において、画像処理装置は、入力画像の注目画素を中心とした時の縦・横・斜めの画素区間に対して入力信号の画素値変化を解析する。続いてステップS107において、画像処理装置(判定部)は、前記画素区間の入力信号の画素値変化が単調増減の特性を有するか否かを判定する。   First, in step S106 in FIG. 1, the image processing apparatus analyzes a change in the pixel value of the input signal with respect to vertical, horizontal, and diagonal pixel sections when the target pixel of the input image is the center. Subsequently, in step S107, the image processing apparatus (determination unit) determines whether or not the pixel value change of the input signal in the pixel section has a monotonous increase / decrease characteristic.

ステップS107の判定の結果、前記画素区間の入力信号の画素値変化が単調増減の特性を有さない場合、ステップS108において、画像処理装置は、注目画素を端の点とした時の縦・横・斜めの画素区間に対して入力信号の画素値変化を解析する。続いてステップS109において、前記画素区間の入力信号の画素値変化が単調増減の特性を有するか否かを判定する。   As a result of the determination in step S107, 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 S108, the image processing apparatus performs vertical and horizontal when the target pixel is the end point.・ A pixel value change of an input signal is analyzed for an oblique pixel section. Subsequently, in step S109, it is determined whether or not the pixel value change of the input signal in the pixel section has a monotonous increase / decrease characteristic.

図2は、単調増減判定対象の画素区間が単調増減特性を有する場合の一例を示す図であり、縦軸は画素値、横軸は距離をそれぞれ示している。図3は、単調増減判定対象の画素区間が単調増減特性を有しない場合の一例を示す図であり、縦軸は画素値、横軸は距離をそれぞれ示している。図2および図3に示されるような画素値変化を有する入力信号に対して、画像処理装置は単調増減判定を行う。図2および図3のそれぞれ示される白い四角は注目画素である。   FIG. 2 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. 3 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 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. 2 and 3 are the target pixels.

図2に示されるように、入力信号の画素値変化が単調増減の特性を有する画像は、単調増減判定を行う画素区間内において単調増減の特性を有する。このためステップS106の解析の結果、ステップS107において、画像処理装置は、画素区間内において単調増減の特性を有すると判定する。一方、図3に示されるような入力信号の画素値変化の特性を有する画像に対しては、単調増減の特性を有さないと判定する。   As shown in FIG. 2, 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 S106, in step S107, the image processing apparatus determines that the pixel section has a monotonous increase / decrease characteristic. On the other hand, it is determined that the image having the characteristic of changing the pixel value of the input signal as shown in FIG. 3 does not have the monotonous increase / decrease characteristic.

前記画素区間の入力信号の画素値変化が単調増減の特性(単調増加の特性または単調減少の特性)を有している場合、ステップS114において、画像処理装置は単調増減フラグを立てる。一方、前記画素区間の入力信号の画素値変化が単調増減の特性(単調増加の特性または単調減少の特性)を有していない場合、ステップS110において、画像処理装置は単調増減フラグを立てない。   When 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 sets a monotonous increase / decrease flag in step S114. On the other hand, when the change in the pixel value of the input signal in the pixel section does not have the monotonous increase / decrease characteristic (monotonic increase characteristic or monotonic decrease characteristic), the image processing apparatus does not set the monotonous increase / decrease flag in step S110.

上述した単調増減判定を、Bプレーンの各画素に対して適用する。その結果、各画素において単調増減フラグが立っていれば「1」、単調増減フラグが立っていなければ「0」をそれぞれ対応させ、単調増減判定結果プレーンとして生成して保持し、後述の色にじみ判定(ステップS15)で利用する。単調増減判定結果プレーンの利用方法の詳細については後述する。   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 S15). Details of the method of using the monotonous increase / decrease determination result plane will be described later.

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

また、注目画素を中心とした画素区間の設定方法としては、図4(c)、(d)に示されるように注目画素を中心として斜め方向に設定する方法が考えられる。すなわち、斜め方向についても水平方向または垂直方向と同程度の距離の画素区間を設定すれば、等方性を持たせることができる。この場合、斜め方向の角度は、図4(c)、(d)に示されるように水平方向または垂直方向に対して45度の設定に限定される。ただし本実施形態はこれに限定されるものではなく、45度以外の任意の角度を設定することができる。その際の画素区間の距離dは、以下の式(2)を用いて算出される。   Further, as a method of setting a pixel section centered on the target pixel, a method of setting the target pixel in an oblique direction as shown in FIGS. 4C and 4D 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.

一方、画像におけるハイライト部周辺の色にじみやシャドウ部周辺の色にじみは、それぞれ、飽和やノイズの影響を受けることにより、色にじみが存在するにも関わらず、判定対象の画素区間内では単調増減の特性を持たず正しく判定できない場合がある。その場合、図5に示されるように、注目画素を端の点として画素区間を設定する方法が効果的である。以上のような方法で単調増減判定を行い、図4および図5に示される画素区間のいずれか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 this case, as shown in FIG. 5, 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 above-described method and any one of the pixel intervals shown in FIGS. 4 and 5 has a pixel interval having the monotonous increase / decrease characteristic, the target pixel has the monotonous increase / decrease characteristic. 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 this case, for example, 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比が低下し、その結果、色にじみが単調増減の特性を有しなくなることが考えられる。その場合、入力信号に対してデジタルフィルタによるフィルタリング処理を行うことが有効である。なお本実施形態では、デジタルフィルタをローパスフィルタとした場合について説明するが、これに限定されるものではない。   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 using a digital filter on the input signal. 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]のローパスフィルタを適用する場合について説明する。図6(a)は、画像内の3×3画素の領域を示す図である。図6に示されるように画像内の3×3画素のある領域においてpを注目画素とするとき、まず、[1 2 1]のローパスフィルタを水平方向に適用する。このとき、注目画素P’は以下の式(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. 6A is a diagram illustrating a 3 × 3 pixel region in an image. As shown in FIG. 6, 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 P ′ is expressed as the following Expression (3).

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

図7を参照して、ローパスフィルタを適用したときの入力信号の変化の一例について説明する。図7は、各画素に対してローパスフィルタを適用した場合の入力信号の変化の例を示す図である。図7において、横軸は距離(画像上の断面、すなわち注目画素からの画素区間)、縦軸はプレーンの画素値をそれぞれ示している。   With reference to FIG. 7, an example of a change in the input signal when the low-pass filter is applied will be described. FIG. 7 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. 7, 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.

図7中の実線はローパスフィルタを適用しない場合、細かい破線は[1 2 1]のローパスフィルタを適用した場合、粗い破線は[1 4 6 4 1]のローパスフィルタを適用した場合をそれぞれ示している。ここで、[1 4 6 4 1]は、注目画素と隣接する画素と更にもう1画素分離れた画素にも重み係数をかけてローパスフィルタを適用することを意味する。このようにローパスフィルタを適用して入力信号を滑らかにすることで、色にじみが本来持つ単調増減の特性を際立たせることが可能となる。なお本実施形態では、ローパスフィルタを水平方向、垂直方向の順番で適用しているが、これに限定されるものではない。ローパスフィルタを逆の順番、すなわち垂直方向、水平方向の順番で適用しても構わない。また、2次元のローパスフィルタ係数を算出してローパスフィルタを水平方向および垂直方向に同時に適用することもできる。なお本実施形態では、Gプレーンを基準色としてBプレーンの単調増減判定を行う場合について説明したが、これに限定されるものではない。基準色は、ステップS105にて設定された色プレーンを用いることができる。   The solid line in FIG. 7 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. In the present embodiment, the case of performing the monotone increase / decrease determination of the B plane using the G plane as a reference color has been described. However, the present invention is not limited to this. As the reference color, the color plane set in step S105 can be used.

続いてステップS111において、画像処理装置は、単調増減フラグに応じて以降の処理を分岐する。単調増減フラグが立っている場合、ステップS115に進む。ステップS115において、画像処理装置(判定部)は、色にじみ判定を行う。すなわち画像処理装置は、色にじみ発生領域と仮判定された領域に対し、ステップS113にて取得した色にじみ発生方向の光学情報を用いて、色にじみ発生領域であるか否かを判定する。   Subsequently, in step S111, the image processing apparatus branches the subsequent processing according to the monotonous increase / decrease flag. When the monotonous increase / decrease flag is set, the process proceeds to step S115. In step S115, the image processing apparatus (determination unit) performs a color blur determination. That is, the image processing apparatus determines whether or not it is a color blur generation area by using the optical information of the color blur generation direction acquired in step S113 with respect to the area temporarily determined as the color blur generation area.

ここで、図8および図9を参照して、単調増減検出工程のみから色にじみ領域を判定した場合の弊害について説明する。デジタルカメラなどの撮像装置により被写体を撮像して得られた画像には、撮像光学系の球面収差、コマ収差、像面湾曲、非点収差などに起因する画像劣化成分としてのぼけ成分が含まれる。このようなぼけ成分は、無収差で回折の影響もない場合に被写体の一点から出た光束が撮像面上で再度一点に集まるべきものが、ある広がりをもって像を結ぶことで発生する。   Here, with reference to FIG. 8 and FIG. 9, 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, and the like of the imaging 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.

図8は、被写体の各点が球面収差のような光軸に関して対称(回転対称)にぼける光学特性の状態で撮影された画像に対し、単調増減検出を行う場合を説明した図である。図8(a)は被写体の画素値断面、図8(b)は撮像光学系のPSF断面、図8(c)は撮像光学系で撮影された被写体の画素値断面を示している。なお、図8はRプレーンまたはBプレーンを想定している。図8(b)に示されるように、撮像光学系が光軸に関して対称(回転対称)な収差特性を有しPSFが対称である場合、被写体の両側のエッジ断面は、両方とも劣化した画像として図8(c)の実線のように撮影される。図8(c)では、比較のため、図8(a)に示される被写体の輝度断面を点線で示している。図8(c)の白い四角を注目画素として、単調増減判定を行うとすると、両エッジとも単調増減領域として判定される。また、色のにじみも実際に発生するため、色にじみ発生領域の判定としては正しく判定される。   FIG. 8 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 the subject is symmetric (rotationally symmetric) with respect to the optical axis such as spherical aberration. 8A shows the pixel value section of the subject, FIG. 8B shows the PSF section of the imaging optical system, and FIG. 8C shows the pixel value section of the subject imaged by the imaging optical system. FIG. 8 assumes an R plane or a B plane. As shown in FIG. 8B, when the imaging optical system has aberration characteristics that are 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. 8C, the luminance cross section of the subject shown in FIG. 8A is indicated by a dotted line for comparison. If the monotonous increase / decrease determination is performed using the white square in FIG. 8C as the target pixel, both edges are determined as the monotonous increase / decrease area. Further, since color blur actually occurs, the color blur generation region is correctly determined.

図9は、被写体の各点がコマ収差のような光軸に関して非対称(回転非対称)にぼける光学特性の状態で撮影された画像に対し、単調増減検出を行う場合を説明した図である。図9(a)は被写体の画素値断面、図9(b)は撮像光学系のPSF断面、図9(c)は撮像光学系で撮影された被写体の画素値断面である。図9(b)に示されるように、撮像光学系が光軸に関して非対称な収差特性を有しPSFが非対称な場合、特に片側のエッジのみ大きく劣化する光学特性では、被写体のエッジ断面は、片側のみ大きく劣化した画像として図9(c)の実線のように撮影される。このような撮影画像に対し単調増減検出を行うと、両エッジとも単調増減領域として判定されるが、実際に撮像光学系により発生する色にじみは片側のみであるため、被写体本来の色を色にじみとして判定してしまう弊害が発生する。単調増減のみで色にじみ補正を行うと被写体本来の色を除去することになり、不自然な画像となる場合がある。これを回避しようとすると補正が弱くなってしまう。   FIG. 9 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 the subject is asymmetric (rotationally asymmetric) with respect to the optical axis such as coma. 9A is a pixel value section of the subject, FIG. 9B is a PSF section of the imaging optical system, and FIG. 9C is a pixel value section of the subject imaged by the imaging optical system. As shown in FIG. 9B, when the imaging 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 captured image, both edges are determined as monotonous increase / decrease areas, but since the color blur actually generated by the imaging 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.

そこで本実施形態において、画像処理装置は、図8(b)や図9(b)に示されるような撮像光学系の色にじみ発生方向に関する光学情報を保持または取得する。そして画像処理装置は、単調増減検出の単調増減方向と色にじみ発生方向が一致した場合、色にじみ発生領域である判定する。ここで一致とは、厳密に一致する場合だけでなく実質的に一致である場合も含む意味である。   Therefore, in the present embodiment, the image processing apparatus holds or acquires optical information related to the color blur occurrence direction of the imaging optical system as shown in FIG. 8B or FIG. 9B. When the monotonous increase / decrease direction of the monotonic increase / decrease detection matches the color blur generation direction, the image processing apparatus 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.

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

図11は、光学情報および単調増減検出結果に基づいて色にじみ領域を判定する例を示す図である。図11(a)に示されるように、単調増減検出により、例えば、単調減少が検出された場合、その単調減少方向の光学情報を参照し、1を有していれば色にじみ補正領域と判定する。また、図11(b)に示されるように、単調減少方向の光学情報を参照し、0を有していれば被写体の色であると判定する。このように、撮像光学系の収差として色収差が発生する方向と、発生しない方向の情報を有することで、被写体の色と色にじみを正しく判定することができるため、色にじみ補正の精度を向上させることが可能となる。なお、色にじみの発生方向を1、発生しない方向を0としたが、発生の方向がわかればよく、0と1である必要はない。撮像光学系の収差は、像高により変化するため、複数の像高での光学情報を有しておくことで、高精度に補正を行うことが可能となる。補正値を持たない像高では、近傍の補正値より補間生成してもよい。また、撮像光学系の収差は、撮影条件(撮像光学系の焦点距離、被写体距離(撮影距離)、絞り値(Fno))でも変化するため、撮影条件ごとに光学情報を記憶または取得することにより、高精度に補正を行うことが可能となる。   FIG. 11 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. 11A, for example, when monotonic decrease is detected by monotone increase / decrease detection, the optical information in the monotonic decrease direction is referred to, and if it has 1, it is determined as a color blur correction region. To do. Also, as shown in FIG. 11B, 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 it does not occur as the aberration of the imaging 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 imaging 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. The aberration of the imaging optical system also changes depending on the shooting conditions (focal length of the imaging optical system, subject distance (shooting distance), aperture value (Fno)). Therefore, by storing or acquiring optical information for each shooting condition, It becomes possible to perform correction with high accuracy.

図10および図11では、光学情報を1次元の情報として説明したが、撮影画像が2次元配列のデータの場合、光学情報も2次元のデータとして保持してもよい。図12は、光学情報が2次元である場合の説明図である。図12(c)は、光学情報を画面上下左右、斜め45度、135度の8方向のデータとして保持する場合の例を示している。図12(c)では、撮像光学系の色のコマ収差が画面上方向に発生しており、その発生方向に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. 12 is an explanatory diagram when the optical information is two-dimensional. FIG. 12C shows an example in which the optical information is held as data in eight directions of up, down, left and right, 45 degrees oblique and 135 degrees on the screen. In FIG. 12C, color coma in the imaging 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.

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

そして、画像処理装置は、単調増減検出時に検出方向と光学情報とを参照することにより、高精度に色にじみ領域を判定することが可能となる。なお本実施形態では、単調増減判定を単調減少方向で説明したが、単調増加方向を使用して色にじみ判定を行ってもよい。また、単調増減判定と光学情報の補正値を8方向で説明したが、8方向に限定されるものではない。精度を向上させるため、検出方向の数を増加させてもよい。または、光学情報に関するデータ量を削減するため、検出方向の数を減少させてもよい。   The image processing apparatus can determine the color blur area with high accuracy by referring to the detection direction and the optical information when detecting monotonous increase / decrease. 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.

また画像処理装置は、光学情報として、色にじみ発生方向に加え、色にじみの強度に関する情報(色にじみの強度情報)を保持または取得するように構成してもよい。この場合、更に高精度に補正を行うことが可能となる。図12(b)に示されるように、一般に撮像光学系の収差による色にじみの発生量は方向により異なる。そこで、図12(d)に示されるように、色にじみの発生する方向に色にじみの発生量に関する色にじみの強度情報を追加してもよい。   The image processing apparatus 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. 12B, the amount of color blurring due to the aberration of the imaging optical system generally differs depending on the direction. Therefore, as shown in FIG. 12D, color blur intensity information regarding the amount of color blur may be added in the direction in which color blur occurs.

続いて、図13を参照して、色にじみ強度情報を用いた場合の色にじみ判定について説明する。図13は、光学情報を用いた色にじみ判定処理を示す図であり、光学情報に色にじみ発生方向のみを持つ場合の例を示している。図中の四角で囲まれた注目画素1について色にじみ発生領域の判定を行う場合、まず、注目画素を中心に上下左右、斜め45度、斜め135度の8方向について単調減少判定を行う。図13(a)の場合、高輝度被写体が注目画素の下側に位置するため、注目画素1の単調減少が検出される方向は、上と右上、左上の3箇所が判定される。その3方向の光学情報は色にじみ発生方向を示す「1」であるため、この注目画素1は色にじみ発生領域と判定される。また、同様に注目画素2についても検出を行うと、単調減少方向は上、右上、右、右下が判定される。しかしながら、光学情報の色にじみ発生方向は、右下に発生しない方向を表す「0」を保持しているため、単調減少と光学情報より、最終的な注目画素2の色にじみ検出方向は、上、右上、右の3方向となる。注目画素1、注目画素2共に色にじみ発生画素と判定されるが、図12(b)に示されるように、撮像光学系の色にじみ発生量は方向により異なるため、注目画素1と注目画素2では、色にじみの発生量が異なっている。光学情報に強度情報を持たない場合、色にじみ量を判定できないため、この後の色にじみ補正工程において補正の強さを変えて補正を行うことができない。よって、注目画素1にあわせて色にじみ補正を強くすると注目画素2では過補正となり、注目画素2にあわせて色にじみ補正を弱くすると注目画素1では、補正不足となってしまう。   Next, with reference to FIG. 13, color blur determination when color blur intensity information is used will be described. FIG. 13 is a diagram showing a color blur determination process using optical information, and shows 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. 13A, since the high-intensity subject is located below the target pixel, three directions for detecting the monotonic decrease of the target pixel 1 are determined as upper, upper right, and upper left. 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 both the target pixel 1 and the target pixel 2 are determined to be color blur generation pixels, as shown in FIG. 12B, the amount of color blur generation in the imaging optical system differs depending on the direction, so the target pixel 1 and the target pixel 2 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. Therefore, 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.

そこで、図12(d)のように、光学情報に色にじみの発生方向と、その方向の色にじみ強度情報を追加することが好ましい。図13(b)、(c)は、光学情報に色にじみ強度情報も付加した場合の色にじみ領域の判定方法を示している。図13(b)の注目画素3では、単調減少判定にて上、左上、右上の3方向が判定されるが、光学情報の色にじみ強度もそれぞれ2、3、2と強い色にじみ強度と検出することができる。図13(c)の注目画素4においては、上、右上、左下の3方向が判定されるが、その方向の光学情報の色にじみ強度はそれぞれ3、2、1と注目画素3に対して弱い色にじみ強度が検出される。よって、例えば、検出された方向の色にじみ強度の平均値により、この後の色にじみ補正処理の補正の強さ(画像を修正する強度)を変更することで、色にじみの発生量が方向で異なる場合でもより正確な補正が可能となる。   Therefore, as shown in FIG. 12D, it is preferable to add the color blur generation direction and the color blur intensity information in the direction to the optical information. FIGS. 13B and 13C show a method of determining a color blur area when color blur intensity information is also added to the optical information. In the target pixel 3 in FIG. 13B, 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 2, 3, and 2, respectively, and the strong color blur intensity is detected. can do. In the pixel of interest 4 in FIG. 13C, 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 pixel of interest 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.

次に、図14を参照して、光学情報の算出方法について説明する。図14は、光学情報の算出方法の説明図であり、光学情報として保持する任意の方向での、撮像光学系のGプレーンのPSF断面(実線)とBプレーンのPSF断面(点線)を示している。ここでは、Gプレーンを基準プレーンとし、Bプレーンの色にじみに関して光学情報を算出する方法について説明する。   Next, a method for calculating optical information will be described with reference to FIG. FIG. 14 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 imaging 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のピーク位置も図14(a)に示されるように、ずれた位置で算出される。倍率色収差による各色プレーンのずれは、従来から行われている、各色プレーンに対し異なる歪曲を加える幾何学変換により補正することができる。そのため、図14(b)に示されるように、Gプレーン、BプレーンのそれぞれのPSFのピーク位置を一致させて、図の斜線部にあたる基準であるGプレーンとBプレーンのPSF面積差を色にじみ強度として採用する方法が考えられる。   Due to the chromatic aberration of the imaging optical system, the G plane and the B plane have different PSF shapes depending on the aberration in each wavelength band. When the lateral chromatic aberration remains, the G plane and the B plane are imaged at shifted positions, so the peak positions of the respective PSFs are also calculated at shifted positions as shown in FIG. Is done. 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. 14B, the PSF peak positions of the G plane and B plane are made to coincide with each other, and the PSF area difference between the G plane and the B plane, which is the hatched portion in the figure, is blurred. A method of adopting the strength can be considered.

図14(b)では、ピークよりも左側エッジの面積差よりも右側エッジの面積差が大きいため、右側エッジで大きく色にじみが発生することがわかる。この面積が小さければ色にじみは目立たないため、面積が小さい場合を色にじみが発生しない方向とすることができる。また、面積比より、色にじみ強度を決定することが可能となる。色にじみ補正を行う画像に倍率色収差が残存していると誤判定をする場合があるため、画像に対して予め倍率色収差補正を行い、前述のように色にじみの補正データを、倍率色収差を除去して生成しておくことが好ましい。   In FIG. 14B, since the area difference of the right edge is larger than the area difference of the left edge than the peak, it can be seen that the color blur occurs greatly 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. Since it may be erroneously determined that magnification chromatic aberration remains in the image to be subjected to color blur correction, the magnification chromatic aberration correction is performed on the image in advance, and the color chromatic aberration correction data is removed as described above. It is preferable to generate it.

以上により、光学情報の色にじみが発生する方向や色にじみ強度を算出できるが、算出方法としてPSFの面積差を使用する方法に限定されるものではない。例えば、図14(b)において、GプレーンとBプレーンのエッジの傾き差を使用する方法が考えられる。色にじみが発生する場合、エッジの傾きは緩くなる傾向にあるため、傾き差などを利用することにより、光学情報を決定するなどしてもよい。   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. 14B, 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 the present embodiment, the method of matching the peak values when calculating the color blur intensity is described, but the color blur intensity may be calculated by matching the centroids of the PSFs instead of the peak values. As described above, according to the present embodiment, the optical correction value can be calculated for each direction in which the monotonous increase / decrease determination is performed, the image height, and the shooting conditions.

図1に戻り、ステップS116において、画像処理装置(修正部)は、ステップS115にて判定部により色にじみ領域と判定された領域(第2の領域)に対し、色にじみを補正する処理(画像を修正する処理)を行う(色にじみ補正工程)。すなわち修正部は、色にじみを低減させるように画像を修正する。   Returning to FIG. 1, in step S <b> 116, the image processing apparatus (correction unit) corrects color blur for the region (second region) determined as the color blur region by the determination unit in step S <b> 115 (image). (Color blur correction process). That is, the correction unit corrects the image so as to reduce color blur.

図15は、青色にじみの典型的な画素値変化を示す図である。図15において、横軸は距離(画像上の断面)であり、縦軸はBプレーン及びGプレーンの画素値である。図15では、左端に飽和輝度を超える高輝度被写体が存在するものとする。そして、本来明るくない高輝度被写体の周囲も、収差やフレアにより、画素値変化の裾が黒レベルに漸近するように拡がる。基準プレーンであるGプレーンでもにじみは無いわけではなく、ある程度の拡がりが存在する。しかし、それは色にじみ除去対象のBプレーンに比べると小さい。また、撮像素子は一定の飽和レベル以上の画素値を測定することはできない。このような画素値変化において、色にじみ除去対象のBプレーンの強度が基準プレーンであるGプレーンの強度を上回ると、青色にじみとなる。   FIG. 15 is a diagram illustrating a typical pixel value change of blue blur. In FIG. 15, 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. 15, it is assumed that there is a high-luminance subject that exceeds the saturation luminance at the left end. Then, the periphery of the high-brightness subject which is not originally bright also spreads so that the bottom of the pixel value change gradually approaches the black level due to aberration and flare. 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.

本実施形態では、画像処理装置は、色にじみ除去対象のBプレーンの画素値変化の傾きによりBプレーンのにじみ量を推定する。そこで、Bプレーンの輝度傾斜Bleaの絶対値に係数k1を乗じることにより、以下の式(6)で表されるように第1の推定にじみ量E1とする。   In the present embodiment, the image processing apparatus estimates the amount of blur of the B plane based on the slope of the change in the 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値でもよいが、図16に示されるように、飽和度Sは0〜1にかけて連続的に変化する値としてもよい。図16は、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. 16 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
とする。
Then, the estimated blur amount E1 or the estimated blur amount E2 is selected according to the degree of saturation S. 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の光ではにじみ方が変化するが、色にじみ判定工程(ステップS115)では、これを考慮していない。推定にじみ量(除去量)が過小である場合、青色にじみの除去後も若干の青みが残る。一方、推定にじみ量(除去量)が過大である場合、灰色の背景に対してBプレーンを減らし過ぎ、黄緑色になる場合がある。   Next, the estimated blur amount E is corrected, and the amount E ′ to be actually removed is determined. 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 the color blur determination step (step S115). 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.

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

図17は、式(8)のaを横軸とし、bを縦軸とする色度座標ab面である。図17に示されるように、青色は色度座標ab面の斜線で示す第4象限にある(なお、赤、黄、紫は第1象限、緑、白は第2象限、青緑は第3象限にある)。Bプレーンの強度から推定にじみ量Eを除去すると、B=B−Eとなり、色度座標ab面上では点線矢印のように左上方向へ移動する。矢印の始点が推定にじみ量Eの除去前の色度であり、終点が推定にじみ量Eの除去後の色度である。このことから、作用する色相範囲をa>0かつb<0に制限すると、以下の式(9)が成立する。   FIG. 17 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. 17, blue is in the fourth quadrant indicated by 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)を満たさない画素は、画素値が影響を受けることがない。図17では、斜線で示す第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. 17, 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’の除去による色度変化は、図17中の実線矢印で示されるように、第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. A 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プレーンを作成する。色にじみ除去対象としては、色にじみ判定ステップS115にて色にじみ領域と判定された画素のみとする。従って、新たなBプレーンの強度は、単調増減判定フラグが「1」である場合、B=B−E’となる。一方、単調増減判定フラグが「0」である場合、B=Bとなる。このように、図1のステップS112において、画像処理装置は、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 S115 are to be removed from the color blur. Therefore, the intensity of the new B plane is B = B−E ′ when the monotonous increase / decrease determination flag is “1”. On the other hand, when the monotonous increase / decrease determination flag is “0”, B = B. As described above, in step S112 in FIG. 1, the image processing apparatus outputs a color image obtained by correcting the B plane as an output image.

ここで、図6(a)に示される画像内の3×3画素の領域における単調増減判定結果が、図18に示されるように隣接する画素で単調増減判定フラグの値が切り替わる場合を考える。このような場合、画素の境界部では除去量がばたつき(隣接する画素で除去される場合と除去されない場合が混在すること)、画素値の変化が急峻になり、不自然で観察者に違和感を与える場合がある。そこで、生成した除去量プレーンに対してローパスフィルタを適用する方法が有効である。   Here, consider a case where the monotonic increase / decrease determination result in the 3 × 3 pixel region in the image shown in FIG. 6A switches the value of the monotonous 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.

図18に示される例において、画素pの除去量E’’は、以下の式(14)のように表される。   In the example illustrated in FIG. 18, 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.

次に、図19を参照して、デフォーカス量に応じた色にじみ補正データについて説明する。図19は、デフォーカス量に応じた色にじみ補正データ(色にじみの光学情報の補正データ)の一例である。   Next, color blur correction data corresponding to the defocus amount will be described with reference to FIG. FIG. 19 is an example of color blur correction data (correction data for color blur optical information) corresponding to the defocus amount.

軸上色収差がある場合、デフォーカス量により色プレーン間の相対的な収差量が変化するため、最もPSFの広がりの少ない色成分を基準色として、他の色のにじみ量から補正データを生成する。図19の例では、近点距離および合焦距離に関しては最も先鋭なG成分を基準とし、遠点距離に関してはB成分を基準としている。このように色にじみ補正データは、デフォーカス量に応じて予め保持される。ただし、離散的なデフォーカス量に対して補正データを保持し、補正データを保持していないデフォーカス量である場合、近傍の補正データを補間して用いることにより保持データを削減することが好ましい。   When there is axial chromatic aberration, the relative amount of aberration between the color planes changes depending on the defocus amount, so that correction data is generated from the amount of bleeding of other colors using the color component with the smallest PSF spread as the reference color. . In the example of FIG. 19, the sharpest G component is used as a reference for the near point distance and the focusing distance, and the B component is used for the far point distance. In this way, the color blur correction data is held in advance according to the defocus amount. However, when the correction data is held with respect to the discrete defocus amount and the defocus amount does not hold the correction data, it is preferable to reduce the held data by interpolating and using nearby correction data. .

このように、デフォーカス量に応じて色にじみ補正処理を行うことにより、立体被写体であっても色にじみを違和感なく除去することが可能となる。以上が、本実施形態における画像処理方法の基本的な処理フローである。   As described above, by performing the color blur correction process according to the defocus amount, it is possible to remove color blur without a sense of incongruity even for a three-dimensional object. The above is the basic processing flow of the image processing method in the present embodiment.

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

撮像装置100は、撮像光学系101(レンズ)および撮像装置本体(カメラ本体)を備えて構成されている。撮像光学系101は、絞り101aおよびフォーカスレンズ101bを備え、撮像装置本体(カメラ本体)と一体的に構成されている。ただし本実施例はこれに限定されるものではなく、撮像光学系101が撮像装置本体に対して交換可能に装着される撮像装置にも適用可能である。   The imaging apparatus 100 includes an imaging optical system 101 (lens) and an imaging apparatus main body (camera main body). The imaging optical system 101 includes a diaphragm 101a and a focus lens 101b, 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 101 is attached to the imaging apparatus body in a replaceable manner.

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

ここで、図21を参照して、デフォーカスマップを生成するための撮像素子102について説明する。図21(a)は、本実施例の撮像系における撮像素子の受光部と光学系の瞳との関係を示す図である。図21(a)において、MLはマイクロレンズであり、CFはカラーフィルタである。EXPは光学系の射出瞳(瞳)であり、P1、P2は射出瞳EXPの領域である。G1、G2は画素(受光部)であり、1つの画素G1と1つの画素G2とが互いに対をなしている(画素G1、G2は1つのマイクロレンズMLを共有するように設けられている)。撮像素子には、画素G1と画素G2の対(画素対)が複数配列されている。対の画素G1と画素G2は、共通の(すなわち、画素対ごとに1つずつ設けられた)マイクロレンズMLを介して、射出瞳EXPと共役な関係を有する。なお、撮像素子に配列された複数の画素G1、G2を、それぞれまとめて画素群G1、G2という場合がある。   Here, with reference to FIG. 21, the image sensor 102 for generating a defocus map will be described. FIG. 21A is a diagram illustrating a relationship between the light receiving unit of the imaging element and the pupil of the optical system in the imaging system of the present embodiment. In FIG. 21A, ML is a microlens, and CF is a color filter. EXP is an exit pupil (pupil) of the optical system, and P1 and P2 are areas of the exit pupil EXP. G1 and G2 are pixels (light receiving units), and one pixel G1 and one pixel G2 are paired with each other (the pixels G1 and G2 are provided so as to share one microlens ML). . In the imaging device, a plurality of pairs of pixel G1 and pixel G2 (pixel pairs) are arranged. The pair of pixels G1 and G2 have a conjugate relationship with the exit pupil EXP through a common microlens ML (that is, one for each pixel pair). Note that the plurality of pixels G1 and G2 arranged in the image sensor may be collectively referred to as a pixel group G1 and G2, respectively.

図21(b)は、本実施例における撮像系の模式図であり、図21(a)に示されるマイクロレンズMLの代わりに、射出瞳EXPの位置に薄肉レンズが設けられていると仮定した場合の撮像系を示している。画素G1は、射出瞳EXPのうち領域P1を通過した光束を受光する。画素G2は、射出瞳EXPのうち領域P2を通過した光束を受光する。OSPは、撮像している物点である。物点OSPには、必ずしも物体が存在している必要はない。物点OSPを通った光束は、その光束が通過する瞳(射出瞳EXP)内での位置(本実施例では領域P1または領域P2)に応じて、画素G1または画素G2のいずれかの画素に入射する。瞳内の互いに異なる領域を光束が通過することは、物点OSPからの入射光が角度(視差)によって分離されることに相当する。すなわち、各マイクロレンズMLに対して設けられた画素G1、G2のうち、画素G1からの出力信号を用いて生成された画像と、画素G2からの出力信号を用いて生成された画像とが、互いに視差を有する複数(ここでは一対)の視差画像となる。   FIG. 21B is a schematic diagram of the imaging system in the present embodiment, and it is assumed that a thin lens is provided at the position of the exit pupil EXP instead of the microlens ML shown in FIG. The imaging system in the case is shown. The pixel G1 receives the light beam that has passed through the region P1 in the exit pupil EXP. The pixel G2 receives the light beam that has passed through the region P2 in the exit pupil EXP. The OSP is an object point being imaged. The object point OSP does not necessarily have an object. The light beam passing through the object point OSP is applied to either the pixel G1 or the pixel G2 according to the position (region P1 or region P2 in this embodiment) in the pupil (exit pupil EXP) through which the light beam passes. Incident. The passage of light beams through different regions in the pupil corresponds to the separation of incident light from the object point OSP by the angle (parallax). That is, among the pixels G1 and G2 provided for each microlens ML, an image generated using the output signal from the pixel G1 and an image generated using the output signal from the pixel G2 are: It becomes a plurality (here, a pair) of parallax images having parallax with each other.

画素群G1および画素群G2からなるそれぞれの視差画像は、合焦した被写体に対しては画像の同じ位置に結像するが、非合焦の被写体に対しては画像の異なる位置に結像する。この位置ずれ量は、デフォーカス量に依存するため、位置ずれ量に基づいて合焦距離からの相対的なずれ量であるデフォーカス量を求めることができる。これは、位相差検出方式のオートフォーカス機構にも用いられている原理である。したがって、画像全域に対してデフォーカス量を求めることにより、デフォーカスマップを生成することができる。また、フォーカスレンズ101bの位置から合焦被写体までの距離を求めれば、各被写体までの距離を現す被写体距離マップを生成することができる。   The respective parallax images made up of the pixel group G1 and the pixel group G2 form an image at the same position on the focused subject, but form an image at a different position on the non-focused subject. . Since this positional shift amount depends on the defocus amount, the defocus amount that is a relative shift amount from the in-focus distance can be obtained based on the positional shift amount. This is the principle used in the phase difference detection type autofocus mechanism. Therefore, a defocus map can be generated by obtaining the defocus amount for the entire image. If the distance from the position of the focus lens 101b to the in-focus subject is obtained, a subject distance map showing the distance to each subject can be generated.

図20において、画像処理部104(画像処理装置)は、取得部104a、判定部104b、検出部104c、および、修正部104dを有する。画像処理部104(画像処理装置)は、A/Dコンバータ103から出力されたデジタル信号に対して所定の処理を行うとともに、前述の色にじみ補正処理を行う。   In FIG. 20, the image processing unit 104 (image processing apparatus) includes an acquisition unit 104a, a determination unit 104b, a detection unit 104c, and a correction unit 104d. The image processing unit 104 (image processing apparatus) performs predetermined processing on the digital signal output from the A / D converter 103 and performs the above-described color blur correction processing.

まず画像処理部104(取得部104a)は、状態検知部107から撮像装置100(撮像光学系101)の撮像条件情報を取得する。撮像条件情報とは、絞り値、撮影距離(被写体距離)、および、ズームレンズの焦点距離などに関する情報である。状態検知部107は、システムコントローラ110から直接に撮像条件情報を取得することができるが、これに限定されるものではない。例えば撮像光学系101に関する撮像条件情報は、撮像光学系制御部106から取得することもできる。また画像処理部104(取得部104a)は、撮像光学系101を介して形成された画像のデフォーカス量に関する情報を取得する。デフォーカス量に関する情報は、デフォーカス量や被写体距離など画像中のデフォーカス情報や距離情報を含むが、これに限定されるものではない。本実施例において、より具体的には、画像処理部104(取得部104a)は、デフォーカス量に関する情報に基づいて画像のデフォーカスマップ(被写体距離マップ)を生成する。   First, the image processing unit 104 (acquisition unit 104a) acquires imaging condition information of the imaging apparatus 100 (imaging optical system 101) from the state detection unit 107. The imaging condition information is information regarding an aperture value, a shooting distance (subject distance), a focal length of the zoom lens, and the like. The state detection unit 107 can acquire the imaging condition information directly from the system controller 110, but is not limited to this. For example, the imaging condition information regarding the imaging optical system 101 can be acquired from the imaging optical system control unit 106. The image processing unit 104 (acquisition unit 104a) acquires information related to the defocus amount of an image formed via the imaging optical system 101. The information related to the defocus amount includes defocus information and distance information in the image such as the defocus amount and subject distance, but is not limited thereto. In the present embodiment, more specifically, the image processing unit 104 (acquisition unit 104a) generates a defocus map (subject distance map) of an image based on information on the defocus amount.

続いて、画像処理部104(判定部104b)は、デフォーカス量に関する情報(デフォーカスマップまたは被写体距離マップ)と撮像光学系の色にじみに関する光学情報とを用いて、色にじみを低減するように画像を修正するか否かを判定する。そして画像処理部104(判定部104b)は、画像を修正すると判定した場合、デフォーカスマップ(被写体距離マップ)を用いて、デフォーカス量(被写体距離)に応じた画像の領域分割を行う。   Subsequently, the image processing unit 104 (determination unit 104b) uses the information about the defocus amount (defocus map or subject distance map) and the optical information about the color blur of the imaging optical system so as to reduce the color blur. It is determined whether or not to correct the image. When it is determined that the image is to be corrected, the image processing unit 104 (determination unit 104b) uses the defocus map (subject distance map) to divide the image according to the defocus amount (subject distance).

続いて、画像処理部104(判定部104b、検出部104c、修正部104)は、分割領域ごとにデフォーカス量(または被写体距離)に応じた色にじみの光学情報(補正データ)を用いて色にじみ補正処理を行う。本実施例の色にじみ補正処理(画像処理方法)は、図1を参照して説明したとおりである。より具体的には、検出部104cは、デフォーカス量に応じた色(基準色以外の色)の信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出する。判定部104bは、光学情報と第1の領域に関する情報とに基づいて、色にじみが発生している第2の領域を決定する。修正部104dは、色にじみを低減するように画像を修正する。   Subsequently, the image processing unit 104 (the determination unit 104b, the detection unit 104c, and the correction unit 104) uses the color-bleed optical information (correction data) corresponding to the defocus amount (or subject distance) for each divided region. Performs blur correction processing. The color blur correction process (image processing method) of the present embodiment is as described with reference to FIG. More specifically, in the detection unit 104c, the signal level of a color (color other than the reference color) corresponding to the defocus amount is monotonously increased or monotonically decreased in the first direction in a predetermined section. Detect areas. The determination unit 104b determines a second area where color blur has occurred based on the optical information and information regarding the first area. The correction unit 104d corrects the image so as to reduce color blur.

撮像光学系101の色にじみ補正データは、記憶部108に保持されている。画像処理部104は、記憶部108から、撮影条件情報に対応する色にじみ補正データを取得して、色にじみ補正処理を行う。補正後の出力画像は、画像記録媒体109に所定のフォーマットで保存される。表示部105には、本実施例の色にじみ補正処理を行った画像に表示用の所定の処理を行った画像が表示される。ただし本実施例はこれに限定されるものではなく、高速表示のために簡易処理を行った画像を表示部105に表示するように構成してもよい。   Color blur correction data of the imaging optical system 101 is held in the storage unit 108. The image processing unit 104 acquires color blur correction data corresponding to the shooting condition information from the storage unit 108 and performs color blur correction processing. The corrected output image is stored in the image recording medium 109 in a predetermined format. The display unit 105 displays an image that has been subjected to predetermined display processing on the image that has been subjected to the color blur correction process of the present embodiment. However, the present embodiment is not limited to this, and an image obtained by performing simple processing for high-speed display may be displayed on the display unit 105.

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

次に、デフォーカスマップまたは被写体距離マップを生成するための光学系の変形例について説明する。第1の変形例は、特開2013−62803に開示されている方法であり、互いに撮影条件が異なる2枚の画像から被写体距離を取得する。この方法では、例えば、フォーカスレンズの移動によりピントの異なる2枚の画像を撮影し、その撮影画像のぼけ量の違いから被写体距離を生成する。   Next, a modified example of the optical system for generating the defocus map or the subject distance map will be described. A first modification is a method disclosed in Japanese Patent Application Laid-Open No. 2013-62803, in which a subject distance is acquired from two images having different shooting conditions. In this method, for example, two images with different focus are captured by moving the focus lens, and the subject distance is generated from the difference in the blur amount of the captured images.

第2の変形例は、図22に示される構成の撮像系を用いる。Ren.Ng等の「Light Field Photography with a Hand−held Plenoptic Camera」(Stanford Tech Report CTSR 2005−2)には、「Plenoptic Camera」が提案されている。この「Plenoptic Camera」において「Light Field Photography」という手法を用いることで、物体側からの光線の位置と角度の情報を取り込むことができる。光線の角度の情報は視差となるため、複数の視差画像からデフォーカス量または被写体距離マップを生成することができる。   The second modification uses an imaging system having the configuration shown in FIG. Ren. “Plenoptic Camera” is proposed in “Light Field Photography with a Hand-Held Plenoptic Camera” (Stanford Tech Report CTSR 2005-2) of Ng et al. By using a technique called “Light Field Photography” in this “Plenoptic Camera”, it is possible to capture information on the position and angle of light rays from the object side. Since the information on the angle of the light becomes parallax, a defocus amount or a subject distance map can be generated from a plurality of parallax images.

図22において、撮像光学系301は、主レンズ(撮影レンズ)301bと開口絞り301aとを備えて構成される。撮像光学系301の結像位置には、マイクロレンズアレイ301cが配置されており、さらにその後方(像側)に撮像素子302が配置されている。マイクロレンズアレイ301cは、例えば点Aのような被写体空間のある一点を通る光線群と、点Aの近傍の点を通る光線とが撮像素子302上で混ざらないようにセパレータ(分離手段)としての機能を有する。図22から分かるように、点Aからの上線、主光線および下線は、それぞれ異なる画素によって受光される。このため、点Aを通る光線群を光線の角度ごとに分離して取得することができる。   In FIG. 22, the imaging optical system 301 includes a main lens (photographing lens) 301b and an aperture stop 301a. A microlens array 301c is arranged at the imaging position of the imaging optical system 301, and an imaging element 302 is arranged behind (on the image side) of the microlens array 301c. The microlens array 301c serves as a separator (separating means) so that a ray group passing through a certain point in the subject space such as the point A and a ray passing through a point near the point A are not mixed on the image sensor 302. It has a function. As can be seen from FIG. 22, the upper line, chief ray and underline from point A are received by different pixels. For this reason, a group of rays passing through the point A can be obtained separately for each angle of rays.

また、Todor Georgive等による「Full Resolution Light Field Rendering」(Adobe Technical Report January 2008)が知られている。この文献では、光線の位置と角度の情報(Light Field)を取得する方法として、図23および図24に示される撮像系を提案している。   Also, “Full Resolution Light Field Rendering” (Adobe Technical Report January 2008) by Todor George et al. Is known. This document proposes an imaging system shown in FIG. 23 and FIG. 24 as a method of acquiring light position and angle information (Light Field).

図23に示される撮像系の構成では、マイクロレンズアレイ301cを主レンズ301bの結像位置よりも後方(像側)に配置し、点Aを通る光線群を撮像素子302上に再結像させることで、光線群を光線の角度ごとに分離して取得することができる。また、図24に示される撮像系の構成では、マイクロレンズアレイ301cを主レンズ301bの結像位置よりも前方(物体側)に配置し、点Aを通る光線群を撮像素子302上に結像させることで、光線群を光線の角度ごとに分離して取得することができる。いずれの構成も、撮像光学系301の瞳を通過する光束を瞳内での通過領域(通過位置)に応じて分割する点は同じである。そして、これらの構成では、撮像素子302は、図25に示されるように、1つのマイクロレンズMLと1つの受光部G1とカラーフィルタCFを介して対になっている従来の撮像素子を用いることができる。   In the configuration of the imaging system shown in FIG. 23, the microlens array 301c is arranged behind (image side) the imaging position of the main lens 301b, and the light ray group passing through the point A is re-imaged on the imaging element 302. Thus, the light beam group can be obtained separately for each light beam angle. In the configuration of the imaging system shown in FIG. 24, the microlens array 301c is arranged in front of the imaging position of the main lens 301b (on the object side), and a light beam passing through the point A is imaged on the imaging device 302. By doing so, the light beam group can be obtained separately for each angle of the light beam. Both configurations are the same in that the light beam passing through the pupil of the imaging optical system 301 is divided according to the passing region (passing position) in the pupil. In these configurations, as shown in FIG. 25, the imaging element 302 uses a conventional imaging element that is paired via one microlens ML, one light receiving unit G1, and a color filter CF. Can do.

図22に示される撮像光学系301を用いると、図26(a)に示されるような画像が得られる。図26(b)は、図26(a)中に多数並んだ円のうち1つを拡大して示している。1つの円は絞りSTPに相当し、その内側は複数の画素Pj(j=1、2、3、…)により分割されている。これにより、1つの円内で瞳の強度分布が得られる。また、図23および図24に示される撮像光学系301を用いると、図27に示されるような視差画像が得られる。図22に示される撮像光学系により得られる図26(a)の画像において、瞳内に視差が分布している。このため、視差ごとに画像を分離することにより、図27に示されるような複数の視差画像が得られる。   When the imaging optical system 301 shown in FIG. 22 is used, an image as shown in FIG. 26A is obtained. FIG. 26B shows an enlarged view of one of many circles arranged in FIG. One circle corresponds to the stop STP, and the inside thereof is divided by a plurality of pixels Pj (j = 1, 2, 3,...). Thereby, the intensity distribution of the pupil is obtained within one circle. Further, when the imaging optical system 301 shown in FIGS. 23 and 24 is used, a parallax image as shown in FIG. 27 is obtained. In the image of FIG. 26A obtained by the imaging optical system shown in FIG. 22, parallax is distributed in the pupil. For this reason, a plurality of parallax images as shown in FIG. 27 are obtained by separating the images for each parallax.

第3の変形例は、図28に示されるように複数の撮像装置(カメラ)を用いる。複数のカメラを用いて同一被写体を撮像する場合でも、視差画像を得ることができる。第4の変形例は、図29に示されるように、1つの撮像装置に複数の撮像光学系OSj(j=1,2,3,…)を設けることにより、視差画像を得ることができる。   The third modification uses a plurality of imaging devices (cameras) as shown in FIG. Even when the same subject is imaged using a plurality of cameras, a parallax image can be obtained. In the fourth modification example, as shown in FIG. 29, a parallax image can be obtained by providing a plurality of imaging optical systems OSj (j = 1, 2, 3,...) In one imaging apparatus.

次に、図30を参照して、本発明の実施例2における画像処理システムについて説明する。図30は、本実施例における画像処理システム200の構成図である。なお、本実施例の色にじみ補正処理(画像処理方法)は、図1を参照して説明したとおりであるため、その説明は省略する。   Next, an image processing system according to the second embodiment of the present invention will be described with reference to FIG. FIG. 30 is a configuration diagram of the image processing system 200 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.

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

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

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

なお、本実施例における画像処理を行うためのデータの内容や機器間の受け渡しなどに関する情報(補正情報)については、個々の画像データに付帯させることが好ましい。必要な補正情報を画像データに付帯させることで、本実施例の画像処理装置を搭載した機器であれば、適切に本実施例の補正処理を行うことが可能である。また、撮像光学系の色にじみ発生方向に関する光学情報は、本実施例の画像処理装置を搭載した機器の記録部から読み出す方法だけでなく、ネットワークを介して取得してもよいし、PCやカメラ、レンズ等から情報を取得してもよい。   It should be noted that information (correction information) relating to the contents of data for performing image processing and delivery 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. Further, the optical information related to the color blur generation direction of the image pickup 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, optical information relating to the color blur of the imaging optical system is used in consideration of the defocus amount of the subject. Therefore, according to each embodiment, an image processing apparatus, an imaging apparatus, an image processing method, and an image processing apparatus that can effectively reduce color blur in a color image even when the color blur characteristic varies according to the subject distance, such as a three-dimensional subject. An image processing program and a storage medium are provided.

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

104 画像処理部(画像処理装置)
104a 取得部
104b 判定部
104 Image processing unit (image processing apparatus)
104a acquisition unit 104b determination unit

Claims (18)

撮像光学系を介して形成された画像のデフォーカス量に関する情報を取得する取得部と、
前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定する判定部と、を有することを特徴とする画像処理装置。
An acquisition unit that acquires information about a defocus amount of an image formed through the imaging optical system;
A determination unit that determines whether to correct the image so as to reduce the color blur using the information about the defocus amount and the optical information about the color blur of the imaging optical system. An image processing apparatus.
前記判定部は、前記デフォーカス量に関する情報に応じて異なる色の前記色にじみを低減するように前記画像を修正するか否かを判定することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determination unit determines whether to correct the image so as to reduce the color blur of a different color according to information on the defocus amount. . 前記光学情報は、前記デフォーカス量に応じて異なる前記色の前記色にじみに関する光学情報であることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the optical information is optical information related to the color blur of the color that varies depending on the defocus amount. 前記取得部は、前記デフォーカス量に関する情報に基づいて前記画像のデフォーカスマップを生成し、
前記判定部は、前記デフォーカスマップと前記光学情報とに基づいて、前記色にじみを低減する対象の前記色を決定することを特徴とする請求項2または3に記載の画像処理装置。
The acquisition unit generates a defocus map of the image based on information on the defocus amount,
4. The image processing apparatus according to claim 2, wherein the determination unit determines the color to be subjected to color blur reduction based on the defocus map and the optical information. 5.
前記判定部は、
前記デフォーカスマップに基づいて、前記画像を前記デフォーカス量に関する情報に応じて複数の領域に分割し、
前記画像の前記領域ごとに設定された前記色の前記色にじみを低減するように、前記画像を修正するか否かを判定することを特徴とする請求項4に記載の画像処理装置。
The determination unit
Based on the defocus map, the image is divided into a plurality of regions according to information on the defocus amount,
The image processing apparatus according to claim 4, wherein the image processing apparatus determines whether or not to correct the image so as to reduce the color blur of the color set for each region of the image.
前記デフォーカス量に応じた前記色の信号レベルが、所定の区間において第1の方向に単調増加または単調減少している第1の領域を検出する検出部と、
前記色にじみを低減するように前記画像を修正する修正部と、を更に有し、
前記判定部は、前記光学情報と前記第1の領域に関する情報とに基づいて、前記色にじみが発生している第2の領域を決定することを特徴とする請求項2乃至5のいずれか1項に記載の画像処理装置。
A detection unit that detects a first region in which the signal level of the color corresponding to the defocus amount monotonously increases or monotonously decreases in a first direction in a predetermined section;
A correction unit that corrects the image so as to reduce the color blur,
6. The determination unit according to claim 2, wherein the determination unit determines a second region in which the color blur has occurred based on the optical information and information on the first region. The image processing apparatus according to item.
前記光学情報は、前記色にじみが発生する第2の方向に関する情報であることを特徴とする請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the optical information is information related to a second direction in which the color blur occurs. 前記判定部は、前記第1の方向と前記第2の方向とを比較することにより前記第2の領域を決定することを特徴とする請求項6または7に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the determination unit determines the second region by comparing the first direction and 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. 前記光学情報は、前記色にじみの強度に関する情報であることを特徴とする請求項6乃至9のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the optical information is information regarding the intensity of the color blur. 前記修正部は、前記色にじみの前記強度に関する情報に基づいて、前記画像を修正する強度を変更することを特徴とする請求項10に記載の画像処理装置。   The image processing apparatus according to claim 10, wherein the correction unit changes an intensity for correcting the image based on information on the intensity 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 correction unit corrects the image by calculating information on the intensity of color blur in the plurality of directions. 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乃至13のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the optical information is information related to an optical design value of the imaging optical system. 撮像光学系を介して形成された光学像を光電変換して画像を出力する撮像素子と、
前記画像のデフォーカス量に関する情報を取得する取得部と、
前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定する判定部と、を有することを特徴とする撮像装置。
An image sensor that photoelectrically converts an optical image formed via the imaging optical system and outputs an image; and
An acquisition unit for acquiring information on a defocus amount of the image;
A determination unit that determines whether to correct the image so as to reduce the color blur using the information about the defocus amount and the optical information about the color blur of the imaging optical system. An imaging device.
撮像光学系を介して形成された画像のデフォーカス量に関する情報を取得するステップと、
前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定するステップと、を有することを特徴とする画像処理方法。
Obtaining information relating to the defocus amount of an image formed via the imaging optical system;
Determining whether to correct the image so as to reduce the color blur using the information on the defocus amount and the optical information on the color blur of the imaging optical system. Image processing method.
撮像光学系を介して形成された画像のデフォーカス量に関する情報を取得するステップと、
前記デフォーカス量に関する情報と前記撮像光学系の色にじみに関する光学情報とを用いて、該色にじみを低減するように前記画像を修正するか否かを判定するステップと、をコンピュータに実行させるように構成されていることを特徴とする画像処理プログラム。
Obtaining information relating to the defocus amount of an image formed via the imaging optical system;
Using the information on the defocus amount and the optical information on the color blur of the imaging optical system to determine whether or not to correct the image so as to reduce the color blur. An image processing program configured as described above.
請求項17に記載の画像処理プログラムを記憶していることを特徴とする記憶媒体。   A storage medium storing the image processing program according to claim 17.
JP2015251142A 2015-12-24 2015-12-24 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium Pending JP2017118293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015251142A JP2017118293A (en) 2015-12-24 2015-12-24 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
JP2015251142A JP2017118293A (en) 2015-12-24 2015-12-24 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium

Publications (1)

Publication Number Publication Date
JP2017118293A true JP2017118293A (en) 2017-06-29

Family

ID=59230933

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015251142A Pending JP2017118293A (en) 2015-12-24 2015-12-24 Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP2017118293A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905183A (en) * 2021-08-25 2022-01-07 珠海全志科技股份有限公司 Chromatic aberration correction method and device for wide dynamic range image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011211669A (en) * 2010-03-31 2011-10-20 Canon Inc Image processing apparatus, image pickup apparatus and image processing program
JP2011215707A (en) * 2010-03-31 2011-10-27 Canon Inc Image processing apparatus, imaging apparatus, image processing method, and program
JP2015198380A (en) * 2014-04-02 2015-11-09 キヤノン株式会社 Image processing system, imaging apparatus, image processing program, and image processing method
JP2015222870A (en) * 2014-05-22 2015-12-10 キヤノン株式会社 Image processing method, image processing apparatus, imaging apparatus, image processing program and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011211669A (en) * 2010-03-31 2011-10-20 Canon Inc Image processing apparatus, image pickup apparatus and image processing program
JP2011215707A (en) * 2010-03-31 2011-10-27 Canon Inc Image processing apparatus, imaging apparatus, image processing method, and program
JP2015198380A (en) * 2014-04-02 2015-11-09 キヤノン株式会社 Image processing system, imaging apparatus, image processing program, and image processing method
JP2015222870A (en) * 2014-05-22 2015-12-10 キヤノン株式会社 Image processing method, image processing apparatus, imaging apparatus, image processing program and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905183A (en) * 2021-08-25 2022-01-07 珠海全志科技股份有限公司 Chromatic aberration correction method and device for wide dynamic range image
CN113905183B (en) * 2021-08-25 2024-04-16 珠海全志科技股份有限公司 Color difference correction method and device for wide dynamic range image

Similar Documents

Publication Publication Date Title
JP6327922B2 (en) Image processing apparatus, image processing method, and program
US8754957B2 (en) Image processing apparatus and method
JP6525718B2 (en) Image processing apparatus, control method therefor, and control program
JP5188651B2 (en) Image processing apparatus and imaging apparatus using the same
US9581436B2 (en) Image processing device, image capturing apparatus, and image processing method
KR101536162B1 (en) Image processing apparatus and method
JP6381266B2 (en) IMAGING DEVICE, CONTROL DEVICE, CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2018107654A (en) Image processing apparatus, image processing method, program, and storage medium
JP5619124B2 (en) Image processing apparatus, imaging apparatus, image processing program, and image processing method
US10097806B2 (en) Image processing apparatus, image pickup apparatus, image processing method, non-transitory computer-readable storage medium for improving quality of image
JP6370348B2 (en) Image processing apparatus, image processing method, imaging apparatus, program, and storage medium
US11032465B2 (en) Image processing apparatus, image processing method, imaging apparatus, and recording medium
JP6415108B2 (en) Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium
JP6682184B2 (en) Image processing method, image processing program, image processing device, and imaging device
JP6436840B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP2017118293A (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP6238673B2 (en) Image processing apparatus, imaging apparatus, imaging system, image processing method, image processing program, and storage medium
JP6486076B2 (en) Image processing apparatus and image processing method
JP6604737B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP6497977B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP6504910B2 (en) IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, IMAGE PROCESSING METHOD, AND IMAGE PROCESSING PROGRAM
JP2017092800A (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP2017224906A (en) Image processing method, imaging apparatus using the same, image processing system, and image processing program
JP6452389B2 (en) Image processing apparatus and image processing method
JP2020038319A (en) Imaging apparatus and control method of the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190913

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191015

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20200414