JP2013186355A - Automatic focusing apparatus, automatic focusing method, and program - Google Patents

Automatic focusing apparatus, automatic focusing method, and program Download PDF

Info

Publication number
JP2013186355A
JP2013186355A JP2012052388A JP2012052388A JP2013186355A JP 2013186355 A JP2013186355 A JP 2013186355A JP 2012052388 A JP2012052388 A JP 2012052388A JP 2012052388 A JP2012052388 A JP 2012052388A JP 2013186355 A JP2013186355 A JP 2013186355A
Authority
JP
Japan
Prior art keywords
image
filter
unit
predetermined
evaluation value
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.)
Granted
Application number
JP2012052388A
Other languages
Japanese (ja)
Other versions
JP6056160B2 (en
Inventor
Susumu Onozawa
将 小野澤
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2012052388A priority Critical patent/JP6056160B2/en
Publication of JP2013186355A publication Critical patent/JP2013186355A/en
Application granted granted Critical
Publication of JP6056160B2 publication Critical patent/JP6056160B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To generate a focus image properly.SOLUTION: An imaging apparatus 100 includes: a region image generation unit 2c which performs, using multiple filters that respectively have different filter coefficients corresponding to subject distances, predetermined filtering to processing target regions of an image signal converted from a subject image having passed through a predetermined optical system, and which generates multiple processed region images; an evaluation value calculation unit 2d which calculates contrast evaluation values of the respective processed region images generated; an evaluation value identification unit 2e which compares the contrast evaluation values calculated, so as to identify the highest evaluation value; and a filter selection unit 2f which selects, as a filter to be used for a focus image generation processing, a filter that corresponds to a processed region image having the highest evaluation value identified.

Description

本発明は、自動合焦装置、自動合焦方法及びプログラムに関する。   The present invention relates to an automatic focusing device, an automatic focusing method, and a program.

従来、光波面変調素子を通過した被写体の分散像の画像信号から分散のない画像信号を復元する撮像装置が知られている(例えば、特許文献1参照)。この撮像装置は、被写体までの距離に応じて光波面変調素子に起因する分散に対応した変換係数を選択して、当該変換係数を用いてコンボリューション演算を行って、画像信号の復元を行う。   2. Description of the Related Art Conventionally, an imaging apparatus that restores an image signal without dispersion from an image signal of a dispersion image of a subject that has passed through an optical wavefront modulation element is known (see, for example, Patent Document 1). This imaging apparatus selects a conversion coefficient corresponding to the dispersion caused by the light wavefront modulation element according to the distance to the subject, performs a convolution operation using the conversion coefficient, and restores the image signal.

特開2007−117413号公報JP 2007-117413 A

しかしながら、上記特許文献1の場合、変換係数の選択のためには測距センサ等の被写体までの距離を測定する手段が必要となる。さらに、距離測定を正確に行うことができなかった場合には、画像信号の復元を適正に行うことができないといった問題がある。   However, in the case of the above-mentioned Patent Document 1, a means for measuring the distance to the subject such as a distance measuring sensor is required for selecting the conversion coefficient. Furthermore, there is a problem that when the distance measurement cannot be performed accurately, the image signal cannot be properly restored.

そこで、本発明の課題は、合焦画像の生成を適正に行うことができる自動合焦装置、自動合焦方法及びプログラムを提供することである。   Accordingly, an object of the present invention is to provide an automatic focusing apparatus, an automatic focusing method, and a program that can appropriately generate a focused image.

上記課題を解決するため、本発明に係る自動合焦装置は、
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段と、所定の光学系を通った被写体像から変換された画像信号を取得する取得手段と、この取得手段により取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段と、この第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段と、この算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段と、この特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する選択手段と、を備えたことを特徴としている。
In order to solve the above problems, an automatic focusing device according to the present invention is
A storage unit that stores a plurality of filters having different filter coefficients corresponding to the subject distance, an acquisition unit that acquires an image signal converted from a subject image that has passed through a predetermined optical system, and acquired by the acquisition unit First generation means for applying a predetermined filter process to each predetermined area of the image signal using each of the plurality of filters stored in the storage means to generate a plurality of processed area images; The calculation unit that calculates the contrast evaluation values of the plurality of processed region images generated by the one generation unit and the plurality of contrast evaluation values calculated by the calculation unit are compared to identify the highest evaluation value And a filter corresponding to the processed area image having the highest evaluation value specified by the specifying means is used for the focus image generation process. It is characterized a selection means for selecting a filter, further comprising: a.

また、本発明に係る自動合焦方法は、
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段を備える自動合焦装置を用いた自動合焦方法であって、所定の光学系を通った被写体像から変換された画像信号を取得する処理と、取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する処理と、生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する処理と、算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する処理と、特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する処理と、を含むことを特徴としている。
Moreover, the automatic focusing method according to the present invention includes:
An automatic focusing method using an automatic focusing device including a storage unit that stores a plurality of filters having different filter coefficients corresponding to a subject distance, and is converted from a subject image passing through a predetermined optical system A process of acquiring an image signal and a predetermined filter process using each of a plurality of filters stored in the storage unit for a predetermined area of the acquired image signal, and a plurality of processed area images A process of generating, a process of calculating a contrast evaluation value of each of the generated plurality of processed area images, a process of comparing the calculated evaluation values of the plurality of contrasts, and specifying the highest evaluation value; And a process of selecting a filter corresponding to the processed region image having the highest evaluation value identified as a filter used for the process of generating a focused image. That.

また、本発明に係るプログラムは、
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段を備える自動合焦装置のコンピュータを、所定の光学系を通った被写体像から変換された画像信号を取得する取得手段、この取得手段により取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段、この第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段、この算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段、この特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する選択手段、として機能させることを特徴としている。
The program according to the present invention is
Acquiring means for acquiring an image signal converted from a subject image that has passed through a predetermined optical system, using a computer of an automatic focusing device having a storage means for storing a plurality of filters having different filter coefficients corresponding to the subject distance The predetermined region of the image signal acquired by the acquisition unit is subjected to predetermined filter processing using each of the plurality of filters stored in the storage unit to generate a plurality of processed region images. 1 generating means, calculating means for calculating the contrast evaluation values of the plurality of processed region images generated by the first generating means, respectively, comparing the plurality of contrast evaluation values calculated by the calculating means, A specifying means for specifying a high evaluation value, and a filter corresponding to the processed area image of the highest evaluation value specified by the specifying means Selecting means for selecting a filter for use in the generation process is characterized in that to function as a.

本発明によれば、合焦画像の生成を適正に行うことができる。   According to the present invention, it is possible to appropriately generate a focused image.

本発明を適用した実施形態1の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of Embodiment 1 to which this invention is applied. 図1の撮像装置による自動合焦処理に係る動作の一例を示すフローチャートである。3 is a flowchart illustrating an example of an operation related to an automatic focusing process by the imaging apparatus of FIG. 1. 図2の自動合焦処理における合焦画像生成処理に係る動作の一例を示すフローチャートである。3 is a flowchart illustrating an example of an operation related to a focused image generation process in the automatic focusing process of FIG. 2. 図2の自動合焦処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the automatic focusing process of FIG. 本発明を適用した実施形態2の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of Embodiment 2 to which this invention is applied. 図5の撮像装置による自動合焦処理における合焦画像生成処理に係る動作の一例を示すフローチャートである。6 is a flowchart illustrating an example of an operation related to a focused image generation process in an automatic focusing process performed by the imaging apparatus of FIG. 5. 図6の合焦画像生成処理の続きを示すフローチャートである。7 is a flowchart showing a continuation of the focused image generation process of FIG. 6. 図6の自動合焦処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the automatic focusing process of FIG. 変形例1の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of the modification 1. 図9の撮像装置による自動合焦処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the automatic focusing process by the imaging device of FIG.

以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.

[実施形態1]
図1は、本発明を適用した実施形態1の撮像装置100の概略構成を示すブロック図である。
図1に示すように、実施形態1の撮像装置100は、具体的には、撮像部1と、画像処理部2と、メモリ3と、画像記録部4と、表示制御部5と、表示部6と、操作入力部7と、中央制御部8とを備えている。
また、撮像部1、画像処理部2、メモリ3、画像記録部4、表示制御部5及び中央制御部8は、バスライン9を介して接続されている。
[Embodiment 1]
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging apparatus 100 according to the first embodiment to which the present invention is applied.
As illustrated in FIG. 1, the imaging apparatus 100 according to the first embodiment specifically includes an imaging unit 1, an image processing unit 2, a memory 3, an image recording unit 4, a display control unit 5, and a display unit. 6, an operation input unit 7, and a central control unit 8.
The imaging unit 1, the image processing unit 2, the memory 3, the image recording unit 4, the display control unit 5, and the central control unit 8 are connected via a bus line 9.

撮像部1は、撮像手段として、所定の被写体を撮像してフレーム画像を生成する。
具体的には、撮像部1は、光学系1aと、電子撮像部1bと、撮像制御部1cとを備えている。
The imaging unit 1 captures a predetermined subject and generates a frame image as an imaging unit.
Specifically, the imaging unit 1 includes an optical system 1a, an electronic imaging unit 1b, and an imaging control unit 1c.

光学系1aは、被写体の映像を光学的に取り込むものであり、各種のレンズを有している。具体的には、光学系1aは、電子撮像部1bにより変換された画像信号に対してフィルタを用いた復元処理を施すことを前提とした形態の被写体像を結像する復元処理前提光学系を有して構成されている。即ち、図示は省略するが、復元処理前提光学系は、被写体側に露出された物体側レンズと、被写体の光学像を電子撮像部1bに結像させるための結像レンズとの間に、結像レンズによる電子撮像部1bの受光面への結像の波面を変形させる光波面変調素子(波面形成用光学素子)を具備している。光波面変調素子は、例えば、3次元的曲面を有する位相板等から構成されている。
また、復元処理前提光学系(位相板)を通った被写体の光学像は、電子撮像部1bの受光面上でピントのどこにも合わない分散像を形成する。即ち、光波面変調素子によって、電子撮像部1bの受光面上に、像形成の中心的役割をなす深度の深い光束とボケ部分であるフレアーとが形成され、被写体像が分散した状態となる。このように、復元処理前提光学系を通った被写体の光学像は、被写界深度が拡張されることから、復元処理前提光学系は、被写界深度を拡張する深度拡張光学系を含んでいると言える。
The optical system 1a optically captures an image of a subject and has various lenses. Specifically, the optical system 1a includes a restoration processing premise optical system that forms a subject image in a form on the premise that restoration processing using a filter is performed on the image signal converted by the electronic imaging unit 1b. It is configured. That is, although not shown, the restoration precondition optical system is connected between an object-side lens exposed on the subject side and an imaging lens for forming an optical image of the subject on the electronic imaging unit 1b. An optical wavefront modulation element (wavefront forming optical element) that deforms the wavefront of the image formed on the light receiving surface of the electronic imaging unit 1b by the image lens is provided. The light wavefront modulation element is composed of, for example, a phase plate having a three-dimensional curved surface.
Further, the optical image of the subject that has passed through the reconstruction processing prerequisite optical system (phase plate) forms a dispersed image that does not fit anywhere on the light receiving surface of the electronic imaging unit 1b. In other words, the light wavefront modulation element forms a deep light flux and a flare that is a blurred portion that play a central role in image formation on the light receiving surface of the electronic imaging unit 1b, and the subject image is dispersed. As described above, since the depth of field of the optical image of the subject that has passed through the restoration processing premise optical system is extended, the restoration processing premise optical system includes a depth extension optical system that extends the depth of field. I can say that.

なお、光波面変調素子として例示した位相板は、一例であってこれに限られるものではなく、適宜任意に変更可能である。例えば、光波面変調素子としては、波面を変形させるものであればどのようなものでもよく、厚みが変化する光学素子、屈折率が変化する光学素子、レンズ表面へのコーディングにより厚み、屈折率が変化する光学素子、光の位相分布を変調可能な液晶素子等であっても良い。   The phase plate exemplified as the light wavefront modulation element is an example and is not limited to this, and can be arbitrarily changed as appropriate. For example, the optical wavefront modulation element may be any element that deforms the wavefront, such as an optical element whose thickness changes, an optical element whose refractive index changes, and a thickness and refractive index that are coded by coating on the lens surface. It may be an optical element that changes, a liquid crystal element that can modulate the phase distribution of light, or the like.

電子撮像部1bは、例えば、CCD(Charge Coupled Device)やCMOS(Complementary Metal-oxide Semiconductor)等のイメージセンサ(撮像素子)から構成されている。そして、電子撮像部1bは、光学系1aを通った被写体の光学像を二次元の画像信号に変換する。例えば、電子撮像部1bは、上記の光学系1aを通った被写体の分散像を画像信号に変換する。   The electronic imaging unit 1b includes, for example, an image sensor (imaging device) such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS). Then, the electronic imaging unit 1b converts the optical image of the subject that has passed through the optical system 1a into a two-dimensional image signal. For example, the electronic imaging unit 1b converts a dispersed image of the subject that has passed through the optical system 1a into an image signal.

撮像制御部1cは、被写体の撮像を制御する。即ち、撮像制御部1cは、図示は省略するが、タイミング発生器、ドライバなどを備えている。そして、撮像制御部1cは、タイミング発生器、ドライバにより電子撮像部1bを走査駆動して、レンズを通った被写体の光学像を電子撮像部1bにより所定周期毎に二次元の画像信号に変換させ、当該電子撮像部1bの撮像領域から1画面分ずつフレーム画像を読み出して画像処理部2に出力させる。   The imaging control unit 1c controls imaging of a subject. That is, the imaging control unit 1c includes a timing generator, a driver, and the like, although not illustrated. Then, the imaging control unit 1c scans and drives the electronic imaging unit 1b with a timing generator and a driver, and the electronic imaging unit 1b converts the optical image of the subject passing through the lens into a two-dimensional image signal for each predetermined period. Then, the frame image is read out for each screen from the imaging area of the electronic imaging unit 1b and is output to the image processing unit 2.

なお、撮像制御部1cは、AE(自動露出処理)、AWB(自動ホワイトバランス)等の被写体を撮像する際の条件の調整制御を行っても良い。   Note that the imaging control unit 1c may perform adjustment control of conditions when imaging a subject such as AE (automatic exposure processing) and AWB (automatic white balance).

画像処理部2は、電子撮像部1bから転送された各フレーム画像の被写体の分散像の画像信号から分散のない画像信号を生成する。具体的には、画像処理部2は、画像取得部2aと、第1領域設定部2bと、領域画像生成部2cと、評価値算出部2dと、評価値特定部2eと、フィルタ選択部2fと、第1合焦画像生成部2gと、フィルタ記憶部2hとを具備している。
なお、画像処理部2の各部は、例えば、所定のロジック回路から構成されているが、当該構成は一例であってこれに限られるものではない。
The image processing unit 2 generates an image signal without dispersion from the image signal of the dispersion image of the subject of each frame image transferred from the electronic imaging unit 1b. Specifically, the image processing unit 2 includes an image acquisition unit 2a, a first region setting unit 2b, a region image generation unit 2c, an evaluation value calculation unit 2d, an evaluation value specification unit 2e, and a filter selection unit 2f. And a first in-focus image generation unit 2g and a filter storage unit 2h.
Note that each unit of the image processing unit 2 is configured by, for example, a predetermined logic circuit, but the configuration is an example and is not limited thereto.

画像取得部2aは、被写体像の画像信号を取得する。
即ち、画像取得部2aは、取得手段として、撮像部1の光学系1aを通った被写体の光学像から電子撮像部1bにより変換された画像信号を取得する。具体的には、画像取得部2aは、電子撮像部1bにより生成された被写体の分散像の画像信号を取得する。
The image acquisition unit 2a acquires an image signal of the subject image.
That is, the image acquisition unit 2a acquires an image signal converted by the electronic imaging unit 1b from an optical image of a subject that has passed through the optical system 1a of the imaging unit 1 as an acquisition unit. Specifically, the image acquisition unit 2a acquires the image signal of the dispersed image of the subject generated by the electronic imaging unit 1b.

第1領域設定部2bは、フィルタ処理の処理対象領域A1を複数設定する。
即ち、第1領域設定部2bは、第1設定手段として、画像取得部2aにより取得された被写体の分散像の画像信号に対応する分散画像P1内で、当該画像の略全域にかけて処理対象領域(所定領域)A1を複数設定する(図4(a)参照)。具体的には、第1領域設定部2bは、分散画像P1を構成する全ての画素を処理対象領域A1として、例えば、所定位置(例えば、左上隅部等)から順次設定する。
なお、図4(a)にあっては、分散画像P1を模式的に表している。
The first region setting unit 2b sets a plurality of processing target regions A1 for the filter process.
In other words, the first area setting unit 2b serves as a first setting unit in the distributed image P1 corresponding to the image signal of the distributed image of the subject acquired by the image acquisition unit 2a over substantially the entire area of the image ( A plurality of predetermined areas A1 are set (see FIG. 4A). Specifically, the first region setting unit 2b sequentially sets all the pixels constituting the distributed image P1 as the processing target region A1, for example, from a predetermined position (for example, the upper left corner).
In FIG. 4A, the dispersion image P1 is schematically shown.

領域画像生成部2cは、処理対象領域A1の画像信号に対して所定のフィルタ処理を施して、処理済み領域画像を複数生成する。
即ち、領域画像生成部2cは、第1生成手段として、画像取得部2aにより取得された被写体の分散像の画像信号の処理対象領域A1に対して、フィルタ記憶部2hに記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する。具体的には、領域画像生成部2cは、第1領域設定部2bにより分散画像P1の各画素毎に設定された複数の処理対象領域A1、…の各々について、フィルタ記憶部2hに記憶されている第1〜第3フィルタの各々を用いて復元処理を行って、分散のない処理済み領域画像を3つずつ生成する。
The region image generation unit 2c performs a predetermined filter process on the image signal of the processing target region A1 to generate a plurality of processed region images.
That is, the area image generation unit 2c serves as a first generation unit with respect to the processing target area A1 of the image signal of the dispersed image of the subject acquired by the image acquisition unit 2a. A predetermined filter process is performed using each of the filters to generate a plurality of processed area images. Specifically, the region image generation unit 2c stores each of the plurality of processing target regions A1,... Set for each pixel of the dispersed image P1 by the first region setting unit 2b in the filter storage unit 2h. The restoration processing is performed using each of the first to third filters, and three processed region images without dispersion are generated.

評価値算出部2dは、処理済み領域画像のコントラストの評価値を算出する。
即ち、評価値算出部2dは、算出手段として、領域画像生成部2cにより生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する。具体的には、評価値算出部2dは、各処理済み領域画像の画像データを取得して、当該処理済み領域画像のコントラストの高低を示す評価値を算出する。
The evaluation value calculation unit 2d calculates the evaluation value of the contrast of the processed region image.
That is, the evaluation value calculation unit 2d calculates, as calculation means, the contrast evaluation values of the plurality of processed region images generated by the region image generation unit 2c. Specifically, the evaluation value calculation unit 2d acquires image data of each processed region image and calculates an evaluation value indicating the level of contrast of the processed region image.

評価値特定部2eは、複数のコントラストの評価値の中で最も高い評価値を特定する。
即ち、評価値特定部2eは、特定手段として、評価値算出部2dにより算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する。具体的には、評価値特定部2eは、複数の処理対象領域A1、…の各々について、評価値算出部2dにより算出された第1〜第3フィルタを用いて生成された3つの処理済み領域画像のコントラストの評価値を比較して、この中で最も高い評価値を特定する。
The evaluation value specifying unit 2e specifies the highest evaluation value among a plurality of contrast evaluation values.
That is, the evaluation value specifying unit 2e, as specifying means, compares a plurality of contrast evaluation values calculated by the evaluation value calculating unit 2d and specifies the highest evaluation value. Specifically, the evaluation value specifying unit 2e has three processed regions generated using the first to third filters calculated by the evaluation value calculating unit 2d for each of the plurality of processing target regions A1,. By comparing the evaluation values of the contrast of the image, the highest evaluation value is specified.

フィルタ選択部2fは、複数のフィルタの中で、合焦画像P2(図4(b)参照)の生成処理に用いられるフィルタを選択する。
即ち、フィルタ選択部2fは、選択手段として、評価値特定部2eにより特定されたコントラストの評価値の最も高い処理済み領域画像に対応するフィルタを、合焦画像P2の生成処理に用いられるフィルタとして選択する。具体的には、フィルタ選択部2fは、複数の処理対象領域A1、…の各々について、評価値特定部2eにより特定されたコントラストの評価値の最も高い処理済み領域画像の復元処理に用いられたフィルタを第1〜第3フィルタの中から選択する。
The filter selection unit 2f selects a filter used for generating the focused image P2 (see FIG. 4B) from among a plurality of filters.
That is, the filter selection unit 2f serves as a filter that is used as a selection unit for the processed image of the focused image P2 that corresponds to the processed region image having the highest contrast evaluation value specified by the evaluation value specifying unit 2e. select. Specifically, the filter selection unit 2f was used for the restoration process of the processed region image having the highest contrast evaluation value specified by the evaluation value specifying unit 2e for each of the plurality of processing target regions A1,. A filter is selected from the first to third filters.

第1合焦画像生成部2gは、合焦画像P2を生成する。
即ち、第1合焦画像生成部2gは、第2生成手段として、画像取得部2aにより取得された画像信号に対応する分散画像P1内で、各処理対象領域A1に対して、フィルタ選択部2fにより選択されたフィルタを用いて所定のフィルタ処理をそれぞれ施し、合焦画像P2を生成する。具体的には、第1合焦画像生成部2gは、分散画像P1の各画素毎に、当該画素に対応させて設定された処理対象領域A1についてフィルタ選択部2fにより選択されたフィルタを用いて復元処理を行って、分散のない画像を生成し、各画素に対応する画像を組み合わせて合焦画像P2を生成する。
The first focused image generation unit 2g generates a focused image P2.
That is, the first focused image generation unit 2g serves as a second generation unit for each processing target area A1 in the distributed image P1 corresponding to the image signal acquired by the image acquisition unit 2a. Predetermined filter processing is performed using the filter selected by (1) to generate a focused image P2. Specifically, the first focused image generation unit 2g uses, for each pixel of the dispersed image P1, a filter selected by the filter selection unit 2f for the processing target area A1 set corresponding to the pixel. A restoration process is performed to generate an image having no dispersion, and an image corresponding to each pixel is combined to generate a focused image P2.

フィルタ記憶部2hは、フィルタ係数の異なる複数のフィルタを記憶する。
即ち、フィルタ記憶部2hは、記憶手段として、当該装置本体から被写体までの距離(被写体距離)に対応させてフィルタ係数を異なせた複数のフィルタを記憶する。
ここで、フィルタ係数とは、光学系1aを通った被写体の光学像の点拡がり関数(Point spread function)が、復元処理にて所定値となるように復元するための係数のことである。また、フィルタ係数としては、例えば、所定のフィルタのカーネルのサイズを規定する係数が挙げられる。
具体的には、例えば、フィルタ記憶部2hは、被写体距離としての「至近」と第1フィルタ係数とが対応付けられた第1フィルタと、被写体距離としての「無限遠」と第2フィルタ係数とが対応付けられた第2フィルタと、被写体距離として至近と無限遠との間の「中間」と第3フィルタ係数とが対応付けられた第3フィルタとを記憶している。
The filter storage unit 2h stores a plurality of filters having different filter coefficients.
That is, the filter storage unit 2h stores a plurality of filters with different filter coefficients corresponding to the distance from the apparatus main body to the subject (subject distance) as storage means.
Here, the filter coefficient is a coefficient for restoring the point spread function of the optical image of the subject passing through the optical system 1a so that the point spread function becomes a predetermined value in the restoration process. Moreover, as a filter coefficient, the coefficient which prescribes | regulates the size of the kernel of a predetermined filter is mentioned, for example.
Specifically, for example, the filter storage unit 2h includes a first filter in which “close” as the subject distance and the first filter coefficient are associated with each other, “infinity” as the subject distance, and the second filter coefficient. And a third filter in which the “intermediate” between the closest and infinity as the subject distance and the third filter coefficient are associated with each other are stored.

また、画像処理部2は、合焦画像P2のYUV色空間に対応するYUVデータを生成し、当該YUVデータに対して各種の画像処理や圧縮等を施してファイル化する。そして、画像処理部2は、ファイル化された画像データを画像記録部4に転送する。   Further, the image processing unit 2 generates YUV data corresponding to the YUV color space of the focused image P2, and performs various image processing, compression, and the like on the YUV data to form a file. Then, the image processing unit 2 transfers the filed image data to the image recording unit 4.

メモリ3は、例えば、DRAM(Dynamic Random Access Memory)等により構成され、画像処理部2や中央制御部8等によって処理されるデータ等を一時的に格納する。   The memory 3 is composed of, for example, a DRAM (Dynamic Random Access Memory) or the like, and temporarily stores data processed by the image processing unit 2 or the central control unit 8.

画像記録部4は、例えば、不揮発性メモリ(フラッシュメモリ)等により構成され、画像処理部2の符号化部(図示略)により所定の圧縮形式(例えば、JPEG形式等)で符号化された記録用の画像データを記録する。
なお、画像記録部4は、例えば、記録媒体(図示略)が着脱自在に構成され、装着された記録媒体からのデータの読み出しや記録媒体に対するデータの書き込みを制御する構成であっても良い。
The image recording unit 4 is configured by, for example, a non-volatile memory (flash memory) or the like, and is recorded by a coding unit (not shown) of the image processing unit 2 in a predetermined compression format (for example, JPEG format). Record image data for use.
Note that the image recording unit 4 may be configured, for example, such that a recording medium (not shown) is detachable and controls reading of data from the loaded recording medium and writing of data to the recording medium.

表示制御部5は、メモリ3に一時的に格納されている表示用の画像データを読み出して表示部6に表示させる制御を行う。
具体的には、表示制御部5は、VRAM(Video Random Access Memory)、VRAMコントローラ、デジタルビデオエンコーダなどを備えている。そして、デジタルビデオエンコーダは、中央制御部8の制御下にてメモリ3から読み出されてVRAM(図示略)に格納されている輝度信号Y及び色差信号Cb,Crを、VRAMコントローラを介してVRAMから定期的に読み出して、これらのデータを元にビデオ信号を発生して表示部6に出力する。
The display control unit 5 performs control to read display image data temporarily stored in the memory 3 and display it on the display unit 6.
Specifically, the display control unit 5 includes a VRAM (Video Random Access Memory), a VRAM controller, a digital video encoder, and the like. The digital video encoder reads the luminance signal Y and the color difference signals Cb and Cr read from the memory 3 and stored in the VRAM (not shown) under the control of the central control unit 8 via the VRAM controller. Are periodically read out, and a video signal is generated based on these data and output to the display unit 6.

表示部6は、例えば、液晶表示パネルであり、表示制御部5からのビデオ信号に基づいて撮像部1により撮像された画像などを表示画面に表示する。具体的には、表示部6は、静止画撮像モードや動画撮像モードにて、撮像部1及び撮像制御部1cによる被写体の撮像により生成された複数のフレーム画像を所定のフレームレートで逐次更新しながらライブビュー画像を表示する。また、表示部6は、静止画として記録される画像(レックビュー画像)を表示したり、動画として記録中の画像を表示する。   The display unit 6 is, for example, a liquid crystal display panel, and displays an image captured by the imaging unit 1 based on a video signal from the display control unit 5 on a display screen. Specifically, the display unit 6 sequentially updates a plurality of frame images generated by subject imaging by the imaging unit 1 and the imaging control unit 1c at a predetermined frame rate in the still image capturing mode and the moving image capturing mode. While displaying the live view image. The display unit 6 displays an image (rec view image) recorded as a still image or an image being recorded as a moving image.

操作入力部7は、当該撮像装置100の所定操作を行うためのものである。具体的には、操作入力部7は、被写体の撮像指示に係るシャッタボタン、撮像モードや機能等の選択指示に係る選択決定ボタン、ズーム量の調整指示に係るズームボタン等(何れも図示略)の操作部を備え、当該操作部の各ボタンの操作に応じて所定の操作信号を中央制御部8に出力する。   The operation input unit 7 is for performing a predetermined operation of the imaging apparatus 100. Specifically, the operation input unit 7 includes a shutter button related to an imaging instruction of a subject, a selection determination button related to an instruction to select an imaging mode and a function, a zoom button related to an instruction to adjust the zoom amount, and the like (all not shown). And outputs a predetermined operation signal to the central control unit 8 in accordance with the operation of each button of the operation unit.

中央制御部8は、撮像装置100の各部を制御するものである。具体的には、中央制御部8は、図示は省略するが、CPU(Central Processing Unit)等を備え、撮像装置100用の各種処理プログラム(図示略)に従って各種の制御動作を行う。   The central control unit 8 controls each unit of the imaging device 100. Specifically, although not shown, the central control unit 8 includes a CPU (Central Processing Unit) and the like, and performs various control operations according to various processing programs (not shown) for the imaging apparatus 100.

次に、撮像装置100による自動合焦処理について、図2〜図4を参照して説明する。
図2は、自動合焦処理に係る動作の一例を示すフローチャートである。
Next, automatic focusing processing by the imaging apparatus 100 will be described with reference to FIGS.
FIG. 2 is a flowchart illustrating an example of an operation related to the automatic focusing process.

以下に説明する自動合焦処理は、ユーザによる操作入力部7の所定操作に基づいて、メニュー画面に表示された複数の動作モードの中から合焦画像生成モードが選択指示された場合に実行される処理である。   The automatic focusing process described below is executed when a focused image generation mode is selected from a plurality of operation modes displayed on the menu screen based on a predetermined operation of the operation input unit 7 by the user. Process.

<自動合焦処理>
図2に示すように、撮像部1は、所定の撮像フレームレートで被写体の撮像を行い(ステップS1)、中央制御部8のCPUは、ユーザによる操作入力部7のシャッタボタンの所定操作に基づいて、撮像画像の記録指示が入力されたか否かを判定する(ステップS2)。
ここで、記録指示が入力されていないと判定されると(ステップS2;NO)、中央制御部8のCPUは、処理をステップS1に戻し、それ以降の処理の実行を制御する。
<Automatic focus processing>
As shown in FIG. 2, the imaging unit 1 images a subject at a predetermined imaging frame rate (step S1), and the CPU of the central control unit 8 is based on a predetermined operation of the shutter button of the operation input unit 7 by the user. Then, it is determined whether or not an instruction to record the captured image has been input (step S2).
If it is determined that the recording instruction has not been input (step S2; NO), the CPU of the central control unit 8 returns the process to step S1 and controls the execution of the subsequent processes.

ステップS1にて、記録指示が入力されたと判定されると(ステップS2;YES)、画像処理部2の画像取得部2aは、撮像部1の光学系1aを通った被写体の光学像から電子撮像部1bにより変換された被写体の分散像の画像信号を取得する(ステップS3)。   If it is determined in step S1 that a recording instruction has been input (step S2; YES), the image acquisition unit 2a of the image processing unit 2 performs electronic imaging from the optical image of the subject that has passed through the optical system 1a of the imaging unit 1. An image signal of the dispersed image of the subject converted by the unit 1b is acquired (step S3).

次に、画像処理部2は、合焦画像P2を生成する合焦画像生成処理(図3参照)を行う(ステップS4)。
ここで、合焦画像生成処理について図3を参照して詳細に説明する。図3は、合焦画像生成処理に係る動作の一例を示すフローチャートである。
Next, the image processing unit 2 performs a focused image generation process (see FIG. 3) for generating a focused image P2 (step S4).
Here, the focused image generation processing will be described in detail with reference to FIG. FIG. 3 is a flowchart illustrating an example of an operation related to the focused image generation process.

<合焦画像生成処理>
図4に示すように、画像処理部2の第1領域設定部2bは、被写体の分散像の画像信号に対応する分散画像P1内の所定位置の一の画素(例えば、左上隅部の画素等)を処理対象領域A1として設定する(ステップS11)。
次に、領域画像生成部2cは、フィルタ記憶部2hに記憶されている第1〜第3フィルタの中で、何れか一のフィルタ(例えば、第1フィルタ等)を指定した後(ステップS12)、指定されたフィルタを用いた復元処理を処理対象領域A1の画素に施して、分散のない処理済み領域画像を生成する(ステップS13)。
<In-focus image generation processing>
As shown in FIG. 4, the first region setting unit 2b of the image processing unit 2 is a pixel at a predetermined position in the dispersed image P1 corresponding to the image signal of the dispersed image of the subject (for example, the pixel in the upper left corner) ) Is set as the processing target area A1 (step S11).
Next, after designating any one filter (for example, the first filter) among the first to third filters stored in the filter storage unit 2h, the region image generation unit 2c (step S12). Then, the restoration process using the designated filter is performed on the pixels of the processing target area A1, and a processed area image without dispersion is generated (step S13).

続けて、評価値算出部2dは、領域画像生成部2cにより生成された処理済み領域画像のコントラストの高低を示す評価値を算出して、メモリ3に一時的に記憶させる(ステップS14)。
次に、画像処理部2は、処理対象領域A1の画素に対して、全てのフィルタを用いて復元処理を行ったか否かを判定する(ステップS15)。ここで、全てのフィルタを用いて復元処理を行っていないと判定されると(ステップS15;NO)、領域画像生成部2cは、フィルタ番号を+1インクリメントして、第1〜第3フィルタの中で、使用されたフィルタとは異なる次のフィルタ(例えば、第2フィルタ等)を指定した後(ステップS16)、処理をステップS13に移行させる。
Subsequently, the evaluation value calculation unit 2d calculates an evaluation value indicating the level of contrast of the processed region image generated by the region image generation unit 2c, and temporarily stores it in the memory 3 (step S14).
Next, the image processing unit 2 determines whether restoration processing has been performed on all pixels in the processing target area A1 (step S15). Here, if it is determined that the restoration process has not been performed using all the filters (step S15; NO), the region image generation unit 2c increments the filter number by +1 and includes the first through third filters. Then, after designating the next filter (for example, the second filter) different from the used filter (step S16), the process proceeds to step S13.

ステップS13にて、領域画像生成部2cは、指定されたフィルタ(例えば、第2フィルタ等)を用いた復元処理を処理対象領域A1の画素に施して、分散のない処理済み領域画像を生成する。そして、ステップS14にて、評価値算出部2dは、領域画像生成部2cにより生成された処理済み領域画像のコントラストの高低を示す評価値を算出した後、ステップS15にて、画像処理部2は、処理対象領域A1の画素に対して、全てのフィルタを用いて復元処理を行ったか否かを判定する(ステップS15)。   In step S13, the region image generation unit 2c applies a restoration process using a designated filter (for example, the second filter) to the pixels of the processing target region A1, and generates a processed region image without dispersion. . In step S14, the evaluation value calculation unit 2d calculates an evaluation value indicating the level of contrast of the processed region image generated by the region image generation unit 2c. In step S15, the image processing unit 2 Then, it is determined whether or not the restoration process has been performed on all pixels in the processing target area A1 (step S15).

上記の各処理は、ステップS15にて、全てのフィルタを用いて復元処理を行ったと判定(ステップS15;YES)されるまで繰り返し実行される。
これにより、処理対象領域A1の画素に対して、全てのフィルタを用いた処理対象領域A1画像のコントラストの評価値が算出される。
Each of the above processes is repeatedly executed until it is determined in step S15 that the restoration process has been performed using all the filters (step S15; YES).
Thereby, the evaluation value of the contrast of the processing target area A1 image using all the filters is calculated for the pixels of the processing target area A1.

そして、ステップS15にて、全てのフィルタを用いて復元処理を行ったと判定されると(ステップS15;YES)、評価値特定部2eは、処理対象領域A1の画素に対して、評価値算出部2dにより算出された3つのコントラストの評価値を比較して、最も高い評価値を特定する(ステップS17)。
続けて、フィルタ選択部2fは、第1〜第3フィルタの中で、評価値特定部2eにより特定されたコントラストの評価値の最も高い処理済み領域画像の復元処理に用いられたフィルタを選択し、この選択したフィルタを示す情報を現在の処理対象領域A1の画素の選択フィルタ情報としてメモリ3に一時的に記憶する(ステップS18)。
これにより、合焦画像P2の生成に際して、当該処理対象領域A1の画素の画像信号の復元処理に用いられるフィルタが特定される。
If it is determined in step S15 that restoration processing has been performed using all filters (step S15; YES), the evaluation value specifying unit 2e performs an evaluation value calculation unit on the pixels in the processing target area A1. The three evaluation values of the contrast calculated by 2d are compared to identify the highest evaluation value (step S17).
Subsequently, the filter selection unit 2f selects the filter used for the restoration process of the processed region image having the highest contrast evaluation value specified by the evaluation value specifying unit 2e from the first to third filters. Information indicating the selected filter is temporarily stored in the memory 3 as selected filter information of the pixel in the current processing target area A1 (step S18).
Thereby, when the focused image P2 is generated, the filter used for the restoration process of the image signal of the pixel in the processing target area A1 is specified.

次に、画像処理部2は、分散画像P1の全ての画素について処理したか否かを判定する(ステップS19)。ここで、全ての画素について処理していないと判定されると(ステップS19;NO)、第1領域設定部2bは、画素番号を+1インクリメントして、分散画像P1内で、次の画素(例えば、右隣りの画素等)を処理対象領域A1として設定した後(ステップS20)、処理をステップS12に移行させる。
そして、次の画素を処理対象領域A1として、ステップS12以降の各処理が実行され、ステップS18にて、当該処理対象領域A1の画素の画像信号の復元処理に用いられるフィルタが特定される。
Next, the image processing unit 2 determines whether or not all the pixels of the distributed image P1 have been processed (step S19). Here, if it is determined that all the pixels are not processed (step S19; NO), the first region setting unit 2b increments the pixel number by +1, and the next pixel (for example, , The right adjacent pixel, etc.) is set as the processing target area A1 (step S20), and then the process proceeds to step S12.
Then, each process after step S12 is executed with the next pixel as the processing target area A1, and in step S18, a filter used for the image signal restoration processing of the pixel in the processing target area A1 is specified.

上記の各処理は、ステップS19にて全ての画素について処理したと判定(ステップS19;YES)されるまで繰り返し実行される。
これにより、分散画像P1の全ての画素について、復元処理に用いられるフィルタが特定される。
Each of the above processes is repeatedly executed until it is determined in step S19 that all pixels have been processed (step S19; YES).
Thereby, the filter used for a decompression | restoration process is specified about all the pixels of the dispersion | distribution image P1.

そして、ステップS19にて、全ての画素について処理したと判定されると(ステップS19;YES)、第1合焦画像生成部2gは、分散画像P1の各画素毎に、フィルタ選択部2fにより選択され、メモリ3に一時的に記憶されている選択フィルタ情報が示すフィルタを用いて画像信号の復元処理を行って分散のない画像を生成し、各画素に対応する分散のない画像を合成して合焦画像P2を生成した後(ステップS21)、合焦画像生成処理を終了する。
なお、例えば、メモリ3に、領域画像生成部2cにより第1〜第3フィルタを用いて生成された全ての画素に対応する処理済み領域画像を記憶しておき、第1合焦画像生成部2gは、各画素についてフィルタ選択部2fにより選択されたフィルタを用いて生成された処理済み領域画像を取得して合焦画像P2を生成しても良い。これにより、第1合焦画像生成部2gは、フィルタ選択部2fにより選択されたフィルタを用いて画像信号の復元処理を改めて行う必要がなくなる。
If it is determined in step S19 that all the pixels have been processed (step S19; YES), the first focused image generation unit 2g selects each pixel of the dispersed image P1 by the filter selection unit 2f. Then, the image indicated by the selection filter information temporarily stored in the memory 3 is used to perform image signal restoration processing to generate a non-dispersed image, and a non-dispersed image corresponding to each pixel is synthesized. After generating the focused image P2 (step S21), the focused image generation process is terminated.
For example, the processed region image corresponding to all the pixels generated by the region image generation unit 2c using the first to third filters is stored in the memory 3, and the first focused image generation unit 2g is stored. May acquire the processed region image generated by using the filter selected by the filter selection unit 2f for each pixel to generate the focused image P2. This eliminates the need for the first focused image generation unit 2g to perform image signal restoration processing again using the filter selected by the filter selection unit 2f.

図2に戻り、画像処理部2は、合焦画像P2のYUV色空間に対応するYUVデータを生成し、当該YUVデータに対して各種の画像処理や圧縮等を施してファイル化した後、画像記録部4は、生成された合焦画像P2の画像データを記録する。
これにより、自動合焦処理を終了する。
Returning to FIG. 2, the image processing unit 2 generates YUV data corresponding to the YUV color space of the focused image P <b> 2, performs various image processing, compression, and the like on the YUV data to form a file. The recording unit 4 records the image data of the generated focused image P2.
This completes the automatic focusing process.

以上のように、実施形態1の撮像装置100によれば、所定の光学系1aを通った被写体像から変換された画像信号の処理対象領域A1に対して、被写体距離に対応させてフィルタ係数を異なせた複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施して処理済み領域画像を複数生成することができる。具体的には、画像信号のフィルタを用いた復元処理を前提とした形態の被写体像を結像する復元処理前提光学系を通った被写体像から変換された画像信号の処理対象領域A1に復元処理を施して処理済み領域画像を生成することができる。特に、被写界深度を拡張する深度拡張光学系等を通った被写体の分散像から変換された画像信号の処理対象領域A1に復元処理を施して分散のない処理済み領域画像を生成することができる。
そして、複数の処理済み領域画像のコントラストの評価値を比較して最も高い評価値を特定し、最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像P2の生成処理に用いられるフィルタとして選択するので、測距センサ等の測距手段を用いなくとも被写体までの距離に応じた最適なフィルタ係数のフィルタを選択することができ、距離測定の不正確さに起因する不適正なフィルタ処理の実行を防止することができる。結果として、被写体像から変換された画像信号に対して、選択されたフィルタを用いて所定のフィルタ処理をそれぞれ施して、合焦画像P2の生成を適正に行うことができる。
As described above, according to the imaging apparatus 100 of the first embodiment, the filter coefficient is set corresponding to the subject distance for the processing target area A1 of the image signal converted from the subject image that has passed through the predetermined optical system 1a. A plurality of processed region images can be generated by performing predetermined filter processing using each of a plurality of different filters. Specifically, restoration processing is performed on the processing target area A1 of the image signal converted from the subject image that has passed through the restoration processing premise optical system that forms a subject image in a form premised on restoration processing using an image signal filter. To generate a processed region image. In particular, it is possible to generate a processed region image without dispersion by performing a restoration process on the processing target region A1 of the image signal converted from the dispersed image of the subject that has passed through a depth expanding optical system or the like that extends the depth of field. it can.
Then, the highest evaluation value is identified by comparing the contrast evaluation values of the plurality of processed area images, and the filter corresponding to the processed area image having the highest evaluation value is used for the process of generating the focused image P2. Since it is selected as a filter, it is possible to select a filter with an optimum filter coefficient corresponding to the distance to the subject without using a distance measuring means such as a distance measuring sensor, which is inappropriate due to inaccuracy of distance measurement. Execution of filter processing can be prevented. As a result, it is possible to appropriately generate the focused image P2 by performing predetermined filter processing on each of the image signals converted from the subject image using the selected filter.

また、画像信号の略全域にかけて設定された複数の処理対象領域A1、…の各々について、複数のフィルタの各々に対応する処理済み領域画像を複数生成し、複数の処理対象領域A1、…の各々について、算出された複数のコントラストの評価値の中で最も高い評価値を特定し、複数の処理対象領域A1、…の各々について、特定された最も高い評価値の処理済み領域画像に対応するフィルタを選択するので、処理対象領域A1毎に被写体までの距離に応じた最適なフィルタ係数のフィルタを選択することができる。特に、処理対象領域A1を一画素毎に設定することで、各画素毎に最適なフィルタ係数のフィルタを選択して所定のフィルタ処理をそれぞれ行うことで、全ての画素でピントの合った合焦画像P2を生成することができる。   Further, for each of the plurality of processing target areas A1,... Set over substantially the entire area of the image signal, a plurality of processed area images corresponding to each of the plurality of filters are generated, and each of the plurality of processing target areas A1,. For each of the plurality of processing target areas A1,..., A filter corresponding to the processed area image with the highest evaluation value specified. Therefore, it is possible to select a filter having an optimum filter coefficient corresponding to the distance to the subject for each processing target area A1. In particular, by setting the processing target area A1 for each pixel, selecting a filter with the optimum filter coefficient for each pixel and performing a predetermined filter process, respectively, it is possible to focus on all the pixels in focus. An image P2 can be generated.

[実施形態2]
図5は、本発明を適用した実施形態2の撮像装置200の概略構成を示すブロック図である。
なお、実施形態2の撮像装置200は、以下に詳細に説明する以外の点で上記実施形態1の撮像装置100と略同様の構成をなし、詳細な説明は省略する。
[Embodiment 2]
FIG. 5 is a block diagram illustrating a schematic configuration of the imaging apparatus 200 according to the second embodiment to which the present invention is applied.
Note that the imaging apparatus 200 according to the second embodiment has substantially the same configuration as the imaging apparatus 100 according to the first embodiment except for the details described below, and detailed description thereof is omitted.

図5に示すように、実施形態2の撮像装置200の画像処理部2は、画像取得部2a、領域画像生成部2c、評価値算出部2d、評価値特定部2e、フィルタ選択部2f及びフィルタ記憶部2hに加えて、第2領域設定部2iと、第2合焦画像生成部2jとを具備している。   As illustrated in FIG. 5, the image processing unit 2 of the imaging apparatus 200 according to the second embodiment includes an image acquisition unit 2a, a region image generation unit 2c, an evaluation value calculation unit 2d, an evaluation value specification unit 2e, a filter selection unit 2f, and a filter. In addition to the storage unit 2h, a second region setting unit 2i and a second focused image generation unit 2j are provided.

第2領域設定部2iは、第2設定手段として、画像取得部2aにより取得された被写体の分散像の画像信号に対応する分散画像P1内で、処理対象領域(所定領域)B1を所定数(例えば、3つ)設定する。具体的には、第2領域設定部2iは、分散画像P1内で所定の大きさの第1〜第3処理対象領域B1a〜B1cを所定方向(例えば、水平方向等)に並設させるように設定する。
なお、第1〜第3処理対象領域B1a〜B1cの位置及び大きさは、一例であってこれに限られるものではなく、適宜任意に変更可能である。
また、図8(a)にあっては、分散画像P1を模式的に表している。
The second area setting unit 2i serves as a second setting unit with a predetermined number of processing target areas (predetermined areas) B1 in the dispersion image P1 corresponding to the image signal of the dispersion image of the subject acquired by the image acquisition unit 2a ( For example, three) are set. Specifically, the second area setting unit 2i arranges the first to third processing target areas B1a to B1c having a predetermined size in the distributed image P1 in parallel in a predetermined direction (for example, a horizontal direction). Set.
Note that the positions and sizes of the first to third processing target areas B1a to B1c are merely examples and are not limited thereto, and can be arbitrarily changed as appropriate.
In FIG. 8A, the dispersion image P1 is schematically shown.

領域画像生成部2cは、第2領域設定部2iにより設定された所定数の処理対象領域B1内の各画素について、複数のフィルタの各々に対応する処理済み領域画像を複数生成する。具体的には、領域画像生成部2cは、第2領域設定部2iにより分散画像P1内で設定された第1〜第3処理対象領域B1a〜B1c内の各画素について、フィルタ記憶部2hに記憶されている第1〜第3フィルタの各々を用いて復元処理を施して、分散のない処理済み領域画像を3つずつ生成する。   The region image generation unit 2c generates a plurality of processed region images corresponding to each of the plurality of filters for each pixel in the predetermined number of processing target regions B1 set by the second region setting unit 2i. Specifically, the region image generation unit 2c stores, in the filter storage unit 2h, each pixel in the first to third processing target regions B1a to B1c set in the distributed image P1 by the second region setting unit 2i. The restoration processing is performed using each of the first to third filters, and three processed area images without dispersion are generated.

評価値特定部2eは、所定数の処理対象領域B1内の各画素について、評価値算出部2dにより算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する。
即ち、評価値算出部2dは、領域画像生成部2cにより生成された第1〜第3処理対象領域B1a〜B1c毎に、当該処理対象領域B1内の全ての画素について、第1〜第3フィルタに対応させるように処理済み領域画像のコントラストの評価値をそれぞれ3つずつ算出する。そして、評価値特定部2eは、各処理対象領域B1内の各画素について、評価値算出部2dにより算出されたコントラストの評価値を比較して、最も高い評価値を特定する。
The evaluation value specifying unit 2e compares the plurality of contrast evaluation values calculated by the evaluation value calculating unit 2d for each pixel in the predetermined number of processing target areas B1, and specifies the highest evaluation value.
That is, the evaluation value calculation unit 2d performs the first to third filter for all the pixels in the processing target region B1 for each of the first to third processing target regions B1a to B1c generated by the region image generation unit 2c. Each of the evaluation values of the contrast of the processed region image is calculated so as to correspond to the above. Then, the evaluation value specifying unit 2e compares the contrast evaluation values calculated by the evaluation value calculating unit 2d for each pixel in each processing target area B1, and specifies the highest evaluation value.

フィルタ選択部2fは、所定数の処理対象領域B1の各々について、各画素毎に評価値特定部2eにより特定された最も高い評価値を集計して、当該集計結果を基準として何れか一のフィルタを特定し、特定されたフィルタの中でフィルタ係数と対応付けられた被写体距離が最も短いフィルタを選択する。
即ち、フィルタ選択部2fは、第1〜第3処理対象領域B1a〜B1cの各々について、当該処理対象領域B1内の全ての画素について特定されたコントラストの評価値の最も高い処理済み領域画像の復元処理に用いられたフィルタをフィルタの種類毎に集計し、集計結果が最も高くなったフィルタを特定する。そして、フィルタ選択部2fは、第1〜第3処理対象領域B1a〜B1cの各々について特定された3つのフィルタを比較して、フィルタ係数と対応付けられた被写体距離が最も短くなるフィルタを、合焦画像P2の生成処理に用いられるフィルタとして選択する。
The filter selection unit 2f adds up the highest evaluation value specified by the evaluation value specifying unit 2e for each pixel for each of the predetermined number of processing target regions B1, and uses any one filter based on the calculation result. And the filter with the shortest subject distance associated with the filter coefficient is selected from the specified filters.
That is, for each of the first to third processing target regions B1a to B1c, the filter selection unit 2f restores the processed region image having the highest contrast evaluation value specified for all the pixels in the processing target region B1. The filters used for processing are aggregated for each type of filter, and the filter with the highest aggregation result is identified. Then, the filter selection unit 2f compares the three filters specified for each of the first to third processing target areas B1a to B1c, and determines the filter having the shortest subject distance associated with the filter coefficient. It selects as a filter used for the production | generation process of the focused image P2.

第2合焦画像生成部2jは、合焦画像P2(図8(b)参照)を生成する。
即ち、第2合焦画像生成部2jは、第2生成手段として、画像取得部2aにより取得された画像信号に対して、フィルタ選択部2fにより選択されたフィルタを用いて所定のフィルタ処理を施し、合焦画像P2を生成する。具体的には、第2合焦画像生成部2jは、分散画像P1の各画素毎に、フィルタ選択部2fにより選択されたフィルタを用いて復元処理を行って、分散のない画像を生成し、各画素に対応する画像を組み合わせて合焦画像P2を生成する。
The second focused image generation unit 2j generates a focused image P2 (see FIG. 8B).
That is, the second focused image generation unit 2j performs a predetermined filter process on the image signal acquired by the image acquisition unit 2a using the filter selected by the filter selection unit 2f as the second generation unit. The focused image P2 is generated. Specifically, the second focused image generation unit 2j performs a restoration process using the filter selected by the filter selection unit 2f for each pixel of the dispersion image P1, and generates an image without dispersion. A focused image P2 is generated by combining images corresponding to the respective pixels.

次に、撮像装置200による自動合焦処理について、図2、図6〜図8を参照して説明する。
なお、実施形態2の撮像装置200による自動合焦処理は、以下に詳細に説明する以外の点で上記実施形態1の撮像装置100による自動合焦処理と略同様であり、詳細な説明は省略する。
Next, automatic focusing processing by the imaging apparatus 200 will be described with reference to FIGS. 2 and 6 to 8.
The automatic focusing process performed by the imaging apparatus 200 according to the second embodiment is substantially the same as the automatic focusing process performed by the imaging apparatus 100 according to the first embodiment except for the details described below. To do.

<自動合焦処理>
図2に示すように、上記実施形態1の撮像装置100による自動合焦処理と略同様に、ステップS1〜S3の処理を行い、ステップS4にて、画像処理部2は、合焦画像P2を生成する合焦画像生成処理を行う(ステップS4)。
ここで、合焦画像生成処理について図6及び図7を参照して詳細に説明する。図6及び図7は、合焦画像生成処理に係る動作の一例を示すフローチャートである。
<Automatic focus processing>
As shown in FIG. 2, the processes of steps S1 to S3 are performed in substantially the same manner as the automatic focusing process performed by the imaging apparatus 100 of the first embodiment. In step S4, the image processing unit 2 displays the focused image P2. A generated focused image is generated (step S4).
Here, the focused image generation processing will be described in detail with reference to FIGS. 6 and 7. 6 and 7 are flowcharts illustrating an example of an operation related to the focused image generation process.

<合焦画像生成処理>
図6に示すように、画像処理部2の第2領域設定部2iは、被写体の分散像の画像信号に対応する分散画像P1内で第1〜第3処理対象領域B1a〜B1cを設定する(ステップS31)。続けて、領域画像生成部2cは、第1〜第3処理対象領域B1a〜B1cの中で、何れか一の処理対象領域B1(例えば、第1処理対象領域B1a等)を指定した後(ステップS32)、当該処理対象領域B1内の所定位置の一の画素(例えば、左上隅部の画素等)を処理対象画素Cとして指定する(ステップS33)。
<In-focus image generation processing>
As shown in FIG. 6, the second region setting unit 2i of the image processing unit 2 sets the first to third processing target regions B1a to B1c in the dispersion image P1 corresponding to the image signal of the subject dispersion image ( Step S31). Subsequently, after the region image generation unit 2c designates any one of the processing target regions B1 (for example, the first processing target region B1a) among the first to third processing target regions B1a to B1c (step S1). S32) One pixel at a predetermined position in the processing target area B1 (for example, a pixel at the upper left corner) is designated as the processing target pixel C (step S33).

その後、領域画像生成部2cは、上記実施形態1の合焦画像生成処理と略同様に、何れか一のフィルタ(例えば、第1フィルタ等)を指定した後(ステップS12)、指定されたフィルタを用いた復元処理を処理対象画素Cに施して、分散のない処理済み領域画像を生成する(ステップS13)。
続けて、評価値算出部2dは、上記実施形態1の合焦画像生成処理と略同様に、領域画像生成部2cにより生成された処理済み領域画像のコントラストの高低を示す評価値を算出して、メモリ3に一時的に記憶させる(ステップS14)。
次に、画像処理部2は、上記実施形態1の合焦画像生成処理と略同様に、処理対象画素Cに対して、全てのフィルタを用いて復元処理を行ったか否かを判定する(ステップS15)。ここで、全てのフィルタを用いて復元処理を行っていないと判定されると(ステップS15;NO)、領域画像生成部2cは、フィルタ番号を+1インクリメントして、第1〜第3フィルタの中で、使用されたフィルタとは異なる次のフィルタ(例えば、第2フィルタ等)を指定した後(ステップS16)、処理をステップS13に移行させる。
Thereafter, the area image generation unit 2c designates any one of the filters (for example, the first filter or the like) in substantially the same manner as the focused image generation process of the first embodiment (step S12), and then designates the designated filter. Is applied to the processing target pixel C to generate a processed region image without dispersion (step S13).
Subsequently, the evaluation value calculation unit 2d calculates an evaluation value indicating the level of contrast of the processed region image generated by the region image generation unit 2c in substantially the same manner as the focused image generation processing of the first embodiment. Then, it is temporarily stored in the memory 3 (step S14).
Next, the image processing unit 2 determines whether or not the restoration processing has been performed on the processing target pixel C by using all the filters in substantially the same manner as the focused image generation processing of the first embodiment (step S <b> 1) S15). Here, if it is determined that the restoration process has not been performed using all the filters (step S15; NO), the region image generation unit 2c increments the filter number by +1 and includes the first through third filters. Then, after designating the next filter (for example, the second filter) different from the used filter (step S16), the process proceeds to step S13.

上記の各処理は、ステップS15にて、全てのフィルタを用いて復元処理を行ったと判定(ステップS15;YES)されるまで繰り返し実行される。
これにより、処理対象画素Cに対して、全てのフィルタを用いた処理済み領域画像のコントラストの評価値が算出される。
Each of the above processes is repeatedly executed until it is determined in step S15 that the restoration process has been performed using all the filters (step S15; YES).
Thereby, the evaluation value of the contrast of the processed region image using all the filters is calculated for the processing target pixel C.

そして、ステップS15にて、全てのフィルタを用いて復元処理を行ったと判定されると(ステップS15;YES)、評価値特定部2eは、上記実施形態1の合焦画像生成処理と略同様に、処理対象画素Cに対して、評価値算出部2dにより算出された3つのコントラストの評価値を比較して、最も高い評価値を特定する(ステップS17)。
続けて、フィルタ選択部2fは、第1〜第3フィルタの中で、評価値特定部2eにより特定されたコントラストの評価値の最も高い処理済み領域画像の復元処理に用いられたフィルタを選択し、この選択したフィルタを示す情報を現在の処理対象領域B1内における処理対象画素Cの選択フィルタ情報としてメモリ3に一時的に記憶する(ステップS18)。
これにより、処理対象画素Cに対してコントラストの評価値が最も高くなるフィルタが特定される。
If it is determined in step S15 that the restoration process has been performed using all the filters (step S15; YES), the evaluation value specifying unit 2e is substantially the same as the focused image generation process of the first embodiment. The three contrast evaluation values calculated by the evaluation value calculation unit 2d are compared with the processing target pixel C to identify the highest evaluation value (step S17).
Subsequently, the filter selection unit 2f selects the filter used for the restoration process of the processed region image having the highest contrast evaluation value specified by the evaluation value specifying unit 2e from the first to third filters. Information indicating the selected filter is temporarily stored in the memory 3 as selection filter information of the processing target pixel C in the current processing target region B1 (step S18).
As a result, the filter having the highest contrast evaluation value for the processing target pixel C is identified.

次に、画像処理部2は、処理対象領域B1(例えば、第1処理対象領域B1a等)内の全ての画素について処理したか否かを判定する(ステップS34)。ここで、全ての画素について処理していないと判定されると(ステップS34;NO)、領域画像生成部2cは、画素番号を+1インクリメントして、処理対象領域B1内で、次の画素(例えば、右隣りの画素等)を処理対象画素Cとして設定した後(ステップS35)、処理をステップS12に移行させる。
そして、次の画素を処理対象画素Cとして、ステップS12以降の各処理が実行され、ステップS18にて、当該処理対象画素Cに対してコントラストの評価値が最も高くなるフィルタが特定される。
Next, the image processing unit 2 determines whether or not all the pixels in the processing target area B1 (for example, the first processing target area B1a) have been processed (step S34). Here, if it is determined that all the pixels are not processed (step S34; NO), the region image generation unit 2c increments the pixel number by +1, and within the processing target region B1, the next pixel (for example, , The right adjacent pixel, etc.) is set as the processing target pixel C (step S35), and then the process proceeds to step S12.
Then, each processing after step S12 is executed with the next pixel as the processing target pixel C, and a filter having the highest contrast evaluation value for the processing target pixel C is specified in step S18.

上記の各処理は、ステップS34にて全ての画素について処理したと判定(ステップS34;YES)されるまで繰り返し実行される。
これにより、第1処理対象領域B1aの全ての画素について、コントラストの評価値が最も高くなるフィルタが特定される。
Each of the above processes is repeatedly executed until it is determined in step S34 that all pixels have been processed (step S34; YES).
Thereby, the filter with the highest contrast evaluation value is specified for all the pixels in the first processing target area B1a.

そして、ステップS34にて、全ての画素について処理したと判定されると(ステップS34;YES)、図7に示すように、画像処理部2は、全ての処理対象領域B1について処理したか否かを判定する(ステップS36)。ここで、全ての処理対象領域B1について処理していないと判定されると(ステップS36;NO)、領域画像生成部2cは、領域番号を+1インクリメントして、第1〜第3処理対象領域B1a〜B1cの中で、次の処理対象領域B1(例えば、第2処理対象領域B1b等)を指定した後(ステップS37)、処理をステップS33に移行させる。
ステップS33以降の各処理が実行されることで、第2処理対象領域B1bの全ての画素について、コントラストの評価値が最も高くなるフィルタが特定される。
If it is determined in step S34 that all the pixels have been processed (step S34; YES), as shown in FIG. 7, the image processing unit 2 has processed all the processing target areas B1. Is determined (step S36). Here, if it is determined that all the processing target areas B1 have not been processed (step S36; NO), the area image generating unit 2c increments the area number by +1, and the first to third processing target areas B1a. After specifying the next processing target area B1 (for example, the second processing target area B1b) in .about.B1c (step S37), the process proceeds to step S33.
By executing each process after step S33, a filter having the highest contrast evaluation value is specified for all the pixels in the second processing target area B1b.

上記の各処理は、ステップS36にて、全ての処理対象領域B1について処理したと判定(ステップS36;YES)されるまで繰り返し実行される。
これにより、全ての処理対象領域B1の各画素について、コントラストの評価値が最も高くなるフィルタが特定される。
Each of the above processes is repeatedly executed until it is determined in step S36 that all the processing target areas B1 have been processed (step S36; YES).
As a result, the filter having the highest contrast evaluation value is specified for each pixel in all the processing target areas B1.

次に、フィルタ選択部2fは、第1〜第3処理対象領域B1a〜B1c毎に、各処理対象領域B1内の全ての画素について特定され、メモリ3に一時的に記憶されている選択フィルタ情報が示すフィルタ(コントラストの評価値が最も高くなるフィルタ)をフィルタの種類毎に集計し、集計結果が最も高くなった一のフィルタを特定する(ステップS38)。そして、フィルタ選択部2fは、第1〜第3処理対象領域B1a〜B1cの各々について特定されたフィルタの中で、フィルタ係数と対応付けられた被写体距離が最も短くなるフィルタを選択する(ステップS39)。
そして、第2合焦画像生成部2jは、分散画像P1の各画素毎に、フィルタ選択部2fにより選択された一のフィルタを用いて画像信号の復元処理を行って分散のない画像を生成し、各画素に対応する分散のない画像を合成して合焦画像P2を生成した後(ステップS40)、合焦画像生成処理を終了する。
Next, the filter selection unit 2f specifies the selection filter information that is specified for all the pixels in each processing target region B1 and temporarily stored in the memory 3 for each of the first to third processing target regions B1a to B1c. (The filter with the highest contrast evaluation value) is aggregated for each type of filter, and one filter with the highest aggregation result is specified (step S38). Then, the filter selection unit 2f selects a filter having the shortest subject distance associated with the filter coefficient among the filters specified for each of the first to third processing target areas B1a to B1c (step S39). ).
Then, the second focused image generation unit 2j performs image signal restoration processing using one filter selected by the filter selection unit 2f for each pixel of the dispersion image P1, and generates an image without dispersion. After the non-dispersed images corresponding to the respective pixels are combined to generate the focused image P2 (step S40), the focused image generation process is terminated.

図2に戻り、上記実施形態1の撮像装置100による自動合焦処理と略同様に、画像処理部2は、合焦画像P2のYUV色空間に対応するYUVデータを生成し、当該YUVデータに対して各種の画像処理や圧縮等を施してファイル化した後、画像記録部4は、生成された合焦画像P2の画像データを記録する。
これにより、自動合焦処理を終了する。
Returning to FIG. 2, the image processing unit 2 generates YUV data corresponding to the YUV color space of the focused image P2 in substantially the same manner as the automatic focusing process performed by the imaging apparatus 100 according to the first embodiment. On the other hand, after performing various image processing, compression, and the like to form a file, the image recording unit 4 records the image data of the generated focused image P2.
This completes the automatic focusing process.

以上のように、実施形態2の撮像装置200によれば、所定数の処理対象領域B1内の各画素について、複数のフィルタの各々に対応する処理済み領域画像を複数生成し、さらに、算出された複数のコントラストの評価値の中で最も高い評価値を特定し、所定数の処理対象領域B1の各々について、各画素毎に特定された最も高い評価値を集計して、当該集計結果を基準として何れか一のフィルタを特定し、特定されたフィルタの中でフィルタ係数と対応付けられた被写体距離が最も短いフィルタを選択するので、被写体に対する相対的な前後位置がずれている領域があっても、被写体距離が最も短いフィルタを用いて所定のフィルタ処理を行うことで、少なくとも最も近い位置に存する被写体にピントの合った合焦画像P2を生成することができる。
また、処理対象領域B1を所定数設定することで、全ての画素を処理対象領域B1とする場合に比べて処理に係る時間を短縮することができ、処理能力のあまり高くない演算装置を搭載した撮像装置200であっても、合焦画像P2の生成処理の高速化を図ることができる。
As described above, according to the imaging apparatus 200 of the second embodiment, a plurality of processed region images corresponding to each of a plurality of filters are generated and calculated for each pixel in a predetermined number of processing target regions B1. The highest evaluation value among the plurality of contrast evaluation values is specified, and the highest evaluation value specified for each pixel is totaled for each of the predetermined number of processing target regions B1, and the total result is used as a reference. As one of the filters is specified, and the filter with the shortest subject distance associated with the filter coefficient is selected from among the specified filters, there is a region where the relative front-rear position with respect to the subject is shifted. In addition, by performing a predetermined filter process using a filter with the shortest subject distance, it is possible to generate a focused image P2 focused on the subject at least at the closest position. It can be.
In addition, by setting a predetermined number of processing target areas B1, it is possible to reduce the processing time compared to the case where all the pixels are set as the processing target areas B1, and an arithmetic device that does not have a high processing capability is mounted. Even in the imaging apparatus 200, it is possible to speed up the process of generating the focused image P2.

なお、上記実施形態2では、分散画像P1内で処理対象領域B1を3つ(複数)設定するようにしたが、処理対象領域B1の設定数は一例であってこれに限られるものではなく、適宜任意に変更可能である。
例えば、第2領域設定部2iは、分散画像P1の所定位置(例えば、略中央部、顔検出部等)に一の処理対象領域B1を設定した後、上記実施形態2の合焦画像生成処理と略同様にして、フィルタ選択部2fは、当該処理対象領域B1内の全ての画素についてコントラストの評価値が最も高くなるフィルタを特定する。そして、フィルタ選択部2fは、特定されたフィルタをフィルタの種類毎に集計し、集計結果が最も高くなった一のフィルタを特定する。これにより、第2合焦画像生成部2jは、分散画像P1の各画素毎に、フィルタ選択部2fにより選択された一のフィルタを用いて画像信号の復元処理を行って分散のない画像を生成し、各画素に対応する分散のない画像を合成して合焦画像P2の画像データを生成するようにしても良い。
従って、このような構成とすることで、所謂、「スポットAF」と略同等の機能を実現することができ、少なくとも処理対象領域B1に存する被写体にピントの合った合焦画像P2を生成することができる。
また、例えば、第2領域設定部2iは、分散画像P1の略全域を処理対象領域B1として設定するようにすることもできる。
In the second embodiment, three (multiple) processing target areas B1 are set in the distributed image P1, but the number of setting of the processing target areas B1 is merely an example, and is not limited thereto. It can be arbitrarily changed as appropriate.
For example, the second region setting unit 2i sets one processing target region B1 at a predetermined position (for example, approximately the center, face detection unit, etc.) of the dispersed image P1, and then performs the focused image generation process of the second embodiment. In substantially the same manner, the filter selection unit 2f specifies a filter having the highest contrast evaluation value for all the pixels in the processing target area B1. Then, the filter selection unit 2f aggregates the identified filters for each type of filter, and identifies one filter having the highest aggregation result. As a result, the second focused image generation unit 2j performs image signal restoration processing using one filter selected by the filter selection unit 2f for each pixel of the dispersion image P1, and generates an image without dispersion. Then, the image data of the focused image P2 may be generated by synthesizing non-dispersed images corresponding to the respective pixels.
Therefore, with such a configuration, a function substantially equivalent to so-called “spot AF” can be realized, and at least a focused image P2 focused on a subject existing in the processing target area B1 can be generated. Can do.
Further, for example, the second area setting unit 2i can set substantially the entire area of the distributed image P1 as the processing target area B1.

<変形例1>
また、上記のように、分散画像P1内に一の処理対象領域B1を設定する場合には、フィルタ選択部2fにより選択された一のフィルタのフィルタ係数を処理対象領域B1からの距離に応じて補正しても良い。
以下に、変形例1の撮像装置について、図9及び図10を参照して説明する。
図9は、変形例1の撮像装置300の概略構成を示すブロック図である。
<Modification 1>
Further, as described above, when one processing target region B1 is set in the distributed image P1, the filter coefficient of one filter selected by the filter selection unit 2f is set according to the distance from the processing target region B1. It may be corrected.
Hereinafter, an imaging apparatus according to Modification 1 will be described with reference to FIGS. 9 and 10.
FIG. 9 is a block diagram illustrating a schematic configuration of the imaging apparatus 300 according to the first modification.

図9に示すように、変形例1の撮像装置300の画像処理部2は、画像取得部2a、領域画像生成部2c、評価値算出部2d、評価値特定部2e、フィルタ選択部2f及びフィルタ記憶部2hに加えて、第3領域設定部2kと、第3合焦画像生成部2lとを具備している。   As illustrated in FIG. 9, the image processing unit 2 of the imaging apparatus 300 according to the first modification includes an image acquisition unit 2a, a region image generation unit 2c, an evaluation value calculation unit 2d, an evaluation value specification unit 2e, a filter selection unit 2f, and a filter. In addition to the storage unit 2h, a third region setting unit 2k and a third focused image generation unit 21 are provided.

第3領域設定部2kは、第3設定手段として、画像取得部2aにより取得された被写体の分散像の画像信号に対応する分散画像P1内で、処理対象領域(所定領域)B1を一つ設定する。具体的には、第3領域設定部2kは、分散画像P1の所定位置(例えば、略中央部等)に所定の大きさの処理対象領域B1を設定する。
ここで、画像処理部2は、分散画像P1内から被写体の顔を検出する顔検出部(図示略)を具備し、当該顔検出部により検出された顔の位置に処理対象領域B1を設定するようにしても良い。
なお、処理対象領域B1の位置及び大きさは、一例であってこれに限られるものではなく、適宜任意に変更可能である。
また、図10(a)にあっては、分散画像P1を模式的に表している。
The third area setting unit 2k sets one processing target area (predetermined area) B1 in the distributed image P1 corresponding to the image signal of the distributed image of the subject acquired by the image acquisition unit 2a as a third setting unit. To do. Specifically, the third region setting unit 2k sets a processing target region B1 having a predetermined size at a predetermined position (for example, a substantially central portion) of the distributed image P1.
Here, the image processing unit 2 includes a face detection unit (not shown) that detects the face of the subject from the dispersed image P1, and sets the processing target region B1 at the position of the face detected by the face detection unit. You may do it.
Note that the position and size of the processing target area B1 are merely examples, and the present invention is not limited thereto, and can be arbitrarily changed as appropriate.
Further, in FIG. 10A, the dispersion image P1 is schematically shown.

フィルタ選択部2fは、第3領域設定部2kにより設定された一の処理対象領域B1内の全ての画素についてコントラストの評価値が最も高くなるフィルタを特定する。そして、フィルタ選択部2fは、特定されたフィルタをフィルタの種類毎に集計し、集計結果が最も高くなった一のフィルタを特定する。   The filter selection unit 2f specifies a filter having the highest contrast evaluation value for all the pixels in one processing target region B1 set by the third region setting unit 2k. Then, the filter selection unit 2f aggregates the identified filters for each type of filter, and identifies one filter having the highest aggregation result.

第3合焦画像生成部(第2生成手段)2lは、フィルタ選択部2fにより選択されたフィルタのフィルタ係数を処理対象領域B1からの距離に応じて補正したフィルタ係数を算出する。即ち、一般的に、光学系1aは中央部よりも端部側で各種の収差が発生し易くなるため、例えば、略中央部に設定された処理対象領域B1からの距離に応じてフィルタ係数を補正することで、収差の影響を低減させることができる。さらに、主要な被写体に対する相対的な前後位置がずれている領域は、処理対象領域B1からの距離に応じて変化させた補正値を用いてフィルタ係数を補正することで、合焦画像P2の略全域でピントの合った状態となり易くすることができる。
なお、第3合焦画像生成部2lは、例えば、フィルタ選択部2fにより選択されたフィルタ(例えば、「至近」の第1フィルタ等)の被写体距離を基準として、一の処理対象領域B1の周囲に被写体距離の区分で隣り合うフィルタ(例えば、「中間」の第3フィルタ等)を用いて処理する領域B2を設定し、さらに、その周囲に被写体距離の区分で隣り合うフィルタ(例えば、「無限遠」の第2フィルタ等)を用いて処理する領域B3を設定することで、結果として補正されたフィルタ係数を特定するようにしても良い(図10(a)参照)。
このとき、フィルタ選択部2fにより選択された「至近」の第1フィルタを用いて処理する領域B1と、「中間」の第3フィルタを用いて処理する領域B2との境界部分は、第1及び第3フィルタのフィルタ係数の中間値となるように、同様に、「中間」の第3フィルタを用いて処理する領域B2と、「無限遠」の第2フィルタを用いて処理する領域B3との境界部分は、第2及び第3フィルタのフィルタ係数の中間値となるように、フィルタ係数を補正しても良い。
The third focused image generation unit (second generation unit) 21 calculates a filter coefficient obtained by correcting the filter coefficient of the filter selected by the filter selection unit 2f according to the distance from the processing target region B1. That is, in general, the optical system 1a is likely to generate various aberrations on the end side of the central portion. For example, the filter coefficient is set according to the distance from the processing target region B1 set in the substantially central portion. By correcting, the influence of aberration can be reduced. Furthermore, the region where the front and rear positions relative to the main subject are shifted is corrected by using the correction value that is changed according to the distance from the processing target region B1 to correct the approximate image of the focused image P2. This makes it easy to achieve a state of focus throughout the entire area.
For example, the third focused image generation unit 2l uses the subject distance of the filter (for example, the “closest” first filter) selected by the filter selection unit 2f as a reference around the one processing target region B1. A region B2 to be processed using a filter adjacent to the subject distance segment (for example, an “intermediate” third filter) is set, and a filter adjacent to the subject distance segment (for example, “infinite” By setting the region B3 to be processed using a “far” second filter or the like, the corrected filter coefficient may be specified as a result (see FIG. 10A).
At this time, the boundary portion between the region B1 processed using the “closest” first filter selected by the filter selection unit 2f and the region B2 processed using the “middle” third filter is the first and Similarly, the region B2 processed using the “intermediate” third filter and the region B3 processed using the “infinity” second filter so that the filter coefficient of the third filter becomes an intermediate value. The filter coefficient may be corrected so that the boundary portion has an intermediate value between the filter coefficients of the second and third filters.

そして、第3合焦画像生成部2lは、算出された補正後のフィルタ係数を用いて、画像取得部2aにより取得された画像信号に対して復元処理(所定のフィルタ処理)を行って、分散のない画像を生成し、各画素に対応する画像を組み合わせて合焦画像P2(図10(b)参照)を生成する。   Then, the third focused image generation unit 21 performs restoration processing (predetermined filter processing) on the image signal acquired by the image acquisition unit 2a by using the calculated corrected filter coefficient, and performs dispersion. An image with no image is generated, and an image corresponding to each pixel is combined to generate a focused image P2 (see FIG. 10B).

従って、一の処理対象領域B1を基準として、選択されたフィルタのフィルタ係数を処理対象領域B1からの距離に応じて補正したフィルタ係数を算出し、当該補正後のフィルタ係数を用いて画像信号に対して所定のフィルタ処理を施し、合焦画像P2を生成するので、光学系1aの各種の収差や主要な被写体に対する相対的な前後位置等を考慮した合焦画像P2を生成することができる。   Therefore, a filter coefficient obtained by correcting the filter coefficient of the selected filter according to the distance from the processing target area B1 is calculated using the one processing target area B1 as a reference, and the corrected filter coefficient is used as an image signal. On the other hand, a predetermined filter process is performed to generate the focused image P2, so that the focused image P2 can be generated in consideration of various aberrations of the optical system 1a and relative front and rear positions with respect to the main subject.

なお、本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。
例えば、上記実施形態にあっては、処理済み領域画像のコントラストの評価値を基準として、合焦画像P2の生成に用いられるフィルタを特定するようにしたが、例えば、処理済み領域画像の高周波成分から所定の演算式に従って解像感を算出して、当該解像感を基準としてフィルタを特定しても良い。
The present invention is not limited to the above-described embodiment, and various improvements and design changes may be made without departing from the spirit of the present invention.
For example, in the above embodiment, the filter used to generate the focused image P2 is specified based on the evaluation value of the contrast of the processed region image. For example, the high frequency component of the processed region image is specified. Alternatively, the resolution may be calculated according to a predetermined arithmetic expression, and the filter may be specified based on the resolution.

また、上記実施形態では、光学系1aとして、復元処理前提光学系を例示して説明したが、一例であってこれに限られるものではなく、適宜任意に変更可能である。例えば、電子撮像部1bの受光面側に複数の方向からの光線を受光するための複数のマイクロレンズをアレイ状に配設し、光線の角度や輝度情報を記録することができるようにしても良い。このような構成とすることで、撮像距離に応じた複数の画像を復元可能となるが、撮像距離に応じた複数の画像の中には、略全域にピントが合っていない画像も含まれるため、当該画像からピントが合っている合焦画像P2を生成する際に、上記実施形態1、2等のようにして、被写体までの距離に応じた最適なフィルタ係数のフィルタを選択することで、合焦画像P2の生成を適正に行うことができる。   Moreover, in the said embodiment, although the restoration process premise optical system was illustrated and demonstrated as the optical system 1a, it is an example and is not restricted to this, It can change arbitrarily arbitrarily. For example, a plurality of microlenses for receiving light rays from a plurality of directions are arranged in an array on the light receiving surface side of the electronic imaging unit 1b so that the angle and luminance information of the light rays can be recorded. good. By adopting such a configuration, it is possible to restore a plurality of images according to the imaging distance. However, since the plurality of images according to the imaging distance include an image that is not in focus in almost the entire area. When generating a focused image P2 in focus from the image, by selecting a filter with an optimal filter coefficient according to the distance to the subject as in the first and second embodiments, The focused image P2 can be generated appropriately.

さらに、撮像装置100、200、300の構成は、上記実施形態に例示したものは一例であり、これに限られるものではない。また、自動合焦装置として、撮像装置100、200、300を例示したが、これに限られるものではなく、本発明に係る自動合焦処理を実行可能なものであれば如何なる構成であっても良い。   Furthermore, the configurations of the imaging apparatuses 100, 200, and 300 are merely examples as illustrated in the above-described embodiment, and are not limited thereto. Further, although the imaging devices 100, 200, and 300 are illustrated as the automatic focusing device, the present invention is not limited to this, and any configuration can be used as long as the automatic focusing processing according to the present invention can be performed. good.

加えて、上記実施形態にあっては、取得手段、第1生成手段、算出手段、特定手段、選択手段としての機能を、中央制御部8の制御下にて、画像取得部2a、領域画像生成部2c、評価値算出部2d、評価値特定部2e、フィルタ選択部2fが駆動することにより実現される構成としたが、これに限られるものではなく、中央制御部8によって所定のプログラム等が実行されることにより実現される構成としても良い。
即ち、プログラムを記憶するプログラムメモリ(図示略)に、取得処理ルーチン、第1生成処理ルーチン、算出処理ルーチン、特定処理ルーチン、選択処理ルーチンを含むプログラムを記憶しておく。そして、取得処理ルーチンにより中央制御部8のCPUを、所定の光学系1aを通った被写体像から変換された画像信号を取得する取得手段として機能させるようにしても良い。また、第1生成処理ルーチンにより中央制御部8のCPUを、取得手段により取得された画像信号の所定領域に対して、記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段として機能させるようにしても良い。また、算出処理ルーチンにより中央制御部8のCPUを、第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段として機能させるようにしても良い。また、特定処理ルーチンにより中央制御部8のCPUを、算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段として機能させるようにしても良い。また、選択処理ルーチンにより中央制御部8のCPUを、特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像P2の生成処理に用いられるフィルタとして選択する選択手段として機能させるようにしても良い。
In addition, in the above-described embodiment, the functions of the acquisition unit, the first generation unit, the calculation unit, the specifying unit, and the selection unit are controlled by the central control unit 8, and the image acquisition unit 2a, the region image generation The unit 2c, the evaluation value calculation unit 2d, the evaluation value specifying unit 2e, and the filter selection unit 2f are configured to be driven. However, the configuration is not limited to this, and a predetermined program or the like is executed by the central control unit 8. It is good also as a structure implement | achieved by performing.
That is, a program including an acquisition process routine, a first generation process routine, a calculation process routine, a specific process routine, and a selection process routine is stored in a program memory (not shown) that stores the program. Then, the CPU of the central control unit 8 may function as an acquisition unit that acquires the image signal converted from the subject image that has passed through the predetermined optical system 1a by the acquisition processing routine. Further, the CPU of the central control unit 8 performs predetermined filter processing on each of the plurality of filters stored in the storage unit with respect to the predetermined region of the image signal acquired by the acquisition unit by the first generation processing routine. May be performed to function as a first generation unit that generates a plurality of processed region images. Further, the CPU of the central control unit 8 may function as a calculation unit that calculates the contrast evaluation values of the plurality of processed region images generated by the first generation unit by the calculation processing routine. In addition, the CPU of the central control unit 8 may be caused to function as a specifying unit that compares a plurality of contrast evaluation values calculated by the calculation unit and specifies the highest evaluation value by a specific processing routine. In addition, the CPU of the central control unit 8 selects the filter corresponding to the processed region image with the highest evaluation value specified by the specifying unit as a filter used for the generation processing of the focused image P2 by the selection processing routine. You may make it function as a means.

同様に、第1設定手段、第2生成手段、第2設定手段、第3設定手段についても、中央制御部8のCPUによって所定のプログラム等が実行されることにより実現される構成としても良い。   Similarly, the first setting unit, the second generation unit, the second setting unit, and the third setting unit may be realized by executing a predetermined program or the like by the CPU of the central control unit 8.

さらに、上記の各処理を実行するためのプログラムを格納したコンピュータ読み取り可能な媒体として、ROMやハードディスク等の他、フラッシュメモリ等の不揮発性メモリ、CD−ROM等の可搬型記録媒体を適用することも可能である。また、プログラムのデータを所定の通信回線を介して提供する媒体としては、キャリアウェーブ(搬送波)も適用される。   Furthermore, as a computer-readable medium storing a program for executing each of the above processes, a non-volatile memory such as a flash memory or a portable recording medium such as a CD-ROM is applied in addition to a ROM or a hard disk. Is also possible. A carrier wave is also used as a medium for providing program data via a predetermined communication line.

本発明のいくつかの実施形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。
以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記に記載した請求項の項番は、この出願の願書に最初に添付した特許請求の範囲の通りである。
〔付記〕
<請求項1>
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段と、
所定の光学系を通った被写体像から変換された画像信号を取得する取得手段と、
この取得手段により取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段と、
この第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段と、
この算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段と、
この特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する選択手段と、
を備えたことを特徴とする自動合焦装置。
<請求項2>
前記所定の光学系は、前記画像信号のフィルタを用いた復元処理を前提とした形態の被写体像を結像する復元処理前提光学系を含み、
前記第1生成手段は、前記取得手段により取得された画像信号の所定領域に前記復元処理を施して処理済み領域画像を生成することを特徴とする請求項1に記載の自動合焦装置。
<請求項3>
前記所定の光学系は、被写界深度を拡張する深度拡張光学系を含み、
前記取得手段は、前記深度拡張光学系を通った被写体の分散像から変換された画像信号を取得し、
前記第1生成手段は、前記取得手段により取得された被写体の分散像の画像信号の所定領域に前記復元処理を施して分散のない処理済み領域画像を生成することを特徴とする請求項2に記載の自動合焦装置。
<請求項4>
前記画像信号の略全域にかけて前記所定領域を複数設定する第1設定手段を更に備え、
前記第1生成手段は、前記第1設定手段により設定された複数の所定領域の各々について、前記複数のフィルタの各々に対応する処理済み領域画像を複数生成し、
前記特定手段は、前記複数の所定領域の各々について、前記算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定し、
前記選択手段は、前記複数の所定領域の各々について、前記特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを選択することを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
<請求項5>
前記取得手段により取得された画像信号の各々の所定領域に対して、前記選択手段により選択されたフィルタを用いて所定のフィルタ処理をそれぞれ施し、合焦画像を生成する第2生成手段を更に備えることを特徴とする請求項4に記載の自動合焦装置。
<請求項6>
前記所定領域を所定数設定する第2設定手段を更に備え、
前記第1生成手段は、前記第2設定手段により設定された所定数の所定領域内の各画素について、前記複数のフィルタの各々に対応する処理済み領域画像を複数生成し、
前記特定手段は、前記所定数の所定領域内の各画素について、前記算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定し、
前記選択手段は、前記所定数の所定領域の各々について、各画素毎に前記特定手段により特定された最も高い評価値を集計して、当該集計結果を基準として何れか一のフィルタを特定し、特定されたフィルタの中でフィルタ係数と対応付けられた被写体距離が最も短いフィルタを選択することを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
<請求項7>
前記所定領域を一つ設定する第2設定手段を更に備え、
前記第1生成手段は、前記第2設定手段により設定された一つの所定領域内の各画素について、前記複数のフィルタの各々に対応する処理済み領域画像を複数生成し、
前記特定手段は、前記所定領域内の各画素について、前記算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定し、
前記選択手段は、前記所定領域について、各画素毎に前記特定手段により特定された最も高い評価値を集計して、当該集計結果を基準として何れか一のフィルタを選択することを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
<請求項8>
前記取得手段により取得された画像信号に対して、前記選択手段により選択されたフィルタを用いて所定のフィルタ処理を施し、合焦画像を生成する第2生成手段を更に備えることを特徴とする請求項6又は7に記載の自動合焦装置。
<請求項9>
前記所定領域を一つ設定する第3設定手段と、
前記第3設定手段により設定された一の所定領域を基準として、前記選択手段により選択されたフィルタのフィルタ係数を前記所定領域からの距離に応じて補正したフィルタ係数を算出し、当該補正後のフィルタ係数を用いて、前記取得手段により取得された画像信号に対して所定のフィルタ処理を施し、合焦画像を生成する第2生成手段と、を更に備えることを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
<請求項10>
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段を備える自動合焦装置を用いた自動合焦方法であって、
所定の光学系を通った被写体像から変換された画像信号を取得する処理と、
取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する処理と、
生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する処理と、
算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する処理と、
特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する処理と、
を含むことを特徴とする自動合焦方法。
<請求項11>
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段を備える自動合焦装置のコンピュータを、
所定の光学系を通った被写体像から変換された画像信号を取得する取得手段、
この取得手段により取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段、
この第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段、
この算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段、
この特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する選択手段、
として機能させることを特徴とするプログラム。
Although several embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and equivalents thereof.
The invention described in the scope of claims attached to the application of this application will be added below. The item numbers of the claims described in the appendix are as set forth in the claims attached to the application of this application.
[Appendix]
<Claim 1>
Storage means for storing a plurality of filters having different filter coefficients corresponding to the subject distance;
Acquisition means for acquiring an image signal converted from a subject image passing through a predetermined optical system;
A first filter that generates a plurality of processed region images by subjecting a predetermined region of the image signal acquired by the acquisition unit to a predetermined filter process using each of the plurality of filters stored in the storage unit. Generating means;
Calculation means for calculating the contrast evaluation values of the plurality of processed region images generated by the first generation means;
A plurality of contrast evaluation values calculated by the calculation means, and a specifying means for specifying the highest evaluation value;
Selection means for selecting a filter corresponding to the processed region image of the highest evaluation value specified by the specifying means as a filter used for the process of generating a focused image;
An automatic focusing device characterized by comprising:
<Claim 2>
The predetermined optical system includes a restoration processing premise optical system that forms a subject image in a form premised on restoration processing using a filter of the image signal,
The automatic focusing apparatus according to claim 1, wherein the first generation unit generates the processed region image by performing the restoration process on a predetermined region of the image signal acquired by the acquisition unit.
<Claim 3>
The predetermined optical system includes a depth extension optical system that extends a depth of field,
The acquisition means acquires an image signal converted from a dispersed image of a subject that has passed through the depth extension optical system,
The said 1st production | generation means performs the said restoration process to the predetermined area | region of the image signal of the dispersion | distribution image of the object acquired by the said acquisition means, and produces | generates the processed area image without dispersion | distribution. The automatic focusing device described.
<Claim 4>
A first setting means for setting a plurality of the predetermined areas over substantially the entire area of the image signal;
The first generation unit generates a plurality of processed region images corresponding to the plurality of filters for each of the plurality of predetermined regions set by the first setting unit,
The specifying unit compares a plurality of contrast evaluation values calculated by the calculating unit for each of the plurality of predetermined areas, and specifies the highest evaluation value;
The said selection means selects the filter corresponding to the processed area image of the highest evaluation value specified by the said specification means for each of the plurality of predetermined areas. The automatic focusing device according to one item.
<Claim 5>
The image processing apparatus further includes second generation means for generating a focused image by performing predetermined filter processing on each predetermined area of the image signal acquired by the acquisition means using the filter selected by the selection means. The automatic focusing device according to claim 4, wherein:
<Claim 6>
A second setting means for setting a predetermined number of the predetermined areas;
The first generation unit generates a plurality of processed region images corresponding to each of the plurality of filters for each pixel in a predetermined number of predetermined regions set by the second setting unit,
The specifying unit compares a plurality of contrast evaluation values calculated by the calculation unit for each pixel in the predetermined number of predetermined regions, and specifies the highest evaluation value;
The selecting means, for each of the predetermined number of predetermined areas, totalize the highest evaluation value specified by the specifying means for each pixel, specify any one filter based on the total result, The automatic focusing device according to any one of claims 1 to 3, wherein a filter having the shortest subject distance associated with a filter coefficient is selected from among the identified filters.
<Claim 7>
A second setting means for setting one of the predetermined areas;
The first generation means generates a plurality of processed area images corresponding to each of the plurality of filters for each pixel in one predetermined area set by the second setting means,
The specifying unit compares a plurality of contrast evaluation values calculated by the calculation unit for each pixel in the predetermined region, and specifies the highest evaluation value;
The selection means totals the highest evaluation value specified by the specifying means for each pixel for the predetermined area, and selects any one filter based on the total result. Item 4. The automatic focusing device according to any one of Items 1 to 3.
<Claim 8>
The image processing apparatus further includes a second generation unit configured to perform a predetermined filter process on the image signal acquired by the acquisition unit using a filter selected by the selection unit and generate a focused image. Item 8. The automatic focusing device according to Item 6 or 7.
<Claim 9>
Third setting means for setting one of the predetermined areas;
Using the one predetermined area set by the third setting means as a reference, a filter coefficient obtained by correcting the filter coefficient of the filter selected by the selection means according to the distance from the predetermined area is calculated, 4. A second generation unit configured to generate a focused image by performing a predetermined filter process on the image signal acquired by the acquisition unit using a filter coefficient. The automatic focusing device according to any one of the above.
<Claim 10>
An automatic focusing method using an automatic focusing device including a storage unit that stores a plurality of filters having different filter coefficients corresponding to the subject distance,
A process of acquiring an image signal converted from a subject image passing through a predetermined optical system;
A process of performing a predetermined filter process on each of a plurality of filters stored in the storage unit and generating a plurality of processed area images with respect to a predetermined area of the acquired image signal;
A process of calculating contrast evaluation values of the generated plurality of processed area images,
A process for comparing the calculated evaluation values of a plurality of contrasts to identify the highest evaluation value,
A process of selecting a filter corresponding to the processed region image having the highest evaluation value identified as a filter used for the process of generating a focused image;
An automatic focusing method comprising:
<Claim 11>
A computer of an automatic focusing apparatus comprising storage means for storing a plurality of filters having different filter coefficients corresponding to the subject distance,
An acquisition means for acquiring an image signal converted from a subject image passing through a predetermined optical system;
A first filter that generates a plurality of processed region images by subjecting a predetermined region of the image signal acquired by the acquisition unit to a predetermined filter process using each of the plurality of filters stored in the storage unit. Generating means,
Calculating means for respectively calculating contrast evaluation values of the plurality of processed region images generated by the first generating means;
A plurality of contrast evaluation values calculated by the calculation means, and a specifying means for specifying the highest evaluation value;
Selection means for selecting a filter corresponding to the processed region image of the highest evaluation value specified by the specifying means as a filter used in the process of generating a focused image;
A program characterized by functioning as

100、200、300 撮像装置
1 撮像部
2 画像処理部
2a 画像取得部
2b 第1領域設定部
2c 領域画像生成部
2d 評価値算出部
2e 評価値特定部
2f フィルタ選択部
2g 第1合焦画像生成部
2h フィルタ記憶部
2i 第2領域設定部
2j 第2合焦画像生成部
2k 第3領域設定部
2l 第3合焦画像生成部
8 中央制御部
100, 200, 300 Imaging device 1 Imaging unit 2 Image processing unit 2a Image acquisition unit 2b First region setting unit 2c Region image generation unit 2d Evaluation value calculation unit 2e Evaluation value identification unit 2f Filter selection unit 2g First focused image generation Unit 2h filter storage unit 2i second region setting unit 2j second focused image generating unit 2k third region setting unit 21 l third focused image generating unit 8 central control unit

Claims (11)

被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段と、
所定の光学系を通った被写体像から変換された画像信号を取得する取得手段と、
この取得手段により取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段と、
この第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段と、
この算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段と、
この特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する選択手段と、
を備えたことを特徴とする自動合焦装置。
Storage means for storing a plurality of filters having different filter coefficients corresponding to the subject distance;
Acquisition means for acquiring an image signal converted from a subject image passing through a predetermined optical system;
A first filter that generates a plurality of processed region images by subjecting a predetermined region of the image signal acquired by the acquisition unit to a predetermined filter process using each of the plurality of filters stored in the storage unit. Generating means;
Calculation means for calculating the contrast evaluation values of the plurality of processed region images generated by the first generation means;
A plurality of contrast evaluation values calculated by the calculation means, and a specifying means for specifying the highest evaluation value;
Selection means for selecting a filter corresponding to the processed region image of the highest evaluation value specified by the specifying means as a filter used for the process of generating a focused image;
An automatic focusing device characterized by comprising:
前記所定の光学系は、前記画像信号のフィルタを用いた復元処理を前提とした形態の被写体像を結像する復元処理前提光学系を含み、
前記第1生成手段は、前記取得手段により取得された画像信号の所定領域に前記復元処理を施して処理済み領域画像を生成することを特徴とする請求項1に記載の自動合焦装置。
The predetermined optical system includes a restoration processing premise optical system that forms a subject image in a form premised on restoration processing using a filter of the image signal,
The automatic focusing apparatus according to claim 1, wherein the first generation unit generates the processed region image by performing the restoration process on a predetermined region of the image signal acquired by the acquisition unit.
前記所定の光学系は、被写界深度を拡張する深度拡張光学系を含み、
前記取得手段は、前記深度拡張光学系を通った被写体の分散像から変換された画像信号を取得し、
前記第1生成手段は、前記取得手段により取得された被写体の分散像の画像信号の所定領域に前記復元処理を施して分散のない処理済み領域画像を生成することを特徴とする請求項2に記載の自動合焦装置。
The predetermined optical system includes a depth extension optical system that extends a depth of field,
The acquisition means acquires an image signal converted from a dispersed image of a subject that has passed through the depth extension optical system,
The said 1st production | generation means performs the said restoration process to the predetermined area | region of the image signal of the dispersion | distribution image of the object acquired by the said acquisition means, and produces | generates the processed area image without dispersion | distribution. The automatic focusing device described.
前記画像信号の略全域にかけて前記所定領域を複数設定する第1設定手段を更に備え、
前記第1生成手段は、前記第1設定手段により設定された複数の所定領域の各々について、前記複数のフィルタの各々に対応する処理済み領域画像を複数生成し、
前記特定手段は、前記複数の所定領域の各々について、前記算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定し、
前記選択手段は、前記複数の所定領域の各々について、前記特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを選択することを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
A first setting means for setting a plurality of the predetermined areas over substantially the entire area of the image signal;
The first generation unit generates a plurality of processed region images corresponding to the plurality of filters for each of the plurality of predetermined regions set by the first setting unit,
The specifying unit compares a plurality of contrast evaluation values calculated by the calculating unit for each of the plurality of predetermined areas, and specifies the highest evaluation value;
The said selection means selects the filter corresponding to the processed area image of the highest evaluation value specified by the said specification means for each of the plurality of predetermined areas. The automatic focusing device according to one item.
前記取得手段により取得された画像信号の各々の所定領域に対して、前記選択手段により選択されたフィルタを用いて所定のフィルタ処理をそれぞれ施し、合焦画像を生成する第2生成手段を更に備えることを特徴とする請求項4に記載の自動合焦装置。   The image processing apparatus further includes second generation means for generating a focused image by performing predetermined filter processing on each predetermined area of the image signal acquired by the acquisition means using the filter selected by the selection means. The automatic focusing device according to claim 4, wherein: 前記所定領域を所定数設定する第2設定手段を更に備え、
前記第1生成手段は、前記第2設定手段により設定された所定数の所定領域内の各画素について、前記複数のフィルタの各々に対応する処理済み領域画像を複数生成し、
前記特定手段は、前記所定数の所定領域内の各画素について、前記算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定し、
前記選択手段は、前記所定数の所定領域の各々について、各画素毎に前記特定手段により特定された最も高い評価値を集計して、当該集計結果を基準として何れか一のフィルタを特定し、特定されたフィルタの中でフィルタ係数と対応付けられた被写体距離が最も短いフィルタを選択することを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
A second setting means for setting a predetermined number of the predetermined areas;
The first generation unit generates a plurality of processed region images corresponding to each of the plurality of filters for each pixel in a predetermined number of predetermined regions set by the second setting unit,
The specifying unit compares a plurality of contrast evaluation values calculated by the calculation unit for each pixel in the predetermined number of predetermined regions, and specifies the highest evaluation value;
The selecting means, for each of the predetermined number of predetermined areas, totalize the highest evaluation value specified by the specifying means for each pixel, specify any one filter based on the total result, The automatic focusing device according to any one of claims 1 to 3, wherein a filter having the shortest subject distance associated with a filter coefficient is selected from among the identified filters.
前記所定領域を一つ設定する第2設定手段を更に備え、
前記第1生成手段は、前記第2設定手段により設定された一つの所定領域内の各画素について、前記複数のフィルタの各々に対応する処理済み領域画像を複数生成し、
前記特定手段は、前記所定領域内の各画素について、前記算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定し、
前記選択手段は、前記所定領域について、各画素毎に前記特定手段により特定された最も高い評価値を集計して、当該集計結果を基準として何れか一のフィルタを選択することを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
A second setting means for setting one of the predetermined areas;
The first generation means generates a plurality of processed area images corresponding to each of the plurality of filters for each pixel in one predetermined area set by the second setting means,
The specifying unit compares a plurality of contrast evaluation values calculated by the calculation unit for each pixel in the predetermined region, and specifies the highest evaluation value;
The selection means totals the highest evaluation value specified by the specifying means for each pixel for the predetermined area, and selects any one filter based on the total result. Item 4. The automatic focusing device according to any one of Items 1 to 3.
前記取得手段により取得された画像信号に対して、前記選択手段により選択されたフィルタを用いて所定のフィルタ処理を施し、合焦画像を生成する第2生成手段を更に備えることを特徴とする請求項6又は7に記載の自動合焦装置。   The image processing apparatus further includes a second generation unit configured to perform a predetermined filter process on the image signal acquired by the acquisition unit using a filter selected by the selection unit and generate a focused image. Item 8. The automatic focusing device according to Item 6 or 7. 前記所定領域を一つ設定する第3設定手段と、
前記第3設定手段により設定された一の所定領域を基準として、前記選択手段により選択されたフィルタのフィルタ係数を前記所定領域からの距離に応じて補正したフィルタ係数を算出し、当該補正後のフィルタ係数を用いて、前記取得手段により取得された画像信号に対して所定のフィルタ処理を施し、合焦画像を生成する第2生成手段と、を更に備えることを特徴とする請求項1〜3の何れか一項に記載の自動合焦装置。
Third setting means for setting one of the predetermined areas;
Using the one predetermined area set by the third setting means as a reference, a filter coefficient obtained by correcting the filter coefficient of the filter selected by the selection means according to the distance from the predetermined area is calculated, 4. A second generation unit configured to generate a focused image by performing a predetermined filter process on the image signal acquired by the acquisition unit using a filter coefficient. The automatic focusing device according to any one of the above.
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段を備える自動合焦装置を用いた自動合焦方法であって、
所定の光学系を通った被写体像から変換された画像信号を取得する処理と、
取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する処理と、
生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する処理と、
算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する処理と、
特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する処理と、
を含むことを特徴とする自動合焦方法。
An automatic focusing method using an automatic focusing device including a storage unit that stores a plurality of filters having different filter coefficients corresponding to the subject distance,
A process of acquiring an image signal converted from a subject image passing through a predetermined optical system;
A process of performing a predetermined filter process on each of a plurality of filters stored in the storage unit and generating a plurality of processed area images with respect to a predetermined area of the acquired image signal;
A process of calculating contrast evaluation values of the generated plurality of processed area images,
A process for comparing the calculated evaluation values of a plurality of contrasts to identify the highest evaluation value,
A process of selecting a filter corresponding to the processed region image having the highest evaluation value identified as a filter used for the process of generating a focused image;
An automatic focusing method comprising:
被写体距離に対応させてフィルタ係数を異なせた複数のフィルタを記憶する記憶手段を備える自動合焦装置のコンピュータを、
所定の光学系を通った被写体像から変換された画像信号を取得する取得手段、
この取得手段により取得された画像信号の所定領域に対して、前記記憶手段に記憶されている複数のフィルタの各々を用いて所定のフィルタ処理をそれぞれ施し、処理済み領域画像を複数生成する第1生成手段、
この第1生成手段により生成された複数の処理済み領域画像のコントラストの評価値をそれぞれ算出する算出手段、
この算出手段により算出された複数のコントラストの評価値を比較して、最も高い評価値を特定する特定手段、
この特定手段により特定された最も高い評価値の処理済み領域画像に対応するフィルタを、合焦画像の生成処理に用いられるフィルタとして選択する選択手段、
として機能させることを特徴とするプログラム。
A computer of an automatic focusing apparatus comprising storage means for storing a plurality of filters having different filter coefficients corresponding to the subject distance,
An acquisition means for acquiring an image signal converted from a subject image passing through a predetermined optical system;
A first filter that generates a plurality of processed region images by subjecting a predetermined region of the image signal acquired by the acquisition unit to a predetermined filter process using each of the plurality of filters stored in the storage unit. Generating means,
Calculating means for respectively calculating contrast evaluation values of the plurality of processed region images generated by the first generating means;
A plurality of contrast evaluation values calculated by the calculation means, and a specifying means for specifying the highest evaluation value;
Selection means for selecting a filter corresponding to the processed region image of the highest evaluation value specified by the specifying means as a filter used in the process of generating a focused image;
A program characterized by functioning as
JP2012052388A 2012-03-09 2012-03-09 Automatic focusing device, automatic focusing method and program Expired - Fee Related JP6056160B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012052388A JP6056160B2 (en) 2012-03-09 2012-03-09 Automatic focusing device, automatic focusing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012052388A JP6056160B2 (en) 2012-03-09 2012-03-09 Automatic focusing device, automatic focusing method and program

Publications (2)

Publication Number Publication Date
JP2013186355A true JP2013186355A (en) 2013-09-19
JP6056160B2 JP6056160B2 (en) 2017-01-11

Family

ID=49387816

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012052388A Expired - Fee Related JP6056160B2 (en) 2012-03-09 2012-03-09 Automatic focusing device, automatic focusing method and program

Country Status (1)

Country Link
JP (1) JP6056160B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017130848A (en) * 2016-01-21 2017-07-27 オムロン株式会社 Imaging device, imaging method, imaging program, and recording medium recording the imaging program thereof
CN112166374A (en) * 2019-04-24 2021-01-01 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, control method, and program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200036264A (en) 2018-09-28 2020-04-07 삼성전자주식회사 Method and electronic device for auto focusing

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0698170A (en) * 1992-04-28 1994-04-08 Olympus Optical Co Ltd Image pickup device
JP2002369071A (en) * 2001-06-08 2002-12-20 Olympus Optical Co Ltd Picture processing method and digital camera mounted with the same and its program
JP2007206738A (en) * 2006-01-30 2007-08-16 Kyocera Corp Imaging device and method
JP2008211678A (en) * 2007-02-27 2008-09-11 Kyocera Corp Imaging apparatus and method thereof
JP2008211679A (en) * 2007-02-27 2008-09-11 Kyocera Corp Imaging apparatus and method thereof
JP2010271951A (en) * 2009-05-21 2010-12-02 Canon Inc Image processing apparatus and method thereof
JP2011070134A (en) * 2009-09-28 2011-04-07 Kyocera Corp Imaging apparatus and method for processing image
WO2011122283A1 (en) * 2010-03-31 2011-10-06 キヤノン株式会社 Image processing device and image capturing device using same
JP2012005056A (en) * 2010-06-21 2012-01-05 Canon Inc Image processing device, image processing method and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0698170A (en) * 1992-04-28 1994-04-08 Olympus Optical Co Ltd Image pickup device
JP2002369071A (en) * 2001-06-08 2002-12-20 Olympus Optical Co Ltd Picture processing method and digital camera mounted with the same and its program
JP2007206738A (en) * 2006-01-30 2007-08-16 Kyocera Corp Imaging device and method
JP2008211678A (en) * 2007-02-27 2008-09-11 Kyocera Corp Imaging apparatus and method thereof
JP2008211679A (en) * 2007-02-27 2008-09-11 Kyocera Corp Imaging apparatus and method thereof
JP2010271951A (en) * 2009-05-21 2010-12-02 Canon Inc Image processing apparatus and method thereof
JP2011070134A (en) * 2009-09-28 2011-04-07 Kyocera Corp Imaging apparatus and method for processing image
WO2011122283A1 (en) * 2010-03-31 2011-10-06 キヤノン株式会社 Image processing device and image capturing device using same
JP2012005056A (en) * 2010-06-21 2012-01-05 Canon Inc Image processing device, image processing method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017130848A (en) * 2016-01-21 2017-07-27 オムロン株式会社 Imaging device, imaging method, imaging program, and recording medium recording the imaging program thereof
US10217194B2 (en) 2016-01-21 2019-02-26 Omron Corporation Image shooting apparatus that extends depth of field by recovering blurred image and an image shooting method thereof
CN112166374A (en) * 2019-04-24 2021-01-01 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, control method, and program
CN112166374B (en) * 2019-04-24 2022-03-01 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, and control method

Also Published As

Publication number Publication date
JP6056160B2 (en) 2017-01-11

Similar Documents

Publication Publication Date Title
US9247227B2 (en) Correction of the stereoscopic effect of multiple images for stereoscope view
JP6173156B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP5517746B2 (en) Image processing apparatus and method
US9961272B2 (en) Image capturing apparatus and method of controlling the same
JP2017055310A (en) Imaging apparatus and control method
WO2013027504A1 (en) Imaging device
KR20200031169A (en) Image processing method and device
JP5766077B2 (en) Image processing apparatus and image processing method for noise reduction
CN102034222A (en) Image processing apparatus and image processing method
JP6095266B2 (en) Image processing apparatus and control method thereof
JP2015109635A (en) Imaging apparatus, control method thereof and program
WO2013005489A1 (en) Image capture device and image processing device
JP2014026051A (en) Image capturing device and image processing device
US9986163B2 (en) Digital photographing apparatus and digital photographing method
JP6056160B2 (en) Automatic focusing device, automatic focusing method and program
JP4952574B2 (en) Image composition apparatus and program
JP5413625B2 (en) Image composition apparatus and program
JP5743769B2 (en) Image processing apparatus and image processing method
JP2014026050A (en) Image capturing device and image processing device
JP5910613B2 (en) Image composition apparatus and program
JP5493273B2 (en) Imaging apparatus, imaging method, and program
US10334161B2 (en) Image processing apparatus, image processing method, computer program and imaging apparatus
JP2016010080A (en) Image processing apparatus, image processing method and program
US20230196517A1 (en) Information processing apparatus, control method of information processing apparatus, and non-transitory computer readable medium
JP5448799B2 (en) Display control apparatus and display control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150224

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151124

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160803

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: 20161108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161121

R150 Certificate of patent or registration of utility model

Ref document number: 6056160

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees