JP5614256B2 - Imaging apparatus, image processing apparatus, and imaging method - Google Patents

Imaging apparatus, image processing apparatus, and imaging method Download PDF

Info

Publication number
JP5614256B2
JP5614256B2 JP2010257542A JP2010257542A JP5614256B2 JP 5614256 B2 JP5614256 B2 JP 5614256B2 JP 2010257542 A JP2010257542 A JP 2010257542A JP 2010257542 A JP2010257542 A JP 2010257542A JP 5614256 B2 JP5614256 B2 JP 5614256B2
Authority
JP
Japan
Prior art keywords
image
imaging
subject
partial
psf
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010257542A
Other languages
Japanese (ja)
Other versions
JP2012109826A (en
JP2012109826A5 (en
Inventor
由樹雄 平井
由樹雄 平井
聡 下川
聡 下川
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010257542A priority Critical patent/JP5614256B2/en
Publication of JP2012109826A publication Critical patent/JP2012109826A/en
Publication of JP2012109826A5 publication Critical patent/JP2012109826A5/ja
Application granted granted Critical
Publication of JP5614256B2 publication Critical patent/JP5614256B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Description

本発明は、撮像装置、画像処理装置および撮像方法に関する。   The present invention relates to an imaging apparatus, an image processing apparatus, and an imaging method.

デジタル方式の撮像装置は、一般に、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)センサなどの固体撮像素子に被写体を結像させることで、撮像動作を行う。近年、このような撮像装置に適用される技術として、WFC(Wavefront Coding)と呼ばれる技術が注目されている。   In general, a digital imaging apparatus performs an imaging operation by forming an image of a subject on a solid-state imaging device such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) sensor. In recent years, a technique called WFC (Wavefront Coding) has attracted attention as a technique applied to such an imaging apparatus.

WFC技術が採用された撮像装置では、固体撮像素子に対する被写体からの光路上に、位相変調素子が配置される。位相変調素子は、被写体から発せられる光束を規則的に分散させ、固体撮像素子の受光面に結ぶ像を変形させる。これにより、固体撮像素子からは、ピントがずれた状態の画像が得られ、このときに得られる画像は「中間画像」と呼ばれる。撮像装置は、固体撮像素子から得られた中間画像に対して、点像分布関数(PSF:Point Spread Function)を用いたデジタル処理を施すことにより、被写体の画像を復元する。   In an imaging apparatus employing the WFC technology, a phase modulation element is disposed on an optical path from a subject with respect to a solid-state imaging element. The phase modulation element regularly disperses the light beam emitted from the subject and deforms the image connected to the light receiving surface of the solid-state imaging element. As a result, an image out of focus is obtained from the solid-state imaging device, and the image obtained at this time is called an “intermediate image”. The imaging apparatus restores an image of a subject by performing digital processing using a point spread function (PSF) on an intermediate image obtained from a solid-state imaging device.

位相変調素子を用いて得られた中間画像に生じるボケの度合いは、撮像装置と被写体との距離が変動した場合であっても、大きく変動しない。このことから、ボケ度合いの変動量が小さい中間画像に対してデジタル処理を施して被写体の画像を復元することにより、被写界深度を拡大することができる。   The degree of blur occurring in the intermediate image obtained using the phase modulation element does not vary greatly even when the distance between the imaging device and the subject varies. Therefore, the depth of field can be expanded by performing digital processing on the intermediate image with a small fluctuation amount of the degree of blur to restore the subject image.

このようなWFC技術は、デジタルカメラなどの一般的なカメラ製品の他、電子内視鏡システムに搭載された撮像機構に採用することも考えられている。
なお、PSFを用いた画像処理を行う他の撮像装置としては、撮影画像内の小領域ごとに点像分布関数(PSF:Point Spread Function)を算出し、算出した点像分布関数を基に、色収差によるボケを解消するようにしたものがある。
Such WFC technology is also considered to be adopted in an imaging mechanism mounted on an electronic endoscope system in addition to a general camera product such as a digital camera.
In addition, as another imaging apparatus that performs image processing using PSF, a point spread function (PSF) is calculated for each small region in the captured image, and based on the calculated point spread function, There is one that eliminates the blur caused by chromatic aberration.

特開2003−235794号公報JP 2003-235794 A 特開2010−147926号公報JP 2010-147926 A

Edward R. Dowski, Jr. and W. Thomas Cathey, "Extended depth of field through wave-front coding", Applied Optics, vol.34, no.11, April, 1995, pp. 1859-1866Edward R. Dowski, Jr. and W. Thomas Cathey, "Extended depth of field through wave-front coding", Applied Optics, vol.34, no.11, April, 1995, pp. 1859-1866

上記のWFC技術において、被写体からの距離によらずボケ度合いの変動量が小さいということは、被写体からの距離によらずPSFの変動量が小さいことを意味する。このため、画像の復元時には、被写体からの距離に関係なく、位相変調素子を含む光学系の設計値から求めた同一のPSFを用いて画像処理が行われる。しかしながら、光学系の製造誤差などの原因により、画像復元時に用いるPSFと、実際の光学系におけるPSFとは、微妙に異なる場合がある。   In the above WFC technology, the fact that the fluctuation amount of the blur degree is small regardless of the distance from the subject means that the fluctuation amount of the PSF is small regardless of the distance from the subject. For this reason, at the time of image restoration, image processing is performed using the same PSF obtained from the design value of the optical system including the phase modulation element regardless of the distance from the subject. However, the PSF used at the time of image restoration may be slightly different from the PSF in the actual optical system due to a manufacturing error of the optical system.

WFC技術では、画像の処理時に用いるPSFの精度が、画像の復元精度に直結する。画像復元時に用いるPSFと、実際の光学系の設計値に基づくPSFとの誤差がある場合、復元された画像にゴーストが発生するなど、画像の復元精度が劣化するという問題があった。   In the WFC technology, the accuracy of the PSF used at the time of image processing is directly linked to the image restoration accuracy. When there is an error between the PSF used at the time of image restoration and the PSF based on the actual design value of the optical system, there is a problem that the restoration accuracy of the image is deteriorated, for example, a ghost is generated in the restored image.

本発明はこのような課題に鑑みてなされたものであり、被写界深度が拡大された画像を高精度に生成することが可能な撮像装置、画像処理装置および撮像方法を提供することを目的とする。   The present invention has been made in view of such a problem, and an object thereof is to provide an imaging apparatus, an image processing apparatus, and an imaging method capable of generating an image with an increased depth of field with high accuracy. And

上記課題を解決するために、被写体からの光を位相変調素子を通じて受光する撮像素子と、前記撮像素子によって得られた撮像画像から、点画像が分散された領域を含む部分画像を抽出する画像抽出部と、前記画像抽出部によって抽出された前記部分画像を点像分布関数として用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する処理を施す復元処理部と、を有する撮像装置が提供される。   In order to solve the above problems, an image sensor that receives light from a subject through a phase modulation element, and an image extraction that extracts a partial image including a region in which point images are dispersed from a captured image obtained by the image sensor. And a restoration processing unit that uses the partial image extracted by the image extraction unit as a point spread function and performs a process of restoring a subject image on the captured image obtained by the imaging device. An apparatus is provided.

また、上記課題を解決するために、上記の撮像装置と同様の処理が実行される画像処理装置および撮像方法が提供される。   In order to solve the above problems, an image processing apparatus and an imaging method are provided in which processing similar to that of the imaging apparatus is executed.

上記の撮像装置、画像処理装置および撮像方法によれば、被写界深度が拡大された画像を高精度に生成することができる。   According to the above imaging device, image processing device, and imaging method, an image with an expanded depth of field can be generated with high accuracy.

第1の実施の形態に係る撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which concerns on 1st Embodiment. 第2の実施の形態に係る撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which concerns on 2nd Embodiment. 位相板の形状例を示す図である。It is a figure which shows the example of a shape of a phase plate. PSFの例を示す図である。It is a figure which shows the example of PSF. 位相板を用いないで撮像された画像におけるMTFの分布例を示すグラフである。It is a graph which shows the example of distribution of MTF in the image imaged without using a phase plate. 位相板を用いて撮像された画像におけるMTFの分布例を示すグラフである。It is a graph which shows the example of distribution of MTF in the image imaged using the phase plate. 画像の復元に使用する逆フィルタの特性例を示すグラフである。It is a graph which shows the example of a characteristic of the inverse filter used for restoration | reconstruction of an image. 図7の逆フィルタを用いて被写体像が復元された画像におけるMTFの分布例を示すグラフである。It is a graph which shows the example of distribution of MTF in the image by which the to-be-photographed image was decompress | restored using the inverse filter of FIG. 第2の実施の形態に係る撮像装置の撮像処理手順を示すフローチャートである。It is a flowchart which shows the imaging process procedure of the imaging device which concerns on 2nd Embodiment. 第3の実施の形態に係る撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which concerns on 3rd Embodiment. PSF検出モードにおける撮像動作例を示す第1の図である。It is a 1st figure which shows the example of an imaging operation in PSF detection mode. PSF検出モードにおける撮像動作例を示す第2の図である。It is a 2nd figure which shows the imaging operation example in PSF detection mode. PSF検出モードにおける撮像動作例を示す第3の図である。It is a 3rd figure which shows the imaging operation example in PSF detection mode. 第3の実施の形態に係る撮像装置のPSF検出モードにおける撮像処理手順を示すフローチャートである。12 is a flowchart illustrating an imaging process procedure in a PSF detection mode of an imaging apparatus according to a third embodiment. 第3の実施の形態に係る撮像装置の本撮像モードにおける撮像処理手順を示すフローチャートである。12 is a flowchart illustrating an imaging processing procedure in a main imaging mode of an imaging apparatus according to a third embodiment. PSF検出モードにおいて撮像の対象とする被写体の例を示す図である。It is a figure which shows the example of the to-be-photographed object to be imaged in PSF detection mode. 第4の実施の形態に係る撮像装置のPSF検出モードにおける撮像処理手順を示すフローチャートである。14 is a flowchart illustrating an imaging process procedure in a PSF detection mode of an imaging apparatus according to a fourth embodiment. 第5の実施の形態に係る撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which concerns on 5th Embodiment. 第5の実施の形態に係る撮像装置の撮像処理手順を示すフローチャートである。14 is a flowchart illustrating an imaging processing procedure of an imaging apparatus according to a fifth embodiment. 第6の実施の形態に係る撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device which concerns on 6th Embodiment. PSF検出モードにおいて撮像の対象とする被写体の例を示す図である。It is a figure which shows the example of the to-be-photographed object to be imaged in PSF detection mode. 部分画像を抽出する領域の設定例を示す図である。It is a figure which shows the example of a setting of the area | region which extracts a partial image. 中間画像を分割した分割領域の例を示す図である。It is a figure which shows the example of the division area which divided | segmented the intermediate image. 第6の実施の形態に係る撮像装置のPSF検出モードにおける撮像処理手順を示すフローチャートである。14 is a flowchart illustrating an imaging process procedure in a PSF detection mode of an imaging apparatus according to a sixth embodiment. 第6の実施の形態に係る撮像装置の本撮像モードにおける撮像処理手順を示すフローチャートである。19 is a flowchart illustrating an imaging processing procedure in a main imaging mode of an imaging apparatus according to a sixth embodiment.

以下、実施の形態について図面を参照して詳細に説明する。
〔第1の実施の形態〕
図1は、第1の実施の形態に係る撮像装置の構成例を示す図である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram illustrating a configuration example of an imaging apparatus according to the first embodiment.

図1に示す撮像装置1は、撮像素子11によって被写体像を撮像するデジタル方式の撮像装置である。また、この撮像装置1は、WFC技術によって被写界深度が拡大された画像を撮像可能になっている。すなわち、撮像素子11は、被写体からの光を位相変調素子12を通じて受光する。位相変調素子12は、入射した被写体像を一定の方向に分散させる。撮像装置1では、撮像素子11によって得られた撮像画像に対して、点像分布関数(PSF)を用いて画像処理を施すことで、被写界深度が拡大された被写体像を復元できるようになっている。   An imaging apparatus 1 illustrated in FIG. 1 is a digital imaging apparatus that captures a subject image with an imaging element 11. In addition, the imaging apparatus 1 can capture an image whose depth of field is expanded by the WFC technology. That is, the image sensor 11 receives light from the subject through the phase modulation element 12. The phase modulation element 12 disperses the incident subject image in a certain direction. In the imaging apparatus 1, a subject image with an expanded depth of field can be restored by performing image processing on a captured image obtained by the imaging element 11 using a point spread function (PSF). It has become.

なお、図示しないが、撮像素子11の被写体側には、位相変調素子12の他、レンズなどの光学部材が配置される。レンズは、例えば、位相変調素子12の被写体側、または位相変調素子12の撮像素子11側、またはそれら両方に配置される。   Although not shown, an optical member such as a lens is disposed in addition to the phase modulation element 12 on the subject side of the imaging element 11. The lens is disposed, for example, on the subject side of the phase modulation element 12 or on the imaging element 11 side of the phase modulation element 12, or both.

ここで、被写体像を復元する際の演算処理の例について説明し、その後に、図1の構成についてあらためて説明する。
位相変調素子12を用いて撮像された画像、すなわち、図1の撮像素子11から得られる撮像画像は、中間画像と呼ばれる。ここで、中間画像を「h」、PSFを「g」、位相変調素子12を通過せずに撮像素子11に入射したときに撮像される被写体画像を「f」とすると、「h」「g」「f」の間には次の式(1)の関係が成り立つ。
Here, an example of arithmetic processing when restoring the subject image will be described, and then the configuration of FIG. 1 will be described again.
An image picked up using the phase modulation element 12, that is, a picked-up image obtained from the image pickup element 11 of FIG. 1 is called an intermediate image. Here, if the intermediate image is “h”, the PSF is “g”, and the subject image captured when entering the image sensor 11 without passing through the phase modulation element 12 is “f”, “h” “g” The relationship of the following expression (1) is established between “f”.

Figure 0005614256
Figure 0005614256

上記の式(1)をフーリエ変換すると、次の式(2)のようになる。
F・G=H ・・・(2)
上記の式(2)のうち、PSF「g」をフーリエ変換した結果である「G」は、光学伝達関数(OTF:Optical Transfer Function)であり、結像光学系における空間周波数の伝達特性を表す。なお、OTFの絶対値は、MTF(Modulation Transfer Function)と呼ばれる。
When the above equation (1) is Fourier transformed, the following equation (2) is obtained.
F ・ G = H (2)
In the above formula (2), “G”, which is the result of Fourier transform of PSF “g”, is an optical transfer function (OTF) and represents the spatial frequency transfer characteristic in the imaging optical system. . The absolute value of OTF is called MTF (Modulation Transfer Function).

フーリエ変換後の被写体画像「F」は、下記の式(3)を用いて求めることができる。この式(3)では、中間画像「h」をフーリエ変換した結果である「H」に対して、OTF「G」の逆フィルタ「Hinv」を乗算することで、フーリエ変換後の被写体画像「F」が求められる。従って、被写体画像「f」は、式(3)の「F」を逆フーリエ変換することによって求めることができる。
F=Hinv・H ・・・(3)
なお、式(3)に示した逆フィルタ「Hinv」は、次の式(4)のように表される。
The subject image “F” after the Fourier transform can be obtained using the following equation (3). In this equation (3), “H”, which is the result of Fourier transform of the intermediate image “h”, is multiplied by the inverse filter “H inv ” of OTF “G”, so that the subject image “Fin transformed” F "is required. Accordingly, the subject image “f” can be obtained by performing inverse Fourier transform on “F” in Expression (3).
F = H inv · H (3)
The inverse filter “H inv ” shown in Expression (3) is expressed as the following Expression (4).

Figure 0005614256
Figure 0005614256

また、他の演算方法として、上記の逆フィルタ「Hinv」を逆フーリエ変換することで逆カーネル「hinv」を求め、次の式(5)に示すように、中間画像「h」と逆カーネル「hinv」との畳み込み演算を行うことで、被写体画像「f」を求めることもできる。 As another calculation method, an inverse kernel “h inv ” is obtained by performing an inverse Fourier transform on the above inverse filter “H inv ”, and as shown in the following equation (5), the inverse of the intermediate image “h” is obtained. The subject image “f” can also be obtained by performing a convolution operation with the kernel “h inv ”.

Figure 0005614256
Figure 0005614256

以上の式(1)〜(5)に示したように、WFC技術では、PSFを用いて被写体像の復元演算が行われる。また、位相変調素子を用いて撮像された中間画像に生じるボケの度合いは、撮像装置と被写体との距離によらずほぼ一定となる。このことから、WFC技術では、位相変調素子を含む光学系の設計値から求められる同一のPSFを用いて復元演算を行うことで、被写界深度が拡大された画像を得ることが可能であった。   As shown in the above formulas (1) to (5), in the WFC technology, the subject image restoration calculation is performed using the PSF. In addition, the degree of blur that occurs in the intermediate image captured using the phase modulation element is substantially constant regardless of the distance between the imaging device and the subject. For this reason, in the WFC technology, it is possible to obtain an image with an expanded depth of field by performing a restoration operation using the same PSF obtained from the design value of the optical system including the phase modulation element. It was.

