JP5999746B2 - Imaging apparatus, AF evaluation value calculation method, and program - Google Patents
Imaging apparatus, AF evaluation value calculation method, and program Download PDFInfo
- 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
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.
しかしながら、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)
CMOSセンサ11は、図示せぬ所定の収差が生ずる光学レンズによりその受光面に結像される際に歪曲が生じた画像を撮像し、その撮像画像の画像信号を、画素単位で走査方向の順番で順次出力する。
The
前処理部12は、CMOSセンサ11から順次出力される画素単位の画像信号を、黒レベルの補正等の前処理を実行した上で、AF検波部13とメモリ14とにそれぞれ供給する。
The preprocessing
AF検波部13は、Y生成部31と、AF検波フィルタ部32と、ブロック積分部33と、センサ座標供給部34と、を備えている。
The
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
The AF
The
The sensor
このように、AF検波部13は、CMOSセンサ11から出力されて前処理部12を介して供給される撮像画像の画像信号、即ち、後述する歪曲補正部16により歪曲補正がなされる前の画像信号に対して、AF検波を実行する。
As described above, the
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
Here, the digital image signal is hereinafter referred to as “data”. An aggregate of one-pixel data output from the
That is, the
YUV生成部15は、歪曲RAW51をメモリ14から読み出して、輝度信号(Y)と、青色成分の差分信号(U)と、赤色成分の差分信号(V)との3要素からなるフレーム画像データ52を生成し、メモリ14に記憶させる。
ここで、フレーム画像データ52には依然として歪曲が生じている。そこで、このようなフレーム画像データ52を、以下、「歪曲YUV52」と呼ぶ。
The
Here, the
歪曲補正部16は、歪曲YUV52をメモリ14から読み出して、歪曲補正を行い、その結果得られるフレーム画像データを、補正YUV53としてメモリ14に記憶させる。
The
図7は、AF検波部13がAF検波を行う場合の、AF枠55と、歪曲YUV52との関係を示している。
FIG. 7 shows the relationship between the
AF検波は、図7に示す歪曲YUV52の座標系、即ち、歪曲補正前座標系で行われる。
しかしながら、図7に示すように、従来においては、歪曲補正後座標系のAF枠55に対応して実際のAF検波領域が設定される。即ち、正確なAF評価値を求めることは困難になるという問題があった。
AF detection is performed in the coordinate system of the
However, as shown in FIG. 7, in the prior art, an actual AF detection area is set corresponding to the
本発明は、このような状況に鑑みてなされたものであり、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:
本発明の第5の観点によると、
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
本発明の第6の観点によると、
コンピュータを、
光学レンズにより歪曲が生じた状態で撮像手段により撮像された画像を原画像として取得する取得手段、
前記原画像に対して歪曲補正をする補正手段、 前記補正手段により歪曲補正された結果得られる補正画像に対して、合焦すべき範囲を設定する設定手段、
前記撮像手段から出力された前記原画像の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.
以下、本発明の一実施形態を図面に基づいて説明する。 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
撮像装置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
光学レンズ装置111は、例えばフォーカスレンズやズームレンズ等で構成される。
フォーカスレンズは、CMOSセンサ115の受光面に被写体像を結像させるため光学レンズである。ズームレンズは、焦点距離を一定の範囲で自在に変化させる光学レンズである。
このような所定の収差が生ずる光学レンズによりCMOSセンサ115の受光面に被写体像が結像される際に、上述した歪曲が生じる。
The
The focus lens is an optical lens for forming a subject image on the light receiving surface of the
When the subject image is formed on the light receiving surface of the
AF機構112は、AF評価値に基づくCPU120の制御に従って、フォーカスレンズを移動させることで、AF枠内の被写体にフォーカス(焦点)を合わせる。なお、以下、このようなCPU120の制御を、「レンズ制御」と呼ぶ。
The
シャッタ装置113は、例えばシャッタ羽根等から構成される。シャッタ装置113は、CMOSセンサ115へ入射する光束を遮断する機械式のシャッタとして機能する。シャッタ装置113はまた、CMOSセンサ115へ入射する光束の光量を調節する絞りとしても機能する。
The
アクチュエータ114は、CPU120の制御に従って、シャッタ装置113のシャッタ羽根を開閉させる。
The
CMOSセンサ115には、光学レンズ装置111からシャッタ装置113を介して、歪曲が生じた被写体像が入射される。そこで、CMOSセンサ115は、TG117から供給されるクロックパルスに従って、一定時間毎に被写体像を光電変換(撮像)して画像信号を画素毎に蓄積し、蓄積した画像信号を出力する。
A distorted subject image is incident on the
前処理部116は、TG117から供給されるクロックパルスに従って、CMOSセンサ115から順次出力される画素単位の画像信号を、黒レベルの補正等の前処理を実行した上で画像データとして、信号処理部118とDRAM119とにそれぞれ出力する。
The
TG117は、CPU120の制御に従って、一定時間毎にクロックパルスをCMOSセンサ115と前処理部116とにそれぞれ供給する。
The
信号処理部118は、例えばDSP(Digital Signal Processor)等で構成される。信号処理部118は、CPU120の制御に従って、前処理部116から供給された画像データやDRAM119に記憶された画像データ等の各種デジタル信号を処理対象として、各種各様の信号処理を実行する。
例えば、信号処理部118は、AF検波を実行する。AF検波の詳細については、図2以降の図面を参照して後述する。
The
For example, the
DRAM119は、前処理部116から供給された画像データや信号処理部118により信号処理が実行された後の画像データを一時的に記憶する。この場合のDRAM119の記録の単位は、フレーム画像データとなる。
The
CPU120は、撮像装置100全体の動作を制御する。
RAM121は、CPU120が各処理を実行する際にワーキングエリアとして機能する。
ROM122は、撮像装置100が各処理を実行するのに必要なプログラムやデータを記憶する。
CPU120は、RAM121をワーキングエリアとして、ROM122に記憶されているプログラムとの協働により各種処理を実行する。
The
The
The
The
例えば、CPU120は、撮像画像の記録処理の前等の所定のタイミングで、CMOSセンサ115の撮像動作を継続させ、その間に信号処理部118により逐次生成されるフレーム画像データ(後述する図2の補正YUV203等)を、DRAM119に一時的に記憶させる。なお、以下、かかるCPU120の一連の処理を、「スルー撮像」と呼ぶ。
For example, the
また、CPU120は、表示制御部123を制御して、スルー撮像時にDRAM119に記録された各フレーム画像データ(後述する図2の補正YUV203等)を順次読み出して、各々に対応するフレーム画像を表示部124に表示させる。なお、以下、かかるCPU120の一連の処理を、「スルー表示」と呼ぶ。また、スルー表示されているフレーム画像を、「スルー画像」又は、上述したように「ライブビュー画像」と呼ぶ。
Further, the
換言すると、表示制御部123は、CPU120の制御に従って、DRAM119やメモリカード126に記憶されているフレーム画像データ(後述する図2の補正YUV203等)を読み出して、対応するフレーム画像を表示部124に表示させる。
In other words, the
CPU120は、さらに、AF枠を設定して、表示制御部123を制御して、ライブビュー画像の上に表示させることもできる(後述する図5参照)。この場合、CPU120は、歪曲補正後座標系のAF枠により囲まれる領域を、AF検波領域として設定する。
そして、CPU120は、信号処理部118を制御して、AF検波を実行する。AF検波の詳細については、図2以降の図面を参照して後述する。
Further, the
Then, the
操作部125は、ユーザによる各種ボタンの操作を受け付ける。操作部125は、例えば電源釦、十字釦、決定釦、メニュー釦、レリーズ釦等を備える。
操作部125は、受け付けた各種ボタンの操作に対応する信号を、CPU120に供給する。CPU120は、操作部125からの信号に基づいてユーザの操作内容を解析し、その操作内容に応じた処理を実行する。
例えば、撮像画像の記録の指示操作が割り当てられた釦が押下された場合、CPU120は、記録の指示があったと解釈し、後述する補正YUV203をメモリカード126等に記録させる。
The
The
For example, when a button to which an instruction operation for recording a captured image is assigned is pressed, the
換言すると、メモリカード126は、このようなCPU120の記録制御によって、補正YUV203等を記録する。メモリカード126はまた、必要に応じて各種データを記録する。
In other words, the
図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
撮像装置100の信号処理部118は、AF検波部151と、YUV生成部152と、歪曲補正部153と、を備えている。
The
ここで、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
Therefore, each of the distorted
Therefore, in the following, these descriptions will be omitted as appropriate, and mainly the
AF検波部151は、Y生成部161と、AF検波フィルタ部162と、ブロック積分部163と、センサ座標供給部164と、座標変形補正部165と、を備えている。
The
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
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
The
センサ座標供給部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
That is, the data of each pixel constituting the distorted
Therefore, the sensor coordinate
ここで、CMOSセンサ115の座標系は歪曲補正前座標系であるのに対して、AF枠が設定される座標系は歪曲補正後座標系である。
そこで、座標変形補正部165は、歪曲補正前座標系で示される注目画素位置の座標を、歪曲補正後座標系の座標、即ち、補正YUV203の座標(以下、「変形補正後座標」と呼ぶ)に変換する。
注目画素位置の変形補正後座標は、ブロック積分部163に供給される。すると、ブロック積分部163は、AF検波フィルタ部162から供給されたAF検波値が、AF検波領域内の画素に対応するものであるか否かを、座標変形補正部165から供給された注目画素位置の変形補正後座標に基づいて判断する。
Here, the coordinate system of the
Therefore, the coordinate
The coordinates after deformation correction of the target pixel position are supplied to the
以下、注目画素位置の変形補正後座標についてさらに詳しく説明する。 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
座標変形補正部165は、このような歪曲補正前座標系の注目画素位置の座標を、所定のアルゴリズムに従って変形補正後座標に変換する。
具体的には本実施形態では、次のようなアルゴリズムに従って、歪曲補正前座標系の注目画素位置の座標は、変形補正後座標に変換される。
The coordinate
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
ここで、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
A function for converting an actual image height ih to an ideal image height using a table stored in advance in the
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
図3は、座標変形補正部165による座標補正の処理と、AF枠との関係を模式的に示す図である。
FIG. 3 is a diagram schematically showing the relationship between the coordinate correction processing by the coordinate
図3において、矢印261と矢印262とは、CMOSセンサ115の走査順、即ち、ブロック積分部163に対する画素単位のAF検波値の入力順を示している。
In FIG. 3,
矢印261は、座標変形補正部165による座標補正前のCMOSセンサ115上の座標系、即ち歪曲補正前座標系における走査順を示している。従って、1つの矢印261が、歪曲補正前座標系における1つのライン位置を示している。
ここで、便宜上、矢印261は、歪曲補正前座標系で表わされる歪曲YUV202の上に図示されている。
An
Here, for the sake of convenience, the
一方、矢印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
That is, the coordinate
Such conversion is processing equivalent to distortion correction by the
That is, the
For this reason, the
このようにして、座標変形補正部165からは、歪曲補正後座標系で表わされる矢印262に沿って、注目画素位置の変形補正後座標(xi,yi)がブロック積分部163に順次供給されることになる。
In this way, the coordinate
ここで、ブロック積分部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
That is, the post-deformation corrected coordinates (xi, yi) of the target pixel position on the
In this case, from the viewpoint of the pre-distortion correction coordinate system on the
In other words, the processing of the
さらに、ブロック積分部163の処理と、特許文献1に記載の処理とでは次のような差異がある。
Furthermore, there is the following difference between the processing of the
即ち、特許文献1に記載の処理では、歪曲補正前の座標系における理想的な配置位置に存在するAF枠(図3の奥側の歪曲YUV202上の歪曲したAF枠55に相当)内の領域が、実際のAF検波領域として設定される。
この場合、実際のAF検波領域の形状は歪曲したものとなるため、左上端と右下端の座標だけで、実際のAF検波領域を表現することは不可能である。
従って、注目画素位置がAF検波領域内か否かを判定する処理は煩雑となり、その分だけ、正確なAF評価値を求めることは困難になる。即ち、正確なAFの設定は困難になる。
In other words, in the process described in
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
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
次に、図4を参照して、図2の機能的構成を有する撮像装置100が実行する処理のうち、AF処理について説明する。
Next, with reference to FIG. 4, an AF process among processes executed by the
図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
That is, the
The set AF frame is displayed on the
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
ステップ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
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
The AF
At this time, the coordinate
Therefore, in step S23, the
ステップS24において、ブロック積分部163は、ステップS23の処理で取得した注目画素位置の変形補正後座標(xi,yi)を用いて、枠内判定をする。
即ち、ブロック積分部163は、注目画素位置の変形補正後座標(xi,yi)が、ステップS21の処理で歪曲補正後座標系において設定された矩形のAF検波領域内に含まれているか否かを判定する。
具体的には本実施形態では、次の式(4)と式(5)で示される不等式を両方とも満たすか否かが判定される。
In step S24, the
That is, the
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
このようにして、ステップ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
注目画素位置が、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
In step S27, the
即ち、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
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
ステップS28において、ブロック積分部163は、積分値Sumを、AF評価値として検出する。
In step S28, the
このようにして検出されたAF評価値がCPU120に取得されると、処理はステップS29に進む。
ステップS29において、CPU120は、当該AF評価値を用いて、レンズ制御及びAF枠表示制御を実行する。
これにより、AF処理は終了となる。
When the AF evaluation value detected in this way is acquired by the
In step S29, the
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
Of these AF frames 272, the
The display form of the
以上説明した内容をまとめると、本実施形態に係る撮像装置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
The
The
The
このような本実施形態に係る撮像装置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
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
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
なお、本発明は上述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。 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
また例えば、上述した実施形態では、本発明が適用される撮像装置は、デジタルカメラとして構成される例として説明した。しかしながら、本発明は、デジタルカメラに特に限定されず、光学レンズによる撮像機能を有する電子機器一般に適用することができる。具体的には例えば、本発明は、ビデオカメラ、携帯型ナビゲーション装置、ポータブルゲーム機等に適用可能である。 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
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的或いは個別に実行される処理をも含むものである。 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
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:
前記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.
をさらに備えることを特徴とする請求項1乃至3の何れか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検波値を生成する生成ステップと、
前記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
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)
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)
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 |
-
2010
- 2010-03-31 JP JP2010081569A patent/JP5999746B2/en not_active Expired - Fee Related
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 |