JP6071173B2 - Imaging apparatus, control method thereof, and program - Google Patents

Imaging apparatus, control method thereof, and program Download PDF

Info

Publication number
JP6071173B2
JP6071173B2 JP2011115121A JP2011115121A JP6071173B2 JP 6071173 B2 JP6071173 B2 JP 6071173B2 JP 2011115121 A JP2011115121 A JP 2011115121A JP 2011115121 A JP2011115121 A JP 2011115121A JP 6071173 B2 JP6071173 B2 JP 6071173B2
Authority
JP
Japan
Prior art keywords
motion vector
evaluation
evaluation area
area
imaging
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
JP2011115121A
Other languages
Japanese (ja)
Other versions
JP2012242759A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2011115121A priority Critical patent/JP6071173B2/en
Publication of JP2012242759A publication Critical patent/JP2012242759A/en
Application granted granted Critical
Publication of JP6071173B2 publication Critical patent/JP6071173B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Description

本発明は、ビデオカメラやデジタルカメラ等の撮像装置、その制御方法及びプログラムに関し、車両や移動体に搭載した車載撮影におけるオートフォーカスや自動露出制御等に適用される。   The present invention relates to an imaging apparatus such as a video camera and a digital camera, and a control method and program thereof, and is applied to autofocus, automatic exposure control, and the like in in-vehicle shooting mounted on a vehicle or a moving body.

車両の運転席近傍に取り付けられる車載用ビデオカメラは、ドライブ中、その運転席から見える範囲の映像を常時撮影して記録媒体に記録し、事故が発生した時には、所定の短い時間経過後まで記録した後、その記録を停止するよう構成されている。これにより、事故直前から直後の撮影映像を再生して、その事故が如何なる原因で生じたかを検証することができる。   An in-vehicle video camera installed in the vicinity of the driver's seat of a vehicle always captures and records on the recording medium the image that can be seen from the driver's seat during driving, and records it until a predetermined short time has elapsed when an accident occurs. After that, the recording is stopped. Thereby, it is possible to reproduce the captured video immediately before and immediately after the accident and to verify the cause of the accident.

このようなドライブ状態を撮影できる機能を備えたビデオカメラは、業務用車両のみならず、全ての個人の乗用車にも搭載されることが望ましい。しかしながら、このようなビデオカメラは実際には一部のタクシー等の業務用車両にしか搭載されていない。この種のビデオカメラは専用装置であるが故に高価なものであり、個人の乗用車等には搭載し難い。   It is desirable that a video camera having a function capable of photographing such a drive state is mounted not only on a commercial vehicle but also on all private passenger cars. However, such a video camera is actually mounted only on some commercial vehicles such as taxis. Since this type of video camera is a dedicated device, it is expensive and difficult to install in personal passenger cars.

一方で、コンシューマ用ビデオカメラは年々安価になり、主に家庭用として大多数の家庭に普及している。特許文献1には、普及型の手振れ検出センサーを備えたビデオカメラを用いて、車両のドライブ中、その車両の前方の広範囲にわたる情景を容易に撮影、記録できるようにしたビデオステーション、ビデオカメラ、車載用ビデオカメラ装置及び車両が開示されている。   On the other hand, consumer video cameras are becoming cheaper year by year, and are widely used in most homes mainly for home use. Patent Document 1 discloses a video station, a video camera, and a video station that can easily capture and record a wide range of scenes in front of the vehicle while driving the vehicle, using a video camera equipped with a popular hand shake detection sensor. An in-vehicle video camera device and a vehicle are disclosed.

従来より、ビデオカメラは、撮影対象物すなわち被写体にピントがあった最適合焦状態で確実に撮影を行うためにオートフォーカスが広く採用されている。オートフォーカスでは、画面の中央部分の測距領域に撮影対象物を位置させることで、上記撮影対象物に対する合焦状態を検出して、撮像光学系の合焦機構を自動調整する。被写体に対する合焦状態を検出する手法としては、合焦位置における撮像出力に含まれる先鋭度情報が最大になることを利用して合焦状態を検出する方式が知られている。   2. Description of the Related Art Conventionally, video cameras have widely employed autofocus in order to reliably perform shooting in an optimally focused state where a shooting target, that is, a subject is in focus. In auto-focusing, the imaging object is positioned in the distance measuring area at the center of the screen, thereby detecting the in-focus state with respect to the imaging object and automatically adjusting the focusing mechanism of the imaging optical system. As a method for detecting the in-focus state with respect to the subject, a method for detecting the in-focus state using the fact that the sharpness information included in the imaging output at the in-focus position is maximized is known.

また、近年では、画像の手振れ補正等のために、画像信号から動きベクトルを検出する検討が盛んに行われている。この動きベクトルを用いて、被写体の動きを検出し、被写体を追尾して自動合焦を行う被写体追尾方式の自動合焦機能の開発も盛んになりつつある。   In recent years, studies for detecting a motion vector from an image signal have been actively conducted for image shake correction and the like. Development of an automatic focusing function of a subject tracking method that detects the movement of a subject using this motion vector and tracks the subject for automatic focusing is also becoming popular.

特開2006−261865号公報JP 2006-261865 A 米国特許3890462号明細書U.S. Pat. No. 3,890,462 特公昭60−46878号公報Japanese Examined Patent Publication No. 60-46878

B.K.P. Horn, Artificial Intelligence 17, p.185 〜203 (1981)B.K.P.Horn, Artificial Intelligence 17, p.185〜203 (1981) 尾上守夫、情報処理Vol. 17, No.7, p.634 〜 640 July 1976Morio Onoe, Information Processing Vol. 17, No. 7, p.634-640 July 1976

しかしながら、上記従来例で説明したビデオカメラでは、車載撮影等に特化した機能は無く、車載撮影には不都合が生じる場合がある。例えば、走行中の撮影の場合、通常の撮影とは異なり、撮影者が常に被写体を狙って撮影しているわけではなく、車体の一部に固定されていることが考えられる。車体に固定されている場合、進行方向に対するカメラの角度や、道路のカーブによっては、主被写体が常に画面の中央部分に存在するとは限らない。このような撮影において、画面の中央部分に測距領域を設定して焦点調節を行った場合、ユーザの意図とは違う被写体にピントが合ってしまい主被写体にボケが生じる可能性がある。   However, the video camera described in the above conventional example does not have a function specialized for in-vehicle shooting or the like, and may cause inconvenience in in-vehicle shooting. For example, in the case of shooting while traveling, unlike the normal shooting, the photographer does not always aim at the subject but may be fixed to a part of the vehicle body. When fixed to the vehicle body, the main subject is not always present at the center of the screen depending on the angle of the camera with respect to the traveling direction and the curve of the road. In such shooting, when focus adjustment is performed by setting a distance measurement area in the center portion of the screen, a subject different from the user's intention may be focused and the main subject may be blurred.

また、走行中の撮影の場合、走行方向や速度に応じて、画面内の映像に流れが発生する。測距領域内の映像が流れた場合、測距値の変動が激しく変化して、正しい測距値が得られず、オートフォーカスが安定せず、映像にフワつきが発生してしまう可能性がある。   In the case of shooting while traveling, a flow occurs in the image on the screen in accordance with the traveling direction and speed. When the image in the distance measurement area flows, the fluctuation of the distance measurement value changes drastically, the correct distance measurement value cannot be obtained, the autofocus is not stable, and the image may be fluffed. is there.

さらに、車載撮影の場合、画面内に車体の一部、又は車内の一部が写り込む状態が発生しやすい。しかしながら、車内と車外の明るさに大きな変化があるため、露出を調整する評価枠の設定を誤ると適正露出にならずに、露出がアンダー又はオーバーな映像が記録されてしまう可能性がある。   Furthermore, in the case of in-vehicle shooting, a state in which a part of the vehicle body or a part of the vehicle is reflected in the screen is likely to occur. However, since there is a large change in the brightness of the inside and outside of the vehicle, if the evaluation frame for adjusting the exposure is set incorrectly, there is a possibility that an underexposed or overexposed video is recorded without proper exposure.

本発明は上記問題点に鑑みてなされたものであり、車載撮影において、自動的にオートフォーカスや露出制御用の評価領域を設定し、常に安定したピント、安定した露出での撮影を可能にすることを目的とする。   The present invention has been made in view of the above-described problems, and in on-vehicle shooting, an evaluation area for autofocus and exposure control is automatically set to always enable shooting with stable focus and stable exposure. For the purpose.

本発明の撮像装置は、撮像光学系により結像された光学像を映像信号に変換する撮像手段と、前記撮像手段で得られる映像信号から動きベクトルを検出する動きベクトル検出手段と、前記動きベクトルの検出結果に応じて、所定の評価値を得るための当該映像上の評価領域を設定する評価領域設定手段とを備え、前記動きベクトル検出手段は、前記撮像手段で得られる映像をx方向及びy方向に複数のブロックに分割し、各ブロックで動きベクトルを検出し、前記評価領域設定手段は、前記各ブロックで検出した動きベクトルの交点領域を前記評価領域とし、前記各ブロックで算出される動きベクトルの交点領域を特定できず、かつ、前記各ブロックで算出される動きベクトルが一方向に向いている場合は、予め定められた固定の初期位置にある評価領域を用い、動きベクトルの大きさに応じて、その評価領域の大きさを変更する。 An imaging apparatus according to the present invention includes an imaging unit that converts an optical image formed by an imaging optical system into a video signal, a motion vector detection unit that detects a motion vector from the video signal obtained by the imaging unit, and the motion vector Evaluation region setting means for setting an evaluation region on the video for obtaining a predetermined evaluation value in accordance with the detection result, and the motion vector detection means outputs the video obtained by the imaging means in the x direction and Dividing into a plurality of blocks in the y direction, detecting a motion vector in each block, the evaluation area setting means calculates the intersection area of the motion vector detected in each block as the evaluation area, and is calculated in each block can not identify the intersection area of the motion vector, and, if the motion vector calculated for each block are oriented in one direction, the initial position of the predetermined fixed With that evaluation area, depending on the size of the motion vector, to change the size of the evaluation area.

本発明によれば、車載撮影において、自動的にオートフォーカスや露出制御用の評価領域を設定し、常に安定したピント、安定した露出での撮影が可能になる。例えばコンシューマ用ビデオカメラを車載撮影のために車体に固定し撮影した場合においても、映像信号から検出される動きベクトルを用いることにより、映像の流れが少ない領域に評価領域を設定することができ、安定した評価値を取得することが可能になる。   According to the present invention, an evaluation area for autofocus and exposure control is automatically set in in-vehicle shooting, and shooting with always stable focus and stable exposure becomes possible. For example, even when a consumer video camera is fixed to the vehicle body for in-vehicle shooting, by using a motion vector detected from the video signal, the evaluation area can be set in an area where the image flow is small, It becomes possible to acquire a stable evaluation value.

第1の実施形態に係る撮像装置であるビデオカメラの構成を示す図である。It is a figure which shows the structure of the video camera which is an imaging device which concerns on 1st Embodiment. 焦点調節制御を示すフローチャートである。It is a flowchart which shows focus adjustment control. 図2のフローチャートのTV−AF制御の詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process of TV-AF control of the flowchart of FIG. 図3のフローチャートの微小駆動モードの詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process of the micro drive mode of the flowchart of FIG. 微小駆動モードでのフォーカスレンズの動作を示す特性図である。FIG. 10 is a characteristic diagram illustrating the operation of the focus lens in a minute driving mode. 図3のフローチャートの山登りモードの詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process of the mountain climbing mode of the flowchart of FIG. 山登り駆動モード時のフォーカスレンズの動作を示す特性図である。FIG. 10 is a characteristic diagram illustrating the operation of the focus lens in the hill-climbing drive mode. 動きベクトルに応じた評価枠の設定を説明するための図である。It is a figure for demonstrating the setting of the evaluation frame according to a motion vector. 車体の移動と動きベクトルとの関係を示す図である。It is a figure which shows the relationship between the movement of a vehicle body, and a motion vector. 動きベクトルを用いた評価枠の設定判定を示すフローチャートである。It is a flowchart which shows the setting determination of the evaluation frame using a motion vector. 動きベクトルを用いた評価枠の設定例を示す図である。It is a figure which shows the example of a setting of the evaluation frame using a motion vector. 動きベクトルを用いた評価枠の設定例を示す図である。It is a figure which shows the example of a setting of the evaluation frame using a motion vector. 動きベクトルを用いた評価枠の設定例を示す図である。It is a figure which shows the example of a setting of the evaluation frame using a motion vector. 動きベクトルを用いた評価枠の設定例を示す図である。It is a figure which shows the example of a setting of the evaluation frame using a motion vector. 動きベクトルに応じた評価枠の大きさ変更を示す図である。It is a figure which shows the magnitude | size change of the evaluation frame according to a motion vector. 動きベクトルに応じた評価枠の設定を示すフローチャートである。It is a flowchart which shows the setting of the evaluation frame according to a motion vector. 第2の実施形態に係る撮像装置であるビデオカメラの構成を示す図である。It is a figure which shows the structure of the video camera which is an imaging device which concerns on 2nd Embodiment. 露出制御を行う際のプログラム線図を示す図である。It is a figure which shows the program diagram at the time of performing exposure control. カメラマイコンに保持される露出制御用のデータテーブルを示す図である。It is a figure which shows the data table for exposure control hold | maintained at a camera microcomputer. 露出調節制御を示すフローチャートである。It is a flowchart which shows exposure adjustment control. 動きベクトルの交点領域を利用したAEの重み付けを示す図である。It is a figure which shows the weighting of AE using the intersection area | region of a motion vector.

以下、添付図面を参照して、本発明の好適な実施形態について説明する。
<第1の実施形態>
図1は、第1の実施形態に係るビデオカメラの構成を示す図である。なお、本実施形態ではビデオカメラについて説明するが、本発明はデジタルスチルカメラ等、他の撮像装置への適用も可能である。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
<First Embodiment>
FIG. 1 is a diagram illustrating a configuration of a video camera according to the first embodiment. Although the present embodiment describes a video camera, the present invention can be applied to other imaging devices such as a digital still camera.

