JP5999746B2 - Imaging apparatus, AF evaluation value calculation method, and program - Google Patents

Imaging apparatus, AF evaluation value calculation method, and program Download PDF

Info

Publication number
JP5999746B2
JP5999746B2 JP2010081569A JP2010081569A JP5999746B2 JP 5999746 B2 JP5999746 B2 JP 5999746B2 JP 2010081569 A JP2010081569 A JP 2010081569A JP 2010081569 A JP2010081569 A JP 2010081569A JP 5999746 B2 JP5999746 B2 JP 5999746B2
Authority
JP
Japan
Prior art keywords
coordinate system
original image
image
correction
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010081569A
Other languages
Japanese (ja)
Other versions
JP2011215258A (en
Inventor
村木 淳
淳 村木
博 清水
博 清水
星野 博之
博之 星野
英里奈 市川
英里奈 市川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2010081569A priority Critical patent/JP5999746B2/en
Publication of JP2011215258A publication Critical patent/JP2011215258A/en
Application granted granted Critical
Publication of JP5999746B2 publication Critical patent/JP5999746B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Description

本発明は、撮像装置、AF評価値算出方法、及びプログラムに関し、特に、AFの設定をより正確に行う技術に関する。   The present invention relates to an imaging apparatus, an AF evaluation value calculation method, and a program, and more particularly to a technique for performing AF setting more accurately.

従来の撮像装置の中には、光学レンズを介して被写体を撮像すると、その撮像画像には光学レンズの影響により歪曲が生じているため、当該撮像画像のデータに対して歪曲を無くす補正(以下、「歪曲補正」と呼ぶ)を施しているものもある(特許文献1参照)。   In a conventional imaging device, when a subject is imaged through an optical lens, the captured image is distorted due to the influence of the optical lens, and thus correction for eliminating the distortion of the data of the captured image (hereinafter referred to as “correction”) , Called “distortion correction” (see Patent Document 1).

また、従来の撮像装置の中には、コントラストAF方式にてAF処理(Automatic Focus処理、オートフォーカス処理)を実行しているものもある。   Some conventional imaging apparatuses execute AF processing (Automatic Focus processing, autofocus processing) using a contrast AF method.

コントラストAF方式によるAF処理において、例えば特許文献2に記載の手法が広く用いられている。特許文献2に記載の手法とは、画像信号に含まれる周波数成分(直流成分を除く)が合焦位置で最大になることを利用して、画像信号に含まれる周波数成分の量を評価値として合焦状態を検出する、といった手法をいう。
このようなAF処理の手法を、以下、「AF検波」と呼ぶ。AF検波により検出される評価値は、撮像画像の一領域から検出される。このような評価値を、以下、「AF評価値」と呼び、AF評価値が検出される当該一領域を、以下、「AF検波領域」と呼ぶ。即ち、AF検波領域内の各画素の各々に対応する画像信号に含まれる周波数成分の量が積分され、その結果得られる積分値がAF評価値として検出される。
また、このAF検波領域を設定するための枠が、ライフビュー画像上に設定される。このような枠を、以下、「AF枠」と呼ぶ。即ち、このようなライブビュー画像と共に表示されているAF枠に基づいて、AF検波領域が設定されることになる。
In AF processing using the contrast AF method, for example, the method described in Patent Document 2 is widely used. The technique described in Patent Document 2 uses the fact that the frequency component (excluding the DC component) included in the image signal is maximized at the in-focus position, and uses the amount of the frequency component included in the image signal as an evaluation value. A technique of detecting the in-focus state.
Such an AF processing method is hereinafter referred to as “AF detection”. The evaluation value detected by AF detection is detected from one area of the captured image. Such an evaluation value is hereinafter referred to as an “AF evaluation value”, and the one area where the AF evaluation value is detected is hereinafter referred to as an “AF detection area”. That is, the amount of the frequency component included in the image signal corresponding to each pixel in the AF detection area is integrated, and the integrated value obtained as a result is detected as the AF evaluation value.
Also, a frame for setting this AF detection area is set on the life view image. Hereinafter, such a frame is referred to as an “AF frame”. That is, the AF detection area is set based on the AF frame displayed together with such a live view image.

特開2008−118387号公報JP 2008-118387 A 特開平3−1668号公報Japanese Patent Laid-Open No. 3-1668

しかしながら、AF枠が設定されるライブビュー画像は、歪曲補正後の画像である。従って、AF検波領域は、このようなAF枠が設定されたライブビュー画像の座標系、即ち、歪曲補正後の画像の座標系(以下、「歪曲補正後座標系」と呼ぶ)で設定される。
一方、AF検波は、歪曲補正前の撮像画像の座標系(以下、「歪曲補正前座標系」と呼ぶ)で行われる。
よって、歪曲補正後座標系のAF枠に対応して設定される実際のAF検波領域と、歪曲補正前座標系で本来設定されるべき理想的なAF検波領域との間には、ズレが生じてしまうことになる。
However, the live view image in which the AF frame is set is an image after distortion correction. Accordingly, the AF detection area is set in the coordinate system of the live view image in which such an AF frame is set, that is, the coordinate system of the image after distortion correction (hereinafter referred to as “coordinate system after distortion correction”). .
On the other hand, AF detection is performed in a coordinate system of a captured image before distortion correction (hereinafter referred to as “coordinate system before distortion correction”).
Therefore, a deviation occurs between the actual AF detection area set corresponding to the AF frame of the coordinate system after distortion correction and the ideal AF detection area that should be originally set in the coordinate system before distortion correction. It will end up.

さらに以下、AF枠に対応して設定される実際のAF検波領域と、理想的なAF検波領域との間に生ずるズレについて詳細に説明する。   Further, the deviation that occurs between the actual AF detection area set corresponding to the AF frame and the ideal AF detection area will be described in detail below.

図6は、一般的な従来の撮像装置が有する各種機能のうち、AF検波の機能を実現するための機能的構成を示す機能ブロック図である。   FIG. 6 is a functional block diagram showing a functional configuration for realizing an AF detection function among various functions of a general conventional imaging apparatus.

従来の撮像装置は、CMOS(Complementary Metal Oxide Semiconductor)センサ11と、前処理部12と、AF検波部13と、メモリ14と、YUV生成部15と、歪曲補正部16と、CPU(Central Processing Unit)17と、表示制御部18と、を備えている。   A conventional imaging apparatus includes a complementary metal oxide semiconductor (CMOS) sensor 11, a preprocessing unit 12, an AF detection unit 13, a memory 14, a YUV generation unit 15, a distortion correction unit 16, and a CPU (Central Processing Unit). ) 17 and a display control unit 18.

CMOSセンサ11は、図示せぬ所定の収差が生ずる光学レンズによりその受光面に結像される際に歪曲が生じた画像を撮像し、その撮像画像の画像信号を、画素単位で走査方向の順番で順次出力する。   The CMOS sensor 11 captures an image that is distorted when it is imaged on its light receiving surface by an optical lens that generates a predetermined aberration (not shown), and the image signal of the captured image is displayed in the order of scanning in pixel units. Output sequentially.

前処理部12は、CMOSセンサ11から順次出力される画素単位の画像信号を、黒レベルの補正等の前処理を実行した上で、AF検波部13とメモリ14とにそれぞれ供給する。   The preprocessing unit 12 supplies image signals in units of pixels sequentially output from the CMOS sensor 11 to the AF detection unit 13 and the memory 14 after performing preprocessing such as black level correction.

AF検波部13は、Y生成部31と、AF検波フィルタ部32と、ブロック積分部33と、センサ座標供給部34と、を備えている。   The AF detection unit 13 includes a Y generation unit 31, an AF detection filter unit 32, a block integration unit 33, and a sensor coordinate supply unit 34.

Y生成部31は、CMOSセンサ11から出力されて前処理部12を介して供給される画素単位の画像信号から、AF検波の対象となる輝度成分を生成する。
AF検波フィルタ部32は、Y生成部31により生成された画素単位の輝度成分から、周波数成分(直流成分を除く)を抽出して、AF検波値としてブロック積分部33に供給する。
ブロック積分部33は、AF検波フィルタ部32から画素単位で供給されるAF検波値のうち、AF検波領域内の各画素のAF検波値を積算することで、AF評価値を算出する。
センサ座標供給部34は、ブロック積分部33に供給されたAF検波値に対応する画素位置を、CMOSセンサ11の座標、即ち歪曲補正前座標系の座標としてブロック積分部33に通知する。すると、ブロック積分部33は、AF検波フィルタ部32から供給されたAF検波値が、AF検波領域内の画素に対応するものであるか否かを、センサ座標供給部34から通知される歪曲補正前座標系の座標に基づいて判断する。
The Y generation unit 31 generates a luminance component to be subjected to AF detection from an image signal in units of pixels output from the CMOS sensor 11 and supplied via the preprocessing unit 12.
The AF detection filter unit 32 extracts a frequency component (excluding a DC component) from the luminance component in units of pixels generated by the Y generation unit 31, and supplies the extracted frequency component to the block integration unit 33 as an AF detection value.
The block integration unit 33 calculates an AF evaluation value by integrating the AF detection values of the pixels in the AF detection region among the AF detection values supplied from the AF detection filter unit 32 in units of pixels.
The sensor coordinate supply unit 34 notifies the block integration unit 33 of the pixel position corresponding to the AF detection value supplied to the block integration unit 33 as the coordinates of the CMOS sensor 11, that is, the coordinates of the coordinate system before distortion correction. Then, the block integrator 33 notifies the distortion correction notified from the sensor coordinate supplier 34 whether or not the AF detection value supplied from the AF detection filter 32 corresponds to a pixel in the AF detection area. Judgment is based on the coordinates of the previous coordinate system.

このように、AF検波部13は、CMOSセンサ11から出力されて前処理部12を介して供給される撮像画像の画像信号、即ち、後述する歪曲補正部16により歪曲補正がなされる前の画像信号に対して、AF検波を実行する。   As described above, the AF detection unit 13 outputs an image signal of a captured image output from the CMOS sensor 11 and supplied via the preprocessing unit 12, that is, an image before distortion correction is performed by the distortion correction unit 16 described later. AF detection is performed on the signal.

CMOSセンサ11から出力された撮像画像の画像信号はまた、前処理部12を介してデジタルの画像信号としてメモリ14に供給される。
ここで、デジタルの画像信号を、以下、「データ」と呼ぶ。そして、CMOSセンサ11から出力された画素単位のデータの1フレーム分の集合体、即ち、CMOSセンサ11の入力画角内の全画素のデータの集合体を、以下、「フレーム画像データ」と呼ぶ。メモリ14の記憶の単位は、このようなフレーム画像データとされている。
即ち、メモリ14は、CMOSセンサ11から出力されて前処理部12を介して供給されるフレーム画像データ51を記憶する。このフレーム画像データ51は、上述したように歪曲が生じているRAW画像の画像データである。そこで、このようなフレーム画像データ51を、以下、「歪曲RAW51」と呼ぶ。
The image signal of the captured image output from the CMOS sensor 11 is also supplied to the memory 14 as a digital image signal via the preprocessing unit 12.
Here, the digital image signal is hereinafter referred to as “data”. An aggregate of one-pixel data output from the CMOS sensor 11, that is, an aggregate of all pixel data within the input angle of view of the CMOS sensor 11 is hereinafter referred to as “frame image data”. . The unit of storage in the memory 14 is such frame image data.
That is, the memory 14 stores frame image data 51 output from the CMOS sensor 11 and supplied via the preprocessing unit 12. The frame image data 51 is image data of a RAW image in which distortion occurs as described above. Therefore, such frame image data 51 is hereinafter referred to as “distortion RAW 51”.

YUV生成部15は、歪曲RAW51をメモリ14から読み出して、輝度信号(Y)と、青色成分の差分信号(U)と、赤色成分の差分信号(V)との3要素からなるフレーム画像データ52を生成し、メモリ14に記憶させる。
ここで、フレーム画像データ52には依然として歪曲が生じている。そこで、このようなフレーム画像データ52を、以下、「歪曲YUV52」と呼ぶ。
The YUV generation unit 15 reads out the distorted RAW 51 from the memory 14, and frame image data 52 including three elements of a luminance signal (Y), a blue component difference signal (U), and a red component difference signal (V). Is generated and stored in the memory 14.
Here, the frame image data 52 is still distorted. Therefore, such frame image data 52 is hereinafter referred to as “distorted YUV 52”.

歪曲補正部16は、歪曲YUV52をメモリ14から読み出して、歪曲補正を行い、その結果得られるフレーム画像データを、補正YUV53としてメモリ14に記憶させる。   The distortion correction unit 16 reads the distortion YUV 52 from the memory 14, performs distortion correction, and stores the frame image data obtained as a result in the memory 14 as the correction YUV 53.

図7は、AF検波部13がAF検波を行う場合の、AF枠55と、歪曲YUV52との関係を示している。   FIG. 7 shows the relationship between the AF frame 55 and the distorted YUV 52 when the AF detection unit 13 performs AF detection.

AF検波は、図7に示す歪曲YUV52の座標系、即ち、歪曲補正前座標系で行われる。
しかしながら、図7に示すように、従来においては、歪曲補正後座標系のAF枠55に対応して実際のAF検波領域が設定される。即ち、正確なAF評価値を求めることは困難になるという問題があった。
AF detection is performed in the coordinate system of the distortion YUV 52 shown in FIG. 7, that is, the coordinate system before distortion correction.
However, as shown in FIG. 7, in the prior art, an actual AF detection area is set corresponding to the AF frame 55 of the coordinate system after distortion correction. That is, there is a problem that it is difficult to obtain an accurate AF evaluation value.

本発明は、このような状況に鑑みてなされたものであり、AFの設定をより正確に行うことを目的とする。   The present invention has been made in view of such a situation, and an object thereof is to perform AF setting more accurately.

本発明の第1の観点によると、
所定の収差が生ずる光学レンズを有した撮像装置において、
前記光学レンズにより歪曲が生じる画像を原画像として撮像し、当該原画像を出力する撮像手段と、前記撮像手段により出力された前記原画像に対して歪曲補正をする補正手段と、
前記補正手段により歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定手段と、
前記撮像手段から出力された前記原画像のAF検波値を生成する生成手段と、
記AF検波値の位置を、前記原画像が属する第1の座標系の位置から前記補正画像が属する第2の座標系の位置に変換する変換手段と、
前記変換手段により座標系を変換させられた原画像と補正画像とを用いて、前記補正手段により歪曲補正される前の原画像のAF検波値のうち、前記設定手段により設定された合焦すべき範囲内に含まれる前記第2の座標系の位置における前記AF検波値から当該合焦すべき範囲内のAF評価値を算出するAF評価値算出手段と、
を備える撮像装置を提供する。
According to a first aspect of the invention,
In an imaging apparatus having an optical lens in which a predetermined aberration occurs,
An imaging unit that captures an image in which distortion is caused by the optical lens as an original image, and outputs the original image; a correction unit that corrects distortion for the original image output by the imaging unit;
Setting means for setting a range to be focused on a corrected image obtained as a result of distortion correction by the correcting means;
Generating means for generating an AF detection value of the original image output from the imaging means;
Conversion means for converting pre-Symbol the position of the AF detection value, the position of the second coordinate system the corrected image belongs from the position of the first coordinate system in which the original image belongs,
Using the original image whose coordinate system has been converted by the converting means and the corrected image, out of the AF detection values of the original image before distortion correction by the correcting means, the focus set by the setting means is focused. AF evaluation value calculating means for calculating an AF evaluation value within the range to be focused from the AF detection value at the position of the second coordinate system included within the power range;
An imaging apparatus comprising:

本発明の第の観点によると、
AF評価値を算出するAF評価値算出方法において、
光学レンズにより歪曲が生じた状態で撮像手段により撮像された画像を原画像として取得する取得ステップと、
前記原画像に対して歪曲補正をする補正ステップと、
歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定ステップと、
前記撮像手段から出力された前記原画像のAF検波値を生成する生成ステップと、
前記AF検波値の位置を、前記原画像が属する第1の座標系の位置から前記補正画像が属する第2の座標系の位置に変換する変換ステップと、
前記変換手段により座標系を変換させられた原画像と補正画像とを用いて、歪曲補正される前の原画像のAF検波値のうち、設定された合焦すべき範囲内に含まれる前記第2の座標系の位置における前記AF検波値から当該合焦すべき範囲内のAF評価値を算出するAF評価値算出ステップと、
を含むAF評価値算出方法を提供する。
According to a fifth aspect of the present invention,
In an AF evaluation value calculation method for calculating an AF evaluation value,
An acquisition step of acquiring, as an original image, an image picked up by the image pickup means in a state where distortion is caused by the optical lens;
A correction step for correcting distortion of the original image;
A setting step for setting a range to be focused on a corrected image obtained as a result of distortion correction;
A generation step of generating an AF detection value of the original image output from the imaging means;
A conversion step of converting the position of the AF detection value from the position of the first coordinate system to which the original image belongs to the position of the second coordinate system to which the correction image belongs;
Using the original image obtained by converting the coordinate system by the converting means and the corrected image, the AF detection value of the original image before distortion correction is included in the set range to be focused . An AF evaluation value calculating step for calculating an AF evaluation value within the range to be focused from the AF detection value at the position of the coordinate system of 2 ;
An AF evaluation value calculation method including

本発明の第の観点によると、
コンピュータを、
光学レンズにより歪曲が生じた状態で撮像手段により撮像された画像を原画像として取得する取得手段、
前記原画像に対して歪曲補正をする補正手段、 前記補正手段により歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定手段、
前記撮像手段から出力された前記原画像のAF検波値を生成する生成手段、
前記AF検波値の位置を、前記原画像が属する第1の座標系の位置から前記補正画像が属する第2の座標系の位置に変換する変換手段、
前記変換手段により座標系を変換させられた原画像と補正画像とを用いて、前記補正手段により歪曲補正される前の原画像のAF検波値のうち、前記設定手段により設定された合焦すべき範囲内に含まれる前記第2の座標系の位置における前記AF検波値から当該合焦すべき範囲内のAF評価値を算出するAF評価値算出手段、
として機能させるプログラムを提供する。
According to a sixth aspect of the present invention,
Computer
An acquisition means for acquiring an image captured by the imaging means in a state where distortion is caused by the optical lens as an original image;
Correction means for performing distortion correction on the original image; setting means for setting a range to be focused on a corrected image obtained as a result of distortion correction by the correction means;
Generating means for generating an AF detection value of the original image output from the imaging means;
Conversion means which converts the position of the AF detection value, the position of the second coordinate system the corrected image belongs from the position of the first coordinate system in which the original image belongs,
Using the original image whose coordinate system has been converted by the converting means and the corrected image, out of the AF detection values of the original image before distortion correction by the correcting means, the focus set by the setting means is focused. An AF evaluation value calculating means for calculating an AF evaluation value within the range to be focused from the AF detection value at the position of the second coordinate system included within the power range;
Provide a program that functions as

本発明によれば、AFの設定をより正確に行うことができる。   According to the present invention, AF can be set more accurately.

本発明の一実施形態に係る撮像装置のハードウェアの構成を示すブロック図である。It is a block diagram which shows the structure of the hardware of the imaging device which concerns on one Embodiment of this invention. 図1の撮像装置が有する各種機能のうち、AF検波の機能を実現するための機能的構成を示す機能ブロック図である。It is a functional block diagram which shows the functional structure for implement | achieving the function of AF detection among the various functions which the imaging device of FIG. 1 has. 図2の撮像装置の座標変形補正部による座標補正の処理と、AF枠との関係を模式的に示す図である。It is a figure which shows typically the relationship between the process of the coordinate correction by the coordinate deformation correction part of the imaging device of FIG. 2, and an AF frame. 図2の撮像装置が実行するAF処理の流れの一例を示すフローチャートである。3 is a flowchart illustrating an example of a flow of AF processing executed by the imaging apparatus of FIG. 図2の撮像装置の表示部に表示されるライブビュー画像とAF枠との一例を示す図である。FIG. 3 is a diagram illustrating an example of a live view image and an AF frame displayed on a display unit of the imaging apparatus in FIG. 2. 従来の撮像装置が有する各種機能のうち、AF検波の機能を実現するための機能的構成を示す機能ブロック図である。It is a functional block diagram which shows the functional structure for implement | achieving the function of AF detection among the various functions which the conventional imaging device has. 図6の従来の撮像装置がAF検波を行う場合の、AF枠と、歪曲YUVとの関係を示す図である。It is a figure which shows the relationship between AF frame and distortion YUV when the conventional imaging device of FIG. 6 performs AF detection.

以下、本発明の一実施形態を図面に基づいて説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態に係る撮像装置100のハードウェアの構成を示すブロック図である。撮像装置100は、例えばデジタルカメラにより構成することができる。   FIG. 1 is a block diagram illustrating a hardware configuration of an imaging apparatus 100 according to an embodiment of the present invention. The imaging apparatus 100 can be configured by a digital camera, for example.

撮像装置100は、光学レンズ装置111と、AF機構112と、シャッタ装置113と、アクチュエータ114と、CMOSセンサ115と、前処理部116と、TG(Timing Generator)117と、信号処理部118と、DRAM(Dynamic Random Access Memory)119と、CPU120と、RAM(Random Access Memory)121と、ROM(Read Only Memory)122と、表示制御部123と、表示部124と、操作部125と、メモリカード126と、を備える。   The imaging device 100 includes an optical lens device 111, an AF mechanism 112, a shutter device 113, an actuator 114, a CMOS sensor 115, a preprocessing unit 116, a TG (Timing Generator) 117, a signal processing unit 118, A DRAM (Dynamic Random Access Memory) 119, a CPU 120, a RAM (Random Access Memory) 121, a ROM (Read Only Memory) 122, a display control unit 123, a display unit 124, an operation unit 125, and a memory card 126. And comprising.

光学レンズ装置111は、例えばフォーカスレンズやズームレンズ等で構成される。
フォーカスレンズは、CMOSセンサ115の受光面に被写体像を結像させるため光学レンズである。ズームレンズは、焦点距離を一定の範囲で自在に変化させる光学レンズである。
このような所定の収差が生ずる光学レンズによりCMOSセンサ115の受光面に被写体像が結像される際に、上述した歪曲が生じる。
The optical lens device 111 is composed of, for example, a focus lens and a zoom lens.
The focus lens is an optical lens for forming a subject image on the light receiving surface of the CMOS sensor 115. The zoom lens is an optical lens that freely changes the focal length within a certain range.
When the subject image is formed on the light receiving surface of the CMOS sensor 115 by the optical lens in which such predetermined aberration occurs, the above-described distortion occurs.

AF機構112は、AF評価値に基づくCPU120の制御に従って、フォーカスレンズを移動させることで、AF枠内の被写体にフォーカス(焦点)を合わせる。なお、以下、このようなCPU120の制御を、「レンズ制御」と呼ぶ。   The AF mechanism 112 focuses the subject in the AF frame by moving the focus lens according to the control of the CPU 120 based on the AF evaluation value. Hereinafter, such control of the CPU 120 is referred to as “lens control”.

シャッタ装置113は、例えばシャッタ羽根等から構成される。シャッタ装置113は、CMOSセンサ115へ入射する光束を遮断する機械式のシャッタとして機能する。シャッタ装置113はまた、CMOSセンサ115へ入射する光束の光量を調節する絞りとしても機能する。   The shutter device 113 includes, for example, shutter blades. The shutter device 113 functions as a mechanical shutter that blocks a light beam incident on the CMOS sensor 115. The shutter device 113 also functions as a diaphragm that adjusts the amount of light flux incident on the CMOS sensor 115.

アクチュエータ114は、CPU120の制御に従って、シャッタ装置113のシャッタ羽根を開閉させる。   The actuator 114 opens and closes the shutter blades of the shutter device 113 according to the control of the CPU 120.

CMOSセンサ115には、光学レンズ装置111からシャッタ装置113を介して、歪曲が生じた被写体像が入射される。そこで、CMOSセンサ115は、TG117から供給されるクロックパルスに従って、一定時間毎に被写体像を光電変換(撮像)して画像信号を画素毎に蓄積し、蓄積した画像信号を出力する。   A distorted subject image is incident on the CMOS sensor 115 from the optical lens device 111 via the shutter device 113. Therefore, the CMOS sensor 115 photoelectrically converts (captures) the subject image at regular intervals according to the clock pulse supplied from the TG 117, accumulates the image signal for each pixel, and outputs the accumulated image signal.

前処理部116は、TG117から供給されるクロックパルスに従って、CMOSセンサ115から順次出力される画素単位の画像信号を、黒レベルの補正等の前処理を実行した上で画像データとして、信号処理部118とDRAM119とにそれぞれ出力する。   The preprocessing unit 116 performs preprocessing such as correction of the black level on the image signal in units of pixels sequentially output from the CMOS sensor 115 according to the clock pulse supplied from the TG 117, and performs signal processing as a signal processing unit. 118 and DRAM 119, respectively.

TG117は、CPU120の制御に従って、一定時間毎にクロックパルスをCMOSセンサ115と前処理部116とにそれぞれ供給する。   The TG 117 supplies a clock pulse to the CMOS sensor 115 and the preprocessing unit 116 at regular intervals according to the control of the CPU 120.

信号処理部118は、例えばDSP(Digital Signal Processor)等で構成される。信号処理部118は、CPU120の制御に従って、前処理部116から供給された画像データやDRAM119に記憶された画像データ等の各種デジタル信号を処理対象として、各種各様の信号処理を実行する。
例えば、信号処理部118は、AF検波を実行する。AF検波の詳細については、図2以降の図面を参照して後述する。
The signal processing unit 118 is constituted by, for example, a DSP (Digital Signal Processor). The signal processing unit 118 executes various types of signal processing on various digital signals such as image data supplied from the preprocessing unit 116 and image data stored in the DRAM 119 according to the control of the CPU 120.
For example, the signal processing unit 118 performs AF detection. Details of the AF detection will be described later with reference to FIGS.

DRAM119は、前処理部116から供給された画像データや信号処理部118により信号処理が実行された後の画像データを一時的に記憶する。この場合のDRAM119の記録の単位は、フレーム画像データとなる。   The DRAM 119 temporarily stores the image data supplied from the preprocessing unit 116 and the image data after the signal processing is executed by the signal processing unit 118. In this case, the recording unit of the DRAM 119 is frame image data.

CPU120は、撮像装置100全体の動作を制御する。
RAM121は、CPU120が各処理を実行する際にワーキングエリアとして機能する。
ROM122は、撮像装置100が各処理を実行するのに必要なプログラムやデータを記憶する。
CPU120は、RAM121をワーキングエリアとして、ROM122に記憶されているプログラムとの協働により各種処理を実行する。
The CPU 120 controls the overall operation of the imaging apparatus 100.
The RAM 121 functions as a working area when the CPU 120 executes each process.
The ROM 122 stores programs and data necessary for the imaging apparatus 100 to execute each process.
The CPU 120 executes various processes in cooperation with a program stored in the ROM 122 using the RAM 121 as a working area.

例えば、CPU120は、撮像画像の記録処理の前等の所定のタイミングで、CMOSセンサ115の撮像動作を継続させ、その間に信号処理部118により逐次生成されるフレーム画像データ(後述する図2の補正YUV203等)を、DRAM119に一時的に記憶させる。なお、以下、かかるCPU120の一連の処理を、「スルー撮像」と呼ぶ。   For example, the CPU 120 continues the imaging operation of the CMOS sensor 115 at a predetermined timing such as before the captured image recording process, and the frame image data sequentially generated by the signal processing unit 118 during that time (correction in FIG. 2 described later) YUV 203) is temporarily stored in the DRAM 119. Hereinafter, a series of processes performed by the CPU 120 is referred to as “through imaging”.

また、CPU120は、表示制御部123を制御して、スルー撮像時にDRAM119に記録された各フレーム画像データ(後述する図2の補正YUV203等)を順次読み出して、各々に対応するフレーム画像を表示部124に表示させる。なお、以下、かかるCPU120の一連の処理を、「スルー表示」と呼ぶ。また、スルー表示されているフレーム画像を、「スルー画像」又は、上述したように「ライブビュー画像」と呼ぶ。   Further, the CPU 120 controls the display control unit 123 to sequentially read out each frame image data (such as correction YUV 203 in FIG. 2 described later) recorded in the DRAM 119 during through imaging, and display a corresponding frame image on the display unit. 124 is displayed. Hereinafter, a series of processing of the CPU 120 is referred to as “through display”. A frame image displayed through is called a “through image” or “live view image” as described above.

換言すると、表示制御部123は、CPU120の制御に従って、DRAM119やメモリカード126に記憶されているフレーム画像データ(後述する図2の補正YUV203等)を読み出して、対応するフレーム画像を表示部124に表示させる。   In other words, the display control unit 123 reads frame image data (such as correction YUV 203 in FIG. 2 described later) stored in the DRAM 119 or the memory card 126 according to the control of the CPU 120 and displays the corresponding frame image on the display unit 124. Display.

CPU120は、さらに、AF枠を設定して、表示制御部123を制御して、ライブビュー画像の上に表示させることもできる(後述する図5参照)。この場合、CPU120は、歪曲補正後座標系のAF枠により囲まれる領域を、AF検波領域として設定する。
そして、CPU120は、信号処理部118を制御して、AF検波を実行する。AF検波の詳細については、図2以降の図面を参照して後述する。
Further, the CPU 120 can set an AF frame and control the display control unit 123 to display it on the live view image (see FIG. 5 described later). In this case, the CPU 120 sets an area surrounded by the AF frame of the coordinate system after distortion correction as an AF detection area.
Then, the CPU 120 controls the signal processing unit 118 to execute AF detection. Details of the AF detection will be described later with reference to FIGS.

操作部125は、ユーザによる各種ボタンの操作を受け付ける。操作部125は、例えば電源釦、十字釦、決定釦、メニュー釦、レリーズ釦等を備える。
操作部125は、受け付けた各種ボタンの操作に対応する信号を、CPU120に供給する。CPU120は、操作部125からの信号に基づいてユーザの操作内容を解析し、その操作内容に応じた処理を実行する。
例えば、撮像画像の記録の指示操作が割り当てられた釦が押下された場合、CPU120は、記録の指示があったと解釈し、後述する補正YUV203をメモリカード126等に記録させる。
The operation unit 125 receives operations of various buttons by the user. The operation unit 125 includes, for example, a power button, a cross button, a determination button, a menu button, a release button, and the like.
The operation unit 125 supplies the CPU 120 with signals corresponding to the operations of the received various buttons. The CPU 120 analyzes the user's operation content based on the signal from the operation unit 125 and executes processing according to the operation content.
For example, when a button to which an instruction operation for recording a captured image is assigned is pressed, the CPU 120 interprets that there is an instruction for recording, and records a correction YUV 203 described later on the memory card 126 or the like.

換言すると、メモリカード126は、このようなCPU120の記録制御によって、補正YUV203等を記録する。メモリカード126はまた、必要に応じて各種データを記録する。   In other words, the memory card 126 records the corrected YUV 203 and the like by such recording control of the CPU 120. The memory card 126 also records various data as necessary.

図2は、このような構成の撮像装置100の信号処理部118が有する各種機能のうち、AF検波の機能を実現するための機能的構成を示す機能ブロック図である。   FIG. 2 is a functional block diagram showing a functional configuration for realizing the AF detection function among various functions of the signal processing unit 118 of the imaging apparatus 100 having the above configuration.

撮像装置100の信号処理部118は、AF検波部151と、YUV生成部152と、歪曲補正部153と、を備えている。   The signal processing unit 118 of the imaging apparatus 100 includes an AF detection unit 151, a YUV generation unit 152, and a distortion correction unit 153.

ここで、AF検波部151を除く機能ブロック、即ち、YUV生成部152及び歪曲補正部153の各々は、図6のYUV生成部15及び歪曲補正部16の各々と基本的に同様の構成と機能を有している。
このため、歪曲RAW201、歪曲YUV202、及び補正YUV203の各々は、図6の歪曲RAW51、歪曲YUV52、及び補正YUV53の各々と基本的に同様の構造を有している。
従って、以下、これらの説明は適宜省略し、主に、図6とは異なるAF検波部151について説明する。
Here, the functional blocks excluding the AF detection unit 151, that is, each of the YUV generation unit 152 and the distortion correction unit 153, has basically the same configuration and function as each of the YUV generation unit 15 and the distortion correction unit 16 of FIG. have.
Therefore, each of the distorted RAW 201, the distorted YUV 202, and the corrected YUV 203 has basically the same structure as each of the distorted RAW 51, the distorted YUV 52, and the corrected YUV 53 shown in FIG.
Therefore, in the following, these descriptions will be omitted as appropriate, and mainly the AF detector 151 different from FIG. 6 will be described.

AF検波部151は、Y生成部161と、AF検波フィルタ部162と、ブロック積分部163と、センサ座標供給部164と、座標変形補正部165と、を備えている。   The AF detection unit 151 includes a Y generation unit 161, an AF detection filter unit 162, a block integration unit 163, a sensor coordinate supply unit 164, and a coordinate deformation correction unit 165.

Y生成部161は、CMOSセンサ115から出力されて前処理部116を介して供給される画素単位の画像信号から、AF検波の対象となる輝度成分を生成する。
AF検波フィルタ部172は、Y生成部161により画素単位で生成される輝度成分から、周波数成分(直流成分を除く)を抽出して、AF検波値としてブロック積分部163に供給する。
ブロック積分部163は、AF検波フィルタ部162から画素単位で供給されるAF検波値のうち、AF検波領域内の各画素のAF検波値を積算することで、AF評価値を算出する。
The Y generation unit 161 generates a luminance component to be subjected to AF detection from an image signal in units of pixels output from the CMOS sensor 115 and supplied via the preprocessing unit 116.
The AF detection filter unit 172 extracts a frequency component (excluding a DC component) from the luminance component generated in units of pixels by the Y generation unit 161 and supplies the frequency component to the block integration unit 163 as an AF detection value.
The block integration unit 163 calculates an AF evaluation value by integrating the AF detection values of the respective pixels in the AF detection area among the AF detection values supplied in units of pixels from the AF detection filter unit 162.

センサ座標供給部164は、ブロック積分部163に供給されたAF検波値に対応する画素の画素位置(以下、「注目画素位置」と呼ぶ)を、CPU120を介してROM122(図1)等から取得し、CMOSセンサ115の座標として座標変形補正部165に供給する。
即ち、歪曲RAW201を構成する各画素のデータは、CMOSセンサ115から前処理部116を介して、走査方向の順番で順次信号処理部118に供給される。その結果、Y生成部161によって、画素単位で走査方向の順番で輝度成分が順次生成されて、AF検波フィルタ部162に供給される。
そこで、センサ座標供給部164は、画素単位で走査方向の順番でAF検波フィルタ部162に順次供給される輝度成分のCMOSセンサ115上の座標を、ROM122等から取得する。そして、センサ座標供給部164は、取得した当該座標を注目画素位置として、座標変形補正部165に供給する。
The sensor coordinate supply unit 164 acquires the pixel position of the pixel corresponding to the AF detection value supplied to the block integration unit 163 (hereinafter referred to as “target pixel position”) from the ROM 122 (FIG. 1) or the like via the CPU 120. Then, it is supplied to the coordinate deformation correction unit 165 as the coordinates of the CMOS sensor 115.
That is, the data of each pixel constituting the distorted RAW 201 is sequentially supplied from the CMOS sensor 115 to the signal processing unit 118 via the preprocessing unit 116 in the order of the scanning direction. As a result, luminance components are sequentially generated by the Y generation unit 161 in the order of the scanning direction in units of pixels and supplied to the AF detection filter unit 162.
Therefore, the sensor coordinate supply unit 164 acquires the coordinates on the CMOS sensor 115 of the luminance components sequentially supplied to the AF detection filter unit 162 in the order of the scanning direction in units of pixels from the ROM 122 or the like. Then, the sensor coordinate supply unit 164 supplies the acquired coordinates as the target pixel position to the coordinate deformation correction unit 165.

ここで、CMOSセンサ115の座標系は歪曲補正前座標系であるのに対して、AF枠が設定される座標系は歪曲補正後座標系である。
そこで、座標変形補正部165は、歪曲補正前座標系で示される注目画素位置の座標を、歪曲補正後座標系の座標、即ち、補正YUV203の座標(以下、「変形補正後座標」と呼ぶ)に変換する。
注目画素位置の変形補正後座標は、ブロック積分部163に供給される。すると、ブロック積分部163は、AF検波フィルタ部162から供給されたAF検波値が、AF検波領域内の画素に対応するものであるか否かを、座標変形補正部165から供給された注目画素位置の変形補正後座標に基づいて判断する。
Here, the coordinate system of the CMOS sensor 115 is a coordinate system before distortion correction, whereas the coordinate system in which the AF frame is set is a coordinate system after distortion correction.
Therefore, the coordinate deformation correction unit 165 uses the coordinates of the target pixel position indicated in the coordinate system before distortion correction, the coordinates of the coordinate system after distortion correction, that is, the coordinates of the correction YUV 203 (hereinafter referred to as “coordinates after deformation correction”). Convert to
The coordinates after deformation correction of the target pixel position are supplied to the block integration unit 163. Then, the block integration unit 163 determines whether or not the AF detection value supplied from the AF detection filter unit 162 corresponds to a pixel in the AF detection region, and the pixel of interest supplied from the coordinate deformation correction unit 165. Judgment is made based on the coordinates after position deformation correction.

以下、注目画素位置の変形補正後座標についてさらに詳しく説明する。   Hereinafter, the coordinates after deformation correction of the target pixel position will be described in more detail.

座標変形補正部165には、歪曲補正前座標系で表現されるCMOSセンサ115の各画素の座標が、走査方向の順番にセンサ座標供給部164から順次供給されてくる。このような歪曲補正前座標系の座標が座標変形補正部165に供給されるタイミングは、画素単位のAF検波値がブロック積分部163に供給されるタイミングと同期している。従って、所定のタイミングでセンサ座標供給部164から座標変形補正部165に供給された座標は、当該所定のタイミングでブロック積分部163に供給されたAF検波値に対応する画素位置、即ち注目画素位置についての歪曲補正前座標系の座標を示している。   To the coordinate deformation correction unit 165, the coordinates of each pixel of the CMOS sensor 115 expressed in the coordinate system before distortion correction are sequentially supplied from the sensor coordinate supply unit 164 in the order of the scanning direction. The timing at which the coordinates in the coordinate system before distortion correction are supplied to the coordinate deformation correction unit 165 is synchronized with the timing at which the AF detection value for each pixel is supplied to the block integration unit 163. Accordingly, the coordinates supplied from the sensor coordinate supply unit 164 to the coordinate deformation correction unit 165 at a predetermined timing are the pixel positions corresponding to the AF detection values supplied to the block integration unit 163 at the predetermined timing, that is, the target pixel position. The coordinates of the coordinate system before distortion correction for are shown.

座標変形補正部165は、このような歪曲補正前座標系の注目画素位置の座標を、所定のアルゴリズムに従って変形補正後座標に変換する。
具体的には本実施形態では、次のようなアルゴリズムに従って、歪曲補正前座標系の注目画素位置の座標は、変形補正後座標に変換される。
The coordinate deformation correction unit 165 converts the coordinates of the target pixel position in the coordinate system before distortion correction into coordinates after deformation correction according to a predetermined algorithm.
Specifically, in this embodiment, the coordinates of the target pixel position in the coordinate system before distortion correction are converted into coordinates after deformation correction according to the following algorithm.

本実施形態では、例えば、歪曲を伴う実際の像高と、理想的な像高との比率を格納するテーブルが、ROM122等に予め記憶されているとする。   In the present embodiment, for example, it is assumed that a table that stores a ratio between an actual image height with distortion and an ideal image height is stored in advance in the ROM 122 or the like.

ここで、CMOSセンサ115における注目画素位置の座標、即ち歪曲補正前座標系における注目画素位置の座標を(xs,ys)と記述するものとする。また、歪曲補正前座標系における光学中心の座標を(xcent,ycent)と記述するものとする。
そして、ROM122等に予め記憶されているテーブルによる、実際の像高ihから理想的な像高に変換する関数を、Fdist(ih)と定義するものとする。
ここで、実際の像高ihは、式(1)のように表わされる。
ih = sqrt{(xs−xcent)^2+(ys−ysent)^2}
・・・(1)
この場合、歪曲補正前座標系における注目画素位置の座標(xs,ys)に対して、その変形補正後座標を(xi,yi)と記述すると、変形補正後座標のX座標xiは式(2)のように表わされ、変形補正後座標のY座標yiは式(3)のように表わされる。
xi = (xs−xcent)×Fdist(ih) + xcent
・・・(2)
yi = (ys−ycent)×Fdist(ih) + ycent
・・・(3)
Here, the coordinate of the target pixel position in the CMOS sensor 115, that is, the coordinate of the target pixel position in the coordinate system before distortion correction is described as (xs, ys). The coordinates of the optical center in the coordinate system before distortion correction are described as (xcent, ycent).
A function for converting an actual image height ih to an ideal image height using a table stored in advance in the ROM 122 or the like is defined as Fdist (ih).
Here, the actual image height ih is expressed as in Expression (1).
ih = sqrt {(xs-xcent) ^ 2 + (ys-ysent) ^ 2}
... (1)
In this case, if the coordinate after deformation correction is described as (xi, yi) with respect to the coordinate (xs, ys) of the target pixel position in the coordinate system before distortion correction, the X coordinate xi of the coordinate after deformation correction is expressed by equation (2). ), And the Y coordinate yi of the coordinates after deformation correction is expressed as in Expression (3).
xi = (xs−xcent) × Fdist (ih) + xcent
... (2)
yi = (ys−ycent) × Fdist (ih) + ycent
... (3)

従って、座標変形補正部165は、ROM122等に予め記憶されているテーブルを用いて、式(2),(3)の演算を実行することで、歪曲補正前座標系における注目画素位置の座標(xs,ys)を、変形補正後座標(xi,yi)に変換することが容易にできる。   Accordingly, the coordinate deformation correction unit 165 uses the table stored in advance in the ROM 122 or the like to execute the calculations of Expressions (2) and (3), thereby the coordinates of the pixel position of interest in the coordinate system before distortion correction ( xs, ys) can be easily converted into coordinates (xi, yi) after deformation correction.

図3は、座標変形補正部165による座標補正の処理と、AF枠との関係を模式的に示す図である。   FIG. 3 is a diagram schematically showing the relationship between the coordinate correction processing by the coordinate deformation correction unit 165 and the AF frame.

図3において、矢印261と矢印262とは、CMOSセンサ115の走査順、即ち、ブロック積分部163に対する画素単位のAF検波値の入力順を示している。   In FIG. 3, arrows 261 and 262 indicate the scanning order of the CMOS sensor 115, that is, the input order of AF detection values in pixel units to the block integration unit 163.

矢印261は、座標変形補正部165による座標補正前のCMOSセンサ115上の座標系、即ち歪曲補正前座標系における走査順を示している。従って、1つの矢印261が、歪曲補正前座標系における1つのライン位置を示している。
ここで、便宜上、矢印261は、歪曲補正前座標系で表わされる歪曲YUV202の上に図示されている。
An arrow 261 indicates the scanning order in the coordinate system on the CMOS sensor 115 before coordinate correction by the coordinate deformation correction unit 165, that is, the coordinate system before distortion correction. Therefore, one arrow 261 indicates one line position in the coordinate system before distortion correction.
Here, for the sake of convenience, the arrow 261 is shown on the distortion YUV 202 represented in the coordinate system before distortion correction.

一方、矢印262は、座標変形補正部165による座標補正後の座標系、即ち歪曲補正後座標系における走査順を示している。従って、1つの矢印262が、歪曲補正後座標系における1つのライン位置を示している。
即ち、座標変形補正部165により、歪曲補正前座標系における各矢印261の各々で示されるライン位置が、歪曲補正後座標系における各矢印262の各々で示されるライン位置に変換されることになる。
このような変換は、歪曲補正部153による歪曲補正と等価の処理である。
即ち、歪曲補正部153は、CMOSセンサ115の入力画角と同サイズの歪曲YUV202の中から、歪曲した領域のデータを切り出す。なお、このようにして歪曲YUV202から切り出される領域を、以下、「YUV切出領域」と呼ぶ。次に、歪曲補正部153は、YUV切出領域のデータを変形補正することで、CMOSセンサ115の入力画角と同サイズの補正YUV203を生成する。
このため、矢印262は、便宜上、歪曲補正後座標系で表わされる補正YUV203の上に図示されている。
On the other hand, an arrow 262 indicates the scanning order in the coordinate system after coordinate correction by the coordinate deformation correction unit 165, that is, the coordinate system after distortion correction. Accordingly, one arrow 262 indicates one line position in the coordinate system after distortion correction.
That is, the coordinate deformation correction unit 165 converts the line position indicated by each arrow 261 in the coordinate system before distortion correction into the line position indicated by each arrow 262 in the coordinate system after distortion correction. .
Such conversion is processing equivalent to distortion correction by the distortion correction unit 153.
That is, the distortion correction unit 153 cuts out the data of the distorted area from the distorted YUV 202 having the same size as the input field angle of the CMOS sensor 115. The area cut out from the distorted YUV 202 in this way is hereinafter referred to as “YUV cut-out area”. Next, the distortion correction unit 153 generates correction YUV 203 having the same size as the input field angle of the CMOS sensor 115 by deforming and correcting the data of the YUV cut-out area.
For this reason, the arrow 262 is illustrated on the corrected YUV 203 represented in the coordinate system after distortion correction for convenience.

このようにして、座標変形補正部165からは、歪曲補正後座標系で表わされる矢印262に沿って、注目画素位置の変形補正後座標(xi,yi)がブロック積分部163に順次供給されることになる。   In this way, the coordinate deformation correction unit 165 sequentially supplies the post-deformation correction coordinates (xi, yi) of the target pixel position to the block integration unit 163 along the arrow 262 represented by the coordinate system after distortion correction. It will be.

ここで、ブロック積分部163は、上述したように、注目画素位置がAF検波領域に存在するか否かを判定する。この場合の注目画素位置の座標は、歪曲補正後座標系で表わされた変形補正後座標(xi,yi)であり、かつ、実際のAF検波領域も、同様の歪曲補正後座標系で表わされたAF枠272から設定される。
即ち、図3の手前側の補正YUV203の上に便宜的に描画された矢印262上の注目画素位置の変形補正後座標(xi,yi)が、図3の手前側の補正YUV203に設定された矩形のAF枠272内の実際のAF枠検波領域に存在するか否かが判定される。
この場合、CMOSセンサ115上の歪曲補正前座標系の視点からすると、実際のAF検波領域を設定するためのAF枠271の配置位置は、理想的なAF検波領域の配置位置と一致する。
即ち、この段落の冒頭に記載したブロック積分部163の処理は、歪曲補正前座標系における理想的な配置位置に存在するAF枠(図3の奥側の歪曲YUV202上の歪曲したAF枠271)内の領域を実際のAF検波領域として設定して、歪曲補正前座標系における注目画素位置の座標(図3の奥側の補正YUV203の上に便宜的に描画された矢印261上の座標)を用いてAF検波を行う処理と同様の効果を奏する。このようにして、AF検波領域をより理想的な位置に近付けて設定した上で、AF検波の実行が可能になる。
Here, as described above, the block integrator 163 determines whether or not the target pixel position exists in the AF detection area. The coordinates of the target pixel position in this case are coordinates after deformation correction (xi, yi) expressed in the coordinate system after distortion correction, and the actual AF detection area is also expressed in the same coordinate system after distortion correction. It is set from the passed AF frame 272.
That is, the post-deformation corrected coordinates (xi, yi) of the target pixel position on the arrow 262 drawn on the near side correction YUV 203 in FIG. 3 for convenience are set as the near side correction YUV 203 in FIG. It is determined whether or not an actual AF frame detection area in the rectangular AF frame 272 exists.
In this case, from the viewpoint of the pre-distortion correction coordinate system on the CMOS sensor 115, the arrangement position of the AF frame 271 for setting the actual AF detection area coincides with the ideal arrangement position of the AF detection area.
In other words, the processing of the block integration unit 163 described at the beginning of this paragraph is based on the AF frame (distorted AF frame 271 on the distortion YUV 202 on the back side in FIG. 3) existing at an ideal arrangement position in the coordinate system before distortion correction. Is set as the actual AF detection area, and the coordinates of the pixel position of interest in the coordinate system before distortion correction (coordinates on the arrow 261 drawn for convenience on the correction YUV 203 on the back side in FIG. 3) are set. The same effect as the process of using AF detection is obtained. In this way, AF detection can be performed after the AF detection area is set closer to the ideal position.

さらに、ブロック積分部163の処理と、特許文献1に記載の処理とでは次のような差異がある。   Furthermore, there is the following difference between the processing of the block integration unit 163 and the processing described in Patent Document 1.

即ち、特許文献1に記載の処理では、歪曲補正前の座標系における理想的な配置位置に存在するAF枠(図3の奥側の歪曲YUV202上の歪曲したAF枠55に相当)内の領域が、実際のAF検波領域として設定される。
この場合、実際のAF検波領域の形状は歪曲したものとなるため、左上端と右下端の座標だけで、実際のAF検波領域を表現することは不可能である。
従って、注目画素位置がAF検波領域内か否かを判定する処理は煩雑となり、その分だけ、正確なAF評価値を求めることは困難になる。即ち、正確なAFの設定は困難になる。
In other words, in the process described in Patent Document 1, an area in an AF frame (corresponding to the distorted AF frame 55 on the distorted YUV 202 on the back side in FIG. 3) present at an ideal arrangement position in the coordinate system before distortion correction. Are set as the actual AF detection area.
In this case, since the shape of the actual AF detection area is distorted, it is impossible to represent the actual AF detection area only by the coordinates of the upper left corner and the lower right corner.
Therefore, the process of determining whether or not the target pixel position is within the AF detection region becomes complicated, and it is difficult to obtain an accurate AF evaluation value accordingly. That is, accurate AF setting becomes difficult.

これに対して、ブロック積分部163の処理で用いる実際のAF検波領域は、歪曲補正後座標系のAF枠内の領域である。即ち、図3の手前側の補正YUV203に設定された矩形のAF枠272内の領域が、実際のAF検波領域として用いられる。
この場合、実際のAF検波領域の形状は矩形のままであるため、例えば後述する図4のステップS21に示すように、歪曲補正後座標系における左上端と右下端の座標だけを特定するだけで、実際のAF検波領域を表現することができる。
その結果、後述する図4のステップS25に示すように、注目画素位置の変形補正後座標(xi,yi)と、左上端と右下端の座標とを比較するだけで、注目画素位置がAF検波領域内か否かを容易かつ正確に判定することができる。
これにより、特許文献1と比較して、より正確なAF評価値を求めることができ、ひいてはより正確なAFの設定が可能になる。
On the other hand, the actual AF detection area used in the processing of the block integration unit 163 is an area within the AF frame of the coordinate system after distortion correction. That is, the area within the rectangular AF frame 272 set to the correction YUV 203 on the near side in FIG. 3 is used as the actual AF detection area.
In this case, since the shape of the actual AF detection area remains rectangular, for example, as shown in step S21 of FIG. 4 described later, only the coordinates of the upper left end and the lower right end in the coordinate system after distortion correction are specified. An actual AF detection area can be expressed.
As a result, as shown in step S25 of FIG. 4 to be described later, the target pixel position is detected by AF detection only by comparing the post-deformation correction coordinates (xi, yi) of the target pixel position with the coordinates of the upper left corner and the lower right corner. It is possible to easily and accurately determine whether or not it is within the area.
Thereby, it is possible to obtain a more accurate AF evaluation value as compared with Patent Document 1, and thus it is possible to set a more accurate AF.

次に、図4を参照して、図2の機能的構成を有する撮像装置100が実行する処理のうち、AF処理について説明する。   Next, with reference to FIG. 4, an AF process among processes executed by the imaging apparatus 100 having the functional configuration of FIG. 2 will be described.

図4は、AF処理の流れの一例を示すフローチャートである。   FIG. 4 is a flowchart illustrating an example of the flow of AF processing.

ステップS21において、CPU120は、歪曲補正後座標系のAF枠を設定し、当該AF枠内の領域をAF検波領域として設定して、ブロック積分部163に通知する。
即ち、CMOSセンサ115から出力されて前処理部116を介してDRAM119に記憶された歪曲RAW201は、YUV生成部152により歪曲YUV202となり、さらに、歪曲補正部153により歪曲補正がなされて、補正YUV203となる。このような歪曲補正後座標系の補正YUV203上でAF枠は設定される。
設定されたAF枠は、補正YUV203と共に、表示制御部123の制御により表示部124に表示される。また、当該AF枠内の領域がAF検波領域として設定されて、ブロック積分部163に通知される。
なお、本実施形態では、AF枠は矩形の枠であり、歪曲補正後座標系の左上端の座標が(x0,y0)となり、歪曲補正後座標系の右下端の座標が(x1,y1)となるように設定されるものとする。この場合、AF検波領域は、歪曲補正後座標系の左上端の座標(x0,y0)と、歪曲補正後座標系の右下端の座標(x1,y1)とのみで表現することができる。
In step S <b> 21, the CPU 120 sets an AF frame in the coordinate system after distortion correction, sets an area in the AF frame as an AF detection area, and notifies the block integration unit 163.
That is, the distortion RAW 201 output from the CMOS sensor 115 and stored in the DRAM 119 via the preprocessing unit 116 becomes the distortion YUV 202 by the YUV generation unit 152, and further, the distortion correction is performed by the distortion correction unit 153. Become. The AF frame is set on the corrected YUV 203 in the coordinate system after such distortion correction.
The set AF frame is displayed on the display unit 124 under the control of the display control unit 123 together with the correction YUV 203. Further, the area within the AF frame is set as the AF detection area and notified to the block integration unit 163.
In the present embodiment, the AF frame is a rectangular frame, the coordinates at the upper left corner of the coordinate system after distortion correction are (x0, y0), and the coordinates at the lower right corner of the coordinate system after distortion correction are (x1, y1). It shall be set to become. In this case, the AF detection area can be expressed only by coordinates (x0, y0) at the upper left corner of the coordinate system after distortion correction and coordinates (x1, y1) at the lower right corner of the coordinate system after distortion correction.

ステップS22において、ブロック積分部163は、AF検波値の積分値を初期化する。ここで、積分値をSumと記述すると、Sum=0となるように初期設定される。   In step S22, the block integrator 163 initializes the integrated value of the AF detection value. Here, when the integral value is described as Sum, initialization is performed so that Sum = 0.

ステップS23において、ブロック積分部163は、注目画素位置のAF検波値Flt及び変形補正後座標(xi,yi)を取得する。
ここで、注目画素位置は、後述するステップS27の処理で更新されるが、ステップS22の処理後にステップS23の処理が実行された時点では、CMOSセンサ115の左上端の画素の画素位置が設定されている。
AF検波フィルタ部162は、注目画素位置の輝度成分から周波数成分(直流成分を除く)を抽出して、注目画素位置のAF検波値(以下、「Flt」と記述する)としてブロック積分部163に供給する。
このとき、座標変形補正部165は、上述した式(2)及び式(3)の演算を行うことで、歪曲補正後座標系で表現された注目画素位置、即ち注目画素位置の変形補正後座標(xi,yi)を算出し、ブロック積分部163に供給する。
そこで、ステップS23において、ブロック積分部163は、注目画素位置のAF検波値Flt及び変形補正後座標(xi,yi)を取得する。
In step S23, the block integration unit 163 acquires the AF detection value Flt and the coordinates (xi, yi) after deformation correction at the target pixel position.
Here, the target pixel position is updated in the process of step S27 described later, but when the process of step S23 is executed after the process of step S22, the pixel position of the upper left pixel of the CMOS sensor 115 is set. ing.
The AF detection filter unit 162 extracts a frequency component (excluding a DC component) from the luminance component at the target pixel position, and sends it to the block integration unit 163 as an AF detection value at the target pixel position (hereinafter referred to as “Flt”). Supply.
At this time, the coordinate deformation correction unit 165 performs the calculation of the above-described formulas (2) and (3), so that the target pixel position expressed in the post-distortion correction coordinate system, that is, the post-deformation correction coordinates of the target pixel position. (Xi, yi) is calculated and supplied to the block integrator 163.
Therefore, in step S23, the block integration unit 163 acquires the AF detection value Flt and the coordinates (xi, yi) after deformation correction at the target pixel position.

ステップS24において、ブロック積分部163は、ステップS23の処理で取得した注目画素位置の変形補正後座標(xi,yi)を用いて、枠内判定をする。
即ち、ブロック積分部163は、注目画素位置の変形補正後座標(xi,yi)が、ステップS21の処理で歪曲補正後座標系において設定された矩形のAF検波領域内に含まれているか否かを判定する。
具体的には本実施形態では、次の式(4)と式(5)で示される不等式を両方とも満たすか否かが判定される。
In step S24, the block integration unit 163 performs in-frame determination using the post-deformation corrected coordinates (xi, yi) of the target pixel position acquired in the process of step S23.
That is, the block integration unit 163 determines whether or not the post-deformation correction coordinates (xi, yi) of the target pixel position are included in the rectangular AF detection area set in the post-distortion correction coordinate system in the process of step S21. Determine.
Specifically, in the present embodiment, it is determined whether or not both the inequalities expressed by the following expressions (4) and (5) are satisfied.

x0 ≦ xi ≦ x1 ・・・(4)
y0 ≦ yi ≦ y1 ・・・(5)
x0 ≦ xi ≦ x1 (4)
y0 ≦ yi ≦ y1 (5)

式(4)と式(5)とのうち少なくとも一方の不等式が満たされない場合とは、注目画素位置の変形補正後座標(xi,yi)がAF検波領域内に含まれない場合を意味する。
このような場合、ステップS24においてNOであると判定されて、ステップS25の処理は実行されずに、即ち、ステップS23の処理で取得されたAF検波値Fltは積算されずに、処理はステップS26に進む。
The case where at least one of the inequalities of Expressions (4) and (5) is not satisfied means that the coordinates (xi, yi) after the deformation correction of the target pixel position are not included in the AF detection area.
In such a case, it is determined as NO in Step S24, and the process of Step S25 is not executed, that is, the AF detection value Flt acquired in the process of Step S23 is not accumulated, and the process is performed in Step S26. Proceed to

これに対して、式(4)と式(5)と何れの不等式も満たされる場合とは、注目画素位置の変形補正後座標(xi,yi)がAF検波領域内に含まれる場合を意味する。
このような場合、ステップS24においてYESであると判定されて、処理はステップS25に進む。
ステップS25において、ブロック積分部163は、これまでの積分値Sumに対して、ステップS23の処理で取得したAF検波値Fltを積算し、その積算値を新たな積分値Sumとする(Sum=Sum+Flt)。
On the other hand, the case where both inequalities (4) and (5) are satisfied means that the coordinates (xi, yi) after the deformation correction of the target pixel position are included in the AF detection area. .
In such a case, it is determined as YES in Step S24, and the process proceeds to Step S25.
In step S25, the block integration unit 163 integrates the AF detection value Flt acquired in the process of step S23 with the previous integration value Sum, and sets the integration value as a new integration value Sum (Sum = Sum + Flt). ).

このようにして、ステップS25の処理が終了するか、又はステップS24の処理でNOであると判定されると、処理はステップS26に進む。ステップS26において、ブロック積分部163は、1フレーム分の処理が終了したか否かを判定する。   In this way, when the process of step S25 ends or when it is determined NO in the process of step S24, the process proceeds to step S26. In step S26, the block integrator 163 determines whether or not the processing for one frame has been completed.

注目画素位置が、CMOSセンサ115においてフレーム内の最後に走査される画素の位置でない場合、即ち右下端の画素でない場合、ステップS26においてNOであると判定されて、処理はステップS27に進む。
ステップS27において、ブロック積分部163は、注目画素位置を走査方向に1画素分ずらす。これにより、処理はステップS23に戻され、それ以降の処理が繰り返される。
When the target pixel position is not the position of the pixel scanned last in the frame in the CMOS sensor 115, that is, when it is not the pixel at the lower right corner, it is determined as NO in Step S26, and the process proceeds to Step S27.
In step S27, the block integrator 163 shifts the target pixel position by one pixel in the scanning direction. Thereby, a process is returned to step S23 and the process after it is repeated.

即ち、CMOSセンサ115から前処理部116を介して入力される歪曲RAW201の各輝度成分の各々が、注目画素位置の輝度成分としてY生成部161により順次生成されてブロック積分部163に順次出力される毎に、ステップS23乃至S27のループ処理が繰り返される。
これにより、AF検波領域内の各輝度成分の各々に対応するAF検波値FLtが順次積分されて、積分値Sumが更新されていく。
そして、CMOSセンサ115においてフレーム内の最後に走査される画素の位置が注目画素位置になって、ステップS24の処理でNOであると判定されるか、或いは、ステップS25の処理が実行されると、次のステップS26においてYESであると判定されて、処理はステップS28に進む。
That is, each luminance component of the distortion RAW 201 input from the CMOS sensor 115 via the preprocessing unit 116 is sequentially generated by the Y generation unit 161 as the luminance component at the target pixel position and sequentially output to the block integration unit 163. Each time, the loop process of steps S23 to S27 is repeated.
As a result, the AF detection values FLt corresponding to the respective luminance components in the AF detection region are sequentially integrated, and the integration value Sum is updated.
Then, when the position of the pixel scanned last in the frame in the CMOS sensor 115 becomes the target pixel position, it is determined NO in the process of step S24, or the process of step S25 is executed. Then, it is determined as YES in the next step S26, and the process proceeds to step S28.

ステップS28において、ブロック積分部163は、積分値Sumを、AF評価値として検出する。   In step S28, the block integrator 163 detects the integration value Sum as an AF evaluation value.

このようにして検出されたAF評価値がCPU120に取得されると、処理はステップS29に進む。
ステップS29において、CPU120は、当該AF評価値を用いて、レンズ制御及びAF枠表示制御を実行する。
これにより、AF処理は終了となる。
When the AF evaluation value detected in this way is acquired by the CPU 120, the process proceeds to step S29.
In step S29, the CPU 120 executes lens control and AF frame display control using the AF evaluation value.
As a result, the AF process ends.

以上説明したAF処理は、所定間隔毎に繰り返し実行される。その結果、AF評価値が一番高くなる位置にフォーカスレンズが移動する。そして、ライブビュー画像上のAF枠のうち、合焦しているAF枠が、合焦していないAF枠とは異なる表示形態で表示される。
図5は、ライブビュー画像上のAF枠の表示例を示している。
図5に示すように、ライブビュー画像203は、補正YUV203の上に、複数のAF枠272が重畳されて構成される。
これらの複数のAF枠272のうち、合焦しているAF枠272Fが、合焦していないAF枠272Nとは異なる表示形態で表示される。
なお、合焦しているAF枠272Fの表示形態は、合焦していないAF枠272Nと区別してユーザが視認できる表示形態であれば足り、例えば、図5に示すように太線で表示してもよいし、線の色を変えて表示してもよい。
The AF process described above is repeatedly executed at predetermined intervals. As a result, the focus lens moves to a position where the AF evaluation value is highest. Of the AF frames on the live view image, the focused AF frame is displayed in a different display form from the unfocused AF frame.
FIG. 5 shows a display example of the AF frame on the live view image.
As shown in FIG. 5, the live view image 203 is configured by superimposing a plurality of AF frames 272 on the corrected YUV 203.
Of these AF frames 272, the AF frame 272F that is in focus is displayed in a different display form from the AF frame 272N that is not in focus.
The display form of the AF frame 272F that is in focus is sufficient as long as it is distinguishable from the AF frame 272N that is not in focus and can be viewed by the user. For example, the AF frame 272F is displayed with a thick line as shown in FIG. Alternatively, the line color may be changed for display.

以上説明した内容をまとめると、本実施形態に係る撮像装置100は、コントラストAF方式にてAF処理を実行すべく、図1に示すように、光学レンズ装置111と、CMOSセンサ115と、信号処理部118と、CPU120と、を備えている。
CMOSセンサ115は、光学レンズ装置111により第1の座標系の平面(歪曲補正前座標系の受光面)において結像する際に歪曲が生じた画像を原画像として撮像し、その原画像のデータ(歪曲RAW201)を出力する。
CPU120は、原画像に対して歪曲補正が施された結果得られる補正画像(補正YUV203)の第2の座標系(歪曲補正後座標系)で、合焦すべき範囲であるAF検波領域を設定する。
AF検波部151は、原画像のデータのうち、第2の座標系で表現された画素位置がAF検波領域内に含まれる1以上の画素のデータに基づいて、AF評価値を算出する。
In summary, the imaging apparatus 100 according to the present embodiment performs an AF process using the contrast AF method, as illustrated in FIG. 1, the optical lens apparatus 111, the CMOS sensor 115, and the signal processing. Unit 118 and CPU 120.
The CMOS sensor 115 captures, as an original image, an image that is distorted when the optical lens device 111 forms an image on the plane of the first coordinate system (the light receiving surface of the coordinate system before distortion correction), and the original image data. (Distortion RAW 201) is output.
The CPU 120 sets an AF detection area which is a range to be focused in the second coordinate system (post-distortion coordinate system) of the corrected image (corrected YUV 203) obtained as a result of performing distortion correction on the original image. To do.
The AF detection unit 151 calculates an AF evaluation value based on data of one or more pixels in which pixel positions expressed in the second coordinate system are included in the AF detection area in the original image data.

このような本実施形態に係る撮像装置100は、AFの設定をより正確に行うことができる。
即ち、AF検波領域を第2の座標系で表わす一方で、原画像の各画素の画素位置を第1の座標系で表わした状態で、AF検波を行うと、[発明が解決しようとする課題]で上述したように、AF枠に対応して設定される実際のAF検波領域と、理想的なAF検波領域との間にズレが生じる。即ち、AF検波領域を適切に設定することができない。
従って、AF検波領域を適切に設定するためには、AF検波領域と、原画像の各画素の画素位置との座標系をあわせる必要がある。
しかしながら、特許文献1のように、AF検波領域と、原画像の各画素の画素位置とを第1の座標系であわせると、AF検波領域の形状は、図3の奥側の歪曲YUV202上に便宜的に描画された歪曲したAF枠271の形状と同様に、歪曲したものとなる。このような歪曲されたAF検波領域内に画素が含まれるか否かの判断は煩雑なものとなるため、正確なAF評価値を求めることは困難になる。即ち、正確なAFの設定は困難になる。
これに対して、本実施の形態では、AF検波領域と、原画像の各画素の画素位置とを第2の座標系であわせるため、AF検波領域の形状は、図3の手前側の補正YUV203上に便宜的に描画された矩形のAF枠272の形状と同様に、矩形等の簡素な形状とすることができる。このような簡素な形状のAF検波領域内に画素が含まれるか否かの判断は非常に容易なものとなる。具体的には本実施形態では、上述した式(4)と式(5)で示される不等式を両方とも満たすか否かといった非常に容易な判定処理が実行される。これにより、より正確なAF評価値を求めることが可能になり、その結果、より正確なAFの設定が可能になる。
Such an imaging apparatus 100 according to the present embodiment can perform AF setting more accurately.
That is, when AF detection is performed in a state in which the AF detection area is represented by the second coordinate system while the pixel position of each pixel of the original image is represented by the first coordinate system, the problem to be solved by the invention is as follows. ], As described above, a deviation occurs between the actual AF detection area set corresponding to the AF frame and the ideal AF detection area. That is, the AF detection area cannot be set appropriately.
Therefore, in order to appropriately set the AF detection area, it is necessary to match the coordinate system of the AF detection area and the pixel position of each pixel of the original image.
However, as in Patent Document 1, when the AF detection area and the pixel position of each pixel of the original image are matched in the first coordinate system, the shape of the AF detection area is on the distortion YUV 202 on the back side in FIG. Similar to the shape of the distorted AF frame 271 drawn for convenience, it is distorted. Since it is complicated to determine whether or not a pixel is included in such a distorted AF detection area, it is difficult to obtain an accurate AF evaluation value. That is, accurate AF setting becomes difficult.
On the other hand, in the present embodiment, the AF detection area and the pixel position of each pixel of the original image are matched with each other in the second coordinate system. Therefore, the shape of the AF detection area is the corrected YUV 203 on the near side in FIG. Similar to the shape of the rectangular AF frame 272 drawn for convenience, the shape can be a simple shape such as a rectangle. It is very easy to determine whether or not a pixel is included in such a simple AF detection area. Specifically, in the present embodiment, a very easy determination process is executed, such as whether or not both the inequalities expressed by the above-described equations (4) and (5) are satisfied. As a result, a more accurate AF evaluation value can be obtained, and as a result, more accurate AF setting can be performed.

なお、本発明は上述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。   In addition, this invention is not limited to the above-mentioned embodiment, The deformation | transformation in the range which can achieve the objective of this invention, improvement, etc. are included in this invention.

例えば、上述の実施形態では、AF検波に用いられる検波値は、撮像画像を構成する全画素について取得され、取得された全画素分の検波値のうち、AF検波領域に属する画素の検波値のみが積分されることによってAF評価値が算出された。しかしながら、AF評価値の算出手法は、特にこれに限定されない。
例えば、AF検波領域内の画素についてのみ検波値を取得して、それらを積分することによってAF評価値を算出するようにしてもよい。この場合のAF処理は、上述した実施形態の図4のAF処理と比較すると、例えば次のようになる。
即ち、図4のステップS21及びS22と等価な処理が実行された後、ステップS23に対応する処理として、注目画素位置の変形補正後座標(xi,yi)を取得する処理が実行される。即ち、この時点では、注目画素位置の検波値Fltは取得されない。
そして、ステップS24の枠内判定でYESであると判定された場合、即ち、AF検波領域内に注目画素位置が存在する場合、注目画素位置の検波値Fltが取得される。そして、ステップS25と等価な処理で、取得された検波値Fltの積算が実行される。これにより、ステップS26以降の処理と等価な処理が実行される。
これに対して、ステップS24の枠内判定でNOであると判定された場合、即ち、注目画素位置がAF検波領域外である場合、注目画素位置の検波値Fltは取得されず、その結果、検波値Fltの積算も実行されずに、処理はステップS26以降の処理と等価な処理が実行される。
なお、ステップS26以降の処理と等価な処理については、その説明は省略する。
For example, in the above-described embodiment, the detection values used for AF detection are acquired for all the pixels constituting the captured image, and only the detection values of pixels belonging to the AF detection area among the acquired detection values for all the pixels. Was integrated to calculate an AF evaluation value. However, the AF evaluation value calculation method is not particularly limited to this.
For example, the AF evaluation value may be calculated by acquiring the detection values only for the pixels in the AF detection region and integrating them. The AF process in this case is, for example, as follows when compared with the AF process of FIG.
That is, after processing equivalent to steps S21 and S22 in FIG. 4 is executed, processing for obtaining the post-deformation correction coordinates (xi, yi) of the target pixel position is executed as processing corresponding to step S23. That is, at this time, the detection value Flt at the target pixel position is not acquired.
If it is determined as YES in the frame determination in step S24, that is, if the target pixel position exists in the AF detection area, the detection value Flt of the target pixel position is acquired. Then, integration of the acquired detection value Flt is executed by a process equivalent to step S25. Thereby, the process equivalent to the process after step S26 is performed.
On the other hand, when it is determined as NO in the determination in step S24, that is, when the target pixel position is outside the AF detection region, the detection value Flt of the target pixel position is not acquired, and as a result, The integration of the detection value Flt is not executed, and the processing is equivalent to the processing after step S26.
Note that a description of processing equivalent to the processing after step S26 is omitted.

また例えば、上述の実施形態では、光学レンズの影響による画像の歪曲の仕方は、説明の簡略上固定としていたが、光学レンズの状況に応じて異なる場合がある。例えばズームレンズの位置、即ちズーム値に応じて、歪曲の仕方が異なる場合がある。
このような場合には、例えばズーム値等光学レンズの状況を検出し、その検出結果に基づいて、歪曲補正の仕方や補正量を変化させるようにしてもよい。
同様に、歪曲補正前座標系で示される注目画素位置の座標を、歪曲補正後座標系の座標、即ち変形補正後座標に変換する場合の変換の仕方や変化量も、ズーム値等光学レンズの状況の検出結果に基づいて変化させるようにしてもよい。
Further, for example, in the above-described embodiment, the method of distortion of the image due to the influence of the optical lens is fixed for simplicity of explanation, but may be different depending on the situation of the optical lens. For example, there is a case where the method of distortion differs depending on the position of the zoom lens, that is, the zoom value.
In such a case, for example, the state of the optical lens such as a zoom value may be detected, and the distortion correction method and the correction amount may be changed based on the detection result.
Similarly, the conversion method and change amount when the coordinates of the target pixel position indicated in the coordinate system before distortion correction are converted to the coordinates after the distortion correction coordinate system, that is, the coordinates after deformation correction are also the same as those of the optical lens such as the zoom value. You may make it change based on the detection result of a condition.

また例えば、上述の実施形態では、撮像素子として、CMOSセンサ115が採用されていた。しかしながら、本発明が適用可能な撮像素子は、任意の撮像素子を採用することができる。   For example, in the above-described embodiment, the CMOS sensor 115 is employed as the image sensor. However, any image sensor can be adopted as the image sensor to which the present invention can be applied.

また例えば、上述した実施形態では、本発明が適用される撮像装置は、デジタルカメラとして構成される例として説明した。しかしながら、本発明は、デジタルカメラに特に限定されず、光学レンズによる撮像機能を有する電子機器一般に適用することができる。具体的には例えば、本発明は、ビデオカメラ、携帯型ナビゲーション装置、ポータブルゲーム機等に適用可能である。   For example, in the above-described embodiment, the imaging apparatus to which the present invention is applied has been described as an example configured as a digital camera. However, the present invention is not particularly limited to a digital camera, and can be applied to general electronic devices having an imaging function using an optical lens. Specifically, for example, the present invention is applicable to a video camera, a portable navigation device, a portable game machine, and the like.

上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。   The series of processes described above can be executed by hardware or can be executed by software.

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、コンピュータ等にネットワークや記録媒体からインストールされる。コンピュータは、専用のハードウェアに組み込まれているコンピュータであってもよい。また、コンピュータは、各種のプログラムをインストールすることで、各種の機能を実行することが可能なコンピュータ、例えば汎用のパーソナルコンピュータであってもよい。   When a series of processing is executed by software, a program constituting the software is installed on a computer or the like from a network or a recording medium. The computer may be a computer incorporated in dedicated hardware. The computer may be a computer capable of executing various functions by installing various programs, for example, a general-purpose personal computer.

このようなプログラムを含む記録媒体は、図示はしないが、ユーザにプログラムを提供するために装置本体とは別に配布されるリムーバブルメディアにより構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される記録媒体等で構成される。リムーバブルメディアは、例えば、磁気ディスク(フロッピディスクを含む)、光ディスク、又は光磁気ディスク等により構成される。光ディスクは、例えば、CD−ROM(Compact Disk−Read Only Memory),DVD(Digital Versatile Disk)等により構成される。光磁気ディスクは、MD(Mini−Disk)等により構成される。また、装置本体に予め組み込まれた状態でユーザに提供される記録媒体は、例えば、プログラムが記録されている図1のROM122や、図示せぬハードディスク等で構成される。   Although not shown, the recording medium including such a program is not only constituted by a removable medium distributed separately from the apparatus main body in order to provide a program to the user, but also in a state of being incorporated in the apparatus main body in advance. It is composed of a recording medium provided to the user. The removable medium is composed of, for example, a magnetic disk (including a floppy disk), an optical disk, a magneto-optical disk, or the like. The optical disk is composed of, for example, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versatile Disk), or the like. The magneto-optical disk is configured by an MD (Mini-Disk) or the like. In addition, the recording medium provided to the user in a state of being preinstalled in the apparatus main body includes, for example, the ROM 122 of FIG. 1 in which a program is recorded, a hard disk (not shown), and the like.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的或いは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in time series along the order, but is not necessarily performed in time series, either in parallel or individually. The process to be executed is also included.

100・・・画像処理装置、111・・・光学レンズ装置、112・・・AF機構、113・・・シャッタ装置、114・・・アクチュエータ、115・・・CMOSセンサ、116・・・前処理部、117・・・TG、118・・・信号処理部、119・・・DRAM、120・・・CPU、121・・・RAM、122・・・ROM、123・・・表示制御部、124・・・表示部、125・・・操作部、126・・・メモリカード、151・・・AF検波部、152・・・YUV生成部、153・・・歪曲補正部、161・・・Y生成部、162・・・AF検波フィルタ部、163・・・ブロック積分部、164・・・センサ座標供給部、165・・・座標変形補正部   DESCRIPTION OF SYMBOLS 100 ... Image processing apparatus, 111 ... Optical lens apparatus, 112 ... AF mechanism, 113 ... Shutter apparatus, 114 ... Actuator, 115 ... CMOS sensor, 116 ... Pre-processing part 117 ... TG, 118 ... Signal processing unit, 119 ... DRAM, 120 ... CPU, 121 ... RAM, 122 ... ROM, 123 ... Display control unit, 124 ... Display unit 125 ... Operation unit 126 ... Memory card 151 ... AF detection unit 152 ... YUV generation unit 153 ... Distortion correction unit 161 ... Y generation unit 162: AF detection filter unit, 163: Block integration unit, 164: Sensor coordinate supply unit, 165: Coordinate deformation correction unit

Claims (7)

所定の収差が生ずる光学レンズを有した撮像装置において、
前記光学レンズにより歪曲が生じる画像を原画像として撮像し、当該原画像を出力する撮像手段と、前記撮像手段により出力された前記原画像に対して歪曲補正をする補正手段と、
前記補正手段により歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定手段と、
前記撮像手段から出力された前記原画像のAF検波値を生成する生成手段と、
記AF検波値の位置を、前記原画像が属する第1の座標系の位置から前記補正画像が属する第2の座標系の位置に変換する変換手段と、
前記変換手段により座標系を変換させられた原画像と補正画像とを用いて、前記補正手段により歪曲補正される前の原画像のAF検波値のうち、前記設定手段により設定された合焦すべき範囲内に含まれる前記第2の座標系の位置における前記AF検波値から当該合焦すべき範囲内のAF評価値を算出するAF評価値算出手段と、
を備えることを特徴とする撮像装置。
In an imaging apparatus having an optical lens in which a predetermined aberration occurs,
An imaging unit that captures an image in which distortion is caused by the optical lens as an original image, and outputs the original image; a correction unit that corrects distortion for the original image output by the imaging unit;
Setting means for setting a range to be focused on a corrected image obtained as a result of distortion correction by the correcting means;
Generating means for generating an AF detection value of the original image output from the imaging means;
Conversion means for converting pre-Symbol the position of the AF detection value, the position of the second coordinate system the corrected image belongs from the position of the first coordinate system in which the original image belongs,
Using the original image whose coordinate system has been converted by the converting means and the corrected image, out of the AF detection values of the original image before distortion correction by the correcting means, the focus set by the setting means is focused. AF evaluation value calculating means for calculating an AF evaluation value within the range to be focused from the AF detection value at the position of the second coordinate system included within the power range;
An imaging apparatus comprising:
前記第2の座標系におけるAF検波値の位置が前記合成すべき範囲に含まれるか否かを判定する判定手段を更に備え、
前記AF評価値算出手段は、前記判定手段により前記合成すべき範囲に含まれると判定されたAF検波値を用いて、前記AF評価値を算出することを特徴とする請求項1に記載の撮像装置。
Determination means for determining whether or not the position of the AF detection value in the second coordinate system is included in the range to be combined;
The AF evaluation value calculating means uses the AF detection value is determined to be included in the range to be the synthesis by the determination means, the image pickup according to claim 1, characterized in that to calculate the AF evaluation value apparatus.
画像を表示する表示手段と、
前記補正画像に対して、前記設定手段により設定された前記合焦すべき範囲を示す矩形の枠を前記表示手段に重畳させて表示するよう制御する表示制御手段と、
をさらに備えることを特徴とする請求項1又は2に記載の撮像装置。
Display means for displaying an image;
Display control means for controlling the correction image so as to superimpose and display a rectangular frame indicating the range to be focused set by the setting means on the display means;
The imaging apparatus according to claim 1 or 2, further comprising a.
前記AF評価値算出手段により算出されたAF評価値に基づいて、前記光学レンズの合焦制御を実行する合焦制御手段と、
をさらに備えることを特徴とする請求項1乃至の何れか1項に記載の撮像装置。
Focusing control means for performing focusing control of the optical lens based on the AF evaluation value calculated by the AF evaluation value calculating means;
The imaging apparatus according to any one of claims 1 to 3, further comprising a.
本撮像装置は、コントラストAF方式で合焦を行うことを特徴とする請求項1乃至4の何れか1項に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the imaging apparatus performs focusing by a contrast AF method. AF評価値を算出するAF評価値算出方法において、
光学レンズにより歪曲が生じた状態で撮像手段により撮像された画像を原画像として取得する取得ステップと、
前記原画像に対して歪曲補正をする補正ステップと、
歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定ステップと、
前記撮像手段から出力された前記原画像のAF検波値を生成する生成ステップと、
前記AF検波値の位置を、前記原画像が属する第1の座標系の位置から前記補正画像が属する第2の座標系の位置に変換する変換ステップと、
前記変換手段により座標系を変換させられた原画像と補正画像とを用いて、歪曲補正される前の原画像のAF検波値のうち、設定された合焦すべき範囲内に含まれる前記第2の座標系の位置における前記AF検波値から当該合焦すべき範囲内のAF評価値を算出するAF評価値算出ステップと、
を含むことを特徴とするAF評価値算出方法。
In an AF evaluation value calculation method for calculating an AF evaluation value,
An acquisition step of acquiring, as an original image, an image picked up by the image pickup means in a state where distortion is caused by the optical lens;
A correction step for correcting distortion of the original image;
A setting step for setting a range to be focused on a corrected image obtained as a result of distortion correction;
A generation step of generating an AF detection value of the original image output from the imaging means;
A conversion step of converting the position of the AF detection value from the position of the first coordinate system to which the original image belongs to the position of the second coordinate system to which the correction image belongs;
Using the original image obtained by converting the coordinate system by the converting means and the corrected image, the AF detection value of the original image before distortion correction is included in the set range to be focused . An AF evaluation value calculating step for calculating an AF evaluation value within the range to be focused from the AF detection value at the position of the coordinate system of 2 ;
A method for calculating an AF evaluation value, comprising:
コンピュータを、
光学レンズにより歪曲が生じた状態で撮像手段により撮像された画像を原画像として取得する取得手段、
前記原画像に対して歪曲補正をする補正手段、 前記補正手段により歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定手段、
前記撮像手段から出力された前記原画像のAF検波値を生成する生成手段、
前記AF検波値の位置を、前記原画像が属する第1の座標系の位置から前記補正画像が属する第2の座標系の位置に変換する変換手段、
前記変換手段により座標系を変換させられた原画像と補正画像とを用いて、前記補正手段により歪曲補正される前の原画像のAF検波値のうち、前記設定手段により設定された合焦すべき範囲内に含まれる前記第2の座標系の位置における前記AF検波値から当該合焦すべき範囲内のAF評価値を算出するAF評価値算出手段、
として機能させることを特徴とするプログラム。
Computer
An acquisition means for acquiring an image captured by the imaging means in a state where distortion is caused by the optical lens as an original image;
Correction means for performing distortion correction on the original image; setting means for setting a range to be focused on a corrected image obtained as a result of distortion correction by the correction means;
Generating means for generating an AF detection value of the original image output from the imaging means;
Converting means for converting the position of the AF detection value, the position of the second coordinate system the corrected image belongs from the position of the first coordinate system in which the original image belongs,
Using the original image whose coordinate system has been converted by the converting means and the corrected image, out of the AF detection values of the original image before distortion correction by the correcting means, the focus set by the setting means is focused. An AF evaluation value calculating means for calculating an AF evaluation value within the range to be focused from the AF detection value at the position of the second coordinate system included within the power range;
A program characterized by functioning as
JP2010081569A 2010-03-31 2010-03-31 Imaging apparatus, AF evaluation value calculation method, and program Expired - Fee Related JP5999746B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010081569A JP5999746B2 (en) 2010-03-31 2010-03-31 Imaging apparatus, AF evaluation value calculation method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010081569A JP5999746B2 (en) 2010-03-31 2010-03-31 Imaging apparatus, AF evaluation value calculation method, and program

Publications (2)

Publication Number Publication Date
JP2011215258A JP2011215258A (en) 2011-10-27
JP5999746B2 true JP5999746B2 (en) 2016-09-28

Family

ID=44945076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010081569A Expired - Fee Related JP5999746B2 (en) 2010-03-31 2010-03-31 Imaging apparatus, AF evaluation value calculation method, and program

Country Status (1)

Country Link
JP (1) JP5999746B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6016622B2 (en) * 2012-12-26 2016-10-26 キヤノン株式会社 Imaging apparatus, control method therefor, and program
JP6395156B2 (en) * 2015-01-16 2018-09-26 オリンパス株式会社 Imaging apparatus and imaging method
JP2016134686A (en) * 2015-01-16 2016-07-25 オリンパス株式会社 Imaging apparatus and imaging method
CN105812653B (en) * 2015-01-16 2019-05-10 奥林巴斯株式会社 Photographic device and image capture method
JP2017009815A (en) * 2015-06-23 2017-01-12 オリンパス株式会社 Focus detection device, focus detection method, and camera system
JP7271316B2 (en) * 2019-05-31 2023-05-11 キヤノン株式会社 Imaging device and its control method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4953770B2 (en) * 2006-11-02 2012-06-13 キヤノン株式会社 Imaging device
JP5020894B2 (en) * 2008-06-10 2012-09-05 キヤノン株式会社 Image processing apparatus, control method, and program

Also Published As

Publication number Publication date
JP2011215258A (en) 2011-10-27

Similar Documents

Publication Publication Date Title
JP5999746B2 (en) Imaging apparatus, AF evaluation value calculation method, and program
JP5421647B2 (en) Imaging apparatus and control method thereof
US20130063555A1 (en) Image processing device that combines a plurality of images
JP4732303B2 (en) Imaging device
JP5448621B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2013029656A (en) Image pickup apparatus
US9398207B2 (en) Imaging apparatus and image correction method, and image processing apparatus and image processing method
JP5398612B2 (en) Moving object detection apparatus and method
JP4953770B2 (en) Imaging device
JP6016622B2 (en) Imaging apparatus, control method therefor, and program
JP2011066827A (en) Image processing apparatus, image processing method and program
JP5267279B2 (en) Image composition apparatus and program
JP6362070B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JP6071761B2 (en) Imaging apparatus and control method thereof
JP2012173334A (en) Defocus quantity detection device and electronic camera
JP5938842B2 (en) Imaging apparatus, AF evaluation value calculation method, and program
JP6727973B2 (en) Image processing apparatus and control method thereof
JP2014003417A (en) Image pickup device
JP7271316B2 (en) Imaging device and its control method
US20230281776A1 (en) Image processing apparatus and control method therefor
JP4143395B2 (en) Imaging apparatus, autofocus method, program, and storage medium
JP2012103285A (en) Focus detecting device and method for controlling the same
JP5944246B2 (en) Imaging device
JP2011044965A (en) Imaging apparatus, imaging method and computer program
JP2010278701A (en) Image combining device, and image combining method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130328

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140305

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140826

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141125

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20141202

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20150206

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160520

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160825

R150 Certificate of patent or registration of utility model

Ref document number: 5999746

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees