JP2017183813A - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

Publication number
JP2017183813A
JP2017183813A JP2016064015A JP2016064015A JP2017183813A JP 2017183813 A JP2017183813 A JP 2017183813A JP 2016064015 A JP2016064015 A JP 2016064015A JP 2016064015 A JP2016064015 A JP 2016064015A JP 2017183813 A JP2017183813 A JP 2017183813A
Authority
JP
Japan
Prior art keywords
image
color
signal
inclination
component
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
JP2016064015A
Other languages
Japanese (ja)
Inventor
本田 充輝
Mitsuteru Honda
充輝 本田
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 JP2016064015A priority Critical patent/JP2017183813A/en
Publication of JP2017183813A publication Critical patent/JP2017183813A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)

Abstract

PROBLEM TO BE SOLVED: To detect with high accuracy an area where color blurring occurs due to axial chromatic aberration.SOLUTION: A color blurring removal unit (105) calculates a signal slope at a target pixel of a color component (B plane) being a detection target of a first photographed image as a first signal slope (B_leap), calculates a signal slope at a target position of the color component (B plane) of a second photographed image which is photographed by making a diaphragm smaller than the diaphragm of the first photographed image as a second signal slope (B2_leap), and detects blue color blurring of the color component (B plane) at the target position of the first photographed image based on the first signal slope (B_leap) and the second signal slope (B2_leap).SELECTED DRAWING: Figure 1

Description

本発明は、撮影画像に対する信号処理を行う画像処理装置、画像処理方法、及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program for performing signal processing on a captured image.

従来、カラー撮像が可能な撮像装置では、撮像素子に被写体の光学像を結像させる結像光学系の色収差により、画像の明るい部分の周囲に本来存在しない色が色にじみとして生じる場合がある。撮像装置による可視光のカラー撮像では、結像光学系の中心波長である緑から離れた部分で色にじみが起きやすく、青や赤或いは双方が混じった紫色のアーチファクトがにじみ状に生じ、これは色にじみやパープルフリンジなどと呼ばれる。   2. Description of the Related Art Conventionally, in an imaging apparatus capable of color imaging, a color that does not originally exist around a bright portion of an image may be generated as a color blur due to chromatic aberration of an imaging optical system that forms an optical image of a subject on an imaging element. In color imaging of visible light by an imaging device, color blur tends to occur in a portion away from green, which is the central wavelength of the imaging optical system, and blue, red, or a purple artifact mixed with both blurs. It is called color blur or purple fringe.

撮像装置の結像光学系の色収差は、異なる分散を持つレンズを複数組み合わせることにより、ある程度光学的に抑えることができる。しかし、近年、撮像装置の小型化が進み、撮像素子に用いる撮像センサの高解像度化と共に光学系の小型化に対する要求も高まり、色収差を光学系のみで十分に抑えることは困難となってきている。このため、画像処理による色にじみの抑制が求められている。なお、色収差は倍率色収差(横色収差とも呼ばれる。)と軸上色収差(縦色収差とも呼ばれる。)に大別される。倍率色収差は、結像位置が各色光の波長により像面に沿う方向にずれる現象である。また、軸上色収差は、結像位置が各色光の波長により光軸に沿う方向にずれる現象である。ここで、R(赤),G(緑),B(青)の原色系のデジタル撮像系の場合、倍率色収差に対しては、R,G,Bの各色プレーンに対して異なる歪曲を加える幾何変換の画像処理による補正が可能である。   The chromatic aberration of the imaging optical system of the imaging apparatus can be suppressed to some extent optically by combining a plurality of lenses having different dispersions. However, in recent years, downsizing of imaging devices has progressed, and the demand for miniaturization of optical systems has increased along with higher resolution of imaging sensors used for imaging devices, and it has become difficult to sufficiently suppress chromatic aberration with only optical systems. . For this reason, suppression of color bleeding by image processing is required. Note that chromatic aberration is roughly classified into lateral chromatic aberration (also referred to as lateral chromatic aberration) and axial chromatic aberration (also referred to as longitudinal chromatic aberration). The chromatic aberration of magnification is a phenomenon in which the imaging position is shifted in the direction along the image plane depending on the wavelength of each color light. In addition, axial chromatic aberration is a phenomenon in which the imaging position is shifted in the direction along the optical axis depending on the wavelength of each color light. Here, in the case of R (red), G (green), and B (blue) primary color digital imaging systems, with respect to lateral chromatic aberration, geometry that adds different distortions to the R, G, and B color planes. Correction by conversion image processing is possible.

一方、軸上色収差は、例えば可視光域の中心波長を担うG(緑)プレーンで合焦した画像においては、可視光域端部となるR(赤)プレーンやB(青)プレーンでは被写体に焦点が合わず不鮮明な画像(ピンボケ画像)となる。これは倍率色収差に対する補正のような幾何変換の画像処理では補正できない。特許文献1には、色にじみが主に白とび(予め設定した信号の飽和領域)周辺に生じるという特性を利用して、Gプレーンの飽和している領域を探索し、その周辺の領域の画素の積分値から色にじみの補正値を算出する技術が開示されている。また、特許文献2には、隣接画素間の輝度差が一定レベル以上になる領域を、色にじみが生じる可能性のある領域として検出し、その領域の彩度を下げることにより、色にじみを目立たなくする技術が開示されている。   On the other hand, the axial chromatic aberration is, for example, in an image focused on the G (green) plane that bears the center wavelength of the visible light region, and is subject to the subject in the R (red) plane and the B (blue) plane that are the ends of the visible light region. The image is out of focus and is unclear. This cannot be corrected by geometric transformation image processing such as correction for lateral chromatic aberration. Patent Document 1 uses a characteristic that color blur is mainly generated in the vicinity of whiteout (a preset signal saturation region), and searches for a saturated region of the G plane, and pixels in the surrounding region A technique for calculating a color blur correction value from the integrated value of the above is disclosed. In Patent Document 2, a region where the luminance difference between adjacent pixels is a certain level or more is detected as a region where color blur may occur, and the color blur is noticeable by lowering the saturation of the region. Techniques for eliminating are disclosed.

特開2007−133592号公報JP 2007-133582 A 特開2001−145117号公報JP 2001-145117 A

撮像装置で撮像した画像の色にじみは、主に白とび周辺に生じることが多いが、白とびしていない領域にも、観察者にとって違和感のある色にじみは生じる。例えば樹木の間の木漏れ日のような撮影シーンでは、白とびしていない青空の背景と木々の枝との境界に目立つ色にじみが生じる。しかし、特許文献1では、白とび領域を色にじみが生じる領域として探索するため、前述のような白とびしていない領域については、色にじみが生じていたとしても検出することができない。また、特許文献2では、隣接画素間に輝度差があった場合、実際には色にじみが生じていなくても、色にじみが生じる可能性のある領域として誤って検出してしまうことがある。このように、特許文献1や特許文献2に記載の技術では、色にじみが生じている領域を正確に検出できず、そのため、効果の高い色にじみ補正もできない。   The color blur of the image picked up by the image pickup apparatus often occurs mainly in the periphery of the overexposure, but the color blur that is uncomfortable for the observer also occurs in an area where the overexposure does not occur. For example, in a shooting scene such as a sunbeam between trees, a noticeable color blur occurs at the boundary between a background of a blue sky that is not overexposed and branches of trees. However, in Patent Document 1, a whiteout region is searched as a region in which color blur occurs, and therefore, a region that does not have whiteout as described above cannot be detected even if color blur has occurred. Further, in Patent Document 2, when there is a luminance difference between adjacent pixels, an area that may cause color blur may be erroneously detected even though color blur does not actually occur. As described above, the techniques described in Patent Document 1 and Patent Document 2 cannot accurately detect an area in which color blur occurs, and thus cannot perform highly effective color blur correction.

そこで、本発明は、軸上色収差による色にじみが生じている領域を高い精度で検出して効果の高い色にじみ補正を可能にすることを目的とする。   Accordingly, an object of the present invention is to detect a color blur due to axial chromatic aberration with high accuracy and enable highly effective color blur correction.

本発明は、第1の撮影画像の検出対象となる色成分の着目位置における信号の傾きと、第1の撮影画像よりも絞りが小絞りになされて撮影された第2の撮影画像の前記色成分の前記着目位置における信号の傾きとに基づいて、第1の撮影画像の着目位置における前記色成分の色にじみを検出することを特徴とする。   The present invention relates to the inclination of the signal at the target position of the color component that is the detection target of the first captured image, and the color of the second captured image that has been captured with a smaller aperture than the first captured image. The color blur of the color component at the position of interest of the first captured image is detected based on the slope of the signal at the position of interest of the component.

本発明によれば、軸上色収差による色にじみが生じている領域を高い精度で検出でき、効果の高い色にじみ補正が可能となる。   According to the present invention, it is possible to detect a region where color bleeding due to axial chromatic aberration is generated with high accuracy, and it is possible to perform highly effective color bleeding correction.

第1の実施形態の撮像装置の概略構成を示す図である。It is a figure which shows schematic structure of the imaging device of 1st Embodiment. R,G,Bプレーンの説明に用いる図である。It is a figure used for description of R, G, B plane. 補間信号の説明に用いる図である。It is a figure used for description of an interpolation signal. 第1の実施形態の色にじみ検出から除去までのフローチャートである。3 is a flowchart from color blur detection to removal according to the first embodiment. 色度座標面を示す図である。It is a figure which shows a chromaticity coordinate surface. 第2の実施形態の色にじみ検出から除去までのフローチャートである。10 is a flowchart from color blur detection to removal according to the second embodiment. 第3の実施形態の撮像装置の概略構成を示す図である。It is a figure which shows schematic structure of the imaging device of 3rd Embodiment.

以下、添付図面を参照して本発明の好適な実施形態について説明する。
<第1の実施形態・撮像装置の構成>
図1(A)は、画像処理装置の一適用例としての撮像装置の概略構成を示す図である。
図1(A)において、撮影レンズ130は、撮像部101の撮像面上に被写体等の光学像を結像させるためのレンズ光学系であり、フォーカスレンズやズームレンズをも含んでいる。メカ機構131は、メカニカルシャッター、絞り等を有して構成されている。撮影レンズ130は、制御部120によりフォーカスレンズが駆動制御されて、被写体等に対するピントを合わせるオートフォーカス(AF)制御が行われる。メカ機構131は、制御部120によりシャッター速度と絞り値が制御されて適正露出に合わせる自動露出(AE)制御が行われる。なお、シャッター速度と絞り値は、ユーザによりそれぞれ任意に設定(マニュアル設定)される場合もある。また、以下の説明では、AE制御やユーザによるマニュアル設定されたシャッター速度と絞り値により撮影が行われることを「本撮影」と呼び、本撮影による撮影画像は後述するように記録や表示等される。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
<Configuration of First Embodiment / Imaging Device>
FIG. 1A is a diagram illustrating a schematic configuration of an imaging apparatus as an application example of an image processing apparatus.
In FIG. 1A, a photographing lens 130 is a lens optical system for forming an optical image of a subject or the like on the imaging surface of the imaging unit 101, and includes a focus lens and a zoom lens. The mechanical mechanism 131 includes a mechanical shutter, a diaphragm, and the like. The photographing lens 130 is driven and controlled by the control unit 120 to perform autofocus (AF) control for focusing on a subject or the like. In the mechanical mechanism 131, the shutter speed and the aperture value are controlled by the control unit 120, and automatic exposure (AE) control is performed to match the appropriate exposure. The shutter speed and the aperture value may be arbitrarily set (manually set) by the user. Further, in the following description, shooting with the AE control or manually set shutter speed and aperture value by the user is referred to as “main shooting”, and an image shot by the main shooting is recorded or displayed as described later. The