しかしながら、光学系の製造誤差などの要因により、画像復元時に用いられるPSFと、実際の光学系におけるPSFとは、微妙に異なる場合がある。このようなPSFの誤差が発生すると、復元された画像にゴーストが発生するなど、画像の復元精度が劣化する可能性がある。   However, the PSF used at the time of image restoration may be slightly different from the PSF in the actual optical system due to factors such as manufacturing errors of the optical system. When such a PSF error occurs, there is a possibility that the restoration accuracy of the image deteriorates, for example, a ghost occurs in the restored image.

このような問題点に対して、本実施の形態の撮像装置1では、撮像素子11によって実際に撮像された画像からPSFを求め、求めたPSFを用いて被写体像の復元演算を行う。これにより、光学系の製造誤差などによるPSF誤差の発生量を低減し、被写体像をより高精度に復元できるようにする。   In order to solve such a problem, the imaging apparatus 1 according to the present embodiment obtains a PSF from an image actually captured by the imaging element 11, and performs a subject image restoration operation using the obtained PSF. As a result, the amount of PSF error caused by manufacturing errors of the optical system is reduced, and the subject image can be restored with higher accuracy.

図1に示すように、撮像装置1は、撮像素子11、位相変調素子12の他、画像抽出部13および復元処理部14を備えている。画像抽出部13は、撮像素子11によって得られた撮像画像から、点状の画像(点画像)が分散された領域を含む部分画像を抽出する。復元処理部14は、撮像素子11によって得られた撮像画像に対して、被写体像を復元する処理を施す。この復元処理部14は、被写体像の復元処理の際に、画像抽出部13によって抽出された部分画像をPSFとして使用する。   As shown in FIG. 1, the imaging apparatus 1 includes an image extraction unit 13 and a restoration processing unit 14 in addition to the imaging element 11 and the phase modulation element 12. The image extraction unit 13 extracts a partial image including a region in which dot-like images (point images) are dispersed from the captured image obtained by the imaging element 11. The restoration processing unit 14 performs a process of restoring the subject image on the captured image obtained by the imaging element 11. The restoration processing unit 14 uses the partial image extracted by the image extraction unit 13 as the PSF during the subject image restoration processing.

図1の下側には、撮像装置1において撮像される画像の例を示す。撮像画像P1は、撮像素子11によって撮像され、撮像素子11から画像抽出部13に入力される画像である。この撮像画像P1は、「中間画像」とも呼ばれ、主として位相変調素子12の作用により、被写体像にボケが生じた状態になっている。前述のように、位相変調素子12は、入射した被写体像を一定の方向に分散させる。   An example of an image captured by the imaging device 1 is shown on the lower side of FIG. The captured image P <b> 1 is an image captured by the image sensor 11 and input from the image sensor 11 to the image extraction unit 13. This captured image P <b> 1 is also called an “intermediate image” and is in a state where the subject image is blurred mainly due to the action of the phase modulation element 12. As described above, the phase modulation element 12 disperses the incident subject image in a certain direction.

部分画像P2は、画像抽出部13によって、例えば、撮像画像P1の右下側の領域から抽出された画像である。この部分画像P2は、被写体像に含まれる点状の像(点画像)が撮像された領域を含む。部分画像P2内の点画像は、主として位相変調素子12の作用によって分散された状態になっている。従って、部分画像P2における信号分布は、実際に撮像された光学系のPSFを示すことになる。   The partial image P2 is an image extracted from the lower right region of the captured image P1 by the image extraction unit 13, for example. The partial image P2 includes a region where a dot-like image (point image) included in the subject image is captured. The point images in the partial image P2 are in a dispersed state mainly due to the action of the phase modulation element 12. Therefore, the signal distribution in the partial image P2 indicates the PSF of the optical system actually captured.

部分画像P2は、例えば、パターンマッチングによって抽出することができる。この場合、例えば、撮像装置1の光学系の設計値から求めたPSFをとる比較画像を、撮像装置1内のメモリ(図示せず)に記憶しておく。画像抽出部13は、撮像素子11から得られた撮像画像P1に対して、メモリに記憶された比較画像とのパターンマッチングを行い、比較画像と類似する画像領域を部分画像P2として抽出する。   The partial image P2 can be extracted by pattern matching, for example. In this case, for example, a comparative image that takes the PSF obtained from the design value of the optical system of the imaging apparatus 1 is stored in a memory (not shown) in the imaging apparatus 1. The image extraction unit 13 performs pattern matching with the comparison image stored in the memory on the captured image P1 obtained from the imaging element 11, and extracts an image region similar to the comparison image as the partial image P2.

復元処理部14は、抽出された部分画像P2をPSFとして用いて、撮像素子11によって得られた撮像画像に対して、上記の式(3)や式(5)などに従って被写体像を復元する処理を施す。図1の下側に示した画像P3は、画像抽出部13による部分画像P2の抽出対象とされた撮像画像P1と同一の画像から、復元処理部14によって復元されたものである。この場合、復元処理部14によって、撮像画像P1において生じていたボケが解消した画像P3が復元される。   The restoration processing unit 14 uses the extracted partial image P2 as a PSF and restores the subject image according to the above formula (3) and formula (5) with respect to the captured image obtained by the imaging device 11. Apply. An image P3 shown in the lower side of FIG. 1 is restored by the restoration processing unit 14 from the same image as the captured image P1 that is the extraction target of the partial image P2 by the image extraction unit 13. In this case, the restoration processing unit 14 restores the image P3 in which the blur that has occurred in the captured image P1 is eliminated.

この画像P3の例のように、復元処理部14が処理対象とする撮像画像は、画像抽出部13によって部分画像の抽出対象とされた撮像画像と同一であってもよい。あるいは、復元処理部14が処理対象とする撮像画像は、画像抽出部13によって部分画像が抽出された後に、あらためて撮像素子11によって得られた撮像画像であってもよい。これらのいずれの場合でも、復元処理部14は、撮像素子11によって実際に撮像された画像から求められたPSFを用いて被写体像の復元処理を行うので、光学系の設計値から求めたPSFを用いて復元処理を行う場合と比較して、被写体像をより高精度に復元できるようになる。   As in the example of the image P3, the captured image that is the processing target of the restoration processing unit 14 may be the same as the captured image that is the extraction target of the partial image by the image extracting unit 13. Alternatively, the captured image to be processed by the restoration processing unit 14 may be a captured image obtained again by the imaging element 11 after the partial image is extracted by the image extracting unit 13. In any of these cases, the restoration processing unit 14 performs a subject image restoration process using a PSF obtained from an image actually captured by the image sensor 11, and therefore the PSF obtained from the design value of the optical system is obtained. Compared to the case where the restoration process is used, the subject image can be restored with higher accuracy.

なお、上記の画像P3の例のように、復元処理部14が処理対象とする撮像画像が、画像抽出部13によって部分画像の抽出対象とされた撮像画像と同一とされる場合には、撮像装置1と被写体との距離に応じたPSFの誤差も低減し、被写体像をより高精度に復元することもできる。被写体との距離に応じたPSFの誤差が低減される点については、次の第2の実施の形態において詳しく説明する。   In addition, as in the example of the image P3 described above, when the captured image that is the processing target of the restoration processing unit 14 is the same as the captured image that is the extraction target of the partial image by the image extracting unit 13, the imaging is performed. The PSF error corresponding to the distance between the apparatus 1 and the subject is also reduced, and the subject image can be restored with higher accuracy. The point that the PSF error corresponding to the distance from the subject is reduced will be described in detail in the second embodiment.

〔第2の実施の形態〕
図2は、第2の実施の形態に係る撮像装置の構成例を示す図である。
撮像装置100は、光学ブロック110、撮像素子121、A/D(Analog/Digital)コンバータ122、画像復元処理部130、不揮発性記憶部140、DSP(Digital Signal Processor)151、表示部152、メモリカード153、撮像制御部154および入力部155を備える。
[Second Embodiment]
FIG. 2 is a diagram illustrating a configuration example of an imaging apparatus according to the second embodiment.
The imaging apparatus 100 includes an optical block 110, an imaging element 121, an A / D (Analog / Digital) converter 122, an image restoration processing unit 130, a nonvolatile storage unit 140, a DSP (Digital Signal Processor) 151, a display unit 152, and a memory card. 153, an imaging control unit 154, and an input unit 155.

光学ブロック110は、被写体からの光束を撮像素子121に対して集光する光学系を搭載するブロックであり、レンズ111,112、アイリス113、位相板114などを備える。位相板114は、位相変調素子の一例であり、被写体からの光束を規則的に分散させる。なお、図2の例では、位相板114はアイリス113の直後に配置されているが、位相板114の位置はこのような位置に限らない。   The optical block 110 is a block on which an optical system for condensing a light beam from a subject to the image sensor 121 is mounted, and includes lenses 111 and 112, an iris 113, a phase plate 114, and the like. The phase plate 114 is an example of a phase modulation element, and regularly disperses the light beam from the subject. In the example of FIG. 2, the phase plate 114 is disposed immediately after the iris 113, but the position of the phase plate 114 is not limited to such a position.

撮像素子121は、例えば、CCD、CMOSセンサなどとして実現され、光学ブロック110を通じて入射した光をアナログ画像信号に変換する。A/Dコンバータ122は、撮像素子121から出力されたアナログ画像信号をデジタル画像信号に変換する。   The image sensor 121 is realized as, for example, a CCD or a CMOS sensor, and converts light incident through the optical block 110 into an analog image signal. The A / D converter 122 converts the analog image signal output from the image sensor 121 into a digital image signal.

画像復元処理部130は、A/Dコンバータ122から出力された画像信号に対してWFC技術に基づくデジタル画像処理を施すことにより、被写界深度が拡大された画像を復元する。不揮発性記憶部140は、画像復元処理部130での処理時に使用される各種データを記憶する。   The image restoration processing unit 130 performs digital image processing based on the WFC technique on the image signal output from the A / D converter 122 to restore an image with an expanded depth of field. The non-volatile storage unit 140 stores various data used during processing by the image restoration processing unit 130.

DSP151は、画像復元処理部130から出力された画像信号に対して、所定のデジタル画像処理を施す。DSP151は、例えば、各種の画質補正処理、画質補正のための検波処理、表示用画像信号の生成処理、記録用画像信号を生成するための圧縮符号化処理などを実行する。なお、画像復元処理部130の処理機能は、DSP151の一機能として実現されてもよい。   The DSP 151 performs predetermined digital image processing on the image signal output from the image restoration processing unit 130. The DSP 151 executes, for example, various image quality correction processing, detection processing for image quality correction, display image signal generation processing, compression encoding processing for generating recording image signals, and the like. Note that the processing function of the image restoration processing unit 130 may be realized as one function of the DSP 151.

表示部152は、LCD(Liquid Crystal Display)などの表示デバイスなどによって実現され、DSP151から出力された表示用画像信号に基づいて画像を表示する。メモリカード153は、可搬型の半導体記憶装置であり、DSP151から出力された記録用画像信号を記憶する。なお、メモリカード153は、記録用画像信号を記憶する記憶媒体の一例であり、例えば、HDD(Hard Disk Drive)、光ディスクなどの他の種類の記憶媒体に対して画像信号が記憶されてもよい。   The display unit 152 is realized by a display device such as an LCD (Liquid Crystal Display), and displays an image based on a display image signal output from the DSP 151. The memory card 153 is a portable semiconductor storage device, and stores the recording image signal output from the DSP 151. The memory card 153 is an example of a storage medium that stores a recording image signal. For example, the image signal may be stored in another type of storage medium such as an HDD (Hard Disk Drive) or an optical disk. .

入力部155は、シャッタボタンなどの各種の入力スイッチを備える。撮像制御部154は、入力部155のシャッタボタンの押下などをトリガとして、撮像装置100における撮像動作を制御する。撮像制御部154は、例えば、シャッタボタンが押下されたとき、画像復元処理部130に対して、A/Dコンバータ122から取り込んだ撮像画像信号に対するデジタル画像処理を実行させる。   The input unit 155 includes various input switches such as a shutter button. The imaging control unit 154 controls an imaging operation in the imaging apparatus 100 using, for example, pressing of a shutter button of the input unit 155 as a trigger. For example, when the shutter button is pressed, the imaging control unit 154 causes the image restoration processing unit 130 to execute digital image processing on the captured image signal captured from the A / D converter 122.

次に、画像復元処理部130の構成例について説明する。画像復元処理部130は、画像メモリ131、画像抽出部132、コンボリューション制御部133およびコンボリューション演算部134を備える。   Next, a configuration example of the image restoration processing unit 130 will be described. The image restoration processing unit 130 includes an image memory 131, an image extraction unit 132, a convolution control unit 133, and a convolution calculation unit 134.

画像メモリ131は、画像復元処理部130での処理の際の作業領域として使用されるRAM(Random Access Memory)であり、画像データをはじめとする各種のデータを一時的に記憶する。画像メモリ131は、例えば、撮像素子121によって撮像され、A/Dコンバータ122によってデジタル化された撮像画像のRAWデータを、一時的に記憶する。以下、画像メモリ131に記憶される撮像画像のRAWデータを「中間画像データ」と呼び、この中間画像データに基づく画像を「中間画像」と呼ぶ。   The image memory 131 is a RAM (Random Access Memory) that is used as a work area for processing in the image restoration processing unit 130, and temporarily stores various data including image data. For example, the image memory 131 temporarily stores RAW data of a captured image captured by the image sensor 121 and digitized by the A / D converter 122. Hereinafter, RAW data of a captured image stored in the image memory 131 is referred to as “intermediate image data”, and an image based on the intermediate image data is referred to as “intermediate image”.

画像抽出部132は、画像メモリ131に記憶された中間画像データを用いて、中間画像から、点画像が分散された部分領域を抽出する。本実施の形態では、画像抽出部132は、不揮発性記憶部140に記憶された設計PSF141を用いて部分領域を抽出する。設計PSF141は、光学ブロック110内の光学系の設計値を基にシミュレーションなどによって算出されたPSFである。画像抽出部132は、中間画像に対して設計PSF141を用いたパターンマッチングを行うことにより、部分領域を抽出する。   The image extraction unit 132 uses the intermediate image data stored in the image memory 131 to extract a partial area in which point images are dispersed from the intermediate image. In the present embodiment, the image extraction unit 132 extracts a partial region using the design PSF 141 stored in the nonvolatile storage unit 140. The design PSF 141 is a PSF calculated by simulation or the like based on the design value of the optical system in the optical block 110. The image extraction unit 132 extracts a partial region by performing pattern matching using the design PSF 141 on the intermediate image.

コンボリューション制御部133およびコンボリューション演算部134は、画像抽出部132によって抽出された部分画像をPSFとして利用して、画像メモリ131に記憶された中間画像データに対して画像処理を行うことにより、被写体像を復元する処理を行う処理部である。本実施の形態では、コンボリューション演算部134は、前述した式(5)に従って、画像復元の演算を行うものとする。   The convolution control unit 133 and the convolution operation unit 134 perform image processing on the intermediate image data stored in the image memory 131 by using the partial image extracted by the image extraction unit 132 as a PSF. It is a processing unit that performs processing for restoring a subject image. In the present embodiment, the convolution calculation unit 134 performs image restoration calculation according to the above-described equation (5).

コンボリューション制御部133は、画像抽出部132によって抽出された部分画像をPSFとし、このPSFを基に式(5)に示した逆カーネル「hinv」を求めて、コンボリューション演算部134に投入する。なお、逆カーネル「hinv」は、部分画像に基づくPSFをフーリエ変換することで式(4)の「G」を求め、この「G」を用いて式(4)の逆フィルタ「Hinv」を求めた後、逆フィルタ「Hinv」を逆フーリエ変換することによって求めることができる。 The convolution control unit 133 uses the partial image extracted by the image extraction unit 132 as a PSF, obtains the inverse kernel “h inv ” shown in Expression (5) based on this PSF, and inputs it to the convolution calculation unit 134. To do. The inverse kernel “h invobtains “G” in Expression (4) by Fourier transforming the PSF based on the partial image, and uses this “G” to calculate the inverse filter “H inv ” in Expression (4). Can be obtained by performing an inverse Fourier transform on the inverse filter “H inv ”.

図3は、位相板の形状例を示す図である。
本実施の形態で使用される位相板114は、通過する光の位相に対して、例えばexp{iψ(x,y)}のズレを与える。ここで、例としてψ(x,y)=α(x3+y3)/2とすると、位相板114は、一方の面が平面で、他方の面が、図3に示すようなz=iα(x3+y3)/2で表される3次曲面の形状をなす。なお、図3は、xおよびyがともに−1から1までの範囲をとるときの3次曲面の形状を示す。
FIG. 3 is a diagram illustrating a shape example of the phase plate.
The phase plate 114 used in the present embodiment gives, for example, a deviation of exp {iψ (x, y)} to the phase of light passing therethrough. Assuming that ψ (x, y) = α (x 3 + y 3 ) / 2 as an example, the phase plate 114 has one surface being a plane and the other surface being z = iα as shown in FIG. The shape of a cubic surface represented by (x 3 + y 3 ) / 2 is formed. FIG. 3 shows the shape of the cubic curved surface when both x and y are in the range from −1 to 1.

図4は、PSFの例を示す図である。なお、この図4では、わかりやすくするために、信号レベルが高いほど黒く、低いほど白く示している。
図3に示すような位相板114を用いた場合のPSFは、図4のようになる。この図4によれば、図3の位相板114は、通過した光束を左方向および下方向の2方向に分散させる特性を持つことがわかる。
FIG. 4 is a diagram illustrating an example of a PSF. In FIG. 4, for the sake of easy understanding, the signal level is black as it is high and the signal level is white as it is low.
The PSF when the phase plate 114 as shown in FIG. 3 is used is as shown in FIG. According to FIG. 4, it can be seen that the phase plate 114 of FIG. 3 has the characteristic of dispersing the passed light beam in two directions, leftward and downward.

本実施の形態の撮像装置100は、図4に示すようなPSFのデータを設計PSF141として不揮発性記憶部140にあらかじめ記憶しておく。そして、画像抽出部132は、パターンマッチングにより、撮像素子121によって得られた撮像画像から、設計PSF141に類似する信号分布特性を持つ領域を部分領域として抽出する。   The imaging apparatus 100 according to the present embodiment stores PSF data as illustrated in FIG. 4 in the nonvolatile storage unit 140 in advance as a design PSF 141. Then, the image extraction unit 132 extracts a region having signal distribution characteristics similar to the design PSF 141 as a partial region from the captured image obtained by the image sensor 121 by pattern matching.

なお、設計PSF141が図4のようなものとなる場合、画像抽出部132は、パターンマッチングの代わりに、撮像画像から、点状の画像を中心として左および下の2方向に画像の分散が生じた画像を探索することで、部分画像を抽出してもよい。   When the design PSF 141 is as shown in FIG. 4, the image extraction unit 132 causes image dispersion in the left and lower two directions centered on the dotted image from the captured image instead of pattern matching. The partial image may be extracted by searching the obtained image.

ここで、撮像画像の特性について説明する。まず、図5は、位相板を用いないで撮像された画像におけるMTFの分布例を示すグラフである。
図5の直線L1は、位相板114を使用せずに、被写体からの光束が撮像素子121に合焦した状態で得られる撮像画像におけるMTFの分布例を示す。この直線L1のように、焦点が合った状態で撮像された画像では、MTFは直線状に分布する。
Here, the characteristics of the captured image will be described. First, FIG. 5 is a graph showing an example of MTF distribution in an image captured without using a phase plate.
A straight line L1 in FIG. 5 shows an example of MTF distribution in a captured image obtained in a state where the light beam from the subject is focused on the image sensor 121 without using the phase plate 114. In an image captured in a focused state like the straight line L1, the MTF is distributed linearly.

一方、図5の曲線L2,L3は、位相板114を使用せずに、光学ブロック110内のレンズを焦点が合う位置からずらして撮像したときに得られる撮像画像におけるMTFの分布例を示す。すなわち、直線L1および曲線L2,L3は、撮像装置100からの距離がそれぞれ異なる被写体を撮像したときに得られる画像の特性を示す。   On the other hand, curves L2 and L3 in FIG. 5 show an example of MTF distribution in a captured image obtained when the lens in the optical block 110 is shifted from the in-focus position without using the phase plate 114. That is, the straight line L1 and the curves L2 and L3 indicate the characteristics of an image obtained when images of subjects with different distances from the imaging device 100 are captured.

曲線L2,L3に示すように、焦点がずれた状態で撮像された画像では、MTFの分布は直線L1から離間する。図5において、曲線L3は、曲線L2と比較してレンズを合焦位置からより大きくずらしたときのMTFであり、焦点のずれが大きいほどMTFの劣化度が大きくなることがわかる。   As shown by the curves L2 and L3, the MTF distribution is separated from the straight line L1 in the image captured with the focus shifted. In FIG. 5, a curve L3 is an MTF when the lens is shifted more greatly from the in-focus position than the curve L2, and it can be seen that the degree of degradation of the MTF increases as the focus shift increases.

図6は、位相板を用いて撮像された画像におけるMTFの分布例を示すグラフである。
図6の曲線L11は、図5の直線L1の特性が得られる場合と同様のレンズ位置状態で、位相板114を挿入して撮像を行った場合に得られる撮像画像(以下、中間画像Aと呼ぶ)におけるMTFの分布例を示す。また、図6の曲線L12,L13は、それぞれ図5の曲線L2,L3の特性が得られる場合と同様のレンズ位置状態で、位相板114を挿入して撮像を行った場合に得られる撮像画像(以下、それぞれ中間画像B,Cと呼ぶ)におけるMTFの分布例を示す。
FIG. 6 is a graph showing an example of MTF distribution in an image captured using a phase plate.
A curved line L11 in FIG. 6 indicates a captured image (hereinafter referred to as an intermediate image A) obtained when the phase plate 114 is inserted and imaging is performed in the same lens position state as when the characteristic of the straight line L1 in FIG. 5 is obtained. An example of the distribution of the MTF in FIG. Also, the curves L12 and L13 in FIG. 6 are captured images obtained when the phase plate 114 is inserted and imaged in the same lens position state as when the characteristics of the curves L2 and L3 in FIG. 5 are obtained, respectively. An example of MTF distribution in the following (hereinafter referred to as intermediate images B and C) is shown.

これらの曲線L11〜L13でわかるように、光学系に位相板114を挿入した場合には、撮像装置100から被写体までの距離の変化に対するMTFの変化量は、位相板114を挿入しない場合と比較して極めて小さい。換言すると、光学系に位相板114を挿入した場合には、撮像装置100から被写体までの距離が変化しても、中間画像に現れるボケの度合いは大きく変化しない。   As can be seen from these curves L11 to L13, when the phase plate 114 is inserted into the optical system, the amount of change in the MTF with respect to the change in the distance from the imaging device 100 to the subject is compared with the case where the phase plate 114 is not inserted. And extremely small. In other words, when the phase plate 114 is inserted into the optical system, even if the distance from the imaging device 100 to the subject changes, the degree of blur appearing in the intermediate image does not change significantly.

図7は、画像の復元に使用する逆フィルタの特性例を示すグラフである。この図7のグラフに示した曲線は、図4に示したPSFを用いて式(4)によって得られる逆フィルタ「Hinv」の特性を示す。 FIG. 7 is a graph illustrating an example of characteristics of an inverse filter used for image restoration. The curve shown in the graph of FIG. 7 shows the characteristics of the inverse filter “H inv ” obtained by Expression (4) using the PSF shown in FIG.

図8は、図7の逆フィルタを用いて被写体像が復元された画像におけるMTFの分布例を示すグラフである。
図8の曲線L21〜L23は、それぞれ前述の中間画像A〜Cに対して図7に示した逆フィルタを用いて演算を行うことで被写体像を復元した画像におけるMTFの分布例を示す。逆フィルタを用いた演算後の画像は、図6に示したようにMTFの違いが小さい中間画像A〜Cに対して同じ逆フィルタを用いて演算されたものであるので、図8に示すように、これらの画像におけるMTFの分布も比較的同じような状態となる。WFC技術では、このような特性を利用して、位相板を用いて得られた中間画像を同じMTFを用いて演算することで、被写界深度が拡大された画像を得る。
FIG. 8 is a graph showing an example of MTF distribution in an image obtained by restoring the subject image using the inverse filter of FIG.
Curves L21 to L23 in FIG. 8 show an example of MTF distribution in an image obtained by restoring the subject image by performing an operation on the above-described intermediate images A to C using the inverse filter shown in FIG. Since the image after the calculation using the inverse filter is calculated using the same inverse filter for the intermediate images A to C having a small difference in MTF as shown in FIG. 6, as shown in FIG. In addition, the distribution of MTFs in these images is relatively similar. In the WFC technology, using such characteristics, an intermediate image obtained using a phase plate is calculated using the same MTF to obtain an image with an expanded depth of field.

しかしながら、撮像装置100からの距離が異なる被写体を撮像した場合には、図8に示すように、実際にはMTFの分布が全く同じになる訳ではない。これは、位相板114を用いて撮像された中間画像におけるMTFが、被写体との距離に応じてわずかに変動することに起因する。このようなMTFの違いは、PSFを用いた復元処理後の画像においてゴーストなどとして現れ、画質劣化の原因となる。   However, when images of subjects with different distances from the image capturing apparatus 100 are captured, the MTF distribution is not actually the same as shown in FIG. This is because the MTF in the intermediate image captured using the phase plate 114 slightly varies depending on the distance to the subject. Such a difference in MTF appears as a ghost or the like in the image after the restoration process using the PSF, causing image quality deterioration.

これに対して、本実施の形態の撮像装置100では、撮像を行うたびに、その撮像によって得られた中間画像からPSFを求め、求めたPSFを用いて中間画像に対する復元処理を行うようにする。このような処理により、被写体との距離の違いによるPSFの誤差が理論上生じなくなるので、被写体像を高精度に復元できるようになる。   On the other hand, each time imaging is performed, the imaging apparatus 100 according to the present embodiment obtains a PSF from the intermediate image obtained by the imaging, and performs a restoration process on the intermediate image using the obtained PSF. . By such processing, the PSF error due to the difference in distance from the subject does not theoretically occur, and the subject image can be restored with high accuracy.

なお、本実施の形態の撮像装置100では、被写体との距離の違いによるPSF誤差だけでなく、第1の実施の形態と同様に、位相板114を含む光学系の製造誤差によるPSFの誤差も低減できることは言うまでもない。   In the imaging apparatus 100 of the present embodiment, not only the PSF error due to the difference in distance from the subject, but also the PSF error due to the manufacturing error of the optical system including the phase plate 114 as in the first embodiment. Needless to say, it can be reduced.

図9は、第2の実施の形態に係る撮像装置の撮像処理手順を示すフローチャートである。
[ステップS11]撮像制御部154は、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154は、シャッタボタンが押下されたことを検知すると、画像復元処理部130に対して撮像動作の開始信号を出力する。開始信号を受信した画像復元処理部130は、ステップS12以降の処理を実行する。
FIG. 9 is a flowchart illustrating an imaging processing procedure of the imaging apparatus according to the second embodiment.
[Step S11] The imaging control unit 154 monitors whether the shutter button of the input unit 155 is pressed. When the imaging control unit 154 detects that the shutter button is pressed, the imaging control unit 154 outputs an imaging operation start signal to the image restoration processing unit 130. The image restoration processing unit 130 that has received the start signal executes the processes after step S12.

[ステップS12]撮像素子121によって撮像された画像(中間画像)の信号が、A/Dコンバータ122によってデジタルデータ化される。撮像制御部154からの開始信号を受信した画像復元処理部130において、画像メモリ131は、A/Dコンバータ122から出力された中間画像データを取り込む。   [Step S12] The signal of the image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122. In the image restoration processing unit 130 that has received the start signal from the imaging control unit 154, the image memory 131 takes in the intermediate image data output from the A / D converter 122.

[ステップS13]画像抽出部132は、不揮発性記憶部140から設計PSF141を読み込む。画像抽出部132は、読み込んだ設計PSF141を用いてパターンマッチングを行うことにより、画像メモリ131に記憶された中間画像データに基づく中間画像から部分画像を抽出する。   [Step S13] The image extraction unit 132 reads the design PSF 141 from the nonvolatile storage unit 140. The image extraction unit 132 extracts a partial image from the intermediate image based on the intermediate image data stored in the image memory 131 by performing pattern matching using the read design PSF 141.

[ステップS14]コンボリューション制御部133は、画像抽出部132によって抽出された部分画像のデータをPSFとし、このPSFを基に逆カーネル「hinv」を算出する。コンボリューション制御部133は、例えば、算出された逆カーネル「hinv」を画像メモリ131に一時的に格納する。 [Step S14] The convolution control unit 133 sets the partial image data extracted by the image extraction unit 132 as a PSF, and calculates an inverse kernel “h inv ” based on the PSF. For example, the convolution control unit 133 temporarily stores the calculated inverse kernel “h inv ” in the image memory 131.

[ステップS15]コンボリューション演算部134は、ステップS14でコンボリューション制御部133によって算出された逆カーネル「hinv」を用いて、ステップS12で画像メモリ131に記憶された中間画像データに対して、式(5)に従って畳み込み演算を行う。これにより、被写体像の復元処理が実行される。 [Step S15] The convolution calculation unit 134 uses the inverse kernel “h inv ” calculated by the convolution control unit 133 in step S14, and performs the operation on the intermediate image data stored in the image memory 131 in step S12. A convolution operation is performed according to equation (5). Thereby, a subject image restoration process is executed.

コンボリューション演算部134によって演算処理された画像データは、DSP151によって所定の画質補正処理および圧縮符号化処理が施された後、メモリカード153に記録される。   The image data calculated by the convolution calculation unit 134 is subjected to predetermined image quality correction processing and compression coding processing by the DSP 151, and then recorded on the memory card 153.

なお、上記の図9では静止画像の撮像動作について説明したが、例えば、表示部152に対してモニタ画像を表示する場合や、動画像を撮像して記録する場合には、上記のステップS12〜S15の処理が繰り返されればよい。また、モニタ画像の表示時や動画像の記録時には、部分画像の抽出および逆カーネル「hinv」の算出を一定時間ごとに実行するようにしてもよい。この場合、新たな逆カーネル「hinv」が算出されるまでの間、コンボリューション演算部134は同一の逆カーネル「hinv」を用いて演算処理を行う。このように、部分画像の抽出および逆カーネル「hinv」の算出を一定時間ごとに実行することにより、画像復元処理部130における処理負荷や消費電力を低減することができる。 In FIG. 9, the still image capturing operation has been described. For example, when a monitor image is displayed on the display unit 152 or when a moving image is captured and recorded, the above steps S12 to S12 are performed. What is necessary is just to repeat the process of S15. Further, when displaying a monitor image or recording a moving image, extraction of a partial image and calculation of an inverse kernel “h inv ” may be executed at regular intervals. In this case, until the new inverse kernel “h inv ” is calculated, the convolution operation unit 134 performs an operation process using the same inverse kernel “h inv ”. In this way, by executing partial image extraction and inverse kernel “h inv ” calculation at regular intervals, the processing load and power consumption in the image restoration processing unit 130 can be reduced.

また、図9の処理では、部分画像の抽出と被写体像の復元処理とを、画像メモリ131に記憶された同一の中間画像データを基に実行した。しかし、他の処理例として、被写体像の復元処理は、部分画像の抽出後に新たに画像メモリ131に記憶された中間画像データを基に実行されてもよい。   In the process of FIG. 9, the partial image extraction and the subject image restoration process are executed based on the same intermediate image data stored in the image memory 131. However, as another processing example, the subject image restoration process may be executed based on intermediate image data newly stored in the image memory 131 after the partial image is extracted.

例えば、被写体像の復元処理の対象とする中間画像データは、部分画像の抽出対象とする中間画像データが画像メモリ131に取り込まれてから、画像抽出部132およびコンボリューション制御部133での処理に要する時間分だけ後に、画像メモリ131に取り込まれたものとされてもよい。このような処理により、画像の撮像タイミングと撮像画像のデータが画像復元処理部130から出力されるタイミングとの間に遅延が発生しないようになり、特にモニタ画像の表示時において、表示の遅延によってユーザに与える違和感をなくすことができる。   For example, the intermediate image data to be subjected to subject image restoration processing is processed by the image extraction unit 132 and the convolution control unit 133 after the intermediate image data to be extracted from the partial image is taken into the image memory 131. The image may be taken into the image memory 131 after the required time. By such processing, there is no delay between the image capturing timing and the timing at which the captured image data is output from the image restoration processing unit 130. In particular, when displaying a monitor image, the display delay causes the delay. A sense of discomfort given to the user can be eliminated.

また、例えば、静止画像を撮像する際には、次のような処理が行われてもよい。まず、シャッタボタンが半押し状態にされたときに、部分画像の抽出および逆カーネル「hinv」の算出が行われる。そして、その後にシャッタボタンが全押しされたとき、その時点で画像メモリ131に取り込まれた中間画像データに対して、半押し状態の際に算出された逆カーネル「hinv」を用いて被写体像の復元処理が実行される。 Further, for example, when a still image is captured, the following processing may be performed. First, when the shutter button is pressed halfway, partial image extraction and inverse kernel “h inv ” are calculated. Thereafter, when the shutter button is fully pressed, the subject image is obtained by using the inverse kernel “h inv ” calculated in the half-pressed state with respect to the intermediate image data fetched into the image memory 131 at that time. The restoration process is executed.

〔第3の実施の形態〕
図10は、第3の実施の形態に係る撮像装置の構成例を示す図である。なお、この図10では、図2に対応する構成要素については同じ符号を付して示す。
[Third Embodiment]
FIG. 10 is a diagram illustrating a configuration example of an imaging apparatus according to the third embodiment. In FIG. 10, components corresponding to those in FIG. 2 are denoted by the same reference numerals.

第3の実施の形態に係る撮像装置100aは、撮像モードとして、部分画像の抽出および逆カーネル「hinv」の算出を行うPSF検出モードと、PSF検出モードで算出された逆カーネル「hinv」を用いて撮像画像に対する被写体像の復元処理を行う本撮像モードの2種類を備える。これらの撮像モードは、例えば、入力部155が備えるモード選択ボタンをユーザが操作することにより選択される。撮像制御部154aは、選択された撮像モードに従って、画像復元処理部130aの動作を制御する。 Imaging apparatus 100a according to the third embodiment, as the imaging mode, the PSF detection mode to calculate the extraction of the partial image and reverse the kernel "h inv" inverse calculated by the PSF detection mode kernel "h inv" There are two types of main imaging modes in which a subject image restoration process is performed on a captured image using. These imaging modes are selected, for example, when the user operates a mode selection button provided in the input unit 155. The imaging control unit 154a controls the operation of the image restoration processing unit 130a according to the selected imaging mode.

画像復元処理部130aは、図2に示した画像メモリ131およびコンボリューション演算部134を備える。ただし、コンボリューション演算部134は、上記2つの撮像モードのうち本撮像モードにおいてのみ動作する。また、画像復元処理部130aは、画像抽出部132aおよびコンボリューション制御部133aを備える。画像抽出部132aは、上記2つの撮像モードのうちPSF検出モードにおいてのみ動作する。   The image restoration processing unit 130a includes the image memory 131 and the convolution operation unit 134 illustrated in FIG. However, the convolution calculation unit 134 operates only in the main imaging mode out of the two imaging modes. The image restoration processing unit 130a includes an image extraction unit 132a and a convolution control unit 133a. The image extraction unit 132a operates only in the PSF detection mode of the two imaging modes.

画像抽出部132aは、画像メモリ131に記憶された中間画像データに基づく中間画像から、あらかじめ決められた領域を部分画像として抽出する。本実施の形態では例として、画像抽出部132aは、中間画像の中心部を中心とした一定領域を部分画像として抽出する。   The image extraction unit 132a extracts a predetermined area as a partial image from the intermediate image based on the intermediate image data stored in the image memory 131. In the present embodiment, as an example, the image extraction unit 132a extracts a certain region centered on the center of the intermediate image as a partial image.

コンボリューション制御部133aは、PSF検出モードにおいては、図2に示したコンボリューション制御部133と同様、画像抽出部132によって抽出された部分画像を基に、逆カーネル「hinv」を算出する。ただし、コンボリューション制御部133aは、算出した逆カーネル「hinv」を、カーネルデータ142として不揮発性記憶部140に記憶する。そして、本撮像モードに切り替えられた後、コンボリューション制御部133aは、不揮発性記憶部140からカーネルデータ142を読み出し、コンボリューション演算部134に供給する。 In the PSF detection mode, the convolution control unit 133a calculates the inverse kernel “h inv ” based on the partial image extracted by the image extraction unit 132 as in the convolution control unit 133 illustrated in FIG. However, the convolution control unit 133 a stores the calculated inverse kernel “h inv ” in the nonvolatile storage unit 140 as kernel data 142. Then, after switching to the main imaging mode, the convolution control unit 133 a reads the kernel data 142 from the nonvolatile storage unit 140 and supplies the kernel data 142 to the convolution calculation unit 134.

ここで、PSF検出モードにおける撮像動作について説明する。PSF検出モードは、例えば、撮像装置100aの製品出荷前の段階、製品出荷後における撮像装置100aの初回電源投入時などに選択される。あるいは、撮像装置100aの電源が投入されるごとに、自動的にPSF検出モードになるようにしてもよい。   Here, the imaging operation in the PSF detection mode will be described. The PSF detection mode is selected, for example, at a stage before product shipment of the imaging apparatus 100a, at the first power-on of the imaging apparatus 100a after product shipment, or the like. Alternatively, the PSF detection mode may be automatically set every time the imaging apparatus 100a is turned on.

PSF検出モードでは、撮像装置100aは、点画像を含む被写体を撮像することによって中間画像を取得し、得られた中間画像からPSFを検出する。点画像を含む被写体を撮像する方法としては、次のような方法がある。   In the PSF detection mode, the imaging apparatus 100a acquires an intermediate image by imaging a subject including a point image, and detects a PSF from the obtained intermediate image. There are the following methods for imaging a subject including a point image.

図11は、PSF検出モードにおける撮像動作例を示す第1の図である。
PSF検出モードでは、撮像装置100aは、図11に示すようなPSF検出モード専用の検出用被写体200を撮像する。検出用被写体200は、例えば、ピンホール201と光源202とを備え、ピンホール201の背面側から光源202によって光が発せられる。検出用被写体200の撮像面は単色とされることが望ましく、ピンホール201から撮像装置100a側に出射される光は、検出用被写体200の撮像面とは輝度が異なるか、あるいは色が異なるものとされる。撮像装置100aは、検出用被写体200を撮像することで、ピンホール201を点画像として認識することができる。
FIG. 11 is a first diagram illustrating an example of an imaging operation in the PSF detection mode.
In the PSF detection mode, the imaging device 100a images the detection subject 200 dedicated to the PSF detection mode as shown in FIG. The detection subject 200 includes, for example, a pinhole 201 and a light source 202, and light is emitted from the light source 202 from the back side of the pinhole 201. The imaging surface of the detection subject 200 is desirably a single color, and the light emitted from the pinhole 201 toward the imaging device 100a has a luminance or color different from that of the imaging surface of the detection subject 200. It is said. The imaging apparatus 100a can recognize the pinhole 201 as a point image by imaging the detection subject 200.

図12は、PSF検出モードにおける撮像動作例を示す第2の図である。
図12に示すように、任意の撮像面211に対して、レーザポインタなどの光源212からの光を照射することにより、撮像面211に点画像213を生成することもできる。この場合、撮像面211は単色であることが望ましく、撮像面211に生成された点画像213は、撮像面211とは異なる明るさか、あるいは撮像面211とは異なる色とされる。PSF検出モードにおいて、撮像装置100aは、撮像面211に生成された点画像213を撮像することで、PSFを検出する。
FIG. 12 is a second diagram illustrating an example of an imaging operation in the PSF detection mode.
As illustrated in FIG. 12, a point image 213 can be generated on the imaging surface 211 by irradiating light from a light source 212 such as a laser pointer onto an arbitrary imaging surface 211. In this case, the imaging surface 211 is preferably monochromatic, and the point image 213 generated on the imaging surface 211 has a brightness different from that of the imaging surface 211 or a color different from that of the imaging surface 211. In the PSF detection mode, the imaging device 100a detects the PSF by capturing the point image 213 generated on the imaging surface 211.

なお、光源212は、撮像装置100aに搭載されてもよい。ただし、この場合、撮像面211と撮像装置100aとの距離を所定の距離としたときに、光源212によって生成された点画像213が撮像装置100aからの画角の中心に配置されるように、光源212の照射角度が調整される。   The light source 212 may be mounted on the imaging device 100a. However, in this case, when the distance between the imaging surface 211 and the imaging device 100a is a predetermined distance, the point image 213 generated by the light source 212 is arranged at the center of the angle of view from the imaging device 100a. The irradiation angle of the light source 212 is adjusted.

図13は、PSF検出モードにおける撮像動作例を示す第3の図である。
図13に示すように、撮像装置100aは、PSF検出モードにおいて、点画像221があらかじめ配置された画像を撮像してもよい。ただし、点画像221は、他の画像222と離間して配置され、なおかつ、点画像221と、この点画像221が位相板114の作用によって分散された画像成分とが、単色の領域に配置されることが望ましい。
FIG. 13 is a third diagram illustrating an example of an imaging operation in the PSF detection mode.
As illustrated in FIG. 13, the imaging apparatus 100a may capture an image in which the point images 221 are arranged in advance in the PSF detection mode. However, the point image 221 is arranged separately from the other images 222, and the point image 221 and an image component in which the point image 221 is dispersed by the action of the phase plate 114 are arranged in a single color area. It is desirable.

図14は、第3の実施の形態に係る撮像装置のPSF検出モードにおける撮像処理手順を示すフローチャートである。
[ステップS21]撮像制御部154aは、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154aは、シャッタボタンが押下されたことを検知すると、画像復元処理部130aに対して撮像動作の開始信号を出力する。開始信号を受信した画像復元処理部130aは、ステップS22以降の処理を実行する。
FIG. 14 is a flowchart illustrating an imaging process procedure in the PSF detection mode of the imaging apparatus according to the third embodiment.
[Step S21] The imaging control unit 154a monitors whether the shutter button of the input unit 155 has been pressed. When the imaging control unit 154a detects that the shutter button is pressed, the imaging control unit 154a outputs an imaging operation start signal to the image restoration processing unit 130a. The image restoration processing unit 130a that has received the start signal executes the processes after step S22.

[ステップS22]撮像素子121によって撮像された画像(中間画像)の信号が、A/Dコンバータ122によってデジタルデータ化される。撮像制御部154aからの開始信号を受信した画像復元処理部130aにおいて、画像メモリ131は、A/Dコンバータ122から出力された中間画像データを取り込む。   [Step S <b> 22] The signal of the image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122. In the image restoration processing unit 130a that has received the start signal from the imaging control unit 154a, the image memory 131 takes in the intermediate image data output from the A / D converter 122.

[ステップS23]画像抽出部132aは、画像メモリ131に記憶された中間画像データに基づく中間画像から、あらかじめ決められた領域を部分画像として抽出する。ここで、ユーザは、ステップS21でシャッタボタンを押下する際に、点画像が画角の中心に配置されるようにする。これにより、画像抽出部132aは、中間画像の中央部を中心とした所定の大きさの領域を抽出することで、点画像とその点画像が分散した成分とを含む領域を、部分画像として抽出することができる。   [Step S23] The image extraction unit 132a extracts a predetermined region as a partial image from the intermediate image based on the intermediate image data stored in the image memory 131. Here, when the user presses the shutter button in step S21, the point image is arranged at the center of the angle of view. As a result, the image extraction unit 132a extracts a region having a predetermined size centered on the central portion of the intermediate image, thereby extracting a region including the point image and the component in which the point image is dispersed as a partial image. can do.

なお、このステップS23では、第2の実施の形態の画像抽出部132と同様に、中間画像と設計PSF141とをパターンマッチングすることにより、部分画像が抽出されてもよい。   In step S23, as in the image extraction unit 132 of the second embodiment, a partial image may be extracted by pattern matching the intermediate image and the design PSF 141.

[ステップS24]コンボリューション制御部133aは、画像抽出部132aによって抽出された部分画像のデータをPSFとし、このPSFを基に逆カーネル「hinv」を算出する。コンボリューション制御部133aは、算出した逆カーネル「hinv」を、カーネルデータ142として不揮発性記憶部140に記憶する。 [Step S24] The convolution control unit 133a uses the partial image data extracted by the image extraction unit 132a as a PSF, and calculates an inverse kernel “h inv ” based on the PSF. The convolution control unit 133 a stores the calculated inverse kernel “h inv ” in the nonvolatile storage unit 140 as kernel data 142.

図15は、第3の実施の形態に係る撮像装置の本撮像モードにおける撮像処理手順を示すフローチャートである。
[ステップS31]撮像制御部154aは、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154aは、シャッタボタンが押下されたことを検知すると、画像復元処理部130aに対して撮像動作の開始信号を出力する。開始信号を受信した画像復元処理部130aは、ステップS32以降の処理を実行する。
FIG. 15 is a flowchart illustrating an imaging processing procedure in the main imaging mode of the imaging apparatus according to the third embodiment.
[Step S31] The imaging control unit 154a monitors whether the shutter button of the input unit 155 is pressed. When the imaging control unit 154a detects that the shutter button is pressed, the imaging control unit 154a outputs an imaging operation start signal to the image restoration processing unit 130a. The image restoration processing unit 130a that has received the start signal executes the processing from step S32.

[ステップS32]撮像素子121によって撮像された画像(中間画像)の信号が、A/Dコンバータ122によってデジタルデータ化される。撮像制御部154aからの開始信号を受信した画像復元処理部130aにおいて、画像メモリ131は、A/Dコンバータ122から出力された中間画像データを取り込む。   [Step S <b> 32] The signal of the image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122. In the image restoration processing unit 130a that has received the start signal from the imaging control unit 154a, the image memory 131 takes in the intermediate image data output from the A / D converter 122.

[ステップS33]コンボリューション制御部133aは、不揮発性記憶部140からカーネルデータ142を読み出す。なお、ステップS32,S33の処理順は、逆であってもよい。あるいは、ステップS32,S33の各処理が並列に実行されてもよい。   [Step S33] The convolution control unit 133a reads the kernel data 142 from the nonvolatile storage unit 140. Note that the processing order of steps S32 and S33 may be reversed. Or each process of step S32 and S33 may be performed in parallel.

[ステップS34]コンボリューション演算部134は、コンボリューション制御部133aによって不揮発性記憶部140から読み出されたカーネルデータ142を用いて、ステップS32で画像メモリ131に記憶された中間画像データに対して、式(5)に従って畳み込み演算を行う。これにより、被写体像の復元処理が実行される。   [Step S34] The convolution operation unit 134 uses the kernel data 142 read from the non-volatile storage unit 140 by the convolution control unit 133a, and applies the intermediate image data stored in the image memory 131 in step S32. The convolution operation is performed according to the equation (5). Thereby, a subject image restoration process is executed.

コンボリューション演算部134によって演算処理された画像データは、DSP151によって所定の画質補正処理および圧縮符号化処理が施された後、メモリカード153に記録される。   The image data calculated by the convolution calculation unit 134 is subjected to predetermined image quality correction processing and compression coding processing by the DSP 151, and then recorded on the memory card 153.

以上の第3の実施の形態では、コンボリューション演算部134は、実際の撮像によって得られた中間画像から求められたカーネルデータ142を用いて被写体像の復元処理を行う。このため、光学系の設計値から求めたカーネルデータを用いて復元処理を行う場合と比較して、被写体像をより高精度に復元できるようになる。また、カーネルデータ142の算出処理をPSF検出モードにおいて行い、本撮像モードでは、不揮発性記憶部140に記憶されたカーネルデータ142を用いて被写体像の復元処理が実行されるので、本撮像モードにおける処理負荷を軽減し、復元処理を高速化することができる。   In the third embodiment described above, the convolution operation unit 134 performs subject image restoration processing using the kernel data 142 obtained from the intermediate image obtained by actual imaging. For this reason, the subject image can be restored with higher accuracy than when restoration processing is performed using kernel data obtained from the design value of the optical system. In addition, the calculation process of the kernel data 142 is performed in the PSF detection mode. In the main imaging mode, the subject image restoration process is executed using the kernel data 142 stored in the nonvolatile storage unit 140. It is possible to reduce the processing load and speed up the restoration process.

〔第4の実施の形態〕
上記の第3の実施の形態では、PSF検出モードにおいて、単色の領域に配置された点画像を撮像した。これに対して、撮像対象の点画像を特定の色にしておくことにより、点画像がどのような被写体の上に存在する場合であっても、点画像とそれが分散された画像成分とを中間画像から分離してPSFを算出することができるようになる。
[Fourth Embodiment]
In the third embodiment, a point image arranged in a monochrome region is captured in the PSF detection mode. On the other hand, by setting the point image to be imaged to a specific color, the point image and the image component in which the point image is distributed can be obtained regardless of the subject on which the point image exists. The PSF can be calculated separately from the intermediate image.

以下、第4の実施の形態として、特定の色の点画像を含む被写体を撮像することでPSFを算出することが可能な撮像装置について説明する。なお、第4の実施の形態に係る撮像装置は、コンボリューション制御部133aが部分画像から特定の色領域の色を有する画素を分離する機能をさらに有すること以外、第3の実施の形態に係る撮像装置100aと同様の構成を有する。このため、以下の第4の実施の形態の説明では、第3の実施の形態と同じ符号を使用する。   Hereinafter, as a fourth embodiment, an imaging apparatus capable of calculating a PSF by imaging a subject including a point image of a specific color will be described. Note that the imaging apparatus according to the fourth embodiment relates to the third embodiment except that the convolution control unit 133a further has a function of separating pixels having a color of a specific color region from the partial image. The configuration is the same as that of the imaging device 100a. For this reason, in the following description of the fourth embodiment, the same reference numerals as those in the third embodiment are used.

図16は、PSF検出モードにおいて撮像の対象とする被写体の例を示す図である。
図16に示す被写体は、任意の画像231と、画像231の内部に配置された特定の色の点画像232とを含む。点画像232の色は、少なくとも、点画像232の周辺領域のうち、この点画像232が位相板114の作用によって分散された画像成分を含む領域とは異なる色とされればよい。また、点画像232は、画像231の内部にあらかじめ配置されたものでよい。この場合、点画像232を含む画像231は、例えば、収差補正用のテスト画像などと兼用されてもよい。あるいは、点画像232は、図12に示したように、外部の光源212から画像231に対して光を照射することで生成されてもよい。
FIG. 16 is a diagram illustrating an example of a subject to be imaged in the PSF detection mode.
The subject shown in FIG. 16 includes an arbitrary image 231 and a point image 232 of a specific color arranged inside the image 231. The color of the point image 232 may be at least a color different from the region including the image component in which the point image 232 is dispersed by the action of the phase plate 114 in the peripheral region of the point image 232. Further, the point image 232 may be preliminarily arranged inside the image 231. In this case, the image 231 including the point image 232 may be used also as, for example, a test image for aberration correction. Alternatively, the point image 232 may be generated by irradiating the image 231 with light from the external light source 212 as shown in FIG.

図17は、第4の実施の形態に係る撮像装置のPSF検出モードにおける撮像処理手順を示すフローチャートである。
[ステップS41]撮像制御部154aは、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154aは、シャッタボタンが押下されたことを検知すると、画像復元処理部130aに対して撮像動作の開始信号を出力する。開始信号を受信した画像復元処理部130aは、ステップS42以降の処理を実行する。
FIG. 17 is a flowchart illustrating an imaging process procedure in the PSF detection mode of the imaging apparatus according to the fourth embodiment.
[Step S41] The imaging control unit 154a monitors whether the shutter button of the input unit 155 is pressed. When the imaging control unit 154a detects that the shutter button is pressed, the imaging control unit 154a outputs an imaging operation start signal to the image restoration processing unit 130a. The image restoration processing unit 130a that has received the start signal executes the processing after step S42.

[ステップS42]撮像素子121によって撮像された画像(中間画像)の信号が、A/Dコンバータ122によってデジタルデータ化される。撮像制御部154aからの開始信号を受信した画像復元処理部130aにおいて、画像メモリ131は、A/Dコンバータ122から出力された中間画像データを取り込む。   [Step S <b> 42] The signal of the image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122. In the image restoration processing unit 130a that has received the start signal from the imaging control unit 154a, the image memory 131 takes in the intermediate image data output from the A / D converter 122.

[ステップS43]画像抽出部132aは、画像メモリ131に記憶された中間画像データに基づく中間画像から、あらかじめ決められた領域を部分画像として抽出する。なお、第3の実施の形態と同様に、ユーザは、ステップS41でシャッタボタンを押下する際に、点画像232が画角の中心に配置されるようにする。これにより、画像抽出部132aは、中間画像の中央部の所定領域を抽出することで、点画像232とその点画像232が分散した成分とを含む領域を、部分画像として抽出することができる。   [Step S43] The image extraction unit 132a extracts a predetermined area as a partial image from the intermediate image based on the intermediate image data stored in the image memory 131. As in the third embodiment, when the user presses the shutter button in step S41, the point image 232 is arranged at the center of the angle of view. Thereby, the image extraction unit 132a can extract a region including the point image 232 and a component in which the point image 232 is dispersed as a partial image by extracting a predetermined region at the center of the intermediate image.

なお、このステップS43では、第2の実施の形態の画像抽出部132と同様に、中間画像と設計PSF141とをパターンマッチングすることにより、部分画像が抽出されてもよい。   In step S43, a partial image may be extracted by pattern matching the intermediate image and the design PSF 141 in the same manner as the image extraction unit 132 of the second embodiment.

[ステップS44]コンボリューション制御部133aは、画像抽出部132aによって抽出された部分画像のデータから、R(Red)成分およびG(Green)成分を分離する。コンボリューション制御部133aは、部分画像の各画素についてR成分の値からG成分の値を減算し、その減算結果が所定のしきい値th1以上であるかを判定する。コンボリューション制御部133aは、減算結果がしきい値th1以上である場合には、その減算結果を画素の値とし、減算結果がしきい値th1未満である場合には、画素の値を0にすることにより、(R−G)成分の画像を生成する。コンボリューション制御部133aは、生成した画像のデータを画像メモリ131に一時的に格納する。   [Step S44] The convolution control unit 133a separates the R (Red) component and the G (Green) component from the partial image data extracted by the image extraction unit 132a. The convolution control unit 133a subtracts the value of the G component from the value of the R component for each pixel of the partial image, and determines whether the subtraction result is equal to or greater than a predetermined threshold th1. When the subtraction result is equal to or greater than the threshold th1, the convolution control unit 133a sets the subtraction result as the pixel value. When the subtraction result is less than the threshold th1, the convolution control unit 133a sets the pixel value to 0. By doing so, an image of the (R−G) component is generated. The convolution control unit 133 a temporarily stores the generated image data in the image memory 131.

[ステップS45]コンボリューション制御部133aは、画像抽出部132aによって抽出された部分画像のデータから、R成分およびB(Blue)成分を分離する。コンボリューション制御部133aは、部分画像の各画素についてR成分の値からB成分の値を減算し、その減算結果が所定のしきい値th2以上であるかを判定する。コンボリューション制御部133aは、減算結果がしきい値th2以上である場合には、その減算結果を画素の値とし、減算結果がしきい値th2未満である場合には、画素の値を0にすることにより、(R−B)成分の画像を生成する。コンボリューション制御部133aは、生成した画像のデータを画像メモリ131に一時的に格納する。   [Step S45] The convolution control unit 133a separates the R component and the B (Blue) component from the partial image data extracted by the image extraction unit 132a. The convolution control unit 133a subtracts the value of the B component from the value of the R component for each pixel of the partial image, and determines whether the subtraction result is equal to or greater than a predetermined threshold th2. The convolution control unit 133a sets the subtraction result to the pixel value when the subtraction result is equal to or greater than the threshold value th2, and sets the pixel value to 0 when the subtraction result is less than the threshold value th2. By doing so, an image of the (RB) component is generated. The convolution control unit 133 a temporarily stores the generated image data in the image memory 131.

なお、ステップS44,S45の処理順は、逆であってもよい。あるいは、ステップS44,S45の処理が並列に実行されてもよい。
[ステップS46]コンボリューション制御部133aは、ステップS44,S45でそれぞれ生成した画像について、各画素の値の平均を演算することで、PSFを算出する。
Note that the processing order of steps S44 and S45 may be reversed. Alternatively, the processes of steps S44 and S45 may be executed in parallel.
[Step S46] The convolution control unit 133a calculates the PSF by calculating the average of the values of the pixels for the images generated in steps S44 and S45, respectively.

[ステップS47]コンボリューション制御部133aは、算出したPSFを基に逆カーネル「hinv」を算出し、算出した逆カーネル「hinv」を、カーネルデータ142として不揮発性記憶部140に記憶する。 [Step S <b> 47] The convolution control unit 133 a calculates the inverse kernel “h inv ” based on the calculated PSF, and stores the calculated inverse kernel “h inv ” in the nonvolatile storage unit 140 as the kernel data 142.

なお、本撮像モードにおける撮像処理手順は、図15に示した処理手順と同じであるので、ここでは説明を省略する。
また、上記の図17の処理では、特定の色として赤色の点画像232を検出する場合の例を示したが、点画像232の色としては赤色に限らない。例えば、図17のステップS44において、R成分の値からG成分の値を減算する代わりにB成分の値からR成分の値を減算し、ステップS45において、R成分の値からB成分の値を減算する代わりにB成分の値からG成分の値を減算することにより、青色の点画像232を検出することができる。
Note that the imaging processing procedure in the main imaging mode is the same as the processing procedure shown in FIG.
In the above-described processing of FIG. 17, an example in which a red point image 232 is detected as a specific color has been described, but the color of the point image 232 is not limited to red. For example, instead of subtracting the G component value from the R component value in step S44 of FIG. 17, the R component value is subtracted from the B component value. In step S45, the B component value is subtracted from the R component value. A blue dot image 232 can be detected by subtracting the value of the G component from the value of the B component instead of subtracting.

以上の第4の実施の形態では、第3の実施の形態と同様に、光学系の設計値から求めたカーネルデータを用いて復元処理を行う場合と比較して、被写体像をより高精度に復元できるという効果が得られる。また、本撮像モードにおける処理負荷を軽減し、復元処理を高速化できるという効果も得られる。さらに、第4の実施の形態では、第3の実施の形態と比較して、PSF検出モードで撮像の対象とする被写体の汎用性を高めることができる。   In the fourth embodiment described above, as in the third embodiment, the subject image is more accurately compared with the case where the restoration process is performed using kernel data obtained from the design value of the optical system. The effect that it can be restored is obtained. In addition, the processing load in the main imaging mode can be reduced, and the restoration process can be speeded up. Furthermore, in the fourth embodiment, the versatility of a subject to be imaged in the PSF detection mode can be improved as compared with the third embodiment.

〔第5の実施の形態〕
以下の第5の実施の形態に係る撮像装置は、PSF検出用の撮像時に被写体に点画像を生成する光源を搭載する。そして、光源を用いて撮像を行うことでPSFを取得した直後に、光源から光を照射しない状態で本撮像を行うようにする。このような動作により、光学系の製造誤差によるPSFの誤差だけでなく、被写体との距離の違いによるPSF誤差も低減できるようにする。
[Fifth Embodiment]
An imaging apparatus according to a fifth embodiment below is equipped with a light source that generates a point image on a subject during imaging for PSF detection. And immediately after acquiring PSF by imaging using a light source, this imaging is performed in the state which does not irradiate light from a light source. By such an operation, not only the PSF error due to the manufacturing error of the optical system but also the PSF error due to the difference in distance from the subject can be reduced.

図18は、第5の実施の形態に係る撮像装置の構成例を示す図である。なお、この図18では、図2に対応する構成要素については同じ符号を付して示す。
図18に示す撮像装置100bにおいて、画像復元処理部130bは、図2に示した画像メモリ131、コンボリューション制御部133およびコンボリューション演算部134を備える。さらに、画像復元処理部130bは、画像抽出部132bを備える。画像抽出部132bは、図2の画像抽出部132と同様に、パターンマッチングにより中間画像から部分画像を抽出する処理を行う。ただし、画像抽出部132bは、中間画像から特定の色領域の色を有する画素を分離して特定色画像を生成し、この特定色画像から部分画像を抽出する。
FIG. 18 is a diagram illustrating a configuration example of an imaging apparatus according to the fifth embodiment. In FIG. 18, the same reference numerals are given to the components corresponding to those in FIG.
In the imaging apparatus 100b illustrated in FIG. 18, the image restoration processing unit 130b includes the image memory 131, the convolution control unit 133, and the convolution calculation unit 134 illustrated in FIG. Furthermore, the image restoration processing unit 130b includes an image extraction unit 132b. Similar to the image extraction unit 132 in FIG. 2, the image extraction unit 132b performs a process of extracting a partial image from the intermediate image by pattern matching. However, the image extraction unit 132b generates a specific color image by separating pixels having a color of a specific color region from the intermediate image, and extracts a partial image from the specific color image.

さらに、撮像装置100bは、被写体上に特定の色の点画像を生成する光源161を備える。光源161は、例えばレーザ発光素子である。図16の点画像232と同様に、光源161が被写体上に生成する点画像の色は、少なくとも、被写体における点画像の周辺領域のうち、この点画像が位相板114の作用によって分散された画像成分を含む領域とは異なる色とされる。従って、光源161は、例えば、被写体の色と異なる色の点画像を生成できるように、複数の色の光を切り替えて照射することが可能とされてもよい。   Furthermore, the imaging apparatus 100b includes a light source 161 that generates a point image of a specific color on the subject. The light source 161 is, for example, a laser light emitting element. Similar to the point image 232 in FIG. 16, the color of the point image generated by the light source 161 on the subject is an image in which the point image is dispersed by the action of the phase plate 114 in at least the peripheral region of the point image in the subject. The color is different from that of the region including the component. Therefore, for example, the light source 161 may be able to switch and emit light of a plurality of colors so that a point image having a color different from the color of the subject can be generated.

図19は、第5の実施の形態に係る撮像装置の撮像処理手順を示すフローチャートである。
[ステップS51]撮像制御部154bは、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154bがシャッタボタンが押下されたことを検知すると、ステップS52以降の処理が実行される。
FIG. 19 is a flowchart illustrating an imaging process procedure of the imaging apparatus according to the fifth embodiment.
[Step S51] The imaging control unit 154b monitors whether the shutter button of the input unit 155 is pressed. When the imaging control unit 154b detects that the shutter button has been pressed, the processing after step S52 is executed.

[ステップS52]撮像制御部154bは、光源161をオンにして、光源161から被写体に対して光を照射させる。撮像制御部154bは、光源161からの光が照射された被写体を、撮像素子121に撮像させる。   [Step S52] The imaging control unit 154b turns on the light source 161 to irradiate the subject with light from the light source 161. The imaging control unit 154b causes the imaging device 121 to image the subject irradiated with the light from the light source 161.

[ステップS53]撮像素子121によって撮像された画像(中間画像)の信号は、A/Dコンバータ122によってデジタルデータ化され、中間画像データとして画像メモリ131に取り込まれる。   [Step S53] The signal of the image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122 and is taken into the image memory 131 as intermediate image data.

[ステップS54]画像抽出部132bは、ステップS53で画像メモリ131に取り込まれた中間画像データから、R成分およびG成分を分離する。画像抽出部132bは、中間画像の各画素についてR成分の値からG成分の値を減算し、その減算結果が所定のしきい値th1以上であるかを判定する。画像抽出部132bは、減算結果がしきい値th1以上である場合には、その減算結果を画素の値とし、減算結果がしきい値th1未満である場合には、画素の値を0にすることにより、(R−G)成分の画像を生成する。画像抽出部132bは、生成した画像のデータを画像メモリ131に一時的に格納する。   [Step S54] The image extraction unit 132b separates the R component and the G component from the intermediate image data captured in the image memory 131 in step S53. The image extraction unit 132b subtracts the G component value from the R component value for each pixel of the intermediate image, and determines whether the subtraction result is equal to or greater than a predetermined threshold th1. The image extraction unit 132b sets the subtraction result to the pixel value when the subtraction result is equal to or greater than the threshold th1, and sets the pixel value to 0 when the subtraction result is less than the threshold th1. As a result, an image of the (RG) component is generated. The image extraction unit 132 b temporarily stores the generated image data in the image memory 131.

[ステップS55]画像抽出部132bは、ステップS53で画像メモリ131に取り込まれた中間画像データから、R成分およびB成分を分離する。画像抽出部132bは、中間画像の各画素についてR成分の値からB成分の値を減算し、その減算結果が所定のしきい値th2以上であるかを判定する。画像抽出部132bは、減算結果がしきい値th2以上である場合には、その減算結果を画素の値とし、減算結果がしきい値th2未満である場合には、画素の値を0にすることにより、(R−B)成分の画像を生成する。画像抽出部132bは、生成した画像のデータを画像メモリ131に一時的に格納する。   [Step S55] The image extraction unit 132b separates the R component and the B component from the intermediate image data captured in the image memory 131 in step S53. The image extraction unit 132b subtracts the B component value from the R component value for each pixel of the intermediate image, and determines whether the subtraction result is equal to or greater than a predetermined threshold th2. The image extraction unit 132b sets the subtraction result to the pixel value when the subtraction result is equal to or greater than the threshold th2, and sets the pixel value to 0 when the subtraction result is less than the threshold th2. As a result, an image of the (RB) component is generated. The image extraction unit 132 b temporarily stores the generated image data in the image memory 131.

なお、ステップS54,S55の処理順は、逆であってもよい。あるいは、ステップS54,S55の処理が並列に実行されてもよい。
[ステップS56]画像抽出部132bは、ステップS54,S55でそれぞれ生成した画像について、各画素の値の平均を演算することで、特定色画像を生成する。画像抽出部132bは、生成した特定色画像のデータを画像メモリ131に一時的に格納する。
Note that the processing order of steps S54 and S55 may be reversed. Or the process of step S54, S55 may be performed in parallel.
[Step S56] The image extracting unit 132b generates a specific color image by calculating the average of the values of the pixels of the images generated in steps S54 and S55. The image extraction unit 132b temporarily stores the generated specific color image data in the image memory 131.

[ステップS57]画像抽出部132bは、不揮発性記憶部140から設計PSF141を読み込む。画像抽出部132bは、読み込んだ設計PSF141を用いてパターンマッチングを行うことにより、ステップS57で生成した特定色画像から部分画像を抽出する。   [Step S57] The image extraction unit 132b reads the design PSF 141 from the nonvolatile storage unit 140. The image extraction unit 132b extracts a partial image from the specific color image generated in step S57 by performing pattern matching using the read design PSF 141.

なお、部分画像の抽出にパターンマッチングを使用することで、例えば、被写体の表面が曲面の場合など、光源161からの光による点画像の画角内の位置が不安定になる場合でも、部分画像を精度よく抽出できる。ただし、第4の実施の形態のように、パターンマッチングを用いず、部分画像をあらかじめ決められた領域から抽出するようにしてもよい。この場合、ステップS54〜S57の処理は、図17のステップS43〜S46の処理手順のように、先に部分画像を抽出し、抽出した部分画像から(R−G)成分および(R−B)成分の各画像を生成し、各画像の平均をとることによってPSFを求めるように変更してもよい。部分画像をあらかじめ決められた領域から抽出した場合でも、例えば、被写体が平板状の場合などでは、部分画像を精度よく抽出できる。   Note that by using pattern matching to extract a partial image, for example, even when the position within the angle of view of the point image due to light from the light source 161 becomes unstable, such as when the surface of the subject is a curved surface, the partial image Can be extracted with high accuracy. However, as in the fourth embodiment, the partial image may be extracted from a predetermined region without using pattern matching. In this case, the processing in steps S54 to S57 is performed by extracting a partial image first, as in the processing procedure of steps S43 to S46 in FIG. 17, and (RG) component and (RB) from the extracted partial image. The PSF may be changed by generating each image of the components and taking the average of the images. Even when the partial image is extracted from a predetermined region, for example, when the subject is a flat plate, the partial image can be extracted with high accuracy.

[ステップS58]コンボリューション制御部133は、ステップS57で画像抽出部132bによって抽出された部分画像のデータをPSFとし、このPSFを基に逆カーネル「hinv」を算出する。コンボリューション制御部133は、例えば、算出された逆カーネル「hinv」を画像メモリ131に一時的に格納する。 [Step S58] The convolution control unit 133 sets the partial image data extracted by the image extraction unit 132b in step S57 as a PSF, and calculates an inverse kernel “h inv ” based on the PSF. For example, the convolution control unit 133 temporarily stores the calculated inverse kernel “h inv ” in the image memory 131.

[ステップS59]撮像制御部154bは、光源161をオフにし、光源161によって生成された点画像が消滅した被写体を、撮像素子121に撮像させる。
[ステップS60]撮像素子121によって撮像された画像(中間画像)の信号は、A/Dコンバータ122によってデジタルデータ化され、中間画像データとして画像メモリ131に取り込まれる。
[Step S <b> 59] The imaging control unit 154 b turns off the light source 161 and causes the imaging device 121 to image a subject in which the point image generated by the light source 161 disappears.
[Step S60] A signal of an image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122, and is taken into the image memory 131 as intermediate image data.

[ステップS61]コンボリューション演算部134は、ステップS58でコンボリューション制御部133によって算出された逆カーネル「hinv」を用いて、ステップS60で画像メモリ131に記憶された中間画像データに対して、式(5)に従って畳み込み演算を行う。これにより、被写体像の復元処理が実行される。 [Step S61] The convolution calculation unit 134 uses the inverse kernel “h inv ” calculated by the convolution control unit 133 in step S58, and performs intermediate image data stored in the image memory 131 in step S60. A convolution operation is performed according to equation (5). Thereby, a subject image restoration process is executed.

コンボリューション演算部134によって演算処理された画像データは、DSP151によって所定の画質補正処理および圧縮符号化処理が施された後、メモリカード153に記録される。   The image data calculated by the convolution calculation unit 134 is subjected to predetermined image quality correction processing and compression coding processing by the DSP 151, and then recorded on the memory card 153.

なお、上記の図19の処理では、特定の色として赤色の点画像を検出する場合の例を示したが、点画像の色としては赤色に限らない。
以上の第5の実施の形態では、第2の実施の形態と同様に、撮像を行うたびに、その撮像によって得られた中間画像からPSFが求められ、求められたPSFを用いて中間画像に対する復元処理が行われる。このような処理により、被写体との距離の違いによるPSFの誤差が理論上生じなくなるので、被写体との距離によらず、被写体像を高精度に復元できるようになる。また、第5の本実施の形態では、被写体との距離の違いによるPSF誤差だけでなく、第1,第3,第4の各実施の形態と同様に、位相板114を含む光学系の製造誤差によるPSFの誤差も低減できる。
In the above-described processing of FIG. 19, an example in which a red dot image is detected as a specific color has been shown, but the color of the dot image is not limited to red.
In the above fifth embodiment, as in the second embodiment, every time imaging is performed, a PSF is obtained from the intermediate image obtained by the imaging, and the obtained PSF is used to perform the processing on the intermediate image. A restoration process is performed. By such processing, the PSF error due to the difference in distance from the subject does not theoretically occur, and the subject image can be restored with high accuracy regardless of the distance from the subject. Further, in the fifth embodiment, not only the PSF error due to the difference in distance from the subject but also the manufacture of the optical system including the phase plate 114 as in the first, third, and fourth embodiments. PSF errors due to errors can also be reduced.

〔第6の実施の形態〕
上記の第1〜第5の実施の形態では、中間画像内の一箇所から抽出した部分画像をPSFとし、この1つのPSFを用いて被写体像の復元処理を行った。これに対して、PSFを複数求め、被写体像の復元処理時に複数のPSFの中から適切なPSFを選択するという方法もある。以下の第6の実施の形態では、複数のPSFを求める例として、中間画像内の複数箇所からそれぞれPSFを求め、これらのPSFを復元処理時に選択的に使用する撮像装置について説明する。
[Sixth Embodiment]
In the first to fifth embodiments described above, a partial image extracted from one place in the intermediate image is set as a PSF, and a subject image restoration process is performed using the single PSF. On the other hand, there is a method in which a plurality of PSFs are obtained and an appropriate PSF is selected from the plurality of PSFs at the time of subject image restoration processing. In the following sixth embodiment, as an example of obtaining a plurality of PSFs, an imaging apparatus that obtains PSFs from a plurality of locations in an intermediate image and selectively uses these PSFs during restoration processing will be described.

図20は、第6の実施の形態に係る撮像装置の構成例を示す図である。なお、この図20では、図2および図10に対応する構成要素については同じ符号を付して示す。
図20に示す撮像装置100cにおいて、画像復元処理部130cは、図10に示した画像メモリ131を備える。さらに、画像復元処理部130cは、画像抽出部132c、コンボリューション制御部133cおよびコンボリューション演算部134cを備える。
FIG. 20 is a diagram illustrating a configuration example of an imaging apparatus according to the sixth embodiment. In FIG. 20, components corresponding to those in FIGS. 2 and 10 are denoted by the same reference numerals.
In the imaging device 100c illustrated in FIG. 20, the image restoration processing unit 130c includes the image memory 131 illustrated in FIG. Furthermore, the image restoration processing unit 130c includes an image extraction unit 132c, a convolution control unit 133c, and a convolution calculation unit 134c.

画像抽出部132cは、図10の画像抽出部132aと同様に、中間画像の所定領域から部分画像を抽出する。ただし、画像抽出部132cは、中間画像内の複数領域から部分画像を抽出する。   Similar to the image extraction unit 132a of FIG. 10, the image extraction unit 132c extracts a partial image from a predetermined region of the intermediate image. However, the image extraction unit 132c extracts partial images from a plurality of regions in the intermediate image.

コンボリューション制御部133cは、図10のコンボリューション制御部133aと同様に、PSF検出モードにおいて、画像抽出部132cによって抽出された部分画像をPSFとし、このPSFを基に逆カーネル「hinv」を算出して、算出した逆カーネル「hinv」をカーネルデータ142として不揮発性記憶部140に保存する。ただし、コンボリューション制御部133cは、画像抽出部132cによって抽出された複数の部分画像のそれぞれを基にカーネルデータ142を算出し、算出した複数のカーネルデータ142を不揮発性記憶部140に保存する。 Similar to the convolution control unit 133a in FIG. 10, the convolution control unit 133c sets the partial image extracted by the image extraction unit 132c as the PSF in the PSF detection mode, and sets the inverse kernel “h inv ” based on the PSF. The calculated inverse kernel “h inv ” is stored in the nonvolatile storage unit 140 as kernel data 142. However, the convolution control unit 133c calculates kernel data 142 based on each of the plurality of partial images extracted by the image extraction unit 132c, and stores the calculated plurality of kernel data 142 in the nonvolatile storage unit 140.

コンボリューション演算部134cは、図10のコンボリューション演算部134と同様に、本撮像モードにおいて、画像メモリ131に記憶された中間画像データに対して、カーネルデータ142を用いて被写体像の復元処理を行う。ただし、コンボリューション演算部134cは、中間画像を複数の領域に分割し、不揮発性記憶部140に記憶された複数のカーネルデータ142のうち、各分割領域に対応する適切なカーネルデータ142を用いて、被写体像の復元処理を行う。これにより、画角内の位置の違いに応じて発生し得るPSFの誤差を低減することができる。画角内の位置の違いに応じてPSFの誤差が発生する要因としては、例えば、光学ブロック110内のレンズの収差などがある。   Similar to the convolution operation unit 134 in FIG. 10, the convolution operation unit 134 c performs subject image restoration processing using the kernel data 142 on the intermediate image data stored in the image memory 131 in the main imaging mode. Do. However, the convolution operation unit 134c divides the intermediate image into a plurality of regions, and uses the appropriate kernel data 142 corresponding to each divided region among the plurality of kernel data 142 stored in the nonvolatile storage unit 140. Then, subject image restoration processing is performed. As a result, PSF errors that can occur according to the difference in position within the angle of view can be reduced. As a factor causing the PSF error according to the difference in position within the angle of view, for example, there is an aberration of a lens in the optical block 110.

図21は、PSF検出モードにおいて撮像の対象とする被写体の例を示す図である。
本実施の形態の撮像装置100cは、PSF検出モードにおいて、図21に示すような複数の点画像241〜245を撮像する。点画像241〜245は、各点画像241〜245が位相板114の作用によって分散された成分が互いに重複しないように、互いに離間して配置される。また、本実施の形態では、例として、各点画像241〜245は同じ色とされる。この場合、各点画像241〜245の色を背景画像246の色とは異なるものとすることで、撮像装置100cは、各点画像241〜245を背景画像246から分離して検出することができる。
FIG. 21 is a diagram illustrating an example of a subject to be imaged in the PSF detection mode.
Imaging device 100c of the present embodiment captures a plurality of point images 241 to 245 as shown in FIG. 21 in the PSF detection mode. The point images 241 to 245 are arranged apart from each other so that the components in which the point images 241 to 245 are dispersed by the action of the phase plate 114 do not overlap each other. In the present embodiment, as an example, the point images 241 to 245 have the same color. In this case, by setting the color of each point image 241 to 245 to be different from the color of the background image 246, the imaging apparatus 100c can detect each point image 241 to 245 separately from the background image 246. .

点画像241〜245は、例えば、図12に示したように、外部の光源から被写体に光を照射することで生成されたものであってよい。あるいは、点画像241〜245は、被写体状にあらかじめ配置されたものであってもよい。   The point images 241 to 245 may be generated by irradiating a subject with light from an external light source, for example, as shown in FIG. Alternatively, the point images 241 to 245 may be preliminarily arranged in a subject shape.

図22は、部分画像を抽出する領域の設定例を示す図である。
図22に示す中間画像250は、PSF検出モードにおいて撮像された画像である。画像抽出部132cは、中間画像250の領域内にあらかじめ決められた部分画像領域251〜255のそれぞれから、部分画像を抽出する。部分画像領域251〜255は、それぞれ図21に示した点画像241〜245に対応付けられている。
FIG. 22 is a diagram illustrating an example of setting a region from which a partial image is extracted.
An intermediate image 250 illustrated in FIG. 22 is an image captured in the PSF detection mode. The image extraction unit 132c extracts partial images from each of the predetermined partial image regions 251 to 255 in the region of the intermediate image 250. The partial image areas 251 to 255 are associated with the point images 241 to 245 shown in FIG.

PSF検出モードにおいて、ユーザは、点画像241〜245が、それぞれ部分画像領域251〜255の略中心部に配置されるように、画角を調整して撮像を行う。ここで、部分画像領域251〜255のそれぞれの大きさは、点画像241〜245のそれぞれが位相板114によって分散された成分の領域を含むように決定される。   In the PSF detection mode, the user performs imaging while adjusting the angle of view so that the point images 241 to 245 are arranged at substantially the center portions of the partial image regions 251 to 255, respectively. Here, the size of each of the partial image areas 251 to 255 is determined so that each of the point images 241 to 245 includes a component area dispersed by the phase plate 114.

なお、例えば、PSF検出モードでは、モニタ画像を表示する表示部152の領域内に、部分画像領域251〜255をそれぞれ示す枠を表示することで、ユーザは、点画像241〜245がそれぞれ部分画像領域251〜255の略中心部に配置されるように画角を調整することができる。このように、点画像241〜245がそれぞれ部分画像領域251〜255の略中心部に配置された状態で撮像が行われることで、画像抽出部132cは、パターンマッチングを用いずに、あらかじめ設定された領域から画像を抽出するという簡単な処理で複数の部分画像を抽出できるようになる。   For example, in the PSF detection mode, a frame indicating each of the partial image areas 251 to 255 is displayed in the area of the display unit 152 that displays the monitor image, so that the user can display the point images 241 to 245 as the partial images. The angle of view can be adjusted so as to be arranged at substantially the center of the regions 251 to 255. As described above, the image extraction unit 132c is set in advance without using pattern matching by performing the imaging in a state where the point images 241 to 245 are arranged at substantially the center portions of the partial image regions 251 to 255, respectively. A plurality of partial images can be extracted by a simple process of extracting an image from the region.

図23は、中間画像を分割した分割領域の例を示す図である。
図23の中間画像260は、コンボリューション演算部134cが演算の対象とする撮像画像である。コンボリューション演算部134cは、本撮像モードにおいて、演算対象とする中間画像260を複数の領域に分割し、各分割領域に対応するカーネルデータ142を用いて、被写体の復元処理を行う。
FIG. 23 is a diagram illustrating an example of a divided region obtained by dividing the intermediate image.
The intermediate image 260 in FIG. 23 is a captured image that is subject to calculation by the convolution calculation unit 134c. In the main imaging mode, the convolution calculation unit 134c divides the intermediate image 260 to be calculated into a plurality of areas, and performs subject restoration processing using the kernel data 142 corresponding to each divided area.

図23の例では、コンボリューション演算部134cは、演算対象とする中間画像260を5つの分割領域261〜265に分割する。分割領域261〜265は、それぞれ図22に示した部分画像領域251〜255を包含するように設定される。コンボリューション演算部134cは、分割領域261についての復元処理を実行する際には、部分画像領域251を基に算出されたカーネルデータ142を使用する。同様に、コンボリューション演算部134cは、分割領域262〜265についての復元処理を実行する際には、それぞれ部分画像領域252〜255を基に算出されたカーネルデータ142を使用する。これにより、画角内の位置の違いに応じたPSFの誤差が低減され、各分割領域における被写体像をより高精度に復元することができる。   In the example of FIG. 23, the convolution calculation unit 134c divides the intermediate image 260 to be calculated into five divided regions 261 to 265. The divided areas 261 to 265 are set so as to include the partial image areas 251 to 255 shown in FIG. The convolution operation unit 134 c uses the kernel data 142 calculated based on the partial image region 251 when executing the restoration process for the divided region 261. Similarly, the convolution operation unit 134c uses the kernel data 142 calculated based on the partial image areas 252 to 255, respectively, when executing the restoration process for the divided areas 262 to 265. Thereby, the PSF error corresponding to the difference in position within the angle of view is reduced, and the subject image in each divided region can be restored with higher accuracy.

図24は、第6の実施の形態に係る撮像装置のPSF検出モードにおける撮像処理手順を示すフローチャートである。
[ステップS71]撮像制御部154aは、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154aは、シャッタボタンが押下されたことを検知すると、画像復元処理部130cに対して撮像動作の開始信号を出力する。開始信号を受信した画像復元処理部130cは、ステップS72以降の処理を実行する。
FIG. 24 is a flowchart illustrating an imaging process procedure in the PSF detection mode of the imaging apparatus according to the sixth embodiment.
[Step S71] The imaging control unit 154a monitors whether the shutter button of the input unit 155 is pressed. When the imaging control unit 154a detects that the shutter button has been pressed, the imaging control unit 154a outputs an imaging operation start signal to the image restoration processing unit 130c. The image restoration processing unit 130c that has received the start signal executes the processes after step S72.

[ステップS72]撮像素子121によって撮像された画像(中間画像)の信号が、A/Dコンバータ122によってデジタルデータ化される。撮像制御部154aからの開始信号を受信した画像復元処理部130cにおいて、画像メモリ131は、A/Dコンバータ122から出力された中間画像データを取り込む。   [Step S <b> 72] The signal of the image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122. In the image restoration processing unit 130c that has received the start signal from the imaging control unit 154a, the image memory 131 takes in the intermediate image data output from the A / D converter 122.

[ステップS73]画像抽出部132cは、あらかじめ決められた複数の部分画像領域251〜255のうち1つを選択し、画像メモリ131に記憶された中間画像データに基づく中間画像から、選択した部分画像領域を部分画像として抽出する。   [Step S <b> 73] The image extraction unit 132 c selects one of a plurality of predetermined partial image areas 251 to 255, and selects the selected partial image from the intermediate image based on the intermediate image data stored in the image memory 131. Extract the region as a partial image.

なお、このステップS73では、第2の実施の形態の画像抽出部132と同様に、中間画像と設計PSF141とをパターンマッチングすることにより、部分画像が抽出されてもよい。パターンマッチングを行う場合、画像抽出部132cは例えば、ステップS73において、図23に示した分割領域261〜265のうちの1つを選択し、中間画像上の選択した分割領域に対して、設計PSF141とのパターンマッチングを行う。   In step S73, as in the image extraction unit 132 of the second embodiment, a partial image may be extracted by pattern matching between the intermediate image and the design PSF 141. When performing pattern matching, for example, in step S73, the image extraction unit 132c selects one of the divided areas 261 to 265 shown in FIG. 23, and the design PSF 141 is selected for the selected divided area on the intermediate image. And pattern matching.

[ステップS74]コンボリューション制御部133cは、ステップS73で画像抽出部132cによって抽出された部分画像のデータから、R成分およびG成分を分離する。コンボリューション制御部133cは、部分画像の各画素についてR成分の値からG成分の値を減算し、その減算結果が所定のしきい値th1以上であるかを判定する。コンボリューション制御部133cは、減算結果がしきい値th1以上である場合には、その減算結果を画素の値とし、減算結果がしきい値th1未満である場合には、画素の値を0にすることにより、(R−G)成分の画像を生成する。コンボリューション制御部133cは、生成した画像のデータを画像メモリ131に一時的に格納する。   [Step S74] The convolution control unit 133c separates the R component and the G component from the partial image data extracted by the image extraction unit 132c in step S73. The convolution control unit 133c subtracts the value of the G component from the value of the R component for each pixel of the partial image, and determines whether the subtraction result is equal to or greater than a predetermined threshold th1. The convolution control unit 133c sets the subtraction result to the pixel value when the subtraction result is equal to or greater than the threshold th1, and sets the pixel value to 0 when the subtraction result is less than the threshold th1. By doing so, an image of the (R−G) component is generated. The convolution control unit 133 c temporarily stores the generated image data in the image memory 131.

[ステップS75]コンボリューション制御部133cは、ステップS73で画像抽出部132aによって抽出された部分画像のデータから、R成分およびB成分を分離する。コンボリューション制御部133cは、部分画像の各画素についてR成分の値からB成分の値を減算し、その減算結果が所定のしきい値th2以上であるかを判定する。コンボリューション制御部133cは、減算結果がしきい値th2以上である場合には、その減算結果を画素の値とし、減算結果がしきい値th2未満である場合には、画素の値を0にすることにより、(R−B)成分の画像を生成する。コンボリューション制御部133cは、生成した画像のデータを画像メモリ131に一時的に格納する。   [Step S75] The convolution control unit 133c separates the R component and the B component from the partial image data extracted by the image extraction unit 132a in step S73. The convolution control unit 133c subtracts the value of the B component from the value of the R component for each pixel of the partial image, and determines whether the subtraction result is equal to or greater than a predetermined threshold th2. When the subtraction result is greater than or equal to the threshold th2, the convolution control unit 133c sets the subtraction result as the pixel value. When the subtraction result is less than the threshold th2, the convolution control unit 133c sets the pixel value to 0. By doing so, an image of the (RB) component is generated. The convolution control unit 133 c temporarily stores the generated image data in the image memory 131.

なお、ステップS74,S75の処理順は、逆であってもよい。あるいは、ステップS74,S75の処理が並列に実行されてもよい。
[ステップS76]コンボリューション制御部133cは、ステップS74,S75でそれぞれ生成した画像について、各画素の値の平均を演算することで、PSFを算出する。
Note that the processing order of steps S74 and S75 may be reversed. Or the process of step S74, S75 may be performed in parallel.
[Step S76] The convolution control unit 133c calculates the average of the values of the pixels for the images generated in steps S74 and S75, thereby calculating the PSF.

[ステップS77]コンボリューション制御部133cは、ステップS76で算出したPSFを基に逆カーネル「hinv」を算出し、算出した逆カーネル「hinv」を、カーネルデータ142として不揮発性記憶部140に記憶する。 [Step S77] The convolution control unit 133c calculates the inverse kernel “h inv ” based on the PSF calculated in step S76, and stores the calculated inverse kernel “h inv ” as kernel data 142 in the nonvolatile storage unit 140. Remember.

[ステップS78]画像抽出部132cは、あらかじめ決められた複数の部分画像の領域のすべてについてステップS73〜S77の処理を実行したかを判定する。画像抽出部132cは、上記処理が済んでいない領域が存在すると判定した場合、ステップS73の処理を実行する。この場合、画像抽出部132cは、ステップS73において、処理済みでない新たな領域を選択し、中間画像から選択した領域を部分画像として抽出する。一方、画像抽出部132cは、すべての領域について上記処理が実行されたと判定した場合には、PSF検出モードでの処理を終了する。   [Step S78] The image extraction unit 132c determines whether or not the processing in steps S73 to S77 has been executed for all of the predetermined partial image regions. If the image extraction unit 132c determines that there is an area where the above process has not been completed, the image extraction unit 132c executes the process of step S73. In this case, in step S73, the image extraction unit 132c selects a new area that has not been processed, and extracts the selected area from the intermediate image as a partial image. On the other hand, if the image extraction unit 132c determines that the above process has been executed for all regions, the image extraction unit 132c ends the process in the PSF detection mode.

図25は、第6の実施の形態に係る撮像装置の本撮像モードにおける撮像処理手順を示すフローチャートである。
[ステップS81]撮像制御部154aは、入力部155のシャッタボタンが押下されたかを監視する。撮像制御部154aは、シャッタボタンが押下されたことを検知すると、画像復元処理部130cに対して撮像動作の開始信号を出力する。開始信号を受信した画像復元処理部130cは、ステップS82以降の処理を実行する。
FIG. 25 is a flowchart illustrating an imaging processing procedure in the main imaging mode of the imaging apparatus according to the sixth embodiment.
[Step S81] The imaging control unit 154a monitors whether the shutter button of the input unit 155 is pressed. When the imaging control unit 154a detects that the shutter button has been pressed, the imaging control unit 154a outputs an imaging operation start signal to the image restoration processing unit 130c. The image restoration processing unit 130c that has received the start signal executes the processing after step S82.

[ステップS82]撮像素子121によって撮像された画像(中間画像)の信号が、A/Dコンバータ122によってデジタルデータ化される。撮像制御部154aからの開始信号を受信した画像復元処理部130cにおいて、画像メモリ131は、A/Dコンバータ122から出力された中間画像データを取り込む。   [Step S82] A signal of an image (intermediate image) captured by the image sensor 121 is converted into digital data by the A / D converter 122. In the image restoration processing unit 130c that has received the start signal from the imaging control unit 154a, the image memory 131 takes in the intermediate image data output from the A / D converter 122.

[ステップS83]コンボリューション制御部133cは、中間画像の領域のうち、コンボリューション演算部134cにおいて演算対象とする分割領域を選択する。
[ステップS84]コンボリューション制御部133cは、ステップS83で選択した分割領域に対応するカーネルデータ142を、不揮発性記憶部140から読み出す。
[Step S83] The convolution control unit 133c selects a divided region to be calculated by the convolution calculation unit 134c from among the regions of the intermediate image.
[Step S84] The convolution control unit 133c reads the kernel data 142 corresponding to the divided area selected in Step S83 from the nonvolatile storage unit 140.

[ステップS85]コンボリューション演算部134cは、コンボリューション制御部133cによって不揮発性記憶部140から読み出されたカーネルデータ142を用いて、ステップS82で画像メモリ131に記憶された中間画像データのうち、ステップS83で選択した分割領域のデータに対して、式(5)に従って畳み込み演算を行う。コンボリューション演算部134cは、演算済みの画像データを、例えば、画像メモリ131に一時的に格納する。   [Step S85] The convolution calculation unit 134c uses the kernel data 142 read from the nonvolatile storage unit 140 by the convolution control unit 133c, and among the intermediate image data stored in the image memory 131 in Step S82. A convolution operation is performed on the data of the divided region selected in step S83 according to equation (5). The convolution calculation unit 134c temporarily stores the calculated image data in the image memory 131, for example.

[ステップS86]コンボリューション制御部133cは、コンボリューション演算部134cによって演算対象とするすべての分割領域について、ステップS83〜S85の処理を実行したかを判定する。コンボリューション制御部133cは、上記処理が済んでいない分割領域が存在すると判定した場合には、ステップS83の処理を実行する。この場合、コンボリューション制御部133cは、処理済みでない新たな分割領域を選択し、選択した分割領域に対応するカーネルデータ142を、不揮発性記憶部140から読み出す。一方、コンボリューション制御部133cは、すべての分割領域について上記処理が実行されたと判定した場合には、コンボリューション演算部134cにステップS87の処理を実行させる。   [Step S86] The convolution control unit 133c determines whether or not the processing of steps S83 to S85 has been executed for all the divided regions to be calculated by the convolution calculation unit 134c. If the convolution control unit 133c determines that there is a divided region that has not been subjected to the above process, the convolution control unit 133c executes the process of step S83. In this case, the convolution control unit 133c selects a new divided area that has not been processed, and reads the kernel data 142 corresponding to the selected divided area from the nonvolatile storage unit 140. On the other hand, when the convolution control unit 133c determines that the above process has been executed for all the divided regions, the convolution calculation unit 134c causes the process of step S87 to be executed.

[ステップS87]コンボリューション演算部134cは、ステップS85で演算が施された各画像を統合し、被写体像が復元された画像としてDSP151に出力する。
コンボリューション演算部134cから出力された画像データは、DSP151によって所定の画質補正処理および圧縮符号化処理が施された後、メモリカード153に記録される。
[Step S87] The convolution calculation unit 134c integrates the images that have been calculated in step S85, and outputs them to the DSP 151 as an image in which the subject image is restored.
The image data output from the convolution operation unit 134 c is subjected to predetermined image quality correction processing and compression encoding processing by the DSP 151, and then recorded on the memory card 153.

以上の第6の実施の形態では、中間画像上の複数の領域からPSFが求められ、復元対象とする中間画像上の領域ごとに、各領域に対応するPSFを用いて被写体像の復元処理が実行される。このような処理により、画角内の位置の違いに応じたPSFの誤差が低減され、各分割領域における被写体像をより高精度に復元することができる。   In the sixth embodiment described above, the PSF is obtained from a plurality of regions on the intermediate image, and subject image restoration processing is performed using the PSF corresponding to each region for each region on the intermediate image to be restored. Executed. By such processing, the PSF error corresponding to the difference in position within the angle of view is reduced, and the subject image in each divided region can be restored with higher accuracy.

なお、上記の第6の実施の形態で説明した、複数の領域からそれぞれ求めたPSFのいずれかを用いて被写体像を復元するという処理は、前述の第3,第5の実施の形態にも適用することが可能である。   Note that the processing for restoring a subject image using any one of PSFs obtained from a plurality of areas described in the sixth embodiment is also applied to the third and fifth embodiments. It is possible to apply.

また、中間画像に基づくPSFを複数求め、被写体像の復元処理時にPSFを選択的に使用する他の例としては、PSF検出モードにおいて、撮像装置との距離が異なる複数の被写体を撮像し、これらの撮像によって得られた複数の中間画像のそれぞれからPSFを求める方法が考えられる。この場合、撮像装置は、被写体との距離を計測する距離計を備え、本撮像モードにおいて、距離計によって被写体との距離を計測し、計測した距離に対応するPSFを用いて被写体像の復元処理を行う。これにより、第2の実施の形態と同様に、被写体との距離の違いによるPSFの誤差が低減されるので、被写体との距離によらず、被写体像を高精度に復元できるようになる。   Another example of obtaining a plurality of PSFs based on the intermediate image and selectively using the PSF during the subject image restoration process is to capture a plurality of subjects at different distances from the imaging device in the PSF detection mode. A method is conceivable in which PSF is obtained from each of a plurality of intermediate images obtained by imaging. In this case, the imaging apparatus includes a distance meter that measures the distance to the subject. In this imaging mode, the distance to the subject is measured by the distance meter, and the subject image is restored using the PSF corresponding to the measured distance. I do. As a result, as in the second embodiment, the PSF error due to the difference in distance to the subject is reduced, so that the subject image can be restored with high accuracy regardless of the distance to the subject.

また、上記の第2〜第6の実施の形態では、位相変調素子として厚さが変化する位相板を用いたが、位相変調素子としてはこのような位相板に限定されない。他の位相変調素子としては、例えば、屈折率分布型波面変調レンズのように、屈折率が場所によって変化する光学素子、あるいは、波面変調ハイブリッドレンズのように、レンズ表面へのコーディングなどにより厚みや屈折率が変化する光学素子、液晶空間位相変調素子のように、位相分布を変調可能な液晶素子などを使用できる。   In the second to sixth embodiments described above, the phase plate whose thickness changes is used as the phase modulation element, but the phase modulation element is not limited to such a phase plate. Other phase modulation elements include, for example, an optical element whose refractive index changes depending on the location, such as a gradient index wavefront modulation lens, or a thickness or the like by coding on the lens surface, such as a wavefront modulation hybrid lens. A liquid crystal element capable of modulating the phase distribution, such as an optical element whose refractive index changes and a liquid crystal spatial phase modulation element, can be used.

また、上記の第2〜第6の実施の形態では、入射光を2方向に分散させる位相変調素子が用いられたが、位相変調素子としてはこのようなものに限らず、入射光を規則的に分散させる種々の位相変調素子を使用できる。   In the second to sixth embodiments, the phase modulation element that disperses the incident light in two directions is used. However, the phase modulation element is not limited to this, and the incident light is regularly distributed. Various phase modulation elements can be used.

以上の各実施の形態に関し、さらに以下の付記を開示する。
(付記1) 被写体からの光を位相変調素子を通じて受光する撮像素子と、
前記撮像素子によって得られた撮像画像から、点画像が分散された領域を含む部分画像を抽出する画像抽出部と、
前記画像抽出部によって抽出された前記部分画像を点像分布関数として用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する処理を施す復元処理部と、
を有することを特徴とする撮像装置。
Regarding the above embodiments, the following supplementary notes are further disclosed.
(Appendix 1) An image sensor that receives light from a subject through a phase modulation element;
An image extraction unit that extracts a partial image including a region in which point images are dispersed from a captured image obtained by the imaging element;
A restoration processing unit that uses the partial image extracted by the image extraction unit as a point spread function and performs a process of restoring a subject image on a captured image obtained by the imaging element;
An imaging device comprising:

(付記2) 前記復元処理部は、前記画像抽出部によって前記部分画像の抽出対象とされた撮像画像と同じ撮像画像に対して、被写体像を復元する処理を施すことを特徴とする付記1記載の撮像装置。   (Additional remark 2) The said restoration process part performs the process which decompress | restores a to-be-photographed image with respect to the captured image same as the captured image used as the extraction object of the said partial image by the said image extraction part. Imaging device.

(付記3) 前記画像抽出部は、前記撮像素子によって得られた撮像画像に対して、前記位相変調素子を含む光学系の設計値から算出された他の点像分布関数とのパターンマッチングを行うことで、前記部分画像を抽出することを特徴とする付記1または2記載の撮像装置。   (Additional remark 3) The said image extraction part performs pattern matching with the other point spread function calculated from the design value of the optical system containing the said phase modulation element with respect to the captured image obtained by the said imaging element The imaging apparatus according to appendix 1 or 2, wherein the partial image is extracted.

(付記4) 前記復元処理部は、前記画像抽出部による前記部分画像の抽出後に前記撮像素子によって新たに得られた撮像画像に対して、前記画像抽出部によって抽出された前記部分画像を点像分布関数として用い、前記被写体像を復元する処理を施すことを特徴とする付記1記載の撮像装置。   (Additional remark 4) The said restoration process part is a point image of the said partial image extracted by the said image extraction part with respect to the captured image newly acquired by the said image pick-up element after the extraction of the said partial image by the said image extraction part. The imaging apparatus according to appendix 1, wherein a processing for restoring the subject image is performed as a distribution function.

(付記5) 前記被写体に対して光を照射することで前記被写体上に前記点画像を生成する発光部をさらに有し、
前記画像抽出部は、前記発光部からの光が照射された前記被写体を前記撮像素子が撮像することで得られた撮像画像から、前記部分画像を抽出し、
前記復元処理部は、前記発光部からの光の照射が中止された後の前記被写体を前記撮像素子が撮像することで得られた撮像画像に対して、前記被写体像を復元する処理を施す、
ことを特徴とする付記4記載の撮像装置。
(Additional remark 5) It further has the light emission part which produces | generates the said point image on the said subject by irradiating light with respect to the said subject,
The image extraction unit extracts the partial image from a captured image obtained by the imaging element imaging the subject irradiated with light from the light emitting unit,
The restoration processing unit performs a process of restoring the subject image on a captured image obtained by the imaging element capturing an image of the subject after irradiation of light from the light emitting unit is stopped.
The imaging apparatus according to appendix 4, wherein the imaging apparatus is characterized in that