図1において、101は第1固定レンズである。102は光軸方向に移動して変倍を行う変倍レンズである。103は絞りである。104は第2固定レンズである。105は変倍に伴う焦点面の移動を補正する機能とフォーカシングの機能とを兼ね備えたフォーカスコンペンセータレンズ(以下、フォーカスレンズという)である。これら第1固定レンズ101、変倍レンズ102、絞り103、第2固定レンズ104及びフォーカスレンズ105により撮像光学系が構成される。   In FIG. 1, reference numeral 101 denotes a first fixed lens. Reference numeral 102 denotes a variable power lens that moves in the optical axis direction to perform variable power. Reference numeral 103 denotes an aperture. Reference numeral 104 denotes a second fixed lens. Reference numeral 105 denotes a focus compensator lens (hereinafter referred to as a focus lens) having both a function of correcting the movement of the focal plane due to zooming and a focusing function. The first fixed lens 101, the variable power lens 102, the diaphragm 103, the second fixed lens 104, and the focus lens 105 constitute an imaging optical system.

106は撮像光学系により結像される光学像を映像信号に変換する光電変換素子としての撮像素子であり、CCDセンサやCMOSセンサにより構成される。107はCDS/AGC/ADコンバータであり、撮像素子106の出力をサンプリング、ゲイン調整、デジタル化する。108はカメラ信号処理回路であり、CDS/AGC/ADコンバータ107からの出力信号に対して各種の画像処理を施す。109は表示装置であり、カメラ信号処理回路108からの映像信号を表示する。110は記録装置であり、カメラ信号処理回路108からの映像信号を磁気テープ、光ディスク、半導体メモリ等の記録媒体に記録する。   Reference numeral 106 denotes an imaging element as a photoelectric conversion element that converts an optical image formed by the imaging optical system into a video signal, and is constituted by a CCD sensor or a CMOS sensor. Reference numeral 107 denotes a CDS / AGC / AD converter that samples, gain adjusts, and digitizes the output of the image sensor 106. A camera signal processing circuit 108 performs various image processing on the output signal from the CDS / AGC / AD converter 107. Reference numeral 109 denotes a display device that displays a video signal from the camera signal processing circuit 108. A recording device 110 records the video signal from the camera signal processing circuit 108 on a recording medium such as a magnetic tape, an optical disk, or a semiconductor memory.

111はAFゲートであり、CDS/AGC/ADコンバータ107からの全画素の出力信号のうち焦点検出に用いられる領域の信号のみを通す。112は焦点信号処理回路であり、AFゲート111を通過した信号から高周波成分や該高周波信号から生成した輝度差成分(AFゲート111を通過した信号の輝度レベルの最大値と最小値の差分)等を抽出して焦点信号を生成する。ここで、焦点信号は、撮像素子106からの出力信号に基づいて生成される映像の鮮鋭度(コントラスト状態)を表すものであるが、鮮鋭度は撮像光学系の焦点状態によって変化するので、結果的に撮像光学系の焦点状態を表す信号となる。   Reference numeral 111 denotes an AF gate which passes only signals in an area used for focus detection among output signals of all pixels from the CDS / AGC / AD converter 107. A focus signal processing circuit 112 is a high-frequency component from a signal that has passed through the AF gate 111, a luminance difference component generated from the high-frequency signal (difference between the maximum value and the minimum value of the luminance level of the signal that has passed through the AF gate 111), etc. To extract a focus signal. Here, the focus signal represents the sharpness (contrast state) of the image generated based on the output signal from the image sensor 106, but the sharpness changes depending on the focus state of the image pickup optical system. In other words, the signal represents the focus state of the imaging optical system.

113は動きベクトル検出回路であり、映像信号に対して公知の動きベクトル検出処理を施し、映像上の複数の領域に対して動きベクトルを検出処理する。画像の符号化装置や画像触れ補正装置に必要な動きベクトル検出方法としては、特許文献2や特許文献3等に記載の時空間勾配法、或いは相関演算に基づく相関法やブロックマッチング法(テンプレートマッチング法)がある。時空間勾配法については、非特許文献1で詳しく論じられている。また、ブロックマッチング法については、非特許文献2で詳しく論じられている。時空間勾配法は、フレーム(或いはフィールド)間の輝度差dと画面内の画素間の輝度差Δから、画像の動き量をd/Δで表す方法である。これは、カメラから得られる信号がフィールド周期の時間平均であり、画像の動き量が大きいほどエッジが鈍り、画素間の輝度差Δが小さくなる性質を利用し、フレーム(或いはフィールド)間の輝度差dを信号Δで正規化したものである。一方、ブロックマッチング法は、入力画像信号を適当な大きさのブロック(例えば8画素×8ライン)に分割し、ブロック単位に前のフレーム(或いはフィールド)の一定範囲の画素との差を計算する。そして、この差の絶対値の和が最小となる前のフレーム(或いはフィールド)のブロックを探査する。当該ブロックの相対的なずれがそのブロックの動きベクトルを表している。   A motion vector detection circuit 113 performs a known motion vector detection process on the video signal, and detects a motion vector for a plurality of regions on the video. As a motion vector detection method necessary for an image encoding device and an image touch correction device, a spatio-temporal gradient method described in Patent Document 2, Patent Document 3, etc., or a correlation method based on correlation calculation or a block matching method (template matching) Law). The spatiotemporal gradient method is discussed in detail in Non-Patent Document 1. The block matching method is discussed in detail in Non-Patent Document 2. The spatiotemporal gradient method is a method of expressing the amount of motion of an image as d / Δ from a luminance difference d between frames (or fields) and a luminance difference Δ between pixels in the screen. This is because the signal obtained from the camera is the time average of the field period, and as the amount of motion of the image increases, the edge becomes dull, and the luminance difference Δ between pixels becomes small. The difference d is normalized by the signal Δ. On the other hand, in the block matching method, an input image signal is divided into blocks of an appropriate size (for example, 8 pixels × 8 lines), and the difference from a certain range of pixels in the previous frame (or field) is calculated for each block. . Then, the block of the previous frame (or field) in which the sum of the absolute values of the differences is minimized is searched. The relative shift of the block represents the motion vector of the block.

114は交点領域検出回路であり、動きベクトル検出回路113の検出結果に基づいて動きベクトルの交点領域を算出し、その算出結果をカメラ/AFマイコン115に送信する。交点領域検出回路114の処理については後述する。115はカメラ/AFマイコン(以下、カメラマイコンという)である。カメラマイコン115は、動きベクトル検出回路113の検出結果に基づいて、交点領域に焦点検出に用いられる評価枠(評価領域)であるオートフォーカス枠(以下、AF枠と称する)を設定するようにAFゲート111へ情報を送信する。また、カメラマイコン115は、焦点信号処理回路112の出力信号に基づいて、後述するフォーカスレンズ駆動源116を制御してフォーカスレンズ105を駆動するとともに、記録装置110へ画像記録命令を出力する。   An intersection area detection circuit 114 calculates a motion vector intersection area based on the detection result of the motion vector detection circuit 113 and transmits the calculation result to the camera / AF microcomputer 115. The processing of the intersection area detection circuit 114 will be described later. Reference numeral 115 denotes a camera / AF microcomputer (hereinafter referred to as a camera microcomputer). Based on the detection result of the motion vector detection circuit 113, the camera microcomputer 115 sets an autofocus frame (hereinafter referred to as an AF frame) that is an evaluation frame (evaluation region) used for focus detection in the intersection region. Information is transmitted to the gate 111. The camera microcomputer 115 controls a focus lens driving source 116 (to be described later) based on the output signal from the focus signal processing circuit 112 to drive the focus lens 105 and outputs an image recording command to the recording device 110.

117は変倍レンズ駆動源であり、変倍レンズ102を移動させるためのアクチュエータ及びそのドライバを含む。116はフォーカスレンズ駆動源であり、フォーカスレンズ105を移動させるためのアクチュエータ及びそのドライバを含む。変倍レンズ駆動源117及びフォーカスレンズ駆動源116は、ステッピングモータ、DCモータ、振動型モータ及びボイスコイルモータ等のアクチュエータにより構成される。   Reference numeral 117 denotes a variable power lens driving source, which includes an actuator for moving the variable power lens 102 and its driver. Reference numeral 116 denotes a focus lens driving source, which includes an actuator for moving the focus lens 105 and its driver. The zoom lens drive source 117 and the focus lens drive source 116 are configured by actuators such as a stepping motor, a DC motor, a vibration motor, and a voice coil motor.

次に、カメラマイコン115が実行する焦点調節制御の概要について説明する。図2は、本実施形態における焦点調節制御を示すフローチャートである。まずステップS201で、カメラマイコン115は、TV−AF制御の基本となる焦点信号を取得するためのAF枠の位置及び大きさを設定する。交点領域検出回路114で交点領域が検出された場合は該交点領域にAF枠を設定し、交点領域が抽出されなかった場合は固定のAF枠(初期位置)を設定する。この処理の詳細は図8〜図16を参照して後述する。   Next, an outline of the focus adjustment control executed by the camera microcomputer 115 will be described. FIG. 2 is a flowchart showing focus adjustment control in the present embodiment. First, in step S201, the camera microcomputer 115 sets the position and size of an AF frame for acquiring a focus signal that is the basis of TV-AF control. When an intersection area is detected by the intersection area detection circuit 114, an AF frame is set in the intersection area, and when no intersection area is extracted, a fixed AF frame (initial position) is set. Details of this processing will be described later with reference to FIGS.

次にステップS202で、カメラマイコン115の制御下で焦点信号処理回路112より、指定されたAF枠の焦点信号を取得する。このとき、焦点信号処理回路112内のフィルタ係数を設定し、抽出特性の異なる複数のバンドパスフィルタを構築する。抽出特性とはバンドパスフィルタの周波数特性であり、ここでの設定とは焦点信号処理回路112内のバンドパスフィルタの設定値を変更することを意味する。   In step S202, the focus signal of the designated AF frame is acquired from the focus signal processing circuit 112 under the control of the camera microcomputer 115. At this time, filter coefficients in the focus signal processing circuit 112 are set, and a plurality of band pass filters having different extraction characteristics are constructed. The extraction characteristic is the frequency characteristic of the bandpass filter, and the setting here means changing the setting value of the bandpass filter in the focus signal processing circuit 112.

次にステップS203で、カメラマイコン115は、TV−AF制御により焦点調節を行う。この処理の詳細は図3を参照して後述する。その後、ステップS201へ戻る。   In step S203, the camera microcomputer 115 performs focus adjustment by TV-AF control. Details of this processing will be described later with reference to FIG. Then, it returns to step S201.

図3は、図2のステップS203で実行されるTV−AF制御の詳細を示すフローチャートである。まずステップS301で、カメラマイコン115は、微小駆動モードであるかどうかを判別し、微小駆動モードである場合はステップS302へ遷移し、微小駆動モードでない場合はステップS308へ遷移する。ステップS302で、カメラマイコン115は微小駆動動作を行い、フォーカスレンズ105を所定の振幅で駆動し、合焦しているか、或いはどちらの方向に合焦点が存在するかを判別する。この処理の詳細は図4及び図5を参照して後述する。ステップS303で、カメラマイコン115は、ステップS302の微小駆動動作によって合焦判別が成功したかどうかを判別し、成功した場合はステップS306へ遷移し、成功しない場合はステップS304へ遷移する。ステップS304で、カメラマイコン115は、ステップS302の微小駆動動作によって方向判別が成功したかどうかを判別する。方向判別が成功した場合はステップS305へ遷移して山登り駆動モードへ移行し、成功しない場合はステップS301へ戻り、微小駆動モードを継続する。ステップS306で、カメラマイコン115は、合焦時の焦点信号レベルをカメラマイコン115内のメモリに格納した後、ステップS307へ遷移して再起動判定モードへ移行する。   FIG. 3 is a flowchart showing details of the TV-AF control executed in step S203 of FIG. First, in step S301, the camera microcomputer 115 determines whether or not it is in the minute drive mode. If it is in the minute drive mode, the process proceeds to step S302, and if not in the minute drive mode, the process proceeds to step S308. In step S302, the camera microcomputer 115 performs a minute driving operation, drives the focus lens 105 with a predetermined amplitude, and determines whether it is in focus or in which direction the focus is present. Details of this processing will be described later with reference to FIGS. In step S303, the camera microcomputer 115 determines whether or not the focus determination is successful by the micro-driving operation in step S302. If it is successful, the process proceeds to step S306. If not, the process proceeds to step S304. In step S304, the camera microcomputer 115 determines whether or not the direction determination is successful by the minute driving operation in step S302. If the direction determination is successful, the process proceeds to step S305 to shift to the hill-climbing drive mode. If the direction determination is not successful, the process returns to step S301 and the minute drive mode is continued. In step S306, the camera microcomputer 115 stores the focus signal level at the time of focusing in the memory in the camera microcomputer 115, and then transitions to step S307 to shift to the restart determination mode.

一方、ステップS308で、カメラマイコン115は、山登り駆動モードであるかどうかを判別し、山登り駆動モードである場合はステップS309へ遷移し、山登り駆動モードでない場合はステップS313へ遷移する。ステップS309で、カメラマイコン115は山登り駆動動作を行い、焦点信号が大きくなる方向へ所定の速度でフォーカスレンズ105を山登り駆動する。この処理の詳細は図6及び図7を参照して後述する。ステップS310で、カメラマイコン115は、ステップS309の山登り駆動動作によって焦点信号のピーク位置が発見されたかどうかを判別する。発見された場合はステップS311へ遷移し、発見されない場合はステップS301へ戻り、山登り駆動モードを継続する。ステップS311で、カメラマイコン115は、焦点信号がピークとなったフォーカスレンズ105の位置を目標位置に設定した後、ステップS312へ遷移し、停止モードへ移行する。   On the other hand, in step S308, the camera microcomputer 115 determines whether or not the hill-climbing drive mode is selected. If the hill-climbing drive mode is selected, the process proceeds to step S309. If not, the process proceeds to step S313. In step S309, the camera microcomputer 115 performs a hill-climbing drive operation, and drives the focus lens 105 to a hill-climb at a predetermined speed in a direction in which the focus signal increases. Details of this processing will be described later with reference to FIGS. In step S310, the camera microcomputer 115 determines whether or not the peak position of the focus signal has been found by the hill-climbing driving operation in step S309. If found, the process proceeds to step S311, and if not found, the process returns to step S301 to continue the hill-climbing drive mode. In step S311, the camera microcomputer 115 sets the position of the focus lens 105 at which the focus signal has reached its peak as the target position, and then proceeds to step S312 and transitions to the stop mode.

一方、ステップS313で、カメラマイコン115は、停止モードであるかどうかを判別し、停止モードである場合はステップS314へ遷移し、停止モードでない場合はステップS316へ遷移する。ステップS314で、カメラマイコン115は、フォーカスレンズ105が焦点信号のピークとなる位置に戻ったかどうかを判別する。ピークとなる位置に戻った場合はステップS315へ遷移し、微小駆動(合焦判別)モードへの移行し、ピークとなる位置に戻っていない場合はステップS301へ戻り、停止モードを継続する。   On the other hand, in step S313, the camera microcomputer 115 determines whether or not the stop mode is set. If the stop mode is set, the process proceeds to step S314. If the stop mode is not set, the process proceeds to step S316. In step S314, the camera microcomputer 115 determines whether or not the focus lens 105 has returned to the position where the focus signal is peaked. When the position returns to the peak, the process proceeds to step S315, and the mode shifts to the minute driving (focus determination) mode. When the position does not return to the peak position, the process returns to step S301, and the stop mode is continued.

一方、ステップS316で、カメラマイコン115は、現在の焦点信号レベルとステップS306で保持した焦点信号レベルとを比較し、その変動量が所定値より大きいかどうかを判別する。変動量が大きい場合はステップS317へ遷移し、微小駆動(方向判別)モードへの移行を行い、変動量が大きくない場合はステップS301へ戻り、再起動判定モードを継続する。   On the other hand, in step S316, the camera microcomputer 115 compares the current focus signal level with the focus signal level held in step S306, and determines whether or not the fluctuation amount is greater than a predetermined value. If the variation amount is large, the process proceeds to step S317, and the mode is shifted to the minute driving (direction determination) mode. If the variation amount is not large, the process returns to step S301, and the restart determination mode is continued.

図3のステップS302で実行される微小駆動モードの詳細な処理について、図4及び図5を参照して説明する。図4は、図3のステップS302で実行される微小駆動モードの詳細な処理を示すフローチャートである。ステップS401で、カメラマイコン115は、微小駆動の動作状態を示すカウンタが現在0であるかどうかを判別し、0である場合はステップS402へ遷移し、0でない場合はステップS403へ遷移する。ステップS402で、カメラマイコン115は、フォーカスレンズ105が至近側にある場合の処理として、現在のAF評価値レベルを保持する。ここでのAF評価値は、後述のステップS410でフォーカスレンズ105が無限側にあるときに撮像素子106に蓄積された電荷から生成された画像信号によるものである。   Detailed processing in the minute drive mode executed in step S302 of FIG. 3 will be described with reference to FIGS. FIG. 4 is a flowchart showing detailed processing of the minute driving mode executed in step S302 of FIG. In step S401, the camera microcomputer 115 determines whether or not the counter indicating the operation state of minute driving is currently 0. If it is 0, the process proceeds to step S402, and if not, the process proceeds to step S403. In step S402, the camera microcomputer 115 holds the current AF evaluation value level as processing when the focus lens 105 is on the close side. The AF evaluation value here is based on an image signal generated from the charge accumulated in the image sensor 106 when the focus lens 105 is on the infinity side in step S410 described later.

ステップS403で、カメラマイコン115は、現在のカウンタが1であるかどうかを判別し、1である場合はステップS404へ遷移し、1でない場合はステップS409へ遷移する。ステップS404で、カメラマイコン115は、後述のステップS408でフォーカスレンズ105を駆動するための振動振幅、中心移動振幅を演算する。通常、これらの振幅は焦点深度内に設定されるのが一般的である。ステップS405で、カメラマイコン115は、ステップS402で保持した無限側のAF評価値レベルと後述のステップS410で保持した至近側のAF評価値レベルを比較する。その結果、前者が大きい場合はステップS406へ遷移し、後者が大きい場合はステップS407へ遷移する。ステップS406で、カメラマイコン115は、振動振幅と中心移動振幅を加算し、駆動振幅とする。一方、ステップS407で、カメラマイコン115は、振動振幅を駆動振幅とする。ステップS408で、カメラマイコン115は、ステップS406又はステップS407で求めた駆動振幅に基づき、無限方向へ駆動する。   In step S403, the camera microcomputer 115 determines whether or not the current counter is 1. If 1, the process proceeds to step S404. If not, the process proceeds to step S409. In step S404, the camera microcomputer 115 calculates a vibration amplitude and a center movement amplitude for driving the focus lens 105 in step S408 described later. Usually, these amplitudes are generally set within the depth of focus. In step S405, the camera microcomputer 115 compares the infinite AF evaluation value level held in step S402 with the closest AF evaluation value level held in step S410 described later. As a result, when the former is large, the process proceeds to step S406, and when the latter is large, the process proceeds to step S407. In step S406, the camera microcomputer 115 adds the vibration amplitude and the center movement amplitude to obtain a drive amplitude. On the other hand, in step S407, the camera microcomputer 115 sets the vibration amplitude as the drive amplitude. In step S408, the camera microcomputer 115 drives in an infinite direction based on the drive amplitude obtained in step S406 or step S407.

ステップS409で、カメラマイコン115は、現在のカウンタが2であるかどうかを判別し、2である場合はステップS410へ遷移し、2でない場合はステップS411へ遷移する。ステップS410で、カメラマイコン115は、フォーカスレンズ105が無限側にある場合の処理として、現在のAF評価値レベルを保持する。ここでのAF評価値は、ステップS402でフォーカスレンズ105が至近側にあるときに撮像素子106に蓄積された電荷から生成された画像信号によるものである。ステップS411で、カメラマイコン115は、後述のステップS415でフォーカスレンズ105を駆動するための振動振幅、中心移動振幅を演算する。通常、これらの振幅は焦点深度内に設定されるのが一般的である。ステップS412で、カメラマイコン115は、ステップS410で保持した至近側のAF評価値レベルとステップS402で保持した無限側のAF評価値レベルを比較する。その結果、前者が大きい場合はステップS413へ遷移し、後者が大きい場合はステップS414へ遷移する。ステップS413で、カメラマイコン115は、振動振幅と中心移動振幅を加算し、駆動振幅とする。一方、ステップS414で、カメラマイコン115は、振動振幅を駆動振幅とする。ステップS415で、カメラマイコン115は、ステップS413又はステップS414で求めた駆動振幅に基づき、至近方向へ駆動する。   In step S409, the camera microcomputer 115 determines whether or not the current counter is 2. If it is 2, the process proceeds to step S410. If it is not 2, the process proceeds to step S411. In step S410, the camera microcomputer 115 holds the current AF evaluation value level as processing when the focus lens 105 is on the infinity side. The AF evaluation value here is based on the image signal generated from the charge accumulated in the image sensor 106 when the focus lens 105 is on the close side in step S402. In step S411, the camera microcomputer 115 calculates a vibration amplitude and a center movement amplitude for driving the focus lens 105 in step S415 described later. Usually, these amplitudes are generally set within the depth of focus. In step S412, the camera microcomputer 115 compares the closest AF evaluation value level held in step S410 with the infinite AF evaluation value level held in step S402. As a result, when the former is large, the process proceeds to step S413, and when the latter is large, the process proceeds to step S414. In step S413, the camera microcomputer 115 adds the vibration amplitude and the center movement amplitude to obtain a drive amplitude. On the other hand, in step S414, the camera microcomputer 115 sets the vibration amplitude as the drive amplitude. In step S415, the camera microcomputer 115 drives in the closest direction based on the drive amplitude obtained in step S413 or step S414.

ステップS416で、カメラマイコン115は、現在方向判別モードであるかどうかを判別し、方向判別モードである場合はステップS417へ遷移し、方向判別モードでない場合はステップS419へ遷移する。ステップS417で、カメラマイコン115は、所定回数連続して同一方向に合焦点が存在しているかどうかを判別し、そうである場合はステップS418へ遷移し、そうでない場合はステップS421へ遷移する。ステップS418で、カメラマイコン115は向判別ができたものと判断する。一方、ステップS419で、カメラマイコン115は、フォーカスレンズが所定回数同一エリアで往復しているかどうかを判別し、そうである場合はステップS420へ遷移し、そうでない場合はステップS421へ遷移する。ステップS420で、カメラマイコン115は合焦判別できたものと判断する。ステップS421で、カメラマイコン115は、微小駆動の動作状態を示すカウンタが3であれば0に戻し、その他の値であればカウンタを加算する。   In step S416, the camera microcomputer 115 determines whether or not the current direction determination mode is set. If the mode determination mode is set, the process proceeds to step S417. If the direction determination mode is not set, the process proceeds to step S419. In step S417, the camera microcomputer 115 determines whether or not the focal point exists in the same direction for a predetermined number of times. If yes, the process proceeds to step S418. If not, the process proceeds to step S421. In step S418, the camera microcomputer 115 determines that the orientation has been determined. On the other hand, in step S419, the camera microcomputer 115 determines whether or not the focus lens has reciprocated in the same area a predetermined number of times. If so, the process proceeds to step S420, and if not, the process proceeds to step S421. In step S420, the camera microcomputer 115 determines that the in-focus determination has been made. In step S421, the camera microcomputer 115 returns the value to 0 if the counter indicating the operation state of minute driving is 3, and adds the counter if it is any other value.

図5は、微小駆動モードでのフォーカスレンズ105の動作を示す特性図である。上の図は画像信号の垂直同期信号を示し、下の図は横軸が時間、縦軸がフォーカスレンズ105の位置を表している。ラベルAの時刻に撮像素子106に蓄積された電荷に対するAF評価値EVAは、時刻TAでカメラマイコン115に取り込まれる。また、ラベルBの時刻に撮像素子106に蓄積された電荷に対するAF評価値EVBは、時刻TBでカメラマイコン115に取り込まれる。時刻TCではAF評価値EVAとEVBとを比較し、EVBが大きい場合のみ振動中心を移動する。なお、ここでのフォーカスレンズ105の移動は焦点深度を基準とし、画面で認識できない移動量に設定する。 FIG. 5 is a characteristic diagram showing the operation of the focus lens 105 in the minute driving mode. The upper diagram shows the vertical synchronization signal of the image signal, and the lower diagram shows the time on the horizontal axis and the position of the focus lens 105 on the vertical axis. The AF evaluation value EV A for the charge accumulated in the image sensor 106 at the time of label A is taken into the camera microcomputer 115 at time T A. Also, the AF evaluation value EV B for the charge accumulated in the image sensor 106 at the time of label B is taken into the camera microcomputer 115 at time T B. At time T C , the AF evaluation values EV A and EV B are compared, and the vibration center is moved only when EV B is large. Here, the movement of the focus lens 105 is set to a movement amount that cannot be recognized on the screen on the basis of the depth of focus.

図3のステップS308で実行される山登り駆動モードの詳細な処理について、図6及び図7を参照して説明する。図6は、図3のステップS308で実行される山登り駆動モードの詳細な処理を示すフローチャートである。ステップS601で、カメラマイコン115はフォーカスレンズ105の駆動速度を設定する。ステップS602で、カメラマイコン115は、現在のAF評価値レベルが前回より増加しているかどうかを判別し、増加している場合はステップS603へ遷移し、増加していない場合はステップS604へ遷移する。ステップS603で、カメラマイコン115は、ステップS601で設定した速度に基づき、フォーカスレンズ105を前回と同じ方向に山登り駆動する。   Detailed processing in the hill-climbing drive mode executed in step S308 in FIG. 3 will be described with reference to FIGS. FIG. 6 is a flowchart showing detailed processing of the hill-climbing drive mode executed in step S308 of FIG. In step S601, the camera microcomputer 115 sets the drive speed of the focus lens 105. In step S602, the camera microcomputer 115 determines whether the current AF evaluation value level has increased from the previous time. If it has increased, the process proceeds to step S603, and if not, the process proceeds to step S604. . In step S603, the camera microcomputer 115 drives the focus lens 105 to climb in the same direction as the previous time based on the speed set in step S601.

ステップS604で、カメラマイコン115は、AF評価値レベルがピーク位置を越えたかどうかを判別し、ピーク位置を超えた場合はステップS605へ遷移し、ピーク位置を超えていない場合はステップS606へ遷移する。ステップS605で、カメラマイコン115はピーク位置を発見したものと判断する。ステップS606で、カメラマイコン115は、ステップS601で設定した速度に基づき、フォーカスレンズ105を前回と逆の方向に山登り駆動する。なお、山登り駆動モードでこのステップS606を繰り返している場合、被写体のAF評価値の変化量が十分に得られないためにフォーカスレンズ105がハンチング状態にあることを意味する。   In step S604, the camera microcomputer 115 determines whether or not the AF evaluation value level exceeds the peak position. If the peak value is exceeded, the process proceeds to step S605. If the peak value is not exceeded, the process proceeds to step S606. . In step S605, the camera microcomputer 115 determines that the peak position has been found. In step S606, the camera microcomputer 115 drives the focus lens 105 to climb in the direction opposite to the previous time based on the speed set in step S601. Note that when step S606 is repeated in the hill-climbing drive mode, it means that the focus lens 105 is in the hunting state because a sufficient amount of change in the AF evaluation value of the subject cannot be obtained.

図7は、山登り駆動モードでのフォーカスレンズ105の動作を示す特性図である。横軸がフォーカスレンズ105の位置、縦軸が焦点信号を表している。フォーカスレンズ105が範囲Aで駆動している場合はAF評価値が増加しているため、同じ方向への山登り駆動を継続する。ここで、フォーカスレンズ105を範囲Bで駆動するとAF評価値はピーク位置を越えて減少する。このとき、合焦点が存在するとして山登り駆動動作を終了し、フォーカスレンズ105をピーク位置まで戻した後、微小駆動動作に移行する。一方、範囲Cのようにピーク位置を越えずにAF評価値が減少した場合は駆動すべき方向を間違えたものとして反転し、山登り駆動動作を継続する。   FIG. 7 is a characteristic diagram showing the operation of the focus lens 105 in the hill-climbing drive mode. The horizontal axis represents the position of the focus lens 105, and the vertical axis represents the focus signal. When the focus lens 105 is driven in the range A, since the AF evaluation value is increased, the mountain climbing drive in the same direction is continued. Here, when the focus lens 105 is driven in the range B, the AF evaluation value decreases beyond the peak position. At this time, the hill-climbing driving operation is terminated assuming that the in-focus point exists, and after the focus lens 105 is returned to the peak position, the operation shifts to the minute driving operation. On the other hand, when the AF evaluation value decreases without exceeding the peak position as in the range C, the driving direction is reversed and the hill-climbing driving operation is continued.

このように、TV−AF方式による焦点調節制御では、再起動判定→微小駆動→山登り駆動→停止→微小駆動→再起動判定を繰り返しながらフォーカスレンズ105を移動させることで、AF評価値が常に最大となるように合焦状態を維持する。   As described above, in the focus adjustment control by the TV-AF method, the AF evaluation value is always maximized by moving the focus lens 105 while repeating the restart determination → micro drive → mountain climbing drive → stop → micro drive → restart determination. The in-focus state is maintained so that

以下、図8〜図16を参照して、動きベクトルの検出結果に応じたAF枠の設定方法について説明する。これは、図2のステップS201におけるAF枠の領域情報の決定処理の詳細な説明である。図8(a)は入力画像であり、x方向及びy方向に[7*5]のブロックに分割されている。進行方向は画像奥方向である。図8(b)は各ブロックで動きベクトルを検出した結果を示す。このような動きベクトルの分布図を一般にオプティカルフロー図と呼ぶ。画面奥方向に進行しているため、動きベクトルは進行方向を中心に放射状になる。図8(c)は動きベクトルの値を(x成分、y成分)に変換して表示したものである。この各々の成分に変換した値を用いて、評価枠を決定する。図8(d)は評価枠の設定方法を簡易的に示したものである。各々の動きベクトルは放射状に出ているため、動きベクトルの交点領域は領域Sであることが分かる。この動きベクトルの交点領域を評価枠とすることにより、安定したAF評価値の取得ができ、適切なオートフォーカスを行うことが可能になる。以下、その評価枠の設定方法について説明を行う。   The AF frame setting method according to the motion vector detection result will be described below with reference to FIGS. This is a detailed description of the AF frame region information determination process in step S201 of FIG. FIG. 8A shows an input image, which is divided into [7 * 5] blocks in the x and y directions. The traveling direction is the back direction of the image. FIG. 8B shows the result of detecting a motion vector in each block. Such a motion vector distribution diagram is generally called an optical flow diagram. Since the motion vector is traveling in the depth direction of the screen, the motion vectors are radiating around the traveling direction. FIG. 8C shows the motion vector value converted into (x component, y component) and displayed. An evaluation frame is determined using the values converted into the respective components. FIG. 8D shows a simplified method for setting the evaluation frame. Since each motion vector appears radially, it can be seen that the intersection region of the motion vectors is a region S. By using the intersection area of the motion vectors as an evaluation frame, a stable AF evaluation value can be acquired and appropriate autofocus can be performed. The evaluation frame setting method will be described below.

まず、動きベクトルに応じた評価枠の移動は常時行う必要はなく、車載カメラとして車体の一部に固定された状態で、且つ車体が移動している場合のみ行う処理である。図9、図10を参照して、評価枠の設定において、初期位置の評価枠を用いるか、動きベクトルに応じた評価枠を用いるかの切り替えを行う処理を説明する。   First, it is not necessary to always move the evaluation frame according to the motion vector, and is a process performed only when the vehicle body is moving while being fixed to a part of the vehicle body as an in-vehicle camera. With reference to FIGS. 9 and 10, processing for switching between using an evaluation frame at an initial position or using an evaluation frame according to a motion vector in setting an evaluation frame will be described.

図9は、初期位置の評価枠を用いるか、動きベクトルに応じた評価枠を用いるかの切り替えの判断を簡易的に示した図である。図8(a)が入力画像である場合に、図9(a)は車体が画像奥方向に駆動した初期状態を模した図である。画面の中央部分は画像の流れが少ないため、動きベクトルの発生は少ない。画面の端部分は画像の変化が大きいため、動きベクトルの発生がある。図9(b)は車体が加速した状態を模した図である。車体の移動量が増えたため、画面の内側部分の動きベクトルが発生する。画面の端部分は移動量が増えたことにより、動きベクトルの強度が増える傾向にある。図9(c)はさらに車体が加速した状態を模した図である。画面中央を除き、動きベクトルが発生する。このように、車体が停止から駆動状態に移行する際、動きベクトルは車体の移動量に伴い増加する。これを利用して、同じ領域内の動きベクトルの増加を監視し、動きベクトルの所定時間の増加が確認できた場合は、車体が駆動していると判断し、動きベクトルに応じた評価枠の設定を行う処理に移行する。図9(d)は、画面内のある領域の動きベクトルの変化を示した図である。本実施形態では、動きベクトルのサンプル間隔において、K回連続して増加した場合を、車体の移動が開始したと判断することとしている。   FIG. 9 is a diagram simply showing the determination of switching between using the initial position evaluation frame or using the evaluation frame corresponding to the motion vector. When FIG. 8A is an input image, FIG. 9A is a diagram simulating an initial state in which the vehicle body is driven in the depth direction of the image. Since there is little image flow in the center of the screen, there are few motion vectors. Since the edge of the screen has a large image change, motion vectors are generated. FIG. 9B is a diagram simulating the state in which the vehicle body is accelerated. Since the amount of movement of the vehicle body has increased, a motion vector for the inner part of the screen is generated. The edge of the screen tends to increase the intensity of the motion vector due to the increased amount of movement. FIG. 9C is a diagram simulating a state where the vehicle body is further accelerated. A motion vector is generated except for the center of the screen. Thus, when the vehicle body shifts from the stop state to the driving state, the motion vector increases with the amount of movement of the vehicle body. Using this, the increase in the motion vector in the same area is monitored, and if the increase in the motion vector for a predetermined time is confirmed, it is determined that the vehicle body is driven, and the evaluation frame corresponding to the motion vector is determined. Move on to the process of setting. FIG. 9D is a diagram showing changes in motion vectors in a certain area in the screen. In the present embodiment, it is determined that the movement of the vehicle body has started when the motion vector sampling interval has increased continuously K times.

図10は、動きベクトルを用いた評価枠の設定判定のフローチャートである。ステップS1002で、カメラマイコン115は、映像から動きベクトルが検出できたかどうかを判断する。動きベクトルが検出された場合はステップS1003へ遷移し、動きベクトルが検出されなかった場合はステップS1012へ遷移する。   FIG. 10 is a flowchart of setting determination of an evaluation frame using a motion vector. In step S1002, the camera microcomputer 115 determines whether a motion vector has been detected from the video. If a motion vector is detected, the process proceeds to step S1003, and if no motion vector is detected, the process proceeds to step S1012.

ステップS1003で、カメラマイコン115は、検出された動きベクトルを3次元配列Vector_x[n][h][i]、Vector_y[n][h][i]に格納する。hはx軸方向の動きベクトルの検出領域数、iはy軸方向の動きベクトルの検出領域数を示し、nは記憶した配列の番号を示している。格納する方法は、動きベクトルをx成分、y成分に分割し、それぞれを格納する。格納後、ステップS1004に遷移する。ステップS1004で、カメラマイコン115は配列の番号を示すnをインクリメントし、n+1とする。ステップS1005で、カメラマイコン115はnが1を超えているかどうかを判断する。nが1を超えている、すなわち1を超える数の動きベクトルがすでに格納されている場合はステップS1006へ遷移し、そうでない場合はステップS1012へ遷移する。   In step S1003, the camera microcomputer 115 stores the detected motion vectors in the three-dimensional arrays Vector_x [n] [h] [i] and Vector_y [n] [h] [i]. h represents the number of motion vector detection areas in the x-axis direction, i represents the number of motion vector detection areas in the y-axis direction, and n represents the number of the stored array. As a storing method, a motion vector is divided into an x component and a y component, and each is stored. After storing, the process proceeds to step S1004. In step S1004, the camera microcomputer 115 increments n indicating the array number to n + 1. In step S1005, the camera microcomputer 115 determines whether n exceeds 1. If n is greater than 1, that is, if more than 1 motion vectors are already stored, the process proceeds to step S1006, and if not, the process proceeds to step S1012.

ステップS1006で、カメラマイコン115は、n−1(1つ前)に格納した各々の動きベクトル検出領域のベクトル成分を比較し、ベクトルの成分が増加しているかどうかを判断する。ベクトルの比較は、各々の差分を抽出し、減少・増加の判断を行う。比較後、ステップS1007へ遷移する。   In step S1006, the camera microcomputer 115 compares the vector components of the respective motion vector detection areas stored in n-1 (one previous), and determines whether the vector component has increased. In the comparison of vectors, each difference is extracted and a decrease / increase is determined. After the comparison, the process proceeds to step S1007.

ステップS1007で、カメラマイコン115は、動きベクトル検出領域の何%が増加しているかの確認を行う。本実施形態では、全検出領域の約60%以上が増加である場合を閾値Th1と設定することとするが、閾値Th1の値は十分な測定を行い、任意の値に設定することが可能である。全体の領域数Vsum=h*iに対して、増加している領域をカウントし、その領域数をVnumとする。増加割合[%]=Vnum÷Vsum×100で算出し、増加割合>Th1以上であれば、全体の動きベクトルの増加が確認されたとし、ステップS1008へ遷移する。そうでない場合はステップS1009へ遷移する。ステップS1009では、カメラマイコン115は、ベクトルの増加回数をカウントするVCountを0に初期化する処理を行い、ステップS1012へ遷移する。   In step S1007, the camera microcomputer 115 checks what percentage of the motion vector detection area has increased. In the present embodiment, the case where about 60% or more of the entire detection area is increased is set as the threshold value Th1, but the value of the threshold value Th1 can be set to an arbitrary value after sufficient measurement. is there. The total number of areas Vsum = h * i is counted, and the number of areas is set to Vnum. When the increase rate [%] = Vnum ÷ Vsum × 100 is calculated and the increase rate is greater than or equal to Th1, it is determined that the increase of the entire motion vector is confirmed, and the process proceeds to step S1008. Otherwise, the process proceeds to step S1009. In step S1009, the camera microcomputer 115 performs a process of initializing VCount for counting the number of vector increases to 0, and proceeds to step S1012.

ステップS1008で、カメラマイコン115は、ベクトルの増加回数をカウントするVCountをインクリメントし、ステップS1010へ遷移する。ステップS1010で、カメラマイコン115は、ベクトルの増加カウントVCountがK回連続で増加したかどうかを判断する。本実施形態では、閾値Kの値を30回(実時間0.5秒に相当)に設定するが、閾値Kの値は十分な測定を行った上で任意の値に設定することが可能である。つまり、動きベクトルが増加傾向にある場合、具体的には動きベクトルの増加が連続して0.5秒間以上発生した場合は、車体がいずれかの方向に駆動中であると判断し、ステップS1011へ遷移する。そうでない場合はステップS1012へ遷移する。ステップS1011で、カメラマイコン115は、評価枠を動きベクトルに応じて変更する処理を行う。この処理の詳細は図11を参照して後述する。   In step S1008, the camera microcomputer 115 increments VCount for counting the number of vector increases, and the process proceeds to step S1010. In step S1010, the camera microcomputer 115 determines whether or not the vector increase count VCount has increased continuously K times. In this embodiment, the threshold value K is set to 30 times (corresponding to a real time of 0.5 seconds). However, the threshold value K can be set to an arbitrary value after sufficient measurement. is there. That is, when the motion vector is increasing, specifically, when the increase in the motion vector is continuously generated for 0.5 seconds or more, it is determined that the vehicle body is being driven in either direction, and step S1011 is performed. Transition to. Otherwise, the process proceeds to step S1012. In step S1011, the camera microcomputer 115 performs processing for changing the evaluation frame according to the motion vector. Details of this processing will be described later with reference to FIG.

ステップS1012では、動きベクトルの増加が連続して0.5秒間以上発生していない、又は、動きベクトルが発生していない等の、動きベクトルに応じて評価枠を移動できない状態であるため、初期位置にある評価枠を設定することとする。   In step S1012, the evaluation frame cannot be moved according to the motion vector, such as no increase in the motion vector continuously occurring for 0.5 seconds or more, or no motion vector is generated. The evaluation frame at the position is set.

図11は、動きベクトルに応じて評価枠を設定する領域である動きベクトルの交点領域の算出方法を示す図である。図11(a)は入力画像である。図11(b)は動きベクトルを図示したオプティカルフロー図である。図11(c)は動きベクトルを各成分に分割したものである。L1は画像内のx成分のみを抽出し、その成分の値をグラフ化したものである。座標x=1から7に向けてx成分は大きくなり、座標x=4でゼロクロス点があることを確認できる。これは、座標x=4を中心として、放射状に動きベクトルが発生しているためである。よって、x成分のグラフのゼロクロス点を求めることにより、動きベクトルのx方向の交点領域が特定できる。同様に、L2は画像内のy成分のみを抽出し、その成分の値をグラフ化したものである。座標y=1から5に向けてy成分は大きくなり、座標y=3でゼロクロス点があることを確認できる。これは、座標y=3を中心として、放射状に動きベクトルが発生しているためである。よって、y成分のグラフのゼロクロス点を求めることにより、動きベクトルのy方向の交点領域が特定できる。以上のように、図11(a)の入力画像は、座標(4,3)の位置に、動きベクトルの交点領域があると推測でき、その領域はもっとも動きベクトルが少なくなる。この座標(4,3)に評価枠を設定することにより、安定した評価値が得られ、適切なオートフォーカスが可能になる。このような処理を行うことにより、入力画像から、動きベクトルの交点領域を特定することが可能になる。   FIG. 11 is a diagram illustrating a method for calculating a motion vector intersection region, which is a region in which an evaluation frame is set according to a motion vector. FIG. 11A shows an input image. FIG. 11B is an optical flow diagram illustrating motion vectors. FIG. 11C shows a motion vector divided into components. L1 extracts only the x component in the image and graphs the value of the component. The x component increases from the coordinate x = 1 to 7 and it can be confirmed that there is a zero cross point at the coordinate x = 4. This is because motion vectors are generated radially around the coordinate x = 4. Therefore, by obtaining the zero cross point of the x component graph, the intersection region in the x direction of the motion vector can be specified. Similarly, L2 is obtained by extracting only the y component in the image and graphing the value of the component. The y component increases from the coordinate y = 1 to 5, and it can be confirmed that there is a zero cross point at the coordinate y = 3. This is because motion vectors are generated radially around the coordinate y = 3. Therefore, by obtaining the zero cross point of the y component graph, the intersection region in the y direction of the motion vector can be specified. As described above, in the input image of FIG. 11A, it can be estimated that there is a motion vector intersection region at the position of coordinates (4, 3), and that region has the smallest motion vector. By setting an evaluation frame at the coordinates (4, 3), a stable evaluation value can be obtained and appropriate autofocus can be performed. By performing such processing, it is possible to specify the intersection area of motion vectors from the input image.

図11では動きベクトルの交点領域が画像の中心にある例を示したが、続いて、交点領域が画像の中心以外にある例を示す。図12(a)は入力画像である。この画像は、進行方向の先にカーブがある場合や、カメラが進行方向に対してある程度の角度を持って設置されていた場合に起こりうる画像である。図12(b)は動きベクトルを図示したオプティカルフロー図である。図12(c)は動きベクトルを各成分に分割したものである。L3は画像内のx成分のみを抽出し、その成分の値をグラフ化したものである。座標x=1から7に向けてx成分は大きくなり、座標x=6でゼロクロス点があることを確認できる。これは、座標x=6を中心として、放射状に動きベクトルが発生しているためである。よって、x成分のグラフのゼロクロス点を求めることにより、動きベクトルのx方向の交点領域が特定できる。同様に、L4〜L6は、画像内のy成分のみを抽出し、その成分の値をグラフ化したものである。座標y=1から5に向けてy成分は大きくなり、座標y=3でゼロクロス点があることを確認できる。これは、座標y=3を中心として、放射状に動きベクトルが発生しているためである。よって、y成分のグラフのゼロクロス点を求めることにより、動きベクトルのy方向の交点領域が特定できる。ただし、交点から遠くなるほど、動きベクトルは平行になる性質があるため、X座標1行目の値をグラフ化したL6は、X座標3〜7行目の値をグラフ化したL4に比べてy成分の変化が小さくなる。仮に、y成分の変化が小さくなり、ゼロクロス点を持たない場合は、その行の値を無視し、他の行のゼロクロス点を参考にし、交点を求めることとする。以上のように、図12(a)の入力画像は、座標(6,3)の位置に、動きベクトルの交点領域があると推測できる。   FIG. 11 shows an example in which the intersection area of the motion vector is at the center of the image. Subsequently, an example in which the intersection area is outside the center of the image is shown. FIG. 12A shows an input image. This image is an image that may occur when there is a curve ahead of the traveling direction or when the camera is installed at a certain angle with respect to the traveling direction. FIG. 12B is an optical flow diagram illustrating motion vectors. FIG. 12C shows a motion vector divided into components. L3 is a graph in which only the x component in the image is extracted and the value of the component is graphed. The x component increases from the coordinate x = 1 to 7 and it can be confirmed that there is a zero cross point at the coordinate x = 6. This is because motion vectors are generated radially around the coordinate x = 6. Therefore, by obtaining the zero cross point of the x component graph, the intersection region in the x direction of the motion vector can be specified. Similarly, L4 to L6 are obtained by extracting only the y component in the image and graphing the value of the component. The y component increases from the coordinate y = 1 to 5, and it can be confirmed that there is a zero cross point at the coordinate y = 3. This is because motion vectors are generated radially around the coordinate y = 3. Therefore, by obtaining the zero cross point of the y component graph, the intersection region in the y direction of the motion vector can be specified. However, since the motion vector becomes parallel as the distance from the intersection increases, L6 that graphs the value of the first row of the X coordinate is y compared to L4 that graphs the value of the X coordinate of the third to seventh rows. The change of the component becomes small. If the change in the y component is small and there is no zero cross point, the value of that line is ignored, and the intersection point is obtained with reference to the zero cross points of other lines. As described above, it can be estimated that the input image of FIG. 12A has an intersection region of motion vectors at the coordinates (6, 3).

続いて、画面内にボンネットや室内等の写りこみがある例を示す。図13(a)は入力画像であり、物体Pは常時写りこんでいる被写体である。図13(b)は動きベクトルを図示したオプティカルフロー図である。物体Pは動きを持たないので、動きベクトルは発生していないことが確認できる。図13(c)は動きベクトルを各成分に分割したものである。L7はy座標2〜5列目のy成分のみを抽出し、その成分の値をグラフ化したものである。座標x=1から7に向けてx成分は大きくなり、座標x=4でゼロクロス点があることを確認できる。これは、座標x=4を中心として、放射状に動きベクトルが発生しているためである。L8はy座標1列目のx成分をグラフ化したものである。1列目は、物体Pにより、動きベクトルを持たないため、グラフにゼロクロス点が存在しない。よって、ゼロクロス点が存在しないグラフは無視し、y座標2〜5列目のゼロクロス点からベクトルの交点を求めることとする。よって、x成分のグラフのゼロクロス点はx=4となる。同様に、図13のL9はx座標6〜7列目のy成分のみを抽出し、その成分の値をグラフ化したものである。座標y=1から5に向けてy成分は大きくなり、座標y=3でゼロクロス点があることを確認できる。これは、座標y=3を中心として、放射状に動きベクトルが発生しているためである。L10はx座標1〜5列目のy成分のみを抽出し、その成分の値をグラフ化したものである。これも同様に、座標y=3にてゼロクロス点を持つ。以上のように、図13(a)の入力画像は、座標(4,3)の位置に、動きベクトルの交点領域があると推測できる。   Next, an example in which there is a reflection of a hood, a room, etc. in the screen will be shown. FIG. 13A shows an input image, and the object P is a subject that is always captured. FIG. 13B is an optical flow diagram illustrating motion vectors. Since the object P has no motion, it can be confirmed that no motion vector is generated. FIG. 13C shows a motion vector divided into components. L7 is a graph in which only y components in the 2nd to 5th columns of the y coordinate are extracted and the values of the components are graphed. The x component increases from the coordinate x = 1 to 7 and it can be confirmed that there is a zero cross point at the coordinate x = 4. This is because motion vectors are generated radially around the coordinate x = 4. L8 is a graph of the x component in the first column of the y coordinate. Since the first column does not have a motion vector due to the object P, there is no zero cross point in the graph. Therefore, the graph where the zero cross point does not exist is ignored, and the intersection of the vectors is obtained from the zero cross point in the 2nd to 5th columns of the y coordinate. Therefore, the zero cross point of the x component graph is x = 4. Similarly, L9 in FIG. 13 is obtained by extracting only the y component in the x-coordinates 6 to 7 and graphing the value of the component. The y component increases from the coordinate y = 1 to 5, and it can be confirmed that there is a zero cross point at the coordinate y = 3. This is because motion vectors are generated radially around the coordinate y = 3. L10 is a graph in which only the y component in the first to fifth columns of the x coordinate is extracted and the values of the components are graphed. This also has a zero cross point at the coordinate y = 3. As described above, it can be estimated that the input image of FIG. 13A has a motion vector intersection region at the position of coordinates (4, 3).

図14(a)は入力画像である。図14(b)は動きベクトルを図示したオプティカルフロー図である。図14(c)は動きベクトルを各成分に分割したものである。L11は、画像のx成分のみを抽出し、その成分の値をグラフ化したものである。x成分の変化はなく、ゼロクロス点も持たないことが分かる。また、L12はy成分をグラフ化したものである。同様にy成分の変化はなく、ゼロクロス点も持たないことが分かる。以上のように、図14(a)の入力画像は、ゼロクロス点を持たないため、動きベクトルの交点領域は存在しない。その場合は、画面全体に流れが発生していると判断し、初期位置にある評価枠の大きさを動きベクトルに応じて変更する。   FIG. 14A shows an input image. FIG. 14B is an optical flow diagram illustrating motion vectors. FIG. 14C shows a motion vector divided into components. L11 is obtained by extracting only the x component of the image and graphing the value of the component. It can be seen that there is no change in the x component and no zero cross point. L12 is a graph of the y component. Similarly, it can be seen that there is no change in the y component and no zero cross point. As described above, since the input image of FIG. 14A does not have a zero cross point, there is no intersection region of motion vectors. In this case, it is determined that a flow has occurred on the entire screen, and the size of the evaluation frame at the initial position is changed according to the motion vector.

図15は、動きベクトルに応じた評価枠の大きさ変更を示す図である。図15(a)、図15(b)に示すように、動きベクトルが所定量Th2を越えた場合に、初期の評価枠Qから、評価枠Rのように大きさを動きベクトルに応じて変更する。これにより、画像の流れが発生した場合でも、評価枠を大きくすることにより、評価値の変動を少なくすることが可能になり、安定したオートフォーカスが可能になる。また、図15(c)に示すように動きベクトルが所定量Th3を越えた場合は、画像の流れが大きく、評価枠を大きく設定しても、評価値が安定しない。よって、評価枠の設定を行わず、前のピント状態を維持し、ピントのフワつきを防ぐ。なお、上記説明した処理の流れは図16のフローチャートを用いて説明する。   FIG. 15 is a diagram illustrating a change in the size of the evaluation frame according to the motion vector. As shown in FIGS. 15A and 15B, when the motion vector exceeds a predetermined amount Th2, the size is changed from the initial evaluation frame Q to the evaluation frame R according to the motion vector. To do. As a result, even when an image flow occurs, it is possible to reduce the fluctuation of the evaluation value by increasing the evaluation frame, and stable autofocus is possible. As shown in FIG. 15C, when the motion vector exceeds the predetermined amount Th3, the flow of the image is large, and the evaluation value is not stable even if the evaluation frame is set large. Therefore, the evaluation frame is not set, the previous focus state is maintained, and the fluff of the focus is prevented. The process flow described above will be described with reference to the flowchart of FIG.

図16は、動きベクトルに応じた評価枠の設定するための処理である。ステップS1602で、カメラマイコン115は、座標xのj行目のx軸方向の動きベクトルの成分の抽出を行う。成分の個数はシステムによって異なるが、本実施形態では、7*5の検出領域を用いているため、成分の個数は7個ということになる。抽出が終了後、ステップS1603へ遷移する。ステップS1603で、カメラマイコン115は、抽出された成分の描く曲線のゼロクロス点となる領域の算出を行う。算出方法の一例は、座標x=1から7の方向に向かい、値が増加又は減少していることを確認し、値が0を超える、或いは、符号が切り替わる点をゼロクロス点として特定する。ゼロクロス点が特定できない場合、x=0とする。ゼロクロス点の算出後、ステップS1604へ遷移する。ステップS1604で、カメラマイコン115はj行目の値を1つインクリメントする。   FIG. 16 is a process for setting an evaluation frame according to a motion vector. In step S1602, the camera microcomputer 115 extracts a motion vector component in the x-axis direction of the j-th row of the coordinate x. Although the number of components differs depending on the system, in the present embodiment, since the 7 * 5 detection area is used, the number of components is seven. After the extraction is completed, the process proceeds to step S1603. In step S1603, the camera microcomputer 115 calculates a region that is a zero cross point of a curve drawn by the extracted component. As an example of the calculation method, it is confirmed that the value increases or decreases in the direction of coordinates x = 1 to 7, and a point where the value exceeds 0 or the code is switched is specified as a zero cross point. If the zero cross point cannot be specified, x = 0. After calculating the zero cross point, the process proceeds to step S1604. In step S1604, the camera microcomputer 115 increments the value in the j-th row by one.

ステップS1605で、カメラマイコン115は、画像内のすべての行において、算出が終了したかどうかの確認を行う。jが検出枠数よりも大きい場合は、すべての列の算出が終了したとして、ステップS1606へ遷移する。そうでない場合はステップS1602へ遷移して、同様の処理を繰り返す。   In step S <b> 1605, the camera microcomputer 115 checks whether calculation has been completed for all rows in the image. If j is larger than the number of detection frames, it is determined that all the columns have been calculated, and the process proceeds to step S1606. When that is not right, it changes to step S1602 and repeats the same process.

ステップS1606で、カメラマイコン115は、上記の処理によって算出されたx成分の交点領域の座標の決定を行う。図11の例では、j行すべてが同じ成分であったため、交点領域は1つに求まったが、図13に示すような入力画像の場合は、交点領域候補が2点以上特定できる場合がある。その場合は、j行中で過半数を占めるゼロクロス点を採用し、その他の点は無視することとする。特定された点をXcrossとし、ステップS1607へ遷移する。   In step S1606, the camera microcomputer 115 determines the coordinates of the intersection region of the x component calculated by the above processing. In the example of FIG. 11, since all the j rows have the same component, one intersection area is obtained. However, in the case of the input image as shown in FIG. 13, two or more intersection area candidates may be specified. . In that case, a zero cross point that occupies a majority in j rows is adopted, and the other points are ignored. The identified point is set as Xcross, and the process proceeds to step S1607.

ステップS1607で、カメラマイコン115は、座標yのk列目のy軸方向の動きベクトルの成分の抽出を行う。成分の個数はシステムによって異なるが、本実施形態では、7*5の検出領域を用いているため、成分の個数は5個ということになる。抽出が終了後、ステップS1608へ遷移する。ステップS1608で、カメラマイコン115は、抽出された成分の描く曲線のゼロクロス点となる領域の算出を行う。算出方法の一例は、座標y=1から5の方向に向かい、値が増加又は減少していることを確認し、値が0を超える、或いは、符号が切り替わる点をゼロクロス点として特定する。ゼロクロス点が特定できない場合、y=0とする。ゼロクロス点の算出後、ステップS1609へ遷移する。ステップS1609で、カメラマイコン115はk行目の値を1つインクリメントする。   In step S1607, the camera microcomputer 115 extracts a motion vector component in the y-axis direction of the k-th column of the coordinate y. Although the number of components differs depending on the system, in the present embodiment, since the detection area of 7 * 5 is used, the number of components is five. After the extraction is completed, the process proceeds to step S1608. In step S1608, the camera microcomputer 115 calculates a region that becomes a zero cross point of a curve drawn by the extracted component. As an example of the calculation method, it is confirmed that the value increases or decreases from the coordinate y = 1 to 5, and the point where the value exceeds 0 or the sign is switched is specified as the zero cross point. When the zero cross point cannot be specified, y = 0 is set. After the zero cross point is calculated, the process proceeds to step S1609. In step S1609, the camera microcomputer 115 increments the value in the k-th row by one.

ステップS1610で、カメラマイコン115は、画像内のすべての列において、算出が終了したかどうかの確認を行う。kが検出枠数よりも大きい場合は、すべての列の算出が終了したとして、ステップS1611へ遷移する。そうでない場合はステップS1607へ遷移して、同様の処理を繰り返す。   In step S <b> 1610, the camera microcomputer 115 checks whether the calculation has been completed for all columns in the image. When k is larger than the number of detection frames, it is determined that calculation of all the columns is completed, and the process proceeds to step S1611. Otherwise, the process proceeds to step S1607 and the same process is repeated.

ステップS1611で、カメラマイコン115は、上記の処理によって算出されたy成分の交点領域の座標の決定を行う。図11の例では、k列すべてが同じ成分であったため、交点領域は1つに求まったが、図13に示すような入力画像の場合は、交点領域候補が2点以上特定できる場合がある。その場合は、k列中で過半数を占めるゼロクロス点を採用し、その他の点は無視することとする。特定された点をYcrossとし、ステップS1612へ遷移する。   In step S1611, the camera microcomputer 115 determines the coordinates of the intersection region of the y component calculated by the above processing. In the example of FIG. 11, since all the k columns are the same component, one intersection area is obtained. However, in the case of the input image as shown in FIG. 13, two or more intersection area candidates may be identified. . In that case, a zero-cross point that occupies a majority in the k columns is adopted, and the other points are ignored. The identified point is set to Ycross, and the process proceeds to step S1612.

ステップS1612で、カメラマイコン115は、上記で特定されたベクトルの交点領域の確認を行う。上記の処理において、交点領域(Xcross,Ycross)が算出された場合はステップS1616へ遷移する。上記の処理において、交点が特定できなかった場合、つまり、交点領域(0,0)であった場合はステップS1613へ遷移する。ステップS1616で、カメラマイコン115は、交点領域が求まっているため、評価枠を交点領域(Xcross,Ycross)に設定し、処理を終了する。一方、交点領域が特定できなかった場合は、カメラが進行方向に向かって固定されていない、もしくは右折や左折等により映像がすべて流れている等が考えられる。この場合、動きベクトルの量に応じて、評価枠を変更する処理を行う。変更方法は、図15を用いて既に説明済みであるため省略する。   In step S1612, the camera microcomputer 115 confirms the intersection area of the vector specified above. In the above processing, when the intersection area (Xcross, Ycross) is calculated, the process proceeds to step S1616. In the above processing, if the intersection cannot be specified, that is, if it is the intersection region (0, 0), the process proceeds to step S1613. In step S1616, since the intersection area is obtained, the camera microcomputer 115 sets the evaluation frame to the intersection area (Xcross, Ycross), and ends the process. On the other hand, if the intersection area cannot be specified, it is conceivable that the camera is not fixed in the direction of travel, or that all images are flowing due to a right turn or a left turn. In this case, processing for changing the evaluation frame is performed according to the amount of the motion vector. Since the changing method has already been described with reference to FIG.

ステップS1613で、カメラマイコン115は、交点領域が特定できなかった場合、画面内の動きベクトルの方向を確認する。画面内の動きベクトルが同一方向に向いている場合はステップS1614へ遷移する。そうでない場合はステップS1617へ遷移する。ステップS1614では、動きベクトルの大きさがTh2以上であるかどうかを確認する。Th2以上である場合は、画面内の映像の流れが大きく、評価値が安定できないと判断し、ステップS1615へ遷移する。そうでない場合はステップS1617へ遷移する。ステップS1617で、カメラマイコン115は、交点領域が特定できない、又は、動きベクトルが小さいという状況であるため、評価枠は初期位置のままで評価値の取得を行う。よって、評価枠を初期位置に設定し、処理を終了する。   In step S <b> 1613, the camera microcomputer 115 confirms the direction of the motion vector in the screen when the intersection area cannot be specified. If the motion vectors in the screen are in the same direction, the process proceeds to step S1614. Otherwise, the process proceeds to step S1617. In step S1614, it is confirmed whether or not the magnitude of the motion vector is greater than Th2. If it is equal to or greater than Th2, it is determined that the flow of video in the screen is large and the evaluation value cannot be stabilized, and the process proceeds to step S1615. Otherwise, the process proceeds to step S1617. In step S <b> 1617, the camera microcomputer 115 is in a situation where the intersection region cannot be specified or the motion vector is small, and thus the evaluation value is acquired with the evaluation frame remaining at the initial position. Therefore, the evaluation frame is set to the initial position, and the process is terminated.

ステップS1615で、カメラマイコン115は、動きベクトルの大きさがTh3以上であるかのどうかを確認する。Th3以上である場合は、画面内の映像からは、適切な評価値は算出できないと判断し、ステップS1619へ遷移する。そうでない場合はステップS1618へ遷移する。ステップS1618で、カメラマイコン115は、動きベクトルが所定量Th2以上Th3以下あるため、評価枠を大きくして安定した評価値の取得を処理である。評価枠の大きさは図15(a)のグラフに基づき設定することとする。評価枠の設定後、処理を終了する。ステップS1619で、カメラマイコン115は、動きベクトルが所定量Th3以上あるため、画像から適切な評価値は取得できないので、評価枠を設定しない。さらに、画像のボケ・フワつきを抑えるためにオートフォーカスの制御は行わず前の状態でフォーカスをロックする。   In step S1615, the camera microcomputer 115 checks whether the magnitude of the motion vector is equal to or greater than Th3. If it is greater than or equal to Th3, it is determined that an appropriate evaluation value cannot be calculated from the video in the screen, and the process proceeds to step S1619. Otherwise, the process proceeds to step S1618. In step S <b> 1618, the camera microcomputer 115 performs processing for obtaining a stable evaluation value by increasing the evaluation frame because the motion vector is greater than or equal to the predetermined amount Th <b> 2 and Th <b> 3. The size of the evaluation frame is set based on the graph of FIG. After setting the evaluation frame, the process ends. In step S1619, the camera microcomputer 115 does not set an evaluation frame because an appropriate evaluation value cannot be obtained from the image because the motion vector is greater than or equal to the predetermined amount Th3. Furthermore, in order to suppress blurring and fluffing of the image, the autofocus control is not performed and the focus is locked in the previous state.

以上のように、車載撮影において、自動的にAF枠を設定し、常に安定したピントでの撮影が可能になる。例えばコンシューマ用ビデオカメラを車載撮影のために車体に固定し撮影した場合においても、映像から求まる動きベクトルを用いることにより、映像の流れが少ない領域にAF枠を設定することができ、安定した評価値を取得することが可能になる。   As described above, in in-vehicle shooting, an AF frame is automatically set, and shooting with stable focus is always possible. For example, even when a consumer video camera is fixed to the vehicle body for in-vehicle shooting, an AF frame can be set in an area where the flow of the image is small by using a motion vector obtained from the image, and stable evaluation is performed. It becomes possible to get the value.

カメラが進行方向に対して斜めに固定されている場合や、進行方向にカーブがある場合は、画像の中心画像は流れてしまうが、動きベクトルから交点領域を特定することにより、撮影の主被写体になるであろう進行方向の画像の流れが少ない領域に評価枠を設定することができる。これにより、カメラを固定した状態でも、適切な撮影を行うことが可能になる。   If the camera is fixed at an angle with respect to the direction of travel, or if there is a curve in the direction of travel, the center image of the image will flow, but by specifying the intersection area from the motion vector, the main subject of shooting An evaluation frame can be set in an area where there is little flow of the image in the traveling direction that will become. This makes it possible to perform appropriate shooting even when the camera is fixed.

また、画像から求まる動きベクトルから交点領域を特定することにより、車体の移動による画像の流れが発生している領域を避け、画像の流れが少ない領域に評価枠を設定することができる。   Further, by specifying the intersection area from the motion vector obtained from the image, it is possible to avoid the area where the image flow is caused by the movement of the vehicle body and set the evaluation frame in the area where the image flow is small.

さらに、画像の一部に車体、もしくは車内の一部が写りこんでいるような状態であっても、動きベクトルから交点領域を特定することにより、車外の画像の流れが少ない領域に評価枠を設定することができ、安定したピント、安定した露出での撮影が可能になる。   Furthermore, even if the car body or part of the interior of the vehicle is reflected in a part of the image, by specifying the intersection area from the motion vector, an evaluation frame is added to the area where the flow of the image outside the vehicle is small. It can be set, and shooting with stable focus and stable exposure becomes possible.

<第2の実施形態>
図17は、第2の実施形態に係るビデオカメラの構成を示す図である。なお、本実施形態ではビデオカメラについて説明するが、本発明はデジタルスチルカメラ等、他の撮像装置への適用も可能である。以下では、第1の実施形態との相違点を中心に説明し、第1の実施形態に係るビデオカメラと同様の構成要素には同一の符号を付し、その詳細な説明は省略する。
<Second Embodiment>
FIG. 17 is a diagram illustrating a configuration of a video camera according to the second embodiment. Although the present embodiment describes a video camera, the present invention can be applied to other imaging devices such as a digital still camera. In the following, differences from the first embodiment will be mainly described, the same components as those of the video camera according to the first embodiment will be denoted by the same reference numerals, and detailed description thereof will be omitted.

118は絞り部材駆動源であり、絞り103を駆動させるためのアクチュエータ及びそのドライバを含む。119はレンズから入射する光を減衰させるためのNDフィルタである。120はND部材駆動源であり、NDフィルタ119を駆動させるためのアクチュエータ及びそのドライバを含む。   Reference numeral 118 denotes an aperture member drive source, which includes an actuator for driving the aperture 103 and its driver. Reference numeral 119 denotes an ND filter for attenuating light incident from the lens. An ND member driving source 120 includes an actuator for driving the ND filter 119 and a driver thereof.

121は測光枠設定回路であり、CDS/AGC/ADコンバータ107からの全画素の出力信号のうち測光値検出に用いられる領域の信号のみを通す。122は輝度情報検波・演算回路であり、デジタルの画像データに基づいて輝度値を検波し、検波した輝度値を演算処理する。123は撮像素子駆動回路である。   Reference numeral 121 denotes a photometric frame setting circuit which passes only signals in a region used for photometric value detection among output signals of all pixels from the CDS / AGC / AD converter 107. Reference numeral 122 denotes a luminance information detection / calculation circuit, which detects a luminance value based on digital image data and performs an arithmetic process on the detected luminance value. Reference numeral 123 denotes an image sensor driving circuit.

第1の実施形態と同様に、交点領域検出回路114は、動きベクトル検出回路113の検出結果に基づいて動きベクトルの交点領域を算出し、その算出結果をカメラマイコン115に送信する。カメラマイコン115は、交点領域に測光値検出に用いられる評価枠(評価領域)である測光枠を設定するように測光枠設定回路121へ情報を送信する。その後、画面内の測光枠の輝度値を取得するため、輝度情報検波・演算回路122により測光値を取得し、測光した測光値を演算により正規化する。このとき、同時に画面全体の測光値も輝度情報検波・演算回路122により演算を行う。そして、カメラマイコン115で測光値と適正な露出が得られるように設定された目標値との差分を算出する。その後、算出した差分からカメラマイコン115により絞りの補正駆動量を算出し、絞り部材駆動源118、ND部材駆動源120の駆動を制御する。   Similar to the first embodiment, the intersection area detection circuit 114 calculates a motion vector intersection area based on the detection result of the motion vector detection circuit 113, and transmits the calculation result to the camera microcomputer 115. The camera microcomputer 115 transmits information to the photometric frame setting circuit 121 so as to set a photometric frame that is an evaluation frame (evaluation region) used for photometric value detection in the intersection area. Thereafter, in order to acquire the luminance value of the photometric frame in the screen, the photometric value is acquired by the luminance information detection / calculation circuit 122, and the photometric value is normalized by calculation. At this time, the luminance information detection / calculation circuit 122 calculates the photometric value of the entire screen at the same time. Then, the camera microcomputer 115 calculates the difference between the photometric value and the target value set so that proper exposure can be obtained. Thereafter, the camera microcomputer 115 calculates a correction driving amount of the diaphragm from the calculated difference, and controls the driving of the diaphragm member driving source 118 and the ND member driving source 120.

次に、カメラマイコン115が実行する露出調節制御の概要について説明する。図20は、本実施形態における露出調節制御を示すフローチャートである。まずステップS2001で、カメラマイコン115の制御下で輝度情報検波・演算回路122より、露出制御の基本となる輝度信号を取得するための測光枠の位置と大きさを設定する。測光枠の大きさは、交点領域検出回路114において、交点領域が検出された場合は、該交点領域を測光枠位置と設定する。交点領域が抽出されなかった場合は、固定の測光枠(初期位置:中央重点測光)を評価枠と設定する。なお、この交点領域の特定方法の詳細は第1の実施形態にて説明済みであるため省略する。   Next, an outline of exposure adjustment control executed by the camera microcomputer 115 will be described. FIG. 20 is a flowchart showing exposure adjustment control in the present embodiment. First, in step S2001, under the control of the camera microcomputer 115, the position and size of a photometric frame for acquiring a luminance signal as a basis for exposure control are set from the luminance information detection / calculation circuit 122. When the intersection area detection circuit 114 detects the intersection area, the intersection area is set as the photometric frame position. If no intersection area is extracted, a fixed photometry frame (initial position: center-weighted photometry) is set as the evaluation frame. Note that the details of the method for specifying the intersection area have been described in the first embodiment, and thus will be omitted.

ステップS2002で、カメラマイコン115は、指定された測光枠の輝度信号を取得する。この処理の詳細は図21を参照して後述する。   In step S2002, the camera microcomputer 115 acquires a luminance signal of the designated photometric frame. Details of this processing will be described later with reference to FIG.

ステップS2003で、カメラマイコン115は、露出制御により輝度調整を行う。この処理の詳細は図18を参照して後述する。その後、ステップS2001へ戻り、この処理を繰り返す。   In step S2003, the camera microcomputer 115 performs brightness adjustment by exposure control. Details of this processing will be described later with reference to FIG. Thereafter, the process returns to step S2001, and this process is repeated.

ステップS2002における測光枠の輝度情報の取得について、図21を参照して説明する。図21(a)は、図11(a)の入力画像に動きベクトルを図示したオプティカルフロー図である。領域Sは、ステップS2001において複数の動きベクトルから特定されるベクトルの交点領域を示したものである。図21(b)は、カメラマイコンに記録されているAEの重み付け、AEウエイティングを示したものである。AEウエイティングについては後述することとする。ステップS2001によって特定された交点領域を中心に、領域S´のAEの重み付けを1とし、その周辺の重み付けを半分の0.5にしている。こうすることにより、交点領域を中心とした、画像に流れの少ない部分の測光値が取得でき、安定した露出制御が可能になる。なお、この設定は一例であり、十分な測定を行いその結果に基づいて、適切な露出が得られる値に設定を変更することも可能である。同様に、図21(c)は、図12(a)の入力画像に動きベクトルを図示したオプティカルフロー図である。図21(d)も上述の通り、領域Sを中心に重み付けを行っている。重み付けは図のとおりであるため、その説明を省略する。   Acquisition of luminance information of the photometric frame in step S2002 will be described with reference to FIG. FIG. 21A is an optical flow diagram illustrating motion vectors in the input image of FIG. A region S indicates an intersection region of vectors identified from a plurality of motion vectors in step S2001. FIG. 21B shows AE weighting and AE weighting recorded in the camera microcomputer. The AE weighting will be described later. Centering on the intersection area specified in step S2001, the weight of the AE of the area S ′ is set to 1, and the weight of the surrounding area is set to half of 0.5. By doing this, it is possible to acquire a photometric value of a portion of the image with little flow centered on the intersection area, and to enable stable exposure control. Note that this setting is an example, and it is possible to change the setting to a value that provides appropriate exposure based on the result of sufficient measurement. Similarly, FIG. 21C is an optical flow diagram illustrating motion vectors in the input image of FIG. In FIG. 21D as well, weighting is performed around the region S as described above. Since the weighting is as shown in the figure, the description thereof is omitted.

次に、ステップS2003における露出制御について説明する。撮影レンズからの光学像が絞り103を介して、撮像素子106にて光電変換され、CDS/AGC/ADコンバータ107を経て映像子音号となり、カメラ信号処理回路108に送られる。露出制御するための信号は、AGC回路より出力された輝度信号を測光枠設定回路121を通り、輝度情報検波・演算回路122を経て、カメラマイコン115に取り込まれる。カメラマイコン115は、そのレベルが所定の範囲内に入るように、絞り部材駆動源118を制御し、絞り103へと出力する。駆動電流を制御して、絞り103の開口量を可変する絞り制御により露出制御が行われる。   Next, exposure control in step S2003 will be described. An optical image from the photographing lens is photoelectrically converted by the image sensor 106 through the diaphragm 103, converted into a video consonant signal through the CDS / AGC / AD converter 107, and sent to the camera signal processing circuit 108. As a signal for controlling exposure, the luminance signal output from the AGC circuit passes through the photometric frame setting circuit 121, passes through the luminance information detection / calculation circuit 122, and is taken into the camera microcomputer 115. The camera microcomputer 115 controls the diaphragm member drive source 118 so that the level falls within a predetermined range, and outputs the diaphragm member drive source 118 to the diaphragm 103. Exposure control is performed by aperture control that controls the drive current to vary the aperture amount of the aperture 103.

CDS/AGC/ADコンバータ107による露出制御系は、絞り103による露出制御系同様、前記カメラマイコン115に取り込まれた輝度情報検波・演算回路122の出力レベルが所定の範囲内に入るように、CDS/AGC/ADコンバータ107のゲインのレベルを、カメラマイコン115にて制御することによる閉ループにより露出制御系が構成されている。   The exposure control system by the CDS / AGC / AD converter 107 is similar to the exposure control system by the aperture 103 so that the output level of the luminance information detection / calculation circuit 122 captured by the camera microcomputer 115 falls within a predetermined range. An exposure control system is configured by a closed loop by controlling the gain level of the / AGC / AD converter 107 by the camera microcomputer 115.

シャッタ速度による露出制御系は、絞り103による露出制御系同様、カメラマイコン115に取り込まれたレベルが所定の範囲内に入るように、撮像素子駆動回路123をカメラマイコン115にて制御することによる閉ループにより露出制御系が構成されている。まず図18のプログラム線図を用いて、シャッタ速度と、絞りと、AGC回路による3種類の露出制御手段が照度に応じてどのように制御されているか説明する。このプログラム線図はカメラマイコンに記憶されており、そのデータテーブルについては図19において後述する。   The exposure control system based on the shutter speed is a closed loop by controlling the image sensor driving circuit 123 with the camera microcomputer 115 so that the level taken into the camera microcomputer 115 falls within a predetermined range, like the exposure control system based on the aperture 103. Thus, an exposure control system is configured. First, using the program diagram of FIG. 18, how the three types of exposure control means by the shutter speed, the aperture, and the AGC circuit are controlled according to the illuminance will be described. This program diagram is stored in the camera microcomputer, and the data table thereof will be described later with reference to FIG.

図18において、横軸は被写体照度、縦軸はアイリス、シャッタ速度、ゲインの各露出制御手段の設定値である。同図から明らかなように、各露出制御手段は被写体照度に応じてA,B,Cと3つの領域に分割されている。すなわち、被写体照度に応じて3種類の露出制御手段を組合わせることにより、露出の動作制御を行っている。領域Aにおいては、前記シャッタ速度は1/60(秒)に固定(PALは1/50(秒))され、且つ前記AGC回路のゲインも0dBで固定されており、前記絞りの開口量のみで露出が制御される。領域Bにおいては、前記絞り部材が開放で固定され、且つAGC回路のゲイン0dBで固定され、前記シャッタ速度は1/60(秒)に固定(PALは1/50(秒))されている。NDの挿入により0〜1/8までの間で照度に応じて連続的にND濃度を変化させることができ、NDにより露出が制御される。領域Cにおいては、前記絞り部材が開放で固定され、且つAGC回路のゲイン0dBで固定され、NDは1/8で固定されている。撮像素子の読み出しを制御して蓄積電荷量を制御することにより、前記シャッタ速度1/60(秒)から1/8(秒)までの間で照度に応じて連続的にシャッタ速度を変化させることができ、シャッタにより露出が制御される。領域Dにおいては、前記絞りが開放で固定され、且つ前記シャッタ速度が1/8(秒)で固定されており、前記AGC回路のみ露出が制御される。   In FIG. 18, the horizontal axis represents subject illuminance, and the vertical axis represents the setting values of the exposure control means for iris, shutter speed, and gain. As is apparent from the figure, each exposure control means is divided into three areas A, B, and C according to subject illuminance. That is, exposure operation control is performed by combining three types of exposure control means in accordance with subject illumination. In the area A, the shutter speed is fixed at 1/60 (second) (PAL is 1/50 (second)), and the gain of the AGC circuit is fixed at 0 dB. Exposure is controlled. In the region B, the aperture member is fixed open and fixed at a gain 0 dB of the AGC circuit, and the shutter speed is fixed at 1/60 (second) (PAL is 1/50 (second)). By inserting the ND, the ND density can be continuously changed between 0 and 1/8 according to the illuminance, and the exposure is controlled by the ND. In the area C, the aperture member is fixed open and fixed at a gain of 0 dB of the AGC circuit, and ND is fixed at 1/8. By controlling the readout of the image sensor to control the amount of accumulated charge, the shutter speed is continuously changed according to the illuminance between the shutter speed 1/60 (second) and 1/8 (second). The exposure is controlled by the shutter. In the area D, the aperture is fixed at the open position and the shutter speed is fixed at 1/8 (second), and only the AGC circuit is controlled for exposure.

この露出制御モードを実行する撮影モードのデータテーブルは図19に示すようになっており、アイリス(絞り)、シャッタ、AGCゲインそれぞれにおけるプログラム線図の特性がパラメータごとに属性(関数か固定値か)、データ形式(しきい値か、マップ形式か、数値による定義か、コードによる定義か等)、実際のデータがそれぞれ記憶されており、これをカメラマイコン115に読み込むことによって図18におけるプログラム線図が設定される。また、情報テーブルには他の設定情報も記憶されており、同図のAEウエイティングは撮像画面を複数の測光領域に分割した際の各測光領域の重み付けのデータをマップ形式で記憶したものであり、同図に示すように、画面を16分割し、その中央部の重み付けを1とし、その周辺の重み付けを半分の0.5にしたものであり、所謂中央重点測光となっている。   The shooting mode data table for executing this exposure control mode is as shown in FIG. 19, and the characteristics of the program diagram for each of the iris (aperture), shutter, and AGC gain are attribute (function or fixed value) for each parameter. ), Data format (threshold, map format, numerical value definition, code definition, etc.) and actual data are stored, and the program line in FIG. The figure is set. In addition, other setting information is also stored in the information table, and the AE weighting in the figure stores weighting data of each photometric area in a map format when the imaging screen is divided into a plurality of photometric areas. Yes, as shown in the figure, the screen is divided into 16 parts, the weight of the central part is set to 1, and the weight of the periphery thereof is halved to 0.5, which is so-called center-weighted photometry.

また、AE基準値は撮像信号のレベルが一定になるように露出制御する際の目標基準値を表している。またその他にもガンマ特性を撮影状態に応じて可変したり、フェード効果を施したりする等の画質調整、画像効果処理の有無についても設定されている。本実施形態では、"NORMAL"となっており、特別な画質、画像効果の処理は行われていないことを示している。   The AE reference value represents a target reference value when exposure control is performed so that the level of the imaging signal is constant. In addition, it is also set whether or not image quality adjustment and image effect processing are performed, such as changing the gamma characteristic according to the shooting state and applying a fade effect. In the present embodiment, “NORMAL” indicates that special image quality and image effect processing is not performed.

なお、上記の4種類の露出制御系を制御するにあたり、本実施形態では被写体照度の明るい順に、絞り→ND→スローシャッタ→AGC回路の順で露出を制御したが、順序をアイリス→AGC→ND→スローシャッタのように変えることもできる。   In controlling the above four types of exposure control systems, in this embodiment, the exposure is controlled in the order of the aperture, ND, slow shutter, AGC circuit in order of increasing object illuminance, but the order is iris → AGC → ND. → It can be changed like a slow shutter.

以上のように、車載撮影において、自動的に測光枠を移動し、常に安定した露出での撮影が可能になる。例えばコンシューマ用ビデオカメラを車載撮影のために車体に固定し撮影した場合においても、映像から求まる動きベクトルを用いることにより、映像の流れが少ない領域に測光枠を設定することができ、安定した評価値を取得することが可能になる。   As described above, in in-vehicle shooting, the photometry frame is automatically moved, and shooting with stable exposure is always possible. For example, even when a consumer video camera is fixed to the body for in-vehicle shooting, a photometric frame can be set in an area where there is little flow of video by using a motion vector obtained from the video, and stable evaluation It becomes possible to get the value.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

101:第1固定レンズ、102:変倍レンズ、103:絞り、104:第2固定レンズ、105:フォーカスコンペンセータレンズ、106:撮像素子、107:CDS/AGC/ADコンバータ、108:カメラ信号処理回路、109:表示装置、110:記録装置、111:AFゲート、112:焦点信号処理回路、113:動きベクトル検出回路、114:交点領域検出回路、115:カメラ/AFマイコン、116:フォーカスレンズ駆動源、117:変倍レンズ駆動源、118:絞り部材駆動源、119:NDフィルタ、120:ND部材駆動源、121:測光枠設定回路、122:輝度情報検波・演算回路、123:撮像素子駆動回路   101: first fixed lens, 102: variable power lens, 103: aperture, 104: second fixed lens, 105: focus compensator lens, 106: image sensor, 107: CDS / AGC / AD converter, 108: camera signal processing circuit 109: display device, 110: recording device, 111: AF gate, 112: focus signal processing circuit, 113: motion vector detection circuit, 114: intersection area detection circuit, 115: camera / AF microcomputer, 116: focus lens drive source 117: Magnification lens drive source, 118: Diaphragm member drive source, 119: ND filter, 120: ND member drive source, 121: Photometric frame setting circuit, 122: Luminance information detection / calculation circuit, 123: Image sensor drive circuit

Claims (11)

撮像光学系により結像された光学像を映像信号に変換する撮像手段と、
前記撮像手段で得られる映像信号から動きベクトルを検出する動きベクトル検出手段と、
前記動きベクトルの検出結果に応じて、所定の評価値を得るための当該映像上の評価領域を設定する評価領域設定手段とを備え、
前記動きベクトル検出手段は、前記撮像手段で得られる映像をx方向及びy方向に複数のブロックに分割し、各ブロックで動きベクトルを検出し、
前記評価領域設定手段は、前記各ブロックで検出した動きベクトルの交点領域を前記評価領域とし、
前記各ブロックで算出される動きベクトルの交点領域を特定できず、かつ、前記各ブロックで算出される動きベクトルが一方向に向いている場合は、予め定められた固定の初期位置にある評価領域を用い、動きベクトルの大きさに応じて、その評価領域の大きさを変更することを特徴とする撮像装置。
Imaging means for converting an optical image formed by the imaging optical system into a video signal;
Motion vector detection means for detecting a motion vector from the video signal obtained by the imaging means;
An evaluation area setting means for setting an evaluation area on the video for obtaining a predetermined evaluation value according to the detection result of the motion vector;
The motion vector detection means divides the video obtained by the imaging means into a plurality of blocks in the x direction and the y direction, detects a motion vector in each block,
The evaluation area setting means sets an intersection area of motion vectors detected in each block as the evaluation area,
If the intersection area of the motion vector calculated in each block cannot be specified and the motion vector calculated in each block is in one direction, the evaluation area is at a predetermined fixed initial position. , And changing the size of the evaluation area according to the size of the motion vector.
記評価領域設定手段は前記撮像手段で得られる映像の一定の割合以上の領域において動きベクトルが増加傾向にない場合は、予め定められた固定の初期位置にある評価領域を用いることを特徴とする請求項1に記載の撮像装置。 Before Symbol evaluation area setting means, when the motion vector in the predetermined ratio or more regions of the image obtained by the imaging means is not in the increasing trend, characterized by the use of an evaluation area in an initial position of the predetermined fixed The imaging apparatus according to claim 1 . 前記評価領域設定手段は、前記各ブロックで検出した動きベクトルのx成分のゼロクロス点及びy成分のゼロクロス点を求めて、前記交点領域を特定することを特徴とする請求項1又は2に記載の撮像装置。   The said evaluation area | region setting means calculates | requires the x cross-point of the x component of the motion vector detected in each said block, and the zero cross point of the y-component, and specifies the said intersection area | region, The Claim 1 or 2 characterized by the above-mentioned. Imaging device. 前記評価領域設定手段は、前記撮像手段で得られる映像の一定の割合以上の領域において動きベクトルが増加傾向にない場合、予め定められた固定の初期位置にある評価領域を用いることを特徴とする請求項1に記載の撮像装置。   The evaluation area setting means uses an evaluation area at a predetermined fixed initial position when the motion vector does not tend to increase in an area of a certain ratio or more of the video obtained by the imaging means. The imaging device according to claim 1. 前記評価領域は焦点信号を取得するためのオートフォーカス枠であることを特徴とする請求項1乃至のいずれか1項に記載の撮像装置。 The evaluation area imaging device according to any one of claims 1 to 4, characterized in that an auto-focus frame to obtain a focus signal. 前記評価領域は測光値を取得するための測光枠であることを特徴とする請求項1乃至のいずれか1項に記載の撮像装置。 The evaluation area imaging device according to any one of claims 1 to 5, characterized in that a photometric frame for obtaining a photometric value. 前記評価領域設定手段は、前記撮像手段で得られる映像上で動きベクトルが一方向に向いている場合、前記動きベクトルの大きさが第1の閾値よりも小さいとき、前記初期位置にある評価領域のままとし、前記動きベクトルの大きさが前記第1の閾値以上となったとき、動きベクトルの大きさに応じて前記初期位置にある評価領域の大きさを大きくし、前記動きベクトルの大きさが前記第1の閾値よりも大きい第2の閾値以上となったとき、その前の評価領域の状態を維持することを特徴とする請求項1に記載の撮像装置。   The evaluation area setting means has an evaluation area at the initial position when the motion vector is in one direction on the video obtained by the imaging means and the magnitude of the motion vector is smaller than a first threshold value. When the magnitude of the motion vector is equal to or greater than the first threshold, the size of the evaluation region at the initial position is increased according to the magnitude of the motion vector, and the magnitude of the motion vector The imaging apparatus according to claim 1, wherein when the value becomes equal to or greater than a second threshold value greater than the first threshold value, the state of the previous evaluation region is maintained. 撮像光学系により結像された光学像を映像信号に変換する撮像手段を備えた撮像装置の制御方法であって、
前記撮像手段で得られる映像信号から動きベクトルを検出するステップと、
前記動きベクトルの検出結果に応じて、所定の評価値を得るための当該映像上の評価領域を設定するステップとを有し、
前記動きベクトルを検出するステップでは、前記撮像手段で得られる映像をx方向及びy方向に複数のブロックに分割し、各ブロックで動きベクトルを検出し、
前記評価領域を設定するステップでは、前記各ブロックで検出した動きベクトルの交点領域を前記評価領域とし、
前記各ブロックで算出される動きベクトルの交点領域を特定できず、かつ、前記各ブロックで算出される動きベクトルが一方向に向いている場合は、予め定められた固定の初期位置にある評価領域を用い、動きベクトルの大きさに応じて、その評価領域の大きさを変更することを特徴とする撮像装置の制御方法。
An image pickup apparatus control method comprising an image pickup means for converting an optical image formed by an image pickup optical system into a video signal,
Detecting a motion vector from a video signal obtained by the imaging means;
Setting an evaluation region on the video for obtaining a predetermined evaluation value in accordance with the detection result of the motion vector,
In the step of detecting the motion vector, the video obtained by the imaging unit is divided into a plurality of blocks in the x direction and the y direction, and the motion vector is detected in each block,
In the step of setting the evaluation area, an intersection area of motion vectors detected in each block is set as the evaluation area,
If the intersection area of the motion vector calculated in each block cannot be specified and the motion vector calculated in each block is in one direction, the evaluation area is at a predetermined fixed initial position. And controlling the size of the evaluation area according to the size of the motion vector.
記評価領域を設定するステップでは前記撮像手段で得られる映像の一定の割合以上の領域において動きベクトルが増加傾向にない場合は、予め定められた固定の初期位置にある評価領域を用いることを特徴とする請求項8に記載の撮像装置の制御方法。 In the step of setting the pre-Symbol evaluation area if the motion vector in the predetermined ratio or more regions of the image obtained by the imaging means is not in the increasing tendency, the use of the evaluation area in the initial position of the predetermined fixed The method for controlling an imaging apparatus according to claim 8 . 撮像光学系により結像された光学像を映像信号に変換する撮像手段を備えた撮像装置において評価領域を設定するためのプログラムであって、
前記撮像手段で得られる映像信号から動きベクトルを検出する処理と、
前記動きベクトルの検出結果に応じて、所定の評価値を得るための当該映像上の評価領域を設定する処理とをコンピュータに実行させ、
前記動きベクトルを検出する処理では、前記撮像手段で得られる映像をx方向及びy方向に複数のブロックに分割し、各ブロックで動きベクトルを検出し、
前記評価領域を設定する処理では、前記各ブロックで検出した動きベクトルの交点領域を前記評価領域とし、
前記各ブロックで算出される動きベクトルの交点領域を特定できず、かつ、前記各ブロックで算出される動きベクトルが一方向に向いている場合は、予め定められた固定の初期位置にある評価領域を用い、動きベクトルの大きさに応じて、その評価領域の大きさを変更することを特徴とするプログラム。
A program for setting an evaluation region in an imaging apparatus including an imaging unit that converts an optical image formed by an imaging optical system into a video signal,
Processing for detecting a motion vector from a video signal obtained by the imaging means;
In accordance with the detection result of the motion vector, causing the computer to execute processing for setting an evaluation area on the video for obtaining a predetermined evaluation value,
In the process of detecting the motion vector, the image obtained by the imaging unit is divided into a plurality of blocks in the x direction and the y direction, and the motion vector is detected in each block.
In the process of setting the evaluation area, the intersection area of motion vectors detected in each block is set as the evaluation area,
If the intersection area of the motion vector calculated in each block cannot be specified and the motion vector calculated in each block is in one direction, the evaluation area is at a predetermined fixed initial position. And changing the size of the evaluation area according to the size of the motion vector .
記評価領域を設定する処理では前記撮像手段で得られる映像の一定の割合以上の領域において動きベクトルが増加傾向にない場合は、予め定められた固定の初期位置にある評価領域を用いることを特徴とする請求項10に記載のプログラム。 In the process of setting the pre-Symbol evaluation area if the motion vector in the predetermined ratio or more regions of the image obtained by the imaging means is not in the increasing tendency, the use of the evaluation area in the initial position of the predetermined fixed The program according to claim 10 .
JP2011115121A 2011-05-23 2011-05-23 Imaging apparatus, control method thereof, and program Active JP6071173B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011115121A JP6071173B2 (en) 2011-05-23 2011-05-23 Imaging apparatus, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011115121A JP6071173B2 (en) 2011-05-23 2011-05-23 Imaging apparatus, control method thereof, and program

Publications (2)

Publication Number Publication Date
JP2012242759A JP2012242759A (en) 2012-12-10
JP6071173B2 true JP6071173B2 (en) 2017-02-01

Family

ID=47464505

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011115121A Active JP6071173B2 (en) 2011-05-23 2011-05-23 Imaging apparatus, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP6071173B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410831B (en) * 2014-12-01 2019-10-22 厦门雅迅网络股份有限公司 A method of monitoring taxi does not play table
JP6781589B2 (en) * 2016-08-08 2020-11-04 キヤノン株式会社 Image blur correction device and its control method, program, storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08251473A (en) * 1995-03-13 1996-09-27 Canon Inc Image pickup device
JP4533089B2 (en) * 2004-11-01 2010-08-25 富士通セミコンダクター株式会社 Movie data generator
JP4645413B2 (en) * 2005-11-01 2011-03-09 株式会社ニコン Imaging device
JP2007318292A (en) * 2006-05-24 2007-12-06 Casio Comput Co Ltd Motion vector detector and its program
JP2008109336A (en) * 2006-10-25 2008-05-08 Matsushita Electric Ind Co Ltd Image processor and imaging apparatus
JP4759524B2 (en) * 2007-01-09 2011-08-31 富士フイルム株式会社 Electronic camera shake correction method and apparatus, electronic camera shake correction program, and imaging apparatus
JP4561919B2 (en) * 2008-04-21 2010-10-13 ソニー株式会社 Imaging apparatus, image processing apparatus, and image processing method
JP2010074584A (en) * 2008-09-19 2010-04-02 Sony Corp Imaging apparatus and imaging method
JP4760918B2 (en) * 2009-01-23 2011-08-31 カシオ計算機株式会社 Imaging apparatus, subject tracking method, and program
JP5193148B2 (en) * 2009-09-03 2013-05-08 本田技研工業株式会社 Vehicle imaging device

Also Published As

Publication number Publication date
JP2012242759A (en) 2012-12-10

Similar Documents

Publication Publication Date Title
JP5676988B2 (en) Focus adjustment device
JP6184189B2 (en) SUBJECT DETECTING DEVICE AND ITS CONTROL METHOD, IMAGING DEVICE, SUBJECT DETECTING DEVICE CONTROL PROGRAM, AND STORAGE MEDIUM
JP6202910B2 (en) Video processing apparatus, control method therefor, and program
JP2014119715A (en) Imaging apparatus, imaging method and program
JP2011205282A (en) Imaging apparatus and image processing method
JP3732665B2 (en) Automatic focus control device and focusing operation determination method thereof
JP6581333B2 (en) Image processing apparatus, imaging apparatus, and program
JP5075110B2 (en) Focus adjustment apparatus and method
JP6071173B2 (en) Imaging apparatus, control method thereof, and program
US8582016B2 (en) Photographing apparatus and focus detecting method using the same
JP2018017876A (en) Imaging apparatus and control method of the same, and image processing apparatus and method
JP6971694B2 (en) Image pickup device and its control method
JP2020181147A (en) Focusing apparatus, image pickup apparatus, focusing method, and program
CN104902179A (en) Method and device for previewing camera image
JP5607458B2 (en) Imaging apparatus and control method thereof
JP2013210572A (en) Imaging device and control program of the same
JP2016208530A (en) Image generating apparatus, image generation method, and program
JP5683135B2 (en) Imaging apparatus and control method thereof
JP6329400B2 (en) Image processing apparatus, image processing method and program, and imaging apparatus
US11627245B2 (en) Focus adjustment device and focus adjustment method
JP6202982B2 (en) Image processing apparatus, control method thereof, and control program
JP2006039254A (en) Camera
WO2021161959A1 (en) Information processing device, information processing method, information processing program, imaging device, imaging device control method, control program, and imaging system
JP6377225B2 (en) Image processing apparatus, control method therefor, and program
JP5979288B2 (en) Imaging apparatus, imaging method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140513

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150331

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160108

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160809

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161227

R151 Written notification of patent or utility model registration

Ref document number: 6071173

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151