撮像部101は、CCDやCMOS等からなる撮像素子とその周辺回路からなり、撮像素子の撮像面はベイヤー配列のR(赤)G(緑)B(青)カラーフィルタにより覆われている。図2(A)は、撮像素子においてベイヤー配列のカラーフィルタのR,G,Bに各々対応した各画素の配列を表している。図2(A)の図中のR画素はR(赤)のカラーフィルタを透過した光が入射し、図中のG画素はG(緑)のカラーフィルタを透過した光が、図中のB画素はB(青)のカラーフィルタを透過した光が入射する。撮像部101からは、ベイヤー配列のR,G,Bに対応して各画素が配列した画像250の画像信号が出力される。撮像部101は、制御部120により撮像動作が制御される。   The image pickup unit 101 includes an image pickup element made of CCD, CMOS, or the like and its peripheral circuits, and the image pickup surface of the image pickup element is covered with a Bayer array R (red) G (green) B (blue) color filter. FIG. 2A shows an array of pixels corresponding to R, G, and B of the Bayer array color filter in the image sensor. The light transmitted through the R (red) color filter is incident on the R pixel in the diagram of FIG. 2A, and the light transmitted through the G (green) color filter is transmitted to the B pixel in the diagram. Light that has passed through the B (blue) color filter enters the pixel. From the imaging unit 101, an image signal of an image 250 in which each pixel is arranged corresponding to R, G, B in the Bayer array is output. In the imaging unit 101, the imaging operation is controlled by the control unit 120.

ここで、本実施形態の場合、制御部120は、本撮影の直後(又は本撮影の直前)に、本撮影の絞り値よりも小絞り(絞りのf値を大きくした)になるようにメカ機構131を制御するとともに、撮像部101及び撮影レンズ130を制御して撮影を行わせる。本実施形態では、本撮影による撮影画像を第1の撮影画像と呼ぶことにする。一方、本撮影の際の絞り値よりも小絞りとなされて撮像された画像は、後述するように第1の撮影画像の色にじみを補正するための補正補助用の画像であり、以下の説明では第2の撮影画像と呼ぶことにする。なお、第2の撮影画像は第1の撮影画像よりも絞りを小絞りにして(絞りのf値を大きくして)撮像されるため、第1の撮影画像と第2の撮影画像の撮影時のシャッター速度が例えば同一である場合には、第2の撮影画像は第1の撮影画像よりも暗い画像となる。   Here, in the case of the present embodiment, the control unit 120 is configured so that immediately after the main shooting (or just before the main shooting), the aperture is set to be smaller than the aperture value of the main shooting (the f value of the aperture is increased). The mechanism 131 is controlled, and the imaging unit 101 and the imaging lens 130 are controlled to perform imaging. In the present embodiment, a captured image obtained by actual photographing is referred to as a first captured image. On the other hand, an image captured with an aperture smaller than the aperture value at the time of actual shooting is a correction assisting image for correcting the color blur of the first shot image, as will be described later. Then, it will call the 2nd picked-up image. Since the second captured image is captured with a smaller aperture than the first captured image (with a larger f-number), the first captured image and the second captured image are captured. For example, when the shutter speeds are the same, the second captured image is darker than the first captured image.

撮像部101により撮像された第1の撮影画像のアナログ画像信号と第2の撮影画像のアナログ画像信号は、A/D(アナログ/デジタル)変換部102によりそれぞれデジタル画像信号に変換される。以下の説明では、第1の撮影画像のデジタル画像信号を第1の画像信号、第2の撮影画像のデジタル画像信号を第2の画像信号と表記する。A/D変換部102から出力された第1の画像信号と第2の画像信号は、WB処理部103に送られる。WB処理部103は、制御部120による制御の下で、第1の画像信号と第2の画像信号にそれぞれホワイトバランス(WB)処理を行う。WB処理部103によるWB処理後の第1の画像信号と第2の画像信号は、補間処理部104に送られる。   The analog image signal of the first captured image and the analog image signal of the second captured image captured by the imaging unit 101 are converted into digital image signals by the A / D (analog / digital) conversion unit 102, respectively. In the following description, the digital image signal of the first captured image is referred to as a first image signal, and the digital image signal of the second captured image is referred to as a second image signal. The first image signal and the second image signal output from the A / D conversion unit 102 are sent to the WB processing unit 103. The WB processing unit 103 performs white balance (WB) processing on each of the first image signal and the second image signal under the control of the control unit 120. The first image signal and the second image signal after the WB processing by the WB processing unit 103 are sent to the interpolation processing unit 104.

補間処理部104は、制御部120による制御の下で、第1の画像信号と第2の画像信号に対してそれぞれ補間処理を行う。補間処理部104による補間処理の詳細については後述する。補間処理部104による補間処理後の第1の画像信号は第1の補間信号として、また、補間処理後の第2の画像信号は第2の補間信号として、それぞれメモリ部110に送られる。   The interpolation processing unit 104 performs interpolation processing on each of the first image signal and the second image signal under the control of the control unit 120. Details of the interpolation processing by the interpolation processing unit 104 will be described later. The first image signal after the interpolation processing by the interpolation processing unit 104 is sent to the memory unit 110 as a first interpolation signal, and the second image signal after the interpolation processing is sent to the memory unit 110 as a second interpolation signal.

メモリ部110は、制御部120による制御の下で、第1の補間信号を第1のメモリ110aに記憶し、第2の補間信号を第2のメモリ110bに記憶する。なお、メモリ部110の第1のメモリ110aと第2のメモリ110bは、別個のメモリであってもよいし、一つのメモリを領域分けしたメモリ領域であってもよい。第1のメモリ110aに記憶された第1の補間信号は、制御部120による制御の下で、第1のメモリ110aから読み出されて位置合わせ部115と色にじみ除去部105に送られる。また、第2のメモリ110bに記憶された第2の補間信号は、制御部120による制御の下で、第2のメモリ110bから読み出されて位置合わせ部115に送られる。   Under the control of the control unit 120, the memory unit 110 stores the first interpolation signal in the first memory 110a, and stores the second interpolation signal in the second memory 110b. Note that the first memory 110a and the second memory 110b of the memory unit 110 may be separate memories or may be a memory area in which one memory is divided. The first interpolation signal stored in the first memory 110 a is read from the first memory 110 a and sent to the alignment unit 115 and the color blur removal unit 105 under the control of the control unit 120. Also, the second interpolation signal stored in the second memory 110 b is read from the second memory 110 b and sent to the alignment unit 115 under the control of the control unit 120.

位置合わせ部115は、第1の補間信号の各画素位置に対して、第2の補間画像の対応した各画素位置がずれている場合には、第2の補間信号の画素位置を第1の補間信号の画素位置に合わせるようにし、その位置合わせ処理後の第2の補間信号を出力する。すなわち、本実施形態において、位置合わせ部115は、第2の撮影画像を第1の撮影画像に対して位置合わせする補正手段の一例である。なお、第1の補間信号と第2の補間信号の画素位置にずれが無い場合には、第2の補間信号はそのまま位置合わせ部115から出力される。位置合わせ部115による位置合わせ処理の詳細については後述する。位置合わせ部115から出力された第2の補間信号は、色にじみ除去部105に送られる。   The alignment unit 115 sets the pixel position of the second interpolation signal to the first position when each corresponding pixel position of the second interpolation image is shifted from each pixel position of the first interpolation signal. The second interpolation signal after the alignment processing is output so as to match the pixel position of the interpolation signal. That is, in the present embodiment, the alignment unit 115 is an example of a correction unit that aligns the second captured image with the first captured image. When there is no deviation between the pixel positions of the first interpolation signal and the second interpolation signal, the second interpolation signal is output from the alignment unit 115 as it is. Details of the alignment processing by the alignment unit 115 will be described later. The second interpolation signal output from the alignment unit 115 is sent to the color fringing removal unit 105.

色にじみ除去部105は、生成手段及び検出手段の一例であり、第1のメモリ110aからの第1の補間信号と位置合わせ部115からの第2の補間信号とに基づいて、第1の補間信号から色にじみ領域を検出して色にじみを除去する。色にじみ除去部105による色にじみ領域の検出と色にじみの除去処理の詳細については後述する。色にじみ除去部105により第1の補間信号から色にじみが除去された後の信号は、信号処理部106に送られる。   The color blur removal unit 105 is an example of a generation unit and a detection unit, and the first interpolation is performed based on the first interpolation signal from the first memory 110a and the second interpolation signal from the alignment unit 115. A color blur area is detected from the signal to remove the color blur. Details of the color blur area detection and color blur removal processing by the color blur removal unit 105 will be described later. The signal after the color blur is removed from the first interpolation signal by the color blur removal unit 105 is sent to the signal processing unit 106.

信号処理部106は、色にじみが除去された後の第1の補間信号を用いて公知の輝度信号処理や色信号処理等を行って画像信号を生成する。信号処理部106による信号処理により生成された画像信号は、本撮影による画像信号として、不図示の記録部に送られて記録媒体へ記録されたり、不図示の表示部に送られて表示されたりする。   The signal processing unit 106 performs known luminance signal processing, color signal processing, and the like using the first interpolation signal after the color blur is removed to generate an image signal. The image signal generated by the signal processing by the signal processing unit 106 is sent to a recording unit (not shown) and recorded on a recording medium as an image signal by actual photographing, or sent to a display unit (not shown) and displayed. To do.

前述の図1(A)は、撮影レンズ130〜補間処理部104までが1系統となされた撮像装置の例を挙げているが、本実施形態の撮像装置は、図1(B)に示すように、撮影レンズから補間処理部までが2系統となされた撮像装置であってもよい。   FIG. 1A described above shows an example of an imaging apparatus in which the photographing lens 130 to the interpolation processing unit 104 are one system, but the imaging apparatus of the present embodiment is as shown in FIG. In addition, an imaging apparatus having two systems from the photographing lens to the interpolation processing unit may be used.

図1(B)において、撮影レンズ130a,130bは図1(A)の撮影レンズ130と同様にフォーカスレンズやズームレンズを有する。撮影レンズ130aは、撮像部101aの撮像面上に被写体等の光学像を結像させ、撮影レンズ130bは、撮像部101bの撮像面上に被写体等の光学像を結像させる。撮影レンズ130a,130bは、制御部120によりフォーカスレンズが駆動制御されて、被写体等に対するピントを合わせるAF制御が行われる。メカ機構131a,131bは、図1(A)のメカ機構131と同様に、メカニカルシャッター、絞り等を有して構成されている。撮像部101a,101bは、図1(A)の撮像部101と同様に撮像素子とその周辺回路からなり、撮像素子の撮像面はベイヤー配列のRGBカラーフィルタにより覆われている。   In FIG. 1B, photographing lenses 130a and 130b have a focus lens and a zoom lens in the same manner as the photographing lens 130 in FIG. The photographing lens 130a forms an optical image of a subject or the like on the imaging surface of the imaging unit 101a, and the photographing lens 130b forms an optical image of a subject or the like on the imaging surface of the imaging unit 101b. In the photographing lenses 130a and 130b, the focus lens is driven and controlled by the control unit 120, and AF control for focusing on a subject or the like is performed. The mechanical mechanisms 131a and 131b are configured to have a mechanical shutter, a diaphragm, and the like, similarly to the mechanical mechanism 131 in FIG. The imaging units 101a and 101b include an imaging element and its peripheral circuits as in the imaging unit 101 of FIG. 1A, and the imaging surface of the imaging element is covered with an RGB color filter in a Bayer array.

図1(B)の構成例の場合、撮像部101aにより撮像された画像が第1の撮影画像となされ、撮像部101bにより撮像された画像が第2の撮影画像となされる。このため、制御部120は、メカ機構131aのシャッター速度と絞り値については、本撮影におけるAE制御やユーザによるマニュアル設定されたシャッター速度と絞り値に制御する。これに対し、制御部120は、メカ機構131bについては、メカ機構131aに設定した絞り値よりも小絞りになる(絞りのf値を大きくする)ように制御する。図1(B)に示した2系統構成の撮像装置は、撮像部101aによる第1の撮影画像の撮像と、撮像部101bによる第2の撮影画像の撮像とを、同時に行うことができる。このため、図1(B)の撮像装置の場合、第1の撮影画像と第2の撮影画像は、撮影タイムラグがない同時刻に撮影された画像となる。   In the configuration example of FIG. 1B, an image captured by the image capturing unit 101a is a first captured image, and an image captured by the image capturing unit 101b is a second captured image. Therefore, the control unit 120 controls the shutter speed and the aperture value of the mechanical mechanism 131a to the AE control in the actual photographing or the shutter speed and the aperture value set manually by the user. On the other hand, the control unit 120 controls the mechanical mechanism 131b so that the aperture value is smaller than the aperture value set for the mechanical mechanism 131a (the f value of the aperture is increased). The imaging device having a two-system configuration illustrated in FIG. 1B can simultaneously perform the imaging of the first captured image by the imaging unit 101a and the imaging of the second captured image by the imaging unit 101b. For this reason, in the case of the imaging apparatus of FIG. 1B, the first captured image and the second captured image are images captured at the same time without a shooting time lag.

撮像部101aからの第1の撮影画像のアナログ画像信号は、A/D変換部102aによりデジタル画像信号に変換され、第1の画像信号としてWB処理部103aに送られる。また、撮像部101bからの第2の撮影画像のアナログ画像信号は、A/D変換部102bによりデジタル画像信号に変換され、第2の画像信号としてWB処理部103bに送られる。WB処理部103aは、制御部120による制御の下で、第1の画像信号にWB処理を行い、そのWB処理後の第1の画像信号を補間処理部104aに送る。WB処理部103bは、制御部120による制御の下で、第2の画像信号にWB処理を行い、そのWB処理後の第2の画像信号を補間処理部104bに送る。   The analog image signal of the first captured image from the imaging unit 101a is converted into a digital image signal by the A / D conversion unit 102a, and sent to the WB processing unit 103a as the first image signal. Further, the analog image signal of the second photographed image from the imaging unit 101b is converted into a digital image signal by the A / D conversion unit 102b and sent to the WB processing unit 103b as the second image signal. The WB processing unit 103a performs WB processing on the first image signal under the control of the control unit 120, and sends the first image signal after the WB processing to the interpolation processing unit 104a. The WB processing unit 103b performs WB processing on the second image signal under the control of the control unit 120, and sends the second image signal after the WB processing to the interpolation processing unit 104b.

補間処理部104aは、制御部120による制御の下、第1の画像信号に対して補間処理を行う。また、補間処理部104bは、制御部120による制御の下、第2の画像信号に対して補間処理を行う。これら補間処理部104a,104bにおける補間処理は、図1(A)の補間処理部104と同様の処理である。補間処理部104aの補間処理による第1の補間信号は、位置合わせ部115と色にじみ除去部105に送られる。補間処理部104bの補間処理による第2の補間信号は、位置合わせ部115に送られる。位置合わせ部115、色にじみ除去部105、信号処理部106は、図1(A)に示したものと同様のものである。   The interpolation processing unit 104a performs interpolation processing on the first image signal under the control of the control unit 120. Further, the interpolation processing unit 104b performs an interpolation process on the second image signal under the control of the control unit 120. The interpolation processing in these interpolation processing units 104a and 104b is the same processing as the interpolation processing unit 104 in FIG. The first interpolation signal obtained by the interpolation processing of the interpolation processing unit 104 a is sent to the alignment unit 115 and the color blur removal unit 105. The second interpolation signal obtained by the interpolation processing of the interpolation processing unit 104b is sent to the alignment unit 115. The alignment unit 115, the color blur removal unit 105, and the signal processing unit 106 are the same as those shown in FIG.

<補間処理の詳細>
図1(A)の補間処理部104、図1(B)の補間処理部104a,104bが行う補間処理について、図2(A)〜図2(C)を用いて説明する。図1(A)の補間処理部104、図1(B)の補間処理部104a,104bにて行われる補間処理は基本的に同じ処理であるため、ここでは図1(A)の補間処理部104が第1の画像信号に対して行う補間処理のみを例に挙げて説明する。
<Details of interpolation processing>
Interpolation processing performed by the interpolation processing unit 104 in FIG. 1A and the interpolation processing units 104a and 104b in FIG. 1B will be described with reference to FIGS. 2A to 2C. Interpolation processing performed in the interpolation processing unit 104 in FIG. 1A and the interpolation processing units 104a and 104b in FIG. 1B is basically the same processing, so here the interpolation processing unit in FIG. Only the interpolation processing that 104 performs on the first image signal will be described as an example.

第1の画像信号は図2(A)に示したベイヤー配列のR,G,Bに対応した画素配列の画像250である。補間処理部104は、第1の画像信号の画像250の各画素を図2(B)に示すように赤成分(R成分),緑成分(G成分),青成分(B成分)の原色成分ごとに分離すると共に、R,G,Bの各原色成分が無い画素位置にはゼロ(0)の画素値を挿入する。図2(B)の画像251はR成分の画素値とゼロの画素値が配列された画像であり、画像252はG成分の画素値とゼロの画素値が配列された画像、画像253はB成分の画素値とゼロの画素値が配列された画像である。更に補間処理部104は、図2(B)の各画像251〜253に対し、画素値がゼロの画素位置に周囲画素から補間した画素値を挿入して、図2(C)に示すようなR,G,Bの各色プレーン(Rプレーン254、Gプレーン255、Bプレーン256)を生成する。なお、これ以降、記載を簡略にするため、Rプレーン254、Gプレーン255、Bプレーン256を、それぞれRプレーン、Gプレーン、Bプレーンとのみ表記する。   The first image signal is an image 250 having a pixel array corresponding to R, G, and B in the Bayer array shown in FIG. As shown in FIG. 2B, the interpolation processing unit 104 converts the primary image components of the red component (R component), the green component (G component), and the blue component (B component) into each pixel of the image 250 of the first image signal. And a pixel value of zero (0) is inserted at a pixel position where there is no R, G, B primary color component. An image 251 in FIG. 2B is an image in which R component pixel values and zero pixel values are arranged, an image 252 is an image in which G component pixel values and zero pixel values are arranged, and an image 253 is B It is an image in which pixel values of components and zero pixel values are arranged. Further, the interpolation processing unit 104 inserts pixel values interpolated from surrounding pixels at pixel positions where the pixel value is zero for each of the images 251 to 253 in FIG. 2B, as shown in FIG. R, G, and B color planes (R plane 254, G plane 255, and B plane 256) are generated. Hereinafter, in order to simplify the description, the R plane 254, the G plane 255, and the B plane 256 are expressed as only an R plane, a G plane, and a B plane, respectively.

<位置合わせ処理の詳細>
位置合わせ部115による位置合わせ処理について説明する。第2の補間信号は、前述したように、第1の補間信号に対して位置合わせが行われた後の信号であるか、或いは、第1の補間信号に対して画素の位置ずれが生じていない信号である。
<Details of alignment processing>
An alignment process performed by the alignment unit 115 will be described. As described above, the second interpolation signal is a signal after the alignment with respect to the first interpolation signal, or a pixel position shift has occurred with respect to the first interpolation signal. There is no signal.

このため、位置合わせ部115は、先ず第1の補間信号の画像と第2の補間信号の画像との間の位置ずれ量を検出する。そして、位置合わせ部115は、検出した位置ずれ量に基づいて、第1の補間信号と第2の補間信号の位置合わせを行う。なお、位置合わせに必要な位置ずれ量の検出と位置合わせの手法は、例えば画像合成方式の手ぶれ補正処理などで使用されており、多くの技術が開示されているためその説明については省略する。   For this reason, the alignment unit 115 first detects the amount of positional deviation between the image of the first interpolation signal and the image of the second interpolation signal. Then, the alignment unit 115 aligns the first interpolation signal and the second interpolation signal based on the detected positional deviation amount. It should be noted that the method of detecting the amount of misalignment necessary for alignment and the method of alignment are used in, for example, image-sharing camera shake correction processing, etc., and many techniques have been disclosed, and the description thereof will be omitted.

ここで、図2(A)に示したようにベイヤー配列のR,G,Bに対応した各画素が配列された画像250は、G成分の画素がR成分の画素やB成分の画素より多く、G成分の解像度がR成分やB成分の解像度よりも高くなっている。このため、本実施形態の場合、位置合わせ部115は、第1の補間信号と第2の補間信号との間の画像の位置ずれ量を検出する際には、第1の補間信号と第2の補間信号の各色プレーンのうち、解像度の高いGプレーンを用いて位置ズレ量を検出する。これにより、位置合わせ部115では、精度の高い位置合わせ処理が可能となる。   Here, as shown in FIG. 2A, in the image 250 in which pixels corresponding to R, G, and B in the Bayer array are arranged, the G component pixel is larger than the R component pixel and the B component pixel. , The resolution of the G component is higher than the resolution of the R component and the B component. For this reason, in the case of the present embodiment, the alignment unit 115 detects the positional deviation amount of the image between the first interpolation signal and the second interpolation signal, and the first interpolation signal and the second interpolation signal. Among the color planes of the interpolated signal, a G-plane having a high resolution is used to detect a positional shift amount. Thereby, the alignment unit 115 can perform alignment processing with high accuracy.

<色にじみ除去処理>
以下、色にじみ除去部105による色にじみ領域の検出(判定)処理と色にじみ除去処理について、図3(A)〜図3(C)、図4、図5を参照しながら説明する。なお、色にじみ除去部105で行われる色にじみ領域の検出処理と色にじみ除去処理は、図1(A)と図1(B)の何れの構成でも同じ処理であるため、ここでは図1(A)と図1(B)の構成を区別せずに説明する。
<Color blur removal process>
Hereinafter, the detection (determination) process and the color blur removal process of the color blur area by the color blur removal unit 105 will be described with reference to FIGS. 3 (A) to 3 (C), FIG. 4, and FIG. It should be noted that the color blur area detection process and the color blur removal process performed by the color blur removal unit 105 are the same in any of the configurations in FIGS. 1A and 1B, and therefore FIG. Description will be made without distinguishing the configurations of A) and FIG.

本実施形態では、図2(C)に示した各色プレーン(Rプレーン、Gプレーン、Bプレーン)のうち、レンズ光学系(撮影レンズ130)の設計上の中心波長光である緑光(G)に対応したGプレーンを、基準プレーンとする。色にじみは、基準プレーンであるGプレーンから離れた色であるRプレーンやBプレーンの何れでも生じ易いため、本実施形態では、それらRプレーンやBプレーンを色にじみの検出対象の色成分の画像とする。以下の説明では、色にじみの検出対象の色成分の画像の一例としてBプレーンが挙げられ、検出対象の色成分(Bプレーン)とは異なる色成分の画像がGプレーンとなされている。   In the present embodiment, among the color planes (R plane, G plane, B plane) shown in FIG. 2C, green light (G), which is the central wavelength light in the design of the lens optical system (shooting lens 130), is used. The corresponding G plane is set as a reference plane. Since color blur is likely to occur in any of the R plane and the B plane that are separated from the G plane that is the reference plane, in this embodiment, an image of a color component that is a target of color blur detection in the R plane and the B plane. And In the following description, a B plane is given as an example of an image of a color component to be detected for color blur, and an image having a color component different from the color component to be detected (B plane) is a G plane.

図3(A)は、横軸が画素位置(pos)、縦軸が画素値(画素の信号強度)を示している。図3(A)は、或る光源光の下で撮影が行われた場合の、第1の補間信号のBプレーンとGプレーン、及び、第2の補間信号のBプレーンとGプレーンの、画素位置posと画素値との関係を表している。具体的には、図3(A)の曲線201は第1の補間信号のBプレーン、曲線202は第1の補間信号のGプレーン、曲線203は第2の補間信号のBプレーン、曲線204は第2の補間信号のGプレーンの、画素位置posと画素値との関係を表している。   In FIG. 3A, the horizontal axis indicates the pixel position (pos), and the vertical axis indicates the pixel value (pixel signal intensity). FIG. 3A shows pixels of the B and G planes of the first interpolation signal and the B and G planes of the second interpolation signal when shooting is performed under a certain light source light. This represents the relationship between the position pos and the pixel value. Specifically, the curve 201 in FIG. 3A is the B plane of the first interpolation signal, the curve 202 is the G plane of the first interpolation signal, the curve 203 is the B plane of the second interpolation signal, and the curve 204 is The relationship between the pixel position pos and the pixel value of the G plane of the second interpolation signal is shown.