(付記6) 前記復元処理部は、前記画像抽出部によって抽出された前記部分画像から、前記点画像の色を含む特定の色領域の成分を抽出することで得た画像を、点像分布関数として用いることを特徴とする付記1,4,5のいずれか1つに記載の撮像装置。   (Additional remark 6) The said restoration process part is an image obtained by extracting the component of the specific color area | region containing the color of the said point image from the said partial image extracted by the said image extraction part. The imaging apparatus according to any one of supplementary notes 1, 4, and 5, wherein the imaging apparatus is used as:

(付記7) 前記画像抽出部は、前記撮像素子によって得られた撮像画像からあらかじめ決められた領域を前記部分画像として抽出することを特徴とする付記1,4,5,6のいずれか1つに記載の撮像装置。   (Supplementary note 7) Any one of Supplementary notes 1, 4, 5, and 6, wherein the image extraction unit extracts a predetermined region from the captured image obtained by the imaging element as the partial image. The imaging device described in 1.

(付記8) 前記あらかじめ決められた領域は、前記撮像素子によって得られた撮像画像の中央部を中心とした領域であることを特徴とする付記7記載の撮像装置。
(付記9) 前記画像抽出部は、前記撮像素子によって得られた撮像画像から、前記点画像の色を含む特定の色領域の成分を抽出した画像を生成し、前記特定の色領域の成分を抽出した画像に対して、前記位相変調素子を含む光学系の設計値から算出された他の点像分布関数とのパターンマッチングを行うことで、前記部分画像を抽出することを特徴とする付記1,4,5のいずれか1つに記載の撮像装置。
(Additional remark 8) The said predetermined area | region is an area | region centering on the center part of the captured image obtained by the said image pick-up element, The imaging device of Additional remark 7 characterized by the above-mentioned.
(Additional remark 9) The said image extraction part produces | generates the image which extracted the component of the specific color area | region containing the color of the said point image from the captured image obtained by the said image pick-up element, The component of the said specific color area | region is produced | generated. Supplementary note 1 wherein the partial image is extracted by performing pattern matching on the extracted image with another point spread function calculated from a design value of an optical system including the phase modulation element. , 4, 5.

(付記10) 前記画像抽出部は、前記撮像素子によって得られた撮像画像から、それぞれ個別の点画像が分散された領域を含む複数の部分画像を抽出し、
前記復元処理部は、前記撮像素子によって得られた撮像画像上の分割領域ごとに、前記複数の部分画像のうち各分割領域に対応する部分画像を選択して点像分布関数として用いて、前記被写体像を復元する処理を施す、
ことを特徴とする付記1〜7のいずれか1つに記載の撮像装置。
(Additional remark 10) The said image extraction part extracts the some partial image containing the area | region where each individual point image was disperse | distributed from the captured image obtained by the said image pick-up element,
The restoration processing unit selects, for each divided region on the captured image obtained by the image sensor, a partial image corresponding to each divided region from the plurality of partial images, and uses the selected partial image as a point spread function. Apply processing to restore the subject image,
The imaging device according to any one of appendices 1 to 7, characterized in that:

(付記11) 被写体からの光を位相変調素子を通じて受光する撮像素子によって得られた撮像画像から、点画像が分散された領域を含む部分画像を抽出する画像抽出部と、
前記画像抽出部によって抽出された前記部分画像を点像分布関数として用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する処理を施す復元処理部と、
を有することを特徴とする画像処理装置。
(Additional remark 11) The image extraction part which extracts the partial image containing the area | region where the point image was disperse | distributed from the picked-up image obtained by the image pick-up element which receives the light from a to-be-photographed object through a phase modulation element,
A restoration processing unit that uses the partial image extracted by the image extraction unit as a point spread function and performs a process of restoring a subject image on a captured image obtained by the imaging element;
An image processing apparatus comprising:

(付記12) 被写体からの光を位相変調素子を通じて受光する撮像素子を備えた撮像装置における撮像方法であって、
前記撮像素子によって得られた撮像画像から、点画像が分散された領域を含む部分画像を抽出し、
抽出された前記部分画像を点像分布関数として用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する、
ことを特徴とする撮像方法。
(Additional remark 12) It is the imaging method in the imaging device provided with the image sensor which receives light from a subject through a phase modulation element,
Extracting a partial image including a region in which point images are dispersed from a captured image obtained by the imaging element,
Using the extracted partial image as a point spread function and restoring a subject image with respect to a captured image obtained by the imaging element;
An imaging method characterized by the above.

(付記13) 前記撮像装置は、前記部分画像の抽出対象とした撮像画像と同じ撮像画像に対して、前記被写体像を復元する処理を施すことを特徴とする付記12記載の撮像方法。   (Additional remark 13) The said imaging device performs the process which decompress | restores the said to-be-photographed image with respect to the captured image same as the captured image used as the extraction object of the said partial image, The imaging method of Additional remark 12 characterized by the above-mentioned.

(付記14) 前記撮像装置は、前記部分画像の抽出後に前記撮像素子によって得られた撮像画像に対して、当該部分画像を点像分布関数として用い、前記被写体像を復元する処理を施すことを特徴とする付記12記載の撮像方法。   (Additional remark 14) The said imaging device performs the process which decompress | restores the said to-be-photographed image using the said partial image as a point spread function with respect to the captured image obtained by the said image pick-up element after extraction of the said partial image. The imaging method according to appendix 12, which is a feature.

(付記15) 前記撮像装置は、
前記被写体に対して光を照射することで当該被写体上に点画像を生成し、
光が照射された前記被写体を前記撮像素子が撮像することで得られた撮像画像から、前記部分画像を抽出し、
前記被写体に対する光の照射を中止し、
前記光の照射が中止された後の前記被写体を前記撮像素子が撮像することで得られた撮像画像に対して、前記被写体像を復元する処理を施す、
ことを特徴とする付記14記載の撮像方法。
(Supplementary Note 15) The imaging device includes:
A point image is generated on the subject by irradiating the subject with light,
Extracting the partial image from a captured image obtained by the imaging device capturing the subject irradiated with light,
Stop irradiating the subject with light,
A process of restoring the subject image is performed on a captured image obtained by the imaging element capturing the subject after the light irradiation is stopped.
The imaging method according to supplementary note 14, characterized in that:

1 撮像装置
11 撮像素子
12 位相変調素子
13 画像抽出部
14 復元処理部
P1 撮像画像
P2 部分画像
P3 画像
DESCRIPTION OF SYMBOLS 1 Imaging device 11 Imaging element 12 Phase modulation element 13 Image extraction part 14 Restoration process part P1 Captured image P2 Partial image P3 image

Claims (10)

被写体からの光を位相変調素子を通じて受光する撮像素子と、
前記撮像素子によって得られた撮像画像から、前記位相変調素子を含む光学系の設計値から算出された第1の点像分布関数に類似する部分画像を抽出する画像抽出部と、
前記画像抽出部によって抽出された前記部分画像から得た第2の点像分布関数を用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する処理を施す復元処理部と、
を有することを特徴とする撮像装置。
An image sensor that receives light from a subject through a phase modulation element;
An image extraction unit that extracts a partial image similar to a first point spread function calculated from a design value of an optical system including the phase modulation element, from a captured image obtained by the imaging element ;
Using a second point spread function obtained from the partial image extracted by the image extraction unit, a restoration processing unit that performs a process of restoring a subject image on the captured image obtained by the imaging element;
An imaging device comprising:
前記復元処理部は、前記画像抽出部によって前記部分画像の抽出対象とされた撮像画像と同じ撮像画像に対して、前記被写体像を復元する処理を施すことを特徴とする請求項1記載の撮像装置。 2. The imaging according to claim 1, wherein the restoration processing unit performs a process of restoring the subject image on the same captured image as the captured image that is the extraction target of the partial image by the image extraction unit. apparatus. 前記画像抽出部は、前記撮像素子によって得られた撮像画像に対して、前記第1の点像分布関数とのパターンマッチングを行うことで、前記部分画像を抽出することを特徴とする請求項1または2記載の撮像装置。 The image extraction unit extracts the partial image by performing pattern matching with the first point spread function on a captured image obtained by the imaging element. Or the imaging device of 2. 前記復元処理部は、前記画像抽出部による前記部分画像の抽出後に前記撮像素子によって新たに得られた撮像画像に対して、前記画像抽出部によって抽出された前記部分画像から得た前記第2の点像分布関数を用い、前記被写体像を復元する処理を施すことを特徴とする請求項1記載の撮像装置。 The restoration processing unit is configured to extract the second image obtained from the partial image extracted by the image extraction unit with respect to a captured image newly obtained by the imaging element after the partial image is extracted by the image extraction unit. The imaging apparatus according to claim 1, wherein a processing for restoring the subject image is performed using a point spread function. 前記被写体に対して光を照射することで前記被写体上に点画像を生成する発光部をさらに有し、
前記画像抽出部は、前記発光部からの光が照射された前記被写体を前記撮像素子が撮像することで得られた撮像画像から、前記部分画像を抽出し、
前記復元処理部は、前記発光部からの光の照射が中止された後の前記被写体を前記撮像素子が撮像することで得られた撮像画像に対して、前記被写体像を復元する処理を施す、
ことを特徴とする請求項4記載の撮像装置。
A light emitting unit for generating a point image on the subject by irradiating the subject with light;
The image extraction unit extracts the partial image from a captured image obtained by the imaging element imaging the subject irradiated with light from the light emitting unit,
The restoration processing unit performs a process of restoring the subject image on a captured image obtained by the imaging element capturing an image of the subject after irradiation of light from the light emitting unit is stopped.
The imaging apparatus according to claim 4.
前記復元処理部は、前記画像抽出部によって抽出された前記部分画像から特定の色領域の成分を抽出し、抽出後の画像から得た前記第2の点像分布関数を用いて前記被写体像を復元する処理を施すことを特徴とする請求項1,4,5のいずれか1項に記載の撮像装置。 The restoration processing unit extracts a component of a specific color region from the partial image extracted by the image extraction unit, and uses the second point spread function obtained from the extracted image to extract the subject image. The imaging apparatus according to claim 1, wherein a restoration process is performed. 前記画像抽出部は、前記撮像素子によって得られた撮像画像から、特定の色領域の成分を抽出した画像を生成し、前記特定の色領域の成分を抽出した画像に対して、前記第1の点像分布関数とのパターンマッチングを行うことで、前記部分画像を抽出することを特徴とする請求項1,4,5のいずれか1項に記載の撮像装置。 The image extraction unit generates an image obtained by extracting a component of a specific color region from a captured image obtained by the image sensor, and the first image is extracted from the image obtained by extracting the component of the specific color region . The image pickup apparatus according to claim 1, wherein the partial image is extracted by performing pattern matching with a point spread function. 前記画像抽出部は、前記撮像素子によって得られた撮像画像の複数箇所から、前記第1の点像分布関数にそれぞれ類似する複数の部分画像を抽出し、
前記復元処理部は、前記撮像素子によって得られた撮像画像上の分割領域ごとに、前記複数の部分画像のうち各分割領域に対応する部分画像を選択してそれぞれ前記第2の点像分布関数として用いて、前記被写体像を復元する処理を施す、
ことを特徴とする請求項1〜6のいずれか1項に記載の撮像装置。
The image extraction unit extracts a plurality of partial images respectively similar to the first point spread function from a plurality of locations of the captured image obtained by the imaging element;
The restoration processing unit selects, for each divided region on the captured image obtained by the image sensor, a partial image corresponding to each divided region from the plurality of partial images, and each of the second point spread function To perform a process of restoring the subject image,
The imaging apparatus according to claim 1, wherein
被写体からの光を位相変調素子を通じて受光する撮像素子によって得られた撮像画像から、前記位相変調素子を含む光学系の設計値から算出された第1の点像分布関数に類似する部分画像を抽出する画像抽出部と、
前記画像抽出部によって抽出された前記部分画像から得た第2の点像分布関数を用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する処理を施す復元処理部と、
を有することを特徴とする画像処理装置。
A partial image similar to the first point spread function calculated from the design value of the optical system including the phase modulation element is extracted from the captured image obtained by the imaging element that receives light from the subject through the phase modulation element. An image extraction unit to
Using a second point spread function obtained from the partial image extracted by the image extraction unit, a restoration processing unit that performs a process of restoring a subject image on the captured image obtained by the imaging element;
An image processing apparatus comprising:
被写体からの光を位相変調素子を通じて受光する撮像素子を備えた撮像装置における撮像方法であって、
前記撮像素子によって得られた撮像画像から、前記位相変調素子を含む光学系の設計値から算出された第1の点像分布関数に類似する部分画像を抽出し、
抽出された前記部分画像から得た第2の点像分布関数を用い、前記撮像素子によって得られた撮像画像に対して被写体像を復元する、
ことを特徴とする撮像方法。
An imaging method in an imaging device including an imaging element that receives light from a subject through a phase modulation element,
Extracting a partial image similar to the first point spread function calculated from the design value of the optical system including the phase modulation element from the captured image obtained by the imaging element ;
Using a second point spread function obtained from the extracted partial image, to restore the subject image with respect to the captured image obtained by the imaging element;
An imaging method characterized by the above.
JP2010257542A 2010-11-18 2010-11-18 Imaging apparatus, image processing apparatus, and imaging method Expired - Fee Related JP5614256B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010257542A JP5614256B2 (en) 2010-11-18 2010-11-18 Imaging apparatus, image processing apparatus, and imaging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010257542A JP5614256B2 (en) 2010-11-18 2010-11-18 Imaging apparatus, image processing apparatus, and imaging method

Publications (3)

Publication Number Publication Date
JP2012109826A JP2012109826A (en) 2012-06-07
JP2012109826A5 JP2012109826A5 (en) 2013-10-31
JP5614256B2 true JP5614256B2 (en) 2014-10-29

Family

ID=46494967

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010257542A Expired - Fee Related JP5614256B2 (en) 2010-11-18 2010-11-18 Imaging apparatus, image processing apparatus, and imaging method

Country Status (1)

Country Link
JP (1) JP5614256B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6236908B2 (en) * 2013-06-21 2017-11-29 株式会社リコー Imaging apparatus, imaging system, and imaging method
JP7055625B2 (en) * 2017-02-23 2022-04-18 ソニー・オリンパスメディカルソリューションズ株式会社 Endoscope device
US10779715B2 (en) 2017-02-23 2020-09-22 Sony Olympus Medical Solutions Inc. Endoscope apparatus
JP7339813B2 (en) 2019-08-30 2023-09-06 マクセル株式会社 skin test equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2005069216A1 (en) * 2004-01-15 2010-02-25 松下電器産業株式会社 Optical transfer function measurement method, image restoration method, and digital imaging apparatus
JP4985062B2 (en) * 2006-04-14 2012-07-25 株式会社ニコン camera
JP4749985B2 (en) * 2006-09-28 2011-08-17 京セラ株式会社 Imaging device, manufacturing apparatus and manufacturing method thereof
JP2009088935A (en) * 2007-09-28 2009-04-23 Sanyo Electric Co Ltd Image recording apparatus, image correcting apparatus, and image pickup apparatus
JP2009244944A (en) * 2008-03-28 2009-10-22 Nikon Corp Image-recovering apparatus and photographing apparatus
JP2010087859A (en) * 2008-09-30 2010-04-15 Fujifilm Corp Image processing parameter calculator, image processing parameter calculating method, manufacturing method, image pickup device, image pickup method and program

Also Published As

Publication number Publication date
JP2012109826A (en) 2012-06-07

Similar Documents

Publication Publication Date Title
US8872937B2 (en) Image capture apparatus and image capturing method
US9581436B2 (en) Image processing device, image capturing apparatus, and image processing method
EP2536125B1 (en) Imaging device and method, and image processing method for imaging device
US20100039539A1 (en) Image processing apparatus and image processing method
JP2011211669A (en) Image processing apparatus, image pickup apparatus and image processing program
EP2533198A1 (en) Imaging device and method, and image processing method for imaging device
JP2014029353A (en) Focus adjustment device, and focus adjustment method
US20180182075A1 (en) Image processing apparatus, image capturing apparatus, method of image processing, and storage medium
JP2013029656A (en) Image pickup apparatus
JP4466015B2 (en) Image processing apparatus and image processing program
JP5614256B2 (en) Imaging apparatus, image processing apparatus, and imaging method
JP5272699B2 (en) Image processing apparatus, imaging apparatus, program, and image processing method
JP2008033060A (en) Imaging apparatus and imaging method, and image processor
JP5159715B2 (en) Image processing device
US10715723B2 (en) Image processing apparatus, image acquisition system, image processing method, and image processing program
JP5464982B2 (en) Imaging apparatus and image processing method
US20220159191A1 (en) Image pickup apparatus
US8736722B2 (en) Enhanced image capture sharpening
JP2014033305A (en) Image processing apparatus, imaging apparatus, and image processing program
JP4466016B2 (en) Image processing apparatus and image processing program
JP2011229111A (en) Imaging apparatus
JP2012070119A (en) Image processing device, image processing program, and electronic camera
JP5418258B2 (en) Imaging apparatus and image processing method
JP2009089228A (en) Imaging apparatus
JP2012133492A (en) Image processing device and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130911

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140509

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140513

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140710

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140812

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140825

R150 Certificate of patent or registration of utility model

Ref document number: 5614256

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees