JP2017027363A - Video processing device, video processing method and program - Google Patents
Video processing device, video processing method and program Download PDFInfo
- Publication number
- JP2017027363A JP2017027363A JP2015145227A JP2015145227A JP2017027363A JP 2017027363 A JP2017027363 A JP 2017027363A JP 2015145227 A JP2015145227 A JP 2015145227A JP 2015145227 A JP2015145227 A JP 2015145227A JP 2017027363 A JP2017027363 A JP 2017027363A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- similarity
- feature point
- tracking
- 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
Links
Images
Landscapes
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、映像処理装置、映像処理方法、及びプログラムに関する。 The present invention relates to a video processing apparatus, a video processing method, and a program.
自動車の自立運転等に用いる技術の一つに、自己位置の推定を行う技術(SLAM:Simultaneously Localization And Mapping)があり、SLAMを用いて正確に自己位置の推定を行う方法が広く検討されている。SLAMでは、カメラ等で撮影された映像データから特徴点を抽出し、かかる特徴点を追跡することにより、自己位置の推定を行う。 One of the technologies used for autonomous driving of automobiles is a technology for estimating self-location (SLAM: Simulatively Localization And Mapping), and a method for accurately estimating self-location using SLAM has been widely studied. . In SLAM, a feature point is extracted from video data photographed by a camera or the like, and the self-position is estimated by tracking the feature point.
特徴点の追跡の手法として、映像のフレーム間の所定の領域の類似度を比較して、特徴点の追跡を行うブロックマッチングが広く知られている。 As a feature point tracking method, block matching for tracking feature points by comparing similarities of predetermined regions between frames of a video is widely known.
ブロックマッチングでは、類似度の比較のときの計算誤差により、特徴点の追跡を誤る場合があった。このため、輝度等の画素の属性を用いて、特徴点の追跡の精度を向上させる様々な方法が提案されている(例えば、特許文献1)。 In block matching, tracking of feature points may be mistaken due to a calculation error in comparison of similarities. For this reason, various methods for improving the accuracy of tracking feature points using pixel attributes such as luminance have been proposed (for example, Patent Document 1).
しかし、提案されている方法を用いても、追跡された特徴点の周辺に類似する画素が分布している場合には、特徴点を正確に追跡できないという課題があった。 However, even if the proposed method is used, if similar pixels are distributed around the tracked feature point, there is a problem that the feature point cannot be accurately tracked.
本発明は、上記の課題を鑑みてされたものであって、映像のフレームの特徴点の追跡の精度を向上させることを目的とする。 The present invention has been made in view of the above-described problems, and an object of the present invention is to improve the accuracy of tracking feature points of video frames.
本実施形態に係る映像処理装置は、第1の映像のフレームから特徴点を抽出する抽出部と、前記第1の映像のフレームより時間的に後の映像のフレームである第2の映像のフレームの所定の領域に対して、前記第1の映像のフレームの一部であって、前記特徴点を含むブロックとのブロックマッチング処理を行うことにより、前記特徴点に対応する追跡点を特定する追跡部と、前記所定の領域において、前記特徴点に最も類似する第1の画素の位置、該第1の画素と前記特徴点との類似度、前記特徴点に2番目に類似する第2の画素の位置、及び該第2の画素と前記特徴点との類似度を検出する検出部と、前記追跡点の位置と前記第1の画素の位置とが一致し、かつ前記第1の画素の類似度と前記第2の画素の類似度との差が第1の閾値以上である場合、第1の条件を満たすと判定する第1の判定部と、前記追跡点と前記特徴点との類似度と、前記追跡点の複数の周辺の画素の各々と前記特徴点との類似度とを算出し、算出された前記追跡点の類似度と、前記複数の周辺の画素の各々の類似度との差が、第2の閾値以上である場合、第2の条件を満たすと判定する第2の判定部と、を有し、前記第1の条件、及び前記第2の条件を満たす場合、前記追跡部は、前記特徴点が前記追跡点に対応すると判断する。 The video processing apparatus according to the present embodiment includes an extraction unit that extracts a feature point from a first video frame, and a second video frame that is a video frame temporally later than the first video frame. Tracking for identifying a tracking point corresponding to the feature point by performing block matching processing with a block that is a part of the frame of the first video and includes the feature point for a predetermined region of And the position of the first pixel most similar to the feature point in the predetermined area, the similarity between the first pixel and the feature point, and the second pixel second closest to the feature point And the detection unit for detecting the similarity between the second pixel and the feature point, the tracking point position matches the first pixel position, and the first pixel similarity And the difference between the degree of similarity and the second pixel similarity is greater than or equal to a first threshold value In some cases, a first determination unit that determines that the first condition is satisfied, a similarity between the tracking point and the feature point, and a similarity between each of a plurality of surrounding pixels of the tracking point and the feature point When the difference between the calculated similarity of the tracking points and the similarity of each of the plurality of surrounding pixels is equal to or greater than a second threshold, it is determined that the second condition is satisfied. When the first condition and the second condition are satisfied, the tracking unit determines that the feature point corresponds to the tracking point.
本実施形態によれば、映像のフレームの特徴点の追跡の精度が向上された映像処理装置、映像処理方法、及びプログラムを提供することが可能となる。 According to the present embodiment, it is possible to provide a video processing apparatus, a video processing method, and a program with improved accuracy of tracking feature points of video frames.
[第1実施形態]
<機能構成>
(1)全体構成
図1を用いて、本実施形態に係る映像処理装置1の機能構成について説明する。映像処理装置1は、撮影部100と、映像入力部110と、映像補正部120と、特徴点抽出部130と、追跡部140と、フレームバッファ150と、重複点除去部160とを有する。
[First Embodiment]
<Functional configuration>
(1) Overall Configuration The functional configuration of the
撮影部100は、カメラで映像を撮影する。撮影された映像を映像入力部110に出力する。カメラは単眼カメラ、ステレオカメラのいずれでもよい。撮影部100のカメラは、自動車に取り付ける車載カメラでもよい。
The photographing
映像入力部110は、撮影部100によって撮影された映像の入力を受け付ける。また、映像入力部110は、撮影部100以外から映像の入力を受け付けてもよい。例えば、映像入力部110は、記憶媒体に記憶された映像の入力を受け付けてもよいし、ネットワーク経由で映像の入力を受け付けてもよい。
The
映像補正部120は、映像入力部110から映像フレームを取得し、かかる映像フレームのひずみを補正する。
The
特徴点抽出部130は、映像フレームの特徴点を抽出する。特徴点とは、例えば、物体の角など、際立って検出できる映像フレーム上の点である。
The feature
フレームバッファ150は、映像補正部120から取得した映像フレームを保存する。フレームバッファ150は、追跡部140に、映像フレームを送信する。
The
追跡部140は、特徴点抽出部130で抽出された特徴点を追跡する。具体的には、追跡部140は、特徴点が抽出された映像フレームより時間的に後の映像フレームから、かかる特徴点に対応する追跡点を抽出する。追跡部140は、映像補正部120から映像フレームを取得する。
The
追跡部140は、特徴点抽出部130から、かかる映像フレームにおいて抽出された特徴点に関する情報を取得する。特徴点に関する情報とは、例えば、特徴点における輝度、及び特徴点の映像フレーム内の位置を示す座標情報等である。追跡部140は、フレームバッファ150から特徴点が抽出された映像フレームより時間的に前の映像フレームを取得する。追跡部140は、取得した映像フレーム、及び特徴点に関する情報から、特徴点を追跡する。
The
追跡部140が、時間Mにおける映像フレームF(M)で抽出された特徴点を追跡する場合について説明する。
A case where the
追跡部140は、時間Mにおける映像フレームF(M)における特徴点に関する情報を特徴点抽出部130から取得する。追跡部140は、時間M+1における映像フレームF(M+1)を映像補正部120から取得する。追跡部140は、フレームバッファ150より、映像フレームF(M)を取得する。
The
追跡部140は、映像フレームF(M)と、かかる映像フレームにおける特徴点に関する情報とから、映像フレームF(M+1)における特徴点に対応する追跡点を抽出する。
The
重複点除去部160は、特徴点抽出部130で抽出された映像フレームF(M+1)の特徴点と、追跡部140で抽出された映像フレームF(M+1)の追跡点とが重複する場合に、一方を除去する。
When the feature point of the video frame F (M + 1) extracted by the feature
(2)追跡部の構成
図2を用いて、追跡部140、及び追跡部140と関連する機能部について詳細に説明する。
(2) Configuration of Tracking Unit The
追跡部140は、ブロックマッチング部141と、極値検出部142と、単一性判定部143と、曲面形状判定部145とを有する。
The
特徴点抽出部130は、第1の映像のフレームから特徴点を抽出する。
The feature
ブロックマッチング部141は、かかる第1の映像のフレームより時間的に後の映像のフレームである第2の映像のフレームの所定の領域に対してブロックマッチング処理を行い、特徴点に対応する追跡点を特定する。なお、ブロックマッチング処理を実行する場合、ブロックマッチング部141は、第1の映像のフレームの一部であって特徴点を含むブロックを用いる。
The block matching
極値検出部142は、第2の映像のフレームの所定の領域において、特徴点に最も類似する第1の画素の位置、第1の画素と特徴点との類似度、特徴点に2番目に類似する第2の画素の位置、及び第2の画素と特徴点との類似度を検出する。
The extreme
なお、以下の記述において類似度とは、特徴点に対する類似度を意味する。従って、例えば「画素Aの類似度」とは、「特徴点と画素Aとの類似度」を意味する。 In the following description, the similarity means the similarity to the feature point. Therefore, for example, “similarity of pixel A” means “similarity between feature points and pixel A”.
なお、極値検出部142は、第1の画素と、第2の画素とを検出するときに、画素自体の特徴点との類似度に加えて、かかる画素と特徴点との類似度と、隣接する画素と特徴点との類似度の差を考慮して第1の画素と第2の画素とを検出してもよい。
The extreme
単一性判定部143は、追跡点の位置と第1の画素の位置とが一致し、かつ第1の画素の類似度と第2の画素の類似度との差が第1の閾値以上である場合、第1の条件を満たすと判定する。
The
曲面形状判定部145は、追跡点と特徴点との類似度と、追跡点の周辺の複数の画素の各々と特徴点との類似度とを算出し、算出された追跡点の類似度と、周辺の複数の画素の各々の類似度との差が、第2の閾値以上である場合、第2の条件を満たすと判定する。
The curved surface
追跡部140は、第1の条件、及び第2の条件を満たす場合、第1の映像のフレームの特徴点が、第2の映像のフレームにおいて追跡点に対応すると判断する。この場合、追跡部140は、第1の映像のフレームの特徴点が、第2の映像のフレームにおいて追跡点に移動したと判断してもよい。
When the first condition and the second condition are satisfied, the
ブロックマッチング処理に加えて、第1の条件、及び第2の条件を満たす場合に、特徴点が追跡点に対応すると判断されるため、映像処理装置1は、追跡点を正確に特定することができる。
In addition to the block matching process, when the first condition and the second condition are satisfied, it is determined that the feature point corresponds to the tracking point. Therefore, the
なお、ブロックマッチング部141は追跡部の一例である。極値検出部142は、検出部の一例である。単一性判定部143は、第1の判定部の一例である。曲面形状判定部145は、第2の判定部の一例である。
The
第1の画素と、第2の画素とを検出する場合、極値検出部142は、第2の映像のフレームの所定の領域において、特徴点と類似する複数の類似画素を検出してもよい。かかる複数の類似画素は隣接する画素より特徴点と類似する。これらの類似画素は極値を有する画素と表現されてもよい。例えば、隣接する8画素よりも特徴点と類似する画素が、極値を有する画素であってもよい。極値検出部142は、極値を有する画素の中から第1の画素と第2の画素とを検出してもよい。この場合、特徴点に最も類似する極値を有する画素が第1の画素、特徴点に2番目に類似する極値を有する画素が第2の画素となる。
When detecting the first pixel and the second pixel, the extreme
映像フレームが白黒の映像の場合、特徴点との類似度は、特徴点における輝度と、類似度の算出対象となる画素の輝度との差で表されてもよい。かかる差が小さい画素ほど、特徴点と類似している。 When the video frame is a black and white video, the similarity to the feature point may be represented by the difference between the luminance at the feature point and the luminance of the pixel whose similarity is to be calculated. Pixels with such smaller differences are more similar to feature points.
映像フレームがカラーの映像の場合、特徴点との類似度は、特徴点における各色の輝度の合計値と、類似度の算出対象となる画素の輝度の合計値との差で表されてもよい。かかる合計値との差が小さい画素ほど、特徴点と類似している。 When the video frame is a color video, the similarity with the feature point may be represented by the difference between the total luminance value of each color at the feature point and the total luminance value of the pixels for which similarity is calculated. . Pixels with a smaller difference from the total value are more similar to feature points.
ブロックマッチング部141は、画素よりも細かい単位である副画素の精度で、ブロックマッチング処理を行い、追跡点を特定してもよい。また、極値検出部142は、副画素の精度で、第1の画素と、第2の画素とを検出してもよい。
The
追跡点が副画素の精度で特定されるため、特徴点に対応する追跡点を正確に特定することができる。 Since the tracking point is specified with the accuracy of the sub-pixel, the tracking point corresponding to the feature point can be accurately specified.
なお、画素はピクセル、副画素はサブピクセルと表現されてもよい。 The pixel may be expressed as a pixel, and the sub-pixel may be expressed as a sub-pixel.
極値検出部142は、隣接する画素の間に存在する副画素と特徴点との類似度を、隣接する画素の周辺の画素の各々と特徴点との類似度から補間してもよい。
The extreme
例えば、極値検出部142は、所定の領域の画素と第1の映像のフレームの所定領域に対応する領域の画素との類似度の変化に基づいて副画素の座標を算出し、かかる座標の副画素と特徴点との類似度を補間してもよい。変化の傾向から副画素の座標を算出する場合、極値検出部142は、勾配法を用いて、かかる座標を算出してもよい。なお、「第1の映像のフレームの所定領域に対応する領域の画素」とは、所定の領域の画素と第1の映像のフレームの中で同一の位置にある画素である。
For example, the extreme
具体的な、補間の手順については後述する。 A specific interpolation procedure will be described later.
曲面形状判定部145は、追跡点と特徴点との類似度と、周辺の画素と特徴点との類似度とから2次曲面の類似度の分布を形成し、形成された2次曲面の類似度の分布から第2の条件を満たすかを判定してもよい。
The curved surface
例えば、曲面形状判定部145は、2次曲面が平坦に近い形状の場合、つまり特徴点と類似している点が周辺の画素と比較して際立っていない場合、第2の条件を満たさないと判断してもよい。これにより、追跡点の誤検出を避けることができる。
For example, the curved surface
2次曲面の分布を表す方程式の2次の係数の少なくとも1つが、第3の閾値以上の場合、曲面形状判定部145は、第2の条件を満たすと判定してもよい。かかる2次の係数が大きい程、曲面が際立っており、追跡点が特徴点に対応する可能性が高いためである。
When at least one of the quadratic coefficients of the equation representing the distribution of the quadratic curved surface is equal to or greater than the third threshold value, the curved surface
極値検出部142は、極値を有する画素を、特徴点と類似する順に並べ、特徴点とN番目に類似する極値を有する画素と、特徴点とN+1番目に類似する極値を有する画素との特徴点との類似度の差を算出する。ここでNは2以上の自然数であり、N+1の最大値は第2の映像のフレームの所定の領域に含まれる極値を有する画素の数である。
The extreme
単一性判定部143は、第1の画素の類似度と第2の画素の類似度との差が、第1の閾値以上でない場合であっても、第1の条件を満たすと判定してもよい場合がある。
The
例えば、第1の画素の類似度と第2の画素の類似度との差が、第2の映像のフレームの所定の領域に含まれる特徴点とN番目に類似する極値を有する画素と特徴点とN+1番目に類似する極値を有する画素との間の類似度の差より大きい場合、第1の条件を満たすと判定してもよい。 For example, the difference between the similarity of the first pixel and the similarity of the second pixel is a pixel and a feature having an extreme value similar to the feature point included in a predetermined region of the frame of the second video. If the difference between the points and the pixel having the N + 1th most similar extreme value is greater than the similarity difference, it may be determined that the first condition is satisfied.
第1の画素が特徴点と最も類似しかつ、第1の画素と第2の画素との類似度の差が、特徴点とN番目に類似する極値を有する画素と特徴点とN+1番目に類似する極値を有する画素との類似度の差よりも大きいため、他の画素よりも特徴点と際立って類似していると判断できるためである。 The first pixel is the most similar to the feature point, and the difference in similarity between the first pixel and the second pixel is the N + 1th extreme point similar to the feature point, the feature point, and the N + 1th feature point. This is because the difference in degree of similarity with a pixel having a similar extreme value is larger, so that it can be determined that the feature point is remarkably similar to other pixels.
第1の条件を満たさない場合、映像処理装置1は、第2の映像フレームの所定の領域を拡大した領域において、ブロックマッチング処理と、第1の条件を満たすかの判定を実行してもよい。
When the first condition is not satisfied, the
なお、「第2の映像フレームの所定の領域」は、第1の探索ウィンドウと呼ばれてもよい。 The “predetermined area of the second video frame” may be referred to as a first search window.
<動作手順>
図3を用いて、本実施形態の動作手順の一例について説明する。
<Operation procedure>
An example of the operation procedure of this embodiment will be described with reference to FIG.
特徴点に対応する追跡点を特定する場合、映像処理装置1は、ブロックマッチング処理、第1の判定の処理、第2の判定の処理の順番で処理を実行する。
When specifying a tracking point corresponding to a feature point, the
ステップS300で、ブロックマッチング部141は、ブロックマッチング処理を実行する。ブロックマッチング部141は、第1の映像フレームで抽出された特徴点を中心とした任意のサイズの画像を第1の映像フレームから抜き出す。抜き出された画像は、テンプレートパッチと呼ばれてもよい。次に、ブロックマッチング部141は、テンプレートパッチを、第2の映像フレームの第1の探索ウィンドウ内で移動させる。
In step S300, the
ブロックマッチング部141は、テンプレートパッチを第1の探索ウィンドウ内で移動させ、テンプレートパッチと、テンプレートパッチと重複する部分との類似度を計算し、最も類似する位置におけるテンプレートパッチの中心を追跡点とする。具体的な計算方法については後述する。
The
ブロックマッチング処理が成功した場合(ステップS301 YES)、ステップS302に進む。一方、ブロックマッチング処理が成功しなかった場合(ステップS301 NO)、ステップS308に進む。 If the block matching process is successful (step S301 YES), the process proceeds to step S302. On the other hand, if the block matching process is not successful (NO in step S301), the process proceeds to step S308.
ステップS302乃至ステップS304は、第1の条件の判定の処理の動作手順である。 Steps S <b> 302 to S <b> 304 are an operation procedure of a first condition determination process.
ステップS302で、極値検出部142は、単一性比較値の計算処理を行う。具体的には、極値検出部142は、探索ウィンドウ内の画素と特徴点との類似度を算出する。類似度は、例えば特徴点と探索ウィンドウ内の画素との輝度の差でもよい。この場合、類似度が小さい程、画素は特徴点と類似している。
In step S302, the extreme
極値検出部142は、周辺の画素よりも類似度が小さい画素を抽出し、極値とする。例えば、極値検出部142は、任意の画素と、かかる任意の画素の周辺の8画素とを比較して、極値を抽出してもよい。
The extreme
探索ウィンドウ内で、最も小さい極値を有する画素が第1の画素であり、2番目に小さい極値を有する画素が第2の画素である。 In the search window, the pixel having the smallest extreme value is the first pixel, and the pixel having the second smallest extreme value is the second pixel.
ステップS303で、極値検出部142は、第1の画素の類似度と第2の画素の類似度とを比較し、類似度の差が、第1の閾値以上か比較する。第1の閾値は、映像処理装置1のユーザが設定可能な値である。例えば、第1の閾値に第1の画素の類似度の10%、20%といった値が設定されてもよい。
In step S303, the extreme
ステップS304で、類似度の差が第1の閾値以上であり、かつ第1の画素の位置がブロックマッチングで抽出した追跡点と一致する場合、単一性判定部143は、単一性判定が成功したと判定し、ステップS305に進む(ステップS304 YES)。「単一性判定が成功したこと」は、「第1の条件を満たす」と表現されてもよい。
In step S304, when the difference in similarity is equal to or greater than the first threshold and the position of the first pixel matches the tracking point extracted by block matching, the
一方、類似度の差が第1の閾値以上でない、又は第1の画素の位置が追跡点と一致しない場合、単一性判定部143は、単一性判定が失敗したと判定し、ステップS308に進む(ステップS308 NO)。
On the other hand, if the difference in similarity is not greater than or equal to the first threshold value, or the position of the first pixel does not match the tracking point, the
ステップS305乃至ステップS307は、第2の条件の判定の処理の動作手順である。 Steps S <b> 305 to S <b> 307 are operation procedures for determining the second condition.
ステップS305で、曲面形状判定部145は、追跡点と特徴点との類似度と、追跡点の周辺の画素と特徴点との類似度とを算出し、算出された追跡点の類似度と、周辺の画素の類似度とから2次曲面の分布を形成する。
In step S305, the curved surface
ステップS306で、曲面形状判定部145は、形状が際立っているか判定する。例えば、2次曲面の分布を表す方程式の2次の係数の少なくとも1つ以上が、第3の閾値以上の場合、曲面形状判定部145は、形状が際立っていると判定する。
In step S306, the curved surface
2次の係数が大きい場合には、曲面の形状が平坦ではなく、形状が際立っているためである。2次の係数は周辺の画素の類似度と、追跡点の類似度との差を表している。第3の閾値は、映像処理装置1のユーザが設定可能な値であり、0.1、0.2といった値が設定される。
This is because when the secondary coefficient is large, the shape of the curved surface is not flat and the shape stands out. The secondary coefficient represents the difference between the similarity of the surrounding pixels and the similarity of the tracking points. The third threshold is a value that can be set by the user of the
ステップS306で、曲面形状判定部145が、形状が際立っていると判定した場合、つまり、第2の条件を満たすと判定した場合、ステップS307に進む。一方、曲面形状判定部145が、形状が際立っていないと判定した場合、つまり第2の条件を満たさないと判定した場合、ステップS308に進む。
If the curved surface
ステップS307に進んだ場合、追跡部140は、追跡が成功したと判定する。一方、ステップS308に進んだ場合、追跡部140は、追跡が失敗したと判定する。
When the process proceeds to step S307, the
なお、映像処理装置1は、ステップS302及びステップS303を実行し、第1の画素と、第2の画素とを抽出した後に、ステップS300及びステップS301のブロックマッチングの処理を実行してもよい。
Note that the
<ブロックマッチング処理>
図4乃至図6を用いて、ブロックマッチング処理について説明する。
<Block matching process>
The block matching process will be described with reference to FIGS.
図4及び図5は、ブロックマッチングの処理の概要を示す図である。図4の(1)に示すように、ブロックマッチング部141は、n枚目の映像のフレーム410から特徴点400を抽出する。ブロックマッチング部141は、n枚目の映像のフレーム410から特徴点400を中心にN(画素)×N(画素)のサイズの領域を抜き出しテンプレートパッチ430を生成する。
4 and 5 are diagrams showing an outline of block matching processing. As shown in (1) of FIG. 4, the
図4の(2)に示すように、ブロックマッチング部141は、n枚目以降の映像のフレーム420の中のH(画素)×W(画素)のサイズの領域を抜き出し第2の探索ウィンドウ440を生成する。
As shown in (2) of FIG. 4, the
ここで、テンプレートパッチ430のサイズ、及び第2の探索ウィンドウ440のサイズは映像処理装置1のユーザが設定可能な値である。
Here, the size of the
図5の(1)に示すように、ブロックマッチング部141は、テンプレートパッチ430の中心を第2の探索ウィンドウ440内で移動させる。つまり、ブロックマッチング部141は、n枚目以降の映像のフレーム420の中の(H+N)(画素)×(W+N)(画素)のサイズの領域を抜き出し、かかる領域内にテンプレートパッチ430を移動させる。この領域は、第1の探索ウィンドウ450と表現されてもよい。
As shown in (1) of FIG. 5, the
ブロックマッチング部141は、テンプレートパッチ430を、第1の探索ウィンドウ450内で移動させ、テンプレートパッチ430との重複部分と、テンプレートパッチ430との類似度を算出する。
The
例えば、図5の(1)に示すように、ブロックマッチング部141は、テンプレートパッチ430を、第1の探索ウィンドウ450内で水平方向に移動させてもよい。ブロックマッチング部141は、テンプレートパッチ430を1画素ずつ、縦、又は横に移動させつつ、テンプレートパッチ430と重複部分との類似度を算出する。ブロックマッチング部141は、1画素よりも細かい単位である副画素単位で、テンプレートパッチ430を縦、又は横に移動させて類似度を算出してもよい。
For example, as shown in (1) of FIG. 5, the
図6の(式1)に類似度の算出例を示す。テンプレートパッチ430内の画素の輝度値の合計値と、重複部分の輝度値の合計値との差ESADが、最も小さくなる場合、又は所定の閾値よりも小さくなる場合に、ブロックマッチング部141は、かかる重複部分の中心が特徴点に対応する追跡点であると判断する。
FIG. 6 (Formula 1) shows an example of calculating the similarity. When the difference ESAD between the total value of the luminance values of the pixels in the
図5の(2)の例では、テンプレートパッチ430の中心がVn(X、Y)に移動した場合に算出されるESADから、ブロックマッチング部141は、Vn(X、Y)が追跡点560であると判断する。
In the example of (2) of FIG. 5, the
ブロックマッチング部141は、n枚目のフレームの特徴点400が、n枚目以降の映像のフレーム420で追跡点560に移動したと判断してもよい。また、ブロックマッチング部141は、特徴点が移動の軌跡570に沿って移動したと判断してもよい。ブロックマッチング部141は、n枚目以降の映像のフレームに繰り返しブロックマッチングの処理を行い、特徴点の移動の軌跡を算出してもよい。特徴点の移動の軌跡は、オプティカルフローと呼ばれてもよい。
The
上述した実施形態では、テンプレートパッチ430の輝度値の合計値と、重複部分の輝度値の合計値との絶対値の差(Sum of Absolute Difference)であるESADを用いる場合について説明した。ブロックマッチング部141は、その他の方法を用いてブロックマッチングの処理を実行してもよい。例えば、ブロックマッチング部141は、テンプレートパッチ430と重複部分の輝度値の差の二乗和を算出するSSD(Sum of Squared Differences)を用いてもよいし、テンプレートパッチ430と重複部分の輝度値の相互相関を算出するNCC(Normalized Cross Correlation)を用いてもよい。
In the above-described embodiment, a case has been described in which ESAD , which is the difference between the sum of the brightness values of the
映像のフレームがカラーの場合、ブロックマッチング部141は、各色の輝度を合計した値を用いて、テンプレートパッチと重複部分との類似度を判断してもよい。
When the video frame is color, the
<第1の条件の判定>
図7乃至図15を用いて第1の条件の判定の動作について説明する。
<Determination of the first condition>
The operation for determining the first condition will be described with reference to FIGS.
(1)極値の検出方法(その1)
図7と図8を用いて極値を検出する手順について説明する。
(1) Extreme value detection method (1)
A procedure for detecting an extreme value will be described with reference to FIGS.
極値検出部142は、第1の探索ウィンドウ内の各画素と特徴点との類似度を算出する。例えば、極値検出部142は、第1の探索ウィンドウ内の各画素と特徴点との輝度の差を算出する。図7の(1)に各画素と特徴点との類似度の分布のグラフの一例を示す。類似度の値が小さい画素ほど、特徴点と類似している。
The extreme
次に、極値検出部142は、算出された特徴点との類似度を用いて極値を有する画素を抽出する。極値を有する画素は、隣接する画素より特徴点と類似している画素である。例えば、図7の(2)において、位置(Xi,Yi)の画素と特徴点との類似度R(Xi,Yi)が、周辺の8画素よりも特徴点と類似している場合、極値検出部142は、位置(Xi,Yi)の画素を極値を有する画素、R(Xi,Yi)をかかる画素の極値と判断する。具体的には、極値検出部142は、図8の(式2)を満たす場合、位置(Xi,Yi)の画素を極値を有する画素と判断する。
Next, the extreme
極値検出部142は、抽出された極値を有する画素のうち、特徴点と最も類似する極値を有する画素を第1の画素とし、特徴点と2番目に類似する極値を有する画素を第2の画素とする。
The extreme
図7の(3)に極値となる画素と特徴点との類似度の分布の一例を示す。類似度の値が小さいほど特徴点と類似していることを表している。極値検出部142は、類似度の値が最も小さい極値を有する画素720と、類似度の値が2番目に小さい極値を有する画素730とを検出する。極値検出部142は、画素720を第1の画素とし、画素730を第2の画素とする。
FIG. 7 (3) shows an example of the distribution of similarity between the extreme value pixels and the feature points. The smaller the similarity value, the more similar to the feature point. The extreme
単一性判定部143は、第1の画素の位置が、ブロックマッチングの処理で特定された追跡点の位置と同じであり、かつ、第1の画素と特徴点との類似度と第2の画素と特徴点との類似度の差が第1の閾値以上の場合、第1の条件を満たすと判断する。
The
第1の画素と特徴点との類似度と、第2の画素と特徴点との類似度が十分に離れていない場合には、単一性判定部143は、追跡点を誤って抽出する可能性が高い。例えば、探索ウィンドウ内の画像に、縞模様のような、類似する特徴が繰り返し出現する場合、単一性判定部143は、特徴点に対応する追跡点を誤って抽出する可能性が高い。
When the similarity between the first pixel and the feature point and the similarity between the second pixel and the feature point are not sufficiently separated, the
単一性判定部143は、第1の画素と特徴点との類似度と、第2の画素と特徴点との類似度の差が第1の閾値以上の場合にのみ第1の画素を追跡点の候補とする。このため、単一性判定部143は、適切な追跡点の候補を抽出することができる。
The
(2)副画素における極値の検出方法
図9を用いて副画素における極値の検出方法について説明する。上述した極値の検出方法においては、画素単位の精度で極値を算出したが、極値検出部142は、画素より細かい精度である副画素単位で極値の検出を行ってもよい。
(2) Method for detecting extreme values in subpixels A method for detecting extreme values in subpixels will be described with reference to FIG. In the above-described extremum detection method, the extremum is calculated with accuracy in units of pixels. However, the
上述した検出方法では、単一性判定部143は、中心の画素(Xi,Yi)と特徴点との類似度と、周辺の8画素と特徴点との類似度とを比較し、極値を検出している。かかる検出方法では、中心の画素と特徴点との類似度と、略同じ特徴点との類似度を有する画素が周辺8点内の画素に存在した場合、図8の(式2)を満たさない。
In the detection method described above, the
図8の(式2)を満たさないときには、画像に特徴がなく追跡点になり得ない場合と、画素の間に極値が存在する場合とがある。図9は、画素の間に極値が存在する場合の一例を示している。図9は、隣接する画素である(Xi,Yi)と(Xi+1,Yi)における特徴点との類似度R(Xi,Yi)とR(Xi+1,Yi)とが略同じ場合に、副画素(a,b)900において、極値が存在する例を示している。 When (Equation 2) in FIG. 8 is not satisfied, there are a case where the image has no feature and cannot be a tracking point, and an extreme value exists between pixels. FIG. 9 shows an example in the case where extreme values exist between pixels. FIG. 9 shows the similarity R (X i , Y i ) and R (X i + 1 , Y i ) between feature points in adjacent pixels (X i , Y i ) and (X i + 1 , Y i ). In the case where the subpixels (a, b) 900 are substantially the same, an example in which extreme values exist is shown.
極値検出部142は、画素の精度よりも正確に極値を検出するため、副画素の精度で極値の検出を実行してもよい。
The extreme
副画素の精度で極値の検出を実行する場合、極値検出部142は、中心の画素及び、周辺の画素と特徴点との類似度を補間することにより副画素の精度で極値を検出する。
When detecting the extreme value with the accuracy of the sub-pixel, the extreme
図9の(3)を用いて、副画素(a,b)900における極値を検出する例について説明する。ここでは、各画素と特徴点との輝度の差L(以下、輝度の類似度L)から、副画素(a,b)900と特徴点との輝度の類似度Lを補間する例について説明するが、輝度以外の類似度を用いてもよいことは勿論である。 An example of detecting an extreme value in the subpixel (a, b) 900 will be described with reference to (3) of FIG. Here, an example in which the luminance similarity L between the sub-pixel (a, b) 900 and the feature point is interpolated from the luminance difference L between the pixels and the feature point (hereinafter, luminance similarity L) will be described. However, it is needless to say that similarity other than luminance may be used.
図9の(3)では、画素間の距離はβ(例えば、(Xi,Yi)〜(Xi,Yi−1))であり、補間対象の副画素(a,b)900の中心の画素(Xi,Yi)からの距離がαである場合を示している。 In (3) of FIG. 9, the distance between the pixels is β (for example, (X i , Y i ) to (X i , Y i-1 )), and the interpolation target sub-pixel (a, b) 900 The case where the distance from the center pixel (X i , Y i ) is α is shown.
副画素(a,b)900における輝度の類似度L(a,b)は図10の(式3)から算出される。副画素(a,b)900の周辺の画素における輝度の類似度Lを、副画素(a,b)900と各画素との距離により重み付けすることにより、副画素(a,b)900における輝度の類似度が算出される。 The luminance similarity L (a, b) in the sub-pixel (a, b) 900 is calculated from (Equation 3) in FIG. The luminance similarity L in pixels around the sub-pixel (a, b) 900 is weighted by the distance between the sub-pixel (a, b) 900 and each pixel, whereby the luminance in the sub-pixel (a, b) 900 is determined. The similarity is calculated.
(3)勾配法による極値の算出方法
副画素の精度で極値の検出を実行する場合、極値検出部142は、勾配法を用いて極値を有する副画素の位置を特定してもよい。
(3) Extreme Value Calculation Method Using the Gradient Method When performing extreme value detection with subpixel accuracy, the extreme
ここでは、KLT(Kanade−Lucas Tomasi)法を用いて副画素の位置を特定する方法について、図11及び図12を用いて説明する。 Here, a method for specifying the position of a sub-pixel using the KLT (Kanade-Lucas Tomasi) method will be described with reference to FIGS.
図11は、N枚目の映像のフレーム1100の画像Iと、N+1枚目の映像のフレーム1110の画像J、画像J上の第1の探索ウィンドウ1120、画像I上の第1の探索ウィンドウ1130、画像I上の輝度値I(x,y)1140、画像J上の輝度値J(x,y)1150を表している。
FIG. 11 shows image I of
画像Iと画像Jの各画素の輝度値から、画像J上の副画素の座標を特定する方法について説明する。 A method for specifying the coordinates of the sub-pixel on the image J from the luminance value of each pixel of the image I and the image J will be described.
極値検出部142は、図12の(式4)を用いて画像Iと画像Jの対応する画素における輝度値の差(δIk)を算出する。
The extreme
極値検出部142は、図12の(式5)を用いて、画像Jの第1の探索ウィンドウ1120内の各画素における「輝度値の差(δIk)に画像I、Jの各画素を微分した値を乗算した値」であるbkを求める。ここで、位置(x,y)で画像Iの各画素を微分した値は、Ix(x,y)で表され、位置(x,y)で画像Jの各画素を微分した値は、Iy(x,y)で表される。
The extreme
また、極値検出部142は、図12の(式6)を用いて、第1の探索ウィンドウ1120内の各画素におけるx方向の微分値(Ix)とy方向の微分値(Iy)とを乗算して算出される2行2列の行列Gを算出する。
Also, the
極値検出部142は、図12の(式7)を用いてbkとGの逆行列とから、(x,y)方向の移動量ηkを算出する。
The extreme
極値検出部142は、図12の(式8)を用いて、副画素の座標を算出する。(式8)は、極値を有する画素の位置からの距離を表しており、νkの初期値は0である。また、kは計算回数を表す。
The extreme
極値検出部142は、所定の回数νkの算出を繰り返してもよい。例えば、極値検出部142は、νkの算出を20回程度、繰り返してもよい。或いは、極値検出部142は、移動量ηkが所定の閾値以下になるまでνkの算出を繰り返してもよい。例えば、極値検出部142は、ηkが0.03副画素以下になるまで、νkの算出を繰り返してもよい。
極値検出部142は、算出された位置の副画素と特徴点との類似度を算出する。例えば、極値検出部142は、図10の(式3)を用いてかかる位置の副画素と特徴点との輝度の差を算出してもよい。
The extreme
The extreme
極値検出部142は、算出された位置の副画素と特徴点との類似度と、画素単位で算出された周辺の極値の候補の画素と特徴点との類似度とを比較し、特徴点により類似する方を極値を有する画素とする。
The extreme
なお、KLT法により副画素の座標を算出する方法について説明したが、その他の方法を用いて副画素の座標を算出してもよい。また、極値検出部142が、副画素の座標を算出する範囲は第1の探索ウィンドウ内に限らなくてよい。
In addition, although the method of calculating the subpixel coordinates by the KLT method has been described, the subpixel coordinates may be calculated using other methods. In addition, the range in which the extreme
N+1枚目の映像のフレームにおける副画素の座標を算出する方法について説明したが、N+1枚目以降の映像のフレームにおける副画素の座標の算出にも上述した算出方法を適用できる。 Although the method for calculating the coordinates of the subpixels in the frame of the (N + 1) th image has been described, the above-described calculation method can also be applied to the calculation of the coordinates of the subpixels in the frames of the N + 1th and subsequent images.
(4)極値の検出方法(その2)
上述した極値の検出方法においては、第1の画素と特徴点との類似度と、第2の画素と特徴点との類似度の差が第1の閾値以上でない場合、単一性判定部143は、第1の条件を満たさないと判定した。しかし、かかる類似度の差が第1の閾値以上でない場合でも、その他の極値を有する画素と特徴点との類似度によっては、第1の画素が追跡点である可能性がある。このような場合、単一性判定部143は、第1の画素を追跡点の候補とする方が好ましい。かかる場合における極値の検出の動作手順について、図13及び図14を用いて説明する。
(4) Extreme value detection method (2)
In the extreme value detection method described above, if the difference between the similarity between the first pixel and the feature point and the similarity between the second pixel and the feature point are not equal to or greater than the first threshold, the
上述したように、単一性判定部143は、第1の画素と特徴点との類似度と、第2の画素と特徴点との類似度の差が第1の閾値以上の場合、第1の条件を満たすと判定する。
As described above, the
図13の(1)は、第1の探索ウィンドウ内の画素の各々と特徴点との類似度を示す分布1300を示しており、図13の(2)は、図13の(1)の分布で示される画素と、かかる画素と特徴点との類似度の関係とを2次元で示す図である。これらの図では、類似度が小さい程、特徴点と類似していることを示している。
(1) in FIG. 13 shows a
図13の(2)の場合、第1の画素1310と特徴点との類似度と、第2の画素1320と特徴点との類似度の差1330が、第1の閾値以上であるため、単一性判定部143は、第1の画素1310を追跡点の候補とする。
In the case of (2) in FIG. 13, the
次に、第1の画素と特徴点との類似度と、第2の画素と特徴点との類似度の差が第1の閾値以上でない場合について説明する。 Next, a case where the difference between the similarity between the first pixel and the feature point and the difference between the similarity between the second pixel and the feature point is not greater than or equal to the first threshold will be described.
図13の(3)は、第1の探索ウィンドウ内の画素の各々と特徴点との類似度を示す分布1340であり、図13の(4)は、図13の(3)の分布で示される画素と、かかる画素と特徴点との類似度の関係を2次元で示す図である。
(3) in FIG. 13 is a
図13の(4)において、第1の画素1350、第2の画素1360、及び第1の画素1350と第2の画素1360の特徴点との類似度の差1355で示されている。
In FIG. 13 (4), the
類似度の差1355が、第1の閾値より小さい場合、単一性判定部143は、第2の画素1360と特徴点と3番目に類似する極値を有する画素1370との類似度の差1365、及び特徴点と3番目に類似する極値を有する画素1370と特徴点と4番目に類似する極値を有する画素1380との類似度の差1375等を算出する。
When the
次に、単一性判定部143は、かかる算出された類似度の差(1365、及び1375等)と、類似度の差1355とを比較する。つまり、単一性判定部143は、特徴点にN番目に類似する極値を有する画素と特徴点との類似度と、N+1番目に類似する極値を有する画素と特徴点との類似度の差(以下、「NとN+1との類似度の差」)を算出する。
Next, the
そして、単一性判定部143は、算出されたNとN+1との類似度の差と、類似度の差1355とを比較する(Nは2以上の自然数)。
Then, the
かかる比較の結果、類似度の差1355が、NとN+1との類似度の差より大きい場合、単一性判定部143は、類似度の差1355が、第1の閾値より小さい場合であっても、第1の画素1350を追跡点の候補とする。
As a result of such comparison, if the
図14を用いて、単一性判定部143の処理フローを説明する。
The processing flow of the
ステップS1401において、単一性判定部143は、第1の画素と特徴点との類似度と、第2の画素と特徴点との類似度の差が第1の閾値以上であるか否か判定する。かかる類似度の差が第1の閾値以上の場合、ステップS1404に進む(ステップS1401 YES)。一方、かかる類似度の差が第1の閾値以上でない場合、ステップS1402に進む(ステップS1401 NO)。
In step S1401, the
ステップS1402において、単一性判定部143は、第1の画素と特徴点との類似度と第2の画素と特徴点との類似度の差と、NとN+1との類似度の差とを比較する。第1の画素と第2の画素の類似度の差が、NとN+1との類似度の差より大きい場合、ステップS1404に進む(ステップS1402 YES)。一方、第1の画素と第2の画素の類似度の差が、NとN+1との類似度の差より大きくない場合、ステップS1403に進む(ステップS1402 NO)。
In step S1402, the
ステップS1403で、単一性判定部143は、単一性の判定を失敗と判断し、処理を終了する。
In step S1403, the
ステップS1404で、第1の画素の位置が、ブロックマッチング処理で特定された追跡点の位置と一致する場合、単一性判定部143は、単一性の判定を成功と判断し、処理を終了する。
In step S1404, when the position of the first pixel matches the position of the tracking point specified by the block matching process, the
なお、探索ウィンドウ内に極値を有する画素が1つしか検出されなかったときには、かかる画素の位置が、ブロックマッチングの処理で特定された追跡点の位置と一致する場合に、単一性判定部143は、単一性の判定を成功と判断する。 Note that when only one pixel having an extreme value is detected in the search window, the unity determination unit is used when the position of the pixel matches the position of the tracking point specified by the block matching process. 143 determines that the unity determination is successful.
(5)第2の映像フレームの探索ウィンドウの拡大
単一性判定部143が単一性の判定を失敗と判断した場合、映像処理装置1は、第2の映像フレームの探索ウィンドウを拡大して、ブロックマッチングの処理、及び第1の条件の判定の処理を行ってもよい。
(5) Expansion of search window for second video frame When
図15を用いて、第2の映像フレームの探索ウィンドウを拡大した場合の映像処理装置1の処理内容について説明する。
Processing contents of the
図15の(1)は、探索ウィンドウを拡大する前の第2の映像フレーム1550における第1の探索ウィンドウ1530、第2の探索ウィンドウ1500、及びテンプレートパッチ1510の関係を示す図である。
(1) of FIG. 15 is a diagram illustrating a relationship among the
第2の映像フレーム1550は、柵の奥に家が存在する画像を示している。第1及び第2の探索ウィンドウ(1530、1500)が設定されている領域は、柵に対応する部分であり、似たようなパターンが繰り返されている。単一性判定部143は、追跡点の候補となる第1の画素を抽出するのは難しい。また、似たようなパターンが繰り返されているため、ブロックマッチング部141は、追跡点を誤って特定するおそれがある。
The
このような場合には、映像処理装置1は、探索ウィンドウを拡大して、ブロックマッチングの処理と、単一性の判定とを実行してもよい。
In such a case, the
図15の(2)は、探索ウィンドウを拡大した場合の一例である。図15の(2)では、第2の探索ウィンドウ1500のサイズは一定であるが、映像処理装置1は、第1の探索ウィンドウ1540を拡大する。また、映像処理装置1は、第1の探索ウィンドウ内を移動する、テンプレートパッチ1520のサイズも拡大する。
(2) of FIG. 15 is an example when the search window is enlarged. In (2) of FIG. 15, the size of the
テンプレートパッチ1520が拡大されることにより、テンプレートパッチ1520の第2の映像フレーム1550の重複部分が広くなる。これにより、重複部分は、柵以外の部分も含むようになり、テンプレートパッチ1520を第1の探索ウィンドウ内で移動した場合に、重複部分とテンプレートパッチ1520との類似度を評価する値が変化するため、追跡点を抽出し易くなる。
By enlarging the
また、拡大された第1の探索ウィンドウ1540は、拡大前よりも変化のある画像であるため、単一性判定部143は、最も類似する第1の画素を追跡点の候補と判定し易くなる。
In addition, since the enlarged
なお、第2の映像のフレームの探索ウィンドウを拡大する場合に、映像処理装置1は、テンプレートパッチ1510を拡大しなくてもよい。また、映像処理装置1は、第1の探索ウィンドウと共に、第2の探索ウィンドウのサイズを拡大してもよい。
Note that the
<第2の条件の判定>
(1)曲面形状の算出方法
図16及び図17を用いて、曲面形状の算出方法について説明する。曲面形状判定部145は、ブロックマッチング処理と、単一性の判定(第1の条件の判定)の処理との結果、抽出された追跡点の候補の画素が追跡点であるかの判定を行う(第2の条件の判定)。
<Determination of the second condition>
(1) Method for calculating curved surface shape A method for calculating a curved surface shape will be described with reference to FIGS. 16 and 17. The curved surface
追跡点の候補の画素が追跡点か否かの判定を行うときに、曲面形状判定部145は、追跡点の候補の画素が周辺の画素に対して際立った特徴を有するか否かの判定を行う。本実施形態では、曲面形状判定部145が、追跡点の候補の画素と特徴点との類似度と、かかる候補の画素の周辺の8画素と特徴点との類似度とを比較し、追跡点か否かの判定を行う。
When determining whether or not a tracking point candidate pixel is a tracking point, the curved surface
具体的には、曲面形状判定部145は、候補の画素(x,y)とその周辺8画素の位置と、これらの画素と特徴点との類似度から2次曲面の形状を算出する。
Specifically, the curved surface
図16の(1)に候補の画素(x,y)と周辺8画素との位置関係を示す。Rは各画素と特徴点との類似度を表す。例えば、Rは特徴点との輝度の類似度を表してもよい。 FIG. 16 (1) shows the positional relationship between the candidate pixel (x, y) and the surrounding eight pixels. R represents the similarity between each pixel and the feature point. For example, R may represent the degree of luminance similarity with the feature point.
図16の(2)は、候補の画素(x,y)と周辺8画素の位置と類似度の値とから2次曲面を形成した様子を示す図である。図16の(2)は、候補の画素(x,y)の類似度R(x,y)を中心に2次曲面を切り出した様子を示している。 (2) of FIG. 16 is a diagram illustrating a state in which a quadric surface is formed from the candidate pixel (x, y), the positions of the surrounding eight pixels, and the similarity value. (2) of FIG. 16 shows a state in which a quadric surface is cut out with the similarity R (x, y) of the candidate pixel (x, y) as the center.
2次曲面は、図17の(式9)から求められる。ここで、xの2次の係数aと、yの2次の係数cとは、それぞれ(式10)と(式11)とから求められる。 The quadric surface is obtained from (Equation 9) in FIG. Here, the secondary coefficient a of x and the secondary coefficient c of y are obtained from (Expression 10) and (Expression 11), respectively.
ここで、(式10)は、図16の(1)の両端の2列の6画素((x−1,y−1)、(x−1、y)、(x−1,y+1)、(x+1,y−1)、(x+1,y)、(x+1,y+1))の類似度と、候補の画素(x,y)を含む真ん中の列の3画素((x,y−1)、(x,y)、(x,y+1))の類似度の2倍との差を表している。また、(式11)は、図16の(1)の上段と下段の2行の6画素((x−1,y−1)、(x,y−1)、(x+1,y−1)、(x−1,y+1)、(x,y+1)、(x+1,y+1))の類似度と、候補の画素(x,y)を含む真ん中の行の3画素((x−1,y)、(x,y)、(x+1,y))の類似度の2倍との差を表している。xの2次の係数aと、yの2次の係数cの値とが第3の閾値より小さい場合、候補の画素(x,y)と周辺の画素の類似度から形成される2次曲面の形状は平坦に近く、候補の画素(x,y)で際立っていない。このため、特徴点に対応する追跡点が正しく特定できていない可能性が高い。この場合には、曲面形状判定部145は、第2の条件を満たさないと判定し、映像処理装置1は、追跡点の抽出に失敗したと判断する。
Here, (Equation 10) is expressed by two columns of 6 pixels ((x-1, y-1), (x-1, y), (x-1, y + 1)) at both ends of (1) in FIG. (X + 1, y-1), (x + 1, y), (x + 1, y + 1)) similarity and three pixels ((x, y-1), middle column including candidate pixel (x, y), The difference between (x, y) and (x, y + 1)) is twice the similarity. Further, (Equation 11) is expressed by 6 pixels ((x−1, y−1), (x, y−1), (x + 1, y−1)) in the upper and lower rows of (1) in FIG. , (X-1, y + 1), (x, y + 1), (x + 1, y + 1)) and three pixels ((x-1, y) in the middle row including the candidate pixel (x, y)) , (X, y), (x + 1, y)) is twice the similarity. A quadratic surface formed from the similarity between a candidate pixel (x, y) and surrounding pixels when the value of the quadratic coefficient a of x and the value of the quadratic coefficient c of y are smaller than the third threshold. The shape of is nearly flat and does not stand out in the candidate pixel (x, y). For this reason, there is a high possibility that tracking points corresponding to feature points cannot be correctly identified. In this case, the curved surface
一方、2次の係数aとcの少なくともいずれか一方が、第3の閾値より大きい場合、候補の画素(x,y)は周辺の画素に対して、特徴点との類似度が際立っている。このため、曲面形状判定部145は、第2の条件を満たすと判定し、映像処理装置1は、追跡点の抽出に成功したと判断する。
On the other hand, when at least one of the secondary coefficients a and c is larger than the third threshold, the candidate pixel (x, y) has a remarkable similarity to the feature point with respect to surrounding pixels. . Therefore, the curved surface
ブロックマッチングの処理及び第1の判定の処理が副画素の精度で実行された場合、曲面形状判定部145は、追跡点の候補となる副画素から最も近い位置の画素を選択し、かかる画素とその周辺の画素とを用いて、第2の判定の処理を実行してもよい。或いは、曲面形状判定部145は、追跡点の候補となる副画素と特徴点との類似度と、周辺の画素と特徴点との類似度とから2次曲面を形成し、第2の判定の処理を実行してもよい。
When the block matching process and the first determination process are executed with the accuracy of the sub-pixel, the curved surface
上述した実施形態では、候補の画素(x,y)と隣接する周辺8画素とから2次曲面の形状を算出しているが、周辺の画素は候補の画素(x,y)と隣接しない画素を含んでもよいことに留意すべきである。例えば、周辺の画素は、候補の画素(x,y)の2画素、又は3画素、隣りまで含んでもよい。 In the above-described embodiment, the shape of the quadric surface is calculated from the candidate pixel (x, y) and the adjacent eight neighboring pixels, but the neighboring pixels are not adjacent to the candidate pixel (x, y). It should be noted that may be included. For example, the peripheral pixels may include two pixels or three pixels of the candidate pixel (x, y) up to the neighbor.
<ハードウェア構成>
映像処理装置1は、例えば図18に示すようなハードウェア構成により実現される。
<Hardware configuration>
The
映像処理装置1は入出力部201、外部I/F203、RAM204、ROM205、CPU206、通信I/F207、HDD209、カメラモジュール210などを備え、それぞれがバスBで相互に接続されている。
The
入出力部201は、カメラモジュール210で撮影した映像のフレームを表示する。入出力部201は、映像処理装置1の状態などを表示する。また、入出力部201は、映像処理装置1のユーザから、映像処理装置1の各種設定を受け付けてもよい。
The input /
通信I/F207は、サーバ、PC(Personal Computer)等と、有線、又は無線のネットワークを介して通信を行う。映像処理装置1は、通信I/F207を介して、PC等の端末から、映像処理装置1に対する指示を受け付けてもよい。
A communication I /
また、HDD209はプログラムやデータを格納している不揮発性の記憶装置の一例である。格納されるプログラムやデータには映像処理装置1全体を制御する基本ソフトウェアであるOS、OS上において各種機能を提供するアプリケーションソフトウェアなどがある。なお、映像処理装置1はHDD209に替え、記憶媒体としてフラッシュメモリを用いるドライブ装置(例えばソリッドステートドライブ:SSD)を利用するものであってもよい。
The
外部I/F203は、外部装置とのインタフェースである。外部装置には、記録媒体203aなどがある。これにより、映像処理装置1は外部I/F203を介して記録媒体203aの読み取り及び/又は書き込みを行うことができる。記録媒体203aにはフレキシブルディスク、CD、DVD、SDメモリカード、及びUSBメモリなどがある。
The external I /
ROM205は、電源を切ってもプログラムやデータを保持することができる不揮発性の半導体メモリ(記憶装置)の一例である。ROM205には映像処理装置1の起動時に実行されるBIOS、OS設定、及びネットワーク設定などのプログラムやデータが格納されている。RAM204はプログラムやデータを一時保持する揮発性の半導体メモリ(記憶装置)の一例である。
The
カメラモジュール210は、カメラを有し、CPU206からの指示に基づいて撮影を行い、撮影された映像データをRAM204等の記憶装置に送信する。RAM204等の記憶装置は受信した撮影データを記憶し、CPU206の指示に応じて読み出す。
The
CPU206は、ROM205及びHDD209などの記憶装置からプログラムやデータをRAM204上に読み出し、処理を実行することで、映像処理装置1全体の制御や図1及び図2に示す映像処理装置1の機能を実現する演算装置である。映像処理装置1は図16に示すハードウェア構成により、上述した各種処理を実現できる。
The
[その他]
上述した実施形態では、第1の探索ウィンドウ内の画素を用いて、映像処理装置1は、第1の判定処理と、第2の判定処理とを実行しているが、第2の探索ウィンドウ内の画素を用いてこれらの処理を実行してもよい。これにより、映像処理装置1は、第1の判定処理と第2の判定処理の対象となる画素を追跡点の候補の周辺の画素に絞ることができる。
[Others]
In the embodiment described above, the
上述した実施の形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、映像処理装置1に供給してもよい。そして、映像処理装置1が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、上述の実施形態が、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は、いずれかの実施の形態を構成することになる。ここで、記憶媒体は、記録媒体または非一時的な記憶媒体である。
A storage medium that records a program code of software that implements the functions of the above-described embodiments may be supplied to the
また、コンピュータ装置が読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけではない。そのプログラムコードの指示に従って、コンピュータ装置上で動作しているオペレーティングシステム(OS)等が実際の処理の一部または全部を行ってもよい。さらに、その処理によって前述した実施形態の機能が実現されてもよいことは言うまでもない。 The functions of the above-described embodiments are not only realized by executing the program code read by the computer device. An operating system (OS) or the like operating on the computer device may perform part or all of the actual processing in accordance with the instruction of the program code. Furthermore, it goes without saying that the functions of the above-described embodiments may be realized by the processing.
以上、本発明の好ましい実施形態について説明したが、本発明はこうした実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形及び置換を加えることができる。 As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to such embodiment, A various deformation | transformation and substitution can be added in the range which does not deviate from the summary of this invention.
1 映像処理装置
110 映像入力部
120 映像補正部
130 特徴点抽出部
140 追跡部
141 ブロックマッチング部
142 極値検出部
143 単一性判定部
145 曲面形状判定部
150 フレームバッファ
160 重複点除去部
DESCRIPTION OF
Claims (10)
前記第1の映像のフレームより時間的に後の映像のフレームである第2の映像のフレームの所定の領域に対して、前記第1の映像のフレームの一部であって、前記特徴点を含むブロックとのブロックマッチング処理を行うことにより、前記特徴点に対応する追跡点を特定する追跡部と、
前記所定の領域において、前記特徴点に最も類似する第1の画素の位置、該第1の画素と前記特徴点との類似度、前記特徴点に2番目に類似する第2の画素の位置、及び該第2の画素と前記特徴点との類似度を検出する検出部と、
前記追跡点の位置と前記第1の画素の位置とが一致し、かつ前記第1の画素の類似度と前記第2の画素の類似度との差が第1の閾値以上である場合、第1の条件を満たすと判定する第1の判定部と、
前記追跡点と前記特徴点との類似度と、前記追跡点の複数の周辺の画素の各々と前記特徴点との類似度とを算出し、算出された前記追跡点の類似度と、前記複数の周辺の画素の各々の類似度との差が、第2の閾値以上である場合、第2の条件を満たすと判定する第2の判定部と、を有し、
前記第1の条件、及び前記第2の条件を満たす場合、前記追跡部は、前記特徴点が前記追跡点に対応すると判断する映像処理装置。 An extraction unit for extracting feature points from the frame of the first video;
A part of the frame of the first video with respect to a predetermined area of the frame of the second video that is a video frame temporally after the frame of the first video, and the feature point A tracking unit that identifies a tracking point corresponding to the feature point by performing a block matching process with a block including the block;
A position of a first pixel that is most similar to the feature point in the predetermined region; a similarity between the first pixel and the feature point; a position of a second pixel that is second closest to the feature point; And a detection unit for detecting the similarity between the second pixel and the feature point;
When the position of the tracking point matches the position of the first pixel, and the difference between the similarity of the first pixel and the similarity of the second pixel is equal to or greater than a first threshold, A first determination unit that determines that one condition is satisfied;
The similarity between the tracking point and the feature point, the similarity between each of a plurality of surrounding pixels of the tracking point and the feature point, and the calculated similarity between the tracking point and the plurality A second determination unit that determines that the second condition is satisfied when the difference between the respective similarities of pixels around the pixel is equal to or greater than a second threshold value,
When the first condition and the second condition are satisfied, the tracking unit determines that the feature point corresponds to the tracking point.
前記検出部は、前記副画素の精度で、前記第1の画素と、前記第2の画素とを検出する請求項1又は2に記載の映像処理装置。 The tracking unit performs the block matching process with the accuracy of a subpixel that is a unit smaller than a pixel, specifies the tracking point,
The video processing apparatus according to claim 1, wherein the detection unit detects the first pixel and the second pixel with accuracy of the sub-pixel.
前記第1の映像のフレームより時間的に後の映像のフレームである第2の映像のフレームの所定の領域に対して、前記第1の映像のフレームの一部であって、前記特徴点を含むブロックとのブロックマッチング処理を行うことにより、前記特徴点に対応する追跡点を特定するステップと、
前記所定の領域において、前記特徴点に最も類似する第1の画素の位置、該第1の画素と前記特徴点との類似度、前記特徴点に2番目に類似する第2の画素の位置、及び該第2の画素と前記特徴点との類似度を検出するステップと、
前記追跡点の位置と前記第1の画素の位置とが一致し、かつ前記第1の画素の類似度と前記第2の画素の類似度との差が第1の閾値以上である場合、第1の条件を満たすと判定するステップと、
前記追跡点と前記特徴点との類似度と、前記追跡点の複数の周辺の画素の各々と前記特徴点との類似度とを算出し、算出された前記追跡点の類似度と、前記複数の周辺の画素の各々の類似度との差が、第2の閾値以上である場合、第2の条件を満たすと判定するステップと、
前記第1の条件、及び前記第2の条件を満たす場合、前記特徴点が前記追跡点に対応すると判断するステップと、を有する映像処理方法。 Extracting feature points from a frame of the first video;
A part of the frame of the first video with respect to a predetermined area of the frame of the second video that is a video frame temporally after the frame of the first video, and the feature point Identifying a tracking point corresponding to the feature point by performing block matching processing with a block including
A position of a first pixel that is most similar to the feature point in the predetermined region; a similarity between the first pixel and the feature point; a position of a second pixel that is second closest to the feature point; And detecting the degree of similarity between the second pixel and the feature point;
When the position of the tracking point matches the position of the first pixel, and the difference between the similarity of the first pixel and the similarity of the second pixel is equal to or greater than a first threshold, Determining that condition 1 is satisfied;
The similarity between the tracking point and the feature point, the similarity between each of a plurality of surrounding pixels of the tracking point and the feature point, and the calculated similarity between the tracking point and the plurality Determining that the second condition is satisfied if the difference between each of the neighboring pixels of the pixel is equal to or greater than a second threshold value;
And a step of determining that the feature point corresponds to the tracking point when the first condition and the second condition are satisfied.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015145227A JP2017027363A (en) | 2015-07-22 | 2015-07-22 | Video processing device, video processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015145227A JP2017027363A (en) | 2015-07-22 | 2015-07-22 | Video processing device, video processing method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2017027363A true JP2017027363A (en) | 2017-02-02 |
Family
ID=57946076
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015145227A Pending JP2017027363A (en) | 2015-07-22 | 2015-07-22 | Video processing device, video processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2017027363A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112699854A (en) * | 2021-03-22 | 2021-04-23 | 亮风台(上海)信息科技有限公司 | Method and device for identifying stopped vehicle |
CN113627262A (en) * | 2021-07-13 | 2021-11-09 | 深圳力维智联技术有限公司 | Character recognition method, device and equipment |
-
2015
- 2015-07-22 JP JP2015145227A patent/JP2017027363A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112699854A (en) * | 2021-03-22 | 2021-04-23 | 亮风台(上海)信息科技有限公司 | Method and device for identifying stopped vehicle |
CN112699854B (en) * | 2021-03-22 | 2021-07-20 | 亮风台(上海)信息科技有限公司 | Method and device for identifying stopped vehicle |
CN113627262A (en) * | 2021-07-13 | 2021-11-09 | 深圳力维智联技术有限公司 | Character recognition method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11164323B2 (en) | Method for obtaining image tracking points and device and storage medium thereof | |
US10636165B2 (en) | Information processing apparatus, method and non-transitory computer-readable storage medium | |
US6671399B1 (en) | Fast epipolar line adjustment of stereo pairs | |
US9519968B2 (en) | Calibrating visual sensors using homography operators | |
US9721387B2 (en) | Systems and methods for implementing augmented reality | |
JP6716996B2 (en) | Image processing program, image processing apparatus, and image processing method | |
JP6491517B2 (en) | Image recognition AR device, posture estimation device, and posture tracking device | |
CN109479082B (en) | Image processing method and apparatus | |
CN111754536B (en) | Image labeling method, device, electronic equipment and storage medium | |
JP2012022655A (en) | Image processing method, image processing apparatus and program | |
US9256792B2 (en) | Image processing apparatus, image processing method, and program | |
WO2017081839A1 (en) | Moving body tracking method, moving body tracking device, and program | |
US9082019B2 (en) | Method of establishing adjustable-block background model for detecting real-time image object | |
JP2013206175A (en) | Image determination device, image determination method and computer program for image determination | |
EP3300025A1 (en) | Image processing device and image processing method | |
JP2021108193A (en) | Image processing device, image processing method, and program | |
CN110807459A (en) | License plate correction method and device and readable storage medium | |
JP2017130042A (en) | Video processing apparatus, video processing method, and program | |
JP4296617B2 (en) | Image processing apparatus, image processing method, and recording medium | |
US9785839B2 (en) | Technique for combining an image and marker without incongruity | |
JP2017027363A (en) | Video processing device, video processing method and program | |
CN110874170A (en) | Image area correction method, image segmentation method and device | |
US20180061078A1 (en) | Image processing device, image processing method, and non-transitory computer-readable recording medium | |
CN112085842A (en) | Depth value determination method and device, electronic equipment and storage medium | |
JP2018010359A (en) | Information processor, information processing method, and program |