ここで、絞りを絞って撮影した画像は、絞りが開かれて撮影された画像よりも、軸上色収差の発生量が少ない。本実施形態の場合、第2の撮影画像は、第1の撮影画像の場合よりも絞りが絞られて(f値が大きくなされて)撮像された画像である。このため、第2の撮影画像に対応した第2の補間信号は色にじみの発生が少なく、一方、第1の撮影画像に対応した第1の補間信号は色にじみの発生が多いと考えられる。また、色にじみは、前述したように、基準プレーン(Gプレーン)から離れた色プレーン(本実施形態ではBプレーン)で生じている。図3(A)の例の場合、第1の補間信号では、画素位置posが「1」を超えたところで、Bプレーン(曲線201)とGプレーン(曲線202)の画素値の差が既にゼロより大きく(B−G>0)なっているため、色にじみ(青色にじみ)が生じていることがわかる。一方、第2の補間信号では、画素位置posが「5」になるまでBプレーン(曲線203)とGプレーン(曲線204)の画素値の差がゼロ(B−G=0)であるため色にじみ(青色にじみ)は発生していないことがわかる。第2の補間信号の場合、画素位置posが「5」以降において、Bプレーン(曲線203)とGプレーン(曲線204)の画素値の差がゼロより大きく(B−G>0)なって色にじみ(青色にじみ)が生じていることがわかる。   Here, an image taken with the aperture stopped produces less axial chromatic aberration than an image taken with the aperture opened. In the case of the present embodiment, the second captured image is an image that has been captured with a reduced aperture (with a larger f value) than in the case of the first captured image. For this reason, the second interpolation signal corresponding to the second photographed image is less likely to cause color blur, while the first interpolation signal corresponding to the first photographed image is likely to cause much color blur. Further, as described above, the color blur is generated in the color plane (B plane in this embodiment) that is distant from the reference plane (G plane). In the example of FIG. 3A, in the first interpolation signal, when the pixel position pos exceeds “1”, the difference between the pixel values of the B plane (curve 201) and the G plane (curve 202) is already zero. Since it is larger (BG> 0), it can be seen that color blur (blue blur) occurs. On the other hand, in the second interpolation signal, the color difference between the B plane (curve 203) and the G plane (curve 204) is zero (B−G = 0) until the pixel position pos reaches “5”. It can be seen that no blur (blue blur) has occurred. In the case of the second interpolation signal, when the pixel position pos is “5” or later, the difference between the pixel values of the B plane (curve 203) and the G plane (curve 204) is greater than zero (B−G> 0) and the color is changed. It can be seen that blur (blue blur) occurs.

図3(B)は、横軸が画素位置(pos)、縦軸が画素値周辺の傾き(leap)を示している。画素値周辺の傾きとは、着目位置の画素(以下、着目画素とする。)とその周辺画素との間の信号強度の変化の傾きであり、本実施形態では下記の式(1)、式(2)により求められる。着目画素とその周辺画素との間の信号強度の変化の傾きは、具体的には画素値の変化の傾きであるため、以下の説明では、信号強度の変化の傾きを表す値を信号傾斜と表記する。図3(B)の曲線211は第1の補間信号のBプレーンにおける信号傾斜を示し、曲線212は第1の補間信号のGプレーンにおける信号傾斜を示している。図3(B)の曲線213は第2の補間信号のBプレーンにおける信号傾斜、曲線214は第2の補間画像のGプレーンにおける信号傾斜を示している。   In FIG. 3B, the horizontal axis indicates the pixel position (pos), and the vertical axis indicates the inclination around the pixel value. The inclination around the pixel value is an inclination of a change in signal intensity between the pixel at the target position (hereinafter referred to as the target pixel) and the peripheral pixel. In the present embodiment, the following expressions (1) and (1) It is calculated | required by (2). Since the slope of the change in signal intensity between the target pixel and its surrounding pixels is specifically the slope of the change in pixel value, in the following description, the value representing the slope of the change in signal intensity is referred to as the signal slope. write. A curve 211 in FIG. 3B indicates a signal inclination of the first interpolation signal in the B plane, and a curve 212 indicates a signal inclination of the first interpolation signal in the G plane. A curve 213 in FIG. 3B indicates a signal inclination in the B plane of the second interpolation signal, and a curve 214 indicates a signal inclination in the G plane of the second interpolation image.

本実施形態の場合、色にじみ除去部105は、第1の補間信号のBプレーンにおける信号傾斜を下記式(1)により信号傾斜B_leapとして算出し、第1の補間信号のGプレーンにおける信号傾斜を下記式(2)により信号傾斜G_leapとして算出する。本実施形態の場合、第1の補間信号のBプレーンにおける信号傾斜B_leapは、生成手段により生成される第1の傾きに相当し、第1の補間信号のGプレーンにおける信号傾斜G_leapは、生成手段により生成される第3の傾きに相当する。   In the case of the present embodiment, the color fringing removal unit 105 calculates the signal slope of the first interpolation signal in the B plane as the signal slope B_leap according to the following equation (1), and calculates the signal slope of the first interpolation signal in the G plane. It calculates as signal inclination G_leap by following formula (2). In the case of the present embodiment, the signal slope B_leap in the B plane of the first interpolation signal corresponds to the first slope generated by the generation unit, and the signal slope G_leap in the G plane of the first interpolation signal is the generation unit. This corresponds to the third slope generated by.

Figure 2017183813
Figure 2017183813

なお、式(1)の変数B(pos+1)とB(pos−1)は、第1の補間信号のBプレーンにおける着目画素の周辺画素の画素値である。また、式(2)の変数G(pos+1)とG(pos−1)は、第1の補間信号のGプレーンにおける着目画素の周辺画素の画素値である。   Note that the variables B (pos + 1) and B (pos−1) in Expression (1) are pixel values of peripheral pixels of the pixel of interest in the B plane of the first interpolation signal. In addition, variables G (pos + 1) and G (pos−1) in Expression (2) are pixel values of peripheral pixels of the pixel of interest in the G plane of the first interpolation signal.

そして、色にじみ除去部105は、第1の補間信号のBプレーンにおける信号傾斜B_leapと、第1の補間信号のGプレーンにおける信号傾斜G_leapとの比を求め、その比の値が大きい画素位置posの画素には色にじみが生じていると判定する。より具体的には、色にじみ除去部105は、B_leapとG_leapの比が所定の第1の閾値TH1より大きい(B_leap/G_leap>TH1)場合に、その画素位置posの画素には色にじみが生じていると判定する。   Then, the color blur removal unit 105 obtains a ratio between the signal slope B_leap in the B plane of the first interpolation signal and the signal slope G_leap in the G plane of the first interpolation signal, and the pixel position pos having a large value of the ratio. It is determined that color blur has occurred in the pixels of. More specifically, the color blur removal unit 105 causes color blur in the pixel at the pixel position pos when the ratio of B_leap to G_leap is greater than a predetermined first threshold value TH1 (B_leap / G_leap> TH1). It is determined that

図3(C)は、横軸が画素位置(pos)を示し、縦軸が信号傾斜の比を示している。図3(C)の曲線221は、第1の補間信号のBプレーンにおける信号傾斜B_leapと第1の補間信号のGプレーンにおける信号傾斜G_leapとの比を表している。なお、図3(C)の曲線222の説明については後述する。   In FIG. 3C, the horizontal axis indicates the pixel position (pos), and the vertical axis indicates the signal inclination ratio. A curve 221 in FIG. 3C represents a ratio between the signal gradient B_leap in the B plane of the first interpolation signal and the signal gradient G_leap in the G plane of the first interpolation signal. Note that description of the curve 222 in FIG.

ここで、図3(C)の例において、第1の閾値TH1の値が例えば「2」である場合、B_leapとG_leapの比が第1の閾値TH1より大きい(B_leap/G_leap>TH1)条件を満たしているのは、画素位置pos1〜pos5までである。この場合、画素位置pos1〜pos5までは色にじみが生じていると判定されることになり、画素位置pos6以降では色にじみは生じていないと判定されることになる。ただし、図3(C)の曲線221からわかるように、画素位置pos6付近は、B_leapとG_leapの比が第1の閾値TH1の「2」より小さいものの、実際には色にじみが生じている。しかしながら、第1の補正信号から求められる信号傾斜B_leapとG_leapの比と第1の閾値TH1との比較のみでは、画素位置pos6付近に生じている色にじみは検出できない。この場合、後に行われる色にじみ除去処理において、画素位置pos6付近の色にじみは除去されずに、色にじみが残留してしまうことになる。   Here, in the example of FIG. 3C, when the value of the first threshold TH1 is “2”, for example, the condition that the ratio of B_leap to G_leap is greater than the first threshold TH1 (B_leap / G_leap> TH1) The pixel positions pos1 to pos5 are satisfied. In this case, it is determined that the color blur occurs from the pixel positions pos1 to pos5, and it is determined that the color blur does not occur after the pixel position pos6. However, as can be seen from the curve 221 in FIG. 3C, in the vicinity of the pixel position pos6, although the ratio of B_leap to G_leap is smaller than “2” of the first threshold value TH1, color bleeding actually occurs. However, only by comparing the ratio of the signal gradients B_leap and G_leap obtained from the first correction signal with the first threshold value TH1, the color blur occurring near the pixel position pos6 cannot be detected. In this case, in the color blur removal process performed later, the color blur in the vicinity of the pixel position pos6 is not removed and the color blur remains.

このため、色にじみ除去部105は、信号傾斜B_leapとG_leapの比と第1の閾値TH1との比較で色にじみが生じていないと判定された領域については、更に、色にじみの発生が元々少ない第2の補間信号を用いて色にじみの有無を判定する。本実施形態の場合、色にじみ除去部105は、第1の補間信号のBプレーンの信号傾斜B_leapと、第2の補正信号のBプレーンの信号傾斜(B2_leapとする。)との比が大きい画素位置posの画素には色にじみが生じていると判定する。より具体的には、色にじみ除去部105は、B_leapとB2_leapの比が所定の第2の閾値TH2より大きい(B_leap/B2_leap>TH2)場合に、その画素位置の画素には色にじみ(青色にじみ)が生じていると判定する。なお、第2の補間信号のBプレーンにおける信号傾斜B2_leapは、前述した式(1)において変数B(pos+1)とB(pos−1)を、第2の補間信号のBプレーンにおける着目画素の周辺画素の画素値にすることにより算出可能である。本実施形態の場合、第2の補間信号のBプレーンにおける信号傾斜B2_leapは、生成手段により生成される第2の傾きに相当する。   For this reason, the color blur removal unit 105 further reduces the occurrence of color blur in the area where it is determined that the color blur is not generated by comparing the ratio between the signal gradients B_leap and G_leap and the first threshold value TH1. The presence or absence of color blur is determined using the second interpolation signal. In the present embodiment, the color blur removal unit 105 has a large ratio between the signal slope B_leap of the B plane of the first interpolation signal and the signal slope of the B plane of the second correction signal (referred to as B2_leap). It is determined that a color blur has occurred in the pixel at the position pos. More specifically, when the ratio of B_leap and B2_leap is larger than a predetermined second threshold value TH2 (B_leap / B2_leap> TH2), the color blur removing unit 105 performs color blur (blue blurring) on the pixel at the pixel position. ) Has occurred. Note that the signal slope B2_leap in the B plane of the second interpolation signal is obtained by replacing the variables B (pos + 1) and B (pos-1) in the above-described equation (1) with the periphery of the pixel of interest in the B plane of the second interpolation signal. It can be calculated by setting the pixel value of the pixel. In the present embodiment, the signal gradient B2_leap in the B plane of the second interpolation signal corresponds to the second gradient generated by the generation unit.

図3(C)の曲線222は、第1の補正信号のBプレーンにおける信号傾斜B_leapと、第2の補正信号のBプレーンにおける信号傾斜B2_leapとの比を表している。図3(C)の例の曲線222からわかるように、例えば第2の閾値TH2の値を「2」とした場合、曲線222が第2の閾値TH2の「2」を下回るのは、画素位置pos9以降である。したがって、この場合、色にじみ除去部105は、画素位置pos1〜pos5だけでなく、画素位置pos6〜pos8まで色にじみが生じていると判定することができる。これにより、後に行われる色にじみ除去処理では、画素位置pos8まで色にじみを除去することが可能になる。   A curve 222 in FIG. 3C represents a ratio between the signal inclination B_leap in the B plane of the first correction signal and the signal inclination B2_leap in the B plane of the second correction signal. As can be seen from the curve 222 in the example of FIG. 3C, for example, when the value of the second threshold value TH2 is “2”, the curve 222 falls below “2” of the second threshold value TH2. It is after pos9. Therefore, in this case, the color blur removing unit 105 can determine that color blur is generated not only in the pixel positions pos1 to pos5 but also in the pixel positions pos6 to pos8. As a result, in the color blur removal process performed later, it is possible to remove color blur up to the pixel position pos8.

図4は、色にじみ除去部105における色にじみの判定から除去までの流れを示すフローチャートである。図4のフローチャートの処理は色にじみ除去部105により行われるが、本実施形態に係るプログラムを例えばCPUが実行することにより実現されてもよい。本実施形態に係るプログラムは、例えば不図示のROM等に予め用意されていてもよく、また不図示の外部記憶媒体から読み出されたり、不図示のインターネット等のネットワークからダウンロードされたりして、不図示のRAM等にロードされてもよい。以下の説明では、図4の各処理のステップS301〜ステップS307をS301〜S307と略記し、これは他のフローチャートについても同様とする。   FIG. 4 is a flowchart showing a flow from determination of color blur to removal by the color blur removal unit 105. The process of the flowchart in FIG. 4 is performed by the color fringing removal unit 105, but may be realized by, for example, the CPU executing the program according to the present embodiment. The program according to the present embodiment may be prepared in advance in a ROM (not shown), for example, or read from an external storage medium (not shown) or downloaded from a network such as the Internet (not shown). You may load to RAM etc. which are not illustrated. In the following description, steps S301 to S307 of each process in FIG. 4 are abbreviated as S301 to S307, and this is the same for other flowcharts.

図4のフローチャートの処理は、例えばユーザから撮影開始が指示されることでスタートする。図4のフローチャートの処理がスタートすると、色にじみ除去部105は、S301の処理として、第1の空間演算処理を行う。本実施形態において、第1の空間演算処理は、下記式(3)、式(4)に示すような演算処理となされている。なお、式(3)、式(4)は、前述した式(1)、式(2)をより詳細に表した式である。第1の空間演算処理では、式(3)により第1の補間信号のBプレーンにおける信号傾斜B_leapが算出され、式(4)により第1の補間信号のGプレーンの信号傾斜G_leapが算出される。   The process of the flowchart in FIG. 4 starts when, for example, the user gives an instruction to start shooting. When the process of the flowchart of FIG. 4 starts, the color fringing removal unit 105 performs a first spatial calculation process as the process of S301. In the present embodiment, the first spatial calculation process is a calculation process as shown in the following formulas (3) and (4). In addition, Formula (3) and Formula (4) are formulas that represent Formula (1) and Formula (2) described above in more detail. In the first spatial calculation process, the signal inclination B_leap in the B plane of the first interpolation signal is calculated by Expression (3), and the signal inclination G_leap of the G plane of the first interpolation signal is calculated by Expression (4). .

Figure 2017183813
Figure 2017183813

ここで、式(3)、式(4)の式中のG(x+1,y)は第1の補間信号のGプレーンにおける着目画素の右隣の画素値であり、B(x+1,y)は第1の補間信号のBプレーンにおける着目画素の右隣の画素値である。G(x−1,y)は第1の補間信号のGプレーンにおける着目画素の左隣の画素値であり、B(x−1,y)は第1の補間信号のBプレーンにおける着目画素の左隣の画素値である。G(x,y+1)は第1の補間信号のGプレーンにおける着目画素の下隣の画素値であり、B(x,y+1)は第1の補間信号のBプレーンにおける着目画素の下隣の画素値である。G(x,y−1)は第1の補間信号のGプレーンにおける着目画素の上隣の画素値であり、B(x,y−1)は第1の補間信号のBプレーンにおける着目画素の上隣の画素値である。前述した図3(A)の例の場合、第1の補間信号のBプレーンは曲線201、第1の補間信号のGプレーンは曲線202に相当する。S301の後、色にじみ除去部105は、S302に処理を進める。   Here, G (x + 1, y) in the expressions (3) and (4) is a pixel value on the right side of the pixel of interest in the G plane of the first interpolation signal, and B (x + 1, y) is This is the pixel value on the right side of the pixel of interest in the B plane of the first interpolation signal. G (x-1, y) is the pixel value on the left of the pixel of interest in the G plane of the first interpolation signal, and B (x-1, y) is the pixel of interest in the B plane of the first interpolation signal. This is the pixel value on the left side. G (x, y + 1) is a pixel value below the target pixel in the G plane of the first interpolation signal, and B (x, y + 1) is a pixel below the target pixel in the B plane of the first interpolation signal. Value. G (x, y−1) is a pixel value adjacent to the pixel of interest in the G plane of the first interpolation signal, and B (x, y−1) is a pixel value of the pixel of interest in the B plane of the first interpolation signal. This is the upper adjacent pixel value. In the example of FIG. 3A described above, the B plane of the first interpolation signal corresponds to the curve 201, and the G plane of the first interpolation signal corresponds to the curve 202. After S301, the color fringing removal unit 105 advances the process to S302.

S302では、色にじみ除去部105は、第1の補間信号のBプレーンの着目画素が、色にじみが生じている領域(以下、色にじみ領域と表記する。)の画素であるか否かを判定する。具体的には、色にじみ除去部105は、式(3)と式(4)で求めた信号傾斜B_leapとG_leapとの比を算出し、その比が第1の閾値TH1より大きい場合には、着目画素は色にじみ領域の画素であると判定して、S305に処理を進める。一方、色にじみ除去部105は、信号傾斜B_leapとG_leapとの比が、第1の閾値以下(B_leap/G_leap≦TH1)である場合には、着目画素は色にじみ領域の画素でないと判定して、S303に処理を進める。   In step S <b> 302, the color blur removal unit 105 determines whether the pixel of interest on the B plane of the first interpolation signal is a pixel in a region where color blur occurs (hereinafter referred to as a color blur region). To do. Specifically, the color blur removal unit 105 calculates a ratio between the signal slopes B_leap and G_leap obtained by the equations (3) and (4), and when the ratio is larger than the first threshold value TH1, It is determined that the pixel of interest is a pixel in the color blur area, and the process proceeds to S305. On the other hand, the color blur removal unit 105 determines that the pixel of interest is not a pixel in the color blur area when the ratio of the signal gradient B_leap to G_leap is equal to or smaller than the first threshold (B_leap / G_leap ≦ TH1). , The process proceeds to S303.

S303に進むと、色にじみ除去部105は、第2の空間演算処理を行う。第2の空間演算処理は、下記式(5)により、第2の補間信号のBプレーンに対する信号傾斜B2_leapを算出する処理である。   In step S303, the color fringing removal unit 105 performs a second spatial calculation process. The second spatial calculation process is a process of calculating a signal slope B2_leap for the B plane of the second interpolation signal by the following equation (5).

Figure 2017183813
Figure 2017183813

式(5)の式中のB2(x+1,y)は第2の補間信号のBプレーンにおける着目画素の右隣の画素値であり、B2(x−1,y)は第2の補間信号のBプレーンにおける着目画素の左隣の画素値である。B2(x,y+1)は第2の補間信号のBプレーンにおける着目画素の下隣の画素値であり、B2(x,y−1)は第2の補間信号のBプレーンにおける着目画素の上隣の画素値である。なお、前述した図3(A)の例の場合、第2の補間信号のBプレーンは曲線203に相当する。S303の後、色にじみ除去部105は、S304に処理を進める。   In the equation (5), B2 (x + 1, y) is the pixel value on the right side of the pixel of interest in the B plane of the second interpolation signal, and B2 (x-1, y) is the second interpolation signal. This is the pixel value on the left side of the pixel of interest in the B plane. B2 (x, y + 1) is the pixel value below the pixel of interest in the B plane of the second interpolation signal, and B2 (x, y-1) is the pixel value above the pixel of interest in the B plane of the second interpolation signal. Pixel value. In the case of the example of FIG. 3A described above, the B plane of the second interpolation signal corresponds to the curve 203. After S303, the color fringing removal unit 105 advances the process to S304.

S304では、色にじみ除去部105は、S302で色にじみ領域の画素でないと判定された、第1の補間信号のBプレーンの着目画素について、更に、色にじみの発生が元々少ない第2の補間信号を用いて、色にじみが生じているか否かを判定する。具体的には、S304において、色にじみ除去部105は、式(3)で求めた第1の補間信号のBプレーンに対する信号傾斜B_leapと、式(5)で求めた第2の補間信号のBプレーンに対する信号傾斜B2_leapとの比を算出する。そして、色にじみ除去部105は、その比が第2の閾値TH2より大きい場合には、着目画素は色にじみ領域の画素であると判定して、S305に処理を進める。一方、色にじみ除去部105は、信号傾斜B_leapとB2_leapとの比が、第2の閾値以下(B_leap/B2_leap≦TH2)である場合には、着目画素は色にじみ領域の画素でないと判定して、その着目画素に対する図4の処理を終了する。   In S <b> 304, the color blur removal unit 105 further determines the second interpolation signal that is less likely to cause color blur for the target pixel in the B plane of the first interpolation signal that is determined not to be a pixel in the color blur area in S <b> 302. Is used to determine whether or not a color blur has occurred. Specifically, in S304, the color fringing removal unit 105 determines the signal slope B_leap for the B plane of the first interpolation signal obtained by Expression (3) and B of the second interpolation signal obtained by Expression (5). The ratio of the signal slope B2_leap to the plane is calculated. Then, when the ratio is larger than the second threshold value TH2, the color blur removal unit 105 determines that the pixel of interest is a pixel in the color blur area, and proceeds to S305. On the other hand, the color blur removal unit 105 determines that the pixel of interest is not a pixel in the color blur area when the ratio of the signal gradient B_leap to B2_leap is equal to or smaller than the second threshold (B_leap / B2_leap ≦ TH2). Then, the process of FIG. 4 for the target pixel is ended.

S305の処理に進んだ場合、色にじみ除去部105は、S302とS304で色にじみ領域であると判定された画素について、色にじみ量を算出(推定)する。本実施形態では、色にじみ除去部105は、色にじみ除去対象である第1の補間信号のBプレーンの信号傾斜B_leapに基づいて色にじみ量を算出する。具体的には、色にじみ除去部105は、下記の式(6)に示すように、第1の補間信号のBプレーンにおける信号傾斜B_leapの絶対値に係数k(k>0)を乗じた値を、推定色にじみ量Eとして算出する。S305の後、色にじみ除去部105は、S306に処理を進める。
E=k×|B_leap| ・・・式(6)
When the process proceeds to S305, the color blur removal unit 105 calculates (estimates) the color blur amount for the pixels determined to be the color blur area in S302 and S304. In the present embodiment, the color blur removal unit 105 calculates the amount of color blur based on the signal slope B_leap of the B plane of the first interpolation signal that is the target of color blur removal. Specifically, the color blur removal unit 105 multiplies the absolute value of the signal slope B_leap in the B plane of the first interpolation signal by a coefficient k (k> 0) as shown in the following equation (6). Is calculated as an estimated color blur amount E. After S305, the color fringing removal unit 105 advances the process to S306.
E = k × | B_leap | (6)

S306では、色にじみ除去部105は、過除去抑制処理を行う。過除去抑制処理は、推定色にじみ量Eを修正し、実際に除去する量E'を求める処理である。すなわち、S305で算出した推定色にじみ量Eは、一定のモデルに沿ったものであり、実際の色にじみ量とは必ずしも一致しない。例えば、同じBプレーンとして検出される青色光であっても、例えば波長450nmの光と波長400nmの光とでは、にじみ方が変化する。S305の式(6)では、このような波長による色にじみの変化については考慮していないため、推定色にじみ量Eが実際よりも例えば小さい場合には、青色にじみの除去を行った後の画像には若干の青みが残る。一方、推定色にじみ量Eが実際よりも例えば大きい場合には、青色にじみの除去後の画像は若干黄緑色になってしまう。特に後者の例のように推定色にじみ量Eが実際より大きい場合には、ユーザにとって不自然で大きな違和感が残る画像となる。   In step S306, the color fringing removal unit 105 performs an excessive removal suppression process. The excessive removal suppression process is a process for correcting the estimated color bleeding amount E and obtaining an actual removal amount E ′. That is, the estimated color blur amount E calculated in S305 is in line with a certain model and does not necessarily match the actual color blur amount. For example, even in the case of blue light detected as the same B-plane, for example, the blurring method varies between light having a wavelength of 450 nm and light having a wavelength of 400 nm. The expression (6) in S305 does not take into account such a change in color blur due to the wavelength. Therefore, when the estimated color blur amount E is smaller than the actual color blur, for example, the image after the blue blur is removed. Some blueness remains. On the other hand, when the estimated color blur amount E is larger than the actual color, for example, the image after the blue blur is removed is slightly yellowish green. In particular, when the estimated color blur amount E is larger than the actual color as in the latter example, the image becomes unnatural and uncomfortable for the user.

このため、色にじみ除去部105は、S306の過除去抑制処理として、一定の色相範囲内でのみ、色にじみ除去が行われるように、色にじみ除去を制限する。具体的には、色にじみ除去部105は、先ず、式(7)〜式(9)により、第1の補間信号の色にじみ除去対象であるBプレーンの画素の色度を計算する。   For this reason, the color fringing removal unit 105 limits the color fringing removal so that the color fringing removal is performed only within a certain hue range as the excessive removal suppressing process of S306. Specifically, the color fringing removal unit 105 first calculates the chromaticity of the pixels of the B plane that is the target of color fringing removal of the first interpolation signal, using Expressions (7) to (9).

Figure 2017183813
Figure 2017183813

a=5(x−y) ・・・式(8)
b=5(y−z) ・・・式(9)
a = 5 (x−y) (8)
b = 5 (yz) Formula (9)

ここで、図5は、式(8)と式(9)の色度座標(a,b)面を示す図である。図5の色度座標(a,b)面において、青色は、第4象限にあり、Bプレーンの画素値(信号強度)から推定色にじみ量Eを除去すると、色度は図中点線矢印のように左上方向へ移動する。図中点線矢印の始点が除去前の色度であり、点線矢印の先端が推定色にじみ量Eの除去後の色度である。このことから、色にじみ除去部105は、推定色にじみ量Eにより作用する色相範囲を、a'>0で且つb'<0に制限する。具体的には、式(10)により色相範囲を制限する。
B>0.22R+0.68G 且つ、B>−1.84R+3.30G ・・・式(10)
Here, FIG. 5 is a diagram showing the chromaticity coordinate (a, b) planes of the equations (8) and (9). In the chromaticity coordinate (a, b) plane of FIG. 5, blue is in the fourth quadrant, and when the estimated color blur amount E is removed from the pixel value (signal intensity) of the B plane, the chromaticity is indicated by a dotted arrow in the figure. Move in the upper left direction. The starting point of the dotted arrow in the figure is the chromaticity before removal, and the tip of the dotted arrow is the chromaticity after the estimated color blur amount E is removed. Therefore, the color blur removal unit 105 limits the hue range that is affected by the estimated color blur amount E to a ′> 0 and b ′ <0. Specifically, the hue range is limited by Expression (10).
B> 0.22R + 0.68G and B> −1.84R + 3.30G Formula (10)

このため、色にじみ除去部105は、S306において、先ず色相範囲の条件を満たさない画素に対しては除去量E'=0とし、S307の色にじみ除去処理における除去対象から外す。これにより、除去対象から外された画素は、S307における色にじみ除去処理では除去されず、S307の色にじみの除去処理によって画素値が影響を受けることはない。このように、色にじみ除去部105は、S307において、色相範囲の条件を満たす画素のみを色にじみ除去対象として色にじみ除去を行う。   For this reason, in step S306, the color blur removal unit 105 first sets the removal amount E ′ = 0 for pixels that do not satisfy the condition of the hue range, and excludes them from the removal target in the color blur removal process in step S307. As a result, the pixels excluded from the removal target are not removed by the color blur removal process in S307, and the pixel value is not affected by the color blur removal process in S307. As described above, in step S307, the color blur removal unit 105 performs color blur removal using only pixels that satisfy the condition of the hue range as color blur removal targets.

さらに、色にじみ除去部105は、色相範囲の条件を満たす画素に対しても、除去量E'を例えば式(11)により修正して、S307の色にじみ除去処理を行うようにしてもよい。
E'=min(E,B−(0.22R+0.68G),B−(−1.84R+3.30G)) ・・・式(11)
Further, the color blur removal unit 105 may correct the removal amount E ′ by, for example, the equation (11) and perform the color blur removal process in S307 even for pixels that satisfy the hue range.
E ′ = min (E, B− (0.22R + 0.68G), B − (− 1.84R + 3.30G)) (11)

この式(11)の除去量E'による色にじみ除去がなされた場合、色にじみ除去による色度変化は、図5中に実線矢印で示したように第4象限内に留まるようになる。なお、図5中実線矢印の始点は除去前の色度であり、実線矢印の先端は除去量E'による色にじみ除去後の色度である。これにより、S307での除去処理により色相範囲を超えるようなBプレーンに対する過除去が行われるのを防ぐことができる。   When the color blur removal is performed by the removal amount E ′ of the equation (11), the chromaticity change due to the color blur removal stays in the fourth quadrant as indicated by the solid line arrow in FIG. Note that the starting point of the solid line arrow in FIG. 5 is the chromaticity before removal, and the tip of the solid line arrow is the chromaticity after the color blur removal by the removal amount E ′. Thereby, it is possible to prevent over-removal of the B plane exceeding the hue range by the removal processing in S307.

色にじみ除去部105は、S307で色にじみの除去を行うが、式(12)のように、前述した除去量E'をBプレーンの信号強度から差し引くことで、新たなBプレーンを生成してもよい。
B=B−E' ・・・式(12)
The color fringing removal unit 105 removes the color fringing in S307, and generates a new B plane by subtracting the above-described removal amount E ′ from the signal intensity of the B plane as shown in Expression (12). Also good.
B = B−E ′ (12)

なお、前述の説明では、信号傾斜B_leapと信号傾斜B2_leapとの比をとることで色にじみ領域判定を行ったが、例えば、信号傾斜B_leapと信号傾斜B2_leapの差分を用いて色にじみ領域判定を行ってもよい。   In the above description, the color blur region determination is performed by taking the ratio of the signal gradient B_leap and the signal gradient B2_leap. For example, the color blur region determination is performed using the difference between the signal gradient B_leap and the signal gradient B2_leap. May be.

また、前述の説明では、色にじみ除去対象をBプレーンとしたが、色にじみ除去対象はRプレーンであっても、前述同様にして色にじみ除去を行うことができる。色にじみ除去対象がRプレーンの場合の処理は、前述したBプレーンが色にじみ除去対象である場合と同様の処理で実現可能であるため、その説明は省略する。   In the above description, the color blur removal target is the B plane. However, even if the color blur removal target is the R plane, color blur removal can be performed in the same manner as described above. Since the process when the color blur removal target is the R plane can be realized by the same process as the case where the B plane is the color blur removal target, the description thereof is omitted.

以上説明したように、撮像装置は、本撮影で撮影された第1の撮影画像から得られた第1の補間信号について、軸上色収差に起因した色にじみが生じているか否かの色にじみ判定を行っている。これとともに、本実施形態の撮像装置は、第1の補間信号において色にじみが生じていないと判定された画素について、本撮影時よりも絞りを絞った第2の撮影画像から得られた第2の補間信号をも用いた色にじみ判定を行う。すなわち、絞りを絞って撮影した画像には軸上色収差の発生量が少なくなることを考慮し、本実施形態の撮像装置は、本撮影時よりも絞りを絞った状態で撮影した第2の撮影画像を基に色にじみ判定を行うようにしている。これにより、本実施形態の撮像装置は、軸上色収差に起因する色にじみを精度良く検出可能となる。そして、本実施形態の撮像装置は、本撮影による第1の撮影画像の中で色にじみが生じていると判定された色にじみ領域に対して、色にじみ除去処理を行う。したがって、本実施形態の撮像装置によれば、軸上色収差に起因する色にじみを精度良く且つ効果的に補正可能となる。   As described above, the imaging apparatus determines whether or not color blur due to axial chromatic aberration has occurred in the first interpolation signal obtained from the first captured image captured in the actual shooting. It is carried out. At the same time, the imaging apparatus according to the present embodiment uses the second image obtained from the second photographed image with a smaller aperture than that at the time of the main photographing with respect to the pixel determined to have no color blur in the first interpolation signal. The color blur determination using the interpolation signal is also performed. That is, in consideration of the fact that the amount of axial chromatic aberration generated in an image shot with a reduced aperture is reduced, the imaging apparatus of the present embodiment performs the second shooting with a reduced aperture than during actual shooting. Color blur determination is performed based on the image. As a result, the imaging apparatus according to the present embodiment can accurately detect color blur caused by axial chromatic aberration. Then, the imaging apparatus according to the present embodiment performs a color blur removal process on a color blur area that is determined to have color blur in the first captured image obtained by the main shooting. Therefore, according to the imaging apparatus of the present embodiment, it is possible to accurately and effectively correct the color blur caused by the axial chromatic aberration.

<第2の実施形態>
第2の実施形態の撮像装置について説明する。第2の実施形態の撮像装置の構成は前述した図1(A)、図1(B)と同じであるため、図示は省略する。以下、第1の実施形態と同じ構成と処理については説明を省略し、第1の実施形態とは異なる点について説明する。第2の実施形態の撮像装置の場合、色にじみ除去部105における処理が第1の実施形態の場合とは異なる。
<Second Embodiment>
An imaging apparatus according to the second embodiment will be described. Since the configuration of the imaging apparatus according to the second embodiment is the same as that of FIGS. 1A and 1B described above, the illustration is omitted. Hereinafter, the description of the same configuration and processing as those in the first embodiment will be omitted, and differences from the first embodiment will be described. In the case of the imaging apparatus according to the second embodiment, the processing in the color fringing removal unit 105 is different from that in the first embodiment.

図6は、第2の実施形態の色にじみ除去部105における色にじみ領域の検出(判定)から除去までの流れを示すフローチャートである。図6のフローチャートの処理は色にじみ除去部105により行われるが、第2の実施形態に係るプログラムを例えばCPUが実行することにより実現されてもよい。第2の実施形態に係るプログラムは、第1の実施形態の場合と同様に、不図示のROMや外部記憶媒体、インターネット等のネットワークからダウンロードされて、不図示のRAM等にロードされる。   FIG. 6 is a flowchart illustrating a flow from detection (determination) to removal of a color blur area in the color blur removal unit 105 according to the second embodiment. The process of the flowchart in FIG. 6 is performed by the color fringing removal unit 105, but may be realized by, for example, a CPU executing a program according to the second embodiment. As in the case of the first embodiment, the program according to the second embodiment is downloaded from a ROM (not shown), an external storage medium, a network such as the Internet, and loaded into a RAM (not shown).

図6のフローチャートにおいてS601は前述した図4のS301と同じ処理である。以下同様に、S602はS302、S604はS303、S605はS304、S606はS305、S607はS306、S608はS307と概ね同じ処理である。第2の実施形態の場合、色にじみ除去部105は、S602において色にじみ領域でないと判定された場合、S603に処理を進める。   In the flowchart of FIG. 6, S601 is the same process as S301 of FIG. Similarly, S602 is S302, S604 is S303, S605 is S304, S606 is S305, S607 is S306, and S608 is almost the same as S307. In the case of the second embodiment, when it is determined in S602 that the area is not a color blur area, the color blur removal unit 105 advances the process to S603.

S603では、色にじみ除去部105は、局所動体領域判定処理として、第1の補間信号と第2の補間信号との間で、対象領域の画素が動体の被写体に対応した動体領域の画素であるか否かを判定する。動体領域の判定処理については、例えば公知の動きベクトルを基にした判定方法など各種公知の技術を用いることができるため、ここではその詳細な説明は省略する。なお、動体領域の判定処理は位置合わせ部115にて行われてもよい。位置合わせ部115が動体領域を判定する場合、色にじみ除去部105は、位置合わせ部115から動体領域の判定結果を示す情報を取得する。色にじみ除去部105は、S603において対象領域の画素が動体領域の画素であると判定した場合には、その画素について図6のフローチャートの処理を終了する。一方、色にじみ除去部105は、S603において動体領域の画素でないと判定した場合には、S604に処理を進める。S604以降の処理は図4のフローチャートのS303以降の処理と同様である。   In step S <b> 603, the color fringing removal unit 105 is a pixel in the moving object region corresponding to the moving subject between the first interpolation signal and the second interpolation signal as the local moving object region determination process. It is determined whether or not. For the determination process of the moving object region, various known techniques such as a determination method based on a known motion vector can be used, and thus detailed description thereof is omitted here. Note that the moving object region determination process may be performed by the alignment unit 115. When the alignment unit 115 determines the moving object region, the color blur removal unit 105 acquires information indicating the determination result of the moving object region from the alignment unit 115. If the color blur removal unit 105 determines in S603 that the pixel in the target area is a pixel in the moving object area, the process of the flowchart in FIG. 6 ends for that pixel. On the other hand, if the color blur removal unit 105 determines in S603 that the pixel is not a moving object region pixel, the process proceeds to S604. The processing after S604 is the same as the processing after S303 in the flowchart of FIG.

このように、第2の実施形態の場合、色にじみ除去部105は、第1,第2の補間信号を用いた動体領域判定処理により、対象領域が動体領域であるか否かを判定している。そして、色にじみ除去部105は、対象領域が動体領域でない場合には、第1の実施形態と同様に第1の補間信号を用いた色にじみ判定で色にじみが生じていないとされた画素について、更に第2の補間信号をも用いた色にじみ判定を行う。一方、対象領域が動体領域である場合、色にじみ除去部105は、第1の補間信号を用いた色にじみ判定のみを行い、第2の補間信号をも用いた色にじみ判定は行わない。これにより、第2の実施形態では、動体領域を色にじみ領域として誤って判定して、色にじみ除去を行ってしまうことを回避可能となっている。したがって、第2の実施形態によれば、動体領域とそれ以外の非動体領域の両方について、精度の高い色にじみ領域の検出と色にじみ除去とが可能となる。   As described above, in the case of the second embodiment, the color fringing removal unit 105 determines whether or not the target region is a moving object region by the moving object region determination process using the first and second interpolation signals. Yes. Then, when the target region is not a moving object region, the color blur removal unit 105 performs pixel blur that is determined to have no color blur in the color blur determination using the first interpolation signal as in the first embodiment. Further, color blur determination using the second interpolation signal is also performed. On the other hand, when the target region is a moving object region, the color blur removal unit 105 performs only color blur determination using the first interpolation signal, and does not perform color blur determination using the second interpolation signal. Accordingly, in the second embodiment, it is possible to avoid erroneously determining a moving object region as a color blur region and performing color blur removal. Therefore, according to the second embodiment, it is possible to detect a color blur area and remove a color blur with high accuracy for both the moving object area and the other non-moving object areas.

<第3の実施形態>
第3の実施形態の撮像装置について説明する。図7(A)と図7(B)は第3の実施形態の撮像装置の概略構成を示す図である。図7(A)は第1の実施形態の図1(A)と同様に撮影レンズ130〜補間処理部104までが1系統となされた第3の実施形態の撮像装置の構成例である。図7(B)は第1の実施形態の図1(B)と同様に撮影レンズ130a,130bから補間処理部104a,104bまでが2系統となされた第3の実施形態の撮像装置の構成例である。図7(A)と図7(B)に示す第3の実施形態の撮像装置において、第1の実施形態の撮像装置と同様の構成には図1(A)と図1(B)と同一の参照符号を付してそれらの説明は省略する。以下、第3の実施形態において、第1の実施形態とは異なる点について説明する。
<Third Embodiment>
An imaging apparatus according to a third embodiment will be described. FIG. 7A and FIG. 7B are diagrams illustrating a schematic configuration of an imaging apparatus according to the third embodiment. FIG. 7A is a configuration example of an imaging apparatus according to the third embodiment in which the photographing lens 130 to the interpolation processing unit 104 form one system as in FIG. 1A of the first embodiment. FIG. 7B illustrates a configuration example of the imaging apparatus according to the third embodiment in which the photographing lenses 130a and 130b to the interpolation processing units 104a and 104b are provided in two systems, similar to FIG. 1B of the first embodiment. It is. In the imaging apparatus of the third embodiment shown in FIGS. 7A and 7B, the same configuration as that of the imaging apparatus of the first embodiment is the same as in FIGS. 1A and 1B. The reference numerals are attached and their explanation is omitted. Hereinafter, differences of the third embodiment from the first embodiment will be described.

第3の実施形態の撮像装置は、第1,第2の実施形態の位置合わせ部115に代えて、倍率位置補正部515を有している。倍率位置補正部515は、第2の補間信号の各色プレーンの画像に対して、像倍率補正処理と位置合わせ処理とを行う。すなわち、本実施形態において、倍率位置補正部515は、第2の撮影画像に対し、像倍率補正と、第1の撮影画像に対する位置合わせとを行う補正手段に相当する。   The imaging apparatus of the third embodiment has a magnification position correction unit 515 instead of the alignment unit 115 of the first and second embodiments. The magnification position correction unit 515 performs image magnification correction processing and alignment processing on the image of each color plane of the second interpolation signal. That is, in the present embodiment, the magnification position correction unit 515 corresponds to a correction unit that performs image magnification correction and alignment with respect to the first captured image with respect to the second captured image.

ここで、第2の補間信号の元画像である第2の撮像画像は、第1の補間信号の元画像である第1の撮像画像よりも絞った状態で撮影された画像であり、第1の撮影画像よりも暗い画像となる。例えば第1の撮像画像と同じ明るさの第2の撮影画像を得ようとする場合には、第1の撮影画像の撮影時よりも、シャッター速度を遅くした撮影が行われることになる。ただし、シャッター速度が遅くなると、被写体ぶれや手ぶれによって、光軸に対して直交する方向のぶれだけでなく、光軸方向(ピント方向)の像ぶれも生じ易くなり、光軸方向の像ぶれは像倍率の変化として表れる。このように像倍率が変化すると、第1の補間信号と第2の補間信号との間の位置合わせの際に、例えば画像のエッジ位置を合わせ難くなることがある。   Here, the second captured image that is the original image of the second interpolation signal is an image that is captured in a state of being narrower than the first captured image that is the original image of the first interpolation signal. The image becomes darker than the captured image. For example, when trying to obtain a second photographed image having the same brightness as the first photographed image, photographing with a slower shutter speed is performed than when the first photographed image is photographed. However, when the shutter speed becomes slow, subject blurring and camera shake tend to cause not only blurring in the direction perpendicular to the optical axis but also image blurring in the optical axis direction (focus direction). Appears as a change in image magnification. When the image magnification changes in this way, it may be difficult to align the edge positions of the image, for example, when aligning the first interpolation signal and the second interpolation signal.

このようなことから、第3の実施形態の倍率位置補正部515は、第1の補間信号と第2の補間信号との間の位置合わせの際に、第2の補間信号に対し、像倍率の変化を補正する。像倍率の変化の補正処理は、例えば特開2007−43637号公報等に記載の公知技術を用いることができるため詳細な説明は省略する。このように、倍率位置補正部515は、第2の補間信号に対する像倍率の変化の補正処理と、その像倍率補正後の第2の補間信号の画像を第1の補間信号の画像に合わせる位置合わせ処理とを行う。なお、位置合わせ処理は、前述の第1,第2の実施形態の位置合わせ処理と同様の処理であるためその説明は省略する。   For this reason, the magnification position correction unit 515 according to the third embodiment performs image magnification on the second interpolation signal at the time of alignment between the first interpolation signal and the second interpolation signal. To compensate for changes. For the correction processing of the image magnification change, for example, a well-known technique described in Japanese Patent Application Laid-Open No. 2007-43637 or the like can be used, and detailed description thereof is omitted. In this way, the magnification position correction unit 515 corrects the change in the image magnification with respect to the second interpolation signal, and the position for matching the image of the second interpolation signal after the image magnification correction with the image of the first interpolation signal. And the matching process. Since the alignment process is the same as the alignment process of the first and second embodiments described above, the description thereof is omitted.

第3の実施形態によれば、倍率位置補正部515にて像倍率補正処理と位置合わせ処理を行うことで、光軸方向の像ぶれ等の影響により像倍率が変化した場合でも、第1の補間信号と第2の補間信号との間の画像位置を、正確に合わせることが可能となる。これにより、第3の実施形態の撮像装置は、精度の高い色にじみ領域の判定と色にじみ除去が可能となる。   According to the third embodiment, the image magnification correction process and the alignment process are performed by the magnification position correction unit 515, so that even when the image magnification changes due to the influence of image blurring in the optical axis direction, the first It is possible to accurately match the image position between the interpolation signal and the second interpolation signal. As a result, the image pickup apparatus according to the third embodiment can perform highly accurate color blur area determination and color blur removal.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
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.

上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

101,101a,101b 撮像部、131,131a,131b メカ機構(絞り)、104,104a,104b 補間処理部、105 色にじみ除去部、110 メモリ部、115 位置合わせ部、515 倍率位置補正部、120 制御部   101, 101a, 101b Imaging unit, 131, 131a, 131b Mechanical mechanism (aperture), 104, 104a, 104b Interpolation processing unit, 105 Color blur removal unit, 110 Memory unit, 115 Alignment unit, 515 Magnification position correction unit, 120 Control unit

Claims (14)

第1の撮影画像の検出対象となる色成分の着目位置における信号の傾きを第1の傾きとし、前記第1の撮影画像よりも絞りが小絞りになされて撮影された第2の撮影画像の前記色成分の前記着目位置における信号の傾きを第2の傾きとして生成する生成手段と、
前記第1の傾きと前記第2の傾きとに基づいて、前記第1の撮影画像の前記着目位置における前記色成分の色にじみを検出する検出手段と、
を有することを特徴とする画像処理装置。
The inclination of the signal at the position of interest of the color component that is the detection target of the first captured image is defined as the first inclination, and the second captured image captured with the aperture set smaller than that of the first captured image. Generating means for generating a slope of a signal of the color component at the position of interest as a second slope;
Detecting means for detecting a color blur of the color component at the position of interest of the first captured image based on the first inclination and the second inclination;
An image processing apparatus comprising:
前記生成手段は、前記第1の撮影画像の前記検出対象となる前記色成分とは異なる色成分の画像の、前記着目位置における信号の傾きを第3の傾きとして生成し、
前記検出手段は、
前記第1の傾きと前記第3の傾きとの比が所定の第1の閾値より大きい場合の前記着目位置には、前記検出対象の色成分の前記色にじみが生じているとして検出し、
前記第1の傾きと前記第3の傾きとの比が所定の第1の閾値以下になっている前記着目位置については、前記第1の傾きと前記第2の傾きとの比が所定の第2の閾値より大きいときに、前記着目位置には前記検出対象の色成分の前記色にじみが生じているとして検出することを特徴とする請求項1に記載の画像処理装置。
The generation unit generates a signal gradient at the position of interest of an image having a color component different from the color component to be detected in the first captured image as a third gradient,
The detection means includes
Detecting that the color blur of the color component to be detected has occurred at the position of interest when the ratio between the first inclination and the third inclination is larger than a predetermined first threshold,
For the position of interest where the ratio of the first inclination to the third inclination is not more than a predetermined first threshold, the ratio of the first inclination to the second inclination is a predetermined first The image processing apparatus according to claim 1, wherein when the threshold value is greater than 2, the image processing apparatus detects that the color blur of the detection target color component has occurred at the target position.
前記生成手段は、前記第1の撮影画像の前記検出対象となる前記色成分とは異なる色成分の画像の、前記着目位置における信号の傾きを第3の傾きとして生成し、
前記検出手段は、
前記第1の傾きと前記第3の傾きとの差分が所定の第1の閾値より大きい場合の前記着目位置には、前記検出対象の色成分の前記色にじみが生じているとして検出し、
前記第1の傾きと前記第3の傾きとの差分が所定の第1の閾値以下になっている前記着目位置については、前記第1の傾きと前記第2の傾きとの差分が所定の第2の閾値より大きいときに、前記着目位置には前記検出対象の色成分の前記色にじみが生じているとして検出することを特徴とする請求項1に記載の画像処理装置。
The generation unit generates a signal gradient at the position of interest of an image having a color component different from the color component to be detected in the first captured image as a third gradient,
The detection means includes
Detecting that the color blur of the color component to be detected has occurred at the position of interest when the difference between the first inclination and the third inclination is greater than a predetermined first threshold;
For the position of interest where the difference between the first inclination and the third inclination is less than or equal to a predetermined first threshold, the difference between the first inclination and the second inclination is a predetermined first The image processing apparatus according to claim 1, wherein when the threshold value is greater than 2, the image processing apparatus detects that the color blur of the detection target color component has occurred at the target position.
前記検出対象の色成分は、前記撮影画像に含まれる赤成分、緑成分、青成分の各原色成分のうち、青成分又は赤成分であり、
前記検出対象の色成分とは異なる色成分は、前記緑成分であることを特徴とする請求項2又は3に記載の画像処理装置。
The color component to be detected is a blue component or a red component among the primary color components of the red component, the green component, and the blue component included in the captured image,
The image processing apparatus according to claim 2, wherein the color component different from the color component to be detected is the green component.
前記第2の撮影画像を前記第1の撮影画像に対して位置合わせする補正手段を有し、
前記生成手段は、前記位置合わせがなされた前記第2の撮影画像の前記検出対象の色成分の前記着目位置における信号の傾きを前記第2の傾きとして生成することを特徴とする請求項1乃至4の何れか1項に記載の画像処理装置。
Correction means for aligning the second captured image with respect to the first captured image;
The generation unit generates the inclination of a signal at the target position of the color component to be detected of the second photographed image subjected to the alignment as the second inclination. 5. The image processing apparatus according to any one of 4.
前記第2の撮影画像に対し、像倍率補正と、前記第1の撮影画像に対する位置合わせとを行う補正手段を有し、
前記生成手段は、前記像倍率補正と前記位置合わせとが行われた第2の撮影画像の前記検出対象の色成分の着目位置における信号の傾きを前記第2の傾きとして生成することを特徴とする請求項1乃至4の何れか1項に記載の画像処理装置。
Correction means for performing image magnification correction and alignment with respect to the first captured image with respect to the second captured image;
The generation unit generates a signal gradient at a target position of the color component to be detected of the second photographed image subjected to the image magnification correction and the alignment as the second gradient. The image processing apparatus according to any one of claims 1 to 4.
前記補正手段は、前記第1の撮影画像に含まれる赤成分、緑成分、青成分の各原色成分のうち緑成分の画像と、前記第2の撮影画像に含まれる赤成分、緑成分、青成分の各原色成分のうち緑成分の画像とを用いて、前記第1の撮影画像と前記第2の撮影画像の位置合わせを行うことを特徴とする請求項5又は6に記載の画像処理装置。   The correction means includes an image of a green component among the primary color components of the red component, the green component, and the blue component included in the first captured image, and a red component, a green component, and a blue component included in the second captured image. 7. The image processing apparatus according to claim 5, wherein the first photographed image and the second photographed image are aligned using a green component image among the primary color components of the component. . 前記検出手段は、第1の撮影画像の中で動体領域を検出した場合には、前記検出した動体領域に含まれた前記着目位置については、前記第1の傾きと前記第2の傾きとに基づいた前記色成分の色にじみの検出を行わないことを特徴とする請求項1乃至7の何れか1項に記載の画像処理装置。   When the detection unit detects a moving object region in the first captured image, the target position included in the detected moving object region includes the first inclination and the second inclination. The image processing apparatus according to claim 1, wherein the color blur detection based on the color component is not performed. 前記検出手段は、
前記第1の傾きに基づいて前記検出対象の色成分の色にじみ量を算出し、
前記第1の撮像画像の前記着目位置における信号強度から前記色にじみ量に応じた信号強度を差し引くことにより、前記第1の撮影画像から前記色にじみを除去することを特徴とする請求項1乃至8の何れか1項に記載の画像処理装置。
The detection means includes
Calculating a color blur amount of the color component to be detected based on the first inclination;
The color blur is removed from the first photographed image by subtracting a signal intensity corresponding to the color blur amount from a signal intensity at the target position of the first captured image. The image processing apparatus according to any one of 8.
前記検出手段は、所定の色相範囲の着目位置を前記色にじみの除去対象とすることを特徴とする請求項9に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the detection unit sets a target position in a predetermined hue range as a target to remove the color blur. 前記検出手段は、前記算出した色にじみ量を所定の色相範囲に基づいて補正し、前記補正した後の色にじみ量により前記第1の撮像画像から前記色にじみを除去することを特徴とする請求項9に記載の画像処理装置。   The detection unit corrects the calculated color blur amount based on a predetermined hue range, and removes the color blur from the first captured image based on the corrected color blur amount. Item 10. The image processing apparatus according to Item 9. 前記着目位置は、着目画素の画素位置であり、
前記着目位置における信号の傾きは、前記着目画素の画素値に対する周辺画素の画素値の変化の傾きであることを特徴とする請求項1乃至11の何れか1項に記載の画像処理装置。
The target position is a pixel position of the target pixel,
The image processing apparatus according to claim 1, wherein the inclination of the signal at the target position is an inclination of a change in a pixel value of a peripheral pixel with respect to a pixel value of the target pixel.
第1の撮影画像の検出対象となる色成分の着目位置における信号の傾きと、前記第1の撮影画像よりも絞りが小絞りになされて撮影された第2の撮影画像の前記色成分の前記着目位置における信号の傾きと、に基づいて、前記第1の撮影画像の前記着目位置における前記色成分の色にじみを検出する
ことを特徴とする画像処理装置の画像処理方法。
The inclination of the signal at the focus position of the color component that is the detection target of the first captured image, and the color component of the second captured image that is captured with a smaller aperture than the first captured image. An image processing method for an image processing apparatus, comprising: detecting a color blur of the color component at the position of interest of the first captured image based on an inclination of a signal at the position of interest.
コンピュータを、請求項1乃至12の何れか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the image processing apparatus according to any one of claims 1 to 12.
JP2016064015A 2016-03-28 2016-03-28 Image processing device, image processing method, and program Pending JP2017183813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016064015A JP2017183813A (en) 2016-03-28 2016-03-28 Image processing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016064015A JP2017183813A (en) 2016-03-28 2016-03-28 Image processing device, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2017183813A true JP2017183813A (en) 2017-10-05

Family

ID=60006354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016064015A Pending JP2017183813A (en) 2016-03-28 2016-03-28 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2017183813A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199524A (en) * 2019-12-26 2020-05-26 浙江大学 Purple edge correction method for image of adjustable aperture optical system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000023023A (en) * 1998-07-07 2000-01-21 Canon Inc Image pickup device and computer readable storage medium
JP2007043637A (en) * 2005-06-28 2007-02-15 Canon Inc Image pick-up apparatus, image pick-up program, and image processing program
JP2007258923A (en) * 2006-03-22 2007-10-04 Seiko Epson Corp Image processing apparatus, image processing method, image processing program
JP2011211329A (en) * 2010-03-29 2011-10-20 Fujifilm Corp Imaging apparatus and control method thereof, image processing apparatus and control method thereof, and image processing program
JP2013046380A (en) * 2011-08-26 2013-03-04 Canon Inc Image processor, image processing method and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000023023A (en) * 1998-07-07 2000-01-21 Canon Inc Image pickup device and computer readable storage medium
JP2007043637A (en) * 2005-06-28 2007-02-15 Canon Inc Image pick-up apparatus, image pick-up program, and image processing program
JP2007258923A (en) * 2006-03-22 2007-10-04 Seiko Epson Corp Image processing apparatus, image processing method, image processing program
JP2011211329A (en) * 2010-03-29 2011-10-20 Fujifilm Corp Imaging apparatus and control method thereof, image processing apparatus and control method thereof, and image processing program
JP2013046380A (en) * 2011-08-26 2013-03-04 Canon Inc Image processor, image processing method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111199524A (en) * 2019-12-26 2020-05-26 浙江大学 Purple edge correction method for image of adjustable aperture optical system
CN111199524B (en) * 2019-12-26 2023-03-17 浙江大学 Purple edge correction method for image of adjustable aperture optical system

Similar Documents

Publication Publication Date Title
CN108462830B (en) Image pickup apparatus and control method of image pickup apparatus
JP2010141653A (en) Image processing device and imaging apparatus
JP2010166558A (en) Image forming apparatus
JP2015231220A (en) Image processing apparatus, imaging device, image processing method, imaging method and program
JP2015012480A (en) Image processing apparatus and image processing method
JP2012235197A (en) Device, method and program for image processing
JP2009094997A (en) Imaging apparatus, imaging method
JP5272699B2 (en) Image processing apparatus, imaging apparatus, program, and image processing method
JP2015012482A (en) Image processing apparatus and image processing method
JP2008172667A (en) Imaging apparatus
JP2012034130A (en) Imaging apparatus
JP2011211329A (en) Imaging apparatus and control method thereof, image processing apparatus and control method thereof, and image processing program
JP5387341B2 (en) Imaging device
JP2019047336A (en) Image processing apparatus, imaging device, image processing method, and program
JP4539299B2 (en) Image processing apparatus, image processing method, and computer program
JP2017183813A (en) Image processing device, image processing method, and program
JP2019075716A (en) Image processing device, image processing method, and program
JP6436840B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP2008053787A (en) Multiple-lens electronic camera and parallax correcting method of multi-lens electronic camera
JP6245847B2 (en) Image processing apparatus and image processing method
JP2017085407A (en) Image processing device, imaging apparatus, and control program
JP6238673B2 (en) Image processing apparatus, imaging apparatus, imaging system, image processing method, image processing program, and storage medium
JP7020387B2 (en) Imaging control device, imaging device and imaging control program
JP2017126952A (en) Image processing unit, imaging apparatus, and image processing program
JP6627422B2 (en) Image processing device, imaging device, control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200331

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20201013