JP6198664B2 - Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium - Google Patents
Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium Download PDFInfo
- Publication number
- JP6198664B2 JP6198664B2 JP2014086092A JP2014086092A JP6198664B2 JP 6198664 B2 JP6198664 B2 JP 6198664B2 JP 2014086092 A JP2014086092 A JP 2014086092A JP 2014086092 A JP2014086092 A JP 2014086092A JP 6198664 B2 JP6198664 B2 JP 6198664B2
- Authority
- JP
- Japan
- Prior art keywords
- component
- image
- image processing
- unnecessary
- parallax
- 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.)
- Expired - Fee Related
Links
Landscapes
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
- Facsimile Image Signal Circuits (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
Description
本発明は、撮影画像の画質を向上させる画像処理方法に関する。 The present invention relates to an image processing method for improving the quality of a captured image.
カメラなどの撮像装置により撮像を行うと、撮像光学系に入射した光の一部がレンズの界面やレンズを保持する部材により反射し、撮像面に不要光として到達する場合がある。撮像面に到達した不要光は、ゴーストやフレアなどの不要成分として撮影画像中に現れる。また、軸上色収差や倍率色収差の補正のために回折光学素子を用いると、撮像画角外に存在する太陽などの高輝度物体からの光が回折光学素子に当たることで、画像全体に渡って不要光が不要成分として現れる場合がある。 When imaging is performed by an imaging device such as a camera, part of light incident on the imaging optical system may be reflected by the lens interface or a member holding the lens and reach the imaging surface as unnecessary light. Unnecessary light reaching the imaging surface appears in the captured image as unnecessary components such as ghosts and flares. In addition, if a diffractive optical element is used to correct axial chromatic aberration or lateral chromatic aberration, light from a high-intensity object such as the sun outside the field of view strikes the diffractive optical element, which is unnecessary for the entire image. Light may appear as an unwanted component.
特許文献1には、被写体に対して撮像光学系が合焦状態にあるときの画像(合焦画像)と撮像光学系が非合焦状態にあるときの画像(デフォーカス画像)との差分を示す差分画像からゴーストを検出する方法が開示されている。しかし、特許文献1の方法では、複数回の撮像が必要であり、動きのある被写体の静止画撮像や動画撮像には適さない。 Patent Document 1 describes the difference between an image when the imaging optical system is in focus with respect to a subject (focused image) and an image when the imaging optical system is out of focus (defocused image). A method for detecting a ghost from the difference image shown is disclosed. However, the method of Patent Document 1 requires a plurality of times of imaging, and is not suitable for still image imaging or moving image imaging of a moving subject.
特許文献2には、単眼立体撮像による複数の視点画像を比較することでゴーストを検出する方法が開示されている。特許文献2の方法では、1回の撮像で複数の視差画像を得られるため、動きのある被写体の静止画撮像や動画撮像にも対応可能である。 Patent Document 2 discloses a method for detecting a ghost by comparing a plurality of viewpoint images obtained by monocular stereoscopic imaging. In the method of Patent Document 2, since a plurality of parallax images can be obtained by one imaging, it is possible to cope with still image imaging and moving image imaging of a moving subject.
しかしながら、特許文献2の方法では、主画像と副画像の2画像間での差分を求めることによりゴーストを検出するため、3視点以上の視点画像の場合にゴースト検出効果が低減してしまう。また特許文献2では、ゴーストの検出前に視差による像ずれを補正する。ピントが合っている被写体については対応点抽出などで対応できるが、ボケている被写体領域に関しては対応点抽出だけでは不足であり、撮像装置から被写体までの画面全域での詳細な距離情報(距離マップ)を取得する必要がある。一方、視差ずれを補正せずにゴーストを検出しようとすると、ゴーストとともに視差成分も検出され、視差成分と不要成分(ゴースト成分とを分離することができない。 However, since the ghost is detected by obtaining the difference between the two images of the main image and the sub-image in the method of Patent Document 2, the ghost detection effect is reduced in the case of viewpoint images with three or more viewpoints. In Patent Document 2, image shift due to parallax is corrected before ghost detection. Focused subjects can be dealt with by extracting corresponding points. However, it is not enough to extract the corresponding points for blurred subject areas, and detailed distance information (distance map) from the imaging device to the subject throughout the screen. ) Need to get. On the other hand, if a ghost is detected without correcting the parallax deviation, a parallax component is also detected together with the ghost, and the parallax component and the unnecessary component (ghost component) cannot be separated.
本発明は、複数の撮像を行うことなく撮影画像に含まれる視差成分と不要成分とを分離可能な画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体を提供する。 The present invention provides an image processing method, an image processing apparatus, an imaging apparatus, an image processing program, and a storage medium that can separate a parallax component and an unnecessary component included in a captured image without performing a plurality of imaging.
本発明の一側面としての画像処理方法は、複数の視差画像の複数の相対差分情報に基づいて該複数の視差画像のそれぞれの複数の第一不要成分を決定するステップと、前記複数の第一不要成分に基づいて方向成分情報を決定するステップと、前記複数の第一不要成分および前記方向成分情報に基づいて第二不要成分を決定するステップとを有する。 An image processing method according to an aspect of the present invention includes: determining a plurality of first unnecessary components of each of the plurality of parallax images based on a plurality of pieces of relative difference information of the plurality of parallax images; and a step of determining determining direction component information, the second unnecessary components based on previous SL plurality of first unnecessary component and the direction component information based on the unnecessary components.
本発明の他の側面としての画像処理装置は、複数の視差画像の複数の相対差分情報に基づいて該複数の視差画像のそれぞれに関する複数の第一不要成分を決定する第一不要成分決定手段と、前記複数の第一不要成分に基づいて方向成分情報を決定する方向成分決定手段と、前記複数の第一不要成分および前記方向成分情報に基づいて第二不要成分を決定する第二不要成分決定手段とを有する。 An image processing apparatus according to another aspect of the present invention includes a first unnecessary component determination unit that determines a plurality of first unnecessary components related to each of the plurality of parallax images based on a plurality of pieces of relative difference information of the plurality of parallax images. second unnecessary components determining the directional component determining means for determining the directional component information, the second unnecessary components based on previous SL plurality of first unnecessary component and the direction component information based on the plurality of first unnecessary components Determination means.
本発明の他の側面としての撮像装置は、光学像を光電変換して複数の視差画像を出力する撮像素子と、前記画像処理装置とを有する。 An imaging apparatus as another aspect of the present invention includes an imaging element that photoelectrically converts an optical image and outputs a plurality of parallax images, and the image processing apparatus .
本発明の他の側面としての画像処理プログラムは、複数の視差画像の複数の相対差分情報に基づいて該複数の視差画像のそれぞれに関する複数の第一不要成分を決定するステップと、前記複数の第一不要成分に基づいて方向成分情報を決定するステップと、前記複数の第一不要成分および前記方向成分情報に基づいて第二不要成分を決定するステップと、をコンピュータに実行させるように構成されている。 An image processing program according to another aspect of the present invention includes a step of determining a plurality of first unnecessary components related to each of the plurality of parallax images based on a plurality of pieces of relative difference information of the plurality of parallax images; It is configured to execute determining a direction component information in accordance with an unnecessary component, determining a second required component on the basis of the previous SL plurality of first unnecessary component and the direction component information, to the computer ing.
本発明の他の側面としての記憶媒体は、前記画像処理プログラムを記憶している。 A storage medium according to another aspect of the present invention stores the image processing program.
本発明の他の目的及び特徴は、以下の実施例において説明される。 Other objects and features of the present invention are illustrated in the following examples.
本発明によれば、複数の撮像を行うことなく撮影画像に含まれる視差成分と不要成分とを分離可能な画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体を提供することができる。 According to the present invention, an image processing method, an image processing apparatus, an imaging apparatus, an image processing program, and a storage medium that can separate a parallax component and an unnecessary component included in a captured image without performing a plurality of imaging are provided. be able to.
以下、本発明の実施形態について、図面を参照しながら詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
本実施例で用いられる複数の視差画像を生成可能な撮像装置は、撮像光学系の瞳のうち互いに異なる領域を通過した複数の光束を撮像素子における互いに異なる受光部(画素)に導いて光電変換を行わせる撮像系を有する。 The imaging apparatus capable of generating a plurality of parallax images used in the present embodiment guides a plurality of light beams that have passed through different regions of the pupil of the imaging optical system to different light receiving units (pixels) in the imaging device to perform photoelectric conversion. It has an imaging system that performs.
図1は、本実施形態の撮像系における撮像素子の受光部と撮像光学系の瞳との関係を示す図である。図1において、MLはマイクロレンズであり、CFはカラーフィルタである。EXPは撮像光学系の射出瞳(瞳)であり、P1、P2は射出瞳EXPの領域である。G1、G2、G3、G4は画素(受光部)であり、画素G1〜G4で1組の画素(画素組)を構成する。撮像素子には、画素G1〜G4の画素組が複数配列されている。画素G3は画素G1の紙面の奥側に、画素G4は画素G2の紙面の奥側に、各画素が2次元的に配置されている。画素G1〜G4は、共通の(すなわち、画素組ごとに1つずつ設けられた)マイクロレンズMLを介して、射出瞳EXPと共役な関係を有する。本実施形態において、撮像素子に配列された複数の画素G1〜G4を、それぞれ、まとめて画素群G1〜G4という場合がある。 FIG. 1 is a diagram illustrating a relationship between a light receiving unit of an imaging element and a pupil of an imaging optical system in the imaging system of the present embodiment. In FIG. 1, ML is a microlens, and CF is a color filter. EXP is an exit pupil (pupil) of the imaging optical system, and P1 and P2 are areas of the exit pupil EXP. G1, G2, G3, and G4 are pixels (light receiving portions), and the pixels G1 to G4 constitute one set of pixels (pixel set). A plurality of pixel groups of pixels G1 to G4 are arranged in the imaging element. The pixel G3 is two-dimensionally arranged on the back side of the paper surface of the pixel G1, and the pixel G4 is two-dimensionally arranged on the back side of the paper surface of the pixel G2. The pixels G1 to G4 have a conjugate relationship with the exit pupil EXP via a common microlens ML (that is, one for each pixel set). In the present embodiment, the plurality of pixels G1 to G4 arranged in the image sensor may be collectively referred to as a pixel group G1 to G4, respectively.
図2は、撮像している物点OSPと射出瞳EXPと撮像素子との結像関係を示している。画素G1は、射出瞳EXPのうち領域P1を通過した光束を受光する。画素G2は、射出瞳EXPのうち領域P2を通過した光束を受光する。また、領域P3は領域P1の紙面の奥側に、領域P4は領域P2の紙面の奥側に、2次元的に存在する。物点OSPには、必ずしも物体が存在している必要はない。物点OSPを通った光束は、その光束が通過する瞳(射出瞳EXP)内での位置(本実施形態では領域P1〜P4)に応じて、画素G1〜G4のいずれかの画素に入射する。瞳内の互いに異なる領域を光束が通過することは、物点OSPからの入射光が角度(視差)によって分離されることに相当する。すなわち、各マイクロレンズMLに対して設けられた画素G1〜G4のうち、画素G1〜G4からの出力信号を用いて生成された4つの画像は、互いに視差を有する複数の視差画像となる。以下の説明において、瞳内の互いに異なる領域を通過した光束を互いに異なる受光部(画素)により受光することを、瞳分割という場合がある。図3は、射出瞳EXPをマイクロレンズML側から見た図である。 FIG. 2 shows an imaging relationship among the object point OSP being imaged, the exit pupil EXP, and the image sensor. 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 region P3 exists two-dimensionally on the back side of the paper surface of the region P1, and the region P4 exists two-dimensionally on the back side of the paper surface of the region P2. The object point OSP does not necessarily have an object. The light beam that has passed through the object point OSP is incident on one of the pixels G1 to G4 according to the position (region P1 to P4 in this embodiment) in the pupil (exit pupil EXP) through which the light beam passes. . 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 to G4 provided for each microlens ML, four images generated using the output signals from the pixels G1 to G4 become a plurality of parallax images having parallax. In the following description, receiving light beams that have passed through different regions in the pupil by different light receiving units (pixels) may be referred to as pupil division. FIG. 3 is a view of the exit pupil EXP as viewed from the microlens ML side.
また、図2および図3に示される射出瞳EXPの位置ずれなどにより、前述の共役関係が完全でなくなる場合や、例えば領域P1、P2が部分的に互いに重複(オーバーラップ)する場合でも、以下の各実施例において、得られた複数の画像を視差画像として扱う。 Further, even when the above-described conjugate relationship is not perfect due to the positional deviation of the exit pupil EXP shown in FIGS. 2 and 3, or when the regions P1 and P2 partially overlap (overlap), for example, In each of the examples, a plurality of obtained images are handled as parallax images.
図4を参照して、本発明の実施例1における画像処理方法を実行する撮像装置について説明する。図4は、本実施例における撮像装置200の構成を示すブロック図である。撮像光学系201は、絞り201aおよびフォーカスレンズ201bを含み、不図示の被写体からの光を撮像素子202上に結像(集光)させる。撮像素子202は、CCDセンサやCMOSセンサなどの光電変換素子により構成され、図1および図2を参照して説明した瞳内の互いに異なる領域を通過した光束を、各領域に対応する画素(受光部)にて受光する(瞳分割を行う)。このようにして、撮像素子202は、被写体像(光学像)を光電変換して複数の視差画像としての画像信号(アナログ電気信号)を出力する。A/Dコンバータ203は、撮像素子202から出力されたアナログ電気信号をデジタル信号に変換し、デジタル信号を画像処理部204に出力する。 With reference to FIG. 4, an imaging apparatus that executes the image processing method according to the first embodiment of the present invention will be described. FIG. 4 is a block diagram illustrating a configuration of the imaging apparatus 200 in the present embodiment. The imaging optical system 201 includes a diaphragm 201a and a focus lens 201b, and focuses (condenses) light from a subject (not shown) on the imaging element 202. The imaging element 202 is configured by a photoelectric conversion element such as a CCD sensor or a CMOS sensor, and a light beam that has passed through different areas in the pupil described with reference to FIG. 1 and FIG. Part) to receive light (perform pupil division). In this way, the image sensor 202 photoelectrically converts the subject image (optical image) and outputs image signals (analog electrical signals) as a plurality of parallax images. The A / D converter 203 converts the analog electric signal output from the image sensor 202 into a digital signal, and outputs the digital signal to the image processing unit 204.
画像処理部204は、デジタル信号に対して、一般的に行われる画像処理を行うとともに、不要光の決定処理および不要光を低減または除去する補正処理を行う。本実施例において、画像処理部204は、撮像装置200に搭載された画像処理装置に相当する。また画像処理部204は、第一不要成分検出部204a、方向成分生成部204b、マスク作成部204c、第二不要成分検出部204d、および、不要成分低減部204eを有する。 The image processing unit 204 performs image processing that is generally performed on the digital signal, and also performs unnecessary light determination processing and correction processing that reduces or eliminates unnecessary light. In this embodiment, the image processing unit 204 corresponds to an image processing device mounted on the imaging device 200. The image processing unit 204 includes a first unnecessary component detection unit 204a, a direction component generation unit 204b, a mask creation unit 204c, a second unnecessary component detection unit 204d, and an unnecessary component reduction unit 204e.
第一不要成分検出部204a(第一不要成分決定手段)は、複数の視差画像を生成(取得)し、各視差画像から第一不要成分を検出(決定)する。方向成分生成部204b(方向成分決定手段)は、検出された複数の第一不要成分同士を比較して、複数の第一不要成分における同一座標位置における共通輝度成分を抽出し、方向成分情報を決定する。ここで「共通輝度成分の抽出」とは、検出された複数の第一不要成分のうち任意の2つの第一不要成分について、同一座標位置の輝度値を比較した場合、輝度値が同一の部分のみを抽出する処理をいう。または、ある程度の誤差を許容して、輝度値を比較した際に±X%の輝度差であれば共通輝度成分であるというように所定の輝度差(閾値)をパラメータとして持ち、それに応じて共通輝度成分を抽出する処理をいう。マスク作成部204c(マスク作成手段)は、方向成分に基づいてマスク(マスク画像)を作成する。第二不要成分検出部204d(第二不要成分決定手段)は、第一不要成分およびマスクに基づいて各視差画像の第二不要成分を決定する。不要成分低減部204e(不要成分低減手段)は、第二不要成分に基づいて不要成分(ゴースト成分)を各視差画像から低減させる。 The first unnecessary component detection unit 204a (first unnecessary component determination means) generates (acquires) a plurality of parallax images, and detects (determines) the first unnecessary component from each parallax image. The direction component generation unit 204b (direction component determination means) compares the plurality of detected first unnecessary components, extracts a common luminance component at the same coordinate position in the plurality of first unnecessary components, and obtains the direction component information. decide. Here, “extraction of common luminance component” means a portion having the same luminance value when the luminance values at the same coordinate position of two arbitrary first unnecessary components among the plurality of detected first unnecessary components are compared. The process of extracting only. Or, if a certain difference is allowed and the luminance values are compared, if the luminance difference is ± X%, it has a predetermined luminance difference (threshold value) as a parameter so that it is a common luminance component. A process for extracting a luminance component. The mask creation unit 204c (mask creation means) creates a mask (mask image) based on the direction component. The second unnecessary component detection unit 204d (second unnecessary component determination means) determines the second unnecessary component of each parallax image based on the first unnecessary component and the mask. The unnecessary component reducing unit 204e (unnecessary component reducing means) reduces an unnecessary component (ghost component) from each parallax image based on the second unnecessary component.
画像処理部204で処理された出力画像(画像データ)は、半導体メモリや光ディスクなどの画像記録媒体209に保存される。また、画像処理部204からの出力画像を表示部205に表示することもできる。記憶部208は、画像処理部204による画像処理に必要な画像処理プログラムや各種情報などを記憶している。 The output image (image data) processed by the image processing unit 204 is stored in an image recording medium 209 such as a semiconductor memory or an optical disk. Further, the output image from the image processing unit 204 can be displayed on the display unit 205. The storage unit 208 stores an image processing program and various information necessary for image processing by the image processing unit 204.
システムコントローラ210(制御手段)は、撮像素子202の動作、画像処理部204での処理、および、撮像光学系201(絞り201aおよびフォーカスレンズ201b)の制御を行う。撮像光学系制御部206は、システムコントローラ210からの制御指示に応じて、撮像光学系201の絞り201aおよびフォーカスレンズ201bの機械的な駆動を行う。絞り201aは、設定された絞り値(Fナンバー)に応じて、その開口径が制御される。フォーカスレンズ201bは、被写体距離に応じてピント調整(フォーカス制御)を行うために、不図示のオートフォーカス(AF)システムやマニュアルフォーカス機構によってその位置が制御される。状態検知部207は、システムコントローラ210の制御指示に応じて、現在の撮影条件情報を取得する。なお本実施例において、撮像光学系201は、撮像素子202を備えた撮像装置200の一部として(撮像装置200と一体的に)構成されているが、これに限定されるものではない。一眼レフカメラのように、交換式の撮像光学系(交換レンズ)を撮像装置本体に着脱可能に構成された撮像システムであってもよい。 The system controller 210 (control means) controls the operation of the image sensor 202, the processing in the image processing unit 204, and the imaging optical system 201 (the diaphragm 201a and the focus lens 201b). The imaging optical system control unit 206 mechanically drives the aperture 201a and the focus lens 201b of the imaging optical system 201 in accordance with a control instruction from the system controller 210. The aperture of the aperture 201a is controlled according to the set aperture value (F number). The position of the focus lens 201b is controlled by an auto focus (AF) system (not shown) or a manual focus mechanism in order to perform focus adjustment (focus control) according to the subject distance. The state detection unit 207 acquires current shooting condition information in accordance with a control instruction from the system controller 210. In this embodiment, the image pickup optical system 201 is configured as a part of the image pickup apparatus 200 including the image pickup element 202 (integrated with the image pickup apparatus 200), but is not limited thereto. As with a single-lens reflex camera, an imaging system configured such that an interchangeable imaging optical system (interchangeable lens) is detachable from the imaging apparatus main body may be used.
図5は、撮像光学系201の構成および撮像光学系201にて発生する不要光の説明図である。図5(a)は、撮像光学系201の具体的な構成例を示す。図5(a)において、STPは絞り(絞り201aに相当)、IMGは撮像面である。撮像面IMGの位置には、図4に示される撮像素子202が配置される。図5(b)は、撮像光学系201に高輝度物体の例としての太陽SUNから強い光が入射し、撮像光学系201を構成するレンズの界面で反射した光が不要光(ゴーストやフレア)として撮像面IMGに到達する様子を示している。 FIG. 5 is an explanatory diagram of the configuration of the imaging optical system 201 and unnecessary light generated in the imaging optical system 201. FIG. 5A shows a specific configuration example of the imaging optical system 201. In FIG. 5A, STP is a diaphragm (corresponding to the diaphragm 201a), and IMG is an imaging surface. At the position of the imaging surface IMG, the imaging element 202 shown in FIG. 4 is arranged. FIG. 5B shows that unnecessary light (ghost or flare) is incident on the imaging optical system 201 when strong light is incident on the imaging optical system 201 from the sun SUN as an example of a high-brightness object and is reflected at the lens interface constituting the imaging optical system 201. It shows how the image plane IMG is reached.
図6は、絞りSTPのうち、図2に示される画素G1〜G4に入射する光束が通過する領域P1〜P4(瞳領域または瞳分割領域)を示している。なお、絞りSTPは、撮像光学系201の射出瞳EXPに相当するものとして考えることができるが、実際には絞りSTPと射出瞳EXPは互いに異なることが多い。高輝度物体(太陽SUN)からの光束は、絞りSTPのほぼ全域を通過するが、画素G1〜G4に入射する光束が通過する領域は、領域P1〜P4(瞳領域)に分割される。 FIG. 6 shows regions P1 to P4 (pupil regions or pupil division regions) through which light beams incident on the pixels G1 to G4 shown in FIG. The stop STP can be considered as corresponding to the exit pupil EXP of the imaging optical system 201, but in reality, the stop STP and the exit pupil EXP are often different from each other. The light beam from the high-intensity object (sun SUN) passes through almost the entire area of the stop STP, but the region through which the light beam incident on the pixels G1 to G4 passes is divided into regions P1 to P4 (pupil regions).
次に、図7乃至図15を参照して、不要光が光電変換されることにより撮影画像中に現れる不要成分(ゴースト成分)の決定処理(画像処理)の手順について説明する。 Next, with reference to FIG. 7 to FIG. 15, a procedure of determination processing (image processing) of an unnecessary component (ghost component) that appears in a captured image due to photoelectric conversion of unnecessary light will be described.
図7は、瞳分割を行わない撮像により生成された撮影画像Im0を示している。図7の撮影画像Im0には、3つの被写体(被写体A、被写体B、被写体C)、および、不図示の光源により発生したゴーストが写っている。また、図7の撮影画像Im0は、被写体Aにピントが合っており、被写体Bおよび被写体Cはボケている画像の例である。また、撮影画像中に白い四角部分として示されるゴーストは、不要成分である。なお図7において、不要成分(ゴースト)を白く塗りつぶして示されているが、実際には背景がある程度透けている。また不要成分は、撮影被写体に不要光がかぶった状態であるため、撮影被写体よりも高輝度化する部分である。このことは、後述する他の実施例においても同様である。 FIG. 7 shows a captured image Im0 generated by imaging without pupil division. The captured image Im0 in FIG. 7 shows three subjects (subject A, subject B, subject C) and a ghost generated by a light source (not shown). In addition, the captured image Im0 in FIG. 7 is an example of an image in which the subject A is in focus and the subject B and the subject C are blurred. In addition, a ghost shown as a white square portion in the captured image is an unnecessary component. In FIG. 7, the unnecessary component (ghost) is shown painted white, but the background is actually transparent to some extent. In addition, the unnecessary component is a portion in which the luminance of the photographing subject is higher than that of the photographing subject because the unnecessary light is applied to the photographing subject. The same applies to other embodiments described later.
図8は、視差画像を示す図である。図8(a)〜(d)は、それぞれ、領域P1、P2、P3、P4(瞳領域)を通過した光束を画素群G1、G2、G3、G4にて光電変換した結果として得られた視差画像Im1〜Im4の概念図を示している。視差画像Im1〜Im4には、近距離被写体の場合、画像成分に視差に対応する差(視差成分)が含まれている。図7に示されるような近距離被写体(被写体A)にピントが合い、後方にある被写体Bおよび被写体Cがボケている場合、被写体Bおよび被写体Cに視差成分が含まれる。視差画像Im3には、白い四角として模式的に示される不要成分(ゴースト)が含まれている。ここでは、不要成分(ゴースト)が互いにオーバーラップすることなく分離された状態の例を示しているが、不要成分が互いにオーバーラップして輝度差がある状態であってもよい。すなわち、白い四角の不要成分の位置や輝度が互いに異なる状態であればよい。 FIG. 8 is a diagram illustrating a parallax image. FIGS. 8A to 8D show the parallax obtained as a result of photoelectric conversion of the light beams that have passed through the regions P1, P2, P3, and P4 (pupil regions) in the pixel groups G1, G2, G3, and G4, respectively. The conceptual diagram of the images Im1-Im4 is shown. In the case of a short-distance subject, the parallax images Im1 to Im4 include a difference (parallax component) corresponding to the parallax in the image component. When the short-distance subject (subject A) as shown in FIG. 7 is in focus and the rear subject B and subject C are blurred, the subject B and subject C include parallax components. The parallax image Im3 includes an unnecessary component (ghost) schematically shown as a white square. Here, an example of a state where unnecessary components (ghosts) are separated without overlapping each other is shown, but the unnecessary components may overlap each other and have a luminance difference. That is, it is only necessary that the positions and luminances of the white square unnecessary components are different from each other.
図9は、本実施例における画像処理方法の手順を示す図である。図9(e)〜(p)は、図9(a)〜(d)に示される視差画像Im1〜Im4のそれぞれと基準画像との差分である画像(相対差分画像Im1−2〜Im4−3)を示している。例えば図9(e)は、図9(a)の視差画像Im1(基準画像)から図9(b)の視差画像Im2を差し引いた結果(相対差分画像Im1−2)を示している。また図9(f)は、図9(b)の視差画像Im2(基準画像)から図9(a)の視差画像Im1を差し引いた結果(相対差分画像Im2−1)を示している。図9(g)〜(p)も、同様の考え方に従って得られた結果である。差し引いた結果の画像(相対差分画像)には、視差画像が有する差分(相対差分情報)として、被写体の視差成分および前述の不要成分(ゴースト)が含まれている。また、前記差分計算により、不要成分が負の値として算出されることがあるが、後述の不要成分低減処理の簡易化のため、図9(e)〜(p)では、負の値を切り捨てている。そのため、図9(c)の視差画像Im3に含まれる不要成分(ゴースト)は、図9(g)、(k)、(o)にのみ現れる。 FIG. 9 is a diagram showing the procedure of the image processing method in the present embodiment. 9E to 9P are images (relative difference images Im1-2 to Im4-3) that are differences between the parallax images Im1 to Im4 shown in FIGS. 9A to 9D and the reference image. ). For example, FIG. 9E illustrates a result (relative difference image Im1-2) obtained by subtracting the parallax image Im2 in FIG. 9B from the parallax image Im1 (reference image) in FIG. 9A. FIG. 9F shows a result (relative difference image Im2-1) obtained by subtracting the parallax image Im1 of FIG. 9A from the parallax image Im2 (reference image) of FIG. 9B. FIGS. 9G to 9P also show results obtained according to the same concept. The subtracted image (relative difference image) includes the parallax component of the subject and the aforementioned unnecessary component (ghost) as the difference (relative difference information) of the parallax image. Moreover, although the unnecessary component may be calculated as a negative value by the difference calculation, in order to simplify the unnecessary component reduction process described later, the negative value is rounded down in FIGS. ing. Therefore, an unnecessary component (ghost) included in the parallax image Im3 in FIG. 9C appears only in FIGS. 9G, 9K, and 9O.
図9(q)、(r)、(s)、(t)は、相対差分画像同士を比較して、輝度値が高い部分を集めてまとめた画像を示している。具体的には、図9(q)は、図9(e)、(i)、(m)の各相対差分画像の同一座標をそれぞれ比較し、最も大きい輝度値を抽出して生成された画像MAX1である。図9(r)は、図9(f)、(j)、(n)の各相対差分画像の同一座標をそれぞれ比較し、最も大きい輝度値を抽出して生成された画像MAX2である。図9(s)、(t)は、同様に、図9(g)〜(p)の各相対差分画像に基づいて生成された画像MAX3、MAX4である。このような画像処理により、視差画像Im1〜Im4から不要成分を残存させる(換言すると、視差画像から不要成分を分離または抽出する)ことができる。 FIGS. 9 (q), (r), (s), and (t) show images in which the relative difference images are compared with each other and the portions having high luminance values are collected and collected. Specifically, FIG. 9 (q) is an image generated by comparing the same coordinates of the relative difference images of FIGS. 9 (e), (i), and (m) and extracting the largest luminance value. MAX1. FIG. 9 (r) is an image MAX2 generated by comparing the same coordinates of the relative difference images of FIGS. 9 (f), 9 (j), and 9 (n) and extracting the largest luminance value. Similarly, FIGS. 9S and 9T are images MAX3 and MAX4 generated based on the relative difference images of FIGS. 9G to 9P. By such image processing, unnecessary components can be left from the parallax images Im1 to Im4 (in other words, unnecessary components can be separated or extracted from the parallax images).
ところで、図9(q)〜(t)の画像においては、不要成分(ゴースト)だけでなく視差成分も残存している(抽出されている)。そこで、図9(q)〜(t)の画像に残存している視差成分と不要成分(ゴースト)とを分離する必要がある。次に、図10および図11を参照して、視差成分と不要成分(ゴースト)とを分離する方法について説明する。図10は、視差成分と不要成分とを分離する方法の説明図である。 By the way, in the images of FIGS. 9 (q) to 9 (t), not only unnecessary components (ghosts) but also parallax components remain (extracted). Therefore, it is necessary to separate the parallax component remaining in the images of FIGS. 9 (q) to 9 (t) and the unnecessary component (ghost). Next, a method for separating a parallax component and an unnecessary component (ghost) will be described with reference to FIGS. FIG. 10 is an explanatory diagram of a method for separating a parallax component and an unnecessary component.
図10(a)、(b)、(c)、(d)(図9(q)、(r)、(s)、(t)とそれぞれ同一の画像)は、前述の不要成分(ゴースト)と視差成分とが混在した画像である。図10(a)〜(d)をそれぞれ比較して共通輝度成分(共通輝度部分)を抽出する。ここで、共通輝度部分として、前述のように、輝度値が同一の部分のみを抽出してもよい。または、ある程度の誤差を許容し、輝度値を比較した際に±X%の輝度差であれば共通輝度部分であると判定するように、所定の輝度差(閾値)をパラメータとして備えていてもよい。例えば図10(e)は、図10(a)、(b)の画像MAX1、MAX2を比較して、これらの画像の共通輝度部分を抽出した結果(画像COM1)である。図10(f)は、図10(c)、(d)の画像MAX3、MAX4を比較して、これらの画像の共通輝度部分を抽出した結果(画像COM2)である。図10(g)は、図10(b)、(d)の画像MAX2、MAX4を比較して、これらの画像の共通輝度部分を抽出した結果(画像COM3)である。図10(h)は、図10(a)、(c)の画像MAX1、MAX3を比較して、共通輝度部分を抽出した結果(画像COM4)である。 10 (a), (b), (c), and (d) (the same images as those in FIGS. 9 (q), (r), (s), and (t)) are the above-described unnecessary components (ghost). And a parallax component. 10A to 10D are respectively compared to extract a common luminance component (common luminance portion). Here, as described above, only a portion having the same luminance value may be extracted as the common luminance portion. Alternatively, a predetermined luminance difference (threshold) may be provided as a parameter so that a certain amount of error is allowed and a luminance difference of ± X% when comparing luminance values is determined to be a common luminance portion. Good. For example, FIG. 10E shows a result (image COM1) of comparing the images MAX1 and MAX2 in FIGS. 10A and 10B and extracting a common luminance portion of these images. FIG. 10F shows a result (image COM2) obtained by comparing the images MAX3 and MAX4 in FIGS. 10C and 10D and extracting a common luminance portion of these images. FIG. 10G shows the result (image COM3) of comparing the images MAX2 and MAX4 in FIGS. 10B and 10D and extracting the common luminance portion of these images. FIG. 10H shows a result (image COM4) obtained by comparing the images MAX1 and MAX3 in FIGS. 10A and 10C and extracting a common luminance portion.
図10(i)は、図10(e)〜(h)の画像COM1〜COM4(方向成分画像)を加算して生成された画像COMtotalである。図10(i)の画像COMtotalにおいては、既に、不要成分(ゴースト)と視差成分とが分離されている。また本実施例のように瞳分割数が縦方向に2分割、横方向に2分割というように分割数が比較的少ない場合、斜め方向の視差成分が取り切れない場合がある。このような場合、図10(i)の画像COMtotalから抽出された視差成分の領域を拡張する処理を加えることが好ましい。 FIG. 10I is an image COMtotal generated by adding the images COM1 to COM4 (direction component images) of FIGS. 10E to 10H. In the image COMtotal of FIG. 10 (i), the unnecessary component (ghost) and the parallax component are already separated. Moreover, when the number of pupil divisions is relatively small, such as two in the vertical direction and two in the horizontal direction as in the present embodiment, the oblique parallax component may not be completely removed. In such a case, it is preferable to add a process for expanding the region of the parallax component extracted from the image COMtotal of FIG.
図11(a)は、図10(i)の画像COMtotalにおいて視差成分が含まれる領域を拡張処理した画像でCOMtotal2である。本実施例の目的は、視差成分と不要成分(ゴースト)との混在画像(画像MAX1〜MAX4)から、視差成分と不要成分(ゴースト)とを分離することである。このため、視差成分または不要成分のいずれか一方を後述するマスク処理により消去できればよい。したがって、必ずしも厳密に視差成分の領域を抽出する必要はなく、大雑把な領域を特定するだけでもある程度の効果が得られる。また、視差成分が含まれる領域を拡張処理する際に、被写体までの距離情報を使用して、被写体距離に応じて拡張する度合いを変更するようにマスクを修正してもよい。これにより、ボケの大きさに応じて拡張量を変更することができるため、より精密に視差成分を分離することが可能となり、大きな効果が得られる。 FIG. 11A shows an image COMtotal2 obtained by expanding a region including a parallax component in the image COMtotal of FIG. The object of the present embodiment is to separate the parallax component and the unnecessary component (ghost) from the mixed image (images MAX1 to MAX4) of the parallax component and the unnecessary component (ghost). For this reason, it suffices if either one of the parallax component and the unnecessary component can be erased by mask processing described later. Therefore, it is not always necessary to strictly extract the parallax component area, and a certain degree of effect can be obtained only by specifying a rough area. In addition, when the region including the parallax component is expanded, the mask may be modified so as to change the degree of expansion according to the subject distance using the distance information to the subject. Thereby, since the expansion amount can be changed according to the size of the blur, it becomes possible to separate the parallax components more precisely, and a great effect can be obtained.
図11(b)は、図10(a)〜(d)の画像MAX1〜MAX4(視差成分と不要成分(ゴースト)とが混在した画像)の合成画像(画像MAX1〜MAX4の平均を取った画像)から、図11(a)の画像COMtotal2を減算して得られた画像である。すなわち図11(b)の画像は、図11(a)の画像をマスク(マスク画像)として用いて、図10(a)〜(d)の画像MAX1〜MAX2の合成画像(平均化画像)から視差成分のみを差し引いて生成された画像MAXtotal−COMtotal2である。図11(b)では、理解が容易になるように、不要成分(ゴースト)の輝度値は図10(c)と同様であるように描かれているが、実際には図10(a)〜(d)の平均値を算出しているため、その分だけ暗くなる。以上の手順を経ることにより、視差画像(図9(a)〜(d))から視差成分と不要成分(ゴースト)とを分離することができる。 FIG. 11B shows a composite image (images obtained by averaging the images MAX1 to MAX4) of the images MAX1 to MAX4 (images in which the parallax component and the unnecessary component (ghost) are mixed) in FIGS. 10A to 10D. This is an image obtained by subtracting the image COMtotal2 of FIG. That is, the image of FIG. 11B is obtained from the synthesized image (averaged image) of the images MAX1 to MAX2 of FIGS. 10A to 10D using the image of FIG. 11A as a mask (mask image). This is an image MAXtotal-COMtotal2 generated by subtracting only the parallax component. In FIG. 11 (b), the luminance value of the unnecessary component (ghost) is drawn to be the same as that in FIG. 10 (c) for easy understanding. Since the average value of (d) is calculated, it becomes darker by that amount. Through the above procedure, the parallax component and the unnecessary component (ghost) can be separated from the parallax images (FIGS. 9A to 9D).
そして、出力すべき画像において、前述のようにして決定された不要成分(ゴースト)を除去または低減する補正処理を行う。これにより、図12に示されるように、不要成分(ゴースト)が概ね無くなった(除去または低減された)各視差画像を得ることができる。図12(a)〜(d)は、図9(a)〜(d)のそれぞれか不要成分が除去または低減された視差画像Im10〜Im40を示している。また、不要成分(ゴースト)を低減させた各視差画像を合成することにより、図13に示されるように、不要成分(ゴースト)の低減された瞳分割を行わない撮像により生成された撮影画像と同等の画像を生成することができる。 Then, correction processing for removing or reducing unnecessary components (ghosts) determined as described above is performed on the image to be output. Thereby, as shown in FIG. 12, it is possible to obtain parallax images in which unnecessary components (ghosts) are substantially eliminated (removed or reduced). FIGS. 12A to 12D show parallax images Im10 to Im40 from which unnecessary components are removed or reduced, respectively, of FIGS. 9A to 9D. Further, by synthesizing the respective parallax images in which unnecessary components (ghosts) are reduced, as shown in FIG. 13, a captured image generated by imaging without pupil division with reduced unnecessary components (ghosts) and An equivalent image can be generated.
次に、図14を参照して、本実施例における不要成分(ゴースト成分)の決定処理(画像処理)の手順について説明する。図14は、本実施例における画像処理方法(不要成分の決定方法)を示すフローチャートである。図14の各ステップは、主に、図4に示されるシステムコントローラ210または画像処理部204により、コンピュータプログラムとしての画像処理プログラムに従って実行される。 Next, with reference to FIG. 14, the procedure of the determination process (image process) of the unnecessary component (ghost component) in a present Example is demonstrated. FIG. 14 is a flowchart illustrating an image processing method (unnecessary component determination method) in the present embodiment. Each step of FIG. 14 is mainly executed by the system controller 210 or the image processing unit 204 shown in FIG. 4 according to an image processing program as a computer program.
まず、ステップS11において、システムコントローラ210は、撮像光学系201および撮像素子202により構成される撮像部を制御して被写体の撮像を行う(撮影画像としての入力画像を取得する)。そしてステップS12において、システムコントローラ210は、画像処理部204を制御し、撮像素子202(画素群G1〜G4)から出力されてA/Dコンバータ203にてA/D変換されたデジタル信号を用いて、入力画像としての一対の視差画像を生成する。ここで、画像処理部204は視差画像の生成のため、通常の現像処理や各種の画像補正処理を実施してもよい。 First, in step S <b> 11, the system controller 210 controls an imaging unit including the imaging optical system 201 and the imaging element 202 to image a subject (acquires an input image as a captured image). In step S12, the system controller 210 controls the image processing unit 204, and uses the digital signal output from the image sensor 202 (pixel groups G1 to G4) and A / D converted by the A / D converter 203. Then, a pair of parallax images are generated as input images. Here, the image processing unit 204 may perform normal development processing and various image correction processing in order to generate a parallax image.
続いてステップS13において、画像処理部204の第一不要成分検出部204aは、各視差画像の相対差分情報(相対差分画像)を求める。すなわち第一不要成分検出部204aは、図9(a)〜(d)の視差画像Im1〜Im4のそれぞれを基準画像として、図9(e)〜(p)の相対差分画像Im1−2〜Im4−3を生成する。撮像面に到達した不要光が撮像光学系201の瞳のうち互いに異なる瞳領域を通過する場合、図9(a)〜(d)に示されるように、視差画像ごとに不要成分(ゴースト)の発生の有無や発生位置が異なる。そのため、単純な相対差分画像では、不要成分(ゴースト)の差分値は正および負の値をとる。例えば本実施例において、図9(g)の相対差分画像Im3−1を生成するために図9(c)の視差画像Im3から図9(a)の視差画像Im1を差し引くと、図9(c)の視差画像Im3に含まれる不要成分は正の値となる。また、図9(p)の相対差分画像Im4−3を生成するために図9(d)の視差画像Im4から図9(c)の視差画像Im3を差し引くと、図9(c)の視差画像Im3に含まれる不要成分は負の値となる。 Subsequently, in step S13, the first unnecessary component detection unit 204a of the image processing unit 204 obtains relative difference information (relative difference image) of each parallax image. That is, the first unnecessary component detection unit 204a uses the parallax images Im1 to Im4 in FIGS. 9A to 9D as reference images, and the relative difference images Im1-2 to Im4 in FIGS. -3 is generated. When unnecessary light that has reached the imaging surface passes through different pupil regions of the pupil of the imaging optical system 201, as shown in FIGS. 9A to 9D, an unnecessary component (ghost) is generated for each parallax image. The occurrence and location of occurrence are different. Therefore, in the simple relative difference image, the difference value of the unnecessary component (ghost) takes a positive value and a negative value. For example, in this embodiment, when the parallax image Im1 in FIG. 9A is subtracted from the parallax image Im3 in FIG. 9C to generate the relative difference image Im3-1 in FIG. The unnecessary components included in the parallax image Im3 of FIG. 9C is subtracted from the parallax image Im4 in FIG. 9D to generate the relative difference image Im4-3 in FIG. 9P, the parallax image in FIG. 9C is obtained. An unnecessary component included in Im3 has a negative value.
本実施例において、第一不要成分検出部204aは、後述の不要成分低減処理の簡易化のため、前記負の値を切り捨てて0値とする処理を実施する。そのため、図9(g)、(k)、(o)の相対差分画像Im3−1、Im3−2、Im3−4には、図9(c)の視差画像Im3に含まれる不要成分が正の値として検出される。他の相対差分画像についても同様の処理を実施することにより、図9(a)〜(d)の視差画像Im1〜Im4に含まれる不要成分(ゴースト)と視差成分のみが正の値として検出されることになる。 In the present embodiment, the first unnecessary component detection unit 204a performs a process of rounding down the negative value to a zero value in order to simplify the unnecessary component reduction process described later. Therefore, in the relative difference images Im3-1, Im3-2, and Im3-4 in FIGS. 9G, 9K, and 9O, unnecessary components included in the parallax image Im3 in FIG. 9C are positive. Detected as a value. By performing similar processing for other relative difference images, only unnecessary components (ghosts) and parallax components included in the parallax images Im1 to Im4 in FIGS. 9A to 9D are detected as positive values. Will be.
続いてステップS14において、第一不要成分検出部204aは、ステップS13にて生成された相対差分画像中に残存する成分を第一不要成分として決定する。具体的には、第一不要成分検出部204aは、図9(a)の視差画像Im1を基準画像として得られた図9(e)、(i)、(m)の相対差分画像Im1−2、Im1−3、Im1−4をそれぞれ比較する。そして不要成分検出部204aは、各画像の同一座標上での輝度の最大値を抽出して第一不要成分(画像MAX1)を決定する。また第一不要成分検出部204aは、図9(b)〜(d)の視差画像Im2、Im3、Im4をそれぞれ基準画像として得られた相対差分画像についても同様の処理を行うと、図9(r)〜(t)の画像MAX2〜MAX4(第一不要成分)が得られる。 Subsequently, in step S14, the first unnecessary component detection unit 204a determines the component remaining in the relative difference image generated in step S13 as the first unnecessary component. Specifically, the first unnecessary component detection unit 204a obtains the relative difference image Im1-2 in FIGS. 9 (e), (i), and (m) obtained using the parallax image Im1 in FIG. 9 (a) as a reference image. , Im1-3 and Im1-4 are respectively compared. The unnecessary component detection unit 204a determines the first unnecessary component (image MAX1) by extracting the maximum luminance value on the same coordinates of each image. Further, when the first unnecessary component detection unit 204a performs the same processing on the relative difference images obtained by using the parallax images Im2, Im3, and Im4 in FIGS. 9B to 9D as reference images, FIG. Images MAX2 to MAX4 (first unnecessary components) of r) to (t) are obtained.
続いてステップS15において、画像処理部204の方向成分生成部204bは、ステップS14にて決定された第一不要成分同士(画像MAX1〜MAX4)をそれぞれ比較する。そして方向成分生成部204bは、各第一不要成分(各画像)の同一座標上における共通輝度成分を抽出して方向成分画像(例えば、図10(e)〜(h)の画像COM1〜COM4)を生成する。このとき、同一の輝度値の成分のみを抽出してもよく、または、ある程度の誤差を許容して、輝度値を比較した際に±X%の輝度差であれば共通輝度部分(共通輝度成分)であると決定するように所定の閾値をパラメータとして備えていてもよい。このとき本実施例において、輝度差が±X%(0≦X≦50)である場合に共通輝度成分と決定されるように、Xを設定することが好ましい。誤差の許容量をより小さくする場合、例えば0≦X≦30となるようにXを設定してもよい。 Subsequently, in step S15, the direction component generation unit 204b of the image processing unit 204 compares the first unnecessary components (images MAX1 to MAX4) determined in step S14. Then, the direction component generation unit 204b extracts a common luminance component on the same coordinates of each first unnecessary component (each image) and extracts direction component images (for example, images COM1 to COM4 in FIGS. 10E to 10H). Is generated. At this time, only components having the same luminance value may be extracted, or if a luminance difference is ± X% when luminance values are compared while allowing a certain amount of error, a common luminance portion (common luminance component) A predetermined threshold value may be provided as a parameter so that it is determined that. At this time, in this embodiment, it is preferable to set X so that the common luminance component is determined when the luminance difference is ± X% (0 ≦ X ≦ 50). When the allowable amount of error is made smaller, X may be set so that, for example, 0 ≦ X ≦ 30.
続いてステップS16において、画像処理部204のマスク作成部204cは、ステップS15にて生成された方向成分画像(方向成分情報)に基づいてマスク(マスク画像)を生成する。このとき、マスク作成部204cは、方向成分画像そのものをマスクとして使用することができ(例えば、図10(i)の画像COMtotal)、または、領域拡大などの処理を施してマスクを修正してもよい(例えば、図11(a)の画像COMtotal2)。 In step S16, the mask creation unit 204c of the image processing unit 204 generates a mask (mask image) based on the direction component image (direction component information) generated in step S15. At this time, the mask creation unit 204c can use the direction component image itself as a mask (for example, the image COMtotal in FIG. 10 (i)), or correct the mask by performing processing such as region enlargement. Good (for example, image COMtotal2 in FIG. 11A).
続いてステップS17において、画像処理部204の第二不要成分検出部204dは、第一不要成分およびマスクに基づいて第二不要成分を決定する。第二不要成分検出部204dは、例えば、第一不要成分(図10(a)〜(d)の画像MAX1〜MAX4の平均化画像)からマスク(図11(a)の画像COMtotal2)を減算する。その結果、第二不要成分(図11(b)の画像MAXtotal−COMtotal2)が生成される。これにより、視差成分と不要成分(ゴースト)とが混在した画像から視差成分のみを除去または低減することができる。 Subsequently, in step S17, the second unnecessary component detection unit 204d of the image processing unit 204 determines a second unnecessary component based on the first unnecessary component and the mask. For example, the second unnecessary component detection unit 204d subtracts the mask (the image COMtotal2 in FIG. 11A) from the first unnecessary component (the average image of the images MAX1 to MAX4 in FIGS. 10A to 10D). . As a result, a second unnecessary component (image MAXtotal-COMtotal2 in FIG. 11B) is generated. Thereby, only the parallax component can be removed or reduced from the image in which the parallax component and the unnecessary component (ghost) are mixed.
続いてステップS18において、画像処理部204の不要成分低減部204eは、出力すべき画像から不要成分を低減または除去する補正処理を行う。不要成分低減部204eは、出力すべき画像として、例えば図12(a)〜(d)に示されるように、画素G1〜G4をそれぞれ1画素とすることで得られる複数の視差画像Im10〜Im40を生成する。ここで、ステップS13にて負の値を切り捨てて0値とすることにより、各視差画像に含まれる不要成分(ゴースト)のみが正の値として検出される。このため、不要成分低減部204eは、単純に各視差画像からそれぞれの第二不要成分を差し引くことにより、不要成分(ゴースト成分)を除去または低減することができる。不要成分低減部204eは、例えば図15(a)〜(d)の視差画像Im1〜Im4から図15(e)〜(h)の第二不要成分(画像MAX10〜MAX40)を差し引く。これにより、不要成分低減部204eは、不要成分(ゴースト成分)が除去または低減された、図15(i)から(l)の視差画像Im10〜Im40を生成することができる。 Subsequently, in step S18, the unnecessary component reduction unit 204e of the image processing unit 204 performs a correction process for reducing or removing unnecessary components from the image to be output. As shown in FIGS. 12A to 12D, the unnecessary component reduction unit 204e outputs a plurality of parallax images Im10 to Im40 obtained by setting each of the pixels G1 to G4 as one pixel. Is generated. Here, by discarding negative values to zero values in step S13, only unnecessary components (ghosts) included in each parallax image are detected as positive values. Therefore, the unnecessary component reduction unit 204e can remove or reduce the unnecessary component (ghost component) by simply subtracting the second unnecessary component from each parallax image. The unnecessary component reducing unit 204e subtracts the second unnecessary components (images MAX10 to MAX40) in FIGS. 15E to 15H from the parallax images Im1 to Im4 in FIGS. 15A to 15D, for example. Thereby, the unnecessary component reducing unit 204e can generate the parallax images Im10 to Im40 of FIGS. 15 (i) to (l) from which unnecessary components (ghost components) are removed or reduced.
最後にステップS19において、システムコントローラ210は、図15(i)〜(l)に示されるように不要成分(ゴースト成分)が除去または低減された視差画像Im10〜Im40を出力画像として出力する。そしてシステムコントローラ210は、これらの出力画像を、画像記録媒体209に保存し、または、表示部205に表示する。また、不要成分(ゴースト成分)を除去または低減した視差画像Im10〜Im40を合成し、図13に示される不要成分が除去または低減された瞳分割を行わない撮像により生成された撮影画像と同等の画像を出力画像として出力することもできる。 Finally, in step S19, the system controller 210 outputs the parallax images Im10 to Im40 from which unnecessary components (ghost components) are removed or reduced as shown in FIGS. 15 (i) to 15 (l) as output images. Then, the system controller 210 stores these output images in the image recording medium 209 or displays them on the display unit 205. Further, the parallax images Im10 to Im40 from which unnecessary components (ghost components) are removed or reduced are synthesized, and are equivalent to a captured image generated by imaging without pupil division from which unnecessary components are removed or reduced as shown in FIG. An image can also be output as an output image.
本実施例によれば、1回の撮像で得られた複数の視差画像に基づく複数の相対差分画像から不要光により形成された不要成分(ゴースト成分)を決定することができる。すなわち、複数回の撮像を行うことなく撮影画像に含まれる不要成分を決定することができる。また、相対差分画像を生成する際に、負の値を切り捨てているため、単純な差分計算のみで決定した不要成分を良好に除去または低減した高画質の撮影画像を得ることができる。 According to the present embodiment, an unnecessary component (ghost component) formed by unnecessary light can be determined from a plurality of relative difference images based on a plurality of parallax images obtained by one imaging. That is, it is possible to determine an unnecessary component included in a captured image without performing multiple imaging. In addition, since negative values are rounded down when generating a relative difference image, a high-quality captured image in which unnecessary components determined only by simple difference calculation can be removed or reduced can be obtained.
次に、本発明の実施例2について説明する。本実施例における撮像装置の基本構成は、図4を参照して説明した実施例1の撮像装置200と同様であるため、その説明は省略する。 Next, a second embodiment of the present invention will be described. The basic configuration of the image pickup apparatus in the present embodiment is the same as that of the image pickup apparatus 200 of Embodiment 1 described with reference to FIG.
図16は、本実施例の撮像系における撮像素子202aの受光部を示している。図16において、MLはマイクロレンズであり、G11〜G55は受光部(画素G11〜G55)であり、互いに組をなしている。撮像素子202aには、画素G11〜G55の画素組が複数配列されている。この画素組は、共通の(すなわち画素組ごとに1つずつ設けられた)マイクロレンズMLを介して、射出瞳EXPと共役な関係を有する。なお本実施例において、撮像光学系の具体的な構成例も、図5を参照して説明した実施例1の撮像光学系201と同様であるため、その説明は省略する。 FIG. 16 shows a light receiving portion of the image sensor 202a in the imaging system of the present embodiment. In FIG. 16, ML is a microlens, G11 to G55 are light receiving portions (pixels G11 to G55), and form a pair with each other. A plurality of pixel groups of pixels G11 to G55 are arranged on the image sensor 202a. This pixel group has a conjugate relationship with the exit pupil EXP via a common microlens ML (that is, one pixel group is provided for each pixel group). In this embodiment, a specific configuration example of the imaging optical system is also the same as that of the imaging optical system 201 of Embodiment 1 described with reference to FIG.
図17は、絞りSTP(すなわち撮像光学系の射出瞳EXP、ただし実際には絞りSTPと射出瞳EXPは異なることが多い)のうち、図16の画素G11〜G55に入射する光束が通過する領域P11〜P55(瞳領域)を示している。高輝度物体からの光束は、絞りSTPのほぼ全域を通過するが、各画素に入射する光束が通過する領域は、瞳領域P11〜P55に分割される。 FIG. 17 shows a region through which the light beam incident on the pixels G11 to G55 in FIG. 16 passes through the stop STP (that is, the exit pupil EXP of the imaging optical system, but the stop STP and the exit pupil EXP are actually different in many cases). P11 to P55 (pupil regions) are shown. The light beam from the high-intensity object passes through almost the entire area of the stop STP, but the region through which the light beam incident on each pixel passes is divided into pupil regions P11 to P55.
続いて、図18および図19を参照して、撮像装置により生成される撮影画像において、不要光が光電変換されることにより現れる不要成分(ゴースト成分)を決定する方法について説明する。図18は、本実施例における撮像素子の受光部を示す図である。図19は、本実施例における画像処理方法の手順を示す図である。 Next, a method for determining an unnecessary component (ghost component) that appears due to photoelectric conversion of unnecessary light in a captured image generated by the imaging apparatus will be described with reference to FIGS. 18 and 19. FIG. 18 is a diagram illustrating a light receiving portion of the image sensor in the present embodiment. FIG. 19 is a diagram illustrating a procedure of an image processing method in the present embodiment.
図19(a)は、瞳分割を行わない撮像により生成された撮影画像Im51を示しており、図7の撮影画像Im0と同様である。そして、画素群G11〜G55にて光電変換した結果として得られた一組の視差画像を用いて、相対差分画像を取得するなどの一連の手順についても、実施例1と同様の部分の説明は省略する。本実施例は、斜め方向の瞳分割数を増やしたことで、斜め方向の視差成分も分離できる点で、実施例1とは異なる。例えば、不要成分(ゴースト)が理想的に瞳分割領域の一部分だけを通過し、図18の画素G42に入射した場合を考える(黒い四角部分がゴースト)。 FIG. 19A shows a captured image Im51 generated by imaging without pupil division, which is the same as the captured image Im0 in FIG. The description of the same part as in the first embodiment also applies to a series of procedures such as obtaining a relative difference image using a set of parallax images obtained as a result of photoelectric conversion in the pixel groups G11 to G55. Omitted. The present embodiment is different from the first embodiment in that the oblique parallax component can be separated by increasing the number of oblique pupil divisions. For example, let us consider a case where an unnecessary component (ghost) ideally passes only a part of the pupil division region and enters the pixel G42 in FIG. 18 (the black square portion is a ghost).
図19(b)、(a)は、画素G42に対応する視差画像Im42と、その外側の画素G51に対応する視差画像Im51の画像をそれぞれ示している。そして、図14のフローチャートに示されるようなステップS11〜S16を経ることにより、図19(c)の画像COMtotal10のようなマスクを作成することができる。このマスクに基づいて第二不要成分を決定し、視差画像から不要成分(ゴースト)を低減させると、図19(d)に示されるような不要成分を低減させた出力画像Im00が得られる。 FIGS. 19B and 19A respectively show the parallax image Im42 corresponding to the pixel G42 and the parallax image Im51 corresponding to the outer pixel G51. Then, through steps S11 to S16 as shown in the flowchart of FIG. 14, a mask like the image COMtotal10 of FIG. 19C can be created. When the second unnecessary component is determined based on this mask and the unnecessary component (ghost) is reduced from the parallax image, an output image Im00 in which the unnecessary component is reduced as shown in FIG. 19D is obtained.
本実施例によれば、斜め方向(第一方向(縦方向)と第二方向(横方向)とは異なる第三方向)の視差成分についても分離することが可能となる。ただし、瞳分割数を多くしても、最も周辺部に関する情報を分離することはできない。これは、最も周辺部の瞳位置からしか見えない視差情報が含まれているためであり、いずれの瞳分割位置基準で得られた第一不要成分画像と比較しても、共通輝度成分が存在しないからである。 According to the present embodiment, it is possible to separate parallax components in an oblique direction (a third direction different from the first direction (vertical direction) and the second direction (horizontal direction)). However, even if the number of pupil divisions is increased, information on the most peripheral part cannot be separated. This is because the parallax information that can be seen only from the most peripheral pupil position is included, and there is a common luminance component compared to the first unnecessary component image obtained with any pupil division position reference Because it does not.
そこで、これを回避するためには、第二不要成分を決定するための画素領域を、出力画像を生成するための画素領域よりも広く設定することが好ましい。例えば図18に示されるように、撮影に利用する画素(出力画像を生成するための画素領域)は、中心の3×3の領域とする。一方、最も周辺部における不要成分(ゴースト)を低減させるため、撮影に利用する画素よりも更に周辺の画素部分を設ける。例えば、不要成分(ゴースト)を低減させるための画素領域(第一不要成分または第二不要成分を決定するための画素領域)は、5×5の領域とする。 Therefore, in order to avoid this, it is preferable to set the pixel area for determining the second unnecessary component wider than the pixel area for generating the output image. For example, as illustrated in FIG. 18, a pixel (pixel area for generating an output image) used for shooting is a central 3 × 3 area. On the other hand, in order to reduce the unnecessary component (ghost) in the most peripheral portion, a peripheral pixel portion is provided further than pixels used for photographing. For example, a pixel region for reducing unnecessary components (ghost) (a pixel region for determining the first unnecessary component or the second unnecessary component) is a 5 × 5 region.
次に、本発明の実施例3について説明する。Ren.Ng等の「Light Field Photography with a Hand−held Plenoptic Camera」(Stanford Tech Report CTSR 2005−2)において、「Plenoptic Camera」が提案されている。「Plenoptic Camera」において「Light Field Photography」という手法を用いることで、物体側からの光線の位置と角度の情報を取り込むことができる。 Next, Embodiment 3 of the present invention will be described. Ren. "Plenoptic Camera" has been proposed in "Light Field Photographic with a Hand-Held Plenoptic Camera" (Stanford Tech Report CTSR 2005-2) of Ng et al. By using the method “Light Field Photography” in “Plenoptic Camera”, it is possible to capture information on the position and angle of the light beam from the object side.
図20は、本実施例における撮像装置の撮像系を示す図であり、「Plenoptic Camera」の撮像系の構成を示している。撮像光学系301は、主レンズ(撮影レンズ)301bと開口絞り301aとを備えて構成される。撮像光学系301の結像位置には、マイクロレンズアレイ301cが配置されており、さらにその後方(像側)に撮像素子302が配置されている。マイクロレンズアレイ301cは、例えば点Aのような被写体空間のある一点を通る光線群と、点Aの近傍の点を通る光線とが撮像素子302上で混ざらないようにセパレータ(分離手段)としての機能を有する。図20から分かるように、点Aからの上線、主光線および下線は、それぞれ異なる画素によって受光される。このため、点Aを通る光線群を光線の角度ごとに分離して取得することができる。 FIG. 20 is a diagram illustrating an imaging system of the imaging apparatus according to the present embodiment, and illustrates a configuration of an imaging system of “Plenoptic Camera”. 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. 20, 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)を取得する方法として、図21および図22に示される撮像系を提案している。 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 FIGS. 21 and 22 as a method of acquiring light position and angle information (Light Field).
図21に示される撮像系の構成では、マイクロレンズアレイ301cを主レンズ301bの結像位置よりも後方(像側)に配置し、点Aを通る光線群を撮像素子302上に再結像させることで、光線群を光線の角度ごとに分離して取得することができる。また、図22に示される撮像系の構成では、マイクロレンズアレイ301cを主レンズ301bの結像位置よりも前方(物体側)に配置し、点Aを通る光線群を撮像素子302上に結像させることで、光線群を光線の角度ごとに分離して取得することができる。いずれの構成も、撮像光学系301の瞳を通過する光束を瞳内での通過領域(通過位置)に応じて分割する点は同じである。そして、これらの構成では、撮像素子302は、図23に示されるように、1つのマイクロレンズMLと1つの受光部G1とカラーフィルタCFを介して対になっている従来の撮像素子を用いることができる。 In the configuration of the imaging system shown in FIG. 21, the microlens array 301c is arranged behind (image side) the imaging position of the main lens 301b, and a light ray group passing through the point A is re-imaged on the imaging device 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. 22, the microlens array 301c is arranged in front of the imaging position of the main lens 301b (object side), and a group of rays passing through the point A is imaged on the imaging element 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, 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, as shown in FIG. Can do.
図20に示される撮像光学系301を用いると、図24(a)に示されるような画像が得られる。図24(b)は、図24(a)中に多数並んだ円のうち1つを拡大して示している。1つの円は絞りSTPに相当し、その内側は複数の画素Pj(j=1、2、3、…)により分割されている。これにより、1つの円内で瞳の強度分布が得られる。また、図21および図22に示される撮像光学系301を用いると、図25に示されるような視差画像が得られる。図24(a)に示される画像において、各円(絞りSTP)内の複数の画素Pjを並べて再構成することによっても、図25に示すような複数の視差画像が得られる。 When the imaging optical system 301 shown in FIG. 20 is used, an image as shown in FIG. 24A is obtained. FIG. 24B 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. 21 and 22 is used, a parallax image as shown in FIG. 25 is obtained. In the image shown in FIG. 24A, a plurality of parallax images as shown in FIG. 25 can also be obtained by rearranging a plurality of pixels Pj in each circle (aperture STP) side by side.
実施例1、2で説明したように、ゴーストなどの不要光は、瞳内で偏りを持って瞳を通過する。このため、本実施例のように瞳を分割して撮像する撮像装置において実施例1、2にて説明した画像処理方法を使用することにより、不要成分を決定することもできる。 As described in the first and second embodiments, unnecessary light such as ghost passes through the pupil with a bias in the pupil. For this reason, an unnecessary component can also be determined by using the image processing method described in the first and second embodiments in an imaging apparatus that divides and images the pupil as in the present embodiment.
また、別の例として、図26に示されるような複数のカメラを用いて同一被写体を撮像する場合でも、視差画像が得られる。このため、このような複数のカメラにおいても、実施例1、2にて説明した画像処理方法を用いることができる。C1、C2、C3は、実際には別々の撮像装置であるが、大きな瞳を3つに分割して撮像する一体の撮像装置と見なすことができる。また、図27に示されるように、1つの撮像装置に複数の撮像光学系OSj(j=1、2、3、…)を設けることで瞳分割を行うことも可能である。 As another example, a parallax image can be obtained even when the same subject is imaged using a plurality of cameras as shown in FIG. For this reason, the image processing method described in the first and second embodiments can be used in such a plurality of cameras. C1, C2, and C3 are actually separate imaging devices, but can be regarded as an integrated imaging device that divides a large pupil into three images. In addition, as shown in FIG. 27, pupil division can be performed by providing a plurality of imaging optical systems OSj (j = 1, 2, 3,...) In one imaging apparatus.
次に、本発明の実施例4について説明する。前述の各実施例では、画像全域において不要成分(ゴースト成分)を決定し、または除去する場合について説明したが、図7に示されるように、多くの場合、不要成分は画像の一部にのみ生じる。画像中の不要成分領域は、ユーザが判定することが容易であるため、ユーザに低減処理を行う画像領域を指定させることにより、各実施例での処理負荷を低減させることができる。また、領域を限定することにより、前述の近距離被写体撮影の場合に生じる被写体視差成分の影響を低減することもできる。 Next, a fourth embodiment of the present invention will be described. In each of the above-described embodiments, the case where the unnecessary component (ghost component) is determined or removed in the entire image has been described. However, in many cases, the unnecessary component is only a part of the image as shown in FIG. Arise. Since it is easy for the user to determine the unnecessary component area in the image, the processing load in each embodiment can be reduced by causing the user to specify an image area to be reduced. Further, by limiting the area, it is possible to reduce the influence of the subject parallax component that occurs in the case of the above-mentioned short-distance subject shooting.
図28は、不要成分の低減処理を行う領域の説明図である。図28(a)は、画像中でユーザが不要成分(ゴースト)を除去しようとする領域(画像領域)を選択した場合の画像を示している。図28(b)は、実線の画像領域(選択領域)内の不要成分(ゴースト)を低減処理した出力画像を示している。このように不要成分を除去する画像領域を一部の画像領域に限定した場合でも、実施例1、2と同様の画像処理方法を用いて、視差画像から不要成分(ゴースト)を決定または除去することができる。 FIG. 28 is an explanatory diagram of a region where unnecessary component reduction processing is performed. FIG. 28A shows an image when the user selects a region (image region) from which an unnecessary component (ghost) is to be removed in the image. FIG. 28B shows an output image obtained by reducing unnecessary components (ghosts) in the solid line image area (selected area). Thus, even when the image area from which the unnecessary component is removed is limited to a part of the image area, the unnecessary component (ghost) is determined or removed from the parallax image using the same image processing method as in the first and second embodiments. be able to.
また、各実施例では、第二不要成分(ゴースト成分)を除去または低減する場合について説明したが、決定した不要成分(ゴースト成分)に関する情報を用いて、別の不要成分(第三不要成分)を付加(または強調)する補正処理を行うようにしてもよい。例えば、図25に示される複数の視差画像のそれぞれについて、不要成分(ゴースト成分)が存在する画像と存在しない画像が生じる。再構成後の画像にも、不要成分(ゴースト成分)を残したい場合、決定した不要成分(ゴースト成分)を各視差画像に付加してもよい。また、再構成した画像に対して不要成分(ゴースト成分)を付加することもできる。 In each embodiment, the case where the second unnecessary component (ghost component) is removed or reduced has been described. However, by using information on the determined unnecessary component (ghost component), another unnecessary component (third unnecessary component) is used. Correction processing for adding (or emphasizing) may be performed. For example, for each of the plurality of parallax images shown in FIG. 25, an image in which an unnecessary component (ghost component) is present and an image in which it is not present are generated. When an unnecessary component (ghost component) is desired to remain in the reconstructed image, the determined unnecessary component (ghost component) may be added to each parallax image. In addition, an unnecessary component (ghost component) can be added to the reconstructed image.
各実施例では、本発明の画像処理方法を使用する(画像処理装置を搭載した)撮像装置について説明したが、本発明の画像処理方法は、パーソナルコンピュータにインストールされる画像処理プログラムによっても実施することができる。この場合、パーソナルコンピュータが本発明の画像処理装置に相当する。パーソナルコンピュータは、撮像装置により生成された画像回復処理前の画像(入力画像)を取り込み(取得し)、画像処理プログラムによって画像回復処理を行って、その結果得られた画像を出力する。 In each of the embodiments, the imaging apparatus using the image processing method of the present invention (mounted with the image processing apparatus) has been described. However, the image processing method of the present invention is also implemented by an image processing program installed in a personal computer. be able to. In this case, the personal computer corresponds to the image processing apparatus of the present invention. The personal computer captures (acquires) an image (input image) before image recovery processing generated by the imaging device, performs image recovery processing by an image processing program, and outputs the resulting image.
このように各実施例において、画像処理装置(画像処理部204)は、第一不要成分決定手段(第一不要成分検出部204a)および方向成分決定手段(方向成分生成部204b)を有する。また画像処理装置は、マスク作成手段(マスク作成部204c)および第二不要成分決定手段(第二不要成分検出部204d)を有する。第一不要成分決定手段は、複数の視差画像の相対差分情報に基づいて複数の視差画像のそれぞれに関する複数の第一不要成分を決定する(ステップS14)。方向成分決定手段は、複数の第一不要成分に基づいて方向成分情報(方向成分画像)を決定する(ステップS15)。マスク作成手段は、方向成分情報に基づいてマスク(マスク画像)を作成する(ステップS16)。第二不要成分決定手段は、複数の第一不要成分およびマスクに基づいて第二不要成分を決定する(ステップS17)。 As described above, in each embodiment, the image processing apparatus (image processing unit 204) includes first unnecessary component determination means (first unnecessary component detection unit 204a) and direction component determination means (direction component generation unit 204b). The image processing apparatus also includes a mask creation unit (mask creation unit 204c) and a second unnecessary component determination unit (second unnecessary component detection unit 204d). The first unnecessary component determining means determines a plurality of first unnecessary components related to each of the plurality of parallax images based on the relative difference information of the plurality of parallax images (step S14). The direction component determining means determines direction component information (direction component image) based on the plurality of first unnecessary components (step S15). The mask creating means creates a mask (mask image) based on the direction component information (step S16). The second unnecessary component determining means determines a second unnecessary component based on the plurality of first unnecessary components and the mask (step S17).
好ましくは、方向成分情報は、複数の第一不要成分における同一座標位置での輝度成分を比較して決定される。より好ましくは、方向成分情報は、同一座標位置での輝度成分が共通輝度成分であるか否かに基づいて決定される。また好ましくは、同一座標位置での輝度成分の輝度差が所定の輝度差の範囲内である場合、輝度成分は共通輝度成分であると決定される。より好ましくは、所定の輝度差は、±X%(0≦X≦50)である。 Preferably, the direction component information is determined by comparing luminance components at the same coordinate position among the plurality of first unnecessary components. More preferably, the direction component information is determined based on whether or not the luminance component at the same coordinate position is a common luminance component. Preferably, when the luminance difference between the luminance components at the same coordinate position is within a predetermined luminance difference range, the luminance component is determined to be a common luminance component. More preferably, the predetermined luminance difference is ± X% (0 ≦ X ≦ 50).
好ましくは、画像処理部は、1回の撮像動作により複数の視差画像を生成する(ステップS12)。また好ましくは、画像処理部は、複数の視差画像のそれぞれを基準画像として設定し、複数の視差画像のうち基準画像を除く他の視差画像と基準画像との差分を算出して複数の相対差分情報を求める(ステップS13)。 Preferably, the image processing unit generates a plurality of parallax images by one imaging operation (step S12). Preferably, the image processing unit sets each of the plurality of parallax images as a reference image, calculates a difference between the other parallax image excluding the reference image and the reference image among the plurality of parallax images, and outputs a plurality of relative differences. Information is obtained (step S13).
好ましくは、第一不要成分決定手段は、複数の視差画像のうち、前記第一不要成分を決定する対象となる視差画像を基準画像として得られた前記複数の相対差分情報を負の値を切り捨てた2次元データとして取得する。そして第一不要成分決定手段は、2次元データの各位置における複数の相対差分情報の間の最大値を抽出し、基準画像における第一不要成分の位置および量を決定する。 Preferably, the first unnecessary component determination unit truncates a negative value of the plurality of pieces of relative difference information obtained using, as a reference image, a parallax image that is a target for determining the first unnecessary component among the plurality of parallax images. Obtained as two-dimensional data. Then, the first unnecessary component determining means extracts a maximum value between a plurality of pieces of relative difference information at each position of the two-dimensional data, and determines the position and amount of the first unnecessary component in the reference image.
好ましくは、画像処理部は、不要成分低減手段(不要成分低減部204e)を有する。不要成分低減手段は、複数の視差画像から複数の視差画像に対応する第二不要成分を減算して出力画像を生成する(ステップS19)。より好ましくは、第二不要成分を決定するための画素領域は、出力画像を生成するための画素領域よりも広い。 Preferably, the image processing unit includes unnecessary component reducing means (unnecessary component reducing unit 204e). The unnecessary component reducing means generates an output image by subtracting the second unnecessary component corresponding to the plurality of parallax images from the plurality of parallax images (step S19). More preferably, the pixel area for determining the second unnecessary component is wider than the pixel area for generating the output image.
好ましくは、画像処理部は、第二不要成分の判定対象領域を選択する。そして第二不要成分決定手段は、選択された判定対象領域において第二不要成分を決定する。また好ましくは、複数の視差画像は、撮像光学系の瞳のうち互いに異なる領域を通過した複数の光束に基づいて生成された複数の画像である。また好ましくは、画像処理部は、第二不要成分に関する情報を用いて、複数の視差画像の少なくとも一つに第三不要成分を付加する補正処理を行う。また好ましくは、マスク作成手段は、被写体距離に応じてマスクを修正する。 Preferably, the image processing unit selects a determination target region for the second unnecessary component. And a 2nd unnecessary component determination means determines a 2nd unnecessary component in the selected determination object area | region. Preferably, the plurality of parallax images are a plurality of images generated based on a plurality of light beams that have passed through different regions of the pupil of the imaging optical system. Preferably, the image processing unit performs correction processing for adding the third unnecessary component to at least one of the plurality of parallax images using the information regarding the second unnecessary component. Preferably, the mask creating means corrects the mask according to the subject distance.
好ましくは、方向成分情報は、第一方向(縦方向)および第一方向とは異なる第二方向(横方向)における視差情報(または、視差情報に対応する情報)を含む。より好ましくは、方向成分情報は、第一方向と第二方向のいずれとも異なる第三方向(斜め方向)における視差情報(または、視差情報に対応する情報)を更に含む。 Preferably, the direction component information includes parallax information (or information corresponding to the parallax information) in a first direction (vertical direction) and a second direction (lateral direction) different from the first direction. More preferably, the direction component information further includes parallax information (or information corresponding to the parallax information) in a third direction (oblique direction) different from both the first direction and the second direction.
各実施例によれば、複数の撮像を行うことなく(1回の撮像動作で)撮影画像に含まれる視差成分と不要成分とを分離可能な画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体を提供することができる。 According to each embodiment, an image processing method, an image processing device, an imaging device, and an image processing capable of separating a parallax component and an unnecessary component included in a captured image without performing a plurality of images (with one imaging operation) A program and a storage medium can be provided.
以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。 As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.
204 画像処理部(画像処理装置)
204a 第一不要成分検出部(第一不要成分決定手段)
204b 方向成分生成部(方向成分決定手段)
204c マスク作成部(マスク作成手段)
204d 第二不要成分検出部(第二不要成分決定手段)
204 Image processing unit (image processing apparatus)
204a First unnecessary component detection unit (first unnecessary component determination means)
204b Direction component generation unit (direction component determination means)
204c Mask creation part (mask creation means)
204d 2nd unnecessary component detection part (2nd unnecessary component determination means)
Claims (20)
前記複数の第一不要成分に基づいて方向成分情報を決定するステップと、
前記複数の第一不要成分および前記方向成分情報に基づいて第二不要成分を決定するステップと、を有することを特徴とする画像処理方法。 Determining a plurality of first unnecessary components for each of the plurality of parallax images based on a plurality of pieces of relative difference information of the plurality of parallax images;
Determining direction component information based on the plurality of first unnecessary components;
Image processing method characterized by comprising the steps of: determining a second required component on the basis of the previous SL plurality of first unnecessary component and the direction component information.
前記複数の視差画像のうち前記第一不要成分を決定する対象となる視差画像を基準画像として得られた前記複数の相対差分情報を負の値を切り捨てた2次元データとして取得し、
前記2次元データの各位置において各相対差分情報の間の最大値を抽出し、前記基準画像における前記第一不要成分を決定する、ことを特徴とする請求項1乃至10のいずれか1項に記載の画像処理方法。 In the step of determining the plurality of first unnecessary components,
Acquiring the plurality of relative difference information obtained parallax image as a target for determining said plurality of parallax images sac Chi before Symbol first required component as a reference image as a two-dimensional data the truncated negative value,
The extracted maximum value between Oite each relative difference information at each position of the two-dimensional data to determine the first required Ingredients in the reference image, any one of claims 1 to 10, characterized in that 2. The image processing method according to item 1.
前記複数の第一不要成分に基づいて方向成分情報を決定する方向成分決定手段と、
前記複数の第一不要成分および前記方向成分情報に基づいて第二不要成分を決定する第二不要成分決定手段と、を有することを特徴とする画像処理装置。 First unnecessary component determining means for determining a plurality of first unnecessary components for each of the plurality of parallax images based on a plurality of pieces of relative difference information of the plurality of parallax images;
Direction component determining means for determining direction component information based on the plurality of first unnecessary components;
The image processing apparatus characterized by having, a second unnecessary component determining means for determining a second required component on the basis of the previous SL plurality of first unnecessary component and the direction component information.
前記複数の第一不要成分に基づいて方向成分情報を決定するステップと、
前記複数の第一不要成分および前記方向成分情報に基づいて第二不要成分を決定するステップと、をコンピュータに実行させるように構成されていることを特徴とする画像処理プログラム。 Determining a plurality of first unnecessary components related to each of the plurality of parallax images based on a plurality of pieces of relative difference information of the plurality of parallax images;
Determining direction component information based on the plurality of first unnecessary components;
The image processing program characterized by being configured to execute determining a second required component on the basis of the previous SL plurality of first unnecessary component and the direction component information, to the computer.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014086092A JP6198664B2 (en) | 2014-04-18 | 2014-04-18 | Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014086092A JP6198664B2 (en) | 2014-04-18 | 2014-04-18 | Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2015207841A JP2015207841A (en) | 2015-11-19 |
| JP2015207841A5 JP2015207841A5 (en) | 2017-06-08 |
| JP6198664B2 true JP6198664B2 (en) | 2017-09-20 |
Family
ID=54604364
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014086092A Expired - Fee Related JP6198664B2 (en) | 2014-04-18 | 2014-04-18 | Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6198664B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6624939B2 (en) * | 2016-01-14 | 2019-12-25 | キヤノン株式会社 | Image processing device, imaging device, and image processing program |
| US12023143B2 (en) | 2018-10-19 | 2024-07-02 | Canon U.S.A., Inc. | Structure masking or unmasking for optimized device-to-image registration |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5917125B2 (en) * | 2011-12-16 | 2016-05-11 | キヤノン株式会社 | Image processing apparatus, image processing method, imaging apparatus, and display apparatus |
| JP2013179564A (en) * | 2012-02-01 | 2013-09-09 | Canon Inc | Image processing method, image processing device, and imaging device |
| JP2013162505A (en) * | 2012-02-09 | 2013-08-19 | Canon Inc | Imaging apparatus |
-
2014
- 2014-04-18 JP JP2014086092A patent/JP6198664B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015207841A (en) | 2015-11-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20130194387A1 (en) | Image processing method, image processing apparatus and image-pickup apparatus | |
| KR102157491B1 (en) | Image processing apparatus, imaging apparatus and control method thereof, storage medium | |
| JP6253380B2 (en) | Image processing method, image processing apparatus, and imaging apparatus | |
| JP5470458B2 (en) | Imaging apparatus, image processing apparatus, and image processing method | |
| JP6486149B2 (en) | Image processing apparatus, imaging apparatus, image processing method, program, and storage medium | |
| CN107960120A (en) | Image processing device, imaging device, image processing method, program, and storage medium | |
| JP6516510B2 (en) | Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium | |
| JP6214457B2 (en) | Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium | |
| US10063829B2 (en) | Image processing method, image processing apparatus, image pickup apparatus, and non-transitory computer-readable storage medium | |
| JP6198664B2 (en) | Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium | |
| JP5569617B2 (en) | Image processing apparatus and program | |
| JP2019071596A (en) | Image pickup apparatus and control method thereof | |
| JP6478711B2 (en) | Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium | |
| JP6198663B2 (en) | Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium | |
| JP6497977B2 (en) | Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium | |
| JP6494328B2 (en) | Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium | |
| JP6817855B2 (en) | Image processing equipment, imaging equipment, image processing methods, and programs | |
| JP6255753B2 (en) | Image processing apparatus and imaging apparatus | |
| JP2015215395A (en) | IMAGING DEVICE, CONTROL DEVICE, CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
| JP2017118293A (en) | Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium | |
| JP2019062493A (en) | Controller, imaging apparatus, control method, and program | |
| JP2019068377A (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
| JP2018007111A (en) | Imaging apparatus, and image processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170417 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170417 |
|
| A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20170417 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170706 |
|
| A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20170714 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170725 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170822 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 6198664 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |