JP2018072895A - Image processing device, image processing method and program - Google Patents

Image processing device, image processing method and program Download PDF

Info

Publication number
JP2018072895A
JP2018072895A JP2016208034A JP2016208034A JP2018072895A JP 2018072895 A JP2018072895 A JP 2018072895A JP 2016208034 A JP2016208034 A JP 2016208034A JP 2016208034 A JP2016208034 A JP 2016208034A JP 2018072895 A JP2018072895 A JP 2018072895A
Authority
JP
Japan
Prior art keywords
image
block
divided
image processing
feature point
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.)
Pending
Application number
JP2016208034A
Other languages
Japanese (ja)
Inventor
友貴 植草
Tomotaka Uekusa
友貴 植草
谷口 浩之
Hiroyuki Taniguchi
浩之 谷口
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 JP2016208034A priority Critical patent/JP2018072895A/en
Publication of JP2018072895A publication Critical patent/JP2018072895A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To reduce occurrence of a redundant process in detecting a motion vector.SOLUTION: An image processing device defines a search area to perform a correlation operation in a second image for a matching process to search a high correlation area in the second image based on a first image. The device determines a feature point for each divided area for the first image in which a plurality of divided areas are defined, and sets the search area in the second image based on the determined feature point for the divided area for each of the plurality of divided areas. In the setting, when the feature point satisfies a predetermined condition among at least two divided areas of the plurality of divided areas, one search area is set to the at least two divided areas such that the matching processes related to the at least two divided areas are integrated.SELECTED DRAWING: Figure 9

Description

本発明は、画像処理装置、画像処理方法及びプログラムに関し、特に画像間の相関に基づく動きベクトルの検出技術に関するものである。   The present invention relates to an image processing apparatus, an image processing method, and a program, and more particularly to a motion vector detection technique based on correlation between images.

デジタルビデオカメラ等の撮像装置の分野では、動画撮影時の手ブレに起因する像ブレを低減する手法の1つに、複数のフレーム画像から撮像装置の動き量を推定し、像の結像位置が安定するよう光学系を制御するものがある。複数のフレーム画像に基づく動き量の推定は、例えば特定のパターンをテンプレート画像とするテンプレートマッチングによって、最も相関の高い別フレーム画像中の領域を特定することで得られる動きベクトルに基づいて行われる。特許文献1には、好適に像ブレを低減する動き量を高速に推定するため、画像を複数のブロックに分割し、ブロックごとに決定した最大の特徴量を示す特徴点について、該特徴点を含むテンプレート画像を用いた動きベクトルの導出を行う手法が採用されている。   In the field of imaging devices such as digital video cameras, one of the methods for reducing image blur caused by camera shake during movie shooting is to estimate the amount of motion of the imaging device from a plurality of frame images, and to form an image image There are some which control the optical system so that is stabilized. The estimation of the amount of motion based on a plurality of frame images is performed based on a motion vector obtained by specifying a region in another frame image having the highest correlation, for example, by template matching using a specific pattern as a template image. In Patent Document 1, in order to appropriately estimate a motion amount that reduces image blur at high speed, an image is divided into a plurality of blocks, and the feature point indicating the maximum feature amount determined for each block is described as the feature point. A technique for deriving a motion vector using a template image including the template image is employed.

特開2008−192060号公報JP 2008-192060 A

ところで、特許文献1のように複数のブロックのそれぞれについて動きベクトルを導出する手法では、画像が特定のパターンを示す場合に非効率な演算が行われ得る。   By the way, in the method of deriving a motion vector for each of a plurality of blocks as in Patent Document 1, an inefficient calculation can be performed when an image shows a specific pattern.

例えば図12のブロック1201aに示されるように、最大の特徴量を示す特徴点1202aがブロック中央付近に存在する場合は、該特徴点を中心とするテンプレート画像1203aもブロック内に留まるため、他ブロックのテンプレート画像と重複しにくい。即ち、他のブロックに係るテンプレート画像と重複しないテンプレート画像1203aを用いて、探索領域1204aについてのテンプレートマッチング処理(以下、マッチング処理)では、他のブロックに係る動きベクトル導出と類似する演算は生じない。   For example, as shown in the block 1201a of FIG. 12, when the feature point 1202a indicating the maximum feature amount exists near the center of the block, the template image 1203a centering on the feature point also stays in the block, so that other blocks It is hard to overlap with the template image. That is, in the template matching process (hereinafter referred to as matching process) for the search area 1204a using the template image 1203a that does not overlap the template image related to the other block, an operation similar to the motion vector derivation related to the other block does not occur. .

一方、例えば高い特徴量を示すパターンが異なるブロックに分割される態様では、図12の隣接するブロック1201b〜eに示されるように、特徴点1202b〜eがブロック周辺に近接して決定され得る。このような場合、各ブロックについて定まるテンプレート画像と探索領域は内容が類似するため、マッチング処理において、重複する同一のパターンにつき同様の相関演算が行われる、あるいは冗長なメモリアクセスが生じ、非効率であった。   On the other hand, for example, in a mode in which a pattern showing a high feature amount is divided into different blocks, the feature points 1202b to 1202e can be determined close to the block periphery as shown in the adjacent blocks 1201b to 120e in FIG. In such a case, since the template image and the search area determined for each block are similar in content, in the matching process, the same correlation calculation is performed for the same overlapping pattern, or redundant memory access occurs, which is inefficient. there were.

本発明は、上述の問題点に鑑みてなされたものであり、動きベクトルの検出に際し、冗長な処理の発生を低減する画像処理装置、画像処理方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image processing apparatus, an image processing method, and a program that reduce the occurrence of redundant processing when detecting a motion vector.

前述の目的を達成するために、本発明の画像処理装置は、第1の画像に基づいて第2の画像における相関の高い領域を探索するマッチング処理につき、相関演算を行う探索領域を第2の画像に定める画像処理装置であって、複数の分割領域が定められた第1の画像について、分割領域ごとの特徴点を決定する決定手段と、複数の分割領域の各々に対し、該分割領域について決定された特徴点に基づき、第2の画像中の探索領域を設定する設定手段と、を有し、設定手段は、複数の分割領域のうちの少なくとも2つの分割領域間で特徴点が所定の条件を満たす場合に、該少なくとも2つの分割領域に係るマッチング処理を統合させるよう、該少なくとも2つの分割領域に対して1つの探索領域を設定することを特徴とする。   In order to achieve the above-described object, the image processing apparatus according to the present invention sets a search area for performing a correlation operation to a second area for a matching process for searching for a highly correlated area in the second image based on the first image. An image processing apparatus defined for an image, wherein a determination unit that determines a feature point for each divided region for a first image in which a plurality of divided regions are determined, and for each of the divided regions Setting means for setting a search area in the second image based on the determined feature point, and the setting means has a predetermined feature point between at least two of the plurality of divided areas. When the condition is satisfied, one search area is set for the at least two divided areas so as to integrate the matching processing related to the at least two divided areas.

このような構成により本発明によれば、動きベクトルの検出に際し、冗長な処理の発生を低減することが可能となる。   With such a configuration, according to the present invention, it is possible to reduce the occurrence of redundant processing when detecting a motion vector.

本発明の実施形態及び変形例に係るデジタルビデオカメラ100の機能構成を示したブロック図The block diagram which showed the function structure of the digital video camera 100 which concerns on embodiment and the modification of this invention 動きベクトル検出部105の詳細構成を示したブロック図The block diagram which showed the detailed structure of the motion vector detection part 105 本発明の実施形態及び変形例に係る画像の分割態様を説明するための図The figure for demonstrating the division | segmentation aspect of the image which concerns on embodiment and modification of this invention 本発明の実施形態及び変形例に係る、余剰領域及びブロックの画像の出力を説明するための図The figure for demonstrating the output of the image of a surplus area | region and a block based on embodiment and the modification of this invention 特徴解析部203の詳細構成を示したブロック図The block diagram which showed the detailed structure of the characteristic analysis part 203 本発明の実施形態に係る設定部205が実行する設定処理を例示したフローチャートThe flowchart which illustrated the setting process which the setting part 205 which concerns on embodiment of this invention performs 本発明の実施形態に係る、対象ブロックにつき行われる各種領域の設定を説明するための図The figure for demonstrating the setting of the various area | region performed per object block based on embodiment of this invention 本発明の実施形態に係る、動きベクトル検出部105の各ブロックの処理タイミングを示した図The figure which showed the processing timing of each block of the motion vector detection part 105 based on embodiment of this invention. 本発明の実施形態に係る、マッチング処理の統合を行う場合の各種領域の設定を説明するための図The figure for demonstrating the setting of the various area | region when integrating the matching process based on embodiment of this invention 本発明の変形例に係る設定部205が実行する設定処理を例示したフローチャートThe flowchart which illustrated the setting process which the setting part 205 which concerns on the modification of this invention performs 本発明の変形例に係る、マッチング処理の統合を行う場合の各種領域の設定を説明するための図The figure for demonstrating the setting of the various area | region when integrating the matching process based on the modification of this invention 従来技術に係る、画像を分割した領域ごとに動きベクトルの算出を行う場合の冗長な処理の発生を説明するための図The figure for demonstrating generation | occurrence | production of the redundant process in the case of calculating a motion vector for every area | region which divided | segmented the image based on a prior art.

[実施形態]
以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。なお、以下に説明する一実施形態は、画像処理装置の一例としての、連続撮像された2フレームの画像間の動きベクトルに基づき手ブレ補正処理を行うデジタルビデオカメラに、本発明を適用した例を説明する。しかし、本発明は、画像に含まれる複数の分割領域(ブロック)の各々について、動きベクトル検出に係るマッチング処理の探索領域を設定することが可能な任意の機器に適用可能である。
[Embodiment]
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. In the embodiment described below, an example in which the present invention is applied to a digital video camera that performs camera shake correction processing based on a motion vector between two consecutively captured images as an example of an image processing apparatus. Will be explained. However, the present invention is applicable to any device that can set a search region for matching processing related to motion vector detection for each of a plurality of divided regions (blocks) included in an image.

《デジタルビデオカメラ100の構成》
図1は、本発明の実施形態に係るデジタルビデオカメラ100の機能構成を示すブロック図である。
<< Configuration of Digital Video Camera 100 >>
FIG. 1 is a block diagram showing a functional configuration of a digital video camera 100 according to an embodiment of the present invention.

撮像光学系101は、フォーカスレンズや防振レンズを含む複数のレンズ群および絞りを有して構成される。撮像光学系101は被写体の反射光を、後述する撮像部102に導くよう作用する。より詳しくは、撮像光学系101を通過した光束は、撮像部102上に被写体の光学像を形成する。ここで、防振レンズは、後述の駆動制御部111により出力された駆動命令に基づいて駆動部112が動作することで、駆動制御される。本実施形態のデジタルビデオカメラ100では、このような防振レンズの動作により機械式の防振が実現され、手ブレ等に起因する像ブレが低減される。なお、フォーカスレンズも駆動制御部111及び駆動部112により駆動制御がなされるものであってよく、ピント位置を調節するよう動作する。フォーカスレンズの駆動は、例えばピントリングが回転制御されることにより実現されるものであってよい。   The imaging optical system 101 includes a plurality of lens groups including a focus lens and an anti-vibration lens, and a stop. The imaging optical system 101 acts to guide the reflected light of the subject to the imaging unit 102 described later. More specifically, the light beam that has passed through the imaging optical system 101 forms an optical image of the subject on the imaging unit 102. Here, the anti-vibration lens is driven and controlled by the drive unit 112 operating based on a drive command output by the drive control unit 111 described later. In the digital video camera 100 of the present embodiment, mechanical vibration isolation is realized by the operation of such an image stabilization lens, and image blur due to camera shake or the like is reduced. Note that the focus lens may also be controlled by the drive control unit 111 and the drive unit 112, and operates to adjust the focus position. The drive of the focus lens may be realized, for example, by controlling the rotation of the focus ring.

撮像部102は、例えばCCDやCMOSセンサ等の撮像素子である。撮像部102は、撮像素子の撮像面に形成された光学像を光電変換し、アナログ画像信号を出力する。出力されたアナログ画像信号は、A/D変換部103によりA/D変換され、デジタル画像信号(以降、単に画像信号)として画像処理部104に出力される。   The imaging unit 102 is an imaging element such as a CCD or a CMOS sensor. The imaging unit 102 photoelectrically converts an optical image formed on the imaging surface of the imaging element and outputs an analog image signal. The output analog image signal is A / D converted by the A / D conversion unit 103 and output to the image processing unit 104 as a digital image signal (hereinafter simply referred to as an image signal).

画像処理部104は、本実施形態のデジタルビデオカメラ100において行われる各種の画像処理を実行する。画像処理部104は、例えばA/D変換部103から入力されたデジタル画像信号に対し、WB補正処理、色ゲインの適用を含む色差信号やRGB信号への変換処理、ガンマ補正処理等の現像処理を行い、記録用あるいは表示用の画像データを生成する。なお、本実施形態では、画像処理部104の行う画像処理のうち、動きベクトルを検出する処理については、動きベクトル検出部105が独立して担うものとして別途の機能構成を示している。しかしながら、画像処理部104と動きベクトル検出部105とは、1つのハードウェアとして実現されるものであっても、複数のハードウェアとして実現されるものであってもよいことは容易に理解されよう。   The image processing unit 104 executes various image processes performed in the digital video camera 100 of the present embodiment. The image processing unit 104 performs development processing such as WB correction processing, conversion to a color difference signal or RGB signal including application of color gain, and gamma correction processing on a digital image signal input from the A / D conversion unit 103, for example. The image data for recording or display is generated. In the present embodiment, among the image processing performed by the image processing unit 104, the motion vector detection processing is shown as a separate functional configuration that the motion vector detection unit 105 is independently responsible for. However, it will be easily understood that the image processing unit 104 and the motion vector detection unit 105 may be realized as one hardware or a plurality of hardware. .

システム制御部106は、例えばCPUであり、デジタルビデオカメラ100が有する各ブロックの動作を制御する。システム制御部106は、例えば記録媒体109に記録されている各ブロックの動作プログラムを読み出し、メモリ110に展開して実行することにより、各ブロックの動作を制御する。またシステム制御部106は、撮像光学系101のレンズ位置情報等の状態情報の取得も行う。   The system control unit 106 is a CPU, for example, and controls the operation of each block included in the digital video camera 100. For example, the system control unit 106 reads out an operation program for each block recorded in the recording medium 109, develops it in the memory 110, and executes it to control the operation of each block. The system control unit 106 also acquires state information such as lens position information of the imaging optical system 101.

記録媒体109は、例えばデジタルビデオカメラ100に内蔵される不揮発性メモリや、デジタルビデオカメラ100に着脱可能に装着されるメモリカード等の、恒久的な情報保持が可能に構成された記録装置である。上述したデジタルビデオカメラ100が有する各ブロックの動作プログラムは、例えば内蔵の不揮発性メモリに格納されるものであってよく、該メモリにはこの他、各ブロックの動作において必要となるパラメータ等の情報が記録されていてよい。一方、メモリ110は、作業領域や一時的な情報格納に用いられる揮発性メモリ等の記録装置である。メモリ110は、動作プログラムの展開領域としてだけでなく、各ブロックの動作において出力された、あるいは各ブロックの動作の中間において保持が必要な各種データの格納領域としても用いられる。   The recording medium 109 is a recording device configured to be able to hold permanent information such as a nonvolatile memory built in the digital video camera 100 or a memory card detachably attached to the digital video camera 100. . The operation program for each block included in the digital video camera 100 described above may be stored in, for example, a built-in nonvolatile memory, and other information such as parameters necessary for the operation of each block is stored in the memory. May be recorded. On the other hand, the memory 110 is a recording device such as a volatile memory used for a work area or temporary information storage. The memory 110 is used not only as an operation program development area, but also as a storage area for various data output in the operation of each block or required to be held in the middle of the operation of each block.

操作部107は、デジタルビデオカメラ100に備えられた各種スイッチやダイヤル、撮影ボタン、タッチパネル等のユーザインタフェースである。操作部107は、ユーザインタフェースに対する操作入力がなされたことを検出すると、該入力を解析し、対応する制御信号をシステム制御部106に出力する。   The operation unit 107 is a user interface such as various switches, dials, shooting buttons, and a touch panel provided in the digital video camera 100. When the operation unit 107 detects that an operation input to the user interface has been made, the operation unit 107 analyzes the input and outputs a corresponding control signal to the system control unit 106.

表示部108は例えばLCD等の表示装置であり、画像処理部104による画像処理がなされた撮像に係る画像や、記録媒体109に記録されている画像の表示、その他設定画面等の各種グラフィカルユーザインタフェースの表示に用いられる。   The display unit 108 is, for example, a display device such as an LCD, and various graphical user interfaces such as an image related to imaging subjected to image processing by the image processing unit 104, an image recorded on the recording medium 109, and other setting screens. Used for display.

なお、本実施形態ではデジタルビデオカメラ100が備える機能構成は、各ブロックに対応する回路やプロセッサ等のハードウェアにより処理が実現されるものとして説明する。しかしながら、本発明の実施はこれに限られるものではなく、各ブロックの処理が同様の処理を行うプログラムにより実現されるものであってもよい。   In the present embodiment, the functional configuration of the digital video camera 100 will be described assuming that processing is realized by hardware such as a circuit and a processor corresponding to each block. However, the embodiment of the present invention is not limited to this, and the processing of each block may be realized by a program that performs similar processing.

《動きベクトル検出部105の構成》
次に、本実施形態のデジタルビデオカメラ100が有する、動きベクトル検出部105の構成について、図2を参照して詳細を説明する。動きベクトル検出部105は、例えば防振に係る機能の実行が設定されているモードにおいて、画像信号が入力され、処理が行われる。本実施形態では簡単のため、動きベクトル検出部105における動きベクトルの検出処理の対象は、連続する2フレームに係り撮像された画像信号であるものとして説明する。しかしながら、本発明は、防振機能に係る動きベクトルの検出用途に限られるものではなく、複数の画像間における相関を、基準となる画像を分割した複数のブロックの各々について求める用途であれば利用可能であることは理解されよう。
<< Configuration of Motion Vector Detection Unit 105 >>
Next, the configuration of the motion vector detection unit 105 included in the digital video camera 100 according to the present embodiment will be described in detail with reference to FIG. For example, in the mode in which execution of a function related to image stabilization is set, the motion vector detection unit 105 receives an image signal and performs processing. In the present embodiment, for the sake of simplicity, the description will be made assuming that the target of motion vector detection processing in the motion vector detection unit 105 is an image signal picked up in two consecutive frames. However, the present invention is not limited to the motion vector detection application related to the image stabilization function, and can be used if the correlation between a plurality of images is obtained for each of a plurality of blocks obtained by dividing a reference image. It will be understood that this is possible.

なお、以下に示す動きベクトル検出部105の各構成の説明において、動きベクトルの検出の基準となる画像信号、即ち、時系列において後に撮像された画像(後続フレーム画像)を、本発明に係る第1の画像としての「基準画像」とする。また、動きベクトルの検出にあたり、基準画像と相関の高い領域の探索が行われる画像信号、即ち、時系列において(基準画像よりも)先に撮像された画像(先行フレーム画像)を、本発明に係る第2の画像としての「対象画像」として説明する。また基準画像について動きベクトルの検出を行うにあたり、少なくとも探索に必要となる対象画像の画素は、後述の画像メモリ204に格納されているものとする。   In the description of each configuration of the motion vector detection unit 105 shown below, an image signal serving as a reference for motion vector detection, that is, an image (subsequent frame image) captured later in time series, Let it be a “reference image” as one image. In addition, when detecting a motion vector, an image signal in which a region having a high correlation with the reference image is searched, that is, an image (previous frame image) captured earlier in time series (before the reference image) is added to the present invention. This will be described as a “target image” as the second image. In addition, at the time of detecting a motion vector for a reference image, it is assumed that at least pixels of a target image necessary for searching are stored in an image memory 204 described later.

ブロック転送部201は、入力された基準画像を、後段の処理で扱われる大きさ(処理単位)の画像に分離し、後続のブロックに転送する。本実施形態では基準画像300は、図3に示されるようなグリッドによって、水平方向6×垂直方向4の複数の分割領域に分離されたブロック(白地で示される矩形領域群)に分離される。なお、マッチング処理の過程にてブロック外の領域は、本発明に係る基準領域としての、マッチング処理に用いられるテンプレート画像、または該テンプレート画像につき最も相関の高い位置を探索する探索領域としても設定され得る。   The block transfer unit 201 separates the input reference image into an image having a size (processing unit) that is handled in the subsequent processing, and transfers the image to the subsequent block. In the present embodiment, the reference image 300 is separated into blocks (rectangular region groups indicated by white background) separated into a plurality of divided regions in the horizontal direction 6 × vertical direction 4 by a grid as illustrated in FIG. 3. Note that the area outside the block in the matching process is also set as a reference area according to the present invention as a template image used for the matching process or a search area for searching for the position with the highest correlation for the template image. obtain.

本実施形態では各ブロックにつき特徴点が決定され、該特徴点を中心として予め定められた大きさの矩形領域がテンプレート画像として設定される。またテンプレート画像よりも大きい矩形領域が、対象画像においてテンプレート画像との相関演算を行う範囲である(対象画像においてマッチング処理を行う座標範囲を示す)探索領域として設定される。図3の各ブロックでは、基準画像300につき設定されるテンプレート画像と、対象画像につき設定される探索領域との相対的な位置関係を示すため、基準画像上に探索領域を示している。例えばブロック301aのように特徴点302aがブロック中央付近に決定される場合は、テンプレート画像303aも探索領域304aも該ブロック内に納まる。一方で、ブロック301bのように特徴点302bがブロック上部境界付近に決定される場合、テンプレート画像303bと探索領域304bは該ブロック外の画素を含んで設定され得る。   In the present embodiment, a feature point is determined for each block, and a rectangular area having a predetermined size around the feature point is set as a template image. A rectangular region larger than the template image is set as a search region (indicating a coordinate range in which the matching processing is performed in the target image) that is a range in which correlation calculation with the template image is performed in the target image. In each block in FIG. 3, the search area is shown on the reference image in order to indicate the relative positional relationship between the template image set for the reference image 300 and the search area set for the target image. For example, when the feature point 302a is determined near the center of the block as in the block 301a, both the template image 303a and the search area 304a fit in the block. On the other hand, when the feature point 302b is determined near the block upper boundary as in the block 301b, the template image 303b and the search region 304b can be set including pixels outside the block.

故に、ブロック転送部201は、基準画像の端部付近に位置するブロックについてブロック外の画素を含むテンプレート画像303や探索領域304が設定される場合を考慮し、図3にハッチングで示される余剰領域305を設けるよう基準画像を分離する。即ち、余剰領域305を設けることで、ブロック外の画素を含むテンプレート画像303や探索領域304が設定され、該ブロック外の画素がいずれのブロックに属していない場合であっても、余剰領域305を参照可能に構成される。   Therefore, the block transfer unit 201 considers the case where the template image 303 including the pixels outside the block and the search region 304 are set for the block located near the end of the reference image, and the surplus region indicated by hatching in FIG. The reference image is separated to provide 305. That is, by providing the surplus area 305, the template image 303 and the search area 304 including pixels outside the block are set, and even if the pixels outside the block do not belong to any block, the surplus area 305 is It is configured to be referable.

本実施形態ではブロック転送部201は、このように分離したブロック及び余剰領域に係る基準画像を、マッチング処理において(基準画像及び対象画像の)読み出しを行う画像メモリ204に格納させるため、画像変換部202に転送する。またブロック転送部201は、ブロックに係る基準画像の特徴点を決定させるため、特徴解析部203にもブロックに係る部分画像を転送する。部分画像の転送は、図4に示されるように該部分画像の各行の画素を左から順に出力する処理を、部分画像の最上行から最下行まで順次切り替えて行うことによりなされる。従って、ブロック転送部201は、余剰領域402aの画像を不図示の格納領域から読み出して画像変換部202に転送し、次いで余剰領域402bを読み出して転送、と順次右の余剰領域を選択して転送していく。その後、基準画像400の上端の余剰領域を全て画像変換部202に転送すると、ブロック転送部201はブロック401aの左に存在する余剰領域402cを読み出して画像変換部202に転送する。次いでブロック転送部201は、ブロック401aの画像を読み出して画像変換部202及び特徴解析部203に転送する処理を、水平方向に順次ブロック401b、ブロック401c・・・と切り替えて行い、ブロックに係る画像の転送を行えばよい。   In this embodiment, the block transfer unit 201 stores the reference image related to the separated block and the surplus area in the image memory 204 that performs reading (reference image and target image) in the matching process. 202. The block transfer unit 201 also transfers the partial image related to the block to the feature analysis unit 203 in order to determine the feature point of the reference image related to the block. As shown in FIG. 4, the partial image is transferred by sequentially switching the pixels of each row of the partial image from the left to the lowermost row of the partial image. Therefore, the block transfer unit 201 reads the image of the surplus area 402a from the storage area (not shown) and transfers it to the image conversion unit 202, then reads and transfers the surplus area 402b, and sequentially selects and transfers the right surplus area. I will do it. Thereafter, when all the surplus areas at the upper end of the reference image 400 are transferred to the image conversion unit 202, the block transfer unit 201 reads out the surplus area 402c existing on the left of the block 401a and transfers it to the image conversion unit 202. Next, the block transfer unit 201 performs processing of reading the image of the block 401a and transferring it to the image conversion unit 202 and the feature analysis unit 203 by sequentially switching the block 401b, the block 401c,. Can be transferred.

なお、余剰領域の画像は画像変換部202にのみ転送されるため、該転送の行われている際は、特徴解析部203に供給するクロックを停止する等により、消費電力を抑える構成としてもよい。また、本実施形態では簡単のため基準画像の全体がブロック転送部201に入力され、ブロック転送部201は該入力された基準画像を不図示の格納領域に格納し、定められたグリッドに基づき、該領域から転送に係る基準画像を順次読み出すものとして説明する。しかしながら、例えば基準画像がラスタスキャンの方式で読み出されて、順次読み出された画素がブロック転送部201に入力される態様であれば、既知の手法でラスタブロック変換が行われることで、画像の分離が実現されるものであってもよい。   In addition, since the image of the surplus area is transferred only to the image conversion unit 202, when the transfer is being performed, a configuration may be adopted in which power consumption is reduced by, for example, stopping the clock supplied to the feature analysis unit 203. . In the present embodiment, for the sake of simplicity, the entire reference image is input to the block transfer unit 201. The block transfer unit 201 stores the input reference image in a storage area (not shown), and based on a determined grid, A description will be given assuming that the reference images for transfer are sequentially read from the area. However, for example, if the reference image is read by the raster scan method and the sequentially read pixels are input to the block transfer unit 201, the raster block conversion is performed by a known method, so that the image May be realized.

画像変換部202は、入力された画像を動きベクトル検出を行うマッチング処理に適した特性の画像(検出用画像)に変換し、画像メモリ204への格納を行う。画像変換部202は、例えばバンドパスフィルタ回路であり、マッチング処理に不要な画像信号の高周波成分と低周波成分をカットする構成であってよい。   The image conversion unit 202 converts the input image into an image (characteristic for detection) having characteristics suitable for matching processing for detecting a motion vector, and stores the image in the image memory 204. The image conversion unit 202 is, for example, a band-pass filter circuit, and may be configured to cut high-frequency components and low-frequency components of image signals that are unnecessary for matching processing.

画像メモリ204は、マッチング処理に用いられる検出用画像が格納される記憶装置である。基準画像に係る動きベクトルの検出を行う場合において、画像メモリ204には(現フレームに係る)基準画像を変換した検出用画像と、(1フレーム前に係る)対象画像を変換した検出用画像とが格納されているものとする。   The image memory 204 is a storage device that stores a detection image used for matching processing. When detecting the motion vector related to the reference image, the image memory 204 stores a detection image obtained by converting the reference image (related to the current frame), a detection image obtained by converting the target image (related to the previous frame), and Is stored.

特徴解析部203は、入力された各ブロックの画像につき特徴点を決定し、その情報(特徴点情報)を設定部205に出力する。特徴解析部203における処理は、画像変換部202における変換処理と並行して行われるものであってよい。   The feature analysis unit 203 determines a feature point for each input image of the block, and outputs the information (feature point information) to the setting unit 205. The process in the feature analysis unit 203 may be performed in parallel with the conversion process in the image conversion unit 202.

〈特徴解析部203の構成〉
ここで、特徴解析部203における特徴点情報の出力に係る機能構成について、図5のブロック図を用いて詳細を説明する。
<Configuration of Feature Analysis Unit 203>
Here, the functional configuration related to the output of the feature point information in the feature analysis unit 203 will be described in detail with reference to the block diagram of FIG.

フィルタ部501は、入力されたブロックの画像を特徴量評価に適した特性の画像に変換するフィルタ処理を行う。フィルタ部501は、例えばバンドパスフィルタ、水平微分フィルタ、垂直微分フィルタ、平滑化フィルタ等の複数のフィルタで構成されるものであってよい。例えばフィルタ部501は、画像信号の不要な高周波成分と低周波成分をバンドパスフィルタでカットし、水平方向の微分フィルタ処理を施した信号と、垂直方向の微分フィルタ処理を施した信号、それぞれに対して、平滑化フィルタ処理を施したものを出力する。   The filter unit 501 performs a filter process for converting an input block image into an image having characteristics suitable for feature amount evaluation. The filter unit 501 may include a plurality of filters such as a band pass filter, a horizontal differential filter, a vertical differential filter, and a smoothing filter. For example, the filter unit 501 cuts an unnecessary high-frequency component and low-frequency component of the image signal with a band-pass filter and applies a horizontal differential filter process and a vertical differential filter process to the signal. On the other hand, the result of smoothing filter processing is output.

特徴量算出部502は、フィルタ部501によってフィルタ処理されたブロックの画像の各画素について、特徴量を算出する。特徴量算出部502は、例えば2つのエッジの交点や曲率が極大である曲線状の点等、画素の周辺の微分値が多方向に大きい点につき高い特徴量が示されるよう、所定の特徴評価式を用いて特徴量を算出する。特徴量算出部502は、例えば以下のようにShi and Tomasiの特徴評価式で画素の特徴量を算出すればよい。   The feature amount calculation unit 502 calculates a feature amount for each pixel of the block image filtered by the filter unit 501. The feature amount calculation unit 502 performs predetermined feature evaluation so that a high feature amount is indicated at a point where the differential value around the pixel is large in many directions, such as an intersection of two edges or a curved point having a maximum curvature. A feature amount is calculated using an equation. The feature amount calculation unit 502 may calculate the feature amount of a pixel using, for example, the Shi and Tomasi feature evaluation formula as follows.

まず特徴量算出部502は、水平微分フィルタと垂直微分フィルタを施した結果に基づき、自己相関行列Hを作成する。自己相関行列Hは、
により導出される。ここで、Ixは水平微分フィルタを施した結果、Iyは垂直微分フィルタを施した結果を表しており、ガウシアンフィルタGの畳み込みにより自己相関行列Hは現わされる。
First, the feature amount calculation unit 502 creates an autocorrelation matrix H based on the result of applying the horizontal differential filter and the vertical differential filter. The autocorrelation matrix H is
Is derived by Here, Ix represents the result of applying the horizontal differential filter, Iy represents the result of applying the vertical differential filter, and the autocorrelation matrix H appears by convolution of the Gaussian filter G.

Shi and Tomasiの特徴評価式は、
であり、自己相関行列Hの固有値λ1、λ2のうちの小さい方の固有値が、画素の特徴量として算出される。
Shi and Tomasi's feature evaluation formula is
The smaller eigenvalue of the eigenvalues λ1 and λ2 of the autocorrelation matrix H is calculated as the feature amount of the pixel.

特徴点決定部503は、特徴量算出部502により算出された、ブロックに含まれる各画素の特徴量に基づき、該ブロックの特徴点を決定する。本実施形態では特徴点決定部503は、ブロック中の画素のうち、最も高い特徴量を示した画素を特徴点として決定するものとして説明するが、本発明の実施はこれに限られるものである必要はない。例えば特徴点決定部503は、ブロック中の特徴量の分布に基づき、ブロック内外に限らず、特徴量のピークを示し得ると推定される画素に最も近いブロック内の画素を、特徴点として選択する構成としてもよい。特徴点決定部503は特徴点とする画素を決定すると、ブロックを特定する情報に、特徴点とした画素の該ブロックにおける座標の情報を関連付け、特徴点情報を生成する。ブロックにおける座標は、ブロックの左上端の画素の座標を(0,0)とする、相対座標(PX,PY)で表現されるものとする。なお、生成された特徴点情報は、特徴点決定部503内の不図示のメモリやレジスタに一旦記憶され、その後、設定部205にて該ブロックに係るマッチング処理の前処理が開始される際に、設定部205に出力されればよい。   The feature point determination unit 503 determines the feature point of the block based on the feature amount of each pixel included in the block calculated by the feature amount calculation unit 502. In the present embodiment, the feature point determination unit 503 will be described as determining the pixel having the highest feature amount among the pixels in the block as the feature point, but the present invention is not limited to this. There is no need. For example, the feature point determination unit 503 selects, as a feature point, a pixel in a block that is closest to a pixel that is estimated to be able to show a peak of the feature amount, not only inside or outside the block, based on the distribution of the feature amount in the block. It is good also as a structure. When the feature point determination unit 503 determines a pixel to be a feature point, the feature point information is generated by associating the information specifying the block with the coordinate information of the pixel as the feature point in the block. The coordinates in the block are expressed by relative coordinates (PX, PY) where the coordinates of the pixel at the upper left corner of the block are (0, 0). The generated feature point information is temporarily stored in a memory or register (not shown) in the feature point determination unit 503, and then, when the setting unit 205 starts preprocessing of matching processing related to the block. And output to the setting unit 205.

設定部205は、基準画像のブロックの各々について行われるマッチング処理について、テンプレート画像とする基準画像中の領域と、探索領域とする対象画像中の領域とを、該ブロックについて決定された特徴点の情報に基づき決定する。また設定部205は、各ブロックに係るマッチング処理について決定したテンプレート画像とする領域及び探索領域の情報に基づき、画像メモリ204からの画像メモリ204の読み出し位置を決定し、読み出し要求(メモリアクセス)を行う。本実施形態では、設定部205によりなされたメモリアクセスに基づき、不図示のメモリコントローラが該当アドレスに格納された画素を順次読み出し、テンプレート画像または探索領域の画像としてマッチング処理部206に出力するものとする。   For the matching process performed for each block of the reference image, the setting unit 205 determines the region in the reference image that is used as the template image and the region in the target image that is used as the search region for the feature points determined for the block. Determine based on information. Further, the setting unit 205 determines the reading position of the image memory 204 from the image memory 204 based on the information of the area to be a template image and the search area determined for the matching process related to each block, and issues a read request (memory access). Do. In this embodiment, based on the memory access made by the setting unit 205, a memory controller (not shown) sequentially reads out the pixels stored at the corresponding address, and outputs them to the matching processing unit 206 as a template image or a search region image. To do.

マッチング処理部206は、基準画像の各ブロックにつき入力されたテンプレート画像と参照領域の画像を用いて、ブロックごとのマッチング処理を実行する。マッチング処理は、上述したように基準画像について定められたテンプレート画像と最も相関の高い領域を、対象画像について定められた探索領域中で探索する処理である。マッチング処理部206は、探索領域中で演算対象とする領域(範囲)を順次変更させながら、所定の演算により相関度(相関値)を導出し、最も相関の高い領域を特定する。マッチング処理部206は、1つのブロックについて最も相関の高い領域を特定すると、テンプレート画像との相対的な位置関係に基づき、該ブロックに係る動きベクトルを算出する。またマッチング処理部206は、基準画像の全ブロックについての動きベクトルの算出が終了すると、基準画像と対象画像間における、画像全体に係る動きベクトルを算出し、出力する。   The matching processing unit 206 executes matching processing for each block using the template image input for each block of the standard image and the image of the reference area. The matching process is a process of searching for a region having the highest correlation with the template image defined for the reference image in the search region defined for the target image as described above. The matching processing unit 206 derives the degree of correlation (correlation value) by a predetermined calculation while sequentially changing the region (range) to be calculated in the search region, and specifies the region having the highest correlation. When the matching processing unit 206 identifies a region having the highest correlation for one block, the matching processing unit 206 calculates a motion vector related to the block based on a relative positional relationship with the template image. When the calculation of the motion vector for all the blocks of the reference image is completed, the matching processing unit 206 calculates and outputs a motion vector related to the entire image between the reference image and the target image.

相関値は、例えば差分絶対値和(SAD:Sum of Absolute Difference)を使用し、
として求めるものであってよい。ここで、f(i,j)はテンプレート画像704内の座標(i,j)における画素値、g(i,j)は探索領域705において相関値算出の対象となる領域内の各画素値である。相関値算出の対象領域は、探索領域中に、テンプレート画像704と同じ大きさを有して設定される。数式に示されるように、SADでは、テンプレート画像中の画素値f(i,j)と、対象領域内の対応する位置の画素値g(i,j)について差の絶対値を算出し、その総和を求めることで相関値S_SADが得られる。故に、相関値S_SADの値が小さいほどテンプレート画像と対象領域の輝度値の差分が小さい、つまりテンプレート画像704と対象領域の画像のテクスチャが類似していることが示される。
As the correlation value, for example, a sum of absolute differences (SAD) is used,
It may be what you want. Here, f (i, j) is a pixel value at the coordinates (i, j) in the template image 704, and g (i, j) is each pixel value in the region for which the correlation value is calculated in the search region 705. is there. The target area for correlation value calculation is set to have the same size as the template image 704 in the search area. As shown in the equation, in the SAD, the absolute value of the difference between the pixel value f (i, j) in the template image and the pixel value g (i, j) at the corresponding position in the target region is calculated. The correlation value S_SAD is obtained by calculating the sum. Therefore, the smaller the correlation value S_SAD, the smaller the difference between the brightness values of the template image and the target area, that is, the texture of the template image 704 and the target area image is similar.

なお、相関値の算出はSADを用いる手法に限らず、例えば差分二乗和(SSD)や正規化相互相関(NCC)等を用いる他の手法が利用されてもよいことは容易に理解されよう。   Note that the calculation of the correlation value is not limited to the method using SAD, and it will be easily understood that other methods using sum of squares of differences (SSD), normalized cross-correlation (NCC), and the like may be used.

〈冗長処理低減の概要〉
また、本実施形態の動きベクトル検出部105では、このような基準画像をブロック分割して行われる動きベクトルの導出について、冗長な処理の発生を低減するために、近接するブロックとの特徴点の関係に応じてマッチング処理の実行有無を異ならせる。より詳しくは、本実施形態の動きベクトル検出部105は、互いの特徴点が所定の距離離間せずに存在する複数のブロックについては、これらブロックについて行うマッチング処理を1つに統合する。
<Overview of reducing redundant processing>
In addition, in the motion vector detection unit 105 of this embodiment, in order to reduce the occurrence of redundant processing for the derivation of motion vectors performed by dividing the reference image into blocks, the feature points of adjacent blocks are reduced. Depending on the relationship, whether or not the matching process is executed is varied. More specifically, the motion vector detection unit 105 of the present embodiment integrates the matching processing performed on these blocks into one for a plurality of blocks in which the feature points are not separated from each other by a predetermined distance.

図7に例示されるように、対象ブロック701について決定された特徴点703がブロックの境界から所定の距離(テンプレート画像の1辺の半分の長さ)離れている、あるいはブロックの境界付近に存在しない場合は、冗長な処理の発生は少ない。即ち、対象ブロック701の周囲に存在する周辺ブロック709a〜h(対象ブロック701と隣接するあるいは頂点のみで接するブロック)につき決定された特徴点に基づき行われるマッチング処理と、重複する演算が発生する可能性は低い。これは、図示されるように特徴点703を中心とするテンプレート画像704が設定されたとしても、周辺ブロック709につき設定されるテンプレート画像と重複しない、あるいは重複したとしても画素数が比較的少ないことによる。   As illustrated in FIG. 7, the feature point 703 determined for the target block 701 is separated from the block boundary by a predetermined distance (half the length of one side of the template image), or exists near the block boundary. If not, there is little occurrence of redundant processing. In other words, matching processing performed based on the feature points determined for the peripheral blocks 709a to 709h (blocks adjacent to the target block 701 or touching only the vertices) existing around the target block 701, and an overlapping operation may occur. The nature is low. This is because, even if a template image 704 centering on the feature point 703 is set as shown in the drawing, it does not overlap with the template image set for the peripheral block 709, or even if it overlaps, the number of pixels is relatively small. by.

一方、図9(a)に例示されるように、対象ブロック701について決定された特徴点703がブロックの境界付近に存在する場合、冗長な処理は発生し得る。図9(a)の例では、特徴点703が対象ブロック701の右下境界付近にあり、周辺ブロック709eにつき決定された特徴点901e、及び周辺ブロック709hにつき決定された特徴点901hが近接している。このような場合、各特徴点を中心として所定の大きさのテンプレート画像を設定することで行われるマッチング処理では、テンプレート画像間で重複する画素について、同様の探索領域に対する相関演算が含まれ、探索結果が類似する冗長な処理が生じ得る。図9(a)に示したような特徴点が近接する状況は、例えばエッジが密集する等の特徴的なテクスチャが存在し、これが複数ブロックに分離されるようなケースにおいて生じ得る。   On the other hand, as illustrated in FIG. 9A, when the feature point 703 determined for the target block 701 exists in the vicinity of the block boundary, redundant processing may occur. In the example of FIG. 9A, the feature point 703 is near the lower right boundary of the target block 701, and the feature point 901e determined for the peripheral block 709e and the feature point 901h determined for the peripheral block 709h are close to each other. Yes. In such a case, the matching process performed by setting a template image of a predetermined size with each feature point as the center includes a correlation operation for the same search region for pixels overlapping between the template images. Redundant processing with similar results can occur. The situation where the feature points as shown in FIG. 9A are close to each other can occur in a case where there are characteristic textures such as dense edges, and these are separated into a plurality of blocks.

従って、本実施形態の動きベクトル検出部105では、基準画像における特徴点の分布において、近接していると判断する特徴点が存在する場合、これらの特徴点に係るブロックについてマッチング処理で生じる冗長な演算を低減する。より詳しくは、互いの特徴点が近接していると判断するブロックが生じる場合、設定部205はこれらのブロックの各々についてテンプレート画像と探索領域とを設定するのではなく、これらのブロックについて1つのテンプレート画像及び探索領域を設定する。即ち、これらのブロックにつき行われる予定であったマッチング処理を、代替的に1つのマッチング処理として統合して行う。   Therefore, in the motion vector detection unit 105 according to the present embodiment, if there are feature points that are determined to be close in the distribution of feature points in the reference image, redundant blocks generated in the matching process for blocks related to these feature points are included. Reduce computation. More specifically, when there are blocks that are determined to be close to each other's feature points, the setting unit 205 does not set a template image and a search area for each of these blocks, but instead sets one for each of these blocks. A template image and a search area are set. That is, the matching process that was scheduled to be performed for these blocks is integrated and performed as one matching process instead.

図9(a)の例では、設定部205は、1つの対象ブロック701につきテンプレート画像902及び探索領域903の読み出し範囲を算出した場合に、探索領域903がブロックの右側及び下側の境界を超える。このため、設定部205はさらに、特徴解析部203から得られた特徴点情報に基づき、探索領域903に含まれる周辺ブロック709e、g、hの特徴点901e、g、hとの距離を算出し、近接しているか否かの判断を行う。近接しているか否かの判断は、特徴点間について算出した距離Dが予め定められた閾値を下回るか否かに応じて行われるものであってよい。このとき設定部205は、特徴点901e及びhが特徴点703と近接していると判断するため、対象ブロック701については算出結果に基づくテンプレート画像902及び探索領域903の設定を行わず、他のブロックとマッチング処理を統合すると判断する。   In the example of FIG. 9A, when the setting unit 205 calculates the reading range of the template image 902 and the search area 903 for one target block 701, the search area 903 exceeds the right and lower boundaries of the block. . For this reason, the setting unit 205 further calculates distances from the feature points 901e, g, and h of the peripheral blocks 709e, g, and h included in the search region 903 based on the feature point information obtained from the feature analysis unit 203. To determine whether they are close to each other. The determination of whether or not they are close may be made according to whether or not the distance D calculated for the feature points is below a predetermined threshold. At this time, since the setting unit 205 determines that the feature points 901e and h are close to the feature point 703, the setting unit 205 does not set the template image 902 and the search region 903 based on the calculation result for the target block 701. It is determined that the block and the matching process are integrated.

即ち、本実施形態では設定部205は、あるブロックについて、該ブロックの周辺ブロックの少なくともいずれかに特徴点が近接していると判断するブロックが存在する場合に、これらのブロックについてのマッチング処理を統合する。換言すれば、動き設定部205は、基準画像について定められた複数のブロックのうち、互いの特徴点が近接していると判断される少なくとも2つのブロックが存在すれば、これらにつき1つのテンプレート画像と探索領域のみを設定する。   In other words, in this embodiment, the setting unit 205 performs matching processing on a certain block when there is a block for which a feature point is determined to be close to at least one of the peripheral blocks of the block. Integrate. In other words, if there are at least two blocks that are determined to be close to each other among the plurality of blocks defined for the reference image, the motion setting unit 205 has one template image for each of these blocks. And set only the search area.

なお、本実施形態の動きベクトル検出部105では、ブロック転送部201により出力されたブロックの順、即ち検出用画像が画像メモリ204に格納された順に従い、設定部205が各ブロックを選択し、テンプレート画像及び探索領域の設定を行う。故に、設定部205は、特徴点が近接していると判断したブロックのうちの、格納順の最も遅いブロックについて決定するテンプレート画像と探索領域を、これらのブロックについて統合した1回のマッチング処理に使用するものとして設定する。図9(a)の例では、周辺ブロック709hが、検出用画像の画像メモリ204への格納順が最も遅いブロックとなる。このため、図9(b)に示されるような特徴点901hを中心として定められるテンプレート画像911及び探索領域912が、対象ブロック701、周辺ブロック709e及びhを統合して行われるマッチング処理について設定される。   In the motion vector detection unit 105 of this embodiment, the setting unit 205 selects each block according to the order of the blocks output by the block transfer unit 201, that is, the order in which the detection images are stored in the image memory 204. Set the template image and search area. Therefore, the setting unit 205 performs a single matching process in which the template image and the search area determined for the block with the slowest storage order among the blocks determined to have feature points close to each other are integrated for these blocks. Set as used. In the example of FIG. 9A, the peripheral block 709h is the block in which the detection image is stored in the image memory 204 in the slowest order. For this reason, a template image 911 and a search area 912 defined around a feature point 901h as shown in FIG. 9B are set for a matching process performed by integrating the target block 701 and the peripheral blocks 709e and h. The

《設定処理》
以下、このような構成をもつ本実施形態の設定部205で行われる、各ブロックに係るマッチング処理につきテンプレート画像及び探索領域を設定する設定処理について、図6のフローチャートを用いて具体的な処理を説明する。該フローチャートに対応する処理は、システム制御部106が、例えば記録媒体109に記憶されている対応する処理プログラムを読み出し、メモリ110に展開して設定部205に実行させることにより実現することができる。本設定処理は、例えば基準画像に係る最初のブロック(左上端ブロック)についての特徴点情報が設定部205に入力された際に開始されるものとして説明する。
《Setting process》
Hereinafter, with respect to the setting process for setting the template image and the search area for the matching process related to each block, which is performed by the setting unit 205 of the present embodiment having such a configuration, specific processing is performed using the flowchart of FIG. explain. The processing corresponding to the flowchart can be realized by the system control unit 106 reading, for example, a corresponding processing program stored in the recording medium 109, developing it in the memory 110, and causing the setting unit 205 to execute it. This setting process will be described as being started when, for example, feature point information about the first block (upper left block) related to the reference image is input to the setting unit 205.

S601で、設定部205は、入力された特徴点情報に対応するブロック(対象ブロック)について、該ブロックに係るマッチング処理で使用されるテンプレート画像の座標範囲及び探索領域の座標範囲を算出する。以下、図7に示したように対象ブロック701につき特徴点703が配置される場合を例に、算出方法を説明する。なお、以下の説明において「絶対座標」とは、基準画像の左上端画素を基準に定まる画素の座標を指し、「相対座標」とは、対象ブロック701の左上端画素(開始位置702)との相対的関係で定まるブロック内の画素の座標を指すものとする。   In step S601, the setting unit 205 calculates, for a block (target block) corresponding to the input feature point information, a coordinate range of a template image and a coordinate range of a search area used in matching processing related to the block. Hereinafter, the calculation method will be described by taking as an example the case where the feature points 703 are arranged for the target block 701 as shown in FIG. In the following description, “absolute coordinates” refers to the coordinates of pixels determined based on the upper left pixel of the reference image, and “relative coordinates” refers to the upper left pixel (start position 702) of the target block 701. The pixel coordinates in the block determined by the relative relationship are indicated.

特徴点703の絶対座標(GPX,GPY)は、開始位置702の絶対座標を(GSX,GSY)、また特徴点情報から得られる特徴点703の相対座標を(PX,PY)とした場合、
で表すことができる。このとき、特徴点703を中心として、水平サイズTX及び垂直サイズTYを有して定められるテンプレート画像704の読み出し開始位置706の絶対座標(GTX)は、
で表すことができる。またテンプレート画像704の読み出し完了位置(テンプレート画像704の右下端画素)の絶対座標は、開始位置706の絶対座標に、それぞれ水平方向TX、垂直方向TYを加算した値となる。
When the absolute coordinates (GPX, GPY) of the feature point 703 are (GSX, GSY) as the absolute coordinates of the start position 702 and (PX, PY) are the relative coordinates of the feature point 703 obtained from the feature point information,
Can be expressed as At this time, the absolute coordinates (GTX) of the reading start position 706 of the template image 704 determined with the horizontal size TX and the vertical size TY around the feature point 703 is
Can be expressed as The absolute coordinates of the reading completion position of the template image 704 (the lower right pixel of the template image 704) are values obtained by adding the horizontal direction TX and the vertical direction TY to the absolute coordinates of the start position 706, respectively.

また、同じく特徴点703を中心として、水平サイズSX及び垂直サイズSYを有して定められる探索領域705の画像の読み出し開始位置707の絶対座標(GMX,GMY)は、
で表すことができる。また探索領域705の画像の読み出し完了位置(探索領域705の右下端画素)の絶対座標(GEX,GEY)は、
で表すことができる。
Similarly, the absolute coordinates (GMX, GMY) of the image reading start position 707 in the search area 705 determined by having the horizontal size SX and the vertical size SY around the feature point 703 are as follows.
Can be expressed as Further, the absolute coordinates (GEX, GEY) of the image reading completion position of the search area 705 (the lower right pixel of the search area 705) are:
Can be expressed as

S602で、設定部205は、対象ブロックに係るマッチング処理を開始可能か否かを判断する。本ステップにおける判断は、S601において算出した探索領域の画像の読み出し完了位置の座標が、画像メモリ204への画像の格納が行われていないブロック内、もしくは特徴点情報をまだ受信していないブロック内を示していないかに基づき行われる。簡易的には、本ステップにおける判断は、探索領域の読み出し完了位置の座標(GEX,GEY)と、複数存在する周辺ブロックのそれぞれにつき、該周辺ブロックの開始位置の座標(GSX,GSY)とを比較することで行われるものであってもよい。   In step S602, the setting unit 205 determines whether the matching process related to the target block can be started. The determination in this step is that the coordinates of the image read completion position calculated in S601 are in a block in which no image is stored in the image memory 204 or in a block that has not yet received feature point information. Is done based on whether or not. For simplicity, the determination in this step is based on the coordinates (GEX, GEY) of the readout completion position of the search area and the coordinates (GSX, GSY) of the start position of the peripheral block for each of a plurality of peripheral blocks. It may be performed by comparison.

ここで、検出用画像の生成及び格納、特徴点情報の生成、マッチング処理の実行タイミングにつき、図8に例示する。図8において右方向は時間の進行方向を示している。また上から順に、画像変換部202の処理、特徴解析部203の処理、S602の時点でマッチング処理を開始可能な場合(ケースA)のマッチング処理部206の処理、開始不能な場合(ケースB)のマッチング処理部206の処理のタイミングを示している。図8に示される例では、図7に示した周辺ブロック709a〜d及びfが余剰領域である場合の例を示している。   Here, generation and storage of detection images, generation of feature point information, and execution timing of matching processing are illustrated in FIG. In FIG. 8, the right direction indicates the direction of time progression. Further, in order from the top, the processing of the image conversion unit 202, the processing of the feature analysis unit 203, the processing of the matching processing unit 206 when the matching processing can be started at the time of S602 (case A), and the case where the matching processing cannot be started (case B) The processing timing of the matching processing unit 206 is shown. The example illustrated in FIG. 8 illustrates an example in which the peripheral blocks 709a to 709d and f illustrated in FIG. 7 are surplus areas.

対象ブロック701に係るマッチング処理を実行には、テンプレート画像と探索領域として対象ブロック701外の画素を読み出す必要性も生じるため、図示されるようにケースAとケースBとでマッチング処理を実行可能なタイミングが変わる。即ち、対象ブロック701中の特徴点703の座標(PX,PY)によって、マッチング処理を開始可能なタイミングに変化が生じる。図7に示したようなケースAでは、テンプレート画像と探索領域の画像は対象ブロック内に納まるため、対象ブロック701に係るマッチング処理は、周辺ブロック709e以降の検出用画像の格納が完了する前に開始できる。一方、図9(a)に示したようなケースBでは、テンプレート画像と探索領域の画像は対象ブロック外も含むため、対象ブロック701に係るマッチング処理は、周辺ブロック709hの検出用画像の少なくとも対応する画素の格納が完了しないと開始できない。   Since the matching process related to the target block 701 needs to read out pixels outside the target block 701 as a template image and a search area, the matching process can be executed in case A and case B as shown in the figure. Timing changes. That is, the timing at which the matching process can be started varies depending on the coordinates (PX, PY) of the feature point 703 in the target block 701. In case A as shown in FIG. 7, the template image and the image of the search area are stored in the target block. Therefore, the matching process related to the target block 701 is performed before the detection image after the neighboring block 709e is stored. You can start. On the other hand, in case B as shown in FIG. 9A, since the template image and the image of the search area also include the outside of the target block, the matching process related to the target block 701 corresponds to at least the detection image of the peripheral block 709h. If the storage of the pixel to be completed is not completed, it cannot be started.

なお、上述したように本実施形態の設定部205では、探索領域を基準にマッチング処理を統合できるか否か、即ち特徴点が近接しているブロックが存在するか否かを判断を行うため、該判断の実行可否も考慮し、本ステップの判断の判断が行われる。しかしながら、探索領域の画像が読み出される対象画像は既に画像メモリ204に入力されている。このため、単純にマッチング処理を開始可能であるか否かの判断は、算出したテンプレート画像の読み出し完了位置の座標が、画像メモリ204への画像の格納が行われていないブロック内を示していないかに基づき行われるものであってもよい。   Note that, as described above, the setting unit 205 of the present embodiment determines whether or not matching processing can be integrated based on the search area, that is, whether or not there is a block having feature points close to each other. Considering whether or not the determination can be performed, the determination of this step is performed. However, the target image from which the image in the search area is read has already been input to the image memory 204. For this reason, whether or not the matching process can be simply started is determined based on whether or not the calculated coordinates of the read completion position of the template image indicate a block in which no image is stored in the image memory 204. It may be performed based on how.

設定部205は、このような判断の結果、対象ブロック701に係るマッチング処理を開始可能であると判断した場合は処理をS606に移し、開始不能であると判断した場合は処理をS603に移す。   As a result of such determination, the setting unit 205 moves the process to S606 when it is determined that the matching process related to the target block 701 can be started, and moves the process to S603 when it is determined that the matching process cannot be started.

S603で、設定部205は、マッチング処理が開始可能となるまで処理を待機する。マッチング処理が開始可能であるかの判断は、S602において行われたものと同様であってよい。例えば図9に示したようなケースBでは、周辺ブロック709hに係る検出用画像の格納及び特徴点情報の生成が完了するまで、設定部205は対象ブロック701に係る処理を待機する。即ち、本ステップにおける待機は、対象ブロックに係る探索領域の画素を含むと判断した周辺ブロックについて、検出用画像の画像メモリ204への格納及び特徴点情報の生成が完了するまで行われる。   In step S603, the setting unit 205 waits for processing until matching processing can be started. The determination of whether the matching process can be started may be the same as that performed in S602. For example, in case B as illustrated in FIG. 9, the setting unit 205 waits for processing related to the target block 701 until the detection image storage and feature point information generation related to the peripheral block 709 h are completed. That is, the standby in this step is performed until the storage of the detection image in the image memory 204 and the generation of the feature point information are completed for the peripheral blocks determined to include the search region pixels related to the target block.

S604で、設定部205は、対象ブロックの特徴点と近接している、周辺ブロックの特徴点が存在するか否かを判断する。上述したように、ブロック間で特徴点が近接しているか否かは、特徴点間の距離Dが予め定められた閾値を下回るか否かにより判断される。特徴点間の距離Dは、対象ブロックの特徴点の絶対座標が(GPX,GPY)、周辺ブロックの特徴点の絶対座標を(GPX´,GPY´)とした場合、
で算出することが可能である。なお、特徴点間の距離を算出する対象とする周辺ブロックは、探索領域に含まれる画素を有する周辺ブロック、好適には、探索領域に含まれ、かつまだ特徴点間の距離の算出を行っていない周辺ブロックに限定してよい。なお、近接しているか否かの判断に用いる閾値は、設定されるテンプレート画像のサイズに応じて動的に変更されるものであってよい。また、例えば図9に示されるように、対象ブロック701の頂点(右下端位置)でのみ接する周辺ブロック709hは、周辺ブロックe及びgよりも特徴点703からの最短距離は必然的に長くなる。従って、対象ブロック701と周辺ブロック709hとの間で算出された特徴点間の距離については、近接していると判断するための閾値を、周辺ブロック709e及びgについて用いる値よりも大きく設定してもよい。換言すれば、近接しているか否かの判断に用いる閾値は、対象ブロックと周辺ブロック間の位置関係に応じて定められるものとしてもよい。
In step S <b> 604, the setting unit 205 determines whether there is a feature point of a neighboring block that is close to the feature point of the target block. As described above, whether or not the feature points are close to each other is determined based on whether or not the distance D between the feature points is less than a predetermined threshold value. When the absolute coordinates of the feature points of the target block are (GPX, GPY) and the absolute coordinates of the feature points of the surrounding blocks are (GPX ′, GPY ′)
It is possible to calculate by Note that the peripheral block for which the distance between feature points is to be calculated is a peripheral block having pixels included in the search area, preferably included in the search area, and the distance between feature points has not yet been calculated. It may be limited to no surrounding blocks. Note that the threshold used for determining whether or not they are close may be dynamically changed according to the size of the set template image. For example, as shown in FIG. 9, the shortest distance from the feature point 703 is inevitably longer than the peripheral blocks e and g in the peripheral block 709 h that touches only at the vertex (right lower end position) of the target block 701. Accordingly, for the distance between the feature points calculated between the target block 701 and the peripheral block 709h, a threshold value for determining that the feature points are close is set larger than the value used for the peripheral blocks 709e and g. Also good. In other words, the threshold used for determining whether or not they are close may be determined according to the positional relationship between the target block and the surrounding blocks.

設定部205は、対象ブロックの特徴点と近接している、周辺ブロックの特徴点が存在すると判断した場合は処理をS605に移し、存在しないと判断した場合は処理をS606に移す。   If the setting unit 205 determines that there is a feature point of a neighboring block that is close to the feature point of the target block, the setting unit 205 moves the process to S605, and if it does not exist, moves the process to S606.

S605で、設定部205は、近接していると判断した特徴点を有する周辺ブロックが、対応する検出用画像が対象ブロックよりも後に格納されるブロックであるか否かを判断する。本実施形態の設定部205では、特徴点が近接していると判断したブロック群についてはマッチング処理を統合し、画像メモリ204への検出用画像の格納順が最も遅いブロックのマッチング処理の結果を、統合した各ブロックの処理結果として代用する。従って、本ステップの処理では、設定部205は検出用画像の格納順が最も遅いブロックが対象ブロックとなったことの判断のために行われる。設定部205は、近接判断した特徴点を有する周辺ブロックが、対象ブロックよりも後に検出用画像が格納されるブロックではないと判断した場合に処理をS606に移し、それ以外のブロックであると判断した場合に処理をS606に移す。   In step S <b> 605, the setting unit 205 determines whether the peripheral block having the feature point determined to be close is a block in which the corresponding detection image is stored after the target block. In the setting unit 205 of the present embodiment, matching processing is integrated for a block group determined to have feature points close to each other, and the result of matching processing of the block with the slowest storage order of detection images in the image memory 204 is obtained. Substitute as the processing result of each integrated block. Therefore, in the processing of this step, the setting unit 205 is performed to determine that the block with the slowest storage order of the detection image is the target block. When the setting unit 205 determines that the neighboring block having the feature point determined to be close is not a block in which the detection image is stored after the target block, the setting unit 205 moves the process to S606 and determines that the block is the other block. If so, the process moves to S606.

S606で、設定部205は、対象ブロックについて算出したテンプレート画像及び探索範囲に係る矩形画像を、それぞれ画像メモリ204に格納された対応する検出用画像から抽出するために、メモリアクセスに係るメモリアドレスを発行する。即ち、本ステップで設定部205は、画像メモリ204に格納された基準画像に係る検出用画像の座標(GTX,GTY)から、水平サイズTX、垂直サイズTYの矩形領域をテンプレート画像として読み出すためのメモリアドレスを発行する。また、設定部205は、画像メモリ204に格納された対象画像に係る検出用画像の座標(GMX,GMY)から、水平サイズSX、垂直サイズSYの矩形領域を探索領域の画像として読み出すためのメモリアドレスを発行する。そして設定部205は、発行したメモリアドレスを画像メモリ204のメモリコントローラに伝送し、該当の画像を読み出してマッチング処理部206に出力させる。   In step S <b> 606, the setting unit 205 sets the memory address related to the memory access in order to extract the template image calculated for the target block and the rectangular image related to the search range from the corresponding detection image stored in the image memory 204. Issue. That is, in this step, the setting unit 205 reads out a rectangular area of the horizontal size TX and the vertical size TY as a template image from the coordinates (GTX, GTY) of the detection image related to the reference image stored in the image memory 204. Issue a memory address. Further, the setting unit 205 reads out a rectangular area having a horizontal size SX and a vertical size SY as a search area image from the coordinates (GMX, GMY) of the detection image related to the target image stored in the image memory 204. Issue an address. Then, the setting unit 205 transmits the issued memory address to the memory controller of the image memory 204, reads the corresponding image, and causes the matching processing unit 206 to output it.

また設定部205は、マッチング処理の処理対象である対象ブロックを識別する情報をマッチング処理部206に出力する。なお、特徴点が近接していると判断したブロック群については、設定部205は対象ブロックを識別する情報だけでなく、マッチング処理を統合したブロックを識別する情報を出力する。これにより、ブロックごとの動きベクトルの算出結果に基づく画像全体に係る動きベクトルの算出において、マッチング処理を統合したブロック群に係り算出した動きベクトルを、どの程度重み付けすべきかをマッチング処理部206に知らしめることができる。   The setting unit 205 also outputs information for identifying the target block that is the processing target of the matching processing to the matching processing unit 206. Note that for a block group that has been determined that feature points are close to each other, the setting unit 205 outputs not only information for identifying the target block but also information for identifying a block in which matching processing is integrated. Thereby, in the calculation of the motion vector for the entire image based on the calculation result of the motion vector for each block, the matching processing unit 206 is informed of how much the motion vector calculated for the block group in which the matching processing is integrated should be weighted. It can be tightened.

S607で、設定部205は、基準画像について定めた全てのブロックを対象ブロックとして選択したか否かを判断する。設定部205は、まだ対象ブロックとして選択していないブロックが存在すると判断した場合、現在の対象ブロックの次に、対応する検出用画像の格納または特徴量情報の生成が行われるブロックを新たな対象ブロックとして選択し、処理をS601に戻す。また設定部205は、全てのブロックを対象ブロックとして選択したと判断した場合は本設定処理を完了する。   In step S607, the setting unit 205 determines whether all blocks defined for the reference image have been selected as target blocks. When the setting unit 205 determines that there is a block that has not yet been selected as the target block, the block for which the corresponding detection image is stored or the feature amount information is generated is added as a new target after the current target block. The block is selected, and the process returns to S601. If the setting unit 205 determines that all blocks have been selected as target blocks, the setting unit 205 completes the setting process.

以上説明したように、本実施形態の動きベクトル検出部105によれば、画像を複数の分割領域に分離して動きベクトルを検出する際に、冗長な処理の発生を低減することができる。具体的には、本実施形態の設定部205は、ブロックについてのマッチング処理の結果が類似し得るような、特徴点が近接するブロック群を特定し、該ブロック群について行うマッチング処理を統合する。これにより、マッチング処理が実行されるブロック数を削減して演算量を低減し、さらに重複する検出用画像の読み出しに係るメモリアクセスを低減することができるため、冗長な処理の発生を抑えることができる。   As described above, according to the motion vector detection unit 105 of this embodiment, it is possible to reduce the occurrence of redundant processing when an image is separated into a plurality of divided regions and a motion vector is detected. Specifically, the setting unit 205 according to the present embodiment identifies a group of blocks with close feature points that can be similar in matching processing results for the blocks, and integrates matching processing performed on the block groups. As a result, the number of blocks for which matching processing is executed can be reduced to reduce the amount of calculation, and further, memory access related to reading of overlapping detection images can be reduced, so that the occurrence of redundant processing can be suppressed. it can.

なお、本実施形態ではマッチング処理を統合するブロック群のうち、画像メモリ204への検出用画像の格納が最も遅いブロックの特徴点に基づき、テンプレート画像及び探索領域の設定を行うものとして説明したが、本発明の実施はこれに限られない。即ち、ブロック群の各ブロックについてのマッチング処理の結果として、1つのブロックについてのマッチング処理の結果を代用する(重み付ける)態様では、いずれのブロックの特徴点に基づいてテンプレート画像及び探索領域は設定されてよい。   In the present embodiment, the template image and the search area are set based on the feature point of the block having the slowest storage of the detection image in the image memory 204 in the block group integrating the matching processing. The implementation of the present invention is not limited to this. That is, as a result of the matching process for each block in the block group, in a mode in which the result of the matching process for one block is substituted (weighted), the template image and the search area are set based on the feature point of any block. May be.

また本実施形態の設定処理では、S603において対象ブロックに係るマッチング処理が開始可能な状態となるまで待機するものとして説明した。しかしながら、例えば少なくとも周辺ブロックとの間で特徴点間の距離を算出可能な分の特徴量情報が得られるのであれば、画像メモリ204への周辺ブロックの検出用画像の格納まで待機する必要はない。このような態様であれば、本実施形態の設定処理のように検出用画像の格納順が最も遅いブロックを対象ブロックとする際に、統合したマッチング処理が実行されるよう構成することで、検出用画像の不存在によって待機しなければならない時間を低減できる。   Further, in the setting process of the present embodiment, it has been described that the process waits until the matching process related to the target block can be started in S603. However, it is not necessary to wait for the storage of the detection image of the peripheral block in the image memory 204 as long as the feature amount information that can calculate the distance between the feature points at least with the peripheral block can be obtained. . If it is such an aspect, when the block with the slowest storage order of the detection image is set as the target block as in the setting process of the present embodiment, the integrated matching process is configured to be executed. It is possible to reduce the time required to wait due to the absence of the image for use.

また本実施形態ではマッチング処理を統合する条件を、分割領域間(ブロック間)での特徴点の距離が所定の距離離間していないこととしたが、本発明の実施はこれに限られるものではない。例えば遠景のように手ブレによる像の歪みが生じにくい被写体のように、複数のブロックに渡って類似したマッチング処理の結果が得られると推定される場合、これらブロック群についてマッチング処理を統合するように構成してもよい。あるいは、近接している特徴点が特定のテクスチャを示しているのかを判断するよう、例えば特徴点が近接していることだけでなく、近接する特徴点が同様のレベルの特徴量を示していることを条件としてもよい。   In the present embodiment, the condition for integrating the matching processing is that the distance between the feature points between the divided regions (between blocks) is not a predetermined distance. However, the present invention is not limited to this. Absent. For example, if it is estimated that similar matching processing results are obtained across multiple blocks, such as a subject that is unlikely to cause image distortion due to camera shake such as a distant view, the matching processing should be integrated for these blocks. You may comprise. Alternatively, in order to determine whether adjacent feature points indicate a specific texture, for example, not only the feature points are close but also the close feature points indicate the same level of feature amount This may be a condition.

[変形例]
上述した実施形態では、複数のブロックについてマッチング処理を統合すると判断した場合に、このうちの1つのブロックについて決定した特徴点を基準にテンプレート画像及び探索領域を決定する構成について説明した。換言すれば、1つのブロックについて行ったマッチング処理の結果を、統合される他のブロックに係るマッチング処理の結果として代用する構成について説明した。一方で、このようにいずれかのブロックに係るマッチング処理の結果を代用する構成は、特徴点の配置によってブロック間でのテンプレート画像の重複量が増減するため、好適な精度の結果を得ることができない場合もある。本変形例では画像全体につき算出される動きベクトルの精度を、より好適とする態様について説明する。
[Modification]
In the above-described embodiment, the configuration in which the template image and the search region are determined based on the feature point determined for one of the blocks when it is determined that the matching processing is integrated for a plurality of blocks has been described. In other words, the configuration has been described in which the result of the matching process performed on one block is substituted as the result of the matching process related to another block to be integrated. On the other hand, the configuration that substitutes the result of the matching processing related to any of the blocks in this way can obtain a result with suitable accuracy because the amount of template image overlap between blocks increases or decreases depending on the arrangement of feature points. Sometimes it is not possible. In this modification, a mode in which the accuracy of the motion vector calculated for the entire image is more preferable will be described.

《設定処理》
以下、本変形例の設定処理について、図10を用いて詳細を説明する。本変形例の設定処理において、上述した実施形態の設定処理と同様の処理を行うステップについては同一の参照符号を付して説明を省略し、以下では本変形例に係り特徴的な処理を行うステップについて主に説明する。
《Setting process》
Hereinafter, the setting process of this modification will be described in detail with reference to FIG. In the setting process of this modification, the same reference numerals are assigned to the steps for performing the same process as the setting process of the above-described embodiment, and the description thereof will be omitted. Hereinafter, a characteristic process according to this modification will be performed. The steps will be mainly described.

S605において、近接する特徴点を有する周辺ブロックが、対象ブロックよりも後に検出用画像が格納されるブロックではないと判断した場合、設定部205はS1001で、統合して行うマッチング処理につき、テンプレート画像と探索領域を設定する。まず設定部205は、マッチング処理を統合するブロックそれぞれの特徴点の座標に基づき、テンプレート画像及び探索領域設定の基準となる1つの点(基準点)を決定する。本実施形態では、各特徴点を中心としてテンプレート画像を設定した場合に、重複して含まれる画素がより多く含まれるよう、基準点はブロック群の特徴点の重心位置に定められる。即ち、近接していると判断された特徴点の絶対座標を(GPXn,GPYn)(n=2〜4)とすると、求める基準点の絶対座標(NPX,NPY)は、
により算出できる。そして設定部205は、求めた基準点の絶対座標に基づき、該基準点を中心とするテンプレート画像及び探索領域の座標範囲を算出し、処理をS606に移す。このようにすることで、例えば図9に示したように特徴点703、特徴点901e及びhが近接する場合、図11に示すような基準点1101を定めることができる。そして該基準点1101を中心とすることで、3つの近接する特徴点に基づき特徴があると推測され、かつ各ブロックにつきマッチング処理を行った場合に処理が重複し得る画像領域を含んだテンプレート画像1102を、マッチング処理に使用することができる。また同様に基準点1101を中心として、探索領域1103を設定することができる。
If it is determined in S605 that the neighboring block having the adjacent feature point is not a block in which the detection image is stored after the target block, the setting unit 205 performs template processing for matching processing to be performed in S1001. And set the search area. First, the setting unit 205 determines one point (reference point) that serves as a reference for setting a template image and a search region, based on the coordinates of the feature points of the blocks for which matching processing is integrated. In the present embodiment, when a template image is set around each feature point, the reference point is determined at the barycentric position of the feature points of the block group so that more overlapping pixels are included. That is, if the absolute coordinates of the feature points determined to be close are (GPXn, GPYn) (n = 2 to 4), the absolute coordinates (NPX, NPY) of the reference point to be obtained are
Can be calculated. Then, the setting unit 205 calculates the template image centered on the reference point and the coordinate range of the search area based on the obtained absolute coordinates of the reference point, and moves the process to S606. In this way, for example, when the feature point 703 and the feature points 901e and h are close as shown in FIG. 9, the reference point 1101 as shown in FIG. 11 can be determined. By using the reference point 1101 as the center, it is estimated that there is a feature based on three adjacent feature points, and a template image including an image region that can be overlapped when matching processing is performed for each block. 1102 can be used for the matching process. Similarly, the search area 1103 can be set around the reference point 1101.

上述した手法によれば、基準点の座標算出と新たなテンプレート画像及び探索領域の座標範囲を算出する演算は増加するが、統合して行うマッチング処理を特定の特徴点に偏って設定されたテンプレート画像で行うよりも、動きベクトルの精度向上が期待できる。なお、本変形例では特徴点の重心位置に基準点を定める方式について説明したが、動きベクトルの精度向上は、他の方式によっても実現できる。例えば、近接する複数の特徴点を、その特徴量に基づき重み付け平均した位置を基準点としてもよい。この場合、より特徴のあると推定され得る領域がテンプレート画像に含まれるようにすることができる。また例えば、近接する特徴点の全てがテンプレート画像の領域内(基準領域内)に含まれるように基準点を設定してもよい。このとき、例えばテンプレート画像、またはテンプレート画像及び探索領域のサイズを変更してもよい。   According to the above-described method, the calculation for calculating the coordinates of the reference point and the calculation of the new template image and the coordinate range of the search area increase, but the template that is set by biasing the matching process to be integrated to a specific feature point It can be expected to improve the accuracy of motion vectors rather than using images. In this modification, the method of determining the reference point at the center of gravity of the feature point has been described. However, the accuracy of the motion vector can be improved by other methods. For example, a position obtained by weighted averaging a plurality of adjacent feature points based on the feature values may be used as the reference point. In this case, a region that can be estimated to be more characteristic can be included in the template image. Further, for example, the reference points may be set so that all of the adjacent feature points are included in the template image region (in the reference region). At this time, for example, the size of the template image or the template image and the search area may be changed.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

105:動きベクトル検出部、201:ブロック転送部、202:画像変換部、203:特徴解析部、204:画像メモリ、205:設定部、206:マッチング処理部、501:フィルタ部、502:特徴量算出部、503:特徴点決定部   105: motion vector detection unit, 201: block transfer unit, 202: image conversion unit, 203: feature analysis unit, 204: image memory, 205: setting unit, 206: matching processing unit, 501: filter unit, 502: feature quantity Calculation unit, 503: feature point determination unit

Claims (14)

第1の画像に基づいて第2の画像における相関の高い領域を探索するマッチング処理につき、相関演算を行う探索領域を前記第2の画像に定める画像処理装置であって、
複数の分割領域が定められた前記第1の画像について、分割領域ごとの特徴点を決定する決定手段と、
前記複数の分割領域の各々に対し、該分割領域について決定された特徴点に基づき、前記第2の画像中の前記探索領域を設定する設定手段と、を有し、
前記設定手段は、前記複数の分割領域のうちの少なくとも2つの分割領域間で特徴点が所定の条件を満たす場合に、該少なくとも2つの分割領域に係るマッチング処理を統合させるよう、該少なくとも2つの分割領域に対して1つの前記探索領域を設定する
ことを特徴とする画像処理装置。
An image processing apparatus for determining a search area for performing a correlation operation in the second image for a matching process for searching for a highly correlated area in the second image based on the first image,
Determining means for determining a feature point for each divided region for the first image in which a plurality of divided regions are defined;
Setting means for setting the search region in the second image based on feature points determined for the divided region for each of the plurality of divided regions;
The setting means is configured to integrate the matching processing related to the at least two divided areas when a feature point satisfies a predetermined condition between at least two divided areas of the plurality of divided areas. An image processing apparatus, wherein one search area is set for a divided area.
前記所定の条件は、前記少なくとも2つの分割領域のそれぞれで決定された特徴点が、前記第1の画像において所定の距離離間せずに存在する場合に満たされることを特徴とする請求項1に記載の画像処理装置。   The said predetermined condition is satisfy | filled when the feature point determined by each of the said at least 2 division area exists in the said 1st image without separating predetermined distance. The image processing apparatus described. 前記所定の距離は、前記少なくとも2つの分割領域間の位置関係に応じて定められることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the predetermined distance is determined according to a positional relationship between the at least two divided regions. 前記設定手段はさらに、前記所定の条件を満たす場合、前記少なくとも2つの分割領域のいずれかにつき決定された1つの特徴点を基準として、前記統合させるマッチング処理のテンプレート画像として用いる前記第1の画像中の基準領域を設定することを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。   If the predetermined condition is satisfied, the setting means further uses the first image used as a template image for the matching process to be integrated on the basis of one feature point determined for one of the at least two divided regions. The image processing apparatus according to claim 1, wherein a reference area is set. 前記設定手段はさらに、前記所定の条件を満たす場合、前記少なくとも2つの分割領域の各々につき決定された複数の特徴点に基づき定まる1つの点を基準として、前記統合させるマッチング処理のテンプレート画像として用いる前記第1の画像中の基準領域を設定することを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。   When the predetermined condition is satisfied, the setting unit further uses the matching unit as a template image for the matching process based on one point determined based on a plurality of feature points determined for each of the at least two divided regions. The image processing apparatus according to claim 1, wherein a reference region in the first image is set. 前記1つの点は、前記複数の特徴点の重心位置、前記複数の特徴点をその特徴量に基づき重み付け平均した位置、または中心として所定の大きさの前記基準領域を設定した場合に前記複数の特徴点が該基準領域内に含まれる位置に定められることを特徴とする請求項5に記載の画像処理装置。   The one point may be the centroid position of the plurality of feature points, the weighted average position of the plurality of feature points based on the feature amount, or the reference region having a predetermined size as the center. The image processing apparatus according to claim 5, wherein the feature point is determined at a position included in the reference region. 前記第1の画像の前記複数の分割領域の各々についてマッチング処理を行い、前記第1の画像と前記第2の画像の間における画像全体の動きベクトルを検出する検出手段をさらに有することを特徴とする請求項1乃至6のいずれか1項に記載の画像処理装置。   The image processing apparatus further comprises detection means for performing a matching process on each of the plurality of divided regions of the first image and detecting a motion vector of the entire image between the first image and the second image. The image processing apparatus according to any one of claims 1 to 6. 前記検出手段は、前記複数の分割領域の各々につき行われたマッチング処理により得られた各特徴点の動きベクトルに基づき、前記画像全体の動きベクトルを検出するものであり、前記所定の条件を満たす前記少なくとも2つの分割領域については、得られた動きベクトルにマッチング処理を統合した分割領域の数に応じた重み付けを行うことを特徴とする請求項7に記載の画像処理装置。   The detection means detects a motion vector of the entire image based on a motion vector of each feature point obtained by a matching process performed for each of the plurality of divided regions, and satisfies the predetermined condition 8. The image processing apparatus according to claim 7, wherein the at least two divided areas are weighted according to the number of divided areas obtained by integrating matching processing into the obtained motion vector. 前記第1の画像の前記複数の分割領域には、マッチング処理に係る所定の変換処理が適用され、記憶手段に格納される格納順が定められており、
前記検出手段は、前記所定の条件を満たす前記少なくとも2つの分割領域については、該少なくとも2つの分割領域のうちの最も格納順が遅い分割領域を処理対象とする際に、前記1つの探索領域に係るマッチング処理を行う
ことを特徴とする請求項7または8に記載の画像処理装置。
A predetermined conversion process related to a matching process is applied to the plurality of divided regions of the first image, and a storage order stored in a storage unit is determined,
For the at least two divided regions satisfying the predetermined condition, the detection means sets the one search region as the one search region when a divided region having the latest storage order among the at least two divided regions is to be processed. The image processing apparatus according to claim 7, wherein the matching process is performed.
前記決定手段は、前記複数の分割領域の各々につき、1つの特徴点を決定することを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determining unit determines one feature point for each of the plurality of divided regions. 前記決定手段は、1つの分割領域のうちの最も高い特徴量を有する画素を前記1つの特徴点として決定することを特徴とする請求項10に記載の画像処理装置。   The image processing apparatus according to claim 10, wherein the determining unit determines a pixel having the highest feature amount in one divided region as the one feature point. 前記第1の画像と前記第2の画像とは、連続して撮像されたフレームに係る画像であることを特徴とする請求項1乃至11のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first image and the second image are images related to frames that are continuously captured. 第1の画像に基づいて第2の画像における相関の高い領域を探索するマッチング処理につき、相関演算を行う探索領域を前記第2の画像に定める画像処理方法であって、
複数の分割領域が定められた前記第1の画像について、分割領域ごとの特徴点を決定する決定工程と、
前記複数の分割領域の各々に対し、該分割領域について決定された特徴点に基づき、前記第2の画像中の前記探索領域を設定する設定工程と、を有し、
前記設定工程において、前記複数の分割領域のうちの少なくとも2つの分割領域間で特徴点が所定の条件を満たす場合に、該少なくとも2つの分割領域に係るマッチング処理を統合するよう、該少なくとも2つの分割領域に対して1つの前記探索領域が設定される
ことを特徴とする画像処理方法。
An image processing method for determining, in the second image, a search area for performing a correlation operation for a matching process for searching for a highly correlated area in the second image based on the first image,
A determination step of determining a feature point for each divided region for the first image in which a plurality of divided regions are defined;
For each of the plurality of divided areas, a setting step for setting the search area in the second image based on the feature points determined for the divided areas,
In the setting step, when a feature point satisfies a predetermined condition between at least two divided regions of the plurality of divided regions, the at least two matching regions are integrated so that the matching process is integrated. An image processing method, wherein one search area is set for a divided area.
コンピュータを、請求項1乃至12のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claims 1 thru | or 12.
JP2016208034A 2016-10-24 2016-10-24 Image processing device, image processing method and program Pending JP2018072895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016208034A JP2018072895A (en) 2016-10-24 2016-10-24 Image processing device, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016208034A JP2018072895A (en) 2016-10-24 2016-10-24 Image processing device, image processing method and program

Publications (1)

Publication Number Publication Date
JP2018072895A true JP2018072895A (en) 2018-05-10

Family

ID=62111674

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016208034A Pending JP2018072895A (en) 2016-10-24 2016-10-24 Image processing device, image processing method and program

Country Status (1)

Country Link
JP (1) JP2018072895A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018216741A1 (en) 2017-05-26 2018-11-29 Agc株式会社 Decorative film

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018216741A1 (en) 2017-05-26 2018-11-29 Agc株式会社 Decorative film

Similar Documents

Publication Publication Date Title
JP6395506B2 (en) Image processing apparatus and method, program, and imaging apparatus
JP4539729B2 (en) Image processing apparatus, camera apparatus, image processing method, and program
EP2330812B1 (en) Apparatus for generating a panoramic image, method for generating a panoramic image, and computer-readable medium
US10542212B2 (en) Self-position estimation device and method
KR102471595B1 (en) Optical image stabilization movements to create super-resolution images of the scene
JP6261187B2 (en) Image processing apparatus, image processing method, and program
US20200104969A1 (en) Information processing apparatus and storage medium
JP2010114752A (en) Device and method of imaging and program
JP2016085380A (en) Controller, control method, and program
JP6602141B2 (en) Image processing apparatus and method
JP7117872B2 (en) IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM
JP6564284B2 (en) Image processing apparatus and image processing method
JP6576179B2 (en) Image processing apparatus, image processing method, and program
JP2018072895A (en) Image processing device, image processing method and program
US10880457B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP2020136774A (en) Image processing apparatus for detecting motion vector, control method of the same, and program
JP7077115B2 (en) Image processing equipment, image processing methods, and programs
WO2015198478A1 (en) Image distortion correction apparatus, information processing apparatus and image distortion correction method
US20140152862A1 (en) Image processing apparatus, image pickup apparatus, image pickup system, image processing method, and non-transitory computer-readable storage medium
WO2021049281A1 (en) Image processing device, head-mounted display, and spatial information acquisition method
JP2018072941A (en) Image processing device, image processing method, program, and storage medium
JP2019192048A (en) Imaging apparatus
JP6556033B2 (en) Image processing apparatus, image processing method, and program
JP2021108035A (en) Image processing device, image processing method, and program
JP5988213B2 (en) Arithmetic processing unit