JP2010081002A - Image pickup apparatus - Google Patents

Image pickup apparatus Download PDF

Info

Publication number
JP2010081002A
JP2010081002A JP2008243665A JP2008243665A JP2010081002A JP 2010081002 A JP2010081002 A JP 2010081002A JP 2008243665 A JP2008243665 A JP 2008243665A JP 2008243665 A JP2008243665 A JP 2008243665A JP 2010081002 A JP2010081002 A JP 2010081002A
Authority
JP
Japan
Prior art keywords
image
depth
subject distance
field
signals
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
JP2008243665A
Other languages
Japanese (ja)
Inventor
Yukio Mori
幸夫 森
Haruo Hatanaka
晴雄 畑中
Yasuhachi Hamamoto
安八 浜本
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2008243665A priority Critical patent/JP2010081002A/en
Publication of JP2010081002A publication Critical patent/JP2010081002A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To generate a correction image having a desired depth of field from a picked-up image after image pickup. <P>SOLUTION: A subject is picked up via an optical system 10 having an on-axis color aberration, thereby forming G, R, B signals (G0, R0, B0). The subject distance at each of positions of an original image are estimated from the magnitude of high-frequency components of the G, R, B signals of the original image. Meanwhile, high-frequency components of color signals corresponding to the maximum magnitude, of the sizes of the high-frequency components of G, R, B signals of the original image, are added to the other two color signals, thereby generating G, R, B signals (G1, R1, B1) of an intermediately generated image having high resolution for a wide subject distance range. Thereafter, the resolutions of the G, R, B signals of the intermediately generated image for a subject distance other than the subject distance of a main subject are reduced on the basis of the estimated subject distance, thereby generating G, R, B signals (G2, R2, B2) of a correction signal having shallow depth of field. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、デジタルスチルカメラ又はデジタルビデオカメラ等の撮像装置に関し、特に、被写界深度を制御する技術に関する。   The present invention relates to an imaging apparatus such as a digital still camera or a digital video camera, and more particularly to a technique for controlling the depth of field.

単体のレンズには、軸上色収差が存在する。撮像装置に用いられる光学系には、通常、軸上色収差を補正するためのレンズ群が設けられ、全体として、軸上色収差が無視できる程度に小さくなっている。図23に、従来の一般的なレンズ910Lと撮像素子911と撮像素子911に対する入射光の関係を示す。レンズ910Lは、光学系に含まれるレンズ群を1つのレンズとみなしたものである。   A single lens has axial chromatic aberration. An optical system used for an imaging apparatus is usually provided with a lens group for correcting axial chromatic aberration, and as a whole, the axial chromatic aberration is small enough to be ignored. FIG. 23 shows the relationship of incident light with respect to a conventional general lens 910L, the image sensor 911, and the image sensor 911. The lens 910L is obtained by regarding the lens group included in the optical system as one lens.

点光源900からレンズ910Lに向かう光901は、レンズ910Lによって青色光、緑色光及び赤色光に分離されるものの、軸上色収差の補正機能によって、青色光、緑色光及び赤色光は同じ結像点に結像する。この結像点に撮像素子911を配置することによって、ピントの合った点光源900の像が撮像素子911の撮像面に形成される。   The light 901 directed from the point light source 900 to the lens 910L is separated into blue light, green light, and red light by the lens 910L, but the blue light, green light, and red light have the same imaging point due to the axial chromatic aberration correction function. To form an image. By disposing the image sensor 911 at this imaging point, an image of the focused point light source 900 is formed on the imaging surface of the image sensor 911.

図24に、レンズ910Lと撮像素子911との距離を固定した場合における、被写体距離と撮像素子911から得られる画像信号の解像度との関係を示す。ここにおける解像度とは、画像の画素数を表すものではなく、画像上で表現可能な最大の空間周波数を指す。換言すれば、解像度とは、画像上にどの程度まで細かなものを再現できるかを表す尺度であり、解像力とも呼ばれる。   FIG. 24 shows the relationship between the subject distance and the resolution of the image signal obtained from the image sensor 911 when the distance between the lens 910L and the image sensor 911 is fixed. Here, the resolution does not represent the number of pixels of the image but refers to the maximum spatial frequency that can be represented on the image. In other words, the resolution is a scale that represents how much details can be reproduced on the image, and is also called resolution.

図24において、曲線920B、920G及び920Rは、夫々、撮影画像のB、G及びR信号における解像度の被写体距離依存性を表している。B、G及びR信号の解像度の夫々は、被写体距離が或る特定距離にある時に最大となり、被写体距離がその特定距離から減少又は増大するにつれて減少する。つまり、被写体距離が上記特定距離と合致する被写体(例えば人物)にピントが合い、且つ、被写体距離が上記特定距離からかけ離れた被写体(例えば背景)がぼけている画像が撮影画像として得られる。   In FIG. 24, curves 920B, 920G, and 920R represent the subject distance dependency of the resolution in the B, G, and R signals of the captured image, respectively. Each of the resolutions of the B, G, and R signals is maximized when the subject distance is at a specific distance, and decreases as the subject distance decreases or increases from the specific distance. That is, an image in which a subject (for example, a person) whose subject distance matches the specific distance is in focus and a subject (for example, a background) whose subject distance is far from the specific distance is blurred as a captured image.

尚、図24は、撮像素子910として、ベイヤ配列を採用した単板のイメージセンサを用いることを想定している。ベイヤ配列のイメージセンサでは、光の緑成分を受光する受光画素の密度が、光の青又は赤成分を受光する受光画素の密度よりも多い。故に、G信号の解像度が、B及びR信号のそれらよりも高くなっている。   Note that FIG. 24 assumes that a single-plate image sensor employing a Bayer array is used as the image sensor 910. In a Bayer array image sensor, the density of light receiving pixels that receive the green component of light is greater than the density of light receiving pixels that receive the blue or red component of light. Therefore, the resolution of the G signal is higher than those of the B and R signals.

図24の920Yは、撮影画像のB、G及びR信号から生成されるY信号(輝度信号)の解像度の被写体距離依存性を表している。各被写体距離において、Y信号の解像度は、G信号の解像度と同程度であるか或いはG信号の解像度を上回る。   920Y in FIG. 24 represents the subject distance dependency of the resolution of the Y signal (luminance signal) generated from the B, G, and R signals of the captured image. At each subject distance, the resolution of the Y signal is about the same as or higher than the resolution of the G signal.

Y信号(又はB、G及びR信号の全て)の有する解像度が或る一定の基準解像度RSO以上になる被写体距離の範囲を合焦範囲又は被写界深度と呼ぶ。 Y signal (or the B, G and all of the R signal) is referred to as a focusing range of the range of the subject distance resolution is one more than a predetermined standard resolution RS O with the or depth of field.

第1被写体(例えば主要被写体としての人物)と第2被写体(例えば背景)が撮像装置の被写体に含まれており、第1及び第2被写体の被写体距離が互いに異なる第1及び第2被写体距離であることを想定する。第1被写体にピントを合わせた場合、被写界深度の浅い画像では、第1及び第2被写体距離間の距離差が若干異なるだけで第2被写体はぼかされる。一方、被写界深度が深い場合は、その距離差が随分異なっていても、第1及び第2被写体の双方にピントが合ったような画像が得られる。   A first subject (for example, a person as a main subject) and a second subject (for example, a background) are included in the subject of the imaging device, and the subject distances of the first and second subjects are different from each other. Assume that there is. When focusing on the first subject, the second subject is blurred in an image with a shallow depth of field with only a slight difference in distance between the first and second subject distances. On the other hand, when the depth of field is deep, an image in which both the first and second subjects are in focus can be obtained even if the distance difference is significantly different.

大型の一眼レフカメラを用いれば被写界深度の浅い画像を容易に取得することができる。大型の一眼レフカメラでは、大型のレンズを採用できるためレンズの開口部を大きくとることができ、結果、被写界深度の深さを比較的大きく設定することができるからである。これに対して、小型デジタルカメラにおいて、一眼レフカメラ並みの被写界深度の浅い画像を撮影することは困難である。小型デジタルカメラに用いられるレンズ及び撮像素子は小型であるため、必然的に、大型の一眼レフカメラと比べて、レンズの開口部が小さくなって被写界深度が深くなるからである。   If a large single-lens reflex camera is used, an image with a shallow depth of field can be easily acquired. This is because a large single-lens reflex camera can employ a large lens, so that the opening of the lens can be made large, and as a result, the depth of field can be set relatively large. On the other hand, in a small digital camera, it is difficult to capture an image with a shallow depth of field as with a single-lens reflex camera. This is because a lens and an image sensor used in a small digital camera are small, and inevitably, the opening of the lens is smaller and the depth of field is deeper than that of a large single-lens reflex camera.

被写界深度が深い画像が被写界深度の浅い画像に必ずしも劣るわけではないが、被写体距離に応じて自然なぼけが再現された芸術性の高い画像を取得するために、時として、浅い被写界深度が求められる。また、撮影後に、画像の被写界深度を任意の調整することができれば利便性は高い。   An image with deep depth of field is not necessarily inferior to an image with shallow depth of field, but sometimes it is shallow to obtain a highly artistic image that reproduces natural blur according to the subject distance. Depth of field is required. Also, if the depth of field of the image can be arbitrarily adjusted after shooting, the convenience is high.

尚、下記特許文献1には、レンズの軸上色収差を利用して、フォーカス制御の高速化を図った技術が開示されている。また、軸上色収差に由来して生じた画像のぼけを、点広がり関数の逆関数を用いて修正する技術も開示されている。しかしながら、この技術は、被写界深度の調整に寄与するものではない。   Patent Document 1 listed below discloses a technique for increasing the speed of focus control by utilizing axial chromatic aberration of a lens. Also disclosed is a technique for correcting an image blur caused by axial chromatic aberration using an inverse function of a point spread function. However, this technique does not contribute to the adjustment of the depth of field.

特開平6−138362号公報JP-A-6-138362

そこで本発明は、所望の被写界深度を有する画像の取得に寄与する撮像装置を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an imaging apparatus that contributes to acquisition of an image having a desired depth of field.

本発明に係る撮像装置は、軸上色収差を有する光学系を介して被写体を撮影する撮像素子と、撮影画像を表す複数色の色信号に含まれる所定の高域周波数成分を色信号ごとに抽出し、色信号ごとの高域周波数成分の大きさに基づいて、前記撮影画像中の各部分画像領域における被写体距離を推定する被写体距離推定手段と、前記撮影画像から補正画像を生成する画像処理手段と、前記補正画像に対する被写界深度の深さを指定するとともに、その被写界深度内に位置すべき特定被写体距離を指定することにより、前記補正画像に対する被写界深度を設定する設定手段と、を備え、前記画像処理手段は、前記被写体距離推定手段による推定被写体距離と前記設定手段による設定被写界深度に応じた画像処理を前記撮影画像に施すことによって、前記設定被写界深度に従った前記補正画像を生成することを特徴とする。   An image pickup apparatus according to the present invention extracts, for each color signal, an image pickup element that picks up a subject via an optical system having axial chromatic aberration, and a predetermined high-frequency component included in a plurality of color signals representing a picked-up image. And subject distance estimating means for estimating the subject distance in each partial image area in the photographed image based on the magnitude of the high frequency component for each color signal, and image processing means for generating a correction image from the photographed image. And setting means for setting the depth of field for the corrected image by specifying a depth of the depth of field for the corrected image and specifying a specific subject distance to be positioned within the depth of field The image processing means performs image processing on the captured image according to the estimated subject distance by the subject distance estimation means and the set depth of field by the setting means, And generates the corrected image in accordance with the serial setting depth of field.

軸上色収差を積極的に利用し、撮影画像の各部分画像領域における推定被写体距離に基づいて、設定被写界深度に従った補正画像を撮影後に生成する。これにより、撮影後に、所望の被写界深度を有する補正画像を生成することができる。また、撮影後のフォーカス制御が可能となるため、ピント合わせミスによる撮影の失敗をなくすことができる。   The axial chromatic aberration is positively used, and a corrected image according to the set depth of field is generated after shooting based on the estimated subject distance in each partial image region of the shot image. Thereby, it is possible to generate a corrected image having a desired depth of field after shooting. In addition, since focus control after shooting is possible, shooting failures due to focusing errors can be eliminated.

具体的には例えば、前記設定被写界深度と前記撮影画像中の各部分画像領域における推定被写体距離とに基づいて、前記撮影画像及び前記補正画像の夫々の全体画像領域は、対応する推定被写体距離が前記設定被写界深度内に収まる第1部分画像領域と対応する推定被写体距離が前記設定被写界深度外に位置する第2部分画像領域に分類され、前記画像処理手段は、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように、前記撮影画像から前記補正画像を生成する。   Specifically, for example, based on the set depth of field and the estimated subject distance in each partial image region in the captured image, the entire image region of each of the captured image and the corrected image is a corresponding estimated subject. An estimated subject distance corresponding to a first partial image area whose distance falls within the set depth of field is classified into a second partial image area located outside the set depth of field, and the image processing means The corrected image is generated from the captured image so that an image in the second partial image region is blurred in the image compared with an image in the first partial image region.

より具体的には例えば、前記複数色の色信号は、互いに異なる第1、第2及び第3の色信号から成り、前記画像処理手段は、第1〜第3の色信号の高域周波数成分の大きさの内、最大の大きさに対応する色信号の高域周波数成分を他の2つの色信号に付加することにより、第1〜第3の高域付加後色信号を生成する第1補正手段と、前記第1〜第3の高域付加後色信号に対して所定のフィルタリングを施すことにより、前記第1〜第3の高域付加後色信号から前記補正画像を表す第1〜第3の補正色信号を生成する第2補正手段と、を備え、前記第2補正手段は、前記設定被写界深度と前記撮影画像中の各部分画像領域における推定被写体距離とに基づき、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように前記フィルタリングを実行する。   More specifically, for example, the color signals of the plurality of colors are composed of first, second and third color signals different from each other, and the image processing means includes the high frequency components of the first to third color signals. The first to third color signals after addition of the high frequency band are generated by adding the high frequency component of the color signal corresponding to the maximum size to the other two color signals. First to first representing the corrected image from the first to third post-high color signal by applying predetermined filtering to the correction means and the first to third post-high color signal. Second correction means for generating a third correction color signal, wherein the second correction means is based on the set depth of field and the estimated subject distance in each partial image area in the captured image. In the corrected image, the image in the second partial image area is compared with the image in the first partial image area. Blurred performing said filtering as.

そして例えば、前記第2補正手段による前記フィルタリングは、カットオフ周波数を可変設定可能なローパスフィルタによるフィルタリングであり、前記カットオフ周波数の可変設定により、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされる。   For example, the filtering by the second correction unit is filtering by a low-pass filter that can variably set a cutoff frequency, and an image in the second partial image region in the corrected image is set by variably setting the cutoff frequency. It is blurred compared with the image in the first partial image area.

或いは例えば、前記撮影画像中の各部分画像領域における推定被写体距離から、前記撮影画像中の各部分画像領域における色信号ごとの、前記軸上色収差に由来する点広がり関数が定まり、前記画像処理手段は、前記点広がり関数、前記設定被写界深度、及び、前記撮影画像中の各部分画像領域における推定被写体距離に基づき、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように、前記撮影画像から前記補正画像を生成する。   Alternatively, for example, a point spread function derived from the longitudinal chromatic aberration for each color signal in each partial image region in the captured image is determined from the estimated subject distance in each partial image region in the captured image, and the image processing means Is based on the point spread function, the set depth of field, and the estimated subject distance in each partial image area in the captured image, the image in the second partial image area in the corrected image is the first partial image area The corrected image is generated from the photographed image so as to be blurred compared with the image inside.

そして例えば、前記画像処理手段は、前記点広がり関数から推定される、前記軸上色収差に由来する前記撮影画像中の各部分画像領域におけるボケ量を、前記補正画像中の各部分画像領域における設定ボケ量へと修正するためのフィルタリングを前記撮影画像の各色信号に対して実行することにより、前記設定ボケ量に応じてぼかされた前記補正画像を生成し、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように、前記設定被写界深度と前記撮影画像中の各部分画像領域における推定被写体距離とに基づいて前記設定ボケ量は定められる。   And, for example, the image processing means sets a blur amount in each partial image region in the captured image derived from the axial chromatic aberration estimated from the point spread function in each partial image region in the corrected image. The correction image blurred according to the set blur amount is generated by performing filtering for correcting the blur amount on each color signal of the photographed image, and the second partial image is generated in the correction image. The set blur amount is based on the set depth of field and the estimated subject distance in each partial image area in the captured image so that the image in the area is blurred compared with the image in the first partial image area. Determined.

また例えば、前記撮像装置は、前記撮影画像を表示する表示手段を更に備え、前記撮影画像の撮影後、前記撮影画像又は前記撮影画像に基づく画像が前記表示手段の表示画面上に表示され、前記設定手段は、その表示が行われている状態において、前記表示画面上の特定被写体を指定する操作を受け付けて前記特定被写体に対応する推定被写体距離から前記特定被写体距離を指定する一方、所定操作を受け付けることによって前記補正画像に対する被写界深度の深さを指定する。   In addition, for example, the imaging apparatus further includes display means for displaying the captured image, and after capturing the captured image, the captured image or an image based on the captured image is displayed on a display screen of the display means, The setting means receives an operation for designating a specific subject on the display screen in a state where the display is performed, and designates the specific subject distance from an estimated subject distance corresponding to the specific subject, while performing a predetermined operation. By accepting, the depth of field for the corrected image is designated.

本発明によれば、所望の被写界深度を有する画像の取得に寄与する撮像装置を提供することが可能となる。   According to the present invention, it is possible to provide an imaging apparatus that contributes to acquisition of an image having a desired depth of field.

本発明の意義ないし効果は、以下に示す実施の形態の説明により更に明らかとなろう。ただし、以下の実施の形態は、あくまでも本発明の一つの実施形態であって、本発明ないし各構成要件の用語の意義は、以下の実施の形態に記載されたものに制限されるものではない。   The significance or effect of the present invention will become more apparent from the following description of embodiments. However, the following embodiment is merely one embodiment of the present invention, and the meaning of the term of the present invention or each constituent element is not limited to that described in the following embodiment. .

以下、本発明の実施の形態につき、図面を参照して具体的に説明する。参照される各図において、同一の部分には同一の符号を付し、同一の部分に関する重複する説明を原則として省略する。後に第1〜第3実施形態を説明するが、まず、各実施形態に共通する事項又は各実施形態にて参照される事項について説明する。   Hereinafter, embodiments of the present invention will be specifically described with reference to the drawings. In each of the drawings to be referred to, the same part is denoted by the same reference numeral, and redundant description regarding the same part is omitted in principle. The first to third embodiments will be described later. First, matters that are common to each embodiment or items that are referred to in each embodiment will be described.

図1、図2(a)〜(c)及び図3を参照して、本発明の実施形態に係る撮像装置にて利用されるレンズ10Lの特性を説明する。レンズ10Lは、比較的大きな所定の軸上色収差を有している。従って、図1に示す如く、点光源300からレンズ10Lに向かう光301は、レンズ10Lによって青色光301B、緑色光301G及び赤色光301Rに分離され、青色光301B、緑色光301G及び赤色光301Rは、互いに異なる結像点302B、302G及び302R上に結像する。青色光301B、緑色光301G及び赤色光301Rは、夫々、光301の青、緑及び赤成分である。   With reference to FIG. 1, FIG. 2 (a)-(c), and FIG. 3, the characteristic of the lens 10L utilized with the imaging device which concerns on embodiment of this invention is demonstrated. The lens 10L has a relatively large predetermined axial chromatic aberration. Accordingly, as shown in FIG. 1, the light 301 from the point light source 300 toward the lens 10L is separated into blue light 301B, green light 301G, and red light 301R by the lens 10L, and the blue light 301B, green light 301G, and red light 301R are The images are formed on different image forming points 302B, 302G and 302R. Blue light 301B, green light 301G, and red light 301R are the blue, green, and red components of light 301, respectively.

図2(a)等において、符号11は、撮像装置にて利用される撮像素子を表している。撮像素子11は、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどの固体撮像素子である。撮像素子11は、いわゆる単板方式のイメージセンサであり、撮像素子11としての1枚のイメージセンサにおける各受光画素の前面には、光の赤成分のみを透過させる赤フィルタ、光の緑成分のみを透過させる緑フィルタ、及び、光の青成分のみを透過させる青フィルタの何れかが配置されている。赤フィルタ、緑フィルタ及び青フィルタの配列は、ベイヤ配列である。   In FIG. 2A and the like, reference numeral 11 represents an imaging element used in the imaging apparatus. The imaging device 11 is a solid-state imaging device such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) image sensor. The image sensor 11 is a so-called single-plate image sensor, and a red filter that transmits only a red component of light and only a green component of light are provided in front of each light receiving pixel in one image sensor as the image sensor 11. Either a green filter that transmits light or a blue filter that transmits only the blue component of light is disposed. The arrangement of the red filter, the green filter, and the blue filter is a Bayer arrangement.

レンズ10Lの中心から結像点302B、302G及び302Rまでの距離を、図3に示す如く、それぞれXB、XG及びXRにて表す。そうすると、レンズ10Lが有する軸上色収差により、不等式「XB<XG<XR」が成立する。また、レンズ10Lの中心から撮像素子11までの距離をXISにて表す。図3では、「XB<XG<XR<XIS」が成立しているが、光源300とレンズ10Lの中心までの距離310(図1参照)が変化することによって、距離XB、XG及びXRと距離XISとの大小関係は変化する。 The distances from the center of the lens 10L to the image forming points 302B, 302G, and 302R are represented by XB, XG, and XR, respectively, as shown in FIG. Then, the inequality “XB <XG <XR” is established due to the longitudinal chromatic aberration of the lens 10L. Further, representing the distance to the imaging element 11 in X IS from the center of the lens 10L. In FIG. 3, “XB <XG <XR <X IS ” is satisfied, but the distances XB, XG, and XR are changed by changing the distance 310 (see FIG. 1) between the light source 300 and the center of the lens 10L. The magnitude relationship with the distance XIS changes.

図2(a)〜(c)は、被写体距離とも言うべき距離310が変化することによって結像点302B、302G及び302Rの位置が変化する様子を示した図である。図2(a)は、距離310が比較的小さな距離であって「XB=XIS」が成立する時の、結像点302B、302G及び302Rと撮像素子11の位置関係を示している。図2(b)は、距離310が図2(a)の状態から増大することによって「XG=XIS」が成立する時の、結像点302B、302G及び302Rと撮像素子11の位置関係を示している。図2(c)は、距離310が図2(b)の状態から更に増大することによって「XR=XIS」が成立する時の、結像点302B、302G及び302Rと撮像素子11の位置関係を示している。 FIGS. 2A to 2C are diagrams showing how the positions of the imaging points 302B, 302G, and 302R change as the distance 310, which should be called the subject distance, changes. FIG. 2A shows the positional relationship between the imaging points 302B, 302G, and 302R and the image sensor 11 when the distance 310 is a relatively small distance and “XB = X IS ” is satisfied. FIG. 2B shows the positional relationship between the imaging points 302B, 302G, and 302R and the image sensor 11 when “XG = X IS ” is satisfied when the distance 310 increases from the state of FIG. Show. FIG. 2C shows the positional relationship between the imaging points 302B, 302G and 302R and the image sensor 11 when “XR = X IS ” is satisfied when the distance 310 further increases from the state of FIG. Is shown.

距離XISが距離XB、XG、XBと一致する時におけるレンズ10Lの位置は、青色光301B、緑色光301G、赤色光301Rに対するレンズ10Lの合焦位置である。従って、「XB=XIS」、「XG=XIS」、「XR=XIS」が成立する場合においては、夫々、青色光301B、緑色光301G、赤色光301Rに対して完全にピントが合った状態の画像が撮像素子11から得られる。但し、青色光301Bに対して完全にピントが合った状態の画像においては、緑色光301G及び赤色光301Rの像がぼける。緑色光301G及び赤色光301Rに対して完全にピントが合った状態の画像についても同様である。また、「XB=XIS」、「XG=XIS」及び「XR=XIS」の何れもが成立しない場合に撮像素子11から得られた画像上においては、青色光301B、緑色光301G及び赤色光301Rの像が全てぼける。画像におけるぼけの大きさ(ぼけの度合い)をボケ量と呼ぶ。 Distance X IS distance XB, the position of the lens 10L at the time that matches XG, and XB is a blue light 301B, the green light 301G, focus position of the lens 10L for red light 301R. Therefore, when “XB = X IS ”, “XG = X IS ”, and “XR = X IS ” are satisfied, the blue light 301B, the green light 301G, and the red light 301R are completely focused, respectively. An image in the state is obtained from the image sensor 11. However, the image of the green light 301G and the red light 301R is blurred in the image in a state where the blue light 301B is completely focused. The same applies to an image in a state where the green light 301G and the red light 301R are completely focused. On the image obtained from the image sensor 11 when none of “XB = X IS ”, “XG = X IS ”, and “XR = X IS ” is established, the blue light 301B, the green light 301G, and All images of red light 301R are blurred. The amount of blur (degree of blur) in an image is called a blur amount.

撮像素子11の撮像面上に形成される青色光301B、緑色光301G及び赤色光301Rの画像の半径を、夫々、YB、YG及びYRにて表す。青色光301B、緑色光301G及び赤色光301Rの画像のボケ量は、夫々、半径YB、YG及びYRと比例関係にある。即ち、半径YBが大きいほど青色光301Bの画像のボケ量は大きくなる(緑色光301G及び赤色光301Rについても同様)。軸上色収差の特性を含むレンズ10Lの特性は撮像装置の設計段階で予め分かっているともに撮像装置は距離XISをも当然に認識可能である。よって、撮像装置は、距離310が分かれば、レンズ10Lの特性と距離XISを用いて半径YB、YG及びYRを推定可能である(即ち、撮像素子11から得られる画像上の、各色成分に対するボケ量を推定可能である)。また、距離310が分かれば、青色光301B、緑色光301G及び赤色光301Rの画像の点広がり関数(Point Spread Function)が決まるので、点広がり関数の逆関数を用いて、それらの画像のぼけを除去することも可能である。 The radii of the blue light 301B, green light 301G, and red light 301R images formed on the imaging surface of the image sensor 11 are represented by YB, YG, and YR, respectively. The blur amounts of the blue light 301B, green light 301G, and red light 301R images are proportional to the radii YB, YG, and YR, respectively. That is, the larger the radius YB, the larger the blur amount of the blue light 301B image (the same applies to the green light 301G and the red light 301R). The characteristics of the lens 10L including the characteristics of axial chromatic aberration are known in advance at the design stage of the imaging apparatus, and the imaging apparatus can naturally recognize the distance XIS . Thus, the imaging device, if the distance 310 is known, the radius YB using the characteristics of the lens 10L and the distance X IS, it is possible to estimate the YG and YR (i.e., on the image obtained from the imaging device 11, for each color component The amount of blur can be estimated). Also, if the distance 310 is known, the point spread function of the blue light 301B, green light 301G, and red light 301R is determined, so that the blur of those images can be reduced using the inverse function of the point spread function. It is also possible to remove it.

尚、距離XISを変化させることも可能ではあるが、以下の説明では、説明の簡略化上、特に記述なき限り距離XISは一定距離に固定されているものとする。 Although it is possible to change the distance XIS , in the following description, for the sake of simplicity, it is assumed that the distance XIS is fixed to a constant distance unless otherwise specified.

或る被写体と撮像装置との間における実空間上の距離(厳密には、或る被写体とレンズ10Lの中心との間における実空間上の距離)を被写体距離と呼ぶ。点光源300が注目した被写体であると考えれば、距離310は、注目した被写体にとっての被写体距離である。また、   A distance in real space between a certain subject and the imaging device (strictly speaking, a distance in real space between a certain subject and the center of the lens 10L) is called a subject distance. If the point light source 300 is considered to be a focused subject, the distance 310 is a subject distance for the focused subject. Also,

図4に、被写体距離と撮像素子11から得られた原画像のB、G及びR信号の解像度との関係を示す。ここにおける原画像とは、撮像素子11から得られたRAWデータに対してデモザイキング処理を施して得られる画像を指し、後述の各実施形態では、デモザイキング処理部14にて生成される原画像に相当する(図6等参照)。B、G及びR信号とは、夫々、青色光301Bに対応する画像上の青色成分を表す信号、緑色光301Gに対応する画像上の緑色成分を表す信号及び赤色光301Rに対応する画像上の赤色成分を表す信号を指す。   FIG. 4 shows the relationship between the subject distance and the resolution of the B, G, and R signals of the original image obtained from the image sensor 11. Here, the original image refers to an image obtained by performing demosaicing processing on the RAW data obtained from the image sensor 11. In each embodiment described later, the original image generated by the demosaicing processing unit 14. (Refer to FIG. 6 etc.). The B, G, and R signals are a signal representing a blue component on the image corresponding to the blue light 301B, a signal representing a green component on the image corresponding to the green light 301G, and an image corresponding to the red light 301R, respectively. Refers to the signal representing the red component.

本明細書における解像度とは、画像の画素数を表すものではなく、画像上で表現可能な最大の空間周波数を指す。換言すれば、本明細書における解像度とは、画像上にどの程度まで細かなものを再現できるかを表す尺度であり、解像力とも呼ばれる。   The resolution in this specification does not represent the number of pixels of an image, but indicates the maximum spatial frequency that can be represented on the image. In other words, the resolution in the present specification is a scale that represents how fine details can be reproduced on an image, and is also referred to as resolving power.

図4において、曲線320B、320G及び320Rは、夫々、原画像のB、G及びR信号における解像度の被写体距離依存性を表している。図4(及び後述の図5等)の、解像度と被写体距離との関係を表すグラフにおいて、横軸及び縦軸は夫々被写体距離及び解像度を表し、横軸上を左から右に向かうにつれて対応する被写体距離は増大すると共に縦軸上を下から上に向かうにつれて対応する解像度は増大する。   In FIG. 4, curves 320B, 320G, and 320R represent the subject distance dependency of the resolution in the B, G, and R signals of the original image, respectively. In the graph showing the relationship between the resolution and the subject distance in FIG. 4 (and FIG. 5 and the like to be described later), the horizontal axis and the vertical axis represent the subject distance and the resolution, respectively, and correspond on the horizontal axis from left to right. The subject distance increases, and the corresponding resolution increases as the vertical axis is moved from the bottom to the top.

被写体距離DDB、DDG及びDDRは、夫々、図2(a)に対応する「XB=XIS」、図2(b)に対応する「XG=XIS」及び図2(c)に対応する「XR=XIS」が成立する場合における被写体距離である。従って、「DDB<DDG<DDR」が成立する。 The subject distances DD B , DD G and DD R are respectively “XB = X IS ” corresponding to FIG. 2A, “XG = X IS ” corresponding to FIG. 2B, and FIG. This is the subject distance when the corresponding “XR = X IS ” holds. Therefore, “DD B <DD G <DD R ” is established.

曲線320Bに示す如く、原画像のB信号の解像度は、被写体距離が距離DDBである時に最大となり、被写体距離が距離DDBを起点として減少又は増大するにつれて減少する。同様に、曲線320Gに示す如く、原画像のG信号の解像度は、被写体距離が距離DDGである時に最大となり、被写体距離が距離DDGを起点として減少又は増大するにつれて減少する。同様に、曲線320Rに示す如く、原画像のR信号の解像度は、被写体距離が距離DDRである時に最大となり、被写体距離が距離DDRを起点として減少又は増大するにつれて減少する。 As shown in curve 320B, the resolution of the original image of the B signal, becomes maximum when the object distance is the distance DD B, decreases as the object distance decreases or increases the distance DD B as a starting point. Similarly, as shown in curve 320G, resolution G signal of the original image becomes maximum when the object distance is the distance DD G, decreases as the object distance decreases or increases the distance DD G as a starting point. Similarly, as shown in curve 320R, the resolution R signal of the original image becomes maximum when the object distance is the distance DD R, decreases as the object distance decreases or increases the distance DD R as a starting point.

上述した解像度の定義から分かるように、原画像のB信号の解像度は、原画像上のB信号の最大空間周波数を表す(G及びR信号についても同様)。或る信号の解像度が比較的高ければ、その信号には高域周波数成分が比較的多く含まれる。或る信号に含まれる周波数成分の内、所定の周波数以上の周波数成分を高域周波数成分(以下、高域成分と略記する)と呼び、所定の周波数未満の周波数成分を低域周波数成分(以下、低域成分と略記する)と呼ぶ。   As can be seen from the definition of resolution described above, the resolution of the B signal of the original image represents the maximum spatial frequency of the B signal on the original image (the same applies to the G and R signals). If the resolution of a certain signal is relatively high, the signal contains a relatively large amount of high frequency components. Of the frequency components included in a signal, a frequency component equal to or higher than a predetermined frequency is called a high frequency component (hereinafter abbreviated as a high frequency component), and a frequency component less than a predetermined frequency is referred to as a low frequency component (hereinafter referred to as a high frequency component) Are abbreviated as low-frequency components).

このように、被写体距離が比較的近い被写体(例えば、被写体距離がDDBの被写体)に対しては、原信号のB信号に高域周波数成分が含まれ、被写体距離が比較的遠い被写体(例えば、被写体距離がDDRの被写体)に対しては、原信号のR信号に高域周波数成分が含まれ、被写体距離が中程度の被写体(例えば、被写体距離がDDGの被写体)に対しては、原信号のG信号に高域周波数成分が含まれる。 Thus, for the object distance is relatively close to the object (e.g., object subject distance of DD B), high-frequency frequency components included in the B signal of the original signal, the object distance is relatively far subject (e.g. , for the object distance DD R of the subject), high-frequency frequency components included in the R signal of the original signal, for a subject of moderate subject distance (e.g., the subject object distance is DD G) The high frequency component is included in the G signal of the original signal.

これらの高域成分を補完しあえば、合焦範囲の広い、即ち被写界深度の深い画像を生成可能である。図5は、原信号のB、G及びR信号の高域成分を補完しあうことで生成されるY信号の解像度を表す曲線320Yを、図4に付加した図である。このような補完を行った後、合焦を望む被写体(例えば主要被写体としての人物)との間で被写体距離が異なる被写体(例えば背景)をぼかすようにすれば、合焦を望む被写体にピントが合った、合焦範囲の狭い画像(即ち、被写界深度の浅い画像)を生成することができる。   If these high-frequency components are complemented, an image with a wide focusing range, that is, a deep depth of field can be generated. FIG. 5 is a diagram in which a curve 320Y representing the resolution of the Y signal generated by complementing the high-frequency components of the original B, G, and R signals is added to FIG. After performing such complementation, if the subject (for example, the background) whose subject distance is different from the subject (for example, the person as the main subject) desired to be focused is blurred, the subject desired to be focused is focused. A matched image with a narrow focus range (that is, an image with a shallow depth of field) can be generated.

尚、上述したように、Y信号(又はB、G及びR信号の全て)の有する解像度が或る一定の基準解像度RSO以上になる被写体距離の範囲を合焦範囲又は被写界深度と呼ぶ。 Incidentally, called as described above, Y signal (or the B, G and R signals of all) and the focusing range the scope of the subject distance resolution is a certain or predetermined standard resolution RS O with the or depth of field .

以下の第1〜第3実施形態において、被写界深度の浅い画像の生成方法をより具体的に説明する。   In the following first to third embodiments, a method for generating an image with a shallow depth of field will be described more specifically.

<<第1実施形態>>
まず、本発明の第1実施形態を説明する。図1は、本発明の第1実施形態に係る撮像装置1の全体ブロック図である。撮像装置1(及び後述の撮像装置1a)は、静止画像を撮影及び記録可能なデジタルスチルカメラ、又は、静止画像及び動画像を撮影及び記録可能なデジタルビデオカメラである。尚、撮影と撮像は同義である。
<< First Embodiment >>
First, a first embodiment of the present invention will be described. FIG. 1 is an overall block diagram of an imaging apparatus 1 according to the first embodiment of the present invention. The imaging device 1 (and an imaging device 1a described later) is a digital still camera that can capture and record still images, or a digital video camera that can capture and record still images and moving images. Note that shooting and imaging are synonymous.

撮像装置1は、符号10〜24によって参照される各部位を備えている。光学系10は、光学ズームを行うためのズームレンズ及び焦点位置を調整するためのフォーカスレンズを含むレンズ群と、撮像素子11への入射光量を調節するための絞りによって形成され、所望の画角を有し且つ所望の明るさを有する画像を撮像素子11の撮像面に結像させる。光学系10を単体のレンズとして捉えたものが上述のレンズ10Lである。従って、光学系10は、レンズ10Lが有する軸上色収差と同じ軸上色収差を有する。   The imaging device 1 is provided with each part referred by the codes | symbols 10-24. The optical system 10 is formed by a lens group including a zoom lens for performing optical zoom and a focus lens for adjusting a focal position, and a diaphragm for adjusting the amount of light incident on the image sensor 11, and has a desired angle of view. An image having a desired brightness is formed on the imaging surface of the image sensor 11. The lens 10L described above is obtained by capturing the optical system 10 as a single lens. Therefore, the optical system 10 has the same axial chromatic aberration as that of the lens 10L.

撮像素子11は、光学系10を介して入射した被写体を表す光学像(被写体像)を光電変換し、該光電変換によって得られた電気信号をAFE12に出力する。より具体的には、撮像素子11は、マトリクス状に二次元配列された複数の受光画素を備え、夫々の撮影において、各受光画素は露光時間の長さに応じた電荷量の信号電荷を蓄える。蓄えた信号電荷の電荷量に比例した大きさを有する各受光画素からのアナログ信号は、撮像装置1内で生成される駆動パルスに従って順次AFE12に出力される。   The image sensor 11 photoelectrically converts an optical image (subject image) representing a subject incident via the optical system 10 and outputs an electrical signal obtained by the photoelectric conversion to the AFE 12. More specifically, the image pickup device 11 includes a plurality of light receiving pixels arranged two-dimensionally in a matrix, and each light receiving pixel stores a signal charge having a charge amount corresponding to the length of the exposure time in each photographing. . An analog signal from each light receiving pixel having a magnitude proportional to the amount of stored signal charge is sequentially output to the AFE 12 in accordance with a drive pulse generated in the imaging device 1.

AFE(Analog Front End)12は、撮像素子11から出力されるアナログ信号を増幅し、増幅されたアナログ信号をデジタル信号に変換してから出力する。また、AFE12の信号増幅における増幅度は、AFE12の出力信号レベルが最適化されるように、光学系10の絞り値に対する調整と連動して調整される。尚、AFE12の出力信号をRAWデータとも呼ぶ。RAWデータを、DRAM(Dynamic Random Access Memory)13に一時記憶させることができる。また、DRAM13は、RAWデータだけではなく、撮像装置1内で生成される各種データを一時的に記憶することができる。   An AFE (Analog Front End) 12 amplifies the analog signal output from the image sensor 11, converts the amplified analog signal into a digital signal, and outputs the digital signal. Further, the amplification degree in the signal amplification of the AFE 12 is adjusted in conjunction with the adjustment of the aperture value of the optical system 10 so that the output signal level of the AFE 12 is optimized. The output signal of the AFE 12 is also called RAW data. RAW data can be temporarily stored in a DRAM (Dynamic Random Access Memory) 13. Further, the DRAM 13 can temporarily store not only RAW data but also various data generated in the imaging apparatus 1.

上述したように、撮像素子11はベイヤ配列を採用した単板方式のイメージセンサであるため、RAWデータによって表される二次元画像には、赤の色信号がベイヤ配列に従ってモザイク状に配置される(緑及び青についても同様)。   As described above, since the image sensor 11 is a single-plate image sensor that employs a Bayer array, red color signals are arranged in a mosaic pattern according to the Bayer array in a two-dimensional image represented by RAW data. (Same for green and blue).

デモザイキング処理部14は、RAWデータに対して周知のデモザイキング処理を実行することにより、RGB形式の画像データを生成する。デモザイキング処理部14が生成した画像データによって表される二次元画像を、以下、原画像と呼ぶ。原画像を形成する1つ1つの画素にはR、G及びB信号の全てが割り当てられる。或る画素についてのR、G及びB信号は、夫々、その画素の赤、緑及び青の強度を表す色信号である。原画像のR、G及びB信号を、夫々、R0、G0及びB0にて表す。   The demosaicing processing unit 14 generates RGB format image data by executing a known demosaicing process on the RAW data. Hereinafter, the two-dimensional image represented by the image data generated by the demosaicing processing unit 14 is referred to as an original image. All R, G, and B signals are assigned to each pixel that forms the original image. The R, G, and B signals for a certain pixel are color signals that represent the red, green, and blue intensities of that pixel, respectively. The R, G, and B signals of the original image are represented by R0, G0, and B0, respectively.

高域成分抽出/距離推定部15(以下、抽出/推定部15と略記する)は、色信号R0、G0及びB0の夫々の高域成分を抽出すると共に、その抽出を介して原画像の各位置における被写体距離を推定し、推定被写体距離を表す被写体距離情報DISTを生成する。また、高域成分の抽出結果に応じた情報が被写界深度拡大処理部16に出力される。   The high-frequency component extraction / distance estimation unit 15 (hereinafter abbreviated as extraction / estimation unit 15) extracts the high-frequency components of the color signals R0, G0, and B0, and each of the original images through the extraction. The subject distance at the position is estimated, and subject distance information DIST representing the estimated subject distance is generated. Further, information corresponding to the extraction result of the high frequency component is output to the depth of field expansion processing unit 16.

被写界深度拡大処理部16(以下、拡大処理部16と略記する)は、抽出/推定部15からの情報に基づき、色信号R0、G0及びB0によって表される原画像の被写界深度を拡大する(即ち、被写界深度の深さを増大する)ことにより中間生成画像を生成する。中間生成画像のR、G及びB信号を、夫々、R1、G1及びB1にて表す。拡大処理部16は、原画像を表す色信号R0、G0及びB0を補正することにより中間生成画像を表す色信号R1、G1及びB1を生成する。   The depth of field expansion processing unit 16 (hereinafter abbreviated as the expansion processing unit 16) is based on information from the extraction / estimation unit 15, and the depth of field of the original image represented by the color signals R0, G0, and B0. Is expanded (ie, the depth of field is increased) to generate an intermediate generated image. The R, G, and B signals of the intermediate generated image are represented by R1, G1, and B1, respectively. The enlargement processing unit 16 corrects the color signals R0, G0, and B0 representing the original image to generate color signals R1, G1, and B1 representing the intermediate generation image.

被写界深度制御部17は、被写体距離情報DISTと補正画像に対する被写界深度を指定する被写界深度設定情報に基づいて中間生成画像の被写界深度を調整することにより、被写界深度の浅い補正画像を生成する。被写界深度設定情報によって、補正画像に対する被写界深度の深さと何れの被写体を合焦対象とするのかが定められる。被写界深度設定情報は、ユーザの指示等に基づき、CPU23によって作成される。補正画像のR、G及びB信号を、夫々、R2、G2及びB2にて表す。被写界深度制御部17は、中間生成画像を表す色信号R1、G1及びB1を補正することにより補正画像を表す色信号R2、G2及びB2を生成する。   The depth-of-field control unit 17 adjusts the depth of field of the intermediate generation image based on the subject distance information DIST and the depth of field setting information that specifies the depth of field for the corrected image. A corrected image with a shallow depth is generated. The depth of field setting information determines the depth of field with respect to the corrected image and which subject is to be focused. The depth of field setting information is created by the CPU 23 based on a user instruction or the like. The R, G, and B signals of the corrected image are represented by R2, G2, and B2, respectively. The depth-of-field control unit 17 corrects the color signals R1, G1, and B1 representing the intermediate generated image to generate color signals R2, G2, and B2 representing the corrected image.

補正画像のR、G及びB信号はカメラ信号処理部18に与えられる。原画像又は中間生成画像のR、G及びB信号をカメラ信号処理部18に与えることも可能である。   The R, G, and B signals of the corrected image are given to the camera signal processing unit 18. It is also possible to supply the R, G, and B signals of the original image or the intermediate generated image to the camera signal processing unit 18.

カメラ信号処理部18は、原画像、中間生成画像又は補正画像のR、G及びB信号を輝度信号Y並びに色差信号U及びVに変換すると共に、原画像、中間生成画像又は補正画像に対して輪郭強調処理などの必要な画質調整を行い、画質調整後の原画像、中間生成画像又は補正画像の映像信号(即ちYUV信号)を出力する。カメラ信号処理部18から出力される映像信号が液晶ディスプレイであるLCD19又は撮像装置1の外部に設けられた外部表示装置(不図示)に供給されることによって、LCD19の表示画面上または外部表示装置の表示画面上に、原画像、中間生成画像又は補正画像(厳密には画質調整後のそれら)が表示される。   The camera signal processing unit 18 converts the R, G, and B signals of the original image, the intermediate generated image, or the corrected image into the luminance signal Y and the color difference signals U and V, and performs the processing on the original image, intermediate generated image, or corrected image. Necessary image quality adjustment such as edge enhancement processing is performed, and a video signal (that is, YUV signal) of the original image, intermediate generation image or corrected image after image quality adjustment is output. A video signal output from the camera signal processing unit 18 is supplied to an LCD 19 that is a liquid crystal display or an external display device (not shown) provided outside the imaging device 1, thereby allowing the display screen of the LCD 19 or an external display device to be displayed. The original image, the intermediate generation image, or the corrected image (strictly, after the image quality adjustment) is displayed on the display screen.

撮像装置1において、いわゆるタッチパネル操作が可能となっている。ユーザは、LCD19の表示画面に触れることによって撮像装置1に対する操作(即ち、タッチパネル操作)を行うことができる。タッチパネル制御部20が、LCD19の表示画面上に加えられた圧力を検出することなどによって、タッチパネル操作を受け付ける。   In the imaging apparatus 1, so-called touch panel operation is possible. The user can perform an operation (that is, a touch panel operation) on the imaging device 1 by touching the display screen of the LCD 19. The touch panel control unit 20 receives a touch panel operation by detecting a pressure applied on the display screen of the LCD 19.

圧縮/伸張処理部21は、カメラ信号処理部18から出力される映像信号を所定の圧縮方式を用いて圧縮することにより圧縮映像信号(即ち、原画像、中間生成画像又は補正画像の圧縮画像データ)を生成する。また、その圧縮映像信号を伸張することにより、圧縮前の映像信号を復元することもできる。圧縮映像信号を、SD(Secure Digital)メモリカード等の不揮発性メモリである記録媒体22に記録することができる。また、記録媒体22に、RAWデータを記録することもできる。CPU(Central Processing Unit)23は、撮像装置1を形成する各部位の動作を統括的に制御する。操作部24は、撮像装置1に対する様々な操作を受け付ける。操作部24に対する操作内容は、CPU23に伝達される。   The compression / decompression processing unit 21 compresses the video signal output from the camera signal processing unit 18 using a predetermined compression method, thereby compressing the compressed video signal (that is, the compressed image data of the original image, the intermediate generation image, or the corrected image). ) Is generated. Further, by decompressing the compressed video signal, the video signal before compression can be restored. The compressed video signal can be recorded on a recording medium 22 which is a nonvolatile memory such as an SD (Secure Digital) memory card. Also, RAW data can be recorded on the recording medium 22. A CPU (Central Processing Unit) 23 comprehensively controls the operation of each part forming the imaging device 1. The operation unit 24 receives various operations on the imaging device 1. The operation content for the operation unit 24 is transmitted to the CPU 23.

[補正画像の生成原理:被写界深度の制御原理]
図7(a)〜(d)を参照して、原画像から補正画像を生成する方法の原理を説明する。図7(a)において、曲線400B、400G及び400Rは、夫々、原画像のB、G及びR信号における解像度の被写体距離依存性、即ち、色信号B0、G0及びR0における解像度の被写体距離依存性を表している。曲線400B、400G及び400Rは、夫々、図4の曲線320B、320G及び320Rと同じものである。図7(a)及び(b)の距離DDB、DDG及びDDRは、図4に示したそれらと同じものである。
[Principle of corrected image generation: Control principle of depth of field]
With reference to FIGS. 7A to 7D, the principle of a method for generating a corrected image from an original image will be described. In FIG. 7A, curves 400B, 400G, and 400R respectively indicate the object distance dependency of the resolution in the B, G, and R signals of the original image, that is, the object distance dependency of the resolution in the color signals B0, G0, and R0. Represents. Curves 400B, 400G, and 400R are the same as curves 320B, 320G, and 320R in FIG. 4, respectively. The distances DD B , DD G and DD R in FIGS. 7A and 7B are the same as those shown in FIG.

軸上色収差により、色信号B0、G0及びR0の解像度が高まる被写体距離は互いに異なる。被写体距離が比較的近い被写体に対しては色信号B0に高域成分が含まれ、被写体距離が比較的遠い被写体に対しては色信号R0に高域成分が含まれ、被写体距離が中程度の被写体に対しては色信号G0に高域成分が含まれる。   The subject distances in which the resolution of the color signals B0, G0, and R0 increases due to axial chromatic aberration are different from each other. For a subject with a relatively short subject distance, the color signal B0 includes a high frequency component, and for a subject with a relatively long subject distance, the color signal R0 includes a high frequency component, and the subject distance is medium. For a subject, the color signal G0 includes a high frequency component.

このような色信号B0、G0及びR0を得た後、色信号B0、G0及びR0の内、最も大きな高域成分を有する信号を特定し、特定した色信号の高域成分を他の2つの色信号に付加することにより中間生成画像の色信号B1、G1及びR1を生成する。各色信号の高域成分の大きさは被写体距離の変化に伴って変化するため、この生成処理は、互いに異なる第1、第2、第3・・・の被写体距離に対して別個に実行される。原画像の全体画像領域内には様々な被写体距離を有する被写体が表れるが、各被写体の被写体距離は、図6の抽出/推定部15によって推定される。   After obtaining such color signals B0, G0, and R0, a signal having the largest high frequency component is specified among the color signals B0, G0, and R0, and the high frequency component of the specified color signal is determined as the other two By adding to the color signal, the color signals B1, G1, and R1 of the intermediate generation image are generated. Since the magnitude of the high frequency component of each color signal changes as the subject distance changes, this generation processing is executed separately for different first, second, third,... Subject distances. . Although subjects having various subject distances appear in the entire image area of the original image, the subject distance of each subject is estimated by the extraction / estimation unit 15 in FIG.

図7(b)において、曲線410は、中間生成画像のB、G及びR信号における解像度の被写体距離依存性、即ち、色信号B1、G1及びR1における解像度の被写体距離依存性を表している。曲線410は、第1の被写体距離における色信号B0、G0及びR0の解像度の最大値、第2の被写体距離における色信号B0、G0及びR0の解像度の最大値、第3の被写体距離における色信号B0、G0及びR0の解像度の最大値、・・・を繋ぎ合わせたような曲線となる。中間生成画像の合焦範囲(被写界深度)は、原画像のそれよりも大きく、中間生成画像の合焦範囲(被写界深度)内に距離DDB、DDG及びDDRが包含される。 In FIG. 7B, a curve 410 represents the subject distance dependency of the resolution in the B, G, and R signals of the intermediate generated image, that is, the subject distance dependency of the resolution in the color signals B1, G1, and R1. A curve 410 indicates the maximum resolution of the color signals B0, G0, and R0 at the first subject distance, the maximum resolution of the color signals B0, G0, and R0 at the second subject distance, and the color signal at the third subject distance. A curve is formed by connecting the maximum resolution values of B0, G0, and R0,... The focus range (depth of field) of the intermediate generation image is larger than that of the original image, and the distances DD B , DD G and DD R are included in the focus range (depth of field) of the intermediate generation image. The

中間生成画像を生成する一方で、ユーザの指示などに基づき、図7(c)に示すような被写界深度曲線420を設定する。図6の被写界深度制御部17は、補正画像のB、G及びR信号における解像度の被写体距離依存性を表す曲線が被写界深度曲線420と概ね同じとなるように、中間生成画像のB、G及びR信号を補正する。図7(d)の実線曲線430は、この補正により得られた補正画像のB、G及びR信号における解像度の被写体距離依存性、即ち、色信号B2、G2及びR2における解像度の被写体距離依存性を表している。被写界深度曲線420を適切に設定すれば、合焦範囲の狭い補正画像(被写界深度の浅い補正画像)を生成することができる。即ち、所望の被写体距離の被写体にのみピントが合い、他の被写体距離の被写体がぼけたような補正画像を生成することができる。   While generating the intermediate generation image, a depth-of-field curve 420 as shown in FIG. 7C is set based on a user instruction or the like. The depth-of-field control unit 17 in FIG. 6 adjusts the intermediate generated image so that the curve representing the subject distance dependency of the resolution in the B, G, and R signals of the corrected image is substantially the same as the depth-of-field curve 420. The B, G, and R signals are corrected. A solid line curve 430 in FIG. 7D shows the subject distance dependency of the resolution in the B, G, and R signals of the corrected image obtained by this correction, that is, the subject distance dependency of the resolution in the color signals B2, G2, and R2. Represents. If the depth-of-field curve 420 is appropriately set, a corrected image with a narrow focus range (a corrected image with a shallow depth of field) can be generated. That is, it is possible to generate a corrected image in which only a subject at a desired subject distance is in focus and a subject at another subject distance is blurred.

色信号B0、G0及びR0から色信号B1、G1及びR1を生成する方法の原理について補足説明を行う。色信号B0、G0、R0、B1、G1及びR1を被写体距離Dの関数とみなし、それらを夫々、B0(D)、G0(D)、R0(D)、B1(D)、G1(D)及びR1(D)と表記する。色信号G0(D)は、高域成分Gh(D)と低域成分GL(D)に分離することができる。同様に、色信号B0(D)は高域成分Bh(D)と低域成分BL(D)に分離することができ、色信号R0(D)は高域成分Rh(D)と低域成分RL(D)に分離することができる。即ち、
G0(D)=Gh(D)+GL(D)、
B0(D)=Bh(D)+BL(D)、
R0(D)=Rh(D)+RL(D)、
が成り立つ。
The principle of the method for generating the color signals B1, G1 and R1 from the color signals B0, G0 and R0 will be supplementarily described. The color signals B0, G0, R0, B1, G1, and R1 are regarded as functions of the subject distance D, and these are respectively B0 (D), G0 (D), R0 (D), B1 (D), and G1 (D). And R1 (D). The color signal G0 (D) can be separated into a high frequency component Gh (D) and a low frequency component GL (D). Similarly, the color signal B0 (D) can be separated into a high frequency component Bh (D) and a low frequency component BL (D), and the color signal R0 (D) is divided into a high frequency component Rh (D) and a low frequency component. It can be separated into RL (D). That is,
G0 (D) = Gh (D) + GL (D),
B0 (D) = Bh (D) + BL (D),
R0 (D) = Rh (D) + RL (D),
Holds.

光学系10に軸上色収差がなかったと仮定したならば、局所的には色の変化が少ないという画像の性質から、通常、下記式(1)が成り立つと共に下記式(2)も成り立つ。これは、任意の被写体距離に対して成り立つ。実空間上における被写体は様々な色成分を有しているが、被写体が有する色成分を局所的に見た場合、微小領域内では輝度は変化するものの色は殆ど変化しないことが多い。例えば、緑の葉の色成分を或る方向に走査した時、葉の模様によって輝度は変化するものの色(色相など)は殆ど変化しない。故に、光学系10に軸上色収差がなかったと仮定したならば、式(1)及び(2)が成り立つことが多い。
Gh(D)/Bh(D)=GL(D)/BL(D) …(1)
Gh(D)/GL(D)=Bh(D)/BL(D)=Rh(D)/RL(D) …(2)
If it is assumed that the optical system 10 has no axial chromatic aberration, the following equation (1) and the following equation (2) are usually satisfied from the property of the image that the color change is small locally. This is true for any subject distance. The subject in the real space has various color components. However, when the color component of the subject is viewed locally, the brightness changes in a minute region, but the color hardly changes. For example, when the color component of a green leaf is scanned in a certain direction, the color (hue etc.) hardly changes although the luminance changes depending on the leaf pattern. Therefore, if it is assumed that the optical system 10 has no axial chromatic aberration, equations (1) and (2) often hold.
Gh (D) / Bh (D) = GL (D) / BL (D) (1)
Gh (D) / GL (D) = Bh (D) / BL (D) = Rh (D) / RL (D) (2)

一方、実際には光学系10に軸上色収差が存在するため、任意の被写体距離に対して、色信号B0(D)、G0(D)及びR0(D)の高域成分は互いに異なる。逆に考えれば、或る被写体距離に対して大きな高域成分を有する1つの色信号を用いて、他の2つの色信号の高域成分を補うことができる。例えば、今、図8に示す如く、色信号G0(D)の解像度が最大値をとる被写体距離がD1であるとし、D1よりも大きな或る被写体距離をD2とする。また、図9に示す如く、被写体距離D1の被写体SUB1の画像データが存在する、原画像中の部分画像領域を符号441によって表し、被写体距離D2の被写体SUB2の画像データが存在する、原画像中の部分画像領域を符号442によって表す。原画像、中間生成画像又は補正画像などの、任意の画像の全体画像領域の一部を部分画像領域と呼ぶ。部分画像領域441及び442には、夫々、被写体SUB1及びSUB2の画像が現れる。 On the other hand, since the axial chromatic aberration actually exists in the optical system 10, the high frequency components of the color signals B0 (D), G0 (D), and R0 (D) are different from each other for an arbitrary subject distance. In other words, the high frequency components of the other two color signals can be supplemented by using one color signal having a large high frequency component for a certain subject distance. For example, now, as shown in FIG. 8, the resolution of a color signal G0 (D) is the object distance to take a maximum value and a D 1, and D 2 large certain object distance than D 1. Further, as shown in FIG. 9, the partial image area in the original image where the image data of the subject SUB 1 with the subject distance D 1 exists is represented by reference numeral 441, and the image data of the subject SUB 2 with the subject distance D 2 exists. A partial image area in the original image is represented by reference numeral 442. A part of an entire image area of an arbitrary image such as an original image, an intermediate generation image, or a corrected image is referred to as a partial image area. Images of the subjects SUB 1 and SUB 2 appear in the partial image areas 441 and 442, respectively.

部分画像領域441におけるG信号、即ちG0(D1)(=Gh(D1)+GL(D1))には高域成分が多く含まれることになるが、軸上色収差に由来して、部分画像領域441におけるB信号及びR信号、即ちB0(D1)(=Bh(D1)+BL(D1))及びR0(D1)(=Rh(D1)+RL(D1))に含まれる高域成分は少ない。この部分画像領域441におけるB及びR信号の高域成分を、部分画像領域441におけるG信号の高域成分を用いて生成する。生成された部分画像領域441におけるB及びR信号の高域成分を夫々Bh’(D1)及びRh’(D1)にて表すとすると、Bh’(D1)及びRh’(D1)は下記式(3)及び(4)によって求められる。
Bh’(D1)=BL(D1)×Gh(D1)/GL(D1) …(3)
Rh’(D1)=RL(D1)×Gh(D1)/GL(D1) …(4)
The G signal in the partial image area 441, that is, G0 (D 1 ) (= Gh (D 1 ) + GL (D 1 )) contains a lot of high frequency components. B and R signals in the image area 441, i.e., contained in B0 (D 1) (= Bh (D 1) + BL (D 1)) and R0 (D 1) (= Rh (D 1) + RL (D 1)) There are few high frequency components. The high frequency components of the B and R signals in the partial image area 441 are generated using the high frequency components of the G signal in the partial image area 441. When representing the high frequency component of the B and R signals in the generated partial image region 441 at each Bh '(D 1) and Rh' (D 1), Bh '(D 1) and Rh' (D 1) Is obtained by the following equations (3) and (4).
Bh ′ (D 1 ) = BL (D 1 ) × Gh (D 1 ) / GL (D 1 ) (3)
Rh ′ (D 1 ) = RL (D 1 ) × Gh (D 1 ) / GL (D 1 ) (4)

光学系10に軸上色収差がなかったならば上記式(1)及び(2)より「Bh(D1)=BL(D1)×Gh(D1)/GL(D1)」及び「Rh(D1)=RL(D1)×Gh(D1)/GL(D1)」が成立すると考えられるが、実在する光学系10の軸上色収差により、被写体距離D1に関しては原画像のB及びR信号から高域成分Bh(D1)及びRh(D1)が欠落している。この欠落分を、上記式(3)及び(4)によって生成する。 If there is no axial chromatic aberration in the optical system 10, “Bh (D 1 ) = BL (D 1 ) × Gh (D 1 ) / GL (D 1 )” and “Rh” from the above formulas (1) and (2). (D 1 ) = RL (D 1 ) × Gh (D 1 ) / GL (D 1 ) ”is considered to hold, but due to the longitudinal chromatic aberration of the optical system 10 that actually exists, the subject distance D 1 The high frequency components Bh (D 1 ) and Rh (D 1 ) are missing from the B and R signals. This missing portion is generated by the above formulas (3) and (4).

尚、実際には、B0(D1)の高域成分Bh(D1)及びR0(D1)の高域成分Rh(D1)は少ないため、B0(D1)≒BL(D1)且つR0(D1)≒RL(D1)とみなすことができる。故に、被写体距離D1に関しては、式(5)及び(6)に従い、B0(D1)、R0(D1)及びGh(D1)/GL(D1)を用いてB1(D1)及びR1(D1)を求めることで高域成分を含む信号B1及びR1を生成する。G1(D1)は、式(7)に示す如く、G0(D1)そのものとされる。
B1(D1)=BL(D1)+Bh’(D1
≒B0(D1)+B0(D1)×Gh(D1)/GL(D1) …(5)
R1(D1)=RL(D1)+Rh’(D1
≒R0(D1)+R0(D1)×Gh(D1)/GL(D1) …(6)
G1(D1)=G0(D1) …(7)
In practice, B0 order (D 1) high frequency component Bh of (D 1) and R0 (D 1) of the high frequency component Rh (D 1) is small, B0 (D 1) ≒ BL (D 1) R0 (D 1 ) ≈RL (D 1 ). Thus, with respect to the object distance D 1, the formula (5) and in accordance with (6), B0 (D 1 ), R0 (D 1) and Gh (D 1) / GL ( D 1) using B1 (D 1) And R1 (D 1 ) are obtained to generate signals B1 and R1 including high frequency components. G1 (D 1 ) is G0 (D 1 ) itself as shown in the equation (7).
B1 (D 1 ) = BL (D 1 ) + Bh ′ (D 1 )
≒ B0 (D 1) + B0 (D 1) × Gh (D 1) / GL (D 1) ... (5)
R1 (D 1 ) = RL (D 1 ) + Rh ′ (D 1 )
≒ R0 (D 1 ) + R0 (D 1 ) × Gh (D 1 ) / GL (D 1 ) (6)
G1 (D 1 ) = G0 (D 1 ) (7)

G信号が多くの高域成分を含むこととなる部分画像領域441に注目して信号B1、G1及びR1の生成方法を説明したが、B又はR信号が多くの高域成分を含む部分画像領域に対しても同様の生成処理がなされる。   The method for generating the signals B1, G1, and R1 has been described by focusing on the partial image region 441 in which the G signal includes many high-frequency components. However, the partial image region in which the B or R signal includes many high-frequency components. The same generation process is performed for.

[高域成分抽出、距離推定、被写界深度拡大]
上述の原理に基づく処理を担う部位の詳細構成例を説明する。図10は、図6に示される抽出/推定部15及び拡大処理部16の内部ブロック図である。原画像の色信号G0、R0及びB0が、抽出/推定部15及び拡大処理部16に入力される。抽出/推定部15は、HPF(ハイパスフィルタ)51G、51R及び51B、LPF(ローパスフィルタ)52G、52R及び52B、最大値検出部53、被写体距離推定部54、選択部55並びに演算部56を備える。拡大処理部16は、選択部61G、61R及び61B並びに演算部62を備える。
[High-frequency component extraction, distance estimation, depth of field expansion]
A detailed configuration example of a part responsible for processing based on the above principle will be described. FIG. 10 is an internal block diagram of the extraction / estimation unit 15 and the enlargement processing unit 16 shown in FIG. Color signals G0, R0, and B0 of the original image are input to the extraction / estimation unit 15 and the enlargement processing unit 16. The extraction / estimation unit 15 includes HPFs (High Pass Filters) 51G, 51R and 51B, LPFs (Low Pass Filters) 52G, 52R and 52B, a maximum value detection unit 53, a subject distance estimation unit 54, a selection unit 55, and a calculation unit 56. . The enlargement processing unit 16 includes selection units 61G, 61R, and 61B and a calculation unit 62.

原画像、中間生成画像又は補正画像などの、任意の二次元画像は、水平及び垂直方向に複数の画素がマトリクス状に配列されて形成されており、図11(a)〜(c)に示す如く、その二次元画像上の注目画素の位置を(x,y)にて表す。x及びyは、夫々、注目画素の水平及び垂直方向の座標値を表す。そして、原画像の画素位置(x,y)における色信号G0、R0及びB0を夫々G0(x,y)、R0(x,y)及びB0(x,y)にて表し、中間生成画像の画素位置(x,y)における色信号G1、R1及びB1を夫々G1(x,y)、R1(x,y)及びB1(x,y)にて表し、補正画像の画素位置(x,y)における色信号G2、R2及びB2を夫々G2(x,y)、R2(x,y)及びB2(x,y)にて表す。   An arbitrary two-dimensional image such as an original image, an intermediate generation image, or a corrected image is formed by arranging a plurality of pixels in a matrix in the horizontal and vertical directions, as shown in FIGS. Thus, the position of the pixel of interest on the two-dimensional image is represented by (x, y). x and y represent the horizontal and vertical coordinate values of the pixel of interest, respectively. The color signals G0, R0, and B0 at the pixel position (x, y) of the original image are represented by G0 (x, y), R0 (x, y), and B0 (x, y), respectively. The color signals G1, R1, and B1 at the pixel position (x, y) are represented by G1 (x, y), R1 (x, y), and B1 (x, y), respectively, and the pixel position (x, y of the corrected image) ) Are represented by G2 (x, y), R2 (x, y) and B2 (x, y), respectively.

HPF51G、51R及び51Gは、同一構成及び同一特性を有する、二次元の空間フィルタである。HPF51G、51R及び51Gは、入力信号G0、R0及びB0をフィルタリングすることによって、信号G0、R0及びB0に含まれる所定の高域成分Gh、Rh及びBhを抽出する。画素位置(x,y)に対して抽出された高域成分Gh、Rh及びBhを、夫々、Gh(x,y)、Rh(x,y)及びBh(x,y)にて表す。   HPFs 51G, 51R, and 51G are two-dimensional spatial filters having the same configuration and the same characteristics. The HPFs 51G, 51R, and 51G extract predetermined high frequency components Gh, Rh, and Bh included in the signals G0, R0, and B0 by filtering the input signals G0, R0, and B0. The high frequency components Gh, Rh and Bh extracted for the pixel position (x, y) are represented by Gh (x, y), Rh (x, y) and Bh (x, y), respectively.

空間フィルタは、空間フィルタに対する入力信号をフィルタリングすることにより得た信号を出力する。空間フィルタによるフィルタリングとは、注目画素位置(x,y)における入力信号と注目画素位置(x,y)の周辺位置における入力信号とを用いて空間フィルタの出力信号を得る操作を指す。注目画素位置(x,y)における入力信号の値をIIN(x,y)にて表し、注目画素位置(x,y)に対する空間フィルタの出力信号をIO(x,y)にて表した場合、両者は下記式(8)の関係を満たす。h(u,v)は、空間フィルタの位置(u,v)におけるフィルタ係数を表す。式(8)に従う空間フィルタのフィルタサイズは(2w+1)×(2w+1)である。wは自然数である。 The spatial filter outputs a signal obtained by filtering an input signal to the spatial filter. The filtering by the spatial filter refers to an operation for obtaining the output signal of the spatial filter using the input signal at the target pixel position (x, y) and the input signal at the peripheral position of the target pixel position (x, y). The value of the input signal at the target pixel position (x, y) is represented by I IN (x, y), and the output signal of the spatial filter for the target pixel position (x, y) is represented by I O (x, y). In this case, both satisfy the relationship of the following formula (8). h (u, v) represents a filter coefficient at the position (u, v) of the spatial filter. The filter size of the spatial filter according to Equation (8) is (2w + 1) × (2w + 1). w is a natural number.

Figure 2010081002
Figure 2010081002

HPF51Gは、ラプラシアンフィルタなどの、入力信号の高域成分を抽出して出力する空間フィルタであり、注目画素位置(x,y)における入力信号G0(x,y)と注目画素位置(x,y)の周辺位置における入力信号(G0(x+1,y+1)などを含む)を用いて、注目画素位置(x,y)に対する出力信号Gh(x,y)を得る。HPF51R及び51Bについても同様である。   The HPF 51G is a spatial filter that extracts and outputs a high frequency component of an input signal, such as a Laplacian filter, and inputs the input signal G0 (x, y) and the target pixel position (x, y) at the target pixel position (x, y). ) Is used to obtain an output signal Gh (x, y) for the target pixel position (x, y) using input signals (including G0 (x + 1, y + 1) and the like). The same applies to HPF 51R and 51B.

LPF52G、52R及び52Gは、同一構成及び同一特性を有する、二次元の空間フィルタである。LPF52G、52R及び52Gは、入力信号G0、R0及びB0をフィルタリングすることによって、信号G0、R0及びB0に含まれる所定の低域成分GL、RL及びBLを抽出する。画素位置(x,y)に対して抽出された低域成分GL、RL及びBLを、夫々、GL(x,y)、RL(x,y)及びBL(x,y)にて表す。「GL(x,y)=G0(x,y)−Gh(x,y)、RL(x,y)=R0(x,y)−Rh(x,y)及びBL(x,y)=B0(x,y)−Bh(x,y)」に従って、低域成分GL(x,y)、RL(x,y)及びBL(x,y)を求めるようにしてもよい。   The LPFs 52G, 52R and 52G are two-dimensional spatial filters having the same configuration and the same characteristics. The LPFs 52G, 52R, and 52G extract predetermined low-frequency components GL, RL, and BL included in the signals G0, R0, and B0 by filtering the input signals G0, R0, and B0. The low frequency components GL, RL, and BL extracted for the pixel position (x, y) are represented by GL (x, y), RL (x, y), and BL (x, y), respectively. “GL (x, y) = G0 (x, y) −Gh (x, y), RL (x, y) = R0 (x, y) −Rh (x, y) and BL (x, y) = The low frequency components GL (x, y), RL (x, y), and BL (x, y) may be obtained according to “B0 (x, y) −Bh (x, y)”.

演算部56は、色信号ごとに且つ画素位置ごとに、上述のようにして得られた高域成分を低域成分にて正規化することにより、値Gh(x,y)/GL(x,y)、Rh(x,y)/RL(x,y)及びBh(x,y)/BL(x,y)を求める。更に、色信号ごとに且つ画素位置ごとに、それらの絶対値Ghh(x,y)=|Gh(x,y)/GL(x,y)|、Rhh(x,y)=|Rh(x,y)/RL(x,y)|、及び、Bhh(x,y)=|Bh(x,y)/BL(x,y)|も求める。   The calculation unit 56 normalizes the high frequency component obtained as described above with the low frequency component for each color signal and for each pixel position, thereby obtaining the value Gh (x, y) / GL (x, y), Rh (x, y) / RL (x, y) and Bh (x, y) / BL (x, y) are obtained. Further, for each color signal and for each pixel position, their absolute values Ghh (x, y) = | Gh (x, y) / GL (x, y) |, Rhh (x, y) = | Rh (x , Y) / RL (x, y) | and Bhh (x, y) = | Bh (x, y) / BL (x, y) |

演算部56にて得られる信号Ghh、Rhh及びBhhと被写体距離との関係を図12に示す。絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)は、夫々信号Ghh、Rhh及びBhhの位置(x,y)における値である。曲線450G、450R及び450Bは、夫々、被写体距離の変化に対して信号Ghh、Rhh及びBhhがどのように変化していくかをプロットしたものである。図7(a)の曲線400Gと図12の曲線450Gとの比較から分かるように、信号Ghhの被写体距離依存性は、信号G0の解像度の被写体距離依存性と同一又は類似している(信号Rhh及びBhhについても同様)。信号G0の解像度の増減に連動して、信号G0の高域成分Gh及びそれの絶対値に比例する信号Ghhも増減するからである。   FIG. 12 shows the relationship between the signals Ghh, Rhh, and Bhh obtained by the calculation unit 56 and the subject distance. The absolute values Ghh (x, y), Rhh (x, y) and Bhh (x, y) are values at the positions (x, y) of the signals Ghh, Rhh and Bhh, respectively. Curves 450G, 450R, and 450B are plots of how the signals Ghh, Rhh, and Bhh change with respect to changes in the subject distance, respectively. As can be seen from the comparison between the curve 400G in FIG. 7A and the curve 450G in FIG. 12, the subject distance dependency of the signal Ghh is the same as or similar to the subject distance dependency of the resolution of the signal G0 (signal Rhh). And Bhh). This is because the high-frequency component Gh of the signal G0 and the signal Ghh proportional to the absolute value thereof also increase / decrease in conjunction with the increase / decrease of the resolution of the signal G0.

低域成分による正規化を行うことなく、Ghh(x,y)=|Gh(x,y)|、Rhh(x,y)=|Rh(x,y)|、及び、Bhh(x,y)=|Bh(x,y)|に従って絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)を求めることも可能ではあるが、この場合は、被写体の色に依存して絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)の大小関係が変化しうる。故に、Ghh(x,y)=|Gh(x,y)/GL(x,y)|、Rhh(x,y)=|Rh(x,y)/RL(x,y)|、及び、Bhh(x,y)=|Bh(x,y)/BL(x,y)|に従って、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)を求めることが望ましい。   Without performing normalization with low frequency components, Ghh (x, y) = | Gh (x, y) |, Rhh (x, y) = | Rh (x, y) |, and Bhh (x, y ) = | Bh (x, y) |, absolute values Ghh (x, y), Rhh (x, y) and Bhh (x, y) can be obtained according to the color of the subject. Depending on the magnitude of the absolute values Ghh (x, y), Rhh (x, y), and Bhh (x, y) may vary. Therefore, Ghh (x, y) = | Gh (x, y) / GL (x, y) |, Rhh (x, y) = | Rh (x, y) / RL (x, y) |, and Obtaining absolute values Ghh (x, y), Rhh (x, y) and Bhh (x, y) according to Bhh (x, y) = | Bh (x, y) / BL (x, y) | desirable.

最大値検出部53は、画素位置ごとに、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)の内の最大値を特定し、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)の内、何れが最大であるかを表す信号SEL_GRB(x,y)を出力する。絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)の内、Bhh(x,y)が最大である場合をケース1と呼び、Ghh(x,y)が最大である場合をケース2と呼び、Rhh(x,y)が最大である場合をケース3と呼ぶ。   The maximum value detection unit 53 specifies the maximum value among the absolute values Ghh (x, y), Rhh (x, y), and Bhh (x, y) for each pixel position, and the absolute value Ghh (x, y). ), Rhh (x, y) and Bhh (x, y), a signal SEL_GRB (x, y) indicating which is the maximum is output. Of the absolute values Ghh (x, y), Rhh (x, y), and Bhh (x, y), the case where Bhh (x, y) is the maximum is referred to as case 1, and Ghh (x, y) is the maximum. Is called Case 2, and the case where Rhh (x, y) is maximum is called Case 3.

被写体距離推定部54は、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)に基づいて、画素位置(x,y)における被写体の被写体距離DIST(x,y)を推定する。この推定方法を、図13を参照して説明する。被写体距離推定部54では、まず、0<DA<DBを満たす、2つの被写体距離DA及びDBが予め定義される。被写体距離推定部54は、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)の内、何れが最大であるかに応じて被写体距離の推定方法を変更する。 The subject distance estimation unit 54 calculates the subject distance DIST (x, y) of the subject at the pixel position (x, y) based on the absolute values Ghh (x, y), Rhh (x, y), and Bhh (x, y). ). This estimation method will be described with reference to FIG. In the subject distance estimation unit 54, first, 0 <satisfy D A <D B, 2 two object distances D A and D B are defined in advance. The subject distance estimation unit 54 changes the subject distance estimation method according to which of the absolute values Ghh (x, y), Rhh (x, y), and Bhh (x, y) is the maximum.

ケース1においては、画素位置(x,y)における被写体の被写体距離は比較的小さいと判断して、0<DIST(x,y)<DAが満たされる範囲内で、Rhh(x,y)/Ghh(x,y)から推定被写体距離DIST(x,y)を求める。図13の線分461は、ケース1における、Rhh(x,y)/Ghh(x,y)と推定被写体距離DIST(x,y)の関係を示している。Bhh(x,y)が最大となるケース1においては、図12に示す如く、画素(x,y)に対応する被写体距離が増大するにつれてGhh(x,y)及びRhh(x,y)が共に増大するが、被写体距離の増大に対するGhh(x,y)及びRhh(x,y)の増大の程度は、Ghh(x,y)の方が高いと考えられる。従って、ケース1においては、Rhh(x,y)/Ghh(x,y)が減少につれてDIST(x,y)が増大するように推定被写体距離DIST(x,y)を求める。 In case 1, it is determined that the subject distance of the object is relatively small at the pixel position (x, y), 0 < DIST (x, y) < Within the D A is satisfied, Rhh (x, y) / Ghh (x, y) is used to determine the estimated subject distance DIST (x, y). A line segment 461 in FIG. 13 shows the relationship between Rhh (x, y) / Ghh (x, y) and the estimated subject distance DIST (x, y) in Case 1. In case 1 where Bhh (x, y) is maximum, as shown in FIG. 12, Ghh (x, y) and Rhh (x, y) increase as the subject distance corresponding to the pixel (x, y) increases. Although both increase, it is considered that the degree of increase in Ghh (x, y) and Rhh (x, y) with respect to the increase in the subject distance is higher in Ghh (x, y). Accordingly, in case 1, the estimated subject distance DIST (x, y) is obtained so that DIST (x, y) increases as Rhh (x, y) / Ghh (x, y) decreases.

ケース2においては、画素位置(x,y)における被写体の被写体距離は中程度であると判断して、DA≦DIST(x,y)<DBが満たされる範囲内で、Bhh(x,y)/Rhh(x,y)から推定被写体距離DIST(x,y)を求める。図13の線分462は、ケース2における、Bhh(x,y)/Rhh(x,y)と推定被写体距離DIST(x,y)の関係を示している。Ghh(x,y)が最大となるケース2においては、図12に示す如く、画素(x,y)に対応する被写体距離が増大するにつれてBhh(x,y)が減少する一方でRhh(x,y)が増大する。従って、ケース2においては、Rhh(x,y)/Ghh(x,y)が減少につれてDIST(x,y)が増大するように推定被写体距離DIST(x,y)を求める。 In Case 2, it is determined that the subject distance of the subject at the pixel position (x, y) is medium, and Bhh (x, y) within a range where D A ≦ DIST (x, y) <D B is satisfied. y) Estimated subject distance DIST (x, y) is obtained from / Rhh (x, y). A line segment 462 in FIG. 13 shows the relationship between Bhh (x, y) / Rhh (x, y) and the estimated subject distance DIST (x, y) in Case 2. In case 2 where Ghh (x, y) is maximum, as shown in FIG. 12, Bhh (x, y) decreases while Rhh (x, y) decreases as the subject distance corresponding to pixel (x, y) increases. , Y) increases. Therefore, in case 2, the estimated subject distance DIST (x, y) is obtained so that DIST (x, y) increases as Rhh (x, y) / Ghh (x, y) decreases.

ケース3においては、画素位置(x,y)における被写体の被写体距離は比較的大きいと判断して、DB<DIST(x,y)が満たされる範囲内で、Bhh(x,y)/Ghh(x,y)から推定被写体距離DIST(x,y)を求める。図13の線分463は、ケース3における、Bhh(x,y)/Ghh(x,y)と推定被写体距離DIST(x,y)の関係を示している。Rhh(x,y)が最大となるケース3においては、図12に示す如く、画素(x,y)に対応する被写体距離が増大するにつれてGhh(x,y)及びBhh(x,y)が共に減少するが、被写体距離の増大に対するGhh(x,y)及びBhh(x,y)の減少の程度は、Ghh(x,y)の方が高いと考えられる。従って、ケース3においては、Bhh(x,y)/Ghh(x,y)が増大につれてDIST(x,y)が増大するように推定被写体距離DIST(x,y)を求める。 In Case 3, it is determined that the subject distance of the subject at the pixel position (x, y) is relatively large, and Bhh (x, y) / Ghh is within a range where D B <DIST (x, y) is satisfied. Estimated subject distance DIST (x, y) is obtained from (x, y). A line segment 463 in FIG. 13 shows the relationship between Bhh (x, y) / Ghh (x, y) and the estimated subject distance DIST (x, y) in Case 3. In case 3 where Rhh (x, y) is maximum, as shown in FIG. 12, Ghh (x, y) and Bhh (x, y) increase as the subject distance corresponding to the pixel (x, y) increases. Although both decrease, it is considered that Ghh (x, y) has a higher degree of decrease in Ghh (x, y) and Bhh (x, y) as the subject distance increases. Therefore, in case 3, the estimated subject distance DIST (x, y) is determined so that DIST (x, y) increases as Bhh (x, y) / Ghh (x, y) increases.

このように、被写体距離推定部54は、色信号G0、R0及びB0に含まれる高域成分Gh、Rh及びBhの大きさに応じた値、即ち、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)に基づいて、原画像の各位置における被写体の被写体距離を推定する。DIST(x,y)は画素位置(x,y)に対して求められる推定被写体距離である。全ての画素位置に対する推定被写体距離を包含する情報を被写体距離情報DISTと呼ぶ。   As described above, the subject distance estimation unit 54 determines values corresponding to the magnitudes of the high frequency components Gh, Rh, and Bh included in the color signals G0, R0, and B0, that is, absolute values Ghh (x, y), Rhh ( Based on x, y) and Bhh (x, y), the subject distance of the subject at each position of the original image is estimated. DIST (x, y) is an estimated subject distance obtained for the pixel position (x, y). Information including estimated subject distances for all pixel positions is referred to as subject distance information DIST.

選択部55は、演算部56にて算出される値Gh(x,y)/GL(x,y)、Rh(x,y)/RL(x,y)及びBh(x,y)/BL(x,y)の内の1つを信号SEL_GRB(x,y)に基づいて選択し、選択値をH(x,y)/L(x,y)として出力する。具体的には、
Bhh(x,y)が最大となるケース1においては、Bh(x,y)/BL(x,y)をH(x,y)/L(x,y)として出力し、
Ghh(x,y)が最大となるケース2においては、Gh(x,y)/GL(x,y)をH(x,y)/L(x,y)として出力し、
Rhh(x,y)が最大となるケース3においては、Rh(x,y)/RL(x,y)をH(x,y)/L(x,y)として出力する。
The selection unit 55 calculates values Gh (x, y) / GL (x, y), Rh (x, y) / RL (x, y), and Bh (x, y) / BL calculated by the calculation unit 56. One of (x, y) is selected based on the signal SEL_GRB (x, y), and the selected value is output as H (x, y) / L (x, y). In particular,
In case 1 where Bhh (x, y) is maximum, Bh (x, y) / BL (x, y) is output as H (x, y) / L (x, y),
In case 2 where Ghh (x, y) is maximum, Gh (x, y) / GL (x, y) is output as H (x, y) / L (x, y),
In case 3 where Rhh (x, y) is maximum, Rh (x, y) / RL (x, y) is output as H (x, y) / L (x, y).

拡大処理部16には、原画像の色信号G0(x,y)、R0(x,y)及びB0(x,y)と信号H(x,y)/L(x,y)とが与えられる。選択部61G、61R及び61Bは、第1及び第2入力信号の内の一方を信号SEL_GRB(x,y)に基づいて選択し、選択した信号をG1(x,y)、R1(x,y)及びB1(x,y)として出力する。選択部61G、61R及び61Bの第1入力信号は、夫々、G0(x,y)、R0(x,y)及びB0(x,y)であり、選択部61G、61R及び61Bの第2入力信号は、夫々、演算部62にて求められる「G0(x,y)+G0(x,y)×H(x,y)/L(x,y)」、「R0(x,y)+R0(x,y)×H(x,y)/L(x,y)」及び「B0(x,y)+B0(x,y)×H(x,y)/L(x,y)」である。   The enlargement processing unit 16 is supplied with color signals G0 (x, y), R0 (x, y) and B0 (x, y) of the original image and a signal H (x, y) / L (x, y). It is done. The selectors 61G, 61R, and 61B select one of the first and second input signals based on the signal SEL_GRB (x, y), and select the selected signals as G1 (x, y), R1 (x, y ) And B1 (x, y). The first input signals of the selection units 61G, 61R, and 61B are G0 (x, y), R0 (x, y), and B0 (x, y), respectively, and the second inputs of the selection units 61G, 61R, and 61B. The signals are “G0 (x, y) + G0 (x, y) × H (x, y) / L (x, y)”, “R0 (x, y) + R0 ( x, y) × H (x, y) / L (x, y) ”and“ B0 (x, y) + B0 (x, y) × H (x, y) / L (x, y) ”. .

Bhh(x,y)が最大となるケース1においては、
G1(x,y)=G0(x,y)+G0(x,y)×H(x,y)/L(x,y)、
R1(x,y)=R0(x,y)+R0(x,y)×H(x,y)/L(x,y)且つ
B1(x,y)=B0(x,y)、
となるように選択部61G、61R及び61Bの選択処理がなされ、
Ghh(x,y)が最大となるケース2においては、
G1(x,y)=G0(x,y)、
R1(x,y)=R0(x,y)+R0(x,y)×H(x,y)/L(x,y)且つ
B1(x,y)=B0(x,y)+B0(x,y)×H(x,y)/L(x,y)
となるように選択部61G、61R及び61Bの選択処理がなされ、
Rhh(x,y)が最大となるケース3においては、
G1(x,y)=G0(x,y)+G0(x,y)×H(x,y)/L(x,y)、
R1(x,y)=R0(x,y)且つ
B1(x,y)=B0(x,y)+B0(x,y)×H(x,y)/L(x,y)
となるように選択部61G、61R及び61Bの選択処理がなされる。
In case 1 where Bhh (x, y) is maximum,
G1 (x, y) = G0 (x, y) + G0 (x, y) × H (x, y) / L (x, y),
R1 (x, y) = R0 (x, y) + R0 (x, y) × H (x, y) / L (x, y) and B1 (x, y) = B0 (x, y),
Selection processing of the selection units 61G, 61R, and 61B is performed so that
In case 2 where Ghh (x, y) is maximum,
G1 (x, y) = G0 (x, y),
R1 (x, y) = R0 (x, y) + R0 (x, y) × H (x, y) / L (x, y) and B1 (x, y) = B0 (x, y) + B0 (x , Y) × H (x, y) / L (x, y)
Selection processing of the selection units 61G, 61R, and 61B is performed so that
In case 3 where Rhh (x, y) is maximum,
G1 (x, y) = G0 (x, y) + G0 (x, y) × H (x, y) / L (x, y),
R1 (x, y) = R0 (x, y) and B1 (x, y) = B0 (x, y) + B0 (x, y) × H (x, y) / L (x, y)
Selection processing of the selection units 61G, 61R, and 61B is performed so that

例えば、注目した画素位置(x,y)が図9の部分画素領域441内の画素位置である場合(図8も参照)、絶対値Ghh(x,y)、Rhh(x,y)及びBhh(x,y)の内、Ghh(x,y)が最大となる。故にこの場合は、H(x,y)/L(x,y)=Gh(x,y)/GL(x,y)となるため、被写体距離D1に対応する画素位置(x,y)に対しては、
G1(x,y)=G0(x,y)、
R1(x,y)=R0(x,y)+R0(x,y)×Gh(x,y)/GL(x,y)、且つ
B1(x,y)=B0(x,y)+B0(x,y)×Gh(x,y)/GL(x,y)、となる。この3つの式は、上記式(5)〜(7)における“(D1)”を“(x,y)”に置き換えたものに等しい。
For example, when the focused pixel position (x, y) is a pixel position in the partial pixel region 441 in FIG. 9 (see also FIG. 8), the absolute values Ghh (x, y), Rhh (x, y), and Bhh Among (x, y), Ghh (x, y) is the maximum. Therefore, in this case, since H (x, y) / L (x, y) = Gh (x, y) / GL (x, y), the pixel position (x, y) corresponding to the subject distance D 1 For
G1 (x, y) = G0 (x, y),
R1 (x, y) = R0 (x, y) + R0 (x, y) × Gh (x, y) / GL (x, y) and B1 (x, y) = B0 (x, y) + B0 ( x, y) × Gh (x, y) / GL (x, y). These three equations are equivalent to those obtained by replacing “(D 1 )” in the above equations (5) to (7) with “(x, y)”.

図14は、図6に示される被写界深度制御部17の内部ブロック図である。図14の被写界深度制御部17は、可変LPF部71と、カットオフ周波数制御部72と、を備える。可変LPF部71には、カットオフ周波数を可変設定することが可能に形成された3つの可変LPF(ローパスフィルタ)71G、71R及び71Bが備えられており、カットオフ周波数制御部72が、被写体距離情報DIST及び被写界深度設定情報に基づいて可変LPF71G、71R及び71Bのカットオフ周波数を制御する。信号G1、R1及びB1を、可変LPF71G、71R及び71Bに入力することにより、可変LPF71G、71R及び71Bから、補正画像を表す色信号G2、R2及びB2が得られる。   FIG. 14 is an internal block diagram of the depth of field control unit 17 shown in FIG. The depth of field control unit 17 in FIG. 14 includes a variable LPF unit 71 and a cutoff frequency control unit 72. The variable LPF unit 71 includes three variable LPFs (low-pass filters) 71G, 71R, and 71B formed so that the cut-off frequency can be variably set. Based on the information DIST and the depth of field setting information, the cutoff frequencies of the variable LPFs 71G, 71R, and 71B are controlled. By inputting the signals G1, R1, and B1 to the variable LPFs 71G, 71R, and 71B, color signals G2, R2, and B2 representing a corrected image are obtained from the variable LPFs 71G, 71R, and 71B.

被写界深度設定情報は、色信号G2、R2及びB2の生成に先立って、ユーザの指示等に基づき生成される。被写界深度設定情報から、図7(c)に示すものと同じ、図15の被写界深度曲線420が設定される。尚、図14の構成例では、カットオフ周波数制御部72が被写界深度設定情報から被写界深度曲線420を設定するが、カットオフ周波数制御部72と異なる部位にて被写界深度設定情報から被写界深度曲線420を設定し、設定した被写界深度曲線420を表す情報を、カットオフ周波数制御部72に与えるようにしてもよい。   Prior to the generation of the color signals G2, R2, and B2, the depth of field setting information is generated based on a user instruction or the like. The same depth-of-field curve 420 in FIG. 15 is set from the depth-of-field setting information, as shown in FIG. In the configuration example of FIG. 14, the cutoff frequency control unit 72 sets the depth of field curve 420 from the depth of field setting information. However, the depth of field setting is different from the cutoff frequency control unit 72. A depth-of-field curve 420 may be set from the information, and information representing the set depth-of-field curve 420 may be given to the cutoff frequency control unit 72.

上述したように、被写界深度設定情報によって、補正画像に対する被写界深度の深さが指定される。換言すれば、被写界深度設定情報によって、補正画像における合焦範囲の幅が指定される。被写界深度設定情報によって指定される合焦範囲の内、最短の被写体距離をDMINにて表し、最長の被写体距離をDMAXにて表す。当然、0<DMIN<DMAXである。 As described above, the depth of field with respect to the corrected image is designated by the depth of field setting information. In other words, the width of the focus range in the corrected image is designated by the depth of field setting information. Of the focusing range specified by the depth of field setting information represents the shortest object distance in D MIN, represents the longest object distance at D MAX. Naturally, 0 <D MIN <D MAX .

被写界深度設定情報は合焦対象情報を含む。合焦対象情報によって、何れの被写体を合焦対象とするのかが定められると共に補正画像の被写界深度内に位置すべき特定の被写体距離(DCN)が指定される。合焦対象情報は、特定の被写体距離を直接指定する距離設定情報又は特定被写体を指定する被写体設定情報である。 The depth-of-field setting information includes focus target information. The focus target information determines which subject is the focus target and specifies a specific subject distance (D CN ) to be positioned within the depth of field of the corrected image. The focus target information is distance setting information for directly specifying a specific subject distance or subject setting information for specifying a specific subject.

合焦対象情報が距離設定情報である場合、合焦対象情報によって指定される特定被写体距離が、補正画像の合焦範囲の中心における距離(被写界深度の中心における距離)DCNとされる。DCN=(DMIN+DMAX)/2である。 When the focus target information is distance setting information, the specific subject distance specified by the focus target information is a distance at the center of the focus range of the corrected image (a distance at the center of the depth of field) DCN. . D CN = (D MIN + D MAX ) / 2.

一方、合焦対象情報が被写体設定情報である場合、合焦対象情報によって指定される特定被写体の推定被写体距離を被写体距離情報DISTから読み取り、読み取った推定被写体距離をDCNに設定する。ユーザは、特定被写体を指定することができる。例えば、原画像又は中間生成画像をLCD19の表示画面に表示させた状態で、ユーザが、特定被写体が表示されている表示部分を、タッチパネル機能を利用して指定する。その指定結果と被写体距離情報DISTからDCNが設定される。例えば、ユーザにとっての特定被写体が図9の被写体SUB1であって、部分画像領域441を指定する被写体設定情報が与えられた場合、被写体SUB1に対して推定された被写体距離DIST(x,y)がDCNに設定される(推定が理想的に成された場合は、DCN=D1となる)。 On the other hand, when the focus target information is subject setting information, the estimated subject distance of the specific subject specified by the focus target information is read from the subject distance information DIST, and the read estimated subject distance is set to DCN . The user can specify a specific subject. For example, in a state where the original image or the intermediate generation image is displayed on the display screen of the LCD 19, the user designates a display portion on which the specific subject is displayed using the touch panel function. D CN is set from the designation result and subject distance information DIST. For example, if the specific subject for the user is the subject SUB 1 in FIG. 9 and subject setting information specifying the partial image area 441 is given, the subject distance DIST (x, y estimated for the subject SUB 1) ) Is set to D CN (when the estimation is ideally made, D CN = D 1 ).

被写界深度曲線420は、被写体距離と解像度の関係を定める曲線であり、被写界深度曲線420上の解像度は、被写体距離DCNにて最大値をとり、被写体距離がDCNから離れるに従って徐々に減少していく。被写体距離DCNにおける被写界深度曲線420上の解像度は基準解像度RSOよりも大きく、被写体距離DMIN及びDMAXにおける被写界深度曲線420上の解像度は基準解像度RSOと一致する。 The depth of field curve 420 is a curve that defines the relationship between the subject distance and the resolution. The resolution on the depth of field curve 420 takes a maximum value at the subject distance D CN , and as the subject distance increases from the D CN. It gradually decreases. The resolution on the depth of field curve 420 at the subject distance D CN is larger than the reference resolution RS O , and the resolution on the depth of field curve 420 at the subject distances D MIN and D MAX matches the reference resolution RS O.

カットオフ周波数制御部72では、あらゆる被写体距離に対して解像度が被写界深度曲線420上の最大解像度と一致する仮想信号が想定される。図15における破線421は、仮想信号における解像度の被写体距離依存性を表している。カットオフ周波数制御部72では、破線421をローパルフィルタ処理によって被写界深度曲線420に変換するために必要な、ローパスフィルタのカットオフ周波数が求められる。つまり、仮想信号が可変LPF71G、71R及び71Bへの入力信号であると仮定した時における可変LPF71G、71R及び71Bの出力信号を仮想出力信号と呼んだ場合、カットオフ周波数制御部72は、仮想出力信号の解像度の被写体距離依存性を表す曲線が被写界深度曲線420と一致するように、可変LPF71G、71R及び71Bのカットオフ周波数を設定する。   The cutoff frequency control unit 72 assumes a virtual signal whose resolution matches the maximum resolution on the depth-of-field curve 420 for any subject distance. A broken line 421 in FIG. 15 represents the subject distance dependency of the resolution in the virtual signal. The cut-off frequency control unit 72 obtains the cut-off frequency of the low-pass filter necessary for converting the broken line 421 into the depth of field curve 420 by the low-pass filter process. That is, when it is assumed that the virtual signals are input signals to the variable LPFs 71G, 71R, and 71B, the output signals of the variable LPFs 71G, 71R, and 71B are called virtual output signals, the cutoff frequency control unit 72 The cutoff frequencies of the variable LPFs 71G, 71R, and 71B are set so that the curve representing the subject distance dependency of the signal resolution matches the depth-of-field curve 420.

被写体距離情報DISTより、カットオフ周波数制御部72は、どの部分画像領域に対して、どのようなカットオフ周波数を設定すべきかを決める。例えば(図9参照)、被写体距離D1の被写体SUB1の画像データが存在する部分画像領域441内に画素位置(x1,y1)が存在すると共に、被写体距離D2の被写体SUB2の画像データが存在する部分画像領域442内に画素位置(x2,y2)が存在する場合を考える。この場合、被写体距離の推定誤差を無視すれば、画素位置(x1,y1)に対する推定被写体距離DIST(x1,y1)及びその周辺画素位置に対する推定被写体距離はD1となり、画素位置(x2,y2)に対する推定被写体距離DIST(x2,y2)及びその周辺画素位置に対する推定被写体距離はD2となる。また、図16に示す如く、被写体距離D1及びD2に対応する、被写界深度曲線420上の解像度が、それぞれRS1及びRS2であったとする。 Based on the subject distance information DIST, the cutoff frequency control unit 72 determines what cutoff frequency should be set for which partial image region. For example (see FIG. 9), the pixel position (x 1 , y 1 ) exists in the partial image area 441 where the image data of the subject SUB 1 at the subject distance D 1 exists, and the subject SUB 2 at the subject distance D 2 Consider a case where a pixel position (x 2 , y 2 ) exists in a partial image area 442 where image data exists. In this case, if the estimation error of the subject distance is ignored, the estimated subject distance DIST (x 1 , y 1 ) with respect to the pixel position (x 1 , y 1 ) and the estimated subject distance with respect to the surrounding pixel positions become D 1 , and the pixel position (x 2, y 2) estimation for subject distance DIST (x 2, y 2) and estimates the subject distance relative to its surrounding pixel position is D 2. Further, as shown in FIG. 16, it is assumed that the resolutions on the depth-of-field curve 420 corresponding to the subject distances D 1 and D 2 are RS 1 and RS 2 , respectively.

この場合、カットオフ周波数制御部72は、仮想信号の解像度を解像度RS1まで低下させるために必要なローパスフィルタのカットオフ周波数CUT1を決定し、カットオフ周波数CUT1を部分画像領域441内の信号G1、R1及びB1に適用させる。これにより、可変LPF71G、71R及び71Bでは、部分画像領域441内の信号G1、R1及びB1に対してカットオフ周波数CUT1のローパスフィルタ処理が施される。このローパスフィルタ処理後の信号は、補正画像の部分画像領域441内の信号G2、R2及びB2として出力される。 In this case, the cut-off frequency control unit 72 determines the cut-off frequency CUT 1 of the low-pass filter necessary for reducing the resolution of the virtual signal to the resolution RS 1, and sets the cut-off frequency CUT 1 in the partial image region 441. Apply to signals G1, R1 and B1. Thereby, in the variable LPFs 71G, 71R, and 71B, the low-pass filter process of the cutoff frequency CUT 1 is performed on the signals G1, R1, and B1 in the partial image region 441. The signal after the low-pass filter processing is output as signals G2, R2, and B2 in the partial image region 441 of the corrected image.

同様に、カットオフ周波数制御部72は、仮想信号の解像度を解像度RS2まで低下させるために必要なローパスフィルタのカットオフ周波数CUT2を決定し、カットオフ周波数CUT2を部分画像領域442内の信号G1、R1及びB1に適用する。これにより、可変LPF71G、71R及び71Bでは、部分画像領域442内の信号G1、R1及びB1に対してカットオフ周波数CUT2のローパスフィルタ処理が施される。このローパスフィルタ処理後の信号は、補正画像の部分画像領域442内の信号G2、R2及びB2として出力される。 Similarly, the cut-off frequency control unit 72 determines the cut-off frequency CUT 2 of the low-pass filter necessary for reducing the resolution of the virtual signal to the resolution RS 2, and sets the cut-off frequency CUT 2 in the partial image region 442. Applies to signals G1, R1 and B1. Thereby, in the variable LPFs 71G, 71R, and 71B, the low-pass filter process with the cutoff frequency CUT 2 is performed on the signals G1, R1, and B1 in the partial image region 442. The signal after the low-pass filter processing is output as signals G2, R2, and B2 in the partial image region 442 of the corrected image.

ローパスフィルタ処理後に得られる解像度とローパスフィルタのカットオフ周波数との関係を規定するテーブルデータ又は演算式を事前に用意しておき、該テーブルデータ又は演算式を用いて、可変LPF部71に設定されるべきカットオフ周波数を決定することができる。このテーブルデータ又は演算式によって、解像度RS1及びRS2に対応するカットオフ周波数が夫々CUT1及びCUT2であることが規定される。 Table data or an arithmetic expression that defines the relationship between the resolution obtained after the low-pass filter processing and the cutoff frequency of the low-pass filter is prepared in advance, and is set in the variable LPF unit 71 using the table data or the arithmetic expression. The cut-off frequency to be determined can be determined. The table data or the arithmetic expression defines that the cutoff frequencies corresponding to the resolutions RS 1 and RS 2 are CUT 1 and CUT 2 , respectively.

図16に示す如く、被写体距離D1が補正画像の被写界深度内に属し且つ被写体距離D2が補正画像の被写界深度に含まれないなら、CUT1>CUT2が成立するようにカットオフ周波数CUT1及びCUT2が設定され、可変LPF部71により部分画像領域442内の画像は部分画像領域441内の画像に比べてぼかされ、結果、補正画像において部分画像領域442内の画像の解像度は部分画像領域441のそれよりも低くなる。また、図16に示す状況とは異なり、DMAX<D1<D2である場合も、CUT1>CUT2が成立するようにカットオフ周波数CUT1及びCUT2が設定されるが、指定された被写界深度内に被写体距離D1及びD2が属しないために、可変LPF部71により中間生成画像中における部分画像領域441及び442内の画像は共にぼかされる。但し、そのぼかしの程度は部分画像領域441よりも部分画像領域442の方が大きく、結果、補正画像において部分画像領域442内の画像の解像度は部分画像領域441のそれよりも低くなる。 As shown in FIG. 16, if the subject distance D 1 belongs to the depth of field of the corrected image and the subject distance D 2 is not included in the depth of field of the corrected image, CUT 1 > CUT 2 is established. Cut-off frequencies CUT 1 and CUT 2 are set, and the variable LPF unit 71 blurs the image in the partial image area 442 as compared with the image in the partial image area 441. As a result, the corrected image includes the image in the partial image area 442. The resolution of the image is lower than that of the partial image area 441. Also, unlike the situation shown in FIG. 16, when D MAX <D 1 <D 2 , the cut-off frequencies CUT 1 and CUT 2 are set so that CUT 1 > CUT 2 is satisfied. Since the subject distances D 1 and D 2 do not belong within the depth of field, the images in the partial image areas 441 and 442 in the intermediate generation image are blurred by the variable LPF unit 71. However, the degree of the blur is larger in the partial image area 442 than in the partial image area 441. As a result, the resolution of the image in the partial image area 442 in the corrected image is lower than that in the partial image area 441.

このようなローパスフィルタ処理が、中間生成画像の全体画像領域に対して行われることで、補正画像の各画素位置における色信号G2、R2及びB2が可変LPF部71から出力される。上述したように、この色信号G2、R2及びB2の解像度の被写体距離依存性は、図7(d)の曲線430にて示される。カットオフ周波数制御部72にて定められるカットオフ周波数は、仮想信号の解像度特性を被写界深度曲線420の解像度特性に変換するためのものであるのに対して、実際の色信号G1、R1及びB1の解像度特性は仮想信号のそれとは異なる。故に、曲線430と被写界深度曲線420とは若干異なる。   By performing such a low-pass filter process on the entire image area of the intermediate generation image, the color signals G2, R2, and B2 at each pixel position of the corrected image are output from the variable LPF unit 71. As described above, the subject distance dependency of the resolution of the color signals G2, R2, and B2 is shown by the curve 430 in FIG. The cut-off frequency determined by the cut-off frequency control unit 72 is for converting the resolution characteristic of the virtual signal into the resolution characteristic of the depth-of-field curve 420, but the actual color signals G1, R1. And the resolution characteristics of B1 are different from those of the virtual signal. Therefore, the curve 430 and the depth of field curve 420 are slightly different.

尚、上述の説明では、被写界深度設定情報に基づいて、一旦、被写界深度曲線420を設定し、その後、被写界深度曲線420と被写体距離情報DISTからカットオフ周波数を設定しているが、被写界深度設定情報及び被写体距離情報DISTに基づいて、被写界深度曲線420を設定することなく一気に可変LPF部71のカットオフ周波数を設定するようにしてもよい。   In the above description, the depth-of-field curve 420 is once set based on the depth-of-field setting information, and then the cutoff frequency is set from the depth-of-field curve 420 and the subject distance information DIST. However, based on the depth-of-field setting information and the subject distance information DIST, the cutoff frequency of the variable LPF unit 71 may be set all at once without setting the depth-of-field curve 420.

<<第2実施形態>>
次に、本発明の第2実施形態を説明する。図17は、本発明の第2実施形態に係る撮像装置1aの全体ブロック図である。撮像装置1aは、符号10〜14、15a、26、18〜24によって参照される各部位を備えている。符号10〜14及び18〜24によって参照される各部位は、第1実施形態におけるそれらと同じである(図6参照)。
<< Second Embodiment >>
Next, a second embodiment of the present invention will be described. FIG. 17 is an overall block diagram of an imaging apparatus 1a according to the second embodiment of the present invention. The imaging device 1a is provided with each part referred by the codes | symbols 10-14, 15a, 26, 18-24. Each part referred by the codes | symbols 10-14 and 18-24 is the same as those in 1st Embodiment (refer FIG. 6).

撮像装置1aには、図6の撮像装置1が有していた抽出/推定部15、拡大処理部16及び被写界深度制御部17の代わりに、高域成分抽出/距離推定部15a(以下、抽出/推定部15aと略記する)及び被写界深度制御部26が設けられており、この相違点を除き、第1実施形態に係る撮像装置1と第2実施形態に係る撮像装置1aは同じものである。以下、第1実施形態との相違点に注目した説明を行う。第2実施形態において、特に述べられない事項に関しては、第1実施形態の記載が適用される。但し、第1実施形態に記載の事項を第2実施形態に適用する場合、同一名称の部位についての符号の相違(例えば、符号1と1aの相違)は無視される。   In the imaging apparatus 1a, instead of the extraction / estimation unit 15, the enlargement processing unit 16, and the depth of field control unit 17 included in the imaging apparatus 1 of FIG. The imaging device 1 according to the first embodiment and the imaging device 1a according to the second embodiment, except for this difference, are provided with an extraction / estimation unit 15a) and a depth-of-field control unit 26. The same thing. The following description focuses on the differences from the first embodiment. In the second embodiment, the description of the first embodiment is applied to matters that are not particularly described. However, when the matters described in the first embodiment are applied to the second embodiment, the difference in reference numerals (for example, the difference between reference numerals 1 and 1a) is ignored.

デモザイキング処理部14によって生成される原画像のR、G及びB信号、即ち、色信号R0、G0及びB0は、抽出/推定部15a及び被写界深度制御部26に与えられる。抽出/推定部15aは、図10に示される、HPF51G、51R及び51B、LPF52G、52R及び52B、演算部56並びに被写体距離推定部54を有し、色信号R0、G0及びB0から原画像の各位置における被写体距離を推定して、推定被写体距離を表す被写体距離情報DISTを生成する。抽出/推定部15aによる被写体距離情報DISTを生成方法(被写体距離の推定方法を含む)は、図10の抽出/推定部15によるそれと同じである。   The R, G, and B signals of the original image generated by the demosaicing processing unit 14, that is, the color signals R0, G0, and B0 are given to the extraction / estimation unit 15a and the depth of field control unit 26. The extraction / estimation unit 15a includes HPFs 51G, 51R, and 51B, LPFs 52G, 52R, and 52B, a calculation unit 56, and a subject distance estimation unit 54 illustrated in FIG. 10, and each of the original images is obtained from the color signals R0, G0, and B0. Subject distance at the position is estimated, and subject distance information DIST representing the estimated subject distance is generated. The method for generating subject distance information DIST (including the subject distance estimation method) by the extraction / estimation unit 15a is the same as that by the extraction / estimation unit 15 of FIG.

被写界深度制御部26は、抽出/推定部15aによって生成された被写体距離情報DISTと、被写界深度設定情報に基づいて、原画像の色信号R0、G0及びB0を補正することにより所望の被写界深度を有する補正画像を生成する。被写界深度制御部26によって生成された補正画像のR、G及びB信号を、夫々、R2’、G2’及びB2’にて表す。被写界深度制御部26によって生成された補正画像のR、G及びB信号は、カメラ信号処理部18に送られる。   The depth-of-field control unit 26 corrects the color signals R0, G0, and B0 of the original image based on the subject distance information DIST generated by the extraction / estimation unit 15a and the depth-of-field setting information. A corrected image having a depth of field of 2 is generated. The R, G, and B signals of the corrected image generated by the depth of field control unit 26 are represented by R2 ', G2', and B2 ', respectively. The R, G, and B signals of the corrected image generated by the depth of field control unit 26 are sent to the camera signal processing unit 18.

図18に、被写界深度制御部26の内部ブロック図の例を示す。図18の被写界深度制御部26は、符号81〜84によって参照される各部位を備える。   FIG. 18 shows an example of an internal block diagram of the depth of field control unit 26. The depth-of-field control unit 26 in FIG. 18 includes each part referred to by reference numerals 81 to 84.

軸上色収差の特性を含む光学系10の特性は、撮像装置1aの設計段階で予め分かっているため、原画像上の注目部分画像領域における注目被写体の被写体距離が分かれば、その注目部分画像領域における色信号ごとの画像のボケの特性が分かる。例えば、注目被写体の被写体距離が、赤色光301Rの結像点302Rを撮像素子11の撮像面上に位置させる被写体距離DDRである場合(図1、図2(c)、図4参照)、注目被写体からの青色光301B及び緑色光301Gは注目部分画像領域内においてぼけ、注目被写体を点光源とみなしたならば、その青色光301B及び緑色光301Gの画像の半径はYB及びYBであることが分かる(図3参照)。被写体距離が被写体距離DDRと異なる場合も同様である。 Since the characteristics of the optical system 10 including the characteristics of axial chromatic aberration are known in advance at the design stage of the imaging device 1a, if the subject distance of the subject of interest in the target partial image region on the original image is known, the target partial image region The blur characteristics of the image for each color signal in FIG. For example, when the subject distance of the subject of interest is the subject distance DD R that positions the imaging point 302R of the red light 301R on the imaging surface of the imaging device 11 (see FIGS. 1, 2C, and 4). The blue light 301B and the green light 301G from the target subject are blurred in the target partial image region, and if the target subject is regarded as a point light source, the radii of the blue light 301B and the green light 301G are YB and YB. (See FIG. 3). If the object distance is different from the subject distance DD R is the same.

原画像は、軸上色収差によって劣化した画像であると考えることができる。ここにおける劣化は、軸上色収差に由来する画像のぼけである。この劣化過程を表す関数又は空間フィルタは、点広がり関数(Point Spread Function;以下、PSFという)と呼ばれる。被写体距離が定まれば色信号ごとのPSFが求まるため、被写体距離情報DISTに含まれる原画像上の各位置における推定被写体距離に基づけば、原画像上の各位置における、色信号ごとのPSFが定まる。このようなPSFの逆関数を用いた畳み込み演算を色信号G0、R0及びB0に行えば、軸上色収差に由来する原画像の劣化(ぼけ)は除去される。劣化を除去する画像処理は画像復元処理とも呼ばれる。この除去によって得られる画像が第2実施形態における中間生成画像であり、第2実施形態における中間生成画像のR、G及びB信号を、夫々、R1’、G1’及びB1’にて表す。   It can be considered that the original image is an image deteriorated due to axial chromatic aberration. The deterioration here is blurring of the image due to axial chromatic aberration. A function or a spatial filter representing this deterioration process is called a point spread function (hereinafter referred to as PSF). Since the PSF for each color signal is obtained when the subject distance is determined, the PSF for each color signal at each position on the original image is obtained based on the estimated subject distance at each position on the original image included in the subject distance information DIST. Determined. If such a convolution operation using the inverse function of PSF is performed on the color signals G0, R0, and B0, the deterioration (blur) of the original image due to the longitudinal chromatic aberration is removed. Image processing that removes deterioration is also called image restoration processing. An image obtained by this removal is an intermediate generated image in the second embodiment, and R, G, and B signals of the intermediate generated image in the second embodiment are represented by R1 ', G1', and B1 ', respectively.

図18の画像復元フィルタ81は、上記の逆関数を信号G0、R0及びB0に作用させるための二次元の空間フィルタである。画像復元フィルタ81は、軸上色収差に由来する原画像の劣化過程を表すPSFの逆フィルタに相当する。フィルタ係数演算部83は、被写体距離情報DISTから、原画像上の各位置における、色信号G0、R0及びB0に対するPSFの逆関数を求め、その求めた逆関数を信号G0、R0及びB0に作用させるべく、画像復元フィルタ81のフィルタ係数を算出する。画像復元フィルタ81は、フィルタ係数演算部83によって算出されたフィルタ係数を用いて、色信号G0、R0及びB0に対して個別にフィルタリングを行うことで、色信号G1’、R1’及びB1’を生成する。   The image restoration filter 81 in FIG. 18 is a two-dimensional spatial filter for applying the above inverse function to the signals G0, R0, and B0. The image restoration filter 81 corresponds to an inverse filter of PSF that represents the deterioration process of the original image derived from axial chromatic aberration. The filter coefficient calculation unit 83 obtains an inverse function of the PSF for the color signals G0, R0, and B0 at each position on the original image from the subject distance information DIST, and applies the obtained inverse function to the signals G0, R0, and B0. Therefore, the filter coefficient of the image restoration filter 81 is calculated. The image restoration filter 81 individually filters the color signals G0, R0, and B0 using the filter coefficients calculated by the filter coefficient calculation unit 83, thereby obtaining the color signals G1 ′, R1 ′, and B1 ′. Generate.

図19の破線500は、色信号G1’、R1’及びB1’における解像度の被写体距離依存性を表している。曲線400G、400R及び400Bは、上述したように、色信号G0、R0及びB0における解像度の被写体距離依存性を表している。色信号ごとの画像復元処理によって、G、R及びB信号の全てにおいて解像度の高い中間生成画像が得られる。   A broken line 500 in FIG. 19 represents the subject distance dependency of the resolution in the color signals G1 ', R1', and B1 '. As described above, the curves 400G, 400R, and 400B represent the subject distance dependency of the resolution in the color signals G0, R0, and B0. By the image restoration processing for each color signal, an intermediate generated image with high resolution is obtained for all of the G, R, and B signals.

被写界深度調整フィルタ82も、二次元の空間フィルタである。被写界深度調整フィルタ82は、色信号G1’、R1’及びB1’を色信号ごとにフィルタリングすることにより、補正画像を表す色信号G2’、R2’及びB2’を生成する。被写界深度調整フィルタ82としての空間フィルタのフィルタ係数は、フィルタ係数演算部84によって算出される。   The depth of field adjustment filter 82 is also a two-dimensional spatial filter. The depth-of-field adjustment filter 82 filters the color signals G1 ', R1', and B1 'for each color signal, thereby generating color signals G2', R2 ', and B2' representing the corrected image. The filter coefficient of the spatial filter as the depth of field adjustment filter 82 is calculated by the filter coefficient calculation unit 84.

被写界深度設定情報によって、図15又は図16に示すような被写界深度曲線420が設定される。被写界深度設定情報及び被写界深度曲線420の意義は、第1実施形態で述べたものと同様である。図19の破線500に対応する色信号G1’、R1’及びB1’は、図15又は図16の破線421に対応する、第1実施形態にて述べた仮想信号に相当する。被写界深度調整フィルタ82は、色信号G2’、R2’及びB2’の解像度の被写体距離依存性を表す曲線が被写界深度曲線420と一致するように、色信号G1’、R1’及びB1’に対するフィルタリングを行う。   A depth-of-field curve 420 as shown in FIG. 15 or 16 is set according to the depth-of-field setting information. The significance of the depth-of-field setting information and the depth-of-field curve 420 is the same as that described in the first embodiment. Color signals G1 ', R1' and B1 'corresponding to the broken line 500 in FIG. 19 correspond to the virtual signals described in the first embodiment corresponding to the broken line 421 in FIG. The depth-of-field adjustment filter 82 adjusts the color signals G1 ′, R1 ′, and the depth-of-field curve 420 so that the curve representing the subject distance dependency of the resolution of the color signals G2 ′, R2 ′, and B2 ′ matches the depth-of-field curve 420. Filter for B1 '.

このようなフィルタリングを実現するための、被写界深度調整フィルタ82のフィルタ係数が、被写界深度設定情報と被写体距離情報DISTに基づいてフィルタ係数演算部84により算出される。   The filter coefficient of the depth-of-field adjustment filter 82 for realizing such filtering is calculated by the filter coefficient calculation unit 84 based on the depth-of-field setting information and the subject distance information DIST.

中間生成画像及び補正画像の色信号の解像度特性は第1及び第2実施形態間で同じであるため、図18の被写界深度制御部26内における被写界深度調整フィルタ82及びフィルタ係数演算部84を図14の可変LPF71部及びカットオフ周波数制御部72に置き換え、これらの可変LPF71部及びカットオフ周波数制御部72を用いて色信号G1’、R1’及びB1’にローパスフィルタ処理を施すことにより色信号G2’、R2’及びB2’を生成するようにしてもよい。この場合も、第1実施形態で述べたように、被写界深度設定情報及び被写体距離情報DISTに基づいて、可変LPF71部のカットオフ周波数を定めればよい。   Since the resolution characteristics of the color signals of the intermediate generation image and the corrected image are the same between the first and second embodiments, the depth-of-field adjustment filter 82 and the filter coefficient calculation in the depth-of-field control unit 26 in FIG. 14 is replaced with the variable LPF 71 and cut-off frequency control unit 72 shown in FIG. 14, and the low-pass filter processing is performed on the color signals G1 ′, R1 ′, and B1 ′ using the variable LPF 71 and cut-off frequency control unit 72. Accordingly, the color signals G2 ′, R2 ′, and B2 ′ may be generated. In this case as well, as described in the first embodiment, the cutoff frequency of the variable LPF 71 unit may be determined based on the depth of field setting information and the subject distance information DIST.

図18の被写界深度制御部26にて実行される処理の意義を補足説明する。原画像の注目部分画像領域内における青、緑及び赤の画像の内、少なくとも2つは軸上色収差に由来してぼけ、そのぼけの大きさ(ボケ量)は、光学系10の軸上色収差の特性と注目部分画像領域における注目被写体の被写体距離に依存する。従って、被写界深度制御部26は、原画像の注目部分画像領域内における青、緑及び赤の画像のボケ量を、予め分かっている軸上色収差の特性と被写体距離情報DISTに含まれる注目被写体の推定被写体距離に基づいて推定することができる。   The significance of the processing executed by the depth-of-field control unit 26 in FIG. 18 will be supplementarily described. At least two of the blue, green, and red images in the target partial image region of the original image are blurred due to axial chromatic aberration, and the magnitude (blur amount) of the blur is the axial chromatic aberration of the optical system 10. And the subject distance of the subject of interest in the target partial image region. Accordingly, the depth-of-field control unit 26 determines the amount of blurring of the blue, green, and red images in the target partial image region of the original image, and the attention is included in the characteristics of the on-axis chromatic aberration and the subject distance information DIST that are known in advance. It can be estimated based on the estimated subject distance of the subject.

原画像に対して色信号ごとに画像復元処理を行えば、軸上色収差に由来する原画像の劣化(ぼけ)は除去され、結果、中間生成画像の注目部分画像領域内における青、緑及び赤の画像のボケ量(ぼけの大きさ)は、無視できる程度に小さくなる。即ち、画像復元処理が理想的になされたならば、中間生成画像において、それらのぼけの直径は、所定の許容錯乱円の直径以下となる。   If image restoration processing is performed on the original image for each color signal, the deterioration (blur) of the original image due to axial chromatic aberration is removed, and as a result, blue, green and red in the target partial image region of the intermediate generated image The blur amount (blur size) of the image becomes small enough to be ignored. That is, if the image restoration process is ideally performed, the diameter of the blur in the intermediate generation image is equal to or less than the diameter of a predetermined allowable circle of confusion.

被写界深度制御部26では、中間生成画像の生成後、補正画像の注目部分画像領域内における青、緑及び赤の画像のボケ量(ぼけの大きさ)が被写界深度曲線420によって規定されるボケ量になるように、中間生成画像に対して補正を加える。   In the depth-of-field control unit 26, after the generation of the intermediate generation image, the blur amount (blur size) of the blue, green, and red images in the target partial image region of the corrected image is defined by the depth-of-field curve 420. Correction is applied to the intermediate generated image so that the amount of blurring is reduced.

或る注目した色信号の解像度と注目した色信号による画像のボケ量は概ね反比例の関係にあり、前者が増大するにつれて後者は減少し、逆に、前者が減少するにつれて後者は増大する。従って、色信号G0、R0及びB0から色信号G2’、R2’及びB2’を生成する処理は、軸上色収差に由来する原画像中の各部分画像領域におけるボケ量(解像度)を補正画像中の各部分画像領域における設定ボケ量(設定解像度)へと修正する処理であると言え、この処理は色信号ごとに実行される。前者のボケ量は、軸上色収差の特性と被写体距離情報DISTに基づいて推定される。換言すれば、前者のボケ量は、軸上色収差の特性と被写体距離情報DISTに基づいて定まる、原画像上の各位置における色信号ごとのPSFから推定される。後者の設定ボケ量は、被写界深度曲線420を規定する被写界深度設定情報と被写体距離情報DISTに基づいて設定される。   The resolution of a noticed color signal and the amount of image blur due to the noticed color signal are generally inversely proportional to each other. The latter decreases as the former increases, and conversely increases as the former decreases. Therefore, in the process of generating the color signals G2 ′, R2 ′, and B2 ′ from the color signals G0, R0, and B0, the blur amount (resolution) in each partial image region in the original image that is derived from the axial chromatic aberration is corrected in the image. It can be said that this is a process for correcting to the set blur amount (set resolution) in each partial image area of FIG. 1, and this process is executed for each color signal. The former amount of blur is estimated based on the characteristics of axial chromatic aberration and subject distance information DIST. In other words, the former amount of blur is estimated from the PSF for each color signal at each position on the original image, which is determined based on the characteristics of longitudinal chromatic aberration and the subject distance information DIST. The latter set blur amount is set based on the depth-of-field setting information that defines the depth-of-field curve 420 and the subject distance information DIST.

また、図18の構成では、中間生成画像を得るためのフィルタリングを行ってから補正画像を得るためのフィルタリングを行っているが、両者のフィルタリングを一度に行うようにしてもよい。即ち、被写界深度制御部26を、図20の被写界深度制御部26aのように構成してもよい。図20は、被写界深度制御部26aの内部ブロック図である。被写界深度制御部26aを被写界深度制御部26として用いることができる。被写界深度制御部26aは、被写界深度調整フィルタ91とフィルタ係数演算部92を備える。   In the configuration of FIG. 18, the filtering for obtaining the intermediate generation image is performed and then the filtering for obtaining the corrected image is performed. However, the filtering of both may be performed at the same time. That is, the depth of field control unit 26 may be configured like the depth of field control unit 26a of FIG. FIG. 20 is an internal block diagram of the depth of field control unit 26a. The depth of field control unit 26 a can be used as the depth of field control unit 26. The depth of field control unit 26 a includes a depth of field adjustment filter 91 and a filter coefficient calculation unit 92.

被写界深度調整フィルタ91は、図18の画像復元フィルタ81によるフィルタリングと被写界深度調整フィルタ82によるフィルタリングを統合したフィルタリングを行う、二次元の空間フィルタである。原画像の色信号G0’、R0’及びB0’に対して色信号ごとに被写界深度調整フィルタ91によるフィルタリングを行うことで、直接、色信号G2’、R2’及びB2’が生成される。   The depth-of-field adjustment filter 91 is a two-dimensional spatial filter that performs filtering that integrates filtering by the image restoration filter 81 and filtering by the depth-of-field adjustment filter 82 in FIG. The color signals G2 ′, R2 ′, and B2 ′ are directly generated by filtering the color signals G0 ′, R0 ′, and B0 ′ of the original image by the depth-of-field adjustment filter 91 for each color signal. .

フィルタ係数演算部92は、図18のフィルタ係数演算部83及び84を統合したフィルタ係数演算部であり、被写体距離情報DISTと被写界深度設定情報から色信号ごとに被写界深度調整フィルタ91のフィルタ係数を算出する。   The filter coefficient calculation unit 92 is a filter coefficient calculation unit in which the filter coefficient calculation units 83 and 84 of FIG. 18 are integrated, and the depth-of-field adjustment filter 91 for each color signal from the subject distance information DIST and the depth-of-field setting information. The filter coefficient of is calculated.

<<第3実施形態>>
次に、本発明の第3実施形態を説明する。第3実施形態では、ユーザの操作との関係において原画像から補正画像を生成する動作の流れを説明する。第3実施形態に係る撮像装置の動作モードには、画像の撮影が可能な撮影モードと、記録媒体22に記録された画像をLCD19上で再生表示する再生モードと、が含まれる。操作部24に対する操作に応じて、各モード間の遷移は実施される。第1又は第2実施形態に係る撮像装置1又は1aが、第3実施形態に係る撮像装置として用いられる。第1又は第2実施形態において説明された事項は、矛盾なき限り、第3実施形態にも適用される。
<< Third Embodiment >>
Next, a third embodiment of the present invention will be described. In the third embodiment, an operation flow for generating a corrected image from an original image in relation to a user operation will be described. The operation modes of the imaging apparatus according to the third embodiment include a shooting mode in which an image can be shot and a playback mode in which an image recorded on the recording medium 22 is played back and displayed on the LCD 19. Transition between the modes is performed according to the operation on the operation unit 24. The imaging device 1 or 1a according to the first or second embodiment is used as the imaging device according to the third embodiment. The matters described in the first or second embodiment are applied to the third embodiment as long as there is no contradiction.

まず、図21を参照し、撮影モードにおいて補正画像が生成される場合における、撮像装置(1又は1a)の動作を説明する。図21は、この動作の流れを表すフローチャートである。LCD19は、画像が表示可能な状態にされる。   First, the operation of the imaging device (1 or 1a) when a corrected image is generated in the shooting mode will be described with reference to FIG. FIG. 21 is a flowchart showing the flow of this operation. The LCD 19 is in a state where an image can be displayed.

撮影モードでは、原則として、所定のフレーム周期にて順次撮影が行われて、撮像素子11から時系列で並ぶ原画像列が取得され、原画像列が動画像としてLCD19に表示される。ステップS11において、CPU23は、操作部24に設けられたシャッタボタン(不図示)が押下されたか否かを監視し、シャッタボタンの押下が確認された時、ステップS12〜S14の処理を行う。ステップS12において、CPU23は、シャッタボタンの押下直後に得られた1枚の原画像分のRAWデータをDRAM13に保持させ、ステップS13において、そのRAWデータに基づく原画像又は中間生成画像をLCD19の表示画面上に表示させる。更に、ステップS14において、そのRAWデータ及び該RAWデータに対応する圧縮画像の画像データを記録媒体22に記録させる。この際、RAWデータと圧縮画像の画像データを互いに関連付け、1つの画像ファイルに格納した上で記録媒体22に記録させる。尚、ここにおける圧縮画像とは、DRAM13に保持されたRAWデータに基づく原画像又は中間生成画像を圧縮/伸張処理部21にて圧縮した画像である。   In the photographing mode, in principle, photographing is performed sequentially at a predetermined frame period, an original image sequence arranged in time series from the image sensor 11 is acquired, and the original image sequence is displayed on the LCD 19 as a moving image. In step S11, the CPU 23 monitors whether or not a shutter button (not shown) provided on the operation unit 24 has been pressed, and performs steps S12 to S14 when it is confirmed that the shutter button has been pressed. In step S12, the CPU 23 causes the DRAM 13 to hold RAW data for one original image obtained immediately after pressing the shutter button in the DRAM 13, and in step S13, the original image or the intermediate generation image based on the RAW data is displayed on the LCD 19. Display on the screen. In step S14, the RAW data and compressed image data corresponding to the RAW data are recorded on the recording medium 22. At this time, the RAW data and the compressed image data are associated with each other, stored in one image file, and recorded on the recording medium 22. Here, the compressed image is an image obtained by compressing the original image or the intermediate generated image based on the RAW data held in the DRAM 13 by the compression / decompression processing unit 21.

撮像装置1又は1aによる、補正画像を生成する機能を被写界深度制御機能と呼ぶ。シャッタボタンが押下されてステップS12〜S14の処理がなされた後、ステップS15にて、被写界深度制御機能が有効になっているかが確認され、それが有効になっている場合はステップS15からステップS16に移行する一方、それが有効になっていない場合はステップS15からステップS11に戻る。ステップS16では、ステップS12にてDARM13に保持されたRAWデータに基づく原画像が補正対象原画像に設定される。   The function of generating a corrected image by the imaging device 1 or 1a is called a depth of field control function. After the shutter button is pressed and the processes in steps S12 to S14 are performed, it is confirmed in step S15 whether the depth-of-field control function is enabled. If it is enabled, the process starts from step S15. On the other hand, the process proceeds to step S16, but if it is not valid, the process returns from step S15 to step S11. In step S16, the original image based on the RAW data held in the DARM 13 in step S12 is set as the correction target original image.

ステップS16に続くステップS17では、補正対象原画像又はそれに基づく中間生成画像をLCD19に表示した状態で、ユーザによる、補正対象原画像上の合焦対象を指定する合焦対象指定操作を受け付ける。ユーザは、タッチパネル機能を利用して、この合焦対象指定操作をLCD19上で行うことができる。即ち、第1実施形態で述べたように、ユーザが、特定被写体が表示されている、LCD19の表示画面上の一部分をタッチパネル機能を利用して指定することにより、特定被写体を合焦対象に指定することができる。その指定結果と補正対象原画像についての被写体距離情報DISTから、第1実施形態で述べた距離DCNが設定される(図15参照)。例えば、ユーザにとっての特定被写体が図9の被写体SUB1であって且つ被写体SUB1の画像データが存在する部分画像領域441内の画像の表示部位が指定された場合は、被写体SUB1に対して推定された被写体距離DIST(x,y)がDCNに設定される(被写体距離の推定が理想的に成された場合は、DCN=D1となる)。 In step S17 following step S16, a focus target designation operation for designating a focus target on the correction target original image by the user is received in a state where the correction target original image or an intermediate generated image based on the correction target original image is displayed on the LCD 19. The user can perform this focusing target designation operation on the LCD 19 using the touch panel function. That is, as described in the first embodiment, the user designates a part on the display screen of the LCD 19 on which the specific subject is displayed by using the touch panel function, so that the specific subject is designated as the focus target. can do. The distance D CN described in the first embodiment is set from the designation result and the subject distance information DIST about the correction target original image (see FIG. 15). For example, when the specific subject for the user is the subject SUB 1 in FIG. 9 and the display part of the image in the partial image area 441 in which the image data of the subject SUB 1 exists is designated, the subject SUB 1 estimated subject distance DIST (x, y) is set to D CN (if the estimated subject distance is ideally made, the D CN = D 1).

尚、タッチパネル機能を利用することなく、操作部24に対する操作によって上記の特定被写体を合焦対象に指定することもできる。また、ユーザは、操作部24に対する操作によって、距離DCNを直接指定することもできる。 Note that the specific subject can be designated as a focusing target by operating the operation unit 24 without using the touch panel function. The user can also directly specify the distance DCN by operating the operation unit 24.

ステップS17では、更に、ユーザによる、被写界深度の深さを指定する深度指定操作も受け付ける。この深度指定操作は、タッチパネル機能又は操作部24を利用して実行される。深度指定操作によって指定された被写界深度の深さにより、補正対象原画像から生成されるべき補正画像の被写界深度の深さ(即ち、図15における距離DMIN及びDMAX間の距離差)が決まる。 In step S17, a depth designation operation for designating the depth of field by the user is further accepted. This depth designation operation is executed using the touch panel function or the operation unit 24. The depth of field of the corrected image to be generated from the original image to be corrected (that is, the distance between the distances D MIN and D MAX in FIG. 15) according to the depth of field specified by the depth specifying operation. Difference) is determined.

ステップS17に続くステップS18において、CPU23は、ステップS17における合焦対象指定操作及び深度指定操作の内容に基づき、第1又は第2実施形態で述べた被写界深度設定情報を作成する。その後、ステップS19において、CPU23は、被写界深度制御処理をオンとする。被写界深度制御処理がオンとされると、補正対象原画像のR、G及びB信号から補正画像のR、G及びB信号を生成するための、撮像装置1又は1a内の部位が動作する。このため、ステップS19において、ステップS18にて作成された被写界深度設定情報に基づき、補正対象原画像のR、G及びB信号から補正画像のR、G及びB信号が生成される。   In step S18 following step S17, the CPU 23 creates the depth-of-field setting information described in the first or second embodiment based on the contents of the focusing target specifying operation and the depth specifying operation in step S17. Thereafter, in step S19, the CPU 23 turns on the depth of field control process. When the depth-of-field control process is turned on, the part in the imaging device 1 or 1a for generating the R, G, and B signals of the corrected image from the R, G, and B signals of the original image to be corrected operates. To do. For this reason, in step S19, based on the depth-of-field setting information created in step S18, the R, G, and B signals of the corrected image are generated from the R, G, and B signals of the correction target original image.

ステップS19にて生成された補正画像のR、G及びB信号は、カメラ信号処理部18にてY、U及びV信号から成る映像信号に変換された後、圧縮/伸張処理部21にて圧縮され、得られた圧縮映像信号、即ち補正画像の圧縮画像データ(圧縮された補正画像の画像データ)は、ステップS20において記録媒体22に記録される。この際、ステップS14にて記録したRAWデータ及び/又は圧縮画像の画像データを記録媒体22から消去するようにしてもよい。また、ステップS19にて生成された補正画像をLCD19に表示してもよい。その後、ステップ21において被写界深度制御処理がオフにされた後、ステップS11に戻る。   The R, G, and B signals of the corrected image generated in step S19 are converted into video signals composed of Y, U, and V signals by the camera signal processing unit 18, and then compressed by the compression / decompression processing unit 21. The obtained compressed video signal, that is, compressed image data of the corrected image (image data of the compressed corrected image) is recorded on the recording medium 22 in step S20. At this time, the RAW data recorded in step S14 and / or the image data of the compressed image may be erased from the recording medium 22. Further, the corrected image generated in step S19 may be displayed on the LCD 19. Then, after the depth of field control process is turned off in step 21, the process returns to step S11.

次に、図22を参照し、再生モードにおいて補正画像が生成される場合における、撮像装置(1又は1a)の動作を説明する。図22は、この動作の流れを表すフローチャートである。LCD19は、画像が表示可能な状態にされる。   Next, the operation of the imaging device (1 or 1a) when a corrected image is generated in the playback mode will be described with reference to FIG. FIG. 22 is a flowchart showing the flow of this operation. The LCD 19 is in a state where an image can be displayed.

まず、再生モードにて生成されるべき補正画像の元となるRAWデータが、ステップS31〜33にて取得される。ステップS31〜S33の処理は、撮影モードにおける処理である。ステップS31において、CPU23は、操作部24に設けられたシャッタボタン(不図示)が押下されたか否かを監視し、シャッタボタンの押下が確認された時、ステップS32及びS33の処理を行う。ステップS32において、CPU23は、シャッタボタンの押下直後に得られた1枚の原画像分のRAWデータをDRAM13に一時的に記憶させ、そのRAWデータに基づく原画像又は中間生成画像を一時的にLCD19の表示画面上に表示させる。更に、ステップS33において、そのRAWデータ及び該RAWデータに対応する圧縮画像の画像データを記録媒体22に記録させる。この際、RAWデータと圧縮画像の画像データを互いに関連付け、1つの画像ファイルに格納した上で記録媒体22に記録させる。尚、ここにおける圧縮画像とは、DRAM13に一時記憶されたRAWデータに基づく原画像又は中間生成画像を圧縮/伸張処理部21にて圧縮した画像である。   First, RAW data that is a source of a corrected image to be generated in the reproduction mode is acquired in steps S31 to S33. The processes in steps S31 to S33 are processes in the shooting mode. In step S31, the CPU 23 monitors whether or not a shutter button (not shown) provided on the operation unit 24 has been pressed, and performs processing in steps S32 and S33 when it is confirmed that the shutter button has been pressed. In step S32, the CPU 23 temporarily stores the raw data for one original image obtained immediately after pressing the shutter button in the DRAM 13, and temporarily stores the original image or the intermediate generated image based on the raw data on the LCD 19. Is displayed on the display screen. In step S33, the RAW data and compressed image data corresponding to the RAW data are recorded on the recording medium 22. At this time, the RAW data and the compressed image data are associated with each other, stored in one image file, and recorded on the recording medium 22. Here, the compressed image is an image obtained by compressing the original image or the intermediate generated image based on the RAW data temporarily stored in the DRAM 13 by the compression / decompression processing unit 21.

ステップS33における記録処理が完了すると、撮像装置(1又1a)の動作モードが撮影モードから再生モードに遷移したか否かが確認される。撮像装置(1又1a)の動作モードが撮影モードに維持されている場合はステップS31に戻ってステップS31〜S33の処理が繰り返し実行され、それが再生モードに遷移した場合は、ステップS41に移行して、以後、S41〜S48の各処理が実行される。ステップS41〜S48の各処理は再生モードにおける処理である。   When the recording process in step S33 is completed, it is confirmed whether or not the operation mode of the imaging device (1 or 1a) has changed from the shooting mode to the playback mode. When the operation mode of the imaging device (1 or 1a) is maintained in the shooting mode, the process returns to step S31 and the processes of steps S31 to S33 are repeatedly executed. Thereafter, each process of S41 to S48 is executed. Each process of steps S41 to S48 is a process in the reproduction mode.

ステップS41において、ユーザは、記録媒体22に記録されている1枚又は複数枚の圧縮画像の中から1つを選択する。選択された圧縮画像は、伸張処理を介してLCD19に表示される。ステップ41の選択後、ステップS42にて、被写界深度制御機能が有効になっているかが確認され、それが有効になっている場合はステップS42からステップS43に移行する一方、それが有効になっていない場合はステップS42からステップS41に戻る。ステップS43において、ステップS41にて選択された圧縮画像に関連付けられているRAWデータが記録媒体22から読み出され、読み出されたRAWデータに基づく原画像が補正対象原画像に設定される。   In step S <b> 41, the user selects one from one or a plurality of compressed images recorded on the recording medium 22. The selected compressed image is displayed on the LCD 19 through the decompression process. After the selection in step 41, it is confirmed in step S42 whether the depth-of-field control function is enabled. If it is enabled, the process proceeds from step S42 to step S43 while it is enabled. If not, the process returns from step S42 to step S41. In step S43, the RAW data associated with the compressed image selected in step S41 is read from the recording medium 22, and the original image based on the read RAW data is set as the correction target original image.

ステップS43に続くステップS44〜S48の処理内容は、図21のステップS17〜S21のそれらと同様であり、図21を参照して上述した内容がステップS44〜S48にも適用される。   The processing contents of steps S44 to S48 subsequent to step S43 are the same as those of steps S17 to S21 of FIG. 21, and the contents described above with reference to FIG. 21 are also applied to steps S44 to S48.

即ち、ステップS43に続くステップS44では、補正対象原画像又はそれに基づく中間生成画像をLCD19に表示した状態で、ユーザによる、補正対象原画像上の合焦対象を指定する合焦対象指定操作を受け付けると共に被写界深度の深さを指定する深度指定操作も受け付ける。その後、ステップS45において、CPU23は、ステップS44における合焦対象指定操作及び深度指定操作の内容に基づき、第1又は第2実施形態で述べた被写界深度設定情報を作成する。続いてステップS46において、CPU23は、被写界深度制御処理をオンとする。これにより、ステップS46において、ステップS45にて作成された被写界深度設定情報に基づき、補正対象原画像のR、G及びB信号から補正画像のR、G及びB信号が生成される。   That is, in step S44 subsequent to step S43, a focus target designation operation for designating a focus target on the correction target original image by the user is received in a state where the correction target original image or an intermediate generation image based thereon is displayed on the LCD 19. A depth designation operation for designating the depth of field is also accepted. Thereafter, in step S45, the CPU 23 creates the depth-of-field setting information described in the first or second embodiment based on the contents of the focus target specifying operation and the depth specifying operation in step S44. Subsequently, in step S46, the CPU 23 turns on the depth of field control process. Thereby, in step S46, based on the depth-of-field setting information created in step S45, the R, G, and B signals of the corrected image are generated from the R, G, and B signals of the correction target original image.

ステップS46にて生成された補正画像のR、G及びB信号は、カメラ信号処理部18にてY、U及びV信号から成る映像信号に変換された後、圧縮/伸張処理部21にて圧縮され、得られた圧縮映像信号、即ち補正画像の圧縮画像データ(圧縮された補正画像の画像データ)は、ステップS47において記録媒体22に記録される。この際、補正対象原画像に対応し且つ撮影モードにおいて記録されたRAWデータ及び/又は圧縮画像の画像データを記録媒体22から消去するようにしてもよい。また、ステップS46にて生成された補正画像をLCD19に表示してもよい。その後、ステップ48において被写界深度制御処理がオフにされた後、ステップS41に戻る。   The R, G, and B signals of the corrected image generated in step S46 are converted into video signals composed of Y, U, and V signals by the camera signal processing unit 18, and then compressed by the compression / decompression processing unit 21. The obtained compressed video signal, that is, compressed image data of the corrected image (image data of the compressed corrected image) is recorded on the recording medium 22 in step S47. At this time, the RAW data corresponding to the original image to be corrected and / or the image data of the compressed image recorded in the photographing mode may be deleted from the recording medium 22. Further, the corrected image generated in step S46 may be displayed on the LCD 19. Thereafter, after the depth of field control process is turned off in step 48, the process returns to step S41.

第1〜第3実施形態によれば、大型の一眼レフカメラにおいてのみ取得することが可能であった被写界深度の浅い画像(被写体距離に応じて自然なぼけが再現された画像)を、小型且つ簡素な構成を有するデジタルカメラにおいて生成することが可能となる。また、原画像の撮影後に、任意の被写体にピントが合った、任意の被写界深度を有する補正画像を生成することができる。つまり、撮影後のフォーカス制御が可能となるため、ピント合わせミスによる撮影の失敗をなくすことができる。   According to the first to third embodiments, an image having a shallow depth of field (an image in which natural blur is reproduced according to the subject distance) that can be obtained only with a large single-lens reflex camera is obtained. It can be generated in a digital camera having a small and simple configuration. In addition, a corrected image having an arbitrary depth of field in which an arbitrary subject is in focus can be generated after the original image is captured. That is, since focus control after shooting is possible, shooting failures due to focus errors can be eliminated.

尚、本発明に係る撮像装置(1又は1a)は、ハードウェア、或いは、ハードウェアとソフトウェアの組み合わせによって実現可能である。特に、図10、図18又は図20に示される各部位が実行する演算処理は、ソフトウェア、ハードウェア、またはハードウェアとソフトウェアの組み合わせによって実現可能である。ソフトウェアを用いて撮像装置を構成する場合、ソフトウェアにて実現される部位についてのブロック図は、その部位の機能ブロック図を表すことになる。演算処理の全部または一部を、プログラムとして記述し、該プログラムをプログラム実行装置(例えばコンピュータ)上で実行することによって、その演算処理の全部または一部を実現するようにしてもよい。   The imaging device (1 or 1a) according to the present invention can be realized by hardware or a combination of hardware and software. In particular, the arithmetic processing executed by each part shown in FIG. 10, FIG. 18, or FIG. 20 can be realized by software, hardware, or a combination of hardware and software. When the imaging apparatus is configured using software, a block diagram of a part realized by software represents a functional block diagram of the part. All or part of the arithmetic processing may be described as a program, and the program may be executed on a program execution device (for example, a computer) to realize all or part of the arithmetic processing.

本発明の実施形態に係り、レンズが有する軸上色収差の特性を説明するための図である。It is a figure for demonstrating the characteristic of the axial chromatic aberration which a lens concerns on embodiment of this invention. 本発明の実施形態に係り、点光源、軸上色収差を有するレンズ、各色光の結像点及び撮像素子の位置関係を示す図であって、(a)は点光源及びレンズ間距離が比較的小さい場合のそれを、(a)は点光源及びレンズ間距離が中程度である場合のそれを、(c)は点光源及びレンズ間距離が比較的大きい場合のそれを表す。FIG. 4 is a diagram illustrating a positional relationship between a point light source, a lens having axial chromatic aberration, an image formation point of each color light, and an image pickup device according to an embodiment of the present invention, and FIG. (A) shows that when the distance between the point light source and the lens is medium, and (c) shows that when the distance between the point light source and the lens is relatively large. 本発明の実施形態に係り、点光源、軸上色収差を有するレンズ及び撮像素子の位置関係と、撮像素子上における各色光の像の広がりを示す図である。FIG. 4 is a diagram illustrating a positional relationship among a point light source, a lens having axial chromatic aberration and an image sensor, and a spread of an image of each color light on the image sensor according to the embodiment of the present invention. 本発明の実施形態に係り、軸上色収差を有するレンズを介して得られた撮影画像における色信号の解像度特性を示す図である。It is a figure which shows the resolution characteristic of the color signal in the picked-up image obtained through the lens which has an axial chromatic aberration according to embodiment of this invention. 本発明の実施形態に係り、軸上色収差を有するレンズを介して得られた撮影画像における色信号の解像度特性を示す図である。It is a figure which shows the resolution characteristic of the color signal in the picked-up image obtained through the lens which has an axial chromatic aberration according to embodiment of this invention. 本発明の第1実施形態に係る撮像装置の全体ブロック図である。1 is an overall block diagram of an imaging apparatus according to a first embodiment of the present invention. 本発明の第1実施形態に係り、原画像から中間生成画像の生成を介して補正画像が生成される原理を説明するための図である。FIG. 6 is a diagram for describing a principle that a corrected image is generated from an original image through generation of an intermediate generated image according to the first embodiment of the present invention. 本発明の第1実施形態の具体例に係る2つの被写体距離(D1及びD2)を説明するための図である。It is a diagram for explaining the two subject distance according to the specific example of the first embodiment of the present invention (D 1 and D 2). 2つの被写体距離(D1及びD2)における2つの被写体と、原画像上における該2つの被写体の像を示す図である。FIG. 3 is a diagram illustrating two subjects at two subject distances (D 1 and D 2 ) and images of the two subjects on an original image. 図6に示される高域成分抽出/距離推定部及び被写界深度拡大処理部の内部ブロック図である。FIG. 7 is an internal block diagram of a high frequency component extraction / distance estimation unit and a depth of field expansion processing unit shown in FIG. 6. 原画像、中間生成画像及び補正画像上における画素位置の意義を説明するためのである。This is for explaining the significance of the pixel positions on the original image, the intermediate generation image, and the corrected image. 図10の高域成分抽出/距離推定部にて生成される値の特性を示す図である。It is a figure which shows the characteristic of the value produced | generated in the high region component extraction / distance estimation part of FIG. 図10の高域成分抽出/距離推定部による被写体距離推定方法を説明するための図である。It is a figure for demonstrating the to-be-photographed object distance estimation method by the high region component extraction / distance estimation part of FIG. 図6に示される被写界深度制御部の内部ブロック図である。FIG. 7 is an internal block diagram of a depth of field control unit shown in FIG. 6. 図14の被写界深度制御部にて実行される処理の内容を説明するための図である。It is a figure for demonstrating the content of the process performed in the depth-of-field control part of FIG. 図14の被写界深度制御部にて実行される処理の内容を説明するための図である。It is a figure for demonstrating the content of the process performed in the depth-of-field control part of FIG. 本発明の第2実施形態に係る撮像装置の全体ブロック図である。It is a whole block diagram of the imaging device concerning a 2nd embodiment of the present invention. 図17に示される被写界深度制御部の内部ブロック図である。FIG. 18 is an internal block diagram of a depth of field control unit shown in FIG. 17. 図18の被写界深度制御部にて実行される処理の内容を説明するための図である。It is a figure for demonstrating the content of the process performed in the depth-of-field control part of FIG. 図17に示される被写界深度制御部の変形内部ブロック図である。FIG. 18 is a modified internal block diagram of the depth of field control unit shown in FIG. 17. 本発明の第3実施形態に係り、撮影モードにて補正画像が生成される場合における動作フローチャートである。10 is an operation flowchart according to the third embodiment of the present invention when a corrected image is generated in a shooting mode. 本発明の第3実施形態に係り、再生モードにて補正画像が生成される場合における動作フローチャートである。14 is an operation flowchart according to the third embodiment of the present invention when a corrected image is generated in a reproduction mode. 従来技術に係り、軸上色収差を有さないレンズと撮像素子と撮像素子への入射光との関係を示す図である。It is a figure which concerns on a prior art and is a figure which shows the relationship between the lens which does not have an axial chromatic aberration, an image pick-up element, and the incident light to an image pick-up element. 従来技術に係り、軸上色収差を有さないレンズを介して得られた撮影画像における色信号の解像度特性を示す図である。It is a figure which concerns on the prior art and is a figure which shows the resolution characteristic of the color signal in the picked-up image obtained through the lens which does not have an axial chromatic aberration.

符号の説明Explanation of symbols

1、1a 撮像装置
10 光学系
11 撮像素子
14 デモザイキング処理部
15、15a 高域成分抽出/距離推定部
16 被写界深度拡大処理部
17、26、26a 被写界深度制御部
DESCRIPTION OF SYMBOLS 1, 1a Imaging device 10 Optical system 11 Image sensor 14 Demosaicing processing part 15, 15a High frequency component extraction / distance estimation part 16 Depth of field expansion processing part 17, 26, 26a Depth of field control part

Claims (6)

軸上色収差を有する光学系を介して被写体を撮影する撮像素子と、
撮影画像を表す複数色の色信号に含まれる所定の高域周波数成分を色信号ごとに抽出し、色信号ごとの高域周波数成分の大きさに基づいて、前記撮影画像中の各部分画像領域における被写体距離を推定する被写体距離推定手段と、
前記撮影画像から補正画像を生成する画像処理手段と、
前記補正画像に対する被写界深度の深さを指定するとともに、その被写界深度内に位置すべき特定被写体距離を指定することにより、前記補正画像に対する被写界深度を設定する設定手段と、を備え、
前記画像処理手段は、前記被写体距離推定手段による推定被写体距離と前記設定手段による設定被写界深度に応じた画像処理を前記撮影画像に施すことによって、前記設定被写界深度に従った前記補正画像を生成する
ことを特徴とする撮像装置。
An image sensor for photographing a subject through an optical system having axial chromatic aberration;
Predetermined high frequency components included in a plurality of color signals representing a captured image are extracted for each color signal, and each partial image region in the captured image is based on the size of the high frequency component for each color signal Subject distance estimating means for estimating the subject distance at
Image processing means for generating a corrected image from the captured image;
Setting means for setting the depth of field for the corrected image by specifying the depth of the depth of field for the corrected image and specifying a specific subject distance to be positioned within the depth of field; With
The image processing means performs the image processing according to the estimated subject distance by the subject distance estimation means and the set depth of field by the setting means on the captured image, so that the correction according to the set depth of field is performed. An imaging device that generates an image.
前記設定被写界深度と前記撮影画像中の各部分画像領域における推定被写体距離とに基づいて、前記撮影画像及び前記補正画像の夫々の全体画像領域は、対応する推定被写体距離が前記設定被写界深度内に収まる第1部分画像領域と対応する推定被写体距離が前記設定被写界深度外に位置する第2部分画像領域に分類され、
前記画像処理手段は、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように、前記撮影画像から前記補正画像を生成する
ことを特徴とする請求項1に記載の撮像装置。
Based on the set depth of field and the estimated subject distance in each partial image area in the captured image, the entire estimated image distance of each of the captured image and the corrected image has a corresponding estimated subject distance. The estimated subject distance corresponding to the first partial image area falling within the depth of field is classified into the second partial image area located outside the set depth of field,
The image processing unit generates the corrected image from the captured image so that an image in the second partial image region is blurred in the corrected image compared with an image in the first partial image region. The imaging device according to claim 1.
前記複数色の色信号は、互いに異なる第1、第2及び第3の色信号から成り、
前記画像処理手段は、
第1〜第3の色信号の高域周波数成分の大きさの内、最大の大きさに対応する色信号の高域周波数成分を他の2つの色信号に付加することにより、第1〜第3の高域付加後色信号を生成する第1補正手段と、
前記第1〜第3の高域付加後色信号に対して所定のフィルタリングを施すことにより、前記第1〜第3の高域付加後色信号から前記補正画像を表す第1〜第3の補正色信号を生成する第2補正手段と、を備え、
前記第2補正手段は、前記設定被写界深度と前記撮影画像中の各部分画像領域における推定被写体距離とに基づき、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように前記フィルタリングを実行する
ことを特徴とする請求項2に記載の撮像装置。
The color signals of the plurality of colors are composed of different first, second and third color signals,
The image processing means includes
By adding the high frequency component of the color signal corresponding to the maximum size among the high frequency components of the first to third color signals to the other two color signals, First correction means for generating a color signal after addition of 3 high frequency bands,
The first to third corrections representing the corrected image from the first to third post-high-frequency-added color signals by performing predetermined filtering on the first to third high-pass-added color signals. Second correction means for generating a color signal,
The second correction unit is configured to determine whether an image in the second partial image area in the corrected image is within the first partial image area based on the set depth of field and an estimated subject distance in each partial image area in the captured image. The imaging apparatus according to claim 2, wherein the filtering is performed so that the image is blurred compared to the image of the image.
前記撮影画像中の各部分画像領域における推定被写体距離から、前記撮影画像中の各部分画像領域における色信号ごとの、前記軸上色収差に由来する点広がり関数が定まり、
前記画像処理手段は、前記点広がり関数、前記設定被写界深度、及び、前記撮影画像中の各部分画像領域における推定被写体距離に基づき、前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように、前記撮影画像から前記補正画像を生成する
ことを特徴とする請求項2に記載の撮像装置。
From the estimated subject distance in each partial image region in the captured image, a point spread function derived from the axial chromatic aberration for each color signal in each partial image region in the captured image is determined,
The image processing means is configured to determine whether the image in the second partial image area in the corrected image is based on the point spread function, the set depth of field, and the estimated subject distance in each partial image area in the captured image. The imaging apparatus according to claim 2, wherein the correction image is generated from the captured image so as to be blurred compared with an image in one partial image region.
前記画像処理手段は、前記点広がり関数から推定される、前記軸上色収差に由来する前記撮影画像中の各部分画像領域におけるボケ量を、前記補正画像中の各部分画像領域における設定ボケ量へと修正するためのフィルタリングを前記撮影画像の各色信号に対して実行することにより、前記設定ボケ量に応じてぼかされた前記補正画像を生成し、
前記補正画像において第2部分画像領域内の画像が第1部分画像領域内の画像と比べてぼかされるように、前記設定被写界深度と前記撮影画像中の各部分画像領域における推定被写体距離とに基づいて前記設定ボケ量は定められる
ことを特徴とする請求項3に記載の撮像装置。
The image processing means converts a blur amount in each partial image region in the captured image derived from the axial chromatic aberration, estimated from the point spread function, to a set blur amount in each partial image region in the corrected image. And generating the corrected image blurred according to the set blur amount by performing filtering for correcting each color signal of the captured image,
In the corrected image, the set depth of field and the estimated subject distance in each partial image region in the photographed image so that the image in the second partial image region is blurred compared with the image in the first partial image region. The imaging apparatus according to claim 3, wherein the set blur amount is determined based on the image quality.
前記撮影画像を表示する表示手段を更に備え、
前記撮影画像の撮影後、前記撮影画像又は前記撮影画像に基づく画像が前記表示手段の表示画面上に表示され、
前記設定手段は、その表示が行われている状態において、前記表示画面上の特定被写体を指定する操作を受け付けて前記特定被写体に対応する推定被写体距離から前記特定被写体距離を指定する一方、所定操作を受け付けることによって前記補正画像に対する被写界深度の深さを指定する
ことを特徴とする請求項1〜請求項5の何れかに記載の撮像装置。
It further comprises display means for displaying the photographed image,
After shooting the shot image, the shot image or an image based on the shot image is displayed on the display screen of the display means,
The setting means accepts an operation for designating a specific subject on the display screen while the display is being performed, and designates the specific subject distance from an estimated subject distance corresponding to the specific subject, while performing a predetermined operation The imaging apparatus according to claim 1, wherein the depth of field with respect to the corrected image is specified by receiving the correction image.
JP2008243665A 2008-09-24 2008-09-24 Image pickup apparatus Pending JP2010081002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008243665A JP2010081002A (en) 2008-09-24 2008-09-24 Image pickup apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008243665A JP2010081002A (en) 2008-09-24 2008-09-24 Image pickup apparatus

Publications (1)

Publication Number Publication Date
JP2010081002A true JP2010081002A (en) 2010-04-08

Family

ID=42210997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008243665A Pending JP2010081002A (en) 2008-09-24 2008-09-24 Image pickup apparatus

Country Status (1)

Country Link
JP (1) JP2010081002A (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011176487A (en) * 2010-02-23 2011-09-08 Toshiba Corp Signal processing device, and imaging device
CN102985788A (en) * 2010-07-23 2013-03-20 丰田自动车株式会社 Distance measurement device and distance measurement method
US8908068B2 (en) 2011-04-13 2014-12-09 Sony Corporation Image pickup device and image pickup unit to form composite image
US9638916B2 (en) 2014-05-19 2017-05-02 Socionext Inc. Image processing device for correcting chromatic aberration
WO2017186851A1 (en) * 2016-04-28 2017-11-02 Trinamix Gmbh Detector for optically detecting at least one object
WO2018003502A1 (en) * 2016-06-28 2018-01-04 ソニー株式会社 Imaging device, imaging method, and program
CN109416402A (en) * 2016-04-28 2019-03-01 特里纳米克斯股份有限公司 Detector at least one object of optical detection
US10353049B2 (en) 2013-06-13 2019-07-16 Basf Se Detector for optically detecting an orientation of at least one object
US10412283B2 (en) 2015-09-14 2019-09-10 Trinamix Gmbh Dual aperture 3D camera and method using differing aperture areas
US10775505B2 (en) 2015-01-30 2020-09-15 Trinamix Gmbh Detector for an optical detection of at least one object
US10823818B2 (en) 2013-06-13 2020-11-03 Basf Se Detector for optically detecting at least one object
US10890491B2 (en) 2016-10-25 2021-01-12 Trinamix Gmbh Optical detector for an optical detection
JP2021501946A (en) * 2017-11-03 2021-01-21 グーグル エルエルシーGoogle LLC Aperture monitoring for single-view depth prediction
US10948567B2 (en) 2016-11-17 2021-03-16 Trinamix Gmbh Detector for optically detecting at least one object
US10955936B2 (en) 2015-07-17 2021-03-23 Trinamix Gmbh Detector for optically detecting at least one object
US11041718B2 (en) 2014-07-08 2021-06-22 Basf Se Detector for determining a position of at least one object
US11060922B2 (en) 2017-04-20 2021-07-13 Trinamix Gmbh Optical detector
US11067692B2 (en) 2017-06-26 2021-07-20 Trinamix Gmbh Detector for determining a position of at least one object
US11125880B2 (en) 2014-12-09 2021-09-21 Basf Se Optical detector
US11211513B2 (en) 2016-07-29 2021-12-28 Trinamix Gmbh Optical sensor and detector for an optical detection
US11428787B2 (en) 2016-10-25 2022-08-30 Trinamix Gmbh Detector for an optical detection of at least one object
US11860292B2 (en) 2016-11-17 2024-01-02 Trinamix Gmbh Detector and methods for authenticating at least one object

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8804025B2 (en) 2010-02-23 2014-08-12 Kabushiki Kaisha Toshiba Signal processing device and imaging device
JP2011176487A (en) * 2010-02-23 2011-09-08 Toshiba Corp Signal processing device, and imaging device
CN102985788A (en) * 2010-07-23 2013-03-20 丰田自动车株式会社 Distance measurement device and distance measurement method
US8908068B2 (en) 2011-04-13 2014-12-09 Sony Corporation Image pickup device and image pickup unit to form composite image
US10353049B2 (en) 2013-06-13 2019-07-16 Basf Se Detector for optically detecting an orientation of at least one object
US10845459B2 (en) 2013-06-13 2020-11-24 Basf Se Detector for optically detecting at least one object
US10823818B2 (en) 2013-06-13 2020-11-03 Basf Se Detector for optically detecting at least one object
US9638916B2 (en) 2014-05-19 2017-05-02 Socionext Inc. Image processing device for correcting chromatic aberration
US11041718B2 (en) 2014-07-08 2021-06-22 Basf Se Detector for determining a position of at least one object
US11125880B2 (en) 2014-12-09 2021-09-21 Basf Se Optical detector
US10775505B2 (en) 2015-01-30 2020-09-15 Trinamix Gmbh Detector for an optical detection of at least one object
US10955936B2 (en) 2015-07-17 2021-03-23 Trinamix Gmbh Detector for optically detecting at least one object
US10412283B2 (en) 2015-09-14 2019-09-10 Trinamix Gmbh Dual aperture 3D camera and method using differing aperture areas
CN109416249A (en) * 2016-04-28 2019-03-01 特里纳米克斯股份有限公司 Detector at least one object of optical detection
WO2017186851A1 (en) * 2016-04-28 2017-11-02 Trinamix Gmbh Detector for optically detecting at least one object
CN109416402A (en) * 2016-04-28 2019-03-01 特里纳米克斯股份有限公司 Detector at least one object of optical detection
JPWO2018003502A1 (en) * 2016-06-28 2019-04-18 ソニー株式会社 Imaging apparatus, imaging method, program
CN109314749A (en) * 2016-06-28 2019-02-05 索尼公司 Imaging device, imaging method and program
US10742872B2 (en) 2016-06-28 2020-08-11 Sony Corporation Imaging device, imaging method, and program
WO2018003502A1 (en) * 2016-06-28 2018-01-04 ソニー株式会社 Imaging device, imaging method, and program
US11425298B2 (en) 2016-06-28 2022-08-23 Sony Corporation Imaging device, imaging method, and program
US11211513B2 (en) 2016-07-29 2021-12-28 Trinamix Gmbh Optical sensor and detector for an optical detection
US10890491B2 (en) 2016-10-25 2021-01-12 Trinamix Gmbh Optical detector for an optical detection
US11428787B2 (en) 2016-10-25 2022-08-30 Trinamix Gmbh Detector for an optical detection of at least one object
US11860292B2 (en) 2016-11-17 2024-01-02 Trinamix Gmbh Detector and methods for authenticating at least one object
US11698435B2 (en) 2016-11-17 2023-07-11 Trinamix Gmbh Detector for optically detecting at least one object
US11415661B2 (en) 2016-11-17 2022-08-16 Trinamix Gmbh Detector for optically detecting at least one object
US10948567B2 (en) 2016-11-17 2021-03-16 Trinamix Gmbh Detector for optically detecting at least one object
US11635486B2 (en) 2016-11-17 2023-04-25 Trinamix Gmbh Detector for optically detecting at least one object
US11060922B2 (en) 2017-04-20 2021-07-13 Trinamix Gmbh Optical detector
US11067692B2 (en) 2017-06-26 2021-07-20 Trinamix Gmbh Detector for determining a position of at least one object
JP2021501946A (en) * 2017-11-03 2021-01-21 グーグル エルエルシーGoogle LLC Aperture monitoring for single-view depth prediction
JP7013578B2 (en) 2017-11-03 2022-01-31 グーグル エルエルシー Aperture monitoring for single-view depth prediction

Similar Documents

Publication Publication Date Title
JP2010081002A (en) Image pickup apparatus
JP5300133B2 (en) Image display device and imaging device
US8659672B2 (en) Image processing apparatus and image pickup apparatus using same
JP4315971B2 (en) Imaging device
US8018520B2 (en) Imaging device, imaging method, display control device, display control method, and program
JP5213688B2 (en) Imaging device
JP5123137B2 (en) Imaging apparatus and imaging method
WO2014122804A1 (en) Image processing device, image capture device, image processing method, and program
JP2006345054A (en) Image pickup apparatus
JP2005347811A (en) White balance correction apparatus and white balance correction method, program and electronic camera apparatus
JP4596987B2 (en) Imaging device
JP2007102061A (en) Imaging apparatus
JP2006345053A (en) Image pickup apparatus
US10762600B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable recording medium
JP2002335454A (en) Image processing unit, image processing method and imaging apparatus
JP5933306B2 (en) Imaging device
JP2009055415A (en) Camera
JP5284183B2 (en) Image processing apparatus and method
US11108944B2 (en) Image processing apparatus for providing information for confirming depth range of image, control method of the same, and storage medium
JP4781670B2 (en) Imaging device
JP6547742B2 (en) Imaging control apparatus, imaging apparatus and imaging control method
JP4449692B2 (en) Electronic camera
WO2023166912A1 (en) Image processing device, image processing method, and program
JP2012216947A (en) Image pickup device and image processing method
JP2017224915A (en) Imaging apparatus, reproducing device and image processing system