JP6579816B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP6579816B2
JP6579816B2 JP2015122953A JP2015122953A JP6579816B2 JP 6579816 B2 JP6579816 B2 JP 6579816B2 JP 2015122953 A JP2015122953 A JP 2015122953A JP 2015122953 A JP2015122953 A JP 2015122953A JP 6579816 B2 JP6579816 B2 JP 6579816B2
Authority
JP
Japan
Prior art keywords
image
depth information
reliability
motion vector
depth
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
JP2015122953A
Other languages
Japanese (ja)
Other versions
JP2017011397A (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 JP2015122953A priority Critical patent/JP6579816B2/en
Publication of JP2017011397A publication Critical patent/JP2017011397A/en
Application granted granted Critical
Publication of JP6579816B2 publication Critical patent/JP6579816B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置、画像処理方法、及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program.

デジタルスチルカメラやデジタルビデオカメラ等の撮像装置を用いて撮影された映像に対して手ぶれ補正を施すためには、フレーム画像間の動き量を検出して複数枚の画像に対して位置合わせを行う必要がある。フレーム画像間の動き量を検出する方法としては、ジャイロセンサのような外部機器の情報を用いたり、撮影されたフレーム画像から動き量を推定する方法等がある。   In order to perform camera shake correction on video shot using an imaging device such as a digital still camera or a digital video camera, the amount of motion between frame images is detected and alignment is performed on a plurality of images. There is a need. As a method for detecting the amount of motion between frame images, there are a method of using information of an external device such as a gyro sensor, a method of estimating the amount of motion from a captured frame image, and the like.

フレーム画像を用いた動き量推定の方法は従来から種々提案されているが、その代表的なものとしてテンプレートマッチングによる動きベクトル検出がある。テンプレートマッチングでは、まず、映像中のある2枚のフレーム画像の一方を基準画像、もう一方を参照画像とする。そして、基準画像上に配置した所定の大きさの矩形領域をテンプレートブロックとし、参照画像の各位置においてテンプレートブロック内の画素値の分布との相関を求める。このとき、参照画像中で最も相関が高くなる位置がテンプレートブロックの移動先であり、基準画像上でのテンプレートブロックの位置を基準とした時の移動先への向きと移動量が動きベクトルとなる。   Various methods for estimating the amount of motion using a frame image have been proposed in the past. A typical example is motion vector detection by template matching. In template matching, first, one of two frame images in a video is set as a standard image, and the other is set as a reference image. Then, a rectangular area having a predetermined size arranged on the standard image is used as a template block, and a correlation with a distribution of pixel values in the template block is obtained at each position of the reference image. At this time, the position where the correlation is highest in the reference image is the destination of the template block, and the direction and amount of movement to the destination when the position of the template block on the reference image is the reference is the motion vector. .

被写体の遠近の違いによって撮影された映像に視差が発生する場合、特に、テンプレ―ト内で視差が発生する場合には、動きベクトルが正しく算出できないことがある。そこで、特許文献1では、テンプレート内で視差が発生している場合には、テンプレートサイズを小さくすることでテンプレート内の視差を小さくしている。   When parallax occurs in an image captured due to the difference in perspective of a subject, particularly when parallax occurs in a template, the motion vector may not be calculated correctly. Therefore, in Patent Document 1, when parallax occurs in the template, the parallax in the template is reduced by reducing the template size.

また、動きベクトルの検出率を向上させるため、特徴点を抽出し、抽出した特徴点にテンプレートブロックを配置し、フレーム画像でテンプレートマッチングを行う技術がある。この場合、抽出される特徴点は背景、被写体の動き大きさ向き、ノイズなどの要因で、フレーム画像間で、特徴点が大きく移動してしまい、そのためフレーム画像毎にベクトルの品質が変わってしまうということがある。そこで、特許文献2では、フレーム画像で特徴点追跡を行い、その成功回数に応じて特徴点の信頼度を判定し、信頼度の低い特徴点を削除することで信頼度の高い特徴点でベクトルを検出する。   In addition, there is a technique for extracting feature points, placing template blocks at the extracted feature points, and performing template matching with frame images in order to improve the detection rate of motion vectors. In this case, the extracted feature points move greatly between the frame images due to factors such as the background, the direction of the subject's movement, and noise, so that the quality of the vector changes for each frame image. There is. Therefore, in Patent Document 2, feature point tracking is performed on a frame image, the reliability of a feature point is determined according to the number of successes, and a feature point with high reliability is deleted by deleting feature points with low reliability. Is detected.

特開平10−021403号公報Japanese Patent Laid-Open No. 10-021403 特開2006−336235号公報JP 2006-336235 A

しかしながら、特許文献1のようにテンプレート内の視差に応じてテンプレートサイズを小さくすると、テンプレート内の変化に敏感に反応してしまい、手振れやノイズなどの影響を大きく受け、動きベクトルの検出結果が不安定になってしまう。また、特許文献2の特徴点追跡は、計算コストが高く、かつ特徴点が敏感に移動し不安定化してしまう。   However, if the template size is reduced according to the parallax in the template as in Patent Document 1, it reacts sensitively to changes in the template, is greatly affected by camera shake and noise, etc., and the motion vector detection result is unsatisfactory. It becomes stable. Also, the feature point tracking disclosed in Patent Document 2 has a high calculation cost, and the feature points move sensitively and become unstable.

本発明は、上記課題を鑑みて、テンプレートマッチングにおいて、奥行情報を使用して信頼度の高い特徴点を抽出することで、安定的に動きベクトルを算出することができる画像処理装置を提供することを目的とする。   In view of the above problems, the present invention provides an image processing apparatus capable of stably calculating a motion vector by extracting feature points with high reliability using depth information in template matching. With the goal.

上記の課題を解決するために、本発明に係る画像処理装置は、複数の画像間の動きベクトルを検出する画像処理装置であって、前記画像と、前記画像に対応する奥行情報を入力する入力手段と、前記入力手段により入力された画像と奥行情報を記憶する記憶手段と、前記記憶手段に記憶された第1の画像の特徴点を抽出する抽出手段と、前記抽出手段により抽出した特徴点を含む第1の領域と、前記入力手段により入力される第2の画像の内、前記第1の領域に対応する第2の領域の類似度を判定する類似度判定手段と、前記類似度判定手段の判定結果から、前記第1の画像と前記第2の画像との間の前記特徴点の動きベクトルを検出する第1の検出手段と、前記記憶手段に記憶された前記第1の画像に対応する第1の奥行情報と、前記第2の画像に対応する第2の奥行情報に基づいて、前記特徴点の信頼度を判定する信頼度判定手段と、前記信頼度判定手段による信頼度の判定結果に基づいて、前記第1の画像と前記第2の画像との間の画像全体の動きベクトルを検出する第2の検出手段とを備えることを特徴とする。   In order to solve the above problems, an image processing apparatus according to the present invention is an image processing apparatus that detects a motion vector between a plurality of images, and inputs the image and depth information corresponding to the image. Means, storage means for storing the image and depth information input by the input means, extraction means for extracting feature points of the first image stored in the storage means, and feature points extracted by the extraction means A similarity determination means for determining the similarity of a second area corresponding to the first area in the second image input by the input means, and the similarity determination First detection means for detecting a motion vector of the feature point between the first image and the second image from the determination result of the means, and the first image stored in the storage means The corresponding first depth information and the second Based on second depth information corresponding to the image, reliability determination means for determining the reliability of the feature point, and based on the determination result of the reliability by the reliability determination means, the first image and the And second detection means for detecting a motion vector of the entire image between the second image and the second image.

本発明によれば、、テンプレートマッチングにおいて、奥行情報を使用し特徴点の信頼度評価を行い、信頼度の高い特徴点を抽出することで、安定的に動きベクトルを算出することができる画像処理装置を提供することができる。   According to the present invention, image processing that can stably calculate a motion vector by performing reliability evaluation of feature points using depth information and extracting feature points with high reliability in template matching. An apparatus can be provided.

画像処理装置全体の構成を示すブロック図である。It is a block diagram which shows the structure of the whole image processing apparatus. 特徴点抽出部の構成を示すブロック図である。It is a block diagram which shows the structure of a feature point extraction part. テンプレートマッチング部の構成を示すブロック図である。It is a block diagram which shows the structure of a template matching part. 信頼度判定部の構成を示すブロック図である。It is a block diagram which shows the structure of a reliability determination part. 動きベクトル検出の処理を示すフローチャートである。It is a flowchart which shows the process of a motion vector detection. 特徴点抽出の処理を示すフローチャートである。It is a flowchart which shows the process of a feature point extraction. テンプレートマッチングの処理を示すフローチャートである。It is a flowchart which shows the process of template matching. テンプレートマッチングの概要図である。It is a schematic diagram of template matching. 信頼度判定の処理を示すフローチャートである。It is a flowchart which shows the process of reliability determination. 信頼度判定における信頼度の変化を示すグラフである。It is a graph which shows the change of the reliability in reliability determination. 第2の実施形態に係る画像処理装置全体の構成を示すブロック図である。It is a block diagram which shows the structure of the whole image processing apparatus which concerns on 2nd Embodiment. 第2の実施形態に係る動きベクトル調整部の構成を示すブロック図である。It is a block diagram which shows the structure of the motion vector adjustment part which concerns on 2nd Embodiment. 第2の実施形態に係る動きベクトル検出の処理を示すフローチャートである。It is a flowchart which shows the process of the motion vector detection which concerns on 2nd Embodiment. 第2の実施形態に係る動きベクトル調整の処理を示すフローチャートである。It is a flowchart which shows the process of the motion vector adjustment which concerns on 2nd Embodiment. 第2の実施形態に係る動きベクトル調整の概要図である。It is a schematic diagram of the motion vector adjustment which concerns on 2nd Embodiment. 第3の実施形態に係る画像処理装置全体の構成を示すブロック図である。It is a block diagram which shows the structure of the whole image processing apparatus which concerns on 3rd Embodiment. 第3の実施形態に係る画像間信頼度判定部の構成を示すブロック図である。It is a block diagram which shows the structure of the inter-image reliability determination part which concerns on 3rd Embodiment. 第3の実施形態に係る動きベクトル検出の処理を示すフローチャートである。It is a flowchart which shows the process of the motion vector detection which concerns on 3rd Embodiment. 第3の実施形態に係る画像間信頼度判定の処理を示すフローチャートである。It is a flowchart which shows the process of the reliability determination between images which concerns on 3rd Embodiment.

以下、本発明を実施するための最良の形態について図面などを参照して説明する。本発明は、デジタル一眼レフカメラやデジタルスチルカメラ、デジタルビデオカメラ等の撮像装置に適用可能である。   The best mode for carrying out the present invention will be described below with reference to the drawings. The present invention can be applied to an imaging apparatus such as a digital single-lens reflex camera, a digital still camera, or a digital video camera.

(第1実施形態)
まず、図1を参照して、本実施形態に係る画像処理装置の構成について説明する。画像処理装置100は、画像入力部101と、画像メモリ102と、特徴点抽出部103と、特徴点メモリ104と、テンプレートマッチング部105と、を備える。また、動きベクトル検出部106と、奥行情報入力部107と、奥行情報メモリ108と、特徴点信頼度判定部109と、画像全体動きベクトル検出部110を備える。なお、各構成要素を制御する不図示の制御部を備えてもよい。また、画像入力部101と、奥行情報入力部107は、各情報を入力する入力手段として機能し、画像メモリ102と、特徴点メモリ104と、奥行情報メモリ108は、各情報を記憶する記憶手段として機能する。
(First embodiment)
First, the configuration of the image processing apparatus according to the present embodiment will be described with reference to FIG. The image processing apparatus 100 includes an image input unit 101, an image memory 102, a feature point extraction unit 103, a feature point memory 104, and a template matching unit 105. In addition, a motion vector detection unit 106, a depth information input unit 107, a depth information memory 108, a feature point reliability determination unit 109, and an entire image motion vector detection unit 110 are provided. In addition, you may provide the control part not shown which controls each component. The image input unit 101 and the depth information input unit 107 function as input means for inputting each information, and the image memory 102, the feature point memory 104, and the depth information memory 108 are storage means for storing each information. Function as.

特徴点抽出部(抽出手段)103は、画像入力部101により入力された画像から、特徴点の抽出を行う。画像メモリ102は、画像入力部101により入力された1フレームまたは複数のフレームの画像を一時的に記憶保持する。なお、本実施形態では、画像メモリ102に記憶保持された画像を基準画像(第1の画像)とし、画像メモリ102に記憶保持される前の画像を参照画像(第2の画像)としている。しかしながら、これに限定することなく、例えば、画像メモリ102に記憶保持される前の画像を基準画像とし、画像メモリ102に記憶保持された画像を参照画像としてもよい。   A feature point extraction unit (extraction unit) 103 extracts feature points from the image input by the image input unit 101. The image memory 102 temporarily stores and holds an image of one frame or a plurality of frames input by the image input unit 101. In the present embodiment, the image stored and held in the image memory 102 is a standard image (first image), and the image before being stored and held in the image memory 102 is a reference image (second image). However, without being limited thereto, for example, an image before being stored and held in the image memory 102 may be used as a standard image, and an image stored and held in the image memory 102 may be used as a reference image.

特徴点メモリ104は、特徴点抽出部103により抽出された少なくとも1フレームの特徴点座標を一時的に記憶保持する。なお、本実施形態では、特徴点メモリ104に記憶保持された特徴点を基準画像特徴点とし、特徴点メモリ104に記憶保持される前の特徴点を参照画像特徴点としている。しかながら、逆に、特徴点メモリ104に記憶保持される前の特徴点を基準画像特徴点とし、特徴点メモリ104に記憶保持された特徴点を参照画像特徴点としてもよい。   The feature point memory 104 temporarily stores and holds the feature point coordinates of at least one frame extracted by the feature point extraction unit 103. In this embodiment, the feature points stored and held in the feature point memory 104 are set as reference image feature points, and the feature points before being stored and held in the feature point memory 104 are set as reference image feature points. However, conversely, the feature point before being stored in the feature point memory 104 may be used as the reference image feature point, and the feature point stored in the feature point memory 104 may be used as the reference image feature point.

テンプレートマッチング部105は、特徴点メモリ104に記憶保持された基準画像特徴点にテンプレートブロックを配置し、画像入力部101により入力された参照画像と、画像メモリ102に記憶保持された基準画像を使用し相関値の算出を行う。動きベクトル検出部(第1の検出手段)106は、テンプレートマッチング部105から入力される相関値から動きベクトルを検出する。奥行情報入力部107は、画像処理装置100で入力される画像と対応している奥行情報を入力する。   The template matching unit 105 arranges template blocks at the standard image feature points stored and held in the feature point memory 104, and uses the reference image input by the image input unit 101 and the standard image stored and held in the image memory 102. The correlation value is calculated. The motion vector detection unit (first detection means) 106 detects a motion vector from the correlation value input from the template matching unit 105. The depth information input unit 107 inputs depth information corresponding to an image input by the image processing apparatus 100.

奥行情報メモリ108は、奥行情報入力部107により入力された少なくとも1フレームの奥行情報を一時的に記憶保持する。なお、本実施形態では、奥行情報メモリ108に記憶保持された奥行情報を基準画像の奥行情報(第1の奥行情報)とし、奥行情報メモリ108に記憶保持される前の奥行情報を参照画像の奥行情報(第2の奥行情報)としている。しかしながら、逆に、奥行情報メモリ108に記憶保持される前の奥行情報を基準画像奥行情報とし、奥行情報メモリ108に記憶保持された奥行情報を参照画像奥行情報としてもよい。   The depth information memory 108 temporarily stores and holds the depth information of at least one frame input by the depth information input unit 107. In the present embodiment, the depth information stored and held in the depth information memory 108 is set as the depth information (first depth information) of the reference image, and the depth information before being stored and held in the depth information memory 108 is the reference image. Depth information (second depth information) is used. However, conversely, the depth information before being stored in the depth information memory 108 may be used as the reference image depth information, and the depth information stored in the depth information memory 108 may be used as the reference image depth information.

特徴点信頼度判定部(信頼度判定手段)109は、テンプレートブロックと、動きベクトルと、参照画像の奥行情報と、基準画像の奥行情報からテンプレートマッチング部105で使用した特徴点の信頼度の判定を行う。画像全体動きベクトル検出部(第2の検出手段)110は、動きベクトル検出部106によって検出された動きベクトルと特徴点信頼度判定部109によって判定された特徴点の信頼度を用いて画像全体の動きベクトルを検出する。   The feature point reliability determination unit (reliability determination unit) 109 determines the reliability of the feature points used in the template matching unit 105 from the template block, the motion vector, the depth information of the reference image, and the depth information of the reference image. I do. The entire image motion vector detection unit (second detection unit) 110 uses the motion vector detected by the motion vector detection unit 106 and the reliability of the feature point determined by the feature point reliability determination unit 109 to detect the entire image. Detect motion vectors.

次に、図2を参照して、特徴点抽出部103の構成について説明する。特徴点抽出部103は、特徴フィルタ部1031と、特徴評価部1032と、特徴点決定部1033を備える。特徴フィルタ部1031は、例えば、水平微分フィルタ、垂直微分フィルタ、平滑化フィルタ等から構成され、画像入力部101によって入力された画像に対し、フィルタ処理を実施する。特徴評価部1032は、特徴フィルタ部1031によりフィルタ処理された画像に対し、画素毎に2つのエッジの交点や曲率が極大である曲線状の点などのコーナー点を特徴評価式により特徴値として算出する。特徴点決定部1033は、特徴評価部1032によって画素毎に算出された特徴値から、特徴点を決定する。なお、本実施形態における方法に限定することなく、特徴点抽出ができるのであれば、別の手法を用いてもよい。   Next, the configuration of the feature point extraction unit 103 will be described with reference to FIG. The feature point extraction unit 103 includes a feature filter unit 1031, a feature evaluation unit 1032, and a feature point determination unit 1033. The feature filter unit 1031 includes, for example, a horizontal differential filter, a vertical differential filter, a smoothing filter, and the like, and performs filter processing on the image input by the image input unit 101. The feature evaluation unit 1032 calculates a corner point such as an intersection of two edges or a curved point having a maximum curvature for each pixel as a feature value with respect to the image filtered by the feature filter unit 1031. To do. The feature point determination unit 1033 determines a feature point from the feature value calculated for each pixel by the feature evaluation unit 1032. Note that another method may be used as long as feature points can be extracted without being limited to the method in the present embodiment.

次に、図3を参照して、テンプレートマッチング部(類似度判定手段)105の構成について説明する。テンプレートマッチング部105は、相関値算出部1051と、相関値判定部1052を備える。相関値算出部1051は、特徴点メモリ104に記憶保持された基準画像特徴点上にテンプレートブロックの配置とテンプレートマッチング領域を設定する。そして、画像入力部101により入力された参照画像と、画像メモリ102に記憶保持された基準画像の2枚の画像を用いて、テンプレートマッチングによる相関値の算出を行う(画像の類似度の判定をする)。相関値判定部1052は、相関値算出部1051から入力される相関値の最大値を算出し、それらの位置情報を基にして後段の処理へ出力する極小値を選択する。   Next, the configuration of the template matching unit (similarity determination unit) 105 will be described with reference to FIG. The template matching unit 105 includes a correlation value calculation unit 1051 and a correlation value determination unit 1052. The correlation value calculation unit 1051 sets the template block arrangement and the template matching area on the reference image feature points stored and held in the feature point memory 104. Then, the correlation value is calculated by template matching using the reference image input by the image input unit 101 and the standard image stored and held in the image memory 102 (determining the similarity of images). To do). The correlation value determination unit 1052 calculates the maximum value of the correlation value input from the correlation value calculation unit 1051, and selects the minimum value to be output to the subsequent processing based on the position information.

次に、図4を参照して、特徴点信頼度判定部109の構成について説明する。特徴点信頼度判定部109は、テンプレート内奥行評価部1091と、動きベクトル奥行評価部1092と、信頼度判定部1093を備える。テンプレート内奥行評価部1091は、テンプレートマッチング部105によって設定されるテンプレートブロックの奥行情報を、奥行情報メモリ108に記憶保持されている基準画像の奥行情報から算出し、テンプレート内で奥行の変化の判定を行う。   Next, the configuration of the feature point reliability determination unit 109 will be described with reference to FIG. The feature point reliability determination unit 109 includes an in-template depth evaluation unit 1091, a motion vector depth evaluation unit 1092, and a reliability determination unit 1093. The in-template depth evaluation unit 1091 calculates the depth information of the template block set by the template matching unit 105 from the depth information of the reference image stored in the depth information memory 108, and determines the change in the depth in the template. I do.

動きベクトル奥行評価部1092は、テンプレート内で奥行の変化がある場合、動きベクトル検出部106によって検出された動きベクトルの始点の奥行情報を、奥行情報メモリ108に記憶保持されている基準画像の奥行情報から算出する。そして、動きベクトルの終点の奥行情報を奥行情報入力部107によって入力される参照画像の奥行情報から算出し、動きベクトルの始点と終点の奥行差を算出する。信頼度判定部1093は、動きベクトル奥行評価部1092によって算出された動きベクトルの始点と終点の奥行差からテンプレートマッチング部105でテンプレートブロックの配置に使用した特徴点の信頼度の判定を行う。   When there is a change in depth in the template, the motion vector depth evaluation unit 1092 stores the depth information of the start point of the motion vector detected by the motion vector detection unit 106 and the depth of the reference image stored in the depth information memory 108. Calculate from information. Then, the depth information of the end point of the motion vector is calculated from the depth information of the reference image input by the depth information input unit 107, and the depth difference between the start point and the end point of the motion vector is calculated. The reliability determination unit 1093 determines the reliability of the feature points used for the placement of the template block by the template matching unit 105 from the depth difference between the start point and end point of the motion vector calculated by the motion vector depth evaluation unit 1092.

次に、図5に示すフローチャートを参照して、動きベクトル検出の処理について説明する。なお、本実施形態では、時間軸方向に連なるフレーム間で動きベクトル検出を行うものとし、基準フレームと参照フレームは、時間軸方向に関連しているフレームとするが、必ずしも隣接フレームでなくてもよい。   Next, the motion vector detection process will be described with reference to the flowchart shown in FIG. In this embodiment, motion vector detection is performed between frames that are continuous in the time axis direction, and the base frame and the reference frame are frames that are related to the time axis direction, but they are not necessarily adjacent frames. Good.

まず、ステップS501において、撮影された画像が画像入力部101を介し画像処理装置100へ入力され、画像メモリ102に記憶保持される。なお、本実施形態では、画像メモリ102に記憶保持された画像を基準画像とし、画像メモリ102に記憶保持される前の画像を参照画像とする。   First, in step S <b> 501, a photographed image is input to the image processing apparatus 100 via the image input unit 101 and stored and held in the image memory 102. In the present embodiment, an image stored and held in the image memory 102 is a standard image, and an image before being stored and held in the image memory 102 is a reference image.

次に、ステップS502において、奥行情報が、奥行情報入力部107を介し画像処理装置へ入力される。入力された奥行情報は奥行情報メモリ108に記憶保持される。なお、本実施形態では奥行情報メモリ108に記憶保持された奥行情報を基準画像の奥行情報とし、奥行情報メモリ108に記憶保持される前の奥行情報を参照画像の奥行情報とする。奥行情報入力方式は、例えば、赤外線を照射してから、読み取りにかかる時間を計測して奥行画像の撮影をするTOF(Time of flight)方式や、多眼レンズで撮影した複数枚の画像の視差を求めて奥行情報の入力を行う方式でもよい。ステップS501によって入力される画像と対応付けられる奥行情報の入力が可能であれば、方式の如何は問わない。   Next, in step S <b> 502, depth information is input to the image processing apparatus via the depth information input unit 107. The input depth information is stored and held in the depth information memory 108. In this embodiment, the depth information stored and held in the depth information memory 108 is the depth information of the reference image, and the depth information before being stored and held in the depth information memory 108 is the depth information of the reference image. The depth information input method is, for example, a TOF (Time of Flight) method in which a depth image is taken by measuring the time required for reading after irradiating infrared rays, or parallax of a plurality of images taken with a multi-lens lens. May be used to input depth information. Any method may be used as long as the depth information associated with the image input in step S501 can be input.

ステップS503において、特徴点抽出部103は、ステップS501で入力された画像から、特徴点を抽出する。そして、抽出された特徴点は、特徴点メモリ104に記憶保持される。なお、本実施形態では、特徴点メモリ104に記憶保持された特徴点を基準画像特徴点とし、特徴点メモリ104に記憶保持される前の特徴点を参照画像特徴点とする。   In step S503, the feature point extraction unit 103 extracts feature points from the image input in step S501. The extracted feature points are stored and held in the feature point memory 104. In the present embodiment, the feature points stored and held in the feature point memory 104 are set as reference image feature points, and the feature points before being stored and held in the feature point memory 104 are set as reference image feature points.

ここで、図6に示すフローチャートを参照して、特徴点抽出部103が行う特徴点抽出処理について説明する。本実施形態では、Harris Corner検出器により特徴点の抽出を行う。まず、ステップS601において、特徴フィルタ部1031は、図5のステップS501で入力された画像に対して、フィルタ処理を施す。なお、本実施形態では、入力された画像に対し1次微分フィルタを水平、垂直、斜めに施し、それぞれ1次微分フィルタを施した結果に対しガウシアンフィルタを施す。   Here, the feature point extraction processing performed by the feature point extraction unit 103 will be described with reference to the flowchart shown in FIG. In the present embodiment, feature points are extracted by a Harris Corner detector. First, in step S601, the feature filter unit 1031 performs filter processing on the image input in step S501 of FIG. In this embodiment, a first-order differential filter is applied horizontally, vertically, and diagonally to an input image, and a Gaussian filter is applied to the result of applying the first-order differential filter.

次に、ステップS602において、特徴評価部1032は、ステップS601でフィルタ処理された画像に対し、画素ごとに2つのエッジの交点や曲率が極大である曲線状の点など画素の周辺の微分値が多方向に大きい点を、特徴評価式で特徴値として算出する。なお、ステップS601の水平微分フィルタと垂直微分フィルタを施した結果から、自己相関行列Hを作成する。自己相関行列Hの式を式1に示す。

Figure 0006579816
式1においてIxは、水平微分フィルタを施した結果を示し、Iyは、垂直微分フィルタを施した結果を示しており、ガウシアンフィルタGを畳み込む。 Next, in step S602, the feature evaluation unit 1032 performs, on the image filtered in step S601, a differential value around the pixel such as an intersection of two edges or a curved point having a maximum curvature for each pixel. A point that is large in multiple directions is calculated as a feature value using a feature evaluation formula. Note that an autocorrelation matrix H is created from the result of applying the horizontal differential filter and the vertical differential filter in step S601. Formula 1 of the autocorrelation matrix H is shown in Formula 1.
Figure 0006579816
In Expression 1, Ix indicates the result of applying the horizontal differential filter, and Iy indicates the result of applying the vertical differential filter, and convolves the Gaussian filter G.

次に、Harris検出器の特徴評価式を式2に示す。

Figure 0006579816
式2において、αは定数であり、実験的に0.04〜0.15の値が良いとされている。detは、自己相関行列Hの行列式を示し、trは、自己相関行列Hの主対角成分の和を示す。 Next, the characteristic evaluation formula of the Harris detector is shown in Formula 2.
Figure 0006579816
In Expression 2, α is a constant, and a value of 0.04 to 0.15 is experimentally good. det represents the determinant of the autocorrelation matrix H, and tr represents the sum of the main diagonal components of the autocorrelation matrix H.

次に、ステップS603において、特徴点決定部1033は、ステップS602で画素ごとに算出された特徴値に基づいて特徴点を決定する。本実施形態では、特徴値の高いものから順番に、予め決められた個数を特徴点として抽出する。そして、特徴点抽出の処理を終了する。このとき、特徴点の分布の偏りを防ぐためにグリッド分割処理などを行ってもよい。なお、本実施形態では、特徴点の抽出にHarris corner検出器を使用したが、これに限定するものではなく、Shi and Tomasi方式などの他の特徴点抽出方式を用いてもよい。   Next, in step S603, the feature point determination unit 1033 determines a feature point based on the feature value calculated for each pixel in step S602. In the present embodiment, a predetermined number is extracted as a feature point in order from the highest feature value. Then, the feature point extraction process ends. At this time, grid division processing or the like may be performed in order to prevent uneven distribution of feature points. In the present embodiment, the Harris corner detector is used for feature point extraction. However, the present invention is not limited to this, and other feature point extraction methods such as the Shi and Tomasi method may be used.

図5に戻って、次に、ステップS504において、テンプレートマッチング部105は、ステップS503で抽出され、特徴点メモリ104に記憶保持された基準画像特徴点上にテンプレートブロックを配置する。そして、ステップS501で入力され、画像メモリ102に記憶保持された基準画像と、ステップS501で入力された参照画像で、テンプレートマッチングによる相関値の算出を行う。   Returning to FIG. 5, in step S <b> 504, the template matching unit 105 arranges the template block on the reference image feature points extracted in step S <b> 503 and stored in the feature point memory 104. Then, a correlation value is calculated by template matching between the reference image input in step S501 and stored and held in the image memory 102 and the reference image input in step S501.

ここで、図7に示すフローチャートを参照して、テンプレートマッチング部105が行うテンプレートマッチング処理について説明する。まず、ステップS701において、相関値算出部1051は、フレーム画像間の任意の領域に対する相関値を算出する。このときの相関値の算出方法を図8を参照して、説明する。図8(A)は、基準画像を示し、図8(B)は、参照画像を示す。   Here, the template matching process performed by the template matching unit 105 will be described with reference to the flowchart shown in FIG. First, in step S701, the correlation value calculation unit 1051 calculates a correlation value for an arbitrary region between frame images. A method of calculating the correlation value at this time will be described with reference to FIG. FIG. 8A shows a standard image, and FIG. 8B shows a reference image.

本実施形態では、ステップS502において抽出され特徴点メモリ104に記憶保持された基準画像特徴点801上にテンプレートブロック802が配置される。そして、図8(A)に示す基準画像中にテンプレートブロック802が配置され、テンプレートブロック802と、図8(B)に示す参照画像の各領域(相関値算出領域804)との相関値を算出する。このとき、参照画像の全領域に対して相関値を算出するのでは演算量が膨大なものとなるため、実際には、図8(B)に示すように、参照画像上の相関値を算出する矩形領域をサーチ範囲803として設定する。サーチ範囲803の位置や大きさの設定については特に制限はなく、例えば、相関値算出領域804を含んだ領域であればよい。   In the present embodiment, the template block 802 is arranged on the reference image feature point 801 extracted in step S502 and stored in the feature point memory 104. A template block 802 is arranged in the reference image shown in FIG. 8A, and a correlation value between the template block 802 and each region (correlation value calculation region 804) of the reference image shown in FIG. 8B is calculated. To do. At this time, calculating the correlation value for the entire region of the reference image requires an enormous amount of computation. In practice, as shown in FIG. 8B, the correlation value on the reference image is calculated. A rectangular area to be set is set as a search range 803. The position and size of the search range 803 are not particularly limited, and may be any area including the correlation value calculation area 804, for example.

本実施形態では、相関値の算出方法の一例として差分絶対値和(Sum of Absolute Difference、以下SADと略す)で説明する。SADの計算式を式3に示す。

Figure 0006579816
式3において、f(i,j)は、テンプレートブロック802内の座標(i,j)における輝度値を示し、g(i,j)は、サーチ範囲803において相関値算出の対象となる相関値算出領域804内の各輝度値を示す。そして、SADでは、両ブロック内の各輝度値f(i,j)およびg(i,j)について差の絶対値を計算し、その総和を求めることで相関値S_SADを得ることができる。従って、相関値S_SADの値が小さいほど両ブロック間の輝度値の差分が小さい、つまりテンプレートブロック802と相関値算出領域804のブロック内のテクスチャが類似していることを示す。 In the present embodiment, a sum of absolute difference (hereinafter abbreviated as SAD) will be described as an example of a correlation value calculation method. The calculation formula of SAD is shown in Formula 3.
Figure 0006579816
In Equation 3, f (i, j) represents the luminance value at the coordinates (i, j) in the template block 802, and g (i, j) represents the correlation value for which the correlation value is calculated in the search range 803. Each luminance value in the calculation area 804 is shown. In SAD, the absolute value of the difference is calculated for each luminance value f (i, j) and g (i, j) in both blocks, and the correlation value S_SAD can be obtained by obtaining the sum. Therefore, the smaller the correlation value S_SAD, the smaller the difference in luminance value between the two blocks, that is, the texture in the block of the template block 802 and the correlation value calculation area 804 is similar.

なお、本実施形態では、相関値の一例としてSADを使用しているが、これに限定することなく、例えば、差分二乗和(SSD)や正規化相互相関(NCC)等の他の相関値を用いてもよい。次に、ステップS702において、相関値判定部1052は、ステップS701で算出した相関値から最小値の位置情報を検出する。そして、テンプレートマッチングの処理を終了する。   In this embodiment, SAD is used as an example of the correlation value. However, the present invention is not limited to this. For example, other correlation values such as sum of squares of differences (SSD) and normalized cross-correlation (NCC) are used. It may be used. Next, in step S702, the correlation value determination unit 1052 detects the position information of the minimum value from the correlation value calculated in step S701. Then, the template matching process ends.

図5に戻って、次に、ステップS505において、動きベクトル検出部106は、ステップS504のテンプレートマッチングの結果(類似度の判定結果)における相関値の最小値の位置から動きベクトルを検出する。具体的には、画像間の動きベクトル、すなわち相関値の最小値の位置から、基準画像上のテンプレートブロックが参照画像においてどの位置に移動したかの動きベクトルを検出する。なお、本実施形態では、動きベクトルの始点を、テンプレートブロックを配置するときに使用した基準画像特徴点の座標にし、動きベクトルの終点は、算出した画像間の動きを動きベクトルの始点座標に足すことで算出する。   Returning to FIG. 5, next, in step S505, the motion vector detection unit 106 detects a motion vector from the position of the minimum value of the correlation value in the template matching result (similarity determination result) in step S504. Specifically, a motion vector indicating which position the template block on the base image has moved in the reference image is detected from the motion vector between images, that is, the position of the minimum correlation value. In this embodiment, the start point of the motion vector is set to the coordinates of the reference image feature point used when the template block is arranged, and the end point of the motion vector is calculated by adding the calculated motion between the images to the start point coordinates of the motion vector. To calculate.

次に、ステップS506において、特徴点信頼度判定部109は、ステップS502〜S505の処理の結果から動きベクトルの始点である動きベクトルの特徴点の信頼度の判定を行う。つまり、ステップS502で入力される参照画像の奥行情報、奥行情報メモリ108に保持された基準画像の奥行情報、ステップS504のテンプレートマッチングの結果、ステップS505で検出された動きベクトルを使用し、特徴点の信頼度の判定を行う。   Next, in step S506, the feature point reliability determination unit 109 determines the reliability of the feature point of the motion vector that is the start point of the motion vector from the result of the processing in steps S502 to S505. That is, using the depth information of the reference image input in step S502, the depth information of the reference image held in the depth information memory 108, the motion vector detected in step S505 as a result of template matching in step S504, and the feature points The reliability of is determined.

ここで、図9に示すフローチャートを参照して、特徴点信頼度判定部109が行う信頼度判定処理について説明する。まず、ステップS901において、テンプレート内奥行評価部1091は、ステップS502で入力された基準画像の奥行情報と、ステップS504で基準画像の特徴点上に配置されたテンプレートブロックからテンプレートブロック内の奥行情報を取得する。そして、テンプレート内での奥行情報が変化しているか否かを判定する。テンプレート内での奥行情報の変化が一定以上の場合(Yes)、ステップS902へ進み、一定未満の場合(No)、ステップS903へ進む。   Here, the reliability determination process performed by the feature point reliability determination unit 109 will be described with reference to the flowchart shown in FIG. First, in step S901, the in-template depth evaluation unit 1091 obtains the depth information in the template block from the depth information of the reference image input in step S502 and the template block arranged on the feature point of the reference image in step S504. get. Then, it is determined whether or not the depth information in the template has changed. If the change in the depth information in the template is equal to or greater than a certain value (Yes), the process proceeds to step S902. If the change is less than the certain value (No), the process proceeds to step S903.

次に、ステップS902において、ステップS502で入力され、奥行情報メモリ108に記憶保持された基準画像の奥行情報と、ステップS505で検出された動きベクトルの始点の座標から、動きベクトルの始点の奥行情報を算出する。そして、ステップS502によって入力された参照画像の奥行情報と、ステップS505で検出された動きベクトルの終点の座標から動きベクトルの終点の奥行情報を算出する。算出された動きベクトルの始点奥行情報と動きベクトルの終点奥行情報を比較し奥行の差を算出する。次に、ステップS903において、ステップS902で算出された動きベクトルの始点と終点の奥行の差からステップS504でテンプレートブロックを配置する際に使用した特徴点の信頼度の判定を行う。   Next, in step S902, the depth information of the start point of the motion vector from the depth information of the reference image input in step S502 and stored and held in the depth information memory 108, and the coordinates of the start point of the motion vector detected in step S505. Is calculated. Then, the depth information of the end point of the motion vector is calculated from the depth information of the reference image input in step S502 and the coordinates of the end point of the motion vector detected in step S505. The calculated motion vector start point depth information is compared with the motion vector end point depth information to calculate the depth difference. Next, in step S903, the reliability of the feature point used when placing the template block in step S504 is determined from the difference between the depth of the start point and end point of the motion vector calculated in step S902.

ここで、奥行の差と信頼度の関係を図10に示す。図10(A)は、奥行の差と信頼度を線形で変化させた場合の関係図を示す。図10(B)は、奥行の差が所定値までは信頼度を変えず、所定値を少しでも離れると、信頼度を急激に下げ、一定まで下がったら、信頼度をを緩やかに変化させていく場合の関係図を示す。図10(C)は、一定の奥行の差までは信頼度を緩やかに下げ、特定の奥行の差になった場合、信頼度を急激に下げてた場合の関係図を示す。なお、ステップS901でテンプレート内で奥行変化が一定未満と判断された場合、信頼度を下げない。本実施形態では、信頼度の評価として、図10(A)〜(C)のいずれかを適用したが、これに限定することなく、奥行の差が大きくなるにつれて信頼度が下がることを示す関係図であれば、他の関係図であってもよい。なお、本実施形態において、信頼度とは、各特徴点における動きベクトルの使用や影響の大小などを判断するための、画像間の動きベクトル検出に関する度合いを示すものである。   Here, the relationship between the depth difference and the reliability is shown in FIG. FIG. 10A shows a relationship diagram when the depth difference and the reliability are changed linearly. FIG. 10B shows that the reliability does not change until the depth difference reaches a predetermined value, and if the predetermined value is far from the predetermined value, the reliability is drastically decreased. When the depth difference decreases to a certain level, the reliability is gradually changed. The relationship diagram when going is shown. FIG. 10C shows a relationship diagram when the reliability is gradually lowered to a certain depth difference, and the reliability is drastically lowered when a certain depth difference is reached. If it is determined in step S901 that the depth change is less than a certain value in the template, the reliability is not lowered. In the present embodiment, any one of FIGS. 10A to 10C is applied as the reliability evaluation. However, the present invention is not limited to this, and the relationship indicating that the reliability decreases as the depth difference increases. As long as it is a diagram, it may be another relationship diagram. In the present embodiment, the reliability indicates the degree of motion vector detection between images for determining the use of a motion vector at each feature point, the magnitude of influence, and the like.

図5に戻って、次に、ステップS507において、画像全体動きベクトル検出部110は、ステップS505で特徴点毎に検出された動きベクトルと、ステップS506で判定された特徴点の信頼度を使用して、画像全体の動きベクトルを検出する。このとき、ステップS506で判定された信頼度に応じて、各特徴点の動きベクトルを使用するか否かや、重み付け(影響の大小)を判断して画像全体の動きベクトルを検出する。例えば、信頼度の低い特徴点である場合、その特徴点の動きベクトルを使用しない、または検出時の影響を小さくする。画像全体の動きベクトルを検出して、処理を終了する。   Returning to FIG. 5, next, in step S507, the entire image motion vector detection unit 110 uses the motion vector detected for each feature point in step S505 and the reliability of the feature point determined in step S506. Thus, the motion vector of the entire image is detected. At this time, the motion vector of the entire image is detected by determining whether or not to use the motion vector of each feature point and the weighting (magnitude of influence) according to the reliability determined in step S506. For example, in the case of a feature point with low reliability, the motion vector of the feature point is not used or the influence upon detection is reduced. The motion vector of the entire image is detected, and the process ends.

以上、本実施形態によれば、テンプレートマッチングにおいて、奥行情報を使用し特徴点の信頼度評価を行い、信頼度の高い特徴点を抽出することで、安定的に動きベクトルを算出することができる画像処理装置を提供することができる。すなわち、画像内の奥行変化が大きく、特徴点が移動することで動きベクトルがフレーム画像間で大きく変化する場合であっても、奥行情報から特徴点の信頼度の判定をし、動きベクトル検出処理に反映することで、動きベクトル検出を精度良く行うことができる。   As described above, according to the present embodiment, it is possible to stably calculate a motion vector by performing reliability evaluation of feature points using depth information and extracting feature points with high reliability in template matching. An image processing apparatus can be provided. That is, even if the depth change in the image is large and the motion vector changes greatly between the frame images due to the movement of the feature point, the reliability of the feature point is determined from the depth information, and the motion vector detection process By reflecting the above, motion vector detection can be performed with high accuracy.

(第2実施形態)
次に、図11を参照して、第2実施形態に係る画像処理装置1100について説明する。図11において、図1で示した構成要素と同様の構成については、図1と同符号を付すことで、その詳細な説明を省略する。本実施形態に係る画像処理装置1100は、図1に示す構成要素に加え、動きベクトル調整部(ベクトル調整手段)1101を備える。動きベクトル調整部1101は、奥行情報入力部107によって入力される参照画像奥行情報と、奥行情報メモリ108に記憶保持されている基準画像の奥行情報から、動きベクトル検出部106によって検出される動きベクトルを調整する。
(Second Embodiment)
Next, an image processing apparatus 1100 according to the second embodiment will be described with reference to FIG. In FIG. 11, the same components as those shown in FIG. 1 are denoted by the same reference numerals as those in FIG. An image processing apparatus 1100 according to the present embodiment includes a motion vector adjustment unit (vector adjustment unit) 1101 in addition to the components shown in FIG. The motion vector adjustment unit 1101 detects the motion vector detected by the motion vector detection unit 106 from the reference image depth information input by the depth information input unit 107 and the depth information of the reference image stored in the depth information memory 108. Adjust.

次に、図12を参照して、動きベクトル調整部1101の構成について説明する。動きベクトル調整部1101は、基準奥行設定部11011と、動きベクトル向き調整部11012と、動きベクトルサイズ調整部11013を備える。基準奥行設定部11011は、奥行情報入力部107で入力された参照画像の奥行情報または奥行情報メモリ108に記憶保持された基準画像の奥行情報を使用して基準奥行を設定する。   Next, the configuration of the motion vector adjustment unit 1101 will be described with reference to FIG. The motion vector adjustment unit 1101 includes a reference depth setting unit 11011, a motion vector direction adjustment unit 11012, and a motion vector size adjustment unit 11013. The reference depth setting unit 11011 sets the reference depth by using the depth information of the reference image input by the depth information input unit 107 or the depth information of the reference image stored and held in the depth information memory 108.

動きベクトル向き調整部11012は、奥行情報入力部107で入力された参照画像の奥行情報と、奥行情報メモリ108に保持された基準画像の奥行情報を使用し、検出される動きベクトルの始点と終点の奥行の調整を行い、動きベクトルの向きの調整を行う。動きベクトルサイズ調整部11013は、動きベクトル向き調整部11012によって調整された動きベクトルを、基準奥行設定部11011によって設定された基準奥行に合わせて動きベクトルのサイズの調整を行う。   The motion vector direction adjustment unit 11012 uses the depth information of the reference image input by the depth information input unit 107 and the depth information of the reference image held in the depth information memory 108, and starts and ends of detected motion vectors. Is adjusted, and the direction of the motion vector is adjusted. The motion vector size adjustment unit 11013 adjusts the size of the motion vector by matching the motion vector adjusted by the motion vector direction adjustment unit 11012 with the reference depth set by the reference depth setting unit 11011.

次に、図13に示すフローチャートを参照して、本実施形態に係る動きベクトル検出の処理について説明する。図13において、図5に示した処理と同様の処理については、図5と同符号を付し、その詳細な説明を省略する。ステップS506の後、ステップS1301において、動きベクトル調整部1101は、参照画像の奥行情報と、奥行情報メモリ108に記憶保持された基準画像の奥行情報を使用し、ステップS505で算出された動きベクトルを調整する。   Next, a motion vector detection process according to this embodiment will be described with reference to the flowchart shown in FIG. In FIG. 13, the same processes as those shown in FIG. 5 are denoted by the same reference numerals as those in FIG. After step S506, in step S1301, the motion vector adjustment unit 1101 uses the depth information of the reference image and the depth information of the reference image stored in the depth information memory 108, and uses the motion vector calculated in step S505. adjust.

次に、図14に示すフローチャートと、図15に示す動きベクトル調整の概要図を参照して、動きベクトル調整部1101が行う動きベクトル調整処理について説明する。図15(A)は、基準画像を示し、図15(B)は、参照画像を示し、図15(C)、(D)、(E)は、図15(B)に対して奥行方向を縦軸にして示す図である。   Next, a motion vector adjustment process performed by the motion vector adjustment unit 1101 will be described with reference to a flowchart shown in FIG. 14 and a schematic diagram of motion vector adjustment shown in FIG. 15A shows a standard image, FIG. 15B shows a reference image, and FIGS. 15C, 15D, and 15E show the depth direction with respect to FIG. 15B. It is a figure shown on a vertical axis.

各図において、基準奥行1501、1502、1505、1508、1511は基準奥行を示す線であり、画像に関わらず全て同一の奥行情報に設定される。動きベクトル1503、1504、1506、1507は、動きベクトル算出において算出した動きベクトルである。動きベクトル1509、1510は、動きベクトル向き調整において向きを調整した動きベクトルである。動きベクトル1512、1513は、動きベクトルサイズ調整においてサイズ調整を行った動きベクトルである。   In each figure, reference depths 1501, 1502, 1505, 1508, and 1511 are lines indicating the reference depth, and are all set to the same depth information regardless of the image. Motion vectors 1503, 1504, 1506, and 1507 are motion vectors calculated in motion vector calculation. Motion vectors 1509 and 1510 are motion vectors whose directions are adjusted in the motion vector direction adjustment. Motion vectors 1512 and 1513 are motion vectors that have undergone size adjustment in motion vector size adjustment.

まず、ステップS1401において、基準奥行設定部11011は、ステップS502で入力される参照画像の奥行情報またはステップS502で入力され、奥行情報メモリ108に記憶保持された基準画像の奥行情報を使用して基準奥行を設定する。なお、1度、基準奥行が設定されれば、ステップS1401が複数回繰り返される場合でも再設定し直す必要はない。なお、基準奥行の設定方法については、例えば、基準画像または参照画像のフォーカス位置を基準奥行に設定してもよく、基準画像または参照画像の画像中央の奥行を基準奥行に設定してもよい。また、全体の奥行の分布を算出し、中間の奥行を基準奥行に設定してもよく、基準奥行が設定できればその方法は問わない。   First, in step S1401, the reference depth setting unit 11011 uses the reference image depth information input in step S502 or the reference image depth information input in step S502 and stored in the depth information memory 108 as a reference. Set the depth. Note that once the reference depth is set, there is no need to reset it even if step S1401 is repeated a plurality of times. As for the method for setting the standard depth, for example, the focus position of the standard image or the reference image may be set as the standard depth, or the depth at the center of the standard image or the reference image may be set as the standard depth. Further, the distribution of the entire depth may be calculated, and the intermediate depth may be set as the reference depth. Any method can be used as long as the reference depth can be set.

次に、ステップS1402において、動きベクトル向き調整部11012は、奥行情報メモリ108に記憶保持された基準画像の奥行情報と、ステップS505で検出された動きベクトルの始点の座標から、動きベクトルの始点の奥行情報を算出する。そして、ステップS502で入力された参照画像奥行情報と、ステップS505で検出された動きベクトルの終点の座標から動きベクトルの終点の奥行情報を算出する。算出された動きベクトルの始点奥行情報と動きベクトルの終点奥行情報から、ベクトルを奥行方向で回転させ、向き調整することによって始点と終点の奥行を同一にする。   Next, in step S1402, the motion vector direction adjustment unit 11012 determines the start point of the motion vector from the depth information of the reference image stored and held in the depth information memory 108 and the coordinates of the start point of the motion vector detected in step S505. Depth information is calculated. Then, the depth information of the end point of the motion vector is calculated from the reference image depth information input in step S502 and the coordinates of the end point of the motion vector detected in step S505. From the calculated motion vector start point depth information and motion vector end point depth information, the vector is rotated in the depth direction and the direction is adjusted to make the start point and end point depth the same.

図15(B)において、動きベクトル1503および1504は、図15(A)に示す基準画像と、図15(B)に示す参照画像からステップS505で算出された動きベクトルであある。また、図15(C)に示す動きベクトル1506および1507は、それぞれの動きベクトルを奥行方向を縦軸にしたものになっている。動きベクトル1506および1507の始点終点で奥行の異なる動きベクトルを奥行方向で回転させることで、それぞれ図15(D)に示す動きベクトル1509および1510のように始点終点の奥行の同じベクトルになるよう向きを調整する。   In FIG. 15B, motion vectors 1503 and 1504 are motion vectors calculated in step S505 from the reference image shown in FIG. 15A and the reference image shown in FIG. In addition, motion vectors 1506 and 1507 shown in FIG. 15C are obtained by setting each motion vector to the vertical axis in the depth direction. The motion vectors having different depths at the start and end points of the motion vectors 1506 and 1507 are rotated in the depth direction, so that the vectors become the same vectors at the start and end points as shown by the motion vectors 1509 and 1510 shown in FIG. Adjust.

次に、ステップS1403において、動きベクトルサイズ調整部11013は、ステップS1401で設定された基準奥行と、ステップS1402で向きの調整された動きベクトルを使用して、動きベクトルのサイズの調整を行う。ステップS1402で向きの調整された図15(D)に示す動きベクトル1509および1510を、基準奥行に合わせてサイズを調整し、それぞれ図15(E)に示す動きベクトル1512および1513へ変換する。本実施形態では、動きベクトル1509および1510を基準奥行に射影し、それぞれ動きベクトル1512および1513へ変換する。   Next, in step S1403, the motion vector size adjustment unit 11013 adjusts the size of the motion vector using the reference depth set in step S1401 and the motion vector whose direction is adjusted in step S1402. The motion vectors 1509 and 1510 shown in FIG. 15D whose orientation has been adjusted in step S1402 are adjusted in size according to the reference depth and converted into motion vectors 1512 and 1513 shown in FIG. 15E, respectively. In the present embodiment, the motion vectors 1509 and 1510 are projected onto the reference depth and converted into motion vectors 1512 and 1513, respectively.

次に、ステップS505で検出された動きベクトルをステップS1301で調整し、調整後の動きベクトルと、ステップS506で算出された各特徴点の信頼度を使用し、ステップS507によって画像全体の動きベクトルを算出する。そして、動きベクトル処理を終了する。実施形態1よりも精度の高い動きベクトル検出を行うことが可能となる。   Next, the motion vector detected in step S505 is adjusted in step S1301, and the adjusted motion vector and the reliability of each feature point calculated in step S506 are used. In step S507, the motion vector of the entire image is calculated. calculate. Then, the motion vector process ends. It is possible to perform motion vector detection with higher accuracy than in the first embodiment.

以上、本実施形態によれば、テンプレートマッチングにおいて、奥行情報を使用し特徴点の信頼度評価を行い、信頼度の高い特徴点を抽出することで、動きベクトルを算出することができる画像処理装置を提供することができる。また、本実施形態によれば、動きベクトルの調整を行うことにより、第1実施形態よりも、精度高く動きベクトルを検出することができる。   As described above, according to the present embodiment, in template matching, an image processing apparatus capable of calculating a motion vector by performing reliability evaluation of feature points using depth information and extracting feature points with high reliability. Can be provided. Further, according to the present embodiment, by adjusting the motion vector, it is possible to detect the motion vector with higher accuracy than in the first embodiment.

(第3実施形態)
次に、図16を参照して、第3実施形態に係る画像処理装置1600について説明する。図16において、図1で示した構成要素と同様の構成については、図1と同符号を付すことで、その詳細な説明を省略する。本実施形態に係る画像処理装置1100は、図1に示す構成要素に加え、画像間信頼度判定部1601を備える。画像間信頼度判定部1601は、参照画像の奥行情報と、基準画像の奥行情報と、基準画像上のテンプレートブロックと、参照画像上のテンプレートブロックを使用して、画像間の奥行情報を比較し、奥行差に応じて画像間の信頼度を判定する。
(Third embodiment)
Next, an image processing apparatus 1600 according to the third embodiment will be described with reference to FIG. In FIG. 16, the same components as those shown in FIG. 1 are denoted by the same reference numerals as those in FIG. The image processing apparatus 1100 according to the present embodiment includes an inter-image reliability determination unit 1601 in addition to the components illustrated in FIG. The inter-image reliability determination unit 1601 uses the depth information of the reference image, the depth information of the base image, the template block on the base image, and the template block on the reference image to compare the depth information between the images. The reliability between images is determined according to the depth difference.

次に、図17を参照して、画像間信頼度判定部1601の構成について説明する。画像間信頼度判定部1601は、画像間奥行評価部16011と、信頼度判定部16012を備える。画像間奥行評価部16011は、参照画像の奥行情報と、基準画像の奥行情報と、基準画像上のテンプレートブロックと、参照画像上のテンプレートブロックを使用して画像間の奥行差を算出する。信頼度判定部16012は、画像間奥行評価部16011によって算出された画像間の奥行差に応じて画像間の信頼度を判定する。   Next, the configuration of the inter-image reliability determination unit 1601 will be described with reference to FIG. The inter-image reliability determination unit 1601 includes an inter-image depth evaluation unit 16011 and a reliability determination unit 16012. The inter-image depth evaluation unit 16011 calculates the depth difference between images using the depth information of the reference image, the depth information of the standard image, the template block on the standard image, and the template block on the reference image. The reliability determination unit 16012 determines the reliability between images according to the depth difference between images calculated by the inter-image depth evaluation unit 16011.

次に、図18に示すフローチャートを参照して、本実施形態に係る動きベクトル検出の処理について説明する。図18において、図5に示した処理と同様の処理については、図5と同符号を付し、その詳細な説明を省略する。ステップS505の後、ステップS1801おいて、画像間信頼度判定部1601は、ステップS502で入力される参照画像の奥行情報と、基準画像の奥行情報と、ステップS504のテンプレートマッチングの結果から、画像間の信頼度を判定する。   Next, a motion vector detection process according to the present embodiment will be described with reference to the flowchart shown in FIG. In FIG. 18, the same processes as those shown in FIG. 5 are denoted by the same reference numerals as those in FIG. After step S505, in step S1801, the inter-image reliability determination unit 1601 determines the inter-image reliability based on the reference image depth information, the base image depth information, and the template matching result in step S504, which are input in step S502. Determine the reliability of.

ここで、図19に示すフローチャートを参照して、画像間信頼度判定について説明する。まず、ステップS1901において、画像間奥行評価部16011は、参照画像の奥行情報と、基準画像の奥行情報と、ステップS504の処理の結果から、基準画像上と参照画像上のテンプレートブロック内の奥行情報を比較し、奥行差を算出する。   Here, the inter-image reliability determination will be described with reference to the flowchart shown in FIG. First, in step S1901, the inter-image depth evaluation unit 16011 determines the depth information in the template block on the reference image and the reference image from the depth information of the reference image, the depth information of the reference image, and the result of the process in step S504. And the depth difference is calculated.

次に、ステップS1902において、信頼度判定部16012は、ステップS1901で算出された画像間の奥行差に応じて画像間の信頼度を判定する。奥行差と信頼度の関係については、図10を適用し、奥行差が大きくなるほど信頼度が低くする。そして、画像間信頼度判定を終了する。そして、図18に戻って、ステップS1801によって判定した、画像間の信頼度を後段の特徴点信頼度に反映しステップS506で特徴点の信頼度判定を行う。そして、動きベクトルの検出処理を終了する。   Next, in step S1902, the reliability determination unit 16012 determines the reliability between images in accordance with the depth difference between images calculated in step S1901. As for the relationship between the depth difference and the reliability, FIG. 10 is applied, and the reliability decreases as the depth difference increases. Then, the inter-image reliability determination ends. Returning to FIG. 18, the reliability between images determined in step S1801 is reflected in the feature point reliability in the subsequent stage, and the reliability determination of the feature points is performed in step S506. Then, the motion vector detection process ends.

以上、本実施形態によれば、テンプレートマッチングにおいて、奥行情報を使用し特徴点の信頼度評価を行い、信頼度の高い特徴点を抽出することで、動きベクトルを算出することができる画像処理装置を提供することができる。また、本実施形態によれば、各特徴点の信頼度を判定する前に、画像間の信頼度を判定し、各特徴点の信頼度に反映することで第1実施形態よりも、精度高く動きベクトルを検出することができる。   As described above, according to the present embodiment, in template matching, an image processing apparatus capable of calculating a motion vector by performing reliability evaluation of feature points using depth information and extracting feature points with high reliability. Can be provided. In addition, according to the present embodiment, before determining the reliability of each feature point, the reliability between images is determined and reflected in the reliability of each feature point, so that the accuracy is higher than in the first embodiment. A motion vector can be detected.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
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 a 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.

また、本発明の好ましい実施形態について説明したが、本発明は、これらの実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。   Moreover, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

100 画像処理装置
101 画像入力部
102 画像メモリ
103 特徴点抽出部
105 テンプレートマッチング部
106 動きベクトル検出部
107 奥行情報入力部
109 特徴点信頼度判定部
110 画像全体動きベクトル検出部
DESCRIPTION OF SYMBOLS 100 Image processing apparatus 101 Image input part 102 Image memory 103 Feature point extraction part 105 Template matching part 106 Motion vector detection part 107 Depth information input part 109 Feature point reliability determination part 110 Whole image motion vector detection part

Claims (9)

複数の画像間の動きベクトルを検出する画像処理装置であって、
前記画像と、前記画像に対応する奥行情報を入力する入力手段と、
前記入力手段により入力された画像と奥行情報を記憶する記憶手段と、
前記記憶手段に記憶された第1の画像の特徴点を抽出する抽出手段と、
前記抽出手段により抽出した特徴点を含む第1の領域と、前記入力手段により入力される第2の画像の内、前記第1の領域に対応する第2の領域の類似度を判定する類似度判定手段と、
前記類似度判定手段の判定結果から、前記第1の画像と前記第2の画像との間の前記特徴点の動きベクトルを検出する第1の検出手段と、
前記記憶手段に記憶された前記第1の画像に対応する第1の奥行情報と、前記第2の画像に対応する第2の奥行情報に基づいて、前記特徴点の信頼度を判定する信頼度判定手段と、
前記信頼度判定手段による信頼度の判定結果に基づいて、前記第1の画像と前記第2の画像との間の画像全体の動きベクトルを検出する第2の検出手段と
を備える
ことを特徴とする画像処理装置。
An image processing apparatus for detecting a motion vector between a plurality of images,
Input means for inputting the image and depth information corresponding to the image;
Storage means for storing the image and depth information input by the input means;
Extraction means for extracting feature points of the first image stored in the storage means;
Similarity for determining similarity between a first region including the feature point extracted by the extraction unit and a second region corresponding to the first region in the second image input by the input unit A determination means;
First detection means for detecting a motion vector of the feature point between the first image and the second image from the determination result of the similarity determination means;
Reliability for determining reliability of the feature point based on first depth information corresponding to the first image stored in the storage unit and second depth information corresponding to the second image A determination means;
And a second detection unit that detects a motion vector of the entire image between the first image and the second image based on a determination result of the reliability by the reliability determination unit. An image processing apparatus.
前記信頼度判定手段は、前記第1の奥行情報と前記第2の奥行情報から、前記第1の画像の特徴点と前記特徴点に対応する前記第2の画像の特徴点との奥行の差を算出し、前記奥行の差が開くにつれて、前記第1の画像の特徴点の信頼度を低くする
ことを特徴とする請求項1に記載の画像処理装置。
The reliability determination means determines a difference in depth between the feature point of the first image and the feature point of the second image corresponding to the feature point from the first depth information and the second depth information. The image processing apparatus according to claim 1, wherein the reliability of the feature point of the first image is lowered as the depth difference is calculated.
前記信頼度判定手段は、前記第1の奥行情報と前記第2の奥行情報から、前記第1の領域で奥行が変化している場合、前記奥行の差を算出して、信頼度を判定する
ことを特徴とする請求項2に記載の画像処理装置。
The reliability determination unit determines a reliability by calculating a difference between the depths when the depth is changed in the first region from the first depth information and the second depth information. The image processing apparatus according to claim 2.
前記抽出手段は、予め決められた個数の特徴点を抽出する
ことを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the extraction unit extracts a predetermined number of feature points.
前記第1の検出手段により検出された動きベクトルを調整するベクトル調整手段
をさらに備え、
前記ベクトル調整手段は、前記奥行情報から奥行の基準となる基準奥行を設定し、前記設定した基準奥行に基づいて前記動きベクトルを調整する
ことを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。
Vector adjustment means for adjusting the motion vector detected by the first detection means;
5. The vector adjustment unit sets a reference depth serving as a depth reference from the depth information, and adjusts the motion vector based on the set reference depth. 6. An image processing apparatus according to 1.
前記ベクトル調整手段は、前記設定した基準奥行に合わせて前記動きベクトルの向きと大きさを調整する
ことを特徴とする請求項5に記載の画像処理装置。
The image processing apparatus according to claim 5, wherein the vector adjustment unit adjusts a direction and a magnitude of the motion vector according to the set reference depth.
前記信頼度判定手段は、前記第1の奥行情報と前記第2の奥行情報に基づいて、前記第1の画像と前記第2の画像の画像間の信頼度を判定し、
第2の検出手段は、前記特徴点の信頼度と前記画像間の信頼度に基づいて前記画像全体の動きベクトルを検出する
ことを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。
The reliability determination means determines a reliability between the images of the first image and the second image based on the first depth information and the second depth information,
5. The second detection unit detects a motion vector of the entire image based on a reliability of the feature point and a reliability between the images. 6. Image processing device.
複数の画像間の動きベクトルを検出する画像処理方法であって、
前記画像と、前記画像に対応する奥行情報を入力する入力工程と、
前記入力工程において入力された画像と奥行情報を記憶する記憶工程と、
前記記憶工程において記憶された第1の画像の特徴点を抽出する抽出工程と、
前記抽出工程において抽出した特徴点を含む第1の領域と、前記入力工程において入力される第2の画像の内、前記第1の領域に対応する第2の領域の類似度を判定する類似度判定工程と、
前記類似度判定工程における判定結果から、前記第1の画像と前記第2の画像との間の前記特徴点の動きベクトルを検出する第1の検出工程と、
前記記憶工程において記憶された前記第1の画像に対応する第1の奥行情報と、前記第2の画像に対応する第2の奥行情報に基づいて、前記特徴点の信頼度を判定する信頼度判定工程と、
前記信頼度判定工程における信頼度の判定結果に基づいて、前記第1の画像と前記第2の画像との間の画像全体の動きベクトルを検出する第2の検出工程と
を有する
ことを特徴とする画像処理方法。
An image processing method for detecting a motion vector between a plurality of images,
An input step of inputting the image and depth information corresponding to the image;
A storage step of storing the image and depth information input in the input step;
An extraction step of extracting feature points of the first image stored in the storage step;
A degree of similarity for determining a degree of similarity between the first region including the feature point extracted in the extraction step and the second region corresponding to the first region in the second image input in the input step A determination process;
A first detection step of detecting a motion vector of the feature point between the first image and the second image from a determination result in the similarity determination step;
Reliability for determining reliability of the feature points based on first depth information corresponding to the first image stored in the storing step and second depth information corresponding to the second image A determination process;
A second detection step of detecting a motion vector of the entire image between the first image and the second image based on a determination result of the reliability in the reliability determination step. Image processing method.
請求項1〜7のいずれか1項に記載の画像処理装置の各手段としてコンピュータを機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claims 1-7.
JP2015122953A 2015-06-18 2015-06-18 Image processing apparatus, image processing method, and program Active JP6579816B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015122953A JP6579816B2 (en) 2015-06-18 2015-06-18 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015122953A JP6579816B2 (en) 2015-06-18 2015-06-18 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2017011397A JP2017011397A (en) 2017-01-12
JP6579816B2 true JP6579816B2 (en) 2019-09-25

Family

ID=57762522

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015122953A Active JP6579816B2 (en) 2015-06-18 2015-06-18 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6579816B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6865110B2 (en) * 2017-05-31 2021-04-28 Kddi株式会社 Object tracking method and device
CN111597863B (en) * 2019-02-21 2023-11-28 顺丰科技有限公司 Loading and unloading rate determining method, system, equipment and storage medium
WO2020194957A1 (en) * 2019-03-25 2020-10-01 株式会社ソニー・インタラクティブエンタテインメント Image transmission/reception system, image transmission device, image reception device, image transmission/reception method and program

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2600504B2 (en) * 1991-01-25 1997-04-16 日本ビクター株式会社 Motion vector detection circuit
JP3729933B2 (en) * 1996-05-31 2005-12-21 松下電器産業株式会社 Automatic monitoring device
JP3637226B2 (en) * 1999-02-01 2005-04-13 株式会社東芝 Motion detection method, motion detection device, and recording medium
JP2006319578A (en) * 2005-05-11 2006-11-24 Sharp Corp Depth direction movement determining device, blurring correction system having the same, and blurring correction method, program, computer readable record medium recording the program, and electronic apparatus equipped with the blurring correction system
JP4961850B2 (en) * 2006-06-15 2012-06-27 ソニー株式会社 Motion detection method, motion detection method program, recording medium recording motion detection method program, and motion detection apparatus
JP2012019337A (en) * 2010-07-07 2012-01-26 Olympus Corp Image processing device and method, and program
WO2012147247A1 (en) * 2011-04-25 2012-11-01 パナソニック株式会社 Video display device, video display method, and video processing device
JP6147172B2 (en) * 2013-11-20 2017-06-14 キヤノン株式会社 Imaging apparatus, image processing apparatus, image processing method, and program

Also Published As

Publication number Publication date
JP2017011397A (en) 2017-01-12

Similar Documents

Publication Publication Date Title
US10334168B2 (en) Threshold determination in a RANSAC algorithm
KR101333871B1 (en) Method and arrangement for multi-camera calibration
US10311595B2 (en) Image processing device and its control method, imaging apparatus, and storage medium
US9759548B2 (en) Image processing apparatus, projector and projector system including image processing apparatus, image processing method
US8755630B2 (en) Object pose recognition apparatus and object pose recognition method using the same
US9508153B2 (en) Distance measurement apparatus, imaging apparatus, distance measurement method, and program
JP5048542B2 (en) Image processing apparatus and image processing program
CN104396231B (en) Image processing apparatus and image processing method
JP2018151689A (en) Image processing apparatus, control method thereof, program and storage medium
CN111457886A (en) Distance determination method, device and system
KR20210027479A (en) Optical image stabilization movement to create super-resolution images of the scene
JP6579816B2 (en) Image processing apparatus, image processing method, and program
US20220358619A1 (en) Automatic dolly zoom image processing device
JP2017135495A (en) Stereoscopic camera and imaging system
JP6395429B2 (en) Image processing apparatus, control method thereof, and storage medium
JP2019101997A (en) Image processing apparatus and image processing method reducing noise by composing plural captured images
CN106454066B (en) Image processing apparatus and control method thereof
JP2019176261A (en) Image processor
CN108062741B (en) Binocular image processing method, imaging device and electronic equipment
JP6624841B2 (en) Image processing apparatus, image processing method, and program
US10855918B2 (en) Image processing device, image processing method, image pickup apparatus, and program storage medium that calculates a matching degree between an estimated target of interest and tracked feature points, then selects a feature point to which tracking is continued according to the matching degree
JP6843552B2 (en) Image processing equipment, image processing methods and programs.
Egner et al. Accuracy and sensitivity of camera based displacement measurement with optical flow: numerical investigation
JP2019192048A (en) Imaging apparatus
US20230114785A1 (en) Device and method for predicted autofocus on an object

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180612

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190709

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190827

R151 Written notification of patent or utility model registration

Ref document number: 6579816

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151