JP6464553B2 - Lens drive control device, electronic camera, and lens drive control program - Google Patents

Lens drive control device, electronic camera, and lens drive control program Download PDF

Info

Publication number
JP6464553B2
JP6464553B2 JP2013245992A JP2013245992A JP6464553B2 JP 6464553 B2 JP6464553 B2 JP 6464553B2 JP 2013245992 A JP2013245992 A JP 2013245992A JP 2013245992 A JP2013245992 A JP 2013245992A JP 6464553 B2 JP6464553 B2 JP 6464553B2
Authority
JP
Japan
Prior art keywords
image
lens
focus
drive control
amount
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.)
Active
Application number
JP2013245992A
Other languages
Japanese (ja)
Other versions
JP2015102855A (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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2013245992A priority Critical patent/JP6464553B2/en
Publication of JP2015102855A publication Critical patent/JP2015102855A/en
Application granted granted Critical
Publication of JP6464553B2 publication Critical patent/JP6464553B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、レンズ駆動制御装置、電子カメラ及びレンズ駆動制御プログラムに関する。   The present invention relates to a lens drive control device, an electronic camera, and a lens drive control program.

従来、フォーカスレンズを光軸方向に移動させつつ各位置における画像のコントラスト値を求め、コントラスト値が最も高くなるレンズ位置をフォーカス位置として検出するオートフォーカス装置が知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, there is known an autofocus device that obtains a contrast value of an image at each position while moving a focus lens in the optical axis direction, and detects a lens position having the highest contrast value as a focus position (for example, Patent Document 1). reference).

特開平4−274405号公報JP-A-4-274405

しかしながら、従来のオートフォーカス装置では、フォーカスレンズを広範囲に亘って光軸方向に駆動させるため、フォーカス位置の検出に多大な時間を要するという問題があった。   However, the conventional autofocus device has a problem that it takes a long time to detect the focus position because the focus lens is driven in the optical axis direction over a wide range.

本発明は、このような事情に鑑みてなされたものであり、その目的は、画像を速やかに合焦させることができるレンズ駆動制御装置、電子カメラ及びレンズ駆動制御プログラムを提供することにある。   The present invention has been made in view of such circumstances, and an object thereof is to provide a lens drive control device, an electronic camera, and a lens drive control program capable of quickly focusing an image.

上記課題を解決するレンズ駆動制御装置は、画像から特定領域を抽出する領域抽出部と、前記領域抽出部が抽出した前記特定領域のエッジの色成分量に基づいて、前記特定領域の合焦状態を検出する合焦検出部と、前記合焦検出部によって検出された前記特定領域の合焦状態に基づいて、焦点調節を行うレンズの駆動を制御するレンズ駆動制御部と、前記特定領域を複数の分割領域に分割し、前記特定領域を含む分割領域の数に対する前記特定領域の前記エッジを含む前記分割領域の数の比に基づいて、前記合焦検出部による前記特定領域の合焦状態の検出結果の信頼度を算出する算出部とを備えた。 The lens drive control device that solves the above problems includes a region extraction unit that extracts a specific region from an image, and an in-focus state of the specific region based on a color component amount of an edge of the specific region extracted by the region extraction unit. A focus detection unit that detects a focus, a lens drive control unit that controls driving of a lens that performs focus adjustment based on a focus state of the specific region detected by the focus detection unit, and a plurality of the specific regions of divided into divided regions, based on the ratio of the number of the divided region including the edge of the specific area to the number of the divided region including the specific region, the focus state of the specific region by the focus detection unit And a calculation unit for calculating the reliability of the detection result.

また、上記レンズ駆動制御装置は、前記領域抽出部が抽出した前記特定領域の前記エッジを色成分毎に検出するエッジ検出部を更に備え、前記合焦検出部は、前記エッジ検出部が色成分毎に検出した前記特定領域の前記エッジの色成分量に基づいて前記特定領域の合焦状態を検出することが好ましい。   The lens drive control device further includes an edge detection unit that detects, for each color component, the edge of the specific region extracted by the region extraction unit, and the focus detection unit includes a color component that is detected by the edge detection unit. It is preferable to detect the in-focus state of the specific area based on the color component amount of the edge of the specific area detected every time.

また、上記レンズ駆動制御装置において、前記合焦状態は、画像が前記特定領域よりも近点側又は遠点側に合焦していることを示す方向指標を含み、前記レンズ駆動制御部は、前記合焦検出部によって検出された前記方向指標に基づいて前記レンズの駆動方向を設定することが好ましい。   Further, in the lens drive control device, the in-focus state includes a direction indicator indicating that the image is focused on the near point side or the far point side with respect to the specific region, and the lens drive control unit includes: It is preferable that the driving direction of the lens is set based on the direction indicator detected by the focus detection unit.

また、上記レンズ駆動制御装置において、前記合焦状態は、前記特定領域のデフォーカス量を更に含み、前記レンズ駆動制御部は、前記算出部が算出したが所定の閾値以上である場合、前記合焦検出部によって検出された前記デフォーカス量に基づいて、前記レンズの駆動量を設定すことが好ましい。 Further, in the lens drive control device, before Kigoase state further includes a defocus amount of the specific region, the lens driving control unit, if the value the calculation unit has calculated is not less than a predetermined threshold value, based on the defocus amount detected by the focus detection unit, it is preferable to set the drive amount of the lens.

また、上記レンズ駆動制御装置において、前記算出部が算出した値は、前記所定の閾値を第1の閾値とした場合、該第1の閾値よりも大きい閾値として第2の閾値が更に設定されており、前記レンズ駆動制御部は、前記算出部が算出したが前記第2の閾値以上である場合、前記合焦検出部によって検出された前記デフォーカス量に基づいて、画像を前記特定領域において合焦させるレンズの目標駆動量を算出し、算出した目標駆動量を前記レンズの駆動量として設定すことが好ましい。 In the lens drive control device, the value calculated by the calculation unit is further set to a second threshold value that is larger than the first threshold value when the predetermined threshold value is the first threshold value. And when the value calculated by the calculation unit is equal to or greater than the second threshold value , the lens drive control unit displays an image in the specific region based on the defocus amount detected by the focus detection unit. calculates a target drive amount of the lens focusing, it is preferable the calculated target driving amount to be set as the driving amount of said lens.

また、上記レンズ駆動制御装置において、前記レンズ駆動制御部は、前記算出部が算出したが前記第1の閾値以上であって且つ前記第2の閾値未満である場合、前記目標駆動量よりも小さい値を前記レンズの駆動量として設定すことが好ましい。 Further, in the lens drive control device, the lens drive control unit has a value greater than the target drive amount when the value calculated by the calculation unit is equal to or greater than the first threshold and less than the second threshold. it is preferable to set a smaller value as the drive amount of the lens.

また、上記レンズ駆動制御装置において、前記領域抽出部は、画像に対してラベリング処理を行うことにより前記特定領域を抽出することが好ましい。
また、上記レンズ駆動制御装置において、前記領域抽出部は、画像に対してパターン認識処理を行うことにより前記特定領域を抽出することが好ましい。
In the lens drive control device, it is preferable that the region extraction unit extracts the specific region by performing a labeling process on the image.
In the lens drive control device, it is preferable that the region extraction unit extracts the specific region by performing a pattern recognition process on the image.

また、上記レンズ駆動制御装置において、前記合焦検出部は、前記領域抽出部が画像から複数の前記特定領域を抽出した場合、複数の前記特定領域のうち画像の奥行方向において至近側に位置する前記特定領域の色成分量に基づいて前記特定領域の合焦状態を検出することが好ましい。   Further, in the lens drive control device, the focus detection unit is positioned on the closest side in the depth direction of the image among the plurality of specific regions when the region extraction unit extracts the plurality of specific regions from the image. It is preferable that the in-focus state of the specific area is detected based on the color component amount of the specific area.

また、上記課題を解決する電子カメラは、被写体を撮像する撮像部と、前記撮像部が撮像した被写体に応じた画像の焦点調節を行うレンズの駆動を制御する上記構成のレンズ駆動制御装置とを備えたことを特徴とする。   In addition, an electronic camera that solves the above problems includes an imaging unit that captures an image of a subject, and a lens drive control device configured as described above that controls driving of a lens that performs focus adjustment of an image corresponding to the subject imaged by the imaging unit. It is characterized by having.

また、上記課題を解決するレンズ駆動制御プログラムは、コンピュータに、画像から特定領域を抽出する領域抽出ステップと、前記領域抽出ステップにおいて抽出された前記特定領域のエッジの色成分量に基づいて、前記特定領域の合焦状態を検出する合焦検出ステップと、前記合焦検出ステップにおける前記特定領域の合焦状態の検出結果に基づいて、焦点調節を行うレンズの駆動を制御するレンズ駆動制御ステップと、前記特定領域を複数の分割領域に分割し、前記特定領域を含む分割領域の数に対する前記特定領域の前記エッジを含む前記分割領域の数の比に基づいて、前記合焦検出ステップにおいて検出された前記特定領域の合焦状態の検出結果の信頼度を算出する算出ステップとを実行させる。 Further, a lens drive control program for solving the above-described problem is obtained by performing, on a computer, an area extraction step for extracting a specific area from an image, and the color component amount of an edge of the specific area extracted in the area extraction step. A focus detection step for detecting a focus state of the specific area; and a lens drive control step for controlling the driving of the lens that performs focus adjustment based on the detection result of the focus state of the specific area in the focus detection step; The specific area is divided into a plurality of divided areas, and is detected in the focus detection step based on a ratio of the number of the divided areas including the edge of the specific area to the number of divided areas including the specific area. And a calculation step of calculating the reliability of the detection result of the in- focus state of the specific area.

本発明によれば、画像を速やかに合焦させることができる。   According to the present invention, an image can be focused quickly.

一実施形態のデジタルカメラのブロック図。1 is a block diagram of a digital camera according to an embodiment. (a)は、画像が被写体の位置よりも近点側で合焦している状態での撮像素子とフォーカスレンズとの位置関係を示す模式図、(b)は画像が被写体の位置よりも遠点側に合焦している状態での撮像素子とフォーカスレンズとの位置関係を示す模式図。(A) is a schematic diagram showing the positional relationship between the imaging element and the focus lens in a state where the image is in focus on the near point side of the subject position, and (b) is a schematic diagram showing that the image is farther from the subject position. The schematic diagram which shows the positional relationship of an image pick-up element and a focus lens in the state which has focused on the point side. フォーカスレンズに入射された入射光の色成分ごとの焦点の光軸方向における位置関係を示す模式図。The schematic diagram which shows the positional relationship in the optical axis direction of the focus for every color component of the incident light which injected into the focus lens. 被写体からフォーカスレンズを通じて撮像素子に入射される入射光の色成分ごとの位置関係を示す模式図であって、(a)は、画像が被写体に対して前ピン状態にある場合の模式図、(b)は、画像が被写体に対して後ピン状態にある場合の模式図。FIG. 6 is a schematic diagram illustrating a positional relationship for each color component of incident light incident on an image sensor from a subject through a focus lens, in which (a) is a schematic diagram when an image is in a front pin state with respect to the subject; FIG. 6B is a schematic diagram when the image is in a rear pin state with respect to the subject. 画像の一例を示す模式図。The schematic diagram which shows an example of an image. エッジの近傍における色成分ごとの色成分量を示すグラフであって、(a)は、画像が被写体に対して前ピン状態にある場合のグラフ、(b)は、画像が被写体に対して後ピン状態にある場合のグラフ。FIG. 7A is a graph showing the amount of color components for each color component in the vicinity of an edge, where FIG. Graph when in a pin state. エッジの近傍における色成分ごとの色成分量を示すグラフであって、(a)は、画像が被写体に対して前ピン状態又は後ピン状態にある場合の赤の光と緑の光の色成分量を示すグラフ、(b)は、画像が被写体に対して前ピン状態又は後ピン状態にある場合の青の光と緑の光の色成分量を示すグラフ。7 is a graph showing the amount of color components for each color component in the vicinity of an edge, wherein (a) is a color component of red light and green light when an image is in a front pin state or a back pin state with respect to a subject. The graph which shows quantity, (b) is a graph which shows the amount of color components of blue light and green light when the image is in the front pin state or the back pin state with respect to the subject. 画像処理エンジンが実行するレンズ駆動制御処理ルーチンのフローチャート。6 is a flowchart of a lens drive control processing routine executed by the image processing engine. 被写体マスクの一例を示す模式図。The schematic diagram which shows an example of a to-be-photographed mask. 被写体マスクのデフォーカス特徴量の信頼度に応じて設定されるコントラストスキャンのスキャン範囲を示す模式図。FIG. 5 is a schematic diagram showing a scan range of contrast scanning set according to the reliability of a defocus feature amount of a subject mask. 被写体マスクのデフォーカス特徴量のデフォーカス量に応じて設定されるコントラストスキャンのスキャン範囲を示す模式図。FIG. 5 is a schematic diagram illustrating a scan range of contrast scanning set according to a defocus amount of a defocus feature amount of a subject mask.

以下、本発明を具体化した一実施形態を図面に従って説明する。
図1に示すように、電子カメラの一種であるデジタルカメラ(以下、「カメラ10」という)は、焦点調節を行うレンズであるフォーカスレンズ11などの複数のレンズからなるレンズ部12(図1ではフォーカスレンズ11のみ図示)と、レンズ部12を通過した光をレンズ部12の像空間側において結像させて撮像する撮像部の一例としての撮像素子13とを備えている。なお、撮像素子13は、CMOS(Complementary Metal Oxide Semiconductor)型、又は、CCD(Charge Coupled Device)型のカラーイメージセンサからなる。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, an embodiment of the invention will be described with reference to the drawings.
As shown in FIG. 1, a digital camera (hereinafter referred to as “camera 10”), which is a kind of electronic camera, includes a lens unit 12 (in FIG. 1, a focus lens 11 that is a lens for performing focus adjustment). Only the focus lens 11 is shown), and an imaging element 13 as an example of an imaging unit that images the light that has passed through the lens unit 12 on the image space side of the lens unit 12 for imaging. The imaging device 13 is a CMOS (Complementary Metal Oxide Semiconductor) type or a CCD (Charge Coupled Device) type color image sensor.

撮像素子13の出力側には、画像処理エンジン14がA/D変換回路15を介して接続されている。そして、撮像素子13からアナログ信号として出力される画素信号は、A/D変換回路15においてデジタル信号に変換された後に画像処理エンジン14に入力される。   An image processing engine 14 is connected to the output side of the image sensor 13 via an A / D conversion circuit 15. The pixel signal output as an analog signal from the image sensor 13 is converted into a digital signal by the A / D conversion circuit 15 and then input to the image processing engine 14.

画像処理エンジン14は、カメラ10の各種の動作を統括的に制御するMPU16(Micro Processing Unit)を備えている。そして、MPU16は、撮像素子13から入力された画素信号に対し、色補間処理、階調補正、ホワイトバランス処理及び輪郭補償等の画像処理を施すことにより所定の画像を生成する。   The image processing engine 14 includes an MPU 16 (Micro Processing Unit) that comprehensively controls various operations of the camera 10. The MPU 16 generates a predetermined image by performing image processing such as color interpolation processing, gradation correction, white balance processing, and contour compensation on the pixel signal input from the image sensor 13.

画像処理エンジン14には、フォーカス駆動回路17が接続されている。そして、画像処理エンジン14は、フォーカス駆動回路17を通じてAFモータ18を駆動制御することにより、フォーカスレンズ11を光軸方向に移動させる、その結果、被写体から射出された光がフォーカスレンズ11を通過して撮像素子13に結像される。   A focus drive circuit 17 is connected to the image processing engine 14. Then, the image processing engine 14 drives and controls the AF motor 18 through the focus drive circuit 17 to move the focus lens 11 in the optical axis direction. As a result, the light emitted from the subject passes through the focus lens 11. The image is formed on the image sensor 13.

また、画像処理エンジン14には、データバス20を介して不揮発性メモリ21、バッファメモリ22、インターフェース部(以下、「I/F部23」という)及びモニタ24が接続されている。   In addition, a non-volatile memory 21, a buffer memory 22, an interface unit (hereinafter referred to as “I / F unit 23”) and a monitor 24 are connected to the image processing engine 14 via a data bus 20.

不揮発性メモリ21は、画像処理エンジン14を動作させるためにMPU16が実行するプログラムを格納している。なお、本実施形態では、不揮発性メモリ21は、図8にフローチャートで示すレンズ駆動制御プログラムなどを格納している。そして、MPU16は、不揮発性メモリ21に格納されたレンズ駆動制御プログラムを実行することにより、主制御部25、画像処理部26及び合焦制御部27として機能する。また、MPU16がレンズ駆動制御プログラムを実行することにより、画像処理エンジン14がフォーカスレンズ11の駆動を制御するレンズ駆動制御装置として機能する。なお、画像処理部26は、画像中における人物の顔をパターン認識処理によって認識する顔認識部29を含んでいる。また、合焦制御部27は、領域抽出部31、エッジ検出部32、特徴量算出部33、信頼度算出部34及びレンズ駆動制御部35を含んでいる。   The nonvolatile memory 21 stores a program executed by the MPU 16 to operate the image processing engine 14. In the present embodiment, the nonvolatile memory 21 stores a lens drive control program shown in the flowchart of FIG. The MPU 16 functions as the main control unit 25, the image processing unit 26, and the focusing control unit 27 by executing a lens drive control program stored in the nonvolatile memory 21. Further, the MPU 16 executes the lens drive control program, so that the image processing engine 14 functions as a lens drive control device that controls the drive of the focus lens 11. The image processing unit 26 includes a face recognition unit 29 that recognizes a human face in the image by pattern recognition processing. The focus control unit 27 includes an area extraction unit 31, an edge detection unit 32, a feature amount calculation unit 33, a reliability calculation unit 34, and a lens drive control unit 35.

バッファメモリ22は、例えば、撮影画像、画像処理過程の画像、画像処理後の画像及び画像圧縮後の画像などを一時的に格納している。
I/F部23は、メモリカード38が着脱自在に装着されるカードスロット(図示略)を有している。そして、I/F部23は、画像処理エンジン14によって生成された画像をI/F部23に装着されたメモリカード38に出力したり、メモリカード38に記憶されている画像を画像処理エンジン14に出力したりする機能を有している。
For example, the buffer memory 22 temporarily stores captured images, images in the image processing process, images after image processing, images after image compression, and the like.
The I / F unit 23 has a card slot (not shown) in which the memory card 38 is detachably mounted. Then, the I / F unit 23 outputs the image generated by the image processing engine 14 to the memory card 38 attached to the I / F unit 23, or the image stored in the memory card 38 is output to the image processing engine 14. Or has a function to output to

モニタ24には、バッファメモリ22に一時的に格納されている画像や、I/F部23に装着されたメモリカード38に格納されている画像が画像処理エンジン14によって出力されて表示される。   On the monitor 24, an image temporarily stored in the buffer memory 22 and an image stored in the memory card 38 attached to the I / F unit 23 are output and displayed by the image processing engine 14.

また、画像処理エンジン14には、レリーズボタン39及び操作部40が接続されている。レリーズボタン39は、半押し操作又は全押し操作がなされた際に操作信号を画像処理エンジン14に入力する。操作部40は、メニューボタン、セレクトボタン、決定ボタン及び電源ボタン等により構成されており、押圧操作がなされた際に操作信号を画像処理エンジン14に入力する。   Further, a release button 39 and an operation unit 40 are connected to the image processing engine 14. The release button 39 inputs an operation signal to the image processing engine 14 when a half-press operation or a full-press operation is performed. The operation unit 40 includes a menu button, a select button, a determination button, a power button, and the like, and inputs an operation signal to the image processing engine 14 when a pressing operation is performed.

次に、画像処理エンジン14が画像から検出された被写体のエッジにおける軸上色収差の色ずれを解析することにより、被写体のエッジの合焦状態を検出する原理の概要を説明する。   Next, an outline of the principle by which the image processing engine 14 detects the in-focus state of the object edge by analyzing the color shift of the longitudinal chromatic aberration at the object edge detected from the image will be described.

図2(a)には、画像が被写体Sの位置で合焦している状態が実線で示されるとともに、画像が被写体Sの位置よりも近点側で合焦している状態(以下、「前ピン状態」という)が一点鎖線で示されている。図2(a)に示すように、前ピン状態においては、被写体から射出される光がフォーカスレンズ11を通過して合焦する位置が撮像素子13よりも撮影者側(図2(a)では右側)に位置する。   In FIG. 2A, the state in which the image is in focus at the position of the subject S is indicated by a solid line, and the state in which the image is in focus on the near point side from the position of the subject S (hereinafter, “ The “front pin state” is indicated by a dashed line. As shown in FIG. 2A, in the front pin state, the position where the light emitted from the subject passes through the focus lens 11 and is in focus is closer to the photographer side than the image sensor 13 (in FIG. 2A). Located on the right).

一方、図2(b)には、画像が被写体Sの位置で合焦している状態が実線で示されるとともに、画像が被写体Sの位置よりも遠点側で合焦している状態(以下、「後ピン状態」という)が一点鎖線で示されている。図2(b)に示すように、後ピン状態においては、被写体から射出される光がフォーカスレンズ11を通過して合焦する位置が撮像素子13よりもフォーカスレンズ11側(図2(b)では左側)に位置する。   On the other hand, in FIG. 2B, the state in which the image is in focus at the position of the subject S is indicated by a solid line, and the state in which the image is in focus on the far point side from the position of the subject S (hereinafter referred to as “the subject S”) , Referred to as “rear pin state”). As shown in FIG. 2B, in the rear pin state, the position where the light emitted from the subject passes through the focus lens 11 and is in focus is closer to the focus lens 11 than the image sensor 13 (FIG. 2B). It is located on the left side.

図3には、被写体から射出された光がフォーカスレンズ11を通過する際に生じる軸上色収差の様子が示されている。図3に示すように、フォーカスレンズ11を通過した光には波長の違いによって軸上色収差が生じるため、光の波長成分ごとに焦点位置がずれる。具体的には、フォーカスレンズ11は、光の波長が短いほど光の屈折率が大きいため、青(B)の光、緑(B)の光、赤(R)の光の順に、フォーカスレンズ11を通過する際の屈折率が次第に小さくなり、フォーカスレンズ11を通過して合焦する焦点位置がフォーカスレンズ11から次第に遠くなる。そして、このような軸上色収差による色ずれを解析することにより、被写体のデフォーカス特徴量が被写体の合焦状態として算出(検出)される。   FIG. 3 shows the state of axial chromatic aberration that occurs when the light emitted from the subject passes through the focus lens 11. As shown in FIG. 3, since axial chromatic aberration occurs due to the difference in wavelength in the light that has passed through the focus lens 11, the focal position is shifted for each wavelength component of the light. Specifically, since the refractive index of light increases as the wavelength of light is shorter, the focus lens 11 is in the order of blue (B) light, green (B) light, and red (R) light. The refractive index when passing through the lens gradually decreases, and the focal position through which the focus lens 11 is focused is gradually distant from the focus lens 11. Then, by analyzing the color shift due to such axial chromatic aberration, the defocus feature amount of the subject is calculated (detected) as the focused state of the subject.

ここで、デフォーカス特徴量は、方向指標と、デフォーカス量を含んで構成されている。方向指標とは、画像が被写体に対して前ピン状態又は後ピン状態にあることを示す指標である。そして、方向指標及びデフォーカス量を算出するための評価値の一例としては、Edge Difference(以下、「Ed」という)が挙げられる。   Here, the defocus feature amount includes a direction index and a defocus amount. The direction index is an index indicating that the image is in the front pin state or the rear pin state with respect to the subject. An example of an evaluation value for calculating the direction index and the defocus amount is Edge Difference (hereinafter referred to as “Ed”).

次に、被写体における方向指標及びデフォーカス量をEdを用いて算出する原理の概要を説明する。
図4(a)に示すように、画像が被写体に対して前ピン状態にある場合には、被写体から射出された光は、フォーカスレンズ11を通過する際に生じる軸上色収差に起因して外側から赤(R)の光、緑(G)の光、青(B)の光の順に位置するように分光された状態で撮像素子13に導かれる。この場合、フォーカスレンズ11を通過した光が色成分ごとに撮像素子13に撮像する被写体のデフォーカス量は、青(B)の光、緑(G)の光、赤(R)の光の順に次第に大きくなる。
Next, an outline of the principle of calculating the direction index and the defocus amount in the subject using Ed will be described.
As shown in FIG. 4A, when the image is in the front pin state with respect to the subject, the light emitted from the subject is outside due to the longitudinal chromatic aberration generated when passing through the focus lens 11. To red (R) light, green (G) light, and blue (B) light are guided to the image sensor 13 in a state of being dispersed so as to be positioned in this order. In this case, the defocus amount of the subject that the light passing through the focus lens 11 captures on the image sensor 13 for each color component is in the order of blue (B) light, green (G) light, and red (R) light. It grows gradually.

一方、図4(b)に示すように、画像が被写体に対して後ピン状態にある場合には、被写体から射出された光は、フォーカスレンズ11を通過する際に生じる軸上色収差に起因して外側から赤(R)の光、緑(G)の光、青(B)の光の順に位置するように分光された状態で撮像素子13に導かれる。この場合、フォーカスレンズ11を通過した光が色成分ごとに撮像素子13に撮像する被写体のデフォーカス量は、赤(R)の光、緑(G)の光、青(B)の光の順に次第に大きくなる。   On the other hand, as shown in FIG. 4B, when the image is in the rear pin state with respect to the subject, the light emitted from the subject is caused by the axial chromatic aberration generated when passing through the focus lens 11. Then, the light is guided from the outside to the image sensor 13 in a state of being dispersed so as to be positioned in the order of red (R) light, green (G) light, and blue (B) light. In this case, the defocus amount of the subject that the light passing through the focus lens 11 images on the image sensor 13 for each color component is in the order of red (R) light, green (G) light, and blue (B) light. It grows gradually.

すなわち、画像が被写体に対して前ピン状態及び後ピン状態のうち何れの状態にあるかに応じて、フォーカスレンズ11を通過した光が色成分ごとに撮像素子13に撮像する被写体のデフォーカス量の大小関係は異なるものとなる。   In other words, depending on whether the image is in the front pin state or the rear pin state with respect to the subject, the defocus amount of the subject that the light passing through the focus lens 11 captures on the image sensor 13 for each color component The magnitude relationship of is different.

図5には、画像における被写体の一例として白黒チャートS1が示されている。また、図5では、横方向にX座標、縦方向にY座標が設定されており、X=qの位置に位置する白黒チャートS1のエッジE1がデフォーカス特徴量の算出対象として設定されている。   FIG. 5 shows a black and white chart S1 as an example of the subject in the image. In FIG. 5, the X coordinate is set in the horizontal direction and the Y coordinate is set in the vertical direction, and the edge E1 of the black and white chart S1 located at the position of X = q is set as the defocus feature amount calculation target. .

この場合、まず、エッジE1を横切る方向(図5ではX方向)においてRGBごとの画素値が取得される。このとき、1ピクセル行だけの画素値が取得されると、その1ピクセル行がノイズを含んでいる場合に誤った画素値が取得される虞がある。そのため、本実施形態では、以下の式(1)〜(3)に示すように、1ピクセル行の画素値がY方向にnピクセル幅に亘ってn本積算され、その積算値がnで除算された平均値が、x=qに位置するエッジE1が横切るRGBごとの画素値として取得される。   In this case, first, pixel values for each RGB are acquired in the direction crossing the edge E1 (X direction in FIG. 5). At this time, if a pixel value of only one pixel row is acquired, an erroneous pixel value may be acquired if the one pixel row includes noise. Therefore, in this embodiment, as shown in the following formulas (1) to (3), n pixel values in one pixel row are integrated over the width of n pixels in the Y direction, and the integrated value is divided by n. The average value thus obtained is acquired as a pixel value for each RGB crossed by the edge E1 located at x = q.

Figure 0006464553
ここで、r(x,k)、g(x,k)、b(x,k)は、y方向のnピクセル幅におけるn本(k=1,2,…,n)の1ピクセル行のR画素値、G画素値、B画素値をそれぞれ示している。ただし、xは、図5に示す例ではX=qを含む所定範囲(例えば、q−Q/2≦x≦q+Q/2)を変域とする値を示している。
Figure 0006464553
Here, r (x, k), g (x, k), and b (x, k) are n (k = 1, 2,..., N) one pixel row in the n pixel width in the y direction. R pixel value, G pixel value, and B pixel value are shown. In the example shown in FIG. 5, x represents a value having a predetermined range including X = q (for example, q−Q / 2 ≦ x ≦ q + Q / 2) as a domain.

続いて、以下の式(4)〜(6)に示すように、r_ave(x)、g_ave(x)、b_ave(x)について、各々の最大値及び最小値を用いて正規化することにより、各々の正規化出力が算出される。   Subsequently, by normalizing r_ave (x), g_ave (x), and b_ave (x) using respective maximum values and minimum values as shown in the following equations (4) to (6), Each normalized output is calculated.

Figure 0006464553
ここで、xminは、エッジE1の検出対象領域EA内で画素値が最小(図5に示す例では黒領域)となるX座標値を示し、xmaxは、エッジE1の検出対象領域EA内で画素値が最大(図5に示す例では白領域)となるX座標値を示している。
Figure 0006464553
Here, xmin represents an X coordinate value at which the pixel value is minimum (black area in the example shown in FIG. 5) in the detection target area EA of the edge E1, and xmax is a pixel in the detection target area EA of the edge E1. An X coordinate value having a maximum value (white area in the example shown in FIG. 5) is shown.

図6(a)には、画像が白黒チャートS1のエッジE1に対して前ピン状態である場合の、白黒チャートS1のエッジE1の近傍における各色成分の正規化出力が示されている。図6(a)に示すように、画像が白黒チャートS1のエッジE1に対して前ピン状態である場合には、青(B)、緑(G)、赤(R)の順に、白黒チャートS1のエッジE1における色成分量の勾配が次第に緩やかとなる。これは、画像が白黒チャートS1のエッジE1に対して前ピン状態である場合には、フォーカスレンズ11を通過した光が色成分ごとに撮像素子13に撮像する白黒チャートS1のエッジE1のデフォーカス量は、青(B)の光、緑(G)の光、赤(R)の光の順に次第に大きくなるためである。   FIG. 6A shows the normalized output of each color component in the vicinity of the edge E1 of the black and white chart S1 when the image is in the front pin state with respect to the edge E1 of the black and white chart S1. As shown in FIG. 6A, when the image is in the front pin state with respect to the edge E1 of the black and white chart S1, the black and white chart S1 in the order of blue (B), green (G), and red (R). The gradient of the color component amount at the edge E1 becomes gradually gentler. This is because, when the image is in the front pin state with respect to the edge E1 of the black and white chart S1, the light that has passed through the focus lens 11 is defocused on the edge E1 of the black and white chart S1 that is captured by the image sensor 13 for each color component This is because the amount gradually increases in the order of blue (B) light, green (G) light, and red (R) light.

一方、図6(b)には、画像が白黒チャートS1のエッジE1に対して後ピン状態である場合の、白黒チャートS1のエッジE1の近傍における各色成分の正規化出力が示されている。図6(b)に示すように、画像が白黒チャートS1のエッジE1に対して後ピン状態である場合には、赤(R)、緑(G)、青(B)の順に、白黒チャートS1のエッジE1における色成分量の勾配が次第に緩やかとなる。これは、画像が白黒チャートS1のエッジE1に対して後ピン状態である場合には、フォーカスレンズ11を通過した光が色成分ごとに撮像素子13に撮像する白黒チャートS1のエッジE1のデフォーカス量は、赤(R)の光、緑(G)の光、青(B)の光の順に次第に大きくなるためである。   On the other hand, FIG. 6B shows the normalized output of each color component in the vicinity of the edge E1 of the black and white chart S1 when the image is in the back pinned state with respect to the edge E1 of the black and white chart S1. As shown in FIG. 6B, when the image is in the rear pin state with respect to the edge E1 of the black and white chart S1, the black and white chart S1 in the order of red (R), green (G), and blue (B). The gradient of the color component amount at the edge E1 becomes gradually gentler. This is because, when the image is in a back-pin state with respect to the edge E1 of the black and white chart S1, defocusing of the edge E1 of the black and white chart S1 in which the light that has passed through the focus lens 11 is captured by the image sensor 13 for each color component. This is because the amount gradually increases in the order of red (R) light, green (G) light, and blue (B) light.

すなわち、図7(a)に示すように、白黒チャートS1のエッジE1の近傍における各色成分量の勾配は、以下のようになる。画像が白黒チャートS1のエッジE1に対して前ピン状態である場合には、赤(R)の色成分量の勾配が緑(G)の色成分量の勾配よりも小さくなる。これに対し、画像が白黒チャートS1のエッジE1に対して後ピン状態である場合には、赤(R)の色成分量の勾配が緑(G)の色成分量の勾配よりも大きくなる。そのため、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態にあるかに応じて、白黒チャートS1のエッジE1における赤(R)の色成分量の勾配と緑(G)の色成分量の勾配との大小関係が逆転する。   That is, as shown in FIG. 7A, the gradient of each color component amount in the vicinity of the edge E1 of the black and white chart S1 is as follows. When the image is in the front pin state with respect to the edge E1 of the black and white chart S1, the gradient of the red (R) color component amount is smaller than the gradient of the green (G) color component amount. On the other hand, when the image is in the rear pin state with respect to the edge E1 of the black and white chart S1, the gradient of the red (R) color component amount is larger than the gradient of the green (G) color component amount. Therefore, the gradient of the red (R) color component amount at the edge E1 of the black and white chart S1 depends on whether the image is in the front pin state or the rear pin state with respect to the edge E1 of the black and white chart S1. The magnitude relationship with the gradient of the color component amount of green (G) is reversed.

したがって、赤(R)の色成分量と緑(G)の色成分量とに基づくEd(以下、「EdRG」という)を閾値と比較することにより、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについては、以下に示す式(7)、(8)に基づいて判定される。   Therefore, by comparing Ed (hereinafter referred to as “EdRG”) based on the red (R) color component amount and the green (G) color component amount with a threshold value, the image is compared with the edge E1 of the monochrome chart S1. Which of the front pin state and the rear pin state is determined is based on the following formulas (7) and (8).

Figure 0006464553
ここで、Σ(R/G)は、赤(R)の色成分量を画像における同一の位置での緑(G)の色成分量で除算した値を、区間Δ1に亘って加算した総和を示している。そして、その総和を区間Δ1の長さで除算した値がEdRGとして算出される。なお、区間Δ1は、図7(a)において赤(R)の色成分量と緑(G)の色成分量とが交わる交点P1よりも右側に位置する区間のうち、緑(G)の色成分量に勾配がある区間の一部として規定される。
Figure 0006464553
Here, Σ (R / G) is a sum obtained by adding the value obtained by dividing the red (R) color component amount by the green (G) color component amount at the same position in the image over the section Δ1. Show. Then, a value obtained by dividing the sum by the length of the section Δ1 is calculated as EdRG. The section Δ1 is the color of green (G) in the section located to the right of the intersection P1 where the red (R) color component amount and the green (G) color component amount intersect in FIG. It is defined as a part of a section where the component amount has a gradient.

そして、式(7)が成立する場合には、EdRGは、画像が白黒チャートS1のエッジE1に対して後ピン状態であることを示している。一方、式(8)が成立する場合には、EdRGは、画像が白黒チャートS1のエッジE1に対して前ピン状態であることを示している。また、EdRGと閾値である「1」との差分が、画像における白黒チャートS1のエッジE1のデフォーカス量を示している。   And when Formula (7) is materialized, EdRG has shown that an image is a back pin state with respect to the edge E1 of the black-and-white chart S1. On the other hand, when the formula (8) is established, EdRG indicates that the image is in the front pin state with respect to the edge E1 of the black and white chart S1. The difference between EdRG and the threshold value “1” indicates the defocus amount of the edge E1 of the black and white chart S1 in the image.

なお、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについては、以下に示す式(9)、(10)に基づいて判定されてもよい。   Note that whether the image is in the front pin state or the rear pin state with respect to the edge E1 of the black and white chart S1 may be determined based on the following equations (9) and (10). .

Figure 0006464553
ここで、Σ(R/G)は、赤(R)の色成分量を画像における同一の位置での緑(G)の色成分量で除算した値を、区間Δ2に亘って加算した総和を示している。そして、その総和を区間Δ2の長さで除算した値がEdRGとして算出される。なお、区間Δ2は、図7(a)において赤(R)の色成分量と緑(G)の色成分量とが交わる交点P1よりも左側に位置する区間のうち、緑(G)の色成分量に勾配がある区間の一部として規定される。
Figure 0006464553
Here, Σ (R / G) is a sum obtained by adding the value obtained by dividing the red (R) color component amount by the green (G) color component amount at the same position in the image over the section Δ2. Show. Then, a value obtained by dividing the sum by the length of the section Δ2 is calculated as EdRG. The section Δ2 is the color of green (G) in the section located on the left side of the intersection P1 where the red (R) color component amount and the green (G) color component amount intersect in FIG. It is defined as a part of a section where the component amount has a gradient.

そして、式(9)が成立する場合には、EdRGは、画像が白黒チャートS1のエッジE1に対して前ピン状態であることを示している。一方、式(10)が成立する場合には、EdRGは、画像が白黒チャートS1のエッジE1に対して後ピン状態であることを示している。また、EdRGと閾値である「1」との差分が、画像における白黒チャートS1のエッジE1のデフォーカス量を示している。   And when Formula (9) is materialized, EdRG has shown that the image is a front pin state with respect to the edge E1 of the black-and-white chart S1. On the other hand, when the formula (10) is established, EdRG indicates that the image is in the rear pin state with respect to the edge E1 of the black and white chart S1. The difference between EdRG and the threshold value “1” indicates the defocus amount of the edge E1 of the black and white chart S1 in the image.

以上のように、上記の式(7)〜(10)では、赤(R)の色成分量と緑(G)の色成分量との比を用いて、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについて判定される。ただし、赤(R)の色成分量と緑(G)の色成分量との差を用いて、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについて判定してもよい。   As described above, in the above formulas (7) to (10), the image is applied to the edge E1 of the black and white chart S1 by using the ratio of the red (R) color component amount and the green (G) color component amount. On the other hand, it is determined which of the front pin state and the rear pin state. However, using the difference between the red (R) color component amount and the green (G) color component amount, the image is in either the front pin state or the rear pin state with respect to the edge E1 of the black and white chart S1. You may determine whether there is.

また同様に、図7(b)に示すように、画像が白黒チャートS1のエッジE1に対して前ピン状態である場合には、青(B)の色成分量の勾配が緑(G)の色成分量の勾配よりも大きくなる。これに対し、画像が白黒チャートS1のエッジE1に対して後ピン状態である場合には、青(B)の色成分量の勾配が緑(G)の色成分量の勾配よりも小さくなる。そのため、画像が前ピン状態及び後ピン状態のうち何れの状態にあるかに応じて、白黒チャートS1のエッジE1における青(B)の色成分量の勾配と緑(G)の色成分量の勾配との大小関係が逆転する。   Similarly, as shown in FIG. 7B, when the image is in the front pin state with respect to the edge E1 of the black and white chart S1, the gradient of the color component amount of blue (B) is green (G). It becomes larger than the gradient of the color component amount. On the other hand, when the image is in a back-pin state with respect to the edge E1 of the black and white chart S1, the gradient of the blue (B) color component amount is smaller than the gradient of the green (G) color component amount. Therefore, the gradient of the blue (B) color component amount and the green (G) color component amount at the edge E1 of the black-and-white chart S1 depending on whether the image is in the front pin state or the rear pin state. The magnitude relationship with the gradient is reversed.

したがって、青(B)の色成分量と緑(G)の色成分量とに基づくEd(以下、「EdBG」という)を閾値と比較することにより、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについては、以下に示す式(11)、(12)に基づいて判定される。   Therefore, by comparing Ed (hereinafter referred to as “EdBG”) based on the blue (B) color component amount and the green (G) color component amount with a threshold value, the image is compared with the edge E1 of the monochrome chart S1. Which of the front pin state and the rear pin state is determined is based on the following formulas (11) and (12).

Figure 0006464553
ここで、Σ(B/G)は、青(B)の色成分量を画像における同一の位置での緑(G)の色成分量で除算した値を、区間Δ3に亘って加算した総和を示している。そして、その総和を区間Δ3の長さで除算した値がEdBGとして算出される。なお、区間Δ3は、図7(b)において青(B)の色成分量と緑(G)の色成分量とが交わる交点P2よりも右側に位置する区間のうち、緑(G)の色成分量に勾配がある区間の一部として規定される。
Figure 0006464553
Here, Σ (B / G) is a sum obtained by adding a value obtained by dividing the blue (B) color component amount by the green (G) color component amount at the same position in the image over the section Δ3. Show. Then, a value obtained by dividing the sum by the length of the section Δ3 is calculated as EdBG. The section Δ3 is the green (G) color in the section located on the right side of the intersection P2 where the blue (B) color component amount and the green (G) color component amount intersect in FIG. It is defined as a part of a section where the component amount has a gradient.

そして、式(11)が成立する場合には、EdBGは、画像が白黒チャートS1のエッジE1に対して前ピン状態であることを示している。一方、式(12)が成立する場合には、EdBGは、画像が白黒チャートS1のエッジE1に対して後ピン状態であることを示している。また、EdBGと閾値である「1」との差分が、画像における白黒チャートS1のエッジE1のデフォーカス量を示している。   When the expression (11) is satisfied, EdBG indicates that the image is in a front pin state with respect to the edge E1 of the black and white chart S1. On the other hand, when the formula (12) is established, EdBG indicates that the image is in the rear pin state with respect to the edge E1 of the black and white chart S1. The difference between EdBG and the threshold value “1” indicates the defocus amount of the edge E1 of the black and white chart S1 in the image.

なお、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについては、以下に示す式(13)、(14)に基づいて判定されてもよい。   Note that whether the image is in the front pin state or the rear pin state with respect to the edge E1 of the black and white chart S1 may be determined based on the following equations (13) and (14). .

Figure 0006464553
ここで、Σ(B/G)は、青(B)の色成分量を画像における同一の位置での緑(G)の色成分量で除算した値を、区間Δ4に亘って加算した総和を示している。そして、その総和を区間Δ4の長さで除算した値がEdBGとして算出される。なお、区間Δ4は、図7(b)において青(B)の色成分量と緑(G)の色成分量とが交わる交点P2よりも左側に位置する区間のうち、緑(G)の色成分量に勾配がある区間の一部として規定される。
Figure 0006464553
Here, Σ (B / G) is a sum obtained by adding the value obtained by dividing the blue (B) color component amount by the green (G) color component amount at the same position in the image over the section Δ4. Show. Then, a value obtained by dividing the sum by the length of the section Δ4 is calculated as EdBG. The section Δ4 is the color of green (G) in the section located on the left side of the intersection P2 where the blue (B) color component amount and the green (G) color component amount intersect in FIG. It is defined as a part of a section where the component amount has a gradient.

そして、式(13)が成立する場合には、EdBGは、画像が白黒チャートS1のエッジE1に対して後ピン状態であることを示している。一方、式(14)が成立する場合には、EdBGは、画像が白黒チャートS1のエッジE1に対して前ピン状態であることを示している。また、EdBGと閾値である「1」との差分が、画像における白黒チャートS1のエッジE1のデフォーカス量を示している。   When the formula (13) is established, EdBG indicates that the image is in a rear pin state with respect to the edge E1 of the black and white chart S1. On the other hand, when the formula (14) is established, EdBG indicates that the image is in the front pin state with respect to the edge E1 of the black and white chart S1. The difference between EdBG and the threshold value “1” indicates the defocus amount of the edge E1 of the black and white chart S1 in the image.

以上のように、上記の式(11)〜(14)では、青(B)の色成分量と緑(G)の色成分量との比を用いて、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについて判定される。ただし、青(B)の色成分量と緑(G)の色成分量との差を用いて、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについて判定してもよい。   As described above, in the above formulas (11) to (14), the image is applied to the edge E1 of the black-and-white chart S1 by using the ratio of the blue (B) color component amount and the green (G) color component amount. On the other hand, it is determined which of the front pin state and the rear pin state. However, using the difference between the color component amount of blue (B) and the color component amount of green (G), the image is in either the front pin state or the rear pin state with respect to the edge E1 of the black and white chart S1. You may determine whether there is.

なお、画像が白黒チャートS1のエッジE1に対して前ピン状態及び後ピン状態のうち何れの状態であるかについて判定するための評価値としては、Edに代えて、デフォーカス量参照値(Width of Subtraction)や線広がり関数(Line Spread Function)を採用してもよい。   Note that, as an evaluation value for determining whether the image is in the front pin state or the rear pin state with respect to the edge E1 of the black and white chart S1, instead of Ed, a defocus amount reference value (Width of Subtraction) or Line Spread Function may be employed.

次に、本実施形態の画像処理エンジン14のMPU16が画像の合焦位置を制御する際に実行するレンズ駆動制御処理ルーチンの概要を図8のフローチャートを参照しながら説明する。   Next, an outline of a lens drive control processing routine executed when the MPU 16 of the image processing engine 14 of the present embodiment controls the in-focus position of the image will be described with reference to the flowchart of FIG.

さて、MPU16は、カメラ10が電源ON状態となると、図8に示すレンズ駆動制御処理ルーチンを開始する。そして、ステップS11において、MPU16の画像処理部26は、撮像素子13から出力された画素信号を取り込んでスルー画を生成し、生成したスルー画をモニタ24に表示させる。   Now, when the camera 10 is turned on, the MPU 16 starts a lens drive control processing routine shown in FIG. In step S <b> 11, the image processing unit 26 of the MPU 16 takes in the pixel signal output from the image sensor 13 to generate a through image, and displays the generated through image on the monitor 24.

続いて、ステップS12において、領域抽出ステップとして、MPU16の領域抽出部31は、先のステップS11において生成されたスルー画から特定領域の一例としてマスク領域を抽出する。この場合、スルー画に対してラベリング処理を行うことにより、スルー画からマスク領域が抽出される。ここで、ラベリング技術とは、スルー画から特徴量ごとに画素データを検出し、検出された画素データが互いに近接した画素領域のうち画像内での位置が隣接する画素領域を順次検出してグループ化することにより、スルー画からマスク領域を抽出する技術である。そして、本実施形態では、ラベリング処理に用いる特徴量としては、動きベクトル、色相、彩度、明度、テクスチャ(模様)、コントラスト等が含まれる。   Subsequently, in step S12, as a region extraction step, the region extraction unit 31 of the MPU 16 extracts a mask region as an example of a specific region from the through image generated in the previous step S11. In this case, a mask region is extracted from the through image by performing a labeling process on the through image. Here, the labeling technique detects pixel data for each feature amount from a through image, and sequentially detects pixel areas whose positions in the image are adjacent among pixel areas in which the detected pixel data are close to each other. This is a technique for extracting a mask region from a through image by making it into a picture. In the present embodiment, the feature amount used for the labeling process includes a motion vector, hue, saturation, brightness, texture (pattern), contrast, and the like.

なお、MPU16は、スルー画に対してパターン認識処理を行うことにより、スルー画からマスク領域を抽出してもよい。例えば、本実施形態では、MPU16の顔認識部29がパターン認識処理の一種である顔認識処理をスルー画に対して行うことによりスルー画から人物の顔を認識し、認識された人物の顔をマスク領域として抽出してもよい。この場合、MPU16の顔認識部29がスルー画からマスク領域を抽出する領域抽出部としても機能する。   Note that the MPU 16 may extract a mask area from the through image by performing pattern recognition processing on the through image. For example, in the present embodiment, the face recognition unit 29 of the MPU 16 performs face recognition processing, which is a type of pattern recognition processing, on the through image, thereby recognizing the person's face from the through image, and recognizing the recognized human face. You may extract as a mask area | region. In this case, the face recognition unit 29 of the MPU 16 also functions as a region extraction unit that extracts a mask region from the through image.

そして、MPU16の領域抽出部31は、スルー画から抽出されたマスク領域の画像を、例えばExif(Exchangeable Image File Format)形式でバッファメモリ22に格納する。   Then, the area extraction unit 31 of the MPU 16 stores the image of the mask area extracted from the through image in the buffer memory 22 in, for example, the Exif (Exchangeable Image File Format) format.

そして次に、ステップS13において、MPU16の領域抽出部31は、先のステップS12において抽出されたマスク領域の中からノイズマスクを除外する。ここで、ノイズマスクとは、細長いマスク領域、極端に小さいマスク領域、極端に大きいマスク領域など、スルー画において合焦の対象とはなり得ないマスク領域を意味している。これは、上記のマスク領域については、スルー画のうち人が注目することが想定される領域ではないためである。そして、MPU16の領域抽出部31は、合焦の対象から外れた旨を示すデータを、ノイズマスクの画像の付加情報としてバッファメモリ22に格納する。   Next, in step S13, the region extracting unit 31 of the MPU 16 excludes the noise mask from the mask regions extracted in the previous step S12. Here, the noise mask means a mask region that cannot be focused in a through image, such as an elongated mask region, an extremely small mask region, or an extremely large mask region. This is because the mask area is not an area that is assumed to be noticed by a person in the through image. Then, the area extraction unit 31 of the MPU 16 stores data indicating that the target is out of focus in the buffer memory 22 as additional information of the noise mask image.

続いて、ステップS14において、MPU16の領域抽出部31は、先のステップS12において抽出されたマスク領域のうちノイズマスク以外のマスク領域について優先度を設定する。この優先度は、マスク領域の中で人がより注目することが想定される度合いを意味しており、マスク領域の特徴量ごとに算出される評点の合計値によって規定される。なお、マスク領域の優先度を規定する特徴量としては、動きベクトル、位置、色相、異質度等が含まれる。ここで、異質度とは、特徴量のヒストグラムにおける特異な分布の度合いを意味している。例えば、緑の背景に赤い花が咲いているときには、赤い色相が色相のヒストグラムにおいて特異に分布していることとなる。そのため、赤い花は、異質度が高いマスク領域として認識されることにより、異質度に関する評点が高く設定される。そして、MPU16の領域抽出部31は、マスク領域の特徴量ごとに算出された評点のデータを、マスク領域の画像の付加情報としてバッファメモリ22に格納する。   Subsequently, in step S14, the region extracting unit 31 of the MPU 16 sets priorities for mask regions other than the noise mask among the mask regions extracted in the previous step S12. This priority means a degree that a person is expected to pay more attention in the mask area, and is defined by a total value of scores calculated for each feature amount of the mask area. Note that the feature quantity that defines the priority of the mask area includes a motion vector, a position, a hue, a degree of heterogeneity, and the like. Here, the degree of heterogeneity means the degree of unique distribution in the histogram of the feature amount. For example, when red flowers are blooming on a green background, the red hue is uniquely distributed in the hue histogram. For this reason, the red flower is recognized as a mask region having a high degree of heterogeneity, so that the score regarding the degree of heterogeneity is set high. Then, the area extracting unit 31 of the MPU 16 stores the score data calculated for each feature amount of the mask area in the buffer memory 22 as additional information of the image of the mask area.

そして次に、ステップS15において、MPU16の領域抽出部31は、先のステップS15において優先度が最も高く設定されたマスク領域、即ち、マスク領域の特徴量ごとに算出された評点の合計値が最も高いマスク領域を、被写体マスクとして判定する。   Then, in step S15, the area extraction unit 31 of the MPU 16 has the highest score calculated for each feature amount of the mask area set with the highest priority in the previous step S15, that is, the mask area. A high mask area is determined as a subject mask.

続いて、ステップS16において、MPU16の領域抽出部31は、先のステップS15において被写体マスクとして判定されたマスク領域が複数であるか否かを判定する。そして、MPU16の領域抽出部31は、複数のマスク領域が被写体マスクとして判定された場合(ステップS16=YES)、その処理をステップS17に移行する。   Subsequently, in step S16, the area extracting unit 31 of the MPU 16 determines whether or not there are a plurality of mask areas determined as subject masks in the previous step S15. When the plurality of mask areas are determined as subject masks (step S16 = YES), the area extracting unit 31 of the MPU 16 proceeds to step S17.

そして、ステップS17において、MPU16の領域抽出部31は、複数の被写体マスクのうち、スルー画の奥行方向において至近側に位置する被写体マスクを合焦の対象として設定する。なお、複数のマスク領域が被写体マスクとして判定された場合に、色相が肌色である被写体マスクや、一定時間以上静止している被写体マスクや、特徴量のヒストグラムが特異な分布をしている被写体マスクが合焦の対象として設定されてもよい。また、複数のマスク領域が被写体マスクとして判定された場合に、合焦の対象となる被写体マスクがマニュアルで選択されてもよい。   In step S <b> 17, the region extraction unit 31 of the MPU 16 sets a subject mask positioned on the closest side in the depth direction of the through image among the plurality of subject masks as a focus target. When multiple mask areas are determined as subject masks, subject masks whose hue is flesh-colored, subject masks that have been stationary for a certain period of time, or subject masks that have a unique distribution of feature amount histograms May be set as a focus target. Further, when a plurality of mask areas are determined as subject masks, a subject mask to be focused may be manually selected.

一方、MPU16の領域抽出部31は、被写体マスクとして判定されたマスク領域が一つのみである場合(ステップS16=NO)、その処理をステップS18に移行する。そして、ステップS18において、MPU16の領域抽出部31は、先のステップS15において判定された被写体マスクを合焦の対象として設定する。   On the other hand, if there is only one mask area determined as the subject mask (step S16 = NO), the area extraction unit 31 of the MPU 16 proceeds to step S18. In step S18, the area extracting unit 31 of the MPU 16 sets the subject mask determined in the previous step S15 as a focus target.

そして次に、ステップS19において、MPU16のエッジ検出部32は、合焦の対象として設定された被写体マスクのエッジを検出する。
具体的には、図9に示すように、MPU16のエッジ検出部32は、スルー画のうち、合焦の対象として設定された被写体マスクS2の画像部分を微分フィルタによってスキャン(例えば、ラスタースキャン)する。その結果、被写体マスクS2の画像部分における明度、彩度及び色相等の特徴量が算出される。そして、MPU16のエッジ検出部32は、算出された特徴量が大きい部分を被写体マスクS2の輪郭部分のうち軸上色収差の評価に適したエッジE2として検出する。なお、図9に示す例では、MPU16のエッジ検出部32は、被写体マスクS2の輪郭部分の中から3つのエッジE2を検出している。
Next, in step S19, the edge detection unit 32 of the MPU 16 detects the edge of the subject mask set as a focus target.
Specifically, as illustrated in FIG. 9, the edge detection unit 32 of the MPU 16 scans the image portion of the subject mask S <b> 2 set as a focus target in the through image using a differential filter (for example, raster scan). To do. As a result, feature quantities such as brightness, saturation, and hue in the image portion of the subject mask S2 are calculated. Then, the edge detection unit 32 of the MPU 16 detects a portion having a large calculated feature amount as an edge E2 suitable for evaluating axial chromatic aberration in the contour portion of the subject mask S2. In the example shown in FIG. 9, the edge detection unit 32 of the MPU 16 detects three edges E2 from the contour portion of the subject mask S2.

ここで、MPU16のエッジ検出部32が被写体マスクS2の画像部分における明度又は彩度について微分フィルタによってスキャンすることにより、被写体マスクS2のエッジE2を検出したとする。この場合、検出されたエッジE2における各色成分の色成分量のコントラストが十分に大きいとは限らない。そして、エッジE2における各色成分の色成分量のコントラストが小さいと、エッジE2における各色成分の色成分量の正規化出力としてシャープな波形を得ることができない。そのため、エッジE2における軸上色収差の評価値としてEdの値を正確に算出することができない。その結果、スルー画が被写体マスクS2に対して前ピン状態及び後ピン状態のうち何れの状態であるかについてEdを用いて判定することが困難となり、又、スルー画における被写体マスクS2のデフォーカス量の大きさをEdを用いて算出することも困難となる。すなわち、被写体マスクS2のデフォーカス特徴量をEdを用いて算出することが困難となる。なお、エッジE2における軸上色収差の評価値としてデフォーカス量参照値や線広がり関数を採用した場合にも、同様の問題が生じる。   Here, it is assumed that the edge detection unit 32 of the MPU 16 detects the edge E2 of the subject mask S2 by scanning the lightness or saturation in the image portion of the subject mask S2 with a differential filter. In this case, the contrast of the color component amount of each color component at the detected edge E2 is not always sufficiently large. If the contrast of the color component amount of each color component at the edge E2 is small, a sharp waveform cannot be obtained as a normalized output of the color component amount of each color component at the edge E2. Therefore, the value of Ed cannot be accurately calculated as the evaluation value of the longitudinal chromatic aberration at the edge E2. As a result, it is difficult to determine using Ed whether the through image is in the front pin state or the rear pin state with respect to the subject mask S2, and the subject mask S2 in the through image is defocused. It is also difficult to calculate the magnitude of the quantity using Ed. That is, it is difficult to calculate the defocus feature amount of the subject mask S2 using Ed. The same problem occurs when a defocus amount reference value or a line spread function is adopted as the evaluation value of the longitudinal chromatic aberration at the edge E2.

そのため、ステップS20において、MPU16の特徴量算出部33は、先のステップS19において検出されたエッジE2における軸上色収差の評価値に基づいて、被写体マスクS2のデフォーカス特徴量が算出可能であるか否かを判定する。そして、MPU16の特徴量算出部33は、被写体マスクS2のデフォーカス特徴量が算出可能ではないと判定した場合(ステップS20=NO)、その処理をステップS21に移行する。   Therefore, in step S20, the feature amount calculation unit 33 of the MPU 16 can calculate the defocus feature amount of the subject mask S2 based on the evaluation value of the axial chromatic aberration at the edge E2 detected in the previous step S19. Determine whether or not. When the feature amount calculation unit 33 of the MPU 16 determines that the defocus feature amount of the subject mask S2 cannot be calculated (step S20 = NO), the process proceeds to step S21.

そして次に、ステップS21において、MPU16のレンズ駆動制御部35は、通常のコントラストスキャンを行うことにより、スルー画を被写体マスクS2において合焦させるフォーカスレンズ11のレンズ位置となる合焦位置を検出する。この通常のコントラストスキャンおいては、MPU16のレンズ駆動制御部35は、まず、スルー画の合焦位置をスルー画の奥行方向における至近側から無限遠側にかけての全域に亘って移動させるように、フォーカスレンズ11を光軸方向に駆動させる。そして、MPU16のレンズ駆動制御部35は、各位置におけるスルー画の被写体マスクS2のコントラスト値を求め、被写体マスクS2のコントラスト値が最も高くなるフォーカスレンズ11のレンズ位置を合焦位置として検出する。   Next, in step S21, the lens drive control unit 35 of the MPU 16 detects the focus position that is the lens position of the focus lens 11 that focuses the through image on the subject mask S2 by performing a normal contrast scan. . In this normal contrast scan, the lens drive control unit 35 of the MPU 16 first moves the focus position of the live view over the entire range from the closest side to the infinity side in the depth direction of the live view. The focus lens 11 is driven in the optical axis direction. Then, the lens drive control unit 35 of the MPU 16 obtains the contrast value of the subject mask S2 of the through image at each position, and detects the lens position of the focus lens 11 at which the contrast value of the subject mask S2 is the highest as the focus position.

一方、MPU16の特徴量算出部33は、被写体マスクS2のデフォーカス特徴量が算出可能であると判定した場合(ステップS20=YES)、合焦検出ステップとして、エッジE2における軸上色収差の評価値に基づいて被写体マスクS2のデフォーカス特徴量を算出する。なお、図9に示す例では、MPU16の特徴量算出部33は、先のステップS19において検出された3つのエッジE2における軸上色収差の評価値の平均値に基づいて、被写体マスクS2のデフォーカス特徴量を算出する。   On the other hand, when the feature amount calculation unit 33 of the MPU 16 determines that the defocus feature amount of the subject mask S2 can be calculated (step S20 = YES), the evaluation value of the longitudinal chromatic aberration at the edge E2 is used as the focus detection step. Based on the above, the defocus feature amount of the subject mask S2 is calculated. In the example shown in FIG. 9, the feature amount calculator 33 of the MPU 16 defocuses the subject mask S2 based on the average value of the axial chromatic aberration evaluation values at the three edges E2 detected in the previous step S19. The feature amount is calculated.

そして次に、ステップS22において、MPU16のレンズ駆動制御部35は、先のステップS20において算出された被写体マスクS2のデフォーカス特徴量の方向指標に基づいて、フォーカスレンズ11の駆動方向を設定する。   In step S22, the lens drive control unit 35 of the MPU 16 sets the drive direction of the focus lens 11 based on the direction index of the defocus feature amount of the subject mask S2 calculated in the previous step S20.

具体的には、MPU16のレンズ駆動制御部35は、被写体マスクS2のデフォーカス特徴量の方向指標が前ピン状態を示している場合、フォーカスレンズ11を光軸方向において撮像素子13から遠ざけるように、フォーカス駆動回路17によるAFモータ18の駆動方向を設定する。すなわち、MPU16のレンズ駆動制御部35は、スルー画が被写体マスクS2よりも近点側に合焦していると判断した場合には、スルー画の合焦位置をスルー画の奥行方向における無限遠側に移動させて被写体マスクS2の位置に合致させるように、フォーカス駆動回路17によるAFモータ18の駆動方向を設定する。   Specifically, the lens drive control unit 35 of the MPU 16 moves the focus lens 11 away from the image sensor 13 in the optical axis direction when the direction index of the defocus feature value of the subject mask S2 indicates the front pin state. The driving direction of the AF motor 18 by the focus driving circuit 17 is set. That is, when the lens drive control unit 35 of the MPU 16 determines that the through image is in focus closer to the near point side than the subject mask S2, the focus position of the through image is set to infinity in the depth direction of the through image. The driving direction of the AF motor 18 by the focus driving circuit 17 is set so as to be moved to the side and matched with the position of the subject mask S2.

一方、MPU16のレンズ駆動制御部35は、被写体マスクS2のデフォーカス特徴量の方向指標が後ピン状態を示している場合、フォーカスレンズ11を光軸方向において撮像素子13に近づけるように、フォーカス駆動回路17によるAFモータ18の駆動方向を設定する。すなわち、MPU16のレンズ駆動制御部35は、スルー画が被写体マスクS2よりも遠点側に合焦していると判断した場合には、スルー画の合焦位置をスルー画の奥行方向における至近側に移動させて被写体マスクS2の位置に合致させるように、フォーカス駆動回路17によるAFモータ18の駆動方向を設定する。   On the other hand, the lens drive control unit 35 of the MPU 16 performs focus drive so that the focus lens 11 is brought closer to the image sensor 13 in the optical axis direction when the direction index of the defocus feature value of the subject mask S2 indicates the rear pin state. The driving direction of the AF motor 18 by the circuit 17 is set. That is, when the lens drive control unit 35 of the MPU 16 determines that the through image is in focus on the far point side of the subject mask S2, the focus position of the through image is set to the closest side in the depth direction of the through image. The driving direction of the AF motor 18 by the focus driving circuit 17 is set so as to match the position of the subject mask S2.

続いて、ステップS23において、MPU16の信頼度算出部34は、先のステップS20において算出された被写体マスクS2のデフォーカス特徴量の信頼度Nを算出する。
具体的には、図9に示すように、MPU16の信頼度算出部34は、まず、スルー画のうち被写体マスクS2の画像部分を複数の分割領域Rに格子状に分割する。そして次に、MPU16の信頼度算出部34は、先のステップS19において検出されたエッジE2を含む分割領域Rの数を算出する。なお、図9に示す例では、エッジE2を含む分割領域Rの数は8個となっている。
Subsequently, in step S23, the reliability calculation unit 34 of the MPU 16 calculates the reliability N of the defocus feature amount of the subject mask S2 calculated in the previous step S20.
Specifically, as shown in FIG. 9, the reliability calculation unit 34 of the MPU 16 first divides the image portion of the subject mask S2 in the through image into a plurality of divided regions R in a grid pattern. Then, the reliability calculation unit 34 of the MPU 16 calculates the number of divided regions R including the edge E2 detected in the previous step S19. In the example shown in FIG. 9, the number of divided regions R including the edge E2 is eight.

そして、MPU16の信頼度算出部34は、分割領域Rの全体の数に対するエッジE2を含む分割領域Rの数の比率を信頼度Nとして算出する。すなわち、本実施形態では、デフォーカス特徴量を算出する際に軸上色収差の評価の対象となるエッジE2が、被写体マスクS2の全体に対してどの程度の比率で占めているかを算出している。そして、算出された比率を被写体マスクS2のデフォーカス特徴量の信頼度Nとして規定している。なお、図9に示す例では、分割領域Rの全体の数は64個であるため、分割領域Rの全体の数に対するエッジE2を含む分割領域Rの数の比率は1/8となっている。   Then, the reliability calculation unit 34 of the MPU 16 calculates the ratio of the number of the divided regions R including the edge E2 to the total number of the divided regions R as the reliability N. That is, in this embodiment, when calculating the defocus feature amount, the ratio of the edge E2 that is the target of the evaluation of the longitudinal chromatic aberration to the entire subject mask S2 is calculated. . The calculated ratio is defined as the reliability N of the defocus feature amount of the subject mask S2. In the example shown in FIG. 9, since the total number of the divided regions R is 64, the ratio of the number of the divided regions R including the edge E2 to the total number of the divided regions R is 1/8. .

そして次に、ステップS24において、MPU16のレンズ駆動制御部35は、先のステップS23において算出された信頼度Nが第1の閾値T1以上であるか否かを判定する。この第1の閾値T1は、MPU16のレンズ駆動制御部35が、先のステップS20において算出された被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいて、フォーカスレンズ11の駆動量を設定することが適切であるか否かを判断する際の基準値となっている。そのため、MPU16のレンズ駆動制御部35は、先のステップS23において算出された信頼度Nが第1の閾値T1未満である(ステップS24=NO)と判定した場合には、先のステップS20において算出された被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいて、フォーカスレンズ11の駆動量を設定することが適切ではないと判断する。   Next, in step S24, the lens drive control unit 35 of the MPU 16 determines whether or not the reliability N calculated in the previous step S23 is greater than or equal to the first threshold value T1. For the first threshold value T1, the lens drive control unit 35 of the MPU 16 sets the drive amount of the focus lens 11 based on the defocus amount of the defocus feature amount of the subject mask S2 calculated in the previous step S20. This is a reference value for determining whether or not this is appropriate. Therefore, if the lens drive control unit 35 of the MPU 16 determines that the reliability N calculated in the previous step S23 is less than the first threshold T1 (step S24 = NO), the calculation is performed in the previous step S20. It is determined that it is not appropriate to set the drive amount of the focus lens 11 based on the defocus amount of the defocus feature amount of the subject mask S2.

そして、ステップS25において、MPU16のレンズ駆動制御部35は、先のステップS22において設定された駆動方向に向けて現在のレンズ位置からフォーカスレンズ11を駆動させるようにフォーカス駆動回路17を駆動制御する。また、MPU16のレンズ駆動制御部35は、各位置でのスルー画における被写体マスクS2のコントラスト値を求め、被写体マスクS2のコントラスト値が最も高くなるフォーカスレンズ11のレンズ位置を合焦位置として検出する。   In step S25, the lens drive control unit 35 of the MPU 16 drives and controls the focus drive circuit 17 so as to drive the focus lens 11 from the current lens position in the drive direction set in the previous step S22. The lens drive control unit 35 of the MPU 16 obtains the contrast value of the subject mask S2 in the through image at each position, and detects the lens position of the focus lens 11 at which the contrast value of the subject mask S2 is the highest as the focus position. .

一方、MPU16のレンズ駆動制御部35は、先のステップS23において算出された信頼度Nが第1の閾値T1以上である(ステップS24=YES)と判定した場合には、先のステップS20において算出された被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいて、フォーカスレンズ11の駆動量を設定することが適切であると判断する。   On the other hand, if the lens drive control unit 35 of the MPU 16 determines that the reliability N calculated in the previous step S23 is equal to or higher than the first threshold T1 (step S24 = YES), the calculation is performed in the previous step S20. It is determined that it is appropriate to set the driving amount of the focus lens 11 based on the defocus amount of the defocus feature amount of the subject mask S2.

そして、ステップS26において、MPU16のレンズ駆動制御部35は、まず、先のステップS20において算出された被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいて、フォーカスレンズ11の合焦位置を推定する。続いて、MPU16のレンズ駆動制御部35は、現在のレンズ位置から推定された合焦位置に至るまでのフォーカスレンズ11の駆動量を目標駆動量Xとして算出する。なお、目標駆動量Xは、現在のレンズ位置から推定された合焦位置に至るまでフォーカスレンズ11を駆動させるために必要とされるAFモータ18の駆動信号のパルス数で表される。   In step S26, the lens drive controller 35 of the MPU 16 first estimates the focus position of the focus lens 11 based on the defocus amount of the defocus feature amount of the subject mask S2 calculated in the previous step S20. To do. Subsequently, the lens drive control unit 35 of the MPU 16 calculates the drive amount of the focus lens 11 from the current lens position to the estimated focus position as the target drive amount X. The target drive amount X is represented by the number of pulses of the drive signal of the AF motor 18 required to drive the focus lens 11 from the current lens position to the estimated focus position.

そして次に、ステップS27において、MPU16のレンズ駆動制御部35は、先のステップS23において算出された信頼度Nが第2の閾値T2以上であるか否かを判定する。第2の閾値T2は、MPU16のレンズ駆動制御部35が、先のステップS25において算出された目標駆動量Xを、現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として設定することが適切であるか否かを判断する際の基準値となっている。なお、目標駆動量Xを現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として設定するためには、被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいてフォーカスレンズ11の合焦位置を正確に推定することが求められる。この場合、被写体マスクS2のデフォーカス特徴量の信頼度Nを高くする必要があるため、第2の閾値T2は第1の閾値T1よりも大きい値として設定されている。   Next, in step S27, the lens drive control unit 35 of the MPU 16 determines whether or not the reliability N calculated in the previous step S23 is equal to or greater than the second threshold T2. For the second threshold T2, the lens drive control unit 35 of the MPU 16 sets the target drive amount X calculated in the previous step S25 as the drive amount of the focus lens 11 from the current lens position to the in-focus position. This is a reference value for determining whether or not is appropriate. In order to set the target drive amount X as the drive amount of the focus lens 11 from the current lens position to the in-focus position, the focus lens 11 is adjusted based on the defocus amount of the defocus feature amount of the subject mask S2. It is required to accurately estimate the focal position. In this case, since it is necessary to increase the reliability N of the defocus feature amount of the subject mask S2, the second threshold value T2 is set to be larger than the first threshold value T1.

そして、MPU16のレンズ駆動制御部35は、先のステップS23において算出された信頼度Nが第2の閾値T2以上である(ステップS27=YES)と判定した場合には、先のステップS26において算出された目標駆動量Xを、現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として設定することが適切であると判断する。   When the lens drive control unit 35 of the MPU 16 determines that the reliability N calculated in the previous step S23 is equal to or higher than the second threshold T2 (step S27 = YES), the calculation is performed in the previous step S26. It is determined that it is appropriate to set the set target drive amount X as the drive amount of the focus lens 11 from the current lens position to the in-focus position.

そして、ステップS28において、MPU16のレンズ駆動制御部35は、先のステップS26において算出された目標駆動量Xを、現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として設定する。   In step S28, the lens drive control unit 35 of the MPU 16 sets the target drive amount X calculated in the previous step S26 as the drive amount of the focus lens 11 from the current lens position to the in-focus position.

続いて、ステップS29において、MPU16のレンズ駆動制御部35は、先のステップS22において設定された駆動方向に向けて現在のレンズ位置からフォーカスレンズ11を目標駆動量Xだけ駆動させるようにフォーカス駆動回路17を駆動制御する。その結果、フォーカスレンズ11のレンズ位置が合焦位置に移動することにより、スルー画が被写体マスクS2の位置において合焦された状態となる。   Subsequently, in step S29, the lens drive control unit 35 of the MPU 16 drives the focus lens 11 from the current lens position by the target drive amount X toward the drive direction set in the previous step S22. 17 is driven and controlled. As a result, the lens position of the focus lens 11 moves to the in-focus position, so that the through image is in focus at the position of the subject mask S2.

一方、MPU16のレンズ駆動制御部35は、先のステップS23において算出された信頼度Nが第2の閾値T2未満である(ステップS27=NO)と判定した場合には、先のステップS26において算出された目標駆動量Xを、現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として設定することが適切でないと判断する。   On the other hand, if the lens drive control unit 35 of the MPU 16 determines that the reliability N calculated in the previous step S23 is less than the second threshold T2 (step S27 = NO), the calculation is performed in the previous step S26. It is determined that it is not appropriate to set the target drive amount X as the drive amount of the focus lens 11 from the current lens position to the in-focus position.

そして、ステップS30において、MPU16のレンズ駆動制御部35は、先のステップS26において算出された目標駆動量Xよりも小さい値を、現在のレンズ位置からのフォーカスレンズ11の駆動量として設定する。この場合、フォーカスレンズ11の駆動量は、目標駆動量Xに対して所定の比率を乗算した駆動量を設定してもよい。例えば、目標駆動量Xの80%の駆動量をフォーカスレンズ11の駆動量として設定してもよい。また、フォーカスレンズ11の駆動量は、先のステップS26において推定された合焦位置に対して所定の距離だけずれた位置に至るまでのフォーカスレンズ11の駆動量として設定してもよい。例えば、推定された合焦位置に対し、AFモータ18の駆動信号のパルス数として10パルス分に相当する距離だけずれた位置に至るまでの駆動量をフォーカスレンズ11の駆動量として設定してもよい。   In step S30, the lens drive control unit 35 of the MPU 16 sets a value smaller than the target drive amount X calculated in the previous step S26 as the drive amount of the focus lens 11 from the current lens position. In this case, the drive amount of the focus lens 11 may be set to a drive amount obtained by multiplying the target drive amount X by a predetermined ratio. For example, a drive amount that is 80% of the target drive amount X may be set as the drive amount of the focus lens 11. Further, the drive amount of the focus lens 11 may be set as the drive amount of the focus lens 11 up to a position shifted by a predetermined distance with respect to the focus position estimated in the previous step S26. For example, even if the driving amount of the focus lens 11 is set to a position that is shifted by a distance corresponding to 10 pulses as the number of pulses of the driving signal of the AF motor 18 from the estimated in-focus position. Good.

続いて、ステップS31において、MPU16のレンズ駆動制御部35は、先のステップS22において設定された駆動方向に向けて先のステップS30において設定された駆動量だけ現在のレンズ位置からフォーカスレンズ11を駆動させるようにフォーカス駆動回路17を駆動制御する。その結果、フォーカスレンズ11の位置が合焦位置の近傍まで移動する。   Subsequently, in step S31, the lens drive control unit 35 of the MPU 16 drives the focus lens 11 from the current lens position by the drive amount set in the previous step S30 toward the drive direction set in the previous step S22. The focus drive circuit 17 is controlled to be driven. As a result, the position of the focus lens 11 moves to the vicinity of the in-focus position.

そして次に、ステップS32において、MPU16のレンズ駆動制御部35は、先のステップS22において設定された駆動方向に向けて現在のレンズ位置からフォーカスレンズ11を駆動させるようにフォーカス駆動回路17を駆動制御する。また、MPU16のレンズ駆動制御部35は、各位置でのスルー画における被写体マスクS2のコントラスト値を求め、被写体マスクS2のコントラスト値が最も高くなるフォーカスレンズ11の位置を合焦位置として検出する。   Next, in step S32, the lens drive control unit 35 of the MPU 16 drives and controls the focus drive circuit 17 so as to drive the focus lens 11 from the current lens position toward the drive direction set in the previous step S22. To do. The lens drive control unit 35 of the MPU 16 obtains the contrast value of the subject mask S2 in the through image at each position, and detects the position of the focus lens 11 at which the contrast value of the subject mask S2 is the highest as the focus position.

続いて、ステップS33において、MPU16のレンズ駆動制御部35は、現在のレンズ位置から先のステップS32において検出された合焦位置までのフォーカスレンズ11の駆動量を算出する。そして、MPU16のレンズ駆動制御部35は、算出された駆動量だけフォーカスレンズ11を駆動させるようにフォーカス駆動回路17を駆動制御する。その結果、フォーカスレンズ11の位置が合焦位置に移動することにより、スルー画が被写体マスクS2の位置において合焦された状態となる。   Subsequently, in step S33, the lens drive control unit 35 of the MPU 16 calculates the drive amount of the focus lens 11 from the current lens position to the focus position detected in the previous step S32. Then, the lens drive control unit 35 of the MPU 16 drives and controls the focus drive circuit 17 so as to drive the focus lens 11 by the calculated drive amount. As a result, the through image is brought into focus at the position of the subject mask S2 by moving the position of the focus lens 11 to the focus position.

なお、ステップS33においては、MPU16のレンズ駆動制御部35は、先のステップS21又は先のステップS25において合焦位置が検出された場合と同様にして、現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量を算出する。そして、MPU16のレンズ駆動制御部35は、算出された駆動量だけフォーカスレンズ11を駆動させるようにフォーカス駆動回路17を駆動制御する。その結果、フォーカスレンズ11の位置が合焦位置に移動することにより、スルー画が被写体マスクS2の位置において合焦された状態となる。   In step S33, the lens drive control unit 35 of the MPU 16 focuses from the current lens position to the in-focus position in the same manner as when the in-focus position is detected in previous step S21 or previous step S25. The driving amount of the lens 11 is calculated. Then, the lens drive control unit 35 of the MPU 16 drives and controls the focus drive circuit 17 so as to drive the focus lens 11 by the calculated drive amount. As a result, the through image is brought into focus at the position of the subject mask S2 by moving the position of the focus lens 11 to the focus position.

そして次に、ステップS34において、MPU16は、撮影指示信号が入力されたか否かを判定する。この撮影指示信号は、レリーズボタン39が全押しされた際に画像処理エンジン14に操作信号として入力される。なお、モニタ24がタッチパネルである場合には、モニタ24が画像の撮影のためにタッチ操作された際に撮影指示信号が操作信号として画像処理エンジン14に入力される。そして、MPU16は、撮影指示信号が入力されていない(ステップS34=NO)と判定した場合、その処理をステップS11に戻し、撮影指示信号が入力されるまでステップS11〜ステップS33の処理を繰り返す。一方、MPU16は、撮影指示信号が入力された(ステップS34=YES)と判定した場合、その処理をステップS35に移行する。   Next, in step S34, the MPU 16 determines whether or not a photographing instruction signal has been input. This photographing instruction signal is input as an operation signal to the image processing engine 14 when the release button 39 is fully pressed. When the monitor 24 is a touch panel, a shooting instruction signal is input to the image processing engine 14 as an operation signal when the monitor 24 is touch-operated for shooting an image. If the MPU 16 determines that the shooting instruction signal has not been input (step S34 = NO), the MPU 16 returns the process to step S11 and repeats the processes of steps S11 to S33 until the shooting instruction signal is input. On the other hand, if the MPU 16 determines that the imaging instruction signal has been input (step S34 = YES), the process proceeds to step S35.

そして、ステップS35において、MPU16の画像処理部26は、その時点で撮像素子13から出力された画素信号に基づいて生成している静止画を撮影画像として不揮発性メモリ21に格納する。   In step S35, the image processing unit 26 of the MPU 16 stores the still image generated based on the pixel signal output from the image sensor 13 at that time in the nonvolatile memory 21 as a captured image.

次に、上記のように構成されたカメラ10の作用について、特に、MPU16が画像の一例としてスルー画の合焦位置を制御する際の作用に着目して以下説明する。
さて、スルー画における任意の画像部分からエッジE2を検出する場合、そのエッジE2がスルー画のうち人が注目することが想定される画像部分に位置するエッジE2とは限らない。そのため、検出されたエッジE2における軸上色収差の評価値を用いてスルー画の合焦位置を制御したとしても、スルー画を人が注目することが想定される画像部分において適切に合焦させることができない虞があった。
Next, the operation of the camera 10 configured as described above will be described below, particularly focusing on the operation when the MPU 16 controls the in-focus position of the through image as an example of the image.
When the edge E2 is detected from an arbitrary image portion in the through image, the edge E2 is not necessarily the edge E2 located in the image portion that is assumed to be noticed by the person in the through image. Therefore, even if the focus position of the live view image is controlled using the detected evaluation value of the axial chromatic aberration at the detected edge E2, the live view image is appropriately focused on an image portion that is expected to be noticed by a person. There was a possibility that I could not.

この点、本実施形態では、スルー画のうち人が注目することが想定される画像部分として被写体マスクS2が抽出された上で、抽出された被写体マスクS2の画像部分から軸上色収差の評価の対象となるエッジE2が検出される。そのため、このエッジE2における軸上色収差の評価値を用いてスルー画の合焦位置を制御することにより、スルー画は人が注目することが想定される画像部分において適切に合焦される。   In this regard, in the present embodiment, the subject mask S2 is extracted as an image portion that is assumed to be noticed by a person in the through image, and the axial chromatic aberration is evaluated from the image portion of the extracted subject mask S2. The target edge E2 is detected. Therefore, by controlling the focus position of the live view image using the evaluation value of the longitudinal chromatic aberration at the edge E2, the live view image is appropriately focused on the image portion that is expected to be noticed by a person.

また、本実施形態では、スルー画のうち何れの画像部分に被写体マスクS2が位置していたとしても、その被写体マスクS2の画像部分から軸上色収差の評価の対象となるエッジE2を検出することが可能である。そのため、スルー画における何れの位置に人が注目することが想定される画像部分が位置していたとしても、その画像部分においてスルー画が好適に合焦される。   Further, in the present embodiment, even if the subject mask S2 is located in any image portion of the through image, the edge E2 to be evaluated for the longitudinal chromatic aberration is detected from the image portion of the subject mask S2. Is possible. For this reason, even if an image portion assumed to be noticed by a person is located at any position in the through image, the through image is suitably focused on the image portion.

また、本実施形態では、スルー画から検出したエッジE2における軸上色収差の評価値を用いて被写体マスクS2のデフォーカス特徴量を算出している。そのため、被写体マスクS2のデフォーカス特徴量を算出するために、フォーカスレンズ11を光軸方向に移動させる必要がない。すなわち、本実施形態では、フォーカスレンズ11のレンズ位置が異なる複数の画像を用いて被写体マスクS2のデフォーカス特徴量を算出する構成や、フォーカスレンズ11を光軸方向に動かしながら撮影した一枚の画像を用いて被写体マスクS2のデフォーカス特徴量を算出する構成とは相違する。そのため、フォーカスレンズ11が光軸方向に移動することに起因してウォブリングを生じることがないため、モニタ24におけるスルー画の表示が乱れることが抑制される。   In this embodiment, the defocus feature amount of the subject mask S2 is calculated using the evaluation value of the axial chromatic aberration at the edge E2 detected from the through image. Therefore, it is not necessary to move the focus lens 11 in the optical axis direction in order to calculate the defocus feature amount of the subject mask S2. That is, in the present embodiment, a configuration in which the defocus feature amount of the subject mask S2 is calculated using a plurality of images with different lens positions of the focus lens 11, or a single image taken while moving the focus lens 11 in the optical axis direction. This is different from the configuration in which the defocus feature amount of the subject mask S2 is calculated using an image. Therefore, wobbling does not occur due to the movement of the focus lens 11 in the optical axis direction, so that the display of the through image on the monitor 24 is suppressed from being disturbed.

また、本実施形態では、被写体マスクS2のデフォーカス特徴量の信頼度Nに応じて、現在のレンズ位置から合焦位置に向けてのフォーカスレンズ11の駆動態様が変更される。   In the present embodiment, the driving mode of the focus lens 11 from the current lens position toward the in-focus position is changed according to the reliability N of the defocus feature amount of the subject mask S2.

すなわち、図10に示すように、被写体マスクS2のデフォーカス特徴量の信頼度Nが第1の閾値T1未満である場合には、スルー画が被写体マスクS2に対して前ピン状態又は後ピン状態の何れの状態であるかを判定することにより、AFモータ18の駆動方向が設定される。具体的には、スルー画が被写体マスクS2に対して前ピン状態である場合には、現在のレンズ位置から無限遠側にフォーカスレンズ11の駆動範囲が限定される。一方、スルー画が被写体マスクS2に対して後ピン状態である場合には、現在のレンズ位置から至近側にフォーカスレンズ11の駆動範囲が限定される。そのため、コントラストスキャンのスキャン範囲は、通常のコントラストスキャンの場合よりも狭くなるため、スルー画が被写体マスクS2の位置において迅速に合焦される。   That is, as shown in FIG. 10, when the reliability N of the defocus feature amount of the subject mask S2 is less than the first threshold T1, the through image is in the front pin state or the rear pin state with respect to the subject mask S2. By determining which state is, the driving direction of the AF motor 18 is set. Specifically, when the through image is in the front pin state with respect to the subject mask S2, the driving range of the focus lens 11 is limited to the infinity side from the current lens position. On the other hand, when the through image is in the rear pin state with respect to the subject mask S2, the driving range of the focus lens 11 is limited to the closest side from the current lens position. Therefore, the scan range of the contrast scan is narrower than that in the case of the normal contrast scan, and the through image is quickly focused at the position of the subject mask S2.

また、被写体マスクS2のデフォーカス特徴量の信頼度が第1の閾値T1以上であって第2の閾値T2未満である場合には、まず、被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいて合焦位置が推定される。そして、推定された合焦位置の近傍までフォーカスレンズ11が駆動された後に、推定された合焦位置を含むように合焦位置の前後両側に設定されるスキャン範囲内でコントラストスキャンが行われる。そのため、コントラストスキャンのスキャン範囲が更に狭くなるため、スルー画が被写体マスクS2の位置において更に迅速に合焦される。   When the reliability of the defocus feature amount of the subject mask S2 is equal to or higher than the first threshold T1 and less than the second threshold T2, first, the defocus feature amount of the subject mask S2 is set to the defocus amount. Based on this, the in-focus position is estimated. Then, after the focus lens 11 is driven to the vicinity of the estimated focus position, a contrast scan is performed within a scan range set on both sides before and after the focus position so as to include the estimated focus position. For this reason, since the scanning range of the contrast scan is further narrowed, the through image is focused more quickly at the position of the subject mask S2.

また、被写体マスクS2のデフォーカス特徴量の信頼度Nが第2の閾値T2以上である場合には、被写体マスクS2のデフォーカス特徴量のデフォーカス量に基づいて推定された合焦位置に向けて現在のレンズ位置からフォーカスレンズ11が直接駆動される。そのため、コントラストスキャンが行われることがないため、スルー画が被写体マスクS2の位置において更に迅速に合焦される。   When the reliability N of the defocus feature amount of the subject mask S2 is equal to or higher than the second threshold T2, the focus position is estimated based on the defocus amount of the defocus feature amount of the subject mask S2. Thus, the focus lens 11 is directly driven from the current lens position. Therefore, since the contrast scan is not performed, the through image is focused more rapidly at the position of the subject mask S2.

上記実施形態によれば、以下に示す効果を得ることができる。
(1)画像から抽出された被写体マスクS2のエッジE2の色成分量に基づいて被写体マスクS2のデフォーカス特徴量を算出し、算出されたデフォーカス特徴量に基づいて、画像を被写体マスクS2の位置において合焦させる合焦位置が検出される。すなわち、合焦位置を検出する際に、焦点調節を行うフォーカスレンズ11を駆動させる駆動量が低減されるため、コントラストスキャン方式の場合と比較して、合焦位置がより迅速に検出される。したがって、この合焦位置の検出結果に基づいてフォーカスレンズ11を駆動させることにより、画像を被写体マスクS2の位置において速やかに合焦させることができる。
According to the above embodiment, the following effects can be obtained.
(1) The defocus feature amount of the subject mask S2 is calculated based on the color component amount of the edge E2 of the subject mask S2 extracted from the image, and the image of the subject mask S2 is calculated based on the calculated defocus feature amount. A focus position for focusing at the position is detected. That is, when the focus position is detected, the drive amount for driving the focus lens 11 that performs focus adjustment is reduced, so that the focus position is detected more quickly than in the case of the contrast scan method. Therefore, by driving the focus lens 11 based on the detection result of the focus position, the image can be quickly focused at the position of the subject mask S2.

(2)合焦位置を検出する際にフォーカスレンズ11を駆動させる駆動量が低減されるため、画像がウォブリングによってぶれてしまうことを抑制できる。
(3)画像の色成分量を解析することにより、画像から抽出された被写体マスクS2のデフォーカス特徴量を算出している。そのため、被写体マスクS2のデフォーカス特徴量を算出するための専用のセンサを設ける必要がない。したがって、被写体マスクS2のデフォーカス特徴量を簡易な構成で算出することができる。
(2) Since the driving amount for driving the focus lens 11 when detecting the in-focus position is reduced, it is possible to suppress the image from being blurred due to wobbling.
(3) The defocus feature amount of the subject mask S2 extracted from the image is calculated by analyzing the color component amount of the image. Therefore, it is not necessary to provide a dedicated sensor for calculating the defocus feature amount of the subject mask S2. Therefore, the defocus feature amount of the subject mask S2 can be calculated with a simple configuration.

(4)被写体マスクS2のエッジE2が撮像素子13の撮像面上における何れの位置に位置していた場合であっても、そのエッジE2の色成分量を解析することにより、画像から抽出された被写体マスクS2のデフォーカス特徴量を算出することができる。   (4) Regardless of the position of the edge E2 of the subject mask S2 on the imaging surface of the image sensor 13, it is extracted from the image by analyzing the color component amount of the edge E2. The defocus feature amount of the subject mask S2 can be calculated.

(5)画像から人が注目することが想定される領域として被写体マスクS2を抽出し、その被写体マスクS2のエッジE2の色成分量に基づいて被写体マスクS2のデフォーカス特徴量を算出している。そのため、画像に含まれるエッジE2の中から人が注目することが想定される領域のエッジE2が選別される。したがって、画像の全体からエッジを検出する場合と比較して、画像を人が注目することが想定される領域において好適に合焦させることができる。   (5) The subject mask S2 is extracted from the image as a region expected to be noticed by a person, and the defocus feature amount of the subject mask S2 is calculated based on the color component amount of the edge E2 of the subject mask S2. . For this reason, the edge E2 of the region expected to be watched by a person is selected from the edges E2 included in the image. Therefore, compared with the case where an edge is detected from the entire image, the image can be suitably focused in a region where a person is expected to pay attention.

(6)画像から抽出された被写体マスクS2のエッジE2を検出し、検出されたエッジE2の色成分量に基づいて被写体マスクS2のデフォーカス特徴量を算出する。そして、算出されたデフォーカス特徴量に基づいて、画像を被写体マスクS2の位置において合焦させる合焦位置が検出される。したがって、この合焦位置の検出結果に基づいてフォーカスレンズ11を駆動させることにより、画像を被写体マスクS2の位置において速やかに合焦させることができる。   (6) The edge E2 of the subject mask S2 extracted from the image is detected, and the defocus feature amount of the subject mask S2 is calculated based on the detected color component amount of the edge E2. Then, based on the calculated defocus feature amount, a focus position for focusing the image at the position of the subject mask S2 is detected. Therefore, by driving the focus lens 11 based on the detection result of the focus position, the image can be quickly focused at the position of the subject mask S2.

(7)画像が被写体マスクS2のエッジE2に対して近点側及び遠点側のうち何れに合焦しているかに応じて、現在のレンズ位置からのフォーカスレンズ11の駆動方向が限定される。そのため、フォーカスレンズ11の可動域のうち至近側から無限側にかけての全域がコントラストスキャンのスキャン範囲である場合と比較して、コントラストスキャンのスキャン範囲が縮小される。したがって、画像を被写体マスクS2の位置においてより速やかに合焦させることができる。   (7) The driving direction of the focus lens 11 from the current lens position is limited depending on whether the image is focused on the near point side or the far point side with respect to the edge E2 of the subject mask S2. . For this reason, the scan range of the contrast scan is reduced as compared with the case where the entire range from the closest side to the infinite side of the movable range of the focus lens 11 is the scan range of the contrast scan. Therefore, the image can be focused more quickly at the position of the subject mask S2.

(8)被写体マスクS2のデフォーカス特徴量の信頼度Nが第1の閾値T1以上である場合には、現在のレンズ位置からのフォーカスレンズ11の駆動方向だけでなく、現在のレンズ位置からのフォーカスレンズ11の駆動量が設定される。そのため、現在のレンズ位置から一方の駆動方向へのフォーカスレンズ11の駆動を開始させると同時にコントラストスキャンを開始する場合と比較して、コントラストスキャンのスキャン範囲が縮小される。したがって、画像を被写体マスクS2の位置においてより速やかに合焦させることができる。   (8) When the reliability N of the defocus feature amount of the subject mask S2 is equal to or higher than the first threshold T1, not only the driving direction of the focus lens 11 from the current lens position but also the current lens position The driving amount of the focus lens 11 is set. Therefore, the scan range of the contrast scan is reduced as compared with the case where the contrast scan is started at the same time as the drive of the focus lens 11 from the current lens position in one drive direction is started. Therefore, the image can be focused more quickly at the position of the subject mask S2.

(9)被写体マスクS2のデフォーカス特徴量の信頼度Nが第2の閾値T2以上である場合には、そのデフォーカス特徴量に含まれる被写体マスクS2のデフォーカス量に対応する目標駆動量Xだけ現在のレンズ位置からフォーカスレンズ11を駆動させる。その結果、画像を被写体マスクS2の位置において合焦させる合焦位置にフォーカスレンズ11が配置される。すなわち、コントラストスキャンが行われることなくフォーカスレンズが合焦位置に配置されるため、画像を被写体マスクS2の位置においてより速やかに合焦させることができる。   (9) When the reliability N of the defocus feature amount of the subject mask S2 is equal to or greater than the second threshold T2, the target drive amount X corresponding to the defocus amount of the subject mask S2 included in the defocus feature amount Only the focus lens 11 is driven from the current lens position. As a result, the focus lens 11 is disposed at a focusing position where the image is focused at the position of the subject mask S2. That is, since the focus lens is arranged at the in-focus position without performing contrast scan, the image can be focused more quickly at the position of the subject mask S2.

(10)被写体マスクS2のデフォーカス特徴量の信頼度Nが第1の閾値T1以上であって且つ第2の閾値T2未満である場合には、そのデフォーカス特徴量に含まれる被写体マスクS2のデフォーカス量に対応する目標駆動量Xよりも小さい駆動量だけ現在のレンズ位置からフォーカスレンズ11を駆動させる。その結果、画像を被写体マスクS2の位置において合焦させる合焦位置に向けて現在のレンズ位置からフォーカスレンズ11が接近する。そのため、その接近した位置からフォーカスレンズ11を駆動方向に更に駆動しつつ画像に対してコントラストスキャンが行われた場合に、フォーカスレンズ11が合焦位置に向けて接近した分だけ、コントラストスキャンのスキャン範囲が縮小される。したがって、画像を被写体マスクS2の位置においてより速やかに合焦させることができる。   (10) When the reliability N of the defocus feature amount of the subject mask S2 is equal to or higher than the first threshold T1 and less than the second threshold T2, the subject mask S2 included in the defocus feature amount The focus lens 11 is driven from the current lens position by a drive amount smaller than the target drive amount X corresponding to the defocus amount. As a result, the focus lens 11 approaches from the current lens position toward the focusing position at which the image is focused at the position of the subject mask S2. Therefore, when the contrast scan is performed on the image while further driving the focus lens 11 in the driving direction from the approached position, the scan of the contrast scan is performed by the amount that the focus lens 11 approaches the in-focus position. The range is reduced. Therefore, the image can be focused more quickly at the position of the subject mask S2.

(11)被写体マスクS2を含む分割領域Rの数に対する被写体マスクS2のエッジE2を含む分割領域Rの数の比が高い場合、このエッジE2の色成分量に基づいて算出される被写体マスクS2のデフォーカス特徴量の信頼度は高くなる。その一方で、被写体マスクS2を含む分割領域Rの数に対する被写体マスクS2のエッジE2を含む分割領域Rの数の比が低い場合、このエッジE2の色成分量に基づいて算出される被写体マスクS2のデフォーカス特徴量の信頼度は低くなる。そのため、被写体マスクS2を含む分割領域Rの数に対する被写体マスクS2のエッジE2を含む分割領域Rの数の比に基づいて、被写体マスクS2のデフォーカス特徴量の信頼度Nを算出することができる。   (11) When the ratio of the number of divided regions R including the edge E2 of the subject mask S2 to the number of divided regions R including the subject mask S2 is high, the subject mask S2 calculated based on the color component amount of the edge E2 The reliability of the defocus feature amount is increased. On the other hand, when the ratio of the number of divided areas R including the edge E2 of the subject mask S2 to the number of divided areas R including the subject mask S2 is low, the subject mask S2 calculated based on the color component amount of the edge E2 The reliability of the defocus feature amount is low. Therefore, the reliability N of the defocus feature amount of the subject mask S2 can be calculated based on the ratio of the number of the divided regions R including the edge E2 of the subject mask S2 to the number of the divided regions R including the subject mask S2. .

(12)画像に対してラベリング処理を行うことにより、画像から人が注目することが想定される領域である被写体マスクS2の候補となるマスク領域を抽出することができる。   (12) By performing a labeling process on the image, it is possible to extract a mask area that is a candidate for the subject mask S2, which is an area that a person is expected to pay attention to from the image.

(13)画像に対してパターン認識処理を行うことにより、画像から人が注目することが想定される領域である被写体マスクS2の候補となるマスク領域を抽出することができる。   (13) By performing pattern recognition processing on the image, it is possible to extract from the image a mask area that is a candidate for the subject mask S2, which is an area that a person is expected to pay attention to.

(14)画像から複数の被写体マスクS2が抽出された場合であっても、これらの被写体マスクS2のうち至近側に位置する被写体マスクS2を人がより注目することが想定される被写体マスクS2であると判定し、その被写体マスクS2において画像を好適に合焦させることができる。   (14) Even when a plurality of subject masks S2 are extracted from the image, the subject mask S2 that is assumed to attract more attention to the subject mask S2 located on the closest side among these subject masks S2 It can be determined that the image is present, and the image can be suitably focused on the subject mask S2.

なお、上記実施形態は、以下のような別の実施形態に変更してもよい。
・上記実施形態において、被写体マスクS2のデフォーカス特徴量の信頼度Nが第1の閾値T1未満である場合に、被写体マスクS2のデフォーカス特徴量のデフォーカス量に応じて現在のレンズ位置から合焦位置に向けてのフォーカスレンズ11の駆動態様が変更されてもよい。
In addition, you may change the said embodiment into another embodiment as follows.
In the above embodiment, when the reliability N of the defocus feature amount of the subject mask S2 is less than the first threshold T1, the current lens position is determined according to the defocus amount of the defocus feature amount of the subject mask S2. The driving mode of the focus lens 11 toward the in-focus position may be changed.

例えば、図11に示すように、被写体マスクS2のデフォーカス特徴量が閾値Dよりも小さいデフォーカス量D1である場合には、現在のレンズ位置から至近側にかけての領域の全体がコントラストスキャンのスキャン範囲として設定されてもよい。一方、被写体マスクS2のデフォーカス特徴量が閾値Dよりも大きいデフォーカス量D2である場合には、現在のレンズ位置から至近側にかけての領域のうち、至近側に位置する半分の領域がコントラストスキャンのスキャン範囲として設定されてもよい。この場合、現在のレンズ位置と至近位置との中間までフォーカスレンズ11が駆動された後に、スキャン範囲として設定された至近側の半分の領域内でコントラストスキャンが行われる。そのため、コントラストスキャンのスキャン範囲が更に狭くなるため、スルー画が被写体マスクS2の位置において更に迅速に合焦される。なお、図11に示す例では、閾値Dは、現在のレンズ位置から至近側にかけての領域の中間よりも至近側に偏った位置に位置する被写体マスクS2のデフォーカス量として設定されている。   For example, as shown in FIG. 11, when the defocus feature amount of the subject mask S2 is a defocus amount D1 smaller than the threshold value D, the entire region from the current lens position to the closest side is scanned by contrast scanning. It may be set as a range. On the other hand, when the defocus feature amount of the subject mask S2 is the defocus amount D2 larger than the threshold value D, half of the region located on the closest side out of the region from the current lens position to the close side is subjected to contrast scanning. May be set as the scan range. In this case, after the focus lens 11 is driven to the middle between the current lens position and the closest position, a contrast scan is performed in the half area on the near side set as the scan range. For this reason, since the scanning range of the contrast scan is further narrowed, the through image is focused more quickly at the position of the subject mask S2. In the example shown in FIG. 11, the threshold value D is set as the defocus amount of the subject mask S2 located at a position that is biased closer to the near side than the middle of the region from the current lens position to the close side.

・上記実施形態において、MPU16の特徴量算出部33は、被写体マスクS2の輪郭部分のうち軸上色収差の評価に適したエッジE2がエッジ検出部32によって複数検出された場合に、これらのエッジE2に優先順位を設定してもよい。そして、優先順位が最も高いエッジE2における軸上色収差の評価値を用いて被写体マスクS2のデフォーカス特徴量を算出してもよい。この場合、優先順位は、エッジの強度、エッジの色成分、エッジのコントラスト、エッジのSN比、エッジの波形において平坦になっている範囲の幅、エッジの長さ等に基づいて設定される。   In the above embodiment, the feature amount calculation unit 33 of the MPU 16 determines that the edge E2 is detected when the edge detection unit 32 detects a plurality of edges E2 suitable for the evaluation of the longitudinal chromatic aberration in the contour portion of the subject mask S2. A priority order may be set for. Then, the defocus feature amount of the subject mask S2 may be calculated using the evaluation value of the longitudinal chromatic aberration at the edge E2 having the highest priority. In this case, the priority is set based on edge strength, edge color component, edge contrast, edge SN ratio, width of a flat range in the edge waveform, edge length, and the like.

・上記実施形態において、MPU16の信頼度算出部34は、被写体マスクS2のエッジE2が軸上収差の評価に適しているか否かを判定する基準となる評価値を算出し、算出されたエッジE2の評価値に基づいて被写体マスクS2のデフォーカス特徴量の信頼度を算出してもよい。この場合、例えば、エッジの強度、エッジの色成分、エッジのコントラスト、エッジのSN比、エッジの波形において平坦になっている範囲の幅、エッジの長さ等を評価項目としてエッジの評点をそれぞれ算出し、算出された評点の合計値がエッジE2の評価値として算出される。   In the above embodiment, the reliability calculation unit 34 of the MPU 16 calculates an evaluation value serving as a reference for determining whether or not the edge E2 of the subject mask S2 is suitable for evaluation of axial aberration, and calculates the calculated edge E2 The reliability of the defocus feature amount of the subject mask S2 may be calculated based on the evaluation value. In this case, for example, the edge score is evaluated using the edge strength, edge color component, edge contrast, edge SN ratio, width of the flat area of the edge waveform, edge length, etc. as evaluation items. The total value of the calculated scores is calculated as the evaluation value of the edge E2.

・上記実施形態において、MPU16のレンズ駆動制御部35は、被写体マスクS2のデフォーカス特徴量の信頼度Nが所定の閾値以上である場合に、目標駆動量Xを現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として一律に設定してもよい。また、MPU16のレンズ駆動制御部35は、被写体マスクS2のデフォーカス特徴量の信頼度Nが所定の閾値以上である場合に、目標駆動量Xよりも小さい値を現在のレンズ位置から合焦位置までのフォーカスレンズ11の駆動量として一律に設定してもよい。   In the above embodiment, the lens drive control unit 35 of the MPU 16 determines the target drive amount X from the current lens position to the in-focus position when the reliability N of the defocus feature value of the subject mask S2 is equal to or greater than a predetermined threshold. The driving amount of the focus lens 11 may be set uniformly. Further, the lens drive control unit 35 of the MPU 16 sets a value smaller than the target drive amount X from the current lens position to the focus position when the reliability N of the defocus feature value of the subject mask S2 is equal to or greater than a predetermined threshold. The driving amount of the focus lens 11 may be set uniformly.

・上記実施形態において、被写体マスクS2のデフォーカス特徴量が被写体マスクS2のデフォーカス量を含まなくてもよい。この場合、MPU16のレンズ駆動制御部35は、被写体マスクS2のデフォーカス特徴量に基づいて、フォーカスレンズ11の駆動量を設定することなくフォーカスレンズ11の駆動方向を設定する。   In the above embodiment, the defocus feature amount of the subject mask S2 may not include the defocus amount of the subject mask S2. In this case, the lens drive control unit 35 of the MPU 16 sets the drive direction of the focus lens 11 without setting the drive amount of the focus lens 11 based on the defocus feature value of the subject mask S2.

・上記実施形態において、MPU16のエッジ検出部32が被写体マスクS2の画像部分を微分フィルタによってスキャンしない構成であってもよい。この場合、MPU16の特徴量算出部33は、ラベリング処理又はパターン認識処理によって抽出された被写体マスクS2の輪郭部分における軸上色収差の評価値に基づいて、被写体マスクS2のデフォーカス特徴量を算出する。   In the above embodiment, the edge detection unit 32 of the MPU 16 may not be configured to scan the image portion of the subject mask S2 with the differential filter. In this case, the feature amount calculation unit 33 of the MPU 16 calculates the defocus feature amount of the subject mask S2 based on the evaluation value of the longitudinal chromatic aberration in the contour portion of the subject mask S2 extracted by the labeling process or the pattern recognition process. .

・上記実施形態において、MPU16は、動画の撮影時において、図8に示すレンズ駆動制御処理ルーチンと同様の処理を実行することにより、動画の合焦位置を制御してもよい。この場合、特に、動画の合焦位置を検出する際にフォーカスレンズ11を駆動させる駆動量が低減されるため、動画の画像内容がウォブリングによってぶれてしまうことを抑制できる。   In the above embodiment, the MPU 16 may control the in-focus position of the moving image by executing processing similar to the lens drive control processing routine shown in FIG. In this case, in particular, since the driving amount for driving the focus lens 11 when detecting the in-focus position of the moving image is reduced, it is possible to suppress the image content of the moving image from being blurred due to wobbling.

・上記実施形態において、画像の撮影機能を搭載したカメラ10以外の電子機器に対し、焦点調節を行うレンズの駆動を制御するレンズ駆動制御装置として画像処理エンジン14が搭載されてもよい。なお、画像の撮影機能を搭載した電子機器としては、例えば、ビデオカメラ、パーソナルコンピュータ、携帯電話機、携帯ゲーム機等が挙げられる。   In the above-described embodiment, the image processing engine 14 may be mounted as a lens drive control device that controls driving of a lens that performs focus adjustment on an electronic device other than the camera 10 that has an image shooting function. Note that examples of the electronic device having an image shooting function include a video camera, a personal computer, a mobile phone, and a portable game machine.

10…電子カメラの一例としてのデジタルカメラ、11…レンズの一例としてのフォーカスレンズ、13…撮像部の一例としての撮像素子、14…レンズ駆動制御装置の一例としての画像処理エンジン、31…領域抽出部、32…エッジ検出部、33…合焦検出部の一例としての特徴量算出部、34…信頼度算出部、35…レンズ駆動制御部、E2…エッジ、N…信頼度、R…分割領域、S2…特定領域の一例としての被写体マスク、T1…第1の閾値、T2…第2の閾値、X…目標駆動量。   DESCRIPTION OF SYMBOLS 10 ... Digital camera as an example of an electronic camera, 11 ... Focus lens as an example of a lens, 13 ... Image pick-up element as an example of an imaging part, 14 ... Image processing engine as an example of a lens drive control apparatus, 31 ... Area extraction , 32... Edge detection unit, 33... Feature amount calculation unit as an example of focus detection unit, 34... Reliability calculation unit, 35... Lens drive control unit, E 2. , S2 ... Subject mask as an example of specific area, T1 ... first threshold, T2 ... second threshold, X ... target drive amount.

Claims (11)

画像から特定領域を抽出する領域抽出部と、
前記領域抽出部が抽出した前記特定領域のエッジの色成分量に基づいて、前記特定領域の合焦状態を検出する合焦検出部と、
前記合焦検出部によって検出された前記特定領域の合焦状態に基づいて、焦点調節を行うレンズの駆動を制御するレンズ駆動制御部と
前記特定領域を複数の分割領域に分割し、前記特定領域を含む分割領域の数に対する前記特定領域の前記エッジを含む前記分割領域の数の比に基づいて、前記合焦検出部による前記特定領域の合焦状態の検出結果の信頼度を算出する算出部と
を備えたレンズ駆動制御装置。
An area extraction unit for extracting a specific area from an image;
A focus detection unit that detects a focus state of the specific region based on a color component amount of an edge of the specific region extracted by the region extraction unit;
A lens drive control unit that controls driving of a lens that performs focus adjustment based on a focus state of the specific region detected by the focus detection unit, and the specific region is divided into a plurality of divided regions, and the specific region based on the ratio of the number of the divided region including the edge of the specific area to the number of the divided regions including the calculation section for calculating a reliability of the detection result of the focus state of the specific region by the focus detection unit And a lens drive control device.
前記領域抽出部が抽出した前記特定領域の前記エッジを色成分毎に検出するエッジ検出部を更に備え、
前記合焦検出部は、前記エッジ検出部が色成分毎に検出した前記特定領域の前記エッジの色成分量に基づいて前記特定領域の合焦状態を検出する
請求項1に記載のレンズ駆動制御装置。
An edge detection unit that detects, for each color component, the edge of the specific region extracted by the region extraction unit;
The lens drive control according to claim 1, wherein the focus detection unit detects a focus state of the specific region based on a color component amount of the edge of the specific region detected for each color component by the edge detection unit. apparatus.
前記合焦状態は、画像が前記特定領域よりも近点側又は遠点側に合焦していることを示す方向指標を含み、
前記レンズ駆動制御部は、前記合焦検出部によって検出された前記方向指標に基づいて前記レンズの駆動方向を設定する
請求項1又は請求項2に記載のレンズ駆動制御装置。
The in-focus state includes a direction indicator indicating that the image is in focus on the near point side or the far point side of the specific region,
The lens drive control device according to claim 1, wherein the lens drive control unit sets a drive direction of the lens based on the direction indicator detected by the focus detection unit.
前記合焦状態は、前記特定領域のデフォーカス量を更に含み、
前記レンズ駆動制御部は、前記算出部が算出した値が所定の閾値以上である場合、前記合焦検出部によって検出された前記デフォーカス量に基づいて、前記レンズの駆動量を設定する
請求項3に記載のレンズ駆動制御装置。
The in-focus state further includes a defocus amount of the specific area,
The lens drive control unit sets the drive amount of the lens based on the defocus amount detected by the focus detection unit when the value calculated by the calculation unit is equal to or greater than a predetermined threshold. 4. The lens drive control device according to 3.
前記算出部が算出した値は、前記所定の閾値を第1の閾値とした場合、該第1の閾値よりも大きい閾値として第2の閾値が更に設定されており、
前記レンズ駆動制御部は、前記算出部が算出した値が前記第2の閾値以上である場合、前記合焦検出部によって検出された前記デフォーカス量に基づいて、画像を前記特定領域において合焦させるレンズの目標駆動量を算出し、算出した目標駆動量を前記レンズの駆動量として設定する
請求項4に記載のレンズ駆動制御装置。
As for the value calculated by the calculation unit, when the predetermined threshold is the first threshold, a second threshold is further set as a threshold larger than the first threshold,
When the value calculated by the calculation unit is equal to or greater than the second threshold value, the lens drive control unit focuses the image in the specific region based on the defocus amount detected by the focus detection unit. The lens drive control device according to claim 4, wherein a target drive amount of the lens to be calculated is calculated, and the calculated target drive amount is set as the drive amount of the lens.
前記レンズ駆動制御部は、前記算出部が算出した値が前記第1の閾値以上であって且つ前記第2の閾値未満である場合、前記目標駆動量よりも小さい値を前記レンズの駆動量として設定する
請求項5に記載のレンズ駆動制御装置。
When the value calculated by the calculation unit is greater than or equal to the first threshold value and less than the second threshold value, the lens drive control unit sets a value smaller than the target drive amount as the lens drive amount. The lens drive control device according to claim 5, wherein the lens drive control device is set.
前記領域抽出部は、画像に対してラベリング処理を行うことにより前記特定領域を抽出する
請求項1〜請求項のうち何れか一項に記載のレンズ駆動制御装置。
Said region extraction unit, the lens drive control device according to any one of claims 1 to 6 for extracting the specific region by performing labeling processing on the image.
前記領域抽出部は、画像に対してパターン認識処理を行うことにより前記特定領域を抽出する
請求項1〜請求項のうち何れか一項に記載のレンズ駆動制御装置。
Said region extraction unit, the lens drive control device according to any one of claims 1 to 6 for extracting the specific region by performing pattern recognition processing on the image.
前記合焦検出部は、前記領域抽出部が画像から複数の前記特定領域を抽出した場合、複数の前記特定領域のうち画像の奥行方向において至近側に位置する前記特定領域の色成分量に基づいて前記特定領域の合焦状態を検出する
請求項1〜請求項のうち何れか一項に記載のレンズ駆動制御装置。
When the region extraction unit extracts a plurality of the specific regions from the image, the focus detection unit is based on the color component amount of the specific region located on the closest side in the depth direction of the image among the plurality of specific regions. The lens drive control device according to any one of claims 1 to 8 , wherein an in-focus state of the specific region is detected.
被写体を撮像する撮像部と、
前記撮像部が撮像した被写体に応じた画像の焦点調節を行うレンズの駆動を制御する請求項1〜請求項のうち何れか一項に記載のレンズ駆動制御装置と
を備えた電子カメラ。
An imaging unit for imaging a subject;
An electronic camera comprising: the lens drive control device according to any one of claims 1 to 9 that controls driving of a lens that performs focus adjustment of an image according to a subject imaged by the imaging unit.
コンピュータに、
画像から特定領域を抽出する領域抽出ステップと、
前記領域抽出ステップにおいて抽出された前記特定領域のエッジの色成分量に基づいて、前記特定領域の合焦状態を検出する合焦検出ステップと、
前記合焦検出ステップにおける前記特定領域の合焦状態の検出結果に基づいて、焦点調節を行うレンズの駆動を制御するレンズ駆動制御ステップと、
前記特定領域を複数の分割領域に分割し、前記特定領域を含む分割領域の数に対する前記特定領域の前記エッジを含む前記分割領域の数の比に基づいて、前記合焦検出ステップにおいて検出された前記特定領域の合焦状態の検出結果の信頼度を算出する算出ステップと
を実行させるレンズ駆動制御プログラム。
On the computer,
An area extraction step for extracting a specific area from the image;
A focus detection step of detecting a focus state of the specific region based on the color component amount of the edge of the specific region extracted in the region extraction step;
A lens driving control step for controlling driving of a lens for performing focus adjustment based on a detection result of a focusing state of the specific area in the focusing detection step;
The specific area is divided into a plurality of divided areas, and detected in the focus detection step based on a ratio of the number of the divided areas including the edge of the specific area to the number of divided areas including the specific area. A lens driving control program for executing a calculation step of calculating a reliability of a detection result of an in- focus state of the specific region.
JP2013245992A 2013-11-28 2013-11-28 Lens drive control device, electronic camera, and lens drive control program Active JP6464553B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013245992A JP6464553B2 (en) 2013-11-28 2013-11-28 Lens drive control device, electronic camera, and lens drive control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013245992A JP6464553B2 (en) 2013-11-28 2013-11-28 Lens drive control device, electronic camera, and lens drive control program

Publications (2)

Publication Number Publication Date
JP2015102855A JP2015102855A (en) 2015-06-04
JP6464553B2 true JP6464553B2 (en) 2019-02-06

Family

ID=53378548

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013245992A Active JP6464553B2 (en) 2013-11-28 2013-11-28 Lens drive control device, electronic camera, and lens drive control program

Country Status (1)

Country Link
JP (1) JP6464553B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10798316B2 (en) * 2017-04-04 2020-10-06 Hand Held Products, Inc. Multi-spectral imaging using longitudinal chromatic aberrations

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008046181A (en) * 2006-08-11 2008-02-28 Sony Corp Focus controller, focus control method, imaging apparatus and program
JP2008216828A (en) * 2007-03-07 2008-09-18 Fujifilm Corp Digital camera and photographing method
JP5463688B2 (en) * 2009-02-27 2014-04-09 株式会社ニコン Focus evaluation device, camera and program
JP2011030008A (en) * 2009-07-27 2011-02-10 Canon Inc Imaging apparatus
JP5757099B2 (en) * 2010-02-15 2015-07-29 株式会社ニコン Focus adjustment device and focus adjustment program
JP2013162174A (en) * 2012-02-01 2013-08-19 Nikon Corp Imaging apparatus
JP5917207B2 (en) * 2012-03-14 2016-05-11 キヤノン株式会社 Focus adjustment device

Also Published As

Publication number Publication date
JP2015102855A (en) 2015-06-04

Similar Documents

Publication Publication Date Title
US9607240B2 (en) Image processing apparatus, image capturing apparatus, image processing method, image capturing method, and non-transitory computer-readable medium for focus bracketing
US6738197B2 (en) Autofocusing apparatus
JP5374119B2 (en) Distance information acquisition device, imaging device, and program
JP5789091B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US20120105590A1 (en) Electronic equipment
US10395348B2 (en) Image pickup apparatus, image processing apparatus, and control method of image pickup apparatus
JP4122865B2 (en) Autofocus device
US20060291845A1 (en) Apparatus and method for deciding in-focus position of imaging lens
US7614559B2 (en) Apparatus and method for deciding in-focus position of imaging lens
US20100182495A1 (en) Focusing measurement device, focusing measurement method, and program
US10311327B2 (en) Image processing apparatus, method of controlling the same, and storage medium
JP2018163365A (en) Image processing apparatus
JP5499531B2 (en) Electronic camera
JP2010154306A (en) Device, program and method for imaging control
JP5369729B2 (en) Image processing apparatus, imaging apparatus, and program
JP6464553B2 (en) Lens drive control device, electronic camera, and lens drive control program
JP2007258923A (en) Image processing apparatus, image processing method, image processing program
JP6349703B2 (en) Electronic camera and image processing program
JP5206300B2 (en) Program, camera, image processing apparatus, and method for calculating focus degree of image
JP6467824B2 (en) Imaging device
JP7458723B2 (en) Image processing device, imaging device, control method, and program
US20230276127A1 (en) Image processing apparatus and image processing method
JP2011147076A (en) Image processing apparatus, image capturing apparatus and program
JP2004219461A (en) Imaging apparatus and auto-focusing device
JP6314281B1 (en) Image processing method and foreground region acquisition method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161102

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170731

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170905

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20171106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180626

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20180827

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181025

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181211

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181224

R150 Certificate of patent or registration of utility model

Ref document number: 6464553

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250