JP2010039520A - Feature point detection device and moving image processor with the same - Google Patents

Feature point detection device and moving image processor with the same Download PDF

Info

Publication number
JP2010039520A
JP2010039520A JP2008198173A JP2008198173A JP2010039520A JP 2010039520 A JP2010039520 A JP 2010039520A JP 2008198173 A JP2008198173 A JP 2008198173A JP 2008198173 A JP2008198173 A JP 2008198173A JP 2010039520 A JP2010039520 A JP 2010039520A
Authority
JP
Japan
Prior art keywords
value
pixel
evaluation value
feature point
differential value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008198173A
Other languages
Japanese (ja)
Inventor
Shoji Goto
章二 後藤
Takeshi Watanabe
剛 渡邉
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2008198173A priority Critical patent/JP2010039520A/en
Publication of JP2010039520A publication Critical patent/JP2010039520A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To detect a feature point by simple arithmetic processing while securing predetermined accuracy. <P>SOLUTION: A secondary feature value calculation part 10 calculates a secondary differential value in a diagonally lower right direction and a secondary differential value in a diagonally upper right direction in pixels of interest in an image. An evaluation value calculation part 20 calculates an absolute value difference between the secondary differential value in the diagonally lower right direction and the secondary differential value in the diagonally upper right direction, the secondary differential values being calculated by the secondary differential value calculation part 10, as a first evaluation value. A decision part 30 compares a first evaluation value calculated by the evaluation value calculation part 20 with the first threshold, and decides whether or not the pixels of interest correspond to a corner or an oblique edge. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、コーナーやエッジなど、画像内の特徴点を検出する特徴点検出装置、およびそれを搭載した動画像処理装置に関する。   The present invention relates to a feature point detection device that detects feature points in an image, such as corners and edges, and a moving image processing device equipped with the feature point detection device.

画像処理の前処理として、対象画像から特徴点を検出する処理が広く用いられている。対象画像内の演算対象を全画素ではなく、特徴点として検出された画素に限定すれば演算量を低減することができる。たとえば、オプティカルフロー算出処理の前処理として、特徴点の検出処理が用いられている。オプティカルフローとは、画像内のある点や図形がつぎの瞬間にどのような方向へ、どの程度の距離、移動するかを示すベクトルである。   As preprocessing for image processing, processing for detecting feature points from a target image is widely used. The amount of calculation can be reduced by limiting the calculation target in the target image to pixels detected as feature points instead of all pixels. For example, feature point detection processing is used as preprocessing for optical flow calculation processing. The optical flow is a vector indicating in what direction and how far a certain point or figure in the image moves at the next moment.

画像内から特徴点を検出するためによく用いられる手法にKLT(Kanada-Lucas-Tomashi)法がある。KLT法は入力画像上の座標c(x,y)の特徴量H(x,y)を評価することにより特徴点を求める。KLT法では、まず、ガウシアンオペレータにより入力画像が平滑化される。つぎに、一定の大きさの正方形窓Wにおいて画像上の輝度Iの勾配(Ix=∂I/∂x,Iy=∂I/∂y)を用いて、下記式1に示す行列Mを算出する。つぎに、下記式2に示すように行列Mの固有値λ1、λ2の最小値を求めることにより、特徴量H(x,y)を求める。最後にこの特徴量H(x,y)を評価して特徴点を求める。   A technique often used for detecting feature points from an image is a KLT (Kanada-Lucas-Tomashi) method. In the KLT method, a feature point is obtained by evaluating a feature amount H (x, y) of a coordinate c (x, y) on an input image. In the KLT method, first, an input image is smoothed by a Gaussian operator. Next, the matrix M shown in the following formula 1 is calculated using the gradient of the luminance I on the image (Ix = ∂I / ∂x, Iy = ∂I / ∂y) in the square window W having a certain size. . Next, the feature value H (x, y) is obtained by obtaining the minimum values of the eigenvalues λ1 and λ2 of the matrix M as shown in the following equation 2. Finally, the feature amount H (x, y) is evaluated to obtain a feature point.

特許文献1は画像中の特徴点を検出するための評価値を計算する画像処理装置を開示する。この画像処理装置は各画素における複数の方向の各々に関して、輝度値の一次空間微分値および二次空間微分値を計算することにより、ノイズ量を推定する。
特開2007−231565号公報
Patent Document 1 discloses an image processing apparatus that calculates an evaluation value for detecting a feature point in an image. This image processing apparatus estimates a noise amount by calculating a primary spatial differential value and a secondary spatial differential value of a luminance value for each of a plurality of directions in each pixel.
JP 2007-231565 A

上述したKLT法は比較的精度よく特徴点を検出することができるが、行列Mの固有値λ1、λ2の最小値を求めるなど、複雑な演算処理を必要とする。そのため、KLT法による特徴点検出処理をハードウェア資源で構成することは難しい。   Although the above-described KLT method can detect feature points with relatively high accuracy, it requires complicated arithmetic processing such as obtaining minimum values of eigenvalues λ1 and λ2 of the matrix M. Therefore, it is difficult to configure the feature point detection process by the KLT method with hardware resources.

本発明はこうした状況に鑑みなされたものであり、その目的は、一定の精度を維持しつつ、簡単な演算処理で特徴点を検出することができる特徴点検出装置、およびそれを搭載した動画像処理装置を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a feature point detection device capable of detecting feature points by simple arithmetic processing while maintaining a certain accuracy, and a moving image equipped with the feature point detection device. It is to provide a processing apparatus.

本発明のある態様の特徴点検出装置は、画像内の注目画素における、右下がり斜め方向の二次微分値および右上がり斜め方向の二次微分値を算出する二次微分値算出部と、二次微分値算出部により算出された、右下がり斜め方向の二次微分値と右上がり斜め方向の二次微分値との絶対値差を第1評価値として算出する評価値算出部と、評価値算出部により算出された第1評価値と、第1閾値とを比較することにより、注目画素が画像内の、コーナーまたは斜めエッジに該当するか否か判定する判定部と、を備える。   A feature point detection apparatus according to an aspect of the present invention includes a second-order differential value calculation unit that calculates a second-order differential value in a diagonally downward direction and a second-order differential value in a diagonally right direction at a target pixel in an image; An evaluation value calculation unit that calculates an absolute value difference between a second-order differential value in the diagonally descending right direction and a secondary differential value in the diagonally right-up direction calculated by the secondary differential value calculating unit; and an evaluation value A determination unit that determines whether or not the target pixel corresponds to a corner or an oblique edge in the image by comparing the first evaluation value calculated by the calculation unit and the first threshold value;

本発明の別の態様もまた、特徴点検出装置である。この装置は、画像を複数の部分領域に分割する分割部と、分割部により分割された各部分領域の各画素ごとに、右下がり斜め方向の二次微分値、右上がり斜め方向の二次微分値、水平方向の二次微分値および垂直方向の二次微分値を算出する二次微分値算出部と、各部分領域の各画素ごとに、右下がり斜め方向の二次微分値と右上がり斜め方向の二次微分値との絶対値差を第1評価値として算出し、かつ水平方向の二次微分値と垂直方向の二次微分値との絶対値差を第2評価値として算出する評価値算出部と、各部分領域ごとに少なくとも一つの特徴点を検出する特徴点検出部と、を備える。特徴点検出部は、ある部分領域内の各画素の第1評価値と、第1閾値とをそれぞれ比較し、第1評価値が第1閾値を超える画素が部分領域内に少なくとも一つ存在する場合、その少なくとも一つの画素を部分領域の特徴点候補に決定し、第1評価値が第1閾値を超える画素が部分領域内に存在しない場合、部分領域内の各画素の第2評価値と、第2閾値とをそれぞれ比較し、第2評価値が第2閾値を超える画素が部分領域内に少なくとも一つ存在する場合、その少なくとも一つの画素を部分領域の特徴点候補に決定する。   Another aspect of the present invention is also a feature point detection apparatus. The apparatus divides an image into a plurality of partial areas, and for each pixel of each partial area divided by the dividing section, a second-order differential value in a right-down diagonal direction and a second-order differential in a right-up diagonal direction. Value, horizontal differential value and vertical differential value calculation unit, and for each pixel in each partial area, the right-down diagonal differential value and the right-up diagonal Evaluation that calculates absolute value difference from secondary differential value in direction as first evaluation value, and calculates absolute value difference between secondary differential value in horizontal direction and secondary differential value in vertical direction as second evaluation value A value calculation unit; and a feature point detection unit that detects at least one feature point for each partial region. The feature point detection unit compares the first evaluation value of each pixel in a certain partial region with the first threshold value, and at least one pixel whose first evaluation value exceeds the first threshold value exists in the partial region. In this case, when at least one pixel is determined as a feature point candidate of the partial region, and there is no pixel in the partial region that has a first evaluation value exceeding the first threshold value, the second evaluation value of each pixel in the partial region The second threshold value is compared, and if there is at least one pixel in the partial area whose second evaluation value exceeds the second threshold value, the at least one pixel is determined as a feature point candidate for the partial area.

なお、以上の構成要素の任意の組み合わせ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, etc. are also effective as an aspect of the present invention.

本発明によれば、一定の精度を確保しつつ、簡単な演算処理で特徴点を検出することができる。   According to the present invention, it is possible to detect a feature point by simple arithmetic processing while ensuring a certain accuracy.

図1は、本発明の実施の形態1に係る特徴点検出装置100の構成を示すブロック図である。実施の形態1に係る特徴点検出装置100は、二次微分値算出部10、評価値算出部20および判定部30を備える。これらの構成は、ハードウェア的には、任意のプロセッサ、メモリ、その他のLSIで実現でき、ソフトウェア的にはメモリにロードされたプログラムなどによって実現されるが、ここではそれらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックがハードウェアのみ、ソフトウェアのみ、またはそれらの組み合わせによっていろいろな形で実現できることは、当業者には理解されるところである。   FIG. 1 is a block diagram showing a configuration of a feature point detection apparatus 100 according to Embodiment 1 of the present invention. Feature point detection apparatus 100 according to Embodiment 1 includes secondary differential value calculation unit 10, evaluation value calculation unit 20, and determination unit 30. These configurations can be realized by an arbitrary processor, memory, or other LSI in terms of hardware, and can be realized by a program loaded in the memory in terms of software, but here by their cooperation. Draw functional blocks. Therefore, those skilled in the art will understand that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof.

二次微分値算出部10は、入力された画像内の注目画素における、右下がり斜め方向の二次微分値、右上がり斜め方向の二次微分値、水平方向の二次微分値および垂直方向の二次微分値を算出する。なお、上記注目画素は上記画像内のすべての画素が該当し得る。二次微分値算出部10は上記注目画素の隣り合う画素を用いて算出してもよいし、一画素おきなど、上記注目画素から二画素以上離れた画素を用いて算出してもよい。なお、本実施の形態における二次微分値を算出するためのオペレータは後述する。   The secondary differential value calculation unit 10 has a second-order differential value in the diagonally lower right direction, a second-order differential value in the right-up diagonal direction, a second-order differential value in the horizontal direction, and a vertical differential value in the pixel of interest in the input image. Calculate the second derivative value. Note that all the pixels in the image may correspond to the target pixel. The secondary differential value calculation unit 10 may calculate using pixels adjacent to the target pixel, or may calculate using pixels that are two or more pixels away from the target pixel, such as every other pixel. An operator for calculating the secondary differential value in the present embodiment will be described later.

評価値算出部20は、二次微分値算出部10により算出された、右下がり斜め方向の二次微分値と右上がり斜め方向の二次微分値との絶対値差を第1評価値として算出し、水平方向の二次微分値と垂直方向の二次微分値との絶対値差を第2評価値として算出する。また、評価値算出部20は、注目画素における、右下がり斜め方向の二次微分値の絶対値と、右上がり斜め方向の二次微分値の絶対値との和を第3評価値として算出し、水平方向の二次微分値の絶対値と、垂直方向の二次微分値の絶対値との和を第4評価値として算出する。   The evaluation value calculation unit 20 calculates, as the first evaluation value, the absolute value difference between the second-order differential value in the lower right diagonal direction and the second-order differential value in the upper right diagonal direction calculated by the secondary differential value calculation unit 10. Then, an absolute value difference between the secondary differential value in the horizontal direction and the secondary differential value in the vertical direction is calculated as the second evaluation value. Further, the evaluation value calculation unit 20 calculates, as the third evaluation value, the sum of the absolute value of the second-order differential value in the diagonally lower right direction and the absolute value of the second-order differential value in the diagonally right upward direction at the target pixel. The sum of the absolute value of the secondary differential value in the horizontal direction and the absolute value of the secondary differential value in the vertical direction is calculated as the fourth evaluation value.

判定部30は、評価値算出部20により算出された第1評価値と、第1閾値とを比較することにより、注目画素が画像内の、コーナーまたは斜めエッジに該当するか否か判定する。より具体的には第1評価値が第1閾値より大きいとき、その注目画素が画像内の、コーナーまたは斜めエッジに該当すると判定する。または、その注目画素が画像内の、コーナーまたは斜めエッジに該当する可能性が高いとして、その注目画素を画像内の、コーナーまたは斜めエッジの候補とする。この判定の原理については後述する。   The determination unit 30 determines whether the target pixel corresponds to a corner or an oblique edge in the image by comparing the first evaluation value calculated by the evaluation value calculation unit 20 with the first threshold value. More specifically, when the first evaluation value is larger than the first threshold, it is determined that the target pixel corresponds to a corner or an oblique edge in the image. Alternatively, assuming that the target pixel is highly likely to correspond to a corner or a diagonal edge in the image, the target pixel is set as a corner or diagonal edge candidate in the image. The principle of this determination will be described later.

判定部30は、評価値算出部20により算出された第2評価値と、第2閾値とを比較することにより、注目画素が画像内の、水平エッジまたは垂直エッジに該当するか否か判定する。より具体的には第2評価値が第2閾値より大きいとき、その注目画素が画像内の、水平エッジまたは垂直エッジに該当すると判定する。または、その注目画素が画像内の、水平エッジまたは垂直エッジに該当する可能性が高いとして、その注目画素を画像内の、水平エッジまたは垂直エッジの候補とする。   The determination unit 30 determines whether the target pixel corresponds to a horizontal edge or a vertical edge in the image by comparing the second evaluation value calculated by the evaluation value calculation unit 20 with the second threshold value. . More specifically, when the second evaluation value is larger than the second threshold value, it is determined that the target pixel corresponds to a horizontal edge or a vertical edge in the image. Alternatively, assuming that the pixel of interest is likely to correspond to a horizontal edge or a vertical edge in the image, the pixel of interest is set as a candidate for a horizontal edge or a vertical edge in the image.

画像内の、コーナー、斜めエッジ、水平エッジおよび垂直エッジは、画像内のオブジェクトの輪郭に出現する。輪郭は画像内の明るさが急激に変化する部分であるため、画像内の明るさの変化を検出することにより、輪郭を検出することができる。本実施の形態ではその明るさの変化を二次微分値として検出している。   Corners, diagonal edges, horizontal edges, and vertical edges in the image appear in the outline of the object in the image. Since the contour is a portion where the brightness in the image changes abruptly, the contour can be detected by detecting the change in the brightness in the image. In the present embodiment, the change in brightness is detected as a secondary differential value.

判定部30は、第3評価値と第3閾値とを比較することにより、コーナーまたは斜めエッジの強度を判定する。第3評価値が第3閾値と比較して大きいほど、その強度が強いと判定する。判定部30は、第4評価値と第4閾値とを比較することにより、水平エッジまたは垂直エッジの強度を判定する。第4評価値が第4閾値と比較して大きいほど、その強度が強いと判定する。第1閾値、第2閾値、第3閾値および第4閾値は、設計者が実験やシミュレーションにより求めた値に設定されることができる。   The determination unit 30 determines the strength of the corner or the oblique edge by comparing the third evaluation value with the third threshold value. It is determined that the strength is stronger as the third evaluation value is larger than the third threshold value. The determination unit 30 determines the strength of the horizontal edge or the vertical edge by comparing the fourth evaluation value with the fourth threshold value. It is determined that the strength is stronger as the fourth evaluation value is larger than the fourth threshold value. The first threshold value, the second threshold value, the third threshold value, and the fourth threshold value can be set to values obtained by the designer through experiments or simulations.

図2は、実施の形態1に係る、二次微分値の算出に必要なオペレータ15を示す。このオペレータ15は、注目画素の係数が−2、およびその周辺画素の係数が+1である。二次微分値算出部10は、このオペレータ15にもとづく四つの一次元フィルタを用いて、右下がり斜め方向(−45°方向)、右上がり斜め方向(+45°方向)、水平方向(0°方向)および垂直方向(+90°方向)のそれぞれの二次微分値を算出する。すなわち、下記式3〜6に示すように二次微分値を算出する。   FIG. 2 shows the operator 15 necessary for calculating the secondary differential value according to the first embodiment. The operator 15 has a coefficient of interest pixel of −2 and a peripheral pixel coefficient of +1. Using the four one-dimensional filters based on the operator 15, the secondary differential value calculation unit 10 uses a right-down diagonal direction (−45 ° direction), a right-up diagonal direction (+ 45 ° direction), and a horizontal direction (0 ° direction). ) And vertical differential values in the vertical direction (+ 90 ° direction). That is, the secondary differential value is calculated as shown in the following formulas 3-6.

−45°方向の二次微分値Ya=I(i-1,j-1)−2*I(i,j)+I(i+1,j+1)…(式3)
+45°方向の二次微分値Yb=I(i-1,j+1)−2*I(i,j)+I(i+1,j-1)…(式4)
0°方向の二次微分値Yc=I(i-1,j)−2*I(i,j)+I(i+1,j) …(式5)
+90°方向の二次微分値Yd=I(i,j+1)−2*I(i,j)+I(i,j-1) …(式6)
Iは画素の明るさを示す値であり、カラー画像の場合、R値、B値およびG値の平均値であってもよいし、YCbCr系の輝度値であってもよい。iは図2に示すように左から右にインクリメントしていく変数である。jは図2に示すように上から下にインクリメントしていく変数である。
Second-order differential value in the −45 ° direction Ya = I (i−1, j−1) −2 * I (i, j) + I (i + 1, j + 1) (Equation 3)
+ 45 ° direction secondary differential value Yb = I (i−1, j + 1) −2 * I (i, j) + I (i + 1, j−1) (Formula 4)
Second-order differential value in the 0 ° direction Yc = I (i-1, j) -2 * I (i, j) + I (i + 1, j) (Formula 5)
Second-order differential value in the + 90 ° direction Yd = I (i, j + 1) −2 * I (i, j) + I (i, j−1) (Formula 6)
I is a value indicating the brightness of the pixel. In the case of a color image, it may be an average value of R, B, and G values, or a YCbCr luminance value. i is a variable that increments from left to right as shown in FIG. j is a variable that increments from top to bottom as shown in FIG.

図3は、実施の形態1に係る、−45°方向の二次微分値Yaを算出するための一次元フィルタ15aを示す図である。この一次元フィルタ15aは、加算器16、乗算器17および減算器18を含む。加算器16はI(i-1,j-1)およびI(i+1,j+1)を加算する。乗算器17はI(i,j)を2倍にする。減算器18は加算器16の出力値と乗算器17の出力値との差分を算出する。減算器18の出力値が−45°方向の二次微分値Yaとなる。+45°方向の二次微分値Yb、0°方向の二次微分値Yc、および+90°方向の二次微分値Ydについても同様の構成で求めることができる。   FIG. 3 is a diagram illustrating the one-dimensional filter 15a for calculating the second-order differential value Ya in the −45 ° direction according to the first embodiment. The one-dimensional filter 15a includes an adder 16, a multiplier 17, and a subtracter 18. The adder 16 adds I (i−1, j−1) and I (i + 1, j + 1). Multiplier 17 doubles I (i, j). The subtracter 18 calculates the difference between the output value of the adder 16 and the output value of the multiplier 17. The output value of the subtracter 18 becomes the second derivative value Ya in the −45 ° direction. The secondary differential value Yb in the + 45 ° direction, the secondary differential value Yc in the 0 ° direction, and the secondary differential value Yd in the + 90 ° direction can be obtained with the same configuration.

図4は、実施の形態1に係る、画像内の−45°方向の空間軸Sにおける二次微分値Yaの推移を示す。すなわち、−45°方向に連続する各画素の二次微分値Yaの推移を示す。各画素の明るさを明と暗に二分類する場合、二次微分値Yaが正のとき暗に、二次微分値Yaが負のとき明に分類する。二次微分値Yaが正から負に大きくゼロクロスする部分が(図4ではe1)、暗から明へのエッジ境界となる。同様に、二次微分値Yaが負から正に大きくゼロクロスする部分が(図4ではe2)、明から暗へのエッジ境界となる。二次微分値Yaは注目画素とその両側の隣接画素との間の、二つの明るさの変化が反映された値であるため、エッジ境界の前後で二次微分値Yaが正方向および負方向に大きく振れる。+45°方向の二次微分値Yb、0°方向の二次微分値Yc、および+90°方向の二次微分値Ydについても同様の議論があてはまる。   FIG. 4 shows the transition of the secondary differential value Ya on the spatial axis S in the −45 ° direction in the image according to the first embodiment. That is, the transition of the secondary differential value Ya of each pixel continuous in the −45 ° direction is shown. When the brightness of each pixel is classified into light and dark, it is classified into dark when the secondary differential value Ya is positive and bright when the secondary differential value Ya is negative. A portion where the secondary differential value Ya greatly crosses from positive to negative zero crossing (e1 in FIG. 4) is an edge boundary from dark to bright. Similarly, a portion where the second-order differential value Ya greatly crosses from negative to positive greatly (e2 in FIG. 4) becomes an edge boundary from light to dark. Since the secondary differential value Ya is a value reflecting two brightness changes between the target pixel and adjacent pixels on both sides thereof, the secondary differential value Ya is in the positive and negative directions before and after the edge boundary. Shakes greatly. The same argument applies to the secondary differential value Yb in the + 45 ° direction, the secondary differential value Yc in the 0 ° direction, and the secondary differential value Yd in the + 90 ° direction.

図5は、実施の形態1に係る、第1評価値からコーナーまたは斜めエッジ、および第2評価値から水平エッジまたは垂直エッジを検出する原理を説明するための図である。第1パターンP1はコーナーで出現する3×3の画素パターンを示す。第2パターンP2もコーナーで出現する3×3の画素パターンを示す。第1パターンP1は画素パターンの右上に出現したコーナーを示し、第2パターンP2は画素パターンの右下に出現したコーナーを示す。   FIG. 5 is a diagram for explaining the principle of detecting a corner or diagonal edge from the first evaluation value and a horizontal edge or vertical edge from the second evaluation value according to the first embodiment. The first pattern P1 indicates a 3 × 3 pixel pattern that appears at a corner. The second pattern P2 also indicates a 3 × 3 pixel pattern that appears at the corner. The first pattern P1 indicates a corner that appears at the upper right of the pixel pattern, and the second pattern P2 indicates a corner that appears at the lower right of the pixel pattern.

第3パターンP3は右下がりの斜めエッジで出現する3×3の画素パターンを示す。第4パターンP4は水平エッジで出現する3×3の画素パターンを示す。第5パターンP5は垂直エッジで出現する3×3の画素パターンを示す。図5において、黒丸は各画素の明るさを明と暗に二分類する場合の、暗を示し、白丸は明を示す。   The third pattern P3 is a 3 × 3 pixel pattern that appears with a diagonally downward sloping edge. The fourth pattern P4 indicates a 3 × 3 pixel pattern that appears at the horizontal edge. The fifth pattern P5 indicates a 3 × 3 pixel pattern that appears at a vertical edge. In FIG. 5, black circles indicate darkness and white circles indicate light when the brightness of each pixel is classified into light and dark.

図6は、図5における各パターンP1〜P5の、四方向の二次微分値Ya〜Ydをまとめたテーブル25を示す。図6では黒丸画素の画素値と白丸画素の画素値との差分の、平均値をαで示す。第1パターンP1では−45°方向の二次微分値Yaのみが2αとなり、残りの三方向の二次微分値Yb、Yc、Ydはいずれもαである。画素パターンの左下にコーナーが出現した場合も同様の結果となる。第2パターンP2では+45°方向の二次微分値Ybのみが2αとなり、残りの三方向の二次微分値Ya、Yc、Ydはいずれもαである。画素パターンの左上にコーナーが出現した場合も同様の結果となる。   FIG. 6 shows a table 25 in which the secondary differential values Ya to Yd in the four directions of the patterns P1 to P5 in FIG. 5 are collected. In FIG. 6, the average value of the difference between the pixel value of the black circle pixel and the pixel value of the white circle pixel is denoted by α. In the first pattern P1, only the secondary differential value Ya in the −45 ° direction is 2α, and the remaining secondary differential values Yb, Yc, and Yd in the three directions are all α. The same result is obtained when a corner appears in the lower left corner of the pixel pattern. In the second pattern P2, only the secondary differential value Yb in the + 45 ° direction is 2α, and the remaining secondary differential values Ya, Yc, and Yd in the three directions are all α. The same result is obtained when a corner appears in the upper left of the pixel pattern.

2αは注目画素が暗、その両側の隣接画素がいずれも明のときに出現する値である。このように、画素パターン内にコーナーが存在する場合、−45°方向の二次微分値Yaおよび+45°方向の二次微分値Ybのどちらかが2αとなり、−45°方向の二次微分値Yaと+45°方向の二次微分値Ybとの差分がαとなる。また、0°方向の二次微分値Ycと+90°方向の二次微分値Ydとの差分が0となる。   2α is a value that appears when the target pixel is dark and adjacent pixels on both sides thereof are bright. As described above, when a corner exists in the pixel pattern, either the −45 ° -direction secondary differential value Ya or the + 45 ° -direction secondary differential value Yb becomes 2α, and the −45 ° -direction secondary differential value. The difference between Ya and the secondary differential value Yb in the + 45 ° direction is α. Further, the difference between the secondary differential value Yc in the 0 ° direction and the secondary differential value Yd in the + 90 ° direction is zero.

第3パターンP3では−45°方向の二次微分値Yaのみが0となり、残りの三方向の二次微分値Yb、Yc、Ydはいずれもαである。右上がりの斜めエッジで出現する画素パターンでは、+45°方向の二次微分値Ybのみが0となり、残りの三方向の二次微分値Ya、Yc、Ydはいずれもαである。このように、画素パターン内に斜めエッジが存在する場合、−45°方向の二次微分値Yaおよび+45°方向の二次微分値Ybのどちらかが0となり、−45°方向の二次微分値Yaと+45°方向の二次微分値Ybとの差分がαとなる。また、0°方向の二次微分値Ycと+90°方向の二次微分値Ydとの差分が0となる。   In the third pattern P3, only the secondary differential value Ya in the −45 ° direction is 0, and the remaining secondary differential values Yb, Yc, and Yd in the three directions are all α. In the pixel pattern that appears at the diagonally upward edge, only the secondary differential value Yb in the + 45 ° direction is 0, and the remaining secondary differential values Ya, Yc, and Yd in the three directions are all α. As described above, when a diagonal edge exists in the pixel pattern, either the −45 ° -direction secondary differential value Ya or the + 45 ° -direction secondary differential value Yb becomes 0, and the −45 ° -direction secondary differential value. The difference between the value Ya and the secondary differential value Yb in the + 45 ° direction is α. Further, the difference between the secondary differential value Yc in the 0 ° direction and the secondary differential value Yd in the + 90 ° direction is zero.

第4パターンP4では0°方向の二次微分値Ycのみが0となり、残りの三方向の二次微分値Ya、Yb、Ydはいずれもαである。第5パターンP5では90°方向の二次微分値Ydのみが0となり、残りの三方向の二次微分値Ya、Yb、Ycはいずれもαである。このように、画素パターン内に水平エッジまたは垂直エッジが存在する場合、0°方向の二次微分値Ycおよび+90°方向の二次微分値Ydのどちらかが0となり、0°方向の二次微分値Ycと+90°方向の二次微分値Ydとの差分がαとなる。また、−45°方向の二次微分値Yaと+45°方向の二次微分値Ybとの差分が0となる。   In the fourth pattern P4, only the secondary differential value Yc in the 0 ° direction is 0, and the remaining secondary differential values Ya, Yb, Yd in the three directions are all α. In the fifth pattern P5, only the secondary differential value Yd in the 90 ° direction is 0, and the remaining secondary differential values Ya, Yb, and Yc in the three directions are all α. As described above, when a horizontal edge or a vertical edge exists in the pixel pattern, either the secondary differential value Yc in the 0 ° direction or the secondary differential value Yd in the + 90 ° direction is 0, and the secondary differential value in the 0 ° direction is zero. The difference between the differential value Yc and the secondary differential value Yd in the + 90 ° direction is α. Also, the difference between the secondary differential value Ya in the −45 ° direction and the secondary differential value Yb in the + 45 ° direction is zero.

ここで、上述した第1評価値E1、第2評価値E2、第3評価値E3および第4評価値E4の算出式を下記式7〜10に示す。   Here, the calculation formulas of the first evaluation value E1, the second evaluation value E2, the third evaluation value E3, and the fourth evaluation value E4 described above are shown in the following formulas 7 to 10.

第1評価値E1=|Ya−Yb| …(式7)
第2評価値E2=|Yc−Yd| …(式8)
第3評価値E3=|Ya|+|Yb| …(式9)
第4評価値E4=|Yc|+|Yd| …(式10)
First evaluation value E1 = | Ya−Yb | (Expression 7)
Second evaluation value E2 = | Yc−Yd | (Expression 8)
Third evaluation value E3 = | Ya | + | Yb | (Formula 9)
Fourth evaluation value E4 = | Yc | + | Yd | (Expression 10)

このように、第1評価値E1がαを超えていれば、コーナーまたは斜めエッジが出現した可能性が高いことを認識することができる。また、第3評価値E3を算出すれば、コーナーか斜めエッジかを分類することも可能である。第3評価値E3が3αを超えていればコーナーと判定することができる。第3評価値E3がαを下回っていれば、斜めエッジと判定することができる。設計者はα〜3α内の所定の値を、コーナーと斜めエッジとを分ける第5閾値に設定することができる。   Thus, if the first evaluation value E1 exceeds α, it can be recognized that there is a high possibility that a corner or an oblique edge has appeared. Further, if the third evaluation value E3 is calculated, it is possible to classify the corner or the diagonal edge. If the third evaluation value E3 exceeds 3α, it can be determined as a corner. If the 3rd evaluation value E3 is less than (alpha), it can determine with an oblique edge. The designer can set a predetermined value within α to 3α to the fifth threshold value that separates the corner and the oblique edge.

αの値が大きい場合、第3評価値E3の値も大きくなる。αの値が大きいということは、注目画素とその隣接画素との間の明るさの変化が大きいことを示し、より鮮明な輪郭であることを示す。第3評価値E3が大きいほど、より鮮明なコーナーであることを示す。すなわち、強度が強いコーナーであることを示す。   When the value of α is large, the value of the third evaluation value E3 is also large. A large value of α indicates that the change in brightness between the pixel of interest and its adjacent pixels is large, indicating a sharper contour. A larger third evaluation value E3 indicates a clearer corner. That is, the corner is strong.

また、第2評価値E2がαを超えていれば、水平エッジまたは垂直エッジが出現した可能性が高いことを認識することができる。また、0°方向の二次微分値Ycと+90°方向の二次微分値Ydを参照すれば、水平エッジか垂直エッジかを分類することも可能である。第3評価値E3と同様に、第4評価値E4が大きいほど、より鮮明な、水平エッジまたは垂直エッジであることを示す。すなわち、強度が強い、水平エッジまたは垂直エッジであることを示す。   If the second evaluation value E2 exceeds α, it can be recognized that there is a high possibility that a horizontal edge or a vertical edge has appeared. Further, by referring to the secondary differential value Yc in the 0 ° direction and the secondary differential value Yd in the + 90 ° direction, it is possible to classify the horizontal edge or the vertical edge. Similar to the third evaluation value E3, the larger the fourth evaluation value E4, the clearer the horizontal edge or the vertical edge. That is, it indicates that the strength is a horizontal edge or a vertical edge.

なお、第1評価値E1〜第4評価値E4は絶対値で表現されるため、図5に示した第1パターンP1〜第5パターンP5において、白丸画素と黒丸画素とがすべて反転した画素パターンについても、それぞれ元のパターンと同じ評価値となる。また、注目画素の両側の白丸画素と黒丸画素とが入れ替わっても、同じ二次微分値が算出されるが、自然画像ではそのような画素パターンは非常に少ないといえる。   Since the first evaluation value E1 to the fourth evaluation value E4 are expressed as absolute values, in the first pattern P1 to the fifth pattern P5 shown in FIG. 5, the pixel pattern in which the white circle pixels and the black circle pixels are all inverted. The same evaluation value as that of the original pattern is also obtained. Further, even if the white circle pixels and the black circle pixels on both sides of the target pixel are interchanged, the same secondary differential value is calculated, but it can be said that such a pixel pattern is very few in a natural image.

図7は、実施の形態1に係る特徴点検出装置100を使用して、フレーム画像内から特徴点を検出する処理の一例を示すフローチャートである。二次微分値を求めるには両側に隣接画素が必要なため、フレーム画像内において、一番上および一番下の水平方向の画素列、ならびに一番左および一番右の垂直方向の画素列に属する画素については二次微分値を算出しない。後述するフレーム画像内のすべての画素とは、これらの画素を除いた画素を指す。   FIG. 7 is a flowchart illustrating an example of processing for detecting a feature point from a frame image using the feature point detection apparatus 100 according to the first embodiment. Since adjacent pixels are required on both sides to obtain the secondary differential value, the top and bottom horizontal pixel columns and the left and rightmost vertical pixel columns in the frame image No second derivative value is calculated for pixels belonging to. All pixels in a frame image to be described later refer to pixels excluding these pixels.

まず、フレーム画像内の任意の画素を注目画素の初期値に設定する。たとえば、上から二番目および左から二番目の画素を初期値とする。判定部30はその注目画素の第1評価値E1=|Ya−Yb|と第1閾値Yth1とを比較する(S10)。第1評価値E1が第1閾値Yth1より大きい場合(S10のY)、判定部30は第3評価値E3=|Ya|+|Yb|と第3閾値Yth3とを比較する(S12)。第3評価値E3が第3閾値Yth3より大きい場合(S12のY)、その注目画素を特徴点に設定する(S18)。   First, an arbitrary pixel in the frame image is set as an initial value of the target pixel. For example, the second pixel from the top and the second pixel from the left are set as initial values. The determination unit 30 compares the first evaluation value E1 = | Ya−Yb | of the target pixel with the first threshold value Yth1 (S10). When the first evaluation value E1 is larger than the first threshold value Yth1 (Y in S10), the determination unit 30 compares the third evaluation value E3 = | Ya | + | Yb | with the third threshold value Yth3 (S12). When the third evaluation value E3 is larger than the third threshold Yth3 (Y in S12), the target pixel is set as a feature point (S18).

ステップS10にて第1評価値E1が第1閾値Yth1以下の場合(S10のN)、およびステップS12にて第3評価値E3が第3閾値Yth3以下の場合(S12のN)、判定部30はその注目画素の第2評価値E2=|Yc−Yd|と第2閾値Yth2とを比較する(S14)。第2評価値E2が第2閾値Yth2より大きい場合(S14のY)、判定部30は第4評価値E4=|Yc|+|Yd|と第4閾値Yth4とを比較する(S16)。第4評価値E4が第4閾値Yth4より大きい場合(S16のY)、その注目画素を特徴点に設定する(S18)。   When the first evaluation value E1 is less than or equal to the first threshold value Yth1 in step S10 (N of S10), and when the third evaluation value E3 is less than or equal to the third threshold value Yth3 in step S12 (N of S12), the determination unit 30 Compares the second evaluation value E2 = | Yc−Yd | of the target pixel with the second threshold value Yth2 (S14). When the second evaluation value E2 is larger than the second threshold value Yth2 (Y in S14), the determination unit 30 compares the fourth evaluation value E4 = | Yc | + | Yd | with the fourth threshold value Yth4 (S16). When the fourth evaluation value E4 is larger than the fourth threshold Yth4 (Y in S16), the target pixel is set as a feature point (S18).

ステップS14にて第2評価値E2が第2閾値Yth2以下の場合(S14のN)、およびステップS16にて第4評価値E4が第4閾値Yth4以下の場合(S16のN)、判定部30はその注目画素を特徴点と判定しない。   When the second evaluation value E2 is equal to or smaller than the second threshold value Yth2 in step S14 (N in S14), and when the fourth evaluation value E4 is equal to or smaller than the fourth threshold value Yth4 in step S16 (N in S16), the determination unit 30 Does not determine the target pixel as a feature point.

判定部30はこの特徴点に設定すべきか否かの判定がフレーム画像内のすべての画素について終了したか否かを判定する(S20)。終了していない場合(S20のN)、判定部30はつぎの画素を注目画素に設定する(S22)。以下、ステップS10に遷移して上述した判定処理を継続する。終了した場合(S20のY)、そのフレーム画像における特徴点の検出処理を終了する。   The determination unit 30 determines whether or not the determination as to whether or not the feature point should be set has been completed for all the pixels in the frame image (S20). If not completed (N in S20), the determination unit 30 sets the next pixel as a target pixel (S22). Thereafter, the process proceeds to step S10 and the determination process described above is continued. If completed (Y in S20), the feature point detection process in the frame image ends.

このフローチャートに示すアルゴリズムは、特徴点としてコーナーをエッジより優先したものである。通常、コーナーのほうがエッジより出現頻度が低く、価値が高いためである。なお、コーナーをエッジより優先するアルゴリズム、コーナーのみを検出するアルゴリズム、斜めエッジのみを検出するアルゴリズム、ならびに水平エッジおよび垂直エッジのみを検出するアルゴリズムも当業者であれば、容易に実施可能である。   The algorithm shown in this flowchart gives priority to corners as feature points. This is because corners are usually less frequent and more valuable than edges. Those skilled in the art can easily implement an algorithm that prioritizes corners over edges, an algorithm that detects only corners, an algorithm that detects only diagonal edges, and an algorithm that detects only horizontal and vertical edges.

なお、上記フローチャートには二次微分値算出部10および評価値算出部20の処理を明示的に記述していないが、以下に示す二つの処理方法がある。第1の処理方法は、すべての画素について二次微分値算出部10が四方向の二次微分値Ya、Yb、Yc、Ydを算出し、および評価値算出部20が第1評価値E1〜第4評価値E4を算出する処理方法である。   In addition, although the process of the secondary differential value calculation part 10 and the evaluation value calculation part 20 is not explicitly described in the said flowchart, there exist the following two processing methods. In the first processing method, the secondary differential value calculation unit 10 calculates the quadratic secondary differential values Ya, Yb, Yc, and Yd for all the pixels, and the evaluation value calculation unit 20 uses the first evaluation values E1 to E1. This is a processing method for calculating the fourth evaluation value E4.

第2の処理方法は、すべての画素について特徴点の判定に必要な限度で、二次微分値算出部10および評価値算出部20がそれらの値を算出する処理方法である。たとえば、第1評価値E1が第1閾値Yth1より大きく、かつ第3評価値E3が第3閾値Yth3より大きい場合、二次微分値算出部10は0°方向の二次微分値Ycおよび+90°方向の二次微分値Ydを算出せず、評価値算出部20は第2評価値E2および第4評価値E4を算出しない。第2の処理方法は無駄な演算を省くことができる。   The second processing method is a processing method in which the secondary differential value calculation unit 10 and the evaluation value calculation unit 20 calculate those values within the limits necessary for determining feature points for all pixels. For example, when the first evaluation value E1 is larger than the first threshold value Yth1 and the third evaluation value E3 is larger than the third threshold value Yth3, the secondary differential value calculation unit 10 calculates the secondary differential value Yc in the 0 ° direction and + 90 °. The secondary differential value Yd in the direction is not calculated, and the evaluation value calculation unit 20 does not calculate the second evaluation value E2 and the fourth evaluation value E4. The second processing method can eliminate useless calculations.

以上説明したように実施の形態1によれば、一定の精度を維持しつつ、簡単な演算処理で特徴点を検出することができる。すなわち、右下がり斜め方向の二次微分値と右上がり斜め方向の二次微分値との差分を評価することにより、コーナーまたは斜めエッジを検出することができる。また、水平方向の二次微分値と垂直方向の二次微分値との差分を評価することにより、水平エッジまたは垂直エッジを検出することができる。いずれの場合も、簡単な、四則演算および閾値判定処理のみで検出することができる。また、後述する図9(a)、図9(b)に示すようにその検出精度も高い。また、複雑な演算処理を必要としないため、ハードウェア資源で実装することも容易である。   As described above, according to the first embodiment, it is possible to detect feature points by a simple calculation process while maintaining a certain accuracy. That is, a corner or a diagonal edge can be detected by evaluating the difference between the second-order differential value in the diagonally downward direction and the secondary differential value in the diagonally right-up direction. Further, by evaluating the difference between the secondary differential value in the horizontal direction and the secondary differential value in the vertical direction, a horizontal edge or a vertical edge can be detected. In either case, detection can be performed only by simple four arithmetic operations and threshold determination processing. Further, as shown in FIGS. 9A and 9B described later, the detection accuracy is high. In addition, since complicated arithmetic processing is not required, it is easy to implement with hardware resources.

また、コーナーおよびエッジの強度を検出することができ、その強度を特徴点の検出精度の向上や、特徴点の数の調整に利用することができる。具体的には、第3閾値および第4閾値を高く設定することにより、特徴点の検出精度を向上させることができる。すなわち、誤検出を低減することができる。また、フレーム画像内から検出される特徴点の数を減らすことができる。一方、第3閾値および第4閾値を低く設定することにより、フレーム画像内から検出される特徴点の数を増やすことができる。   Further, the strength of corners and edges can be detected, and the strength can be used for improving the detection accuracy of feature points and adjusting the number of feature points. Specifically, the detection accuracy of the feature points can be improved by setting the third threshold value and the fourth threshold value high. That is, erroneous detection can be reduced. In addition, the number of feature points detected from the frame image can be reduced. On the other hand, by setting the third threshold value and the fourth threshold value low, the number of feature points detected from within the frame image can be increased.

図8は、本発明の実施の形態2に係る特徴点検出装置150の構成を示すブロック図である。実施の形態2に係る特徴点検出装置150は、分割部5、二次微分値算出部10、評価値算出部20および特徴点検出部40を備える。   FIG. 8 is a block diagram showing a configuration of feature point detection apparatus 150 according to Embodiment 2 of the present invention. The feature point detection apparatus 150 according to Embodiment 2 includes a dividing unit 5, a secondary differential value calculation unit 10, an evaluation value calculation unit 20, and a feature point detection unit 40.

分割部5は、入力されるフレーム画像を複数の部分領域に分割する。この部分領域は縦n画素×横m画素(n,mは3以上の整数)の矩形の窓領域であってもよい。なお、上記部分領域は必ずしも矩形である必要はなく、SUSANオペレータで設定されるような円形状の領域であってもよい。   The dividing unit 5 divides the input frame image into a plurality of partial areas. This partial region may be a rectangular window region of vertical n pixels × horizontal m pixels (n and m are integers of 3 or more). Note that the partial area is not necessarily rectangular, and may be a circular area set by a SUSAN operator.

二次微分値算出部10は、分割部5により分割された各部分領域の各画素ごとに、右下がり斜め方向の二次微分値、右上がり斜め方向の二次微分値、水平方向の二次微分値および垂直方向の二次微分値を算出する。これらの二次微分値の算出方法は、実施の形態1で説明した算出方法と同様である。   For each pixel of each partial area divided by the dividing unit 5, the secondary differential value calculation unit 10 has a second-order differential value in the right-down diagonal direction, a second-order differential value in the right-up diagonal direction, and a horizontal second-order differential value. The differential value and the secondary differential value in the vertical direction are calculated. The calculation method of these secondary differential values is the same as the calculation method described in the first embodiment.

評価値算出部20は、各部分領域の各画素ごとに、右下がり斜め方向の二次微分値と右上がり斜め方向の二次微分値との絶対値差を第1評価値として算出し、水平方向の二次微分値と垂直方向の二次微分値との絶対値差を第2評価値として算出する。   The evaluation value calculation unit 20 calculates, as the first evaluation value, the absolute value difference between the second-order differential value in the lower right diagonal direction and the second-order differential value in the upper right diagonal direction for each pixel in each partial region. The absolute value difference between the secondary differential value in the direction and the secondary differential value in the vertical direction is calculated as the second evaluation value.

評価値算出部20は、各画素または第1評価値が第1閾値を超える画素における、右下がり斜め方向の二次微分値の絶対値と、右上がり斜め方向の二次微分値の絶対値との和を第3評価値として算出する。また、評価値算出部20は、各画素または第2評価値が第2閾値を超える画素における、水平方向の二次微分値の絶対値と、垂直方向の二次微分値の絶対値との和を第4評価値として算出する。なお、第3評価値および第4評価値は、すべての画素について算出されてもよいし、特徴点を検出するために必要な限度で算出されてもよい。   The evaluation value calculation unit 20 calculates the absolute value of the second-order differential value in the lower right diagonal direction and the absolute value of the second-order differential value in the upper right diagonal direction in each pixel or a pixel in which the first evaluation value exceeds the first threshold value. Is calculated as the third evaluation value. In addition, the evaluation value calculation unit 20 sums the absolute value of the secondary differential value in the horizontal direction and the absolute value of the secondary differential value in the vertical direction at each pixel or a pixel whose second evaluation value exceeds the second threshold value. Is calculated as the fourth evaluation value. Note that the third evaluation value and the fourth evaluation value may be calculated for all the pixels, or may be calculated to the limit necessary for detecting the feature points.

特徴点検出部40は、各部分領域ごとに少なくとも一つの特徴点を検出する。以下、具体的に説明する。特徴点検出部40は、ある部分領域内の各画素の第1評価値と、第1閾値とをそれぞれ比較する。第1評価値が第1閾値を超える画素がその部分領域内に少なくとも一つ存在する場合、特徴点検出部40はその少なくとも一つの画素を部分領域の特徴点候補に決定する。   The feature point detection unit 40 detects at least one feature point for each partial region. This will be specifically described below. The feature point detection unit 40 compares the first evaluation value of each pixel in a certain partial region with the first threshold value. When at least one pixel whose first evaluation value exceeds the first threshold exists in the partial area, the feature point detection unit 40 determines the at least one pixel as a feature point candidate of the partial area.

第1評価値が第1閾値を超える画素がその部分領域内に存在しない場合、特徴点検出部40は、その部分領域内の各画素の第2評価値と、第2閾値とをそれぞれ比較する。第2評価値が第2閾値を超える画素が部分領域内に少なくとも一つ存在する場合、特徴点検出部40はその少なくとも一つの画素を部分領域の特徴点候補に決定する。   When the pixel whose first evaluation value exceeds the first threshold does not exist in the partial region, the feature point detection unit 40 compares the second evaluation value of each pixel in the partial region with the second threshold. . When at least one pixel whose second evaluation value exceeds the second threshold exists in the partial region, the feature point detection unit 40 determines the at least one pixel as a feature point candidate for the partial region.

上記部分領域において第1評価値が第1閾値を超える画素が存在する場合、特徴点検出部40は第3評価値が最も大きい画素または第3評価値の大きい上位複数の画素を部分領域の特徴点に決定する。各部分領域ごとに二つの特徴点を設定する場合、第3評価値が一番大きい画素と二番目に大きい画素を特徴点に決定する。上記部分領域において第1評価値が第1閾値を超える画素が存在せず、かつ第2評価値が第2閾値を超える画素が存在する場合、特徴点検出部40は第4評価値が最も大きい画素または第4評価値の大きい上位複数の画素を部分領域の特徴点に決定する。   When there is a pixel whose first evaluation value exceeds the first threshold value in the partial area, the feature point detection unit 40 selects a pixel having the largest third evaluation value or a plurality of upper pixels having a large third evaluation value as a feature of the partial area. Decide on a point. When two feature points are set for each partial region, the pixel having the third highest evaluation value and the second largest pixel are determined as the feature points. When there is no pixel whose first evaluation value exceeds the first threshold in the partial area and there is a pixel whose second evaluation value exceeds the second threshold, the feature point detection unit 40 has the largest fourth evaluation value. A pixel or a plurality of higher-order pixels having a large fourth evaluation value are determined as feature points of the partial region.

上記部分領域において第1評価値が第1閾値を超える画素が存在せず、かつ第2評価値が第2閾値を超える画素も存在しない場合、特徴点検出部40は上記部分領域内のあらかじめ設定された固定位置の画素を上記部分領域の仮の特徴点に設定するとともに、正規の特徴点が存在しないことを示すフラグを立てる。当該固定位置の画素は、各部分領域の中央に位置する画素であってもよいし、左上隅の画素であってもよいし、その他の位置の画素であってもよい。   When there is no pixel whose first evaluation value exceeds the first threshold in the partial area and no pixel whose second evaluation value exceeds the second threshold, the feature point detection unit 40 sets in advance in the partial area. The pixel at the fixed position is set as a temporary feature point of the partial area, and a flag indicating that no regular feature point exists is set. The pixel at the fixed position may be a pixel located at the center of each partial area, a pixel at the upper left corner, or a pixel at another position.

特徴点検出部40は、特徴点を検出した部分領域については、その特徴点の位置情報(たとえば、座標値)および画素値を特定するとともに、その部分領域に有効な特徴点が設定されていることを示すフラグを立ててもよい。特徴点検出部40は、特徴点を検出できず、上記固定位置の画素を設定した部分領域については、その画素の位置情報および画素値を特定するとともに、その部分領域に無効な特徴点が設定されていることを示すフラグを立ててもよい。   The feature point detection unit 40 specifies the position information (for example, coordinate values) and pixel values of the feature points of the partial areas in which the feature points are detected, and effective feature points are set in the partial areas. You may raise the flag which shows. The feature point detection unit 40 cannot detect a feature point, and for the partial area in which the pixel at the fixed position is set, specifies the position information and the pixel value of the pixel, and sets an invalid feature point in the partial area. A flag may be set to indicate that this is done.

図9(a)は、実施の形態2に係る特徴点検出装置150により特徴点が設定されたフレーム画像を示す図である。図9(a)に示すフレーム画像内にはその中央に長方形のオブジェクトが描かれている。図9(a)に示すフレーム画像内には上記部分領域として、複数の正方形窓が設定される。ここでは、各正方形窓に一つの特徴点を設定する。正方形窓W(1,1)〜正方形窓W(6,1)、正方形窓W(1,1)〜正方形窓W(1,5)、正方形窓W(1,5)〜正方形窓W(3,5)、および正方形窓W(6,1)〜正方形窓W(6,5)には上記オブジェクトが含まれない。それらの正方形窓では上記オブジェクトのコーナーやエッジが検出されない。したがって、それらの正方形窓には固定位置のダミーの特徴点が設定される。図9(a)ではそれぞれの正方形窓の中央位置にダミーの特徴点が設定される。   FIG. 9A is a diagram illustrating a frame image in which feature points are set by the feature point detection apparatus 150 according to the second embodiment. In the frame image shown in FIG. 9A, a rectangular object is drawn at the center. A plurality of square windows are set as the partial areas in the frame image shown in FIG. Here, one feature point is set for each square window. Square window W (1,1) to Square window W (6,1), Square window W (1,1) to Square window W (1,5), Square window W (1,5) to Square window W (3 , 5), and the square window W (6, 1) to square window W (6, 5) do not include the object. In those square windows, the corners and edges of the object are not detected. Accordingly, dummy feature points at fixed positions are set in these square windows. In FIG. 9A, a dummy feature point is set at the center position of each square window.

また、正方形窓W(3,3)および正方形窓W(4,3)は上記オブジェクトの内部に含まれ、上記オブジェクトのコーナーやエッジを含まない。したがって、それらの正方形窓にも固定位置のダミーの特徴点が設定される。   In addition, the square window W (3, 3) and the square window W (4, 3) are included in the object, and do not include the corners and edges of the object. Accordingly, dummy feature points at fixed positions are also set in these square windows.

正方形窓W(2,2)、正方形窓W(5,2)、正方形窓W(2,4)および正方形窓W(5,4)は、上記オブジェクトのコーナーを含む。したがって、それぞれの正方形窓ではそのコーナー部分に、特徴点F(2,2)、特徴点F(5,2)、特徴点F(2,4)および特徴点F(5,4)がそれぞれ検出される。正方形窓W(3,2)、正方形窓W(4,2)、正方形窓W(2,3)、正方形窓W(5,3)、正方形窓W(3,4)および正方形窓W(4,4)、正方形窓W(4,5)および正方形窓W(5,5)は、上記オブジェクトの水平エッジまたは垂直エッジを含む。したがって、それぞれの正方形窓ではそのエッジ部分に、特徴点F(3,2)、特徴点F(4,2)、特徴点F(2,3)、特徴点F(5,3)、特徴点F(3,4)、特徴点F(4,4)、特徴点F(4,5)および特徴点F(5,5)がそれぞれ検出される。   The square window W (2, 2), the square window W (5, 2), the square window W (2, 4), and the square window W (5, 4) include the corners of the object. Therefore, in each square window, the feature point F (2, 2), feature point F (5, 2), feature point F (2, 4) and feature point F (5, 4) are detected at the corners, respectively. Is done. Square window W (3,2), Square window W (4,2), Square window W (2,3), Square window W (5,3), Square window W (3,4) and Square window W (4 , 4), the square window W (4, 5) and the square window W (5, 5) include the horizontal edge or the vertical edge of the object. Therefore, in each square window, the feature point F (3,2), feature point F (4,2), feature point F (2,3), feature point F (5,3), feature point F (3,4), feature point F (4,4), feature point F (4,5) and feature point F (5,5) are detected.

図9(b)は、上記KLT法により特徴点が設定されたフレーム画像を示す図である。KLT法ではHarrisオペレータが使用される。図9(b)のフレーム画像内に描かれているオブジェクトは図9(a)のフレーム画像内に描かれているオブジェクトと同じである。上記オブジェクトのコーナーおよびエッジに特徴点が検出されているが、三箇所、誤検出がある(E1、E2およびE3参照)。これらの特徴点はコーナーおよびエッジ以外の領域で検出されている。   FIG. 9B is a diagram showing a frame image in which feature points are set by the KLT method. In the KLT method, a Harris operator is used. The object drawn in the frame image of FIG. 9B is the same as the object drawn in the frame image of FIG. Although feature points are detected at corners and edges of the object, there are three misdetections (see E1, E2, and E3). These feature points are detected in regions other than corners and edges.

図10は、実施の形態2に係る特徴点検出装置150を使用して、フレーム画像内から特徴点を検出する処理の一例を示すフローチャートである。このフローチャートに示すアルゴリズムは一つの部分領域内に一つの特徴点を設定するためのものである。したがって、フレーム画像内に設定されたすべての部分領域について、このアルゴリズムが実行される。   FIG. 10 is a flowchart illustrating an example of processing for detecting a feature point from a frame image using the feature point detection apparatus 150 according to the second embodiment. The algorithm shown in this flowchart is for setting one feature point in one partial area. Therefore, this algorithm is executed for all the partial areas set in the frame image.

まず、対象とする部分領域内の任意の画素を注目画素の初期値に設定する。たとえば、左上隅の画素を初期値とする。特徴点検出部40はその注目画素の第1評価値E1=|Ya−Yb|と第1閾値Yth1とを比較する(S30)。第1評価値E1が第1閾値Yth1より大きい場合(S30のY)、特徴点検出部40はその画素を、コーナーおよび斜めエッジの候補に設定する(S32)。   First, an arbitrary pixel in the target partial area is set as an initial value of the target pixel. For example, the pixel at the upper left corner is set as the initial value. The feature point detection unit 40 compares the first evaluation value E1 = | Ya−Yb | of the target pixel with the first threshold value Yth1 (S30). When the first evaluation value E1 is larger than the first threshold Yth1 (Y in S30), the feature point detection unit 40 sets the pixel as a candidate for a corner and an oblique edge (S32).

第1評価値E1が第1閾値Yth1以下の場合(S30のN)、特徴点検出部40はその注目画素の第2評価値E2=|Yc−Yd|と第2閾値Yth2とを比較する(S34)。第2評価値E2が第2閾値Yth2より大きい場合(S34のY)、特徴点検出部40はその画素を、水平エッジおよび垂直エッジの候補に設定する(S36)。第2評価値E2が第2閾値Yth2以下の場合(S34のN)、特徴点検出部40はその画素を、特徴点候補に設定しない。   When the first evaluation value E1 is equal to or less than the first threshold value Yth1 (N in S30), the feature point detection unit 40 compares the second evaluation value E2 = | Yc−Yd | of the target pixel with the second threshold value Yth2 ( S34). When the second evaluation value E2 is larger than the second threshold Yth2 (Y in S34), the feature point detection unit 40 sets the pixel as a candidate for a horizontal edge and a vertical edge (S36). When the second evaluation value E2 is equal to or smaller than the second threshold Yth2 (N in S34), the feature point detection unit 40 does not set the pixel as a feature point candidate.

特徴点検出部40はこの特徴点に設定すべきか否かの判定が上記部分領域内のすべての画素について終了したか否かを判定する(S38)。終了していない場合(S38のN)、特徴点検出部40はつぎの画素を注目画素に設定する(S40)。以下、ステップS30に遷移して上述した判定処理を継続する。終了した場合(S38のY)、以下の処理を実行する。   The feature point detection unit 40 determines whether or not the determination as to whether or not the feature point should be set has been completed for all the pixels in the partial region (S38). If not completed (N in S38), the feature point detection unit 40 sets the next pixel as a target pixel (S40). Thereafter, the process proceeds to step S30 and the determination process described above is continued. If completed (Y in S38), the following processing is executed.

特徴点検出部40はコーナーおよび斜めエッジの候補が存在するか否か判定する(S42)。存在する場合(S42のY)、特徴点検出部40はコーナーおよび斜めエッジの候補のうち、第3評価値E3=|Ya|+|Yb|が最大のものを特徴点に設定し(S44)、処理を終了する。コーナーおよび斜めエッジの候補が存在しない場合(S42のN)、特徴点検出部40は水平エッジおよび垂直エッジの候補が存在するか否か判定する(S46)。存在する場合(S46のY)、特徴点検出部40は水平エッジおよび垂直エッジの候補のうち、第4評価値E4=|Yc|+|Yd|が最大のものを特徴点に設定し(S48)、処理を終了する。水平エッジおよび垂直エッジの候補が存在しない場合(S46のN)、特徴点検出部40はあらかじめ設定された固定画素をダミーの特徴点に設定し(S50)、処理を終了する。   The feature point detection unit 40 determines whether there are corner and oblique edge candidates (S42). If it exists (Y in S42), the feature point detection unit 40 sets a feature point having a maximum third evaluation value E3 = | Ya | + | Yb | among corner and oblique edge candidates (S44). The process is terminated. When there are no corner and oblique edge candidates (N in S42), the feature point detection unit 40 determines whether there are horizontal edge and vertical edge candidates (S46). If it exists (Y in S46), the feature point detection unit 40 sets a candidate having the maximum fourth evaluation value E4 = | Yc | + | Yd | as a feature point among candidates for the horizontal edge and the vertical edge (S48). ), The process is terminated. If there is no candidate for a horizontal edge or a vertical edge (N in S46), the feature point detection unit 40 sets a preset fixed pixel as a dummy feature point (S50), and ends the process.

このフローチャートに示すアルゴリズムは、一つの部分領域に一つの特徴点を設定するものであるが、一つの部分領域に複数の特徴点を設定するアルゴリズムも当業者であれば、容易に実施可能である。   The algorithm shown in this flowchart sets one feature point in one partial area, but an algorithm for setting a plurality of feature points in one partial area can be easily implemented by those skilled in the art. .

以上説明したように実施の形態2によれば、実施の形態1の効果と同様の効果を奏する。実施の形態1の効果に加えて以下の効果を奏する。実施の形態2ではフレーム画像を複数の部分領域に分割し、それぞれの部分領域に決まった数の特徴点を設定する。また、特徴点を検出できなかった部分領域についてもダミーの特徴点を設定する。これらにより、フレーム画像内における特徴点の密度または分布を均一化することができる。したがって、特徴点検出装置150の後段の処理ブロックをハードウェア資源で設計することが容易となる。   As described above, according to the second embodiment, the same effects as those of the first embodiment can be obtained. In addition to the effects of the first embodiment, the following effects can be obtained. In the second embodiment, the frame image is divided into a plurality of partial areas, and a fixed number of feature points are set in each partial area. Also, dummy feature points are set for the partial areas where feature points could not be detected. As a result, the density or distribution of feature points in the frame image can be made uniform. Therefore, it becomes easy to design the subsequent processing block of the feature point detection apparatus 150 with hardware resources.

つぎに、実施の形態2に係る特徴点検出装置150を適用した動画像処理システムについて説明する。図11は、実施の形態3に係る動画像処理システム200の構成を示す。動画像処理システム200は、撮像部210および動画像処理装置220を備える。撮像部210は、撮像素子60および信号処理部62を有する。動画像処理装置220は、フレームバッファ70、対象フレーム選択部72、参照フレーム選択部74、オプティカルフロー検出部76および後処理部80を有する。オプティカルフロー検出部76は、特徴点検出装置150およびオプティカルフロー演算部78を含む。   Next, a moving image processing system to which the feature point detection apparatus 150 according to Embodiment 2 is applied will be described. FIG. 11 shows a configuration of a moving image processing system 200 according to the third embodiment. The moving image processing system 200 includes an imaging unit 210 and a moving image processing device 220. The imaging unit 210 includes an imaging element 60 and a signal processing unit 62. The moving image processing apparatus 220 includes a frame buffer 70, a target frame selection unit 72, a reference frame selection unit 74, an optical flow detection unit 76, and a post-processing unit 80. The optical flow detection unit 76 includes a feature point detection device 150 and an optical flow calculation unit 78.

撮像部210は、車両などの移動体や、壁や柱などの建造物に搭載され、動画像を撮像して動画像処理装置220に出力する。撮像素子60は、CCD(Charge Coupled Devices)センサやCMOS(Complementary Metal-Oxide Semiconductor)イメージセンサなどが用いられ、入射光を電気信号に変換し、信号処理部62に出力する。   The imaging unit 210 is mounted on a moving body such as a vehicle or a building such as a wall or a pillar, captures a moving image, and outputs the moving image to the moving image processing apparatus 220. The imaging device 60 uses a CCD (Charge Coupled Devices) sensor, a CMOS (Complementary Metal-Oxide Semiconductor) image sensor, or the like, converts incident light into an electrical signal, and outputs the electrical signal to the signal processing unit 62.

信号処理部62は、撮像素子60から入力されるアナログ信号をデジタル信号に変換する。また、平滑化フィルタを備え、動画像処理装置220に対して出力する画像データに対して平滑化処理を施してもよい。また、その他のノイズ除去処理を施してもよい。   The signal processing unit 62 converts the analog signal input from the image sensor 60 into a digital signal. Further, a smoothing filter may be provided, and smoothing processing may be performed on the image data output to the moving image processing apparatus 220. Further, other noise removal processing may be performed.

動画像処理装置220は、撮像部210から入力される画像データからオプティカルフローを検出する。フレームバッファ70は、q(qは自然数)フレーム画像分、格納する領域を持ち、撮像部210から入力される画像データを一時格納する。フレームバッファ70の領域が溢れた場合、先に入力されたフレーム画像から順番に破棄する。フレームバッファ70に格納されたフレーム画像は、対象フレーム選択部72および参照フレーム選択部74に出力される。   The moving image processing device 220 detects an optical flow from the image data input from the imaging unit 210. The frame buffer 70 has an area for storing q (q is a natural number) frame images, and temporarily stores image data input from the imaging unit 210. When the area of the frame buffer 70 overflows, the frame image input first is discarded in order. The frame image stored in the frame buffer 70 is output to the target frame selection unit 72 and the reference frame selection unit 74.

対象フレーム選択部72は、フレームバッファ70内のフレーム画像を順番にオプティカルフロー検出部76に出力する。ここで、フレームバッファ70内のフレーム画像は適宜、間引いて、出力されてもよい。参照フレーム選択部74は、対象フレーム選択部72で選択されたフレーム画像の参照フレーム画像を選択し、フレームバッファ70内から取得する。   The target frame selection unit 72 sequentially outputs the frame images in the frame buffer 70 to the optical flow detection unit 76. Here, the frame images in the frame buffer 70 may be appropriately thinned out and output. The reference frame selection unit 74 selects a reference frame image of the frame image selected by the target frame selection unit 72 and acquires it from the frame buffer 70.

オプティカルフロー検出部76は、上記対象フレーム画像と上記参照フレーム画像とを用いて、オプティカルフローを検出する。特徴点検出装置150は、実施の形態2で説明した装置であり、対象フレーム選択部72により選択された対象フレーム画像内から複数の特徴点を検出する。その際、上述したように部分領域単位で特徴点を検出する。なお、特徴点の検出処理を解像度の異なる複数の階層で実行してもよい。特徴点検出装置150は、検出した特徴点の、位置情報および画素値をオプティカルフロー演算部78に出力する。   The optical flow detection unit 76 detects an optical flow using the target frame image and the reference frame image. The feature point detection device 150 is the device described in the second embodiment, and detects a plurality of feature points from the target frame image selected by the target frame selection unit 72. At this time, as described above, feature points are detected in units of partial areas. Note that the feature point detection process may be executed in a plurality of layers having different resolutions. The feature point detection device 150 outputs position information and pixel values of the detected feature points to the optical flow calculation unit 78.

オプティカルフロー演算部78は、特徴点検出装置150により検出された、複数の特徴点のオプティカルフローをそれぞれ算出する。オプティカルフロー演算部78は、対象フレーム選択部72により選択された対象フレーム画像、特徴点検出装置150から入力された特徴点の位置情報および画素値、ならびに参照フレーム選択部74により選択された参照フレーム画像に基づき、オプティカルフローを算出する。より具体的には、対象フレーム画像内で検出された複数の特徴点にそれぞれ対応する点を、参照フレーム画像内で探索する。   The optical flow calculation unit 78 calculates optical flows of a plurality of feature points detected by the feature point detection device 150, respectively. The optical flow calculation unit 78 includes a target frame image selected by the target frame selection unit 72, position information and pixel values of feature points input from the feature point detection device 150, and a reference frame selected by the reference frame selection unit 74. An optical flow is calculated based on the image. More specifically, a point corresponding to each of a plurality of feature points detected in the target frame image is searched for in the reference frame image.

後処理部80は、オプティカルフロー検出部76から出力されたオプティカルフローに対して所定の後処理を施す。たとえば、後処理部80は上述した正規の特徴点が存在しないことを示すフラグが立っている部分領域の特徴点のオプティカルフローを無効とする。   The post-processing unit 80 performs predetermined post-processing on the optical flow output from the optical flow detection unit 76. For example, the post-processing unit 80 invalidates the optical flow of the feature point of the partial area where the flag indicating that the regular feature point does not exist is set.

また、後処理部80は入力されるオプティカルフローから、撮像部210自体の移動による成分を差し引く処理を行ってもよい。また、後処理部80はノイズを除去するため、入力されるオプティカルフローの長さを第6閾値と比較して、有効とすべきオプティカルフローの長さを制限する処理を行ってもよい。ノイズ除去用の第6閾値は、あらかじめ設定された値でもよいし、当該平均値またはその平均値を調整した値であってもよい。また、後処理部80はオプティカルフロー検出部76から出力されたオプティカルフローの長さの平均値を算出してもよい。   Further, the post-processing unit 80 may perform a process of subtracting a component due to the movement of the imaging unit 210 itself from the input optical flow. Further, in order to remove noise, the post-processing unit 80 may perform a process of limiting the length of the optical flow to be validated by comparing the length of the input optical flow with the sixth threshold value. The sixth threshold value for noise removal may be a preset value, or may be a value obtained by adjusting the average value or the average value. Further, the post-processing unit 80 may calculate an average value of the lengths of the optical flows output from the optical flow detection unit 76.

以上説明したように実施の形態3によれば、オプティカルフロー算出の前処理として、実施の形態2に係る特徴点検出装置150を利用して、オプティカルフローの算出対象とすべき特徴点を検出することにより、その算出対象を大幅に減らすことができる。よって、オプティカルフロー算出処理を高速化することが可能である。また、特徴点の密度が均一化されているため、オプティカルフロー検出部76および後処理部80をハードウェア資源で構成することが容易である。また、特徴点を検出できなかった部分領域ではオプティカルフローをマスクすることができるため、オプティカルフローの誤検出を低減することができる。   As described above, according to the third embodiment, as a pre-process for optical flow calculation, the feature point detection device 150 according to the second embodiment is used to detect a feature point that is to be an optical flow calculation target. As a result, the calculation objects can be greatly reduced. Therefore, it is possible to speed up the optical flow calculation process. Further, since the density of feature points is uniform, it is easy to configure the optical flow detection unit 76 and the post-processing unit 80 with hardware resources. In addition, since the optical flow can be masked in the partial region where the feature point cannot be detected, erroneous detection of the optical flow can be reduced.

以上、本発明をいくつかの実施形態をもとに説明した。これらの実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on some embodiments. It is understood by those skilled in the art that these embodiments are exemplifications, and that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. By the way.

実施の形態1、2では二次微分値を算出する基礎とすべき、注目画素とその両側の周辺画素とが直接、接している例を示したが、注目画素とその両側の周辺画素との間に、一画素または数画素が挿入されていてもよい。   In the first and second embodiments, the example in which the pixel of interest and the neighboring pixels on both sides thereof are in direct contact with each other is shown as the basis for calculating the second derivative value. One pixel or several pixels may be inserted between them.

実施の形態3では、オプティカルフロー検出部76内に実施の形態2に係る特徴点検出装置150を搭載する例を説明したが、実施の形態1に係る特徴点検出装置100を搭載してもよい。また、実施の形態3では特徴点が検出できなかった部分領域における、ダミー特徴点にもとづくオプティカルフローを後処理部80によりマスクする構成を説明したが、その部分領域ではオプティカルフローの算出自体を無効にする構成も可能である。   In the third embodiment, the example in which the feature point detection device 150 according to the second embodiment is mounted in the optical flow detection unit 76 has been described. However, the feature point detection device 100 according to the first embodiment may be mounted. . In the third embodiment, the configuration in which the optical flow based on the dummy feature point is masked by the post-processing unit 80 in the partial region where the feature point cannot be detected has been described. However, the calculation of the optical flow itself is invalid in the partial region. It is also possible to use a configuration.

本発明の実施の形態1に係る特徴点検出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the feature point detection apparatus which concerns on Embodiment 1 of this invention. 実施の形態1に係る、二次微分値の算出に必要なオペレータを示す図である。It is a figure which shows the operator required for calculation of a secondary differential value based on Embodiment 1. FIG. 実施の形態1に係る、−45°方向の二次微分値を算出するための一次元フィルタを示す図である。6 is a diagram illustrating a one-dimensional filter for calculating a second derivative value in the −45 ° direction according to Embodiment 1. FIG. 実施の形態1に係る、画像内の−45°方向の空間軸における二次微分値の推移を示す図である。It is a figure which shows transition of the 2nd derivative value in the space axis of the -45 degree direction in an image based on Embodiment 1. FIG. 実施の形態1に係る、第1評価値からコーナーまたは斜めエッジ、および第2評価値から水平エッジまたは垂直エッジを検出する原理を説明するための図である。It is a figure for demonstrating the principle which detects a corner or a diagonal edge from the 1st evaluation value, and a horizontal edge or a vertical edge from the 2nd evaluation value based on Embodiment 1. FIG. 図5における各パターンの、四方向の二次微分値をまとめたテーブルを示す図である。It is a figure which shows the table which put together the secondary differential value of four directions of each pattern in FIG. 実施の形態1に係る特徴点検出装置を使用して、フレーム画像内から特徴点を検出する処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of processing for detecting a feature point from a frame image using the feature point detection apparatus according to the first embodiment. 本発明の実施の形態2に係る特徴点検出装置の構成を示すブロック図である。It is a block diagram which shows the structure of the feature point detection apparatus which concerns on Embodiment 2 of this invention. 図9(a)は、実施の形態2に係る特徴点検出装置により特徴点が設定されたフレーム画像を示す図である。図9(b)は、上記KLT法により特徴点が設定されたフレーム画像を示す図である。FIG. 9A is a diagram illustrating a frame image in which feature points are set by the feature point detection apparatus according to the second embodiment. FIG. 9B is a diagram showing a frame image in which feature points are set by the KLT method. 実施の形態2に係る特徴点検出装置を使用して、フレーム画像内から特徴点を検出する処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of processing for detecting a feature point from a frame image using the feature point detection device according to the second embodiment. 実施の形態3に係る動画像処理システムの構成を示す図である。FIG. 10 is a diagram illustrating a configuration of a moving image processing system according to a third embodiment.

符号の説明Explanation of symbols

5 分割部、 10 二次微分値算出部、 15 オペレータ、 16 加算器、 17 乗算器、 18 減算器、 20 評価値算出部、 30 判定部、 40 特徴点検出部、 60 撮像素子、 62 信号処理部、 70 フレームバッファ、 72 対象フレーム選択部、 74 参照フレーム選択部、 76 オプティカルフロー検出部、 78 オプティカルフロー演算部、 80 後処理部、 200 動画像処理システム、 210 撮像部、 220 動画像処理装置。   5 division unit, 10 secondary differential value calculation unit, 15 operator, 16 adder, 17 multiplier, 18 subtractor, 20 evaluation value calculation unit, 30 determination unit, 40 feature point detection unit, 60 image sensor, 62 signal processing Unit, 70 frame buffer, 72 target frame selection unit, 74 reference frame selection unit, 76 optical flow detection unit, 78 optical flow calculation unit, 80 post-processing unit, 200 moving image processing system, 210 imaging unit, 220 moving image processing device .

Claims (8)

画像内の注目画素における、右下がり斜め方向の二次微分値および右上がり斜め方向の二次微分値を算出する二次微分値算出部と、
前記二次微分値算出部により算出された、前記右下がり斜め方向の二次微分値と前記右上がり斜め方向の二次微分値との絶対値差を第1評価値として算出する評価値算出部と、
前記評価値算出部により算出された前記第1評価値と、第1閾値とを比較することにより、前記注目画素が前記画像内の、コーナーまたは斜めエッジに該当するか否か判定する判定部と、
を備えることを特徴とする特徴点検出装置。
A second-order differential value calculation unit that calculates a second-order differential value in the diagonally lower right direction and a second-order differential value in the diagonally right-up direction at the target pixel in the image;
An evaluation value calculation unit that calculates, as a first evaluation value, an absolute value difference between the second-order differential value in the diagonally descending right direction and the secondary differential value in the diagonally right-up direction calculated by the secondary differential value calculating unit. When,
A determination unit that determines whether the target pixel corresponds to a corner or an oblique edge in the image by comparing the first evaluation value calculated by the evaluation value calculation unit with a first threshold value; ,
A feature point detection apparatus comprising:
前記二次微分値算出部は、前記注目画素における、水平方向の二次微分値および垂直方向の二次微分値を算出し、
前記評価値算出部は、前記二次微分値算出部により算出された、前記水平方向の二次微分値と前記垂直方向の二次微分値との絶対値差を第2評価値として算出し、
前記判定部は、前記評価値算出部により算出された前記第2評価値と、第2閾値とを比較することにより、前記注目画素が前記画像内の、水平エッジまたは垂直エッジに該当するか否か判定することを特徴とする請求項1に記載の特徴点検出装置。
The secondary differential value calculation unit calculates a secondary differential value in the horizontal direction and a secondary differential value in the vertical direction at the target pixel,
The evaluation value calculation unit calculates an absolute value difference between the secondary differential value in the horizontal direction and the secondary differential value in the vertical direction, calculated by the secondary differential value calculation unit, as a second evaluation value;
The determination unit compares the second evaluation value calculated by the evaluation value calculation unit with a second threshold value to determine whether the target pixel corresponds to a horizontal edge or a vertical edge in the image. The feature point detection apparatus according to claim 1, wherein:
前記評価値算出部は、前記注目画素における、前記右下がり斜め方向の二次微分値の絶対値と、前記右上がり斜め方向の二次微分値の絶対値との和を第3評価値として算出し、前記水平方向の二次微分値の絶対値と、前記垂直方向の二次微分値の絶対値との和を第4評価値として算出し、
前記判定部は、前記第3評価値と第3閾値とを比較することにより、前記コーナーまたは前記斜めエッジの強度を判定し、前記第4評価値と第4閾値とを比較することにより、前記水平エッジまたは前記垂直エッジの強度を判定することを特徴とする請求項2に記載の特徴点検出装置。
The evaluation value calculation unit calculates, as a third evaluation value, a sum of an absolute value of the second-order differential value in the diagonally lower right direction and an absolute value of the second-order differential value in the diagonally right upward direction at the target pixel. And calculating the sum of the absolute value of the secondary differential value in the horizontal direction and the absolute value of the secondary differential value in the vertical direction as a fourth evaluation value,
The determination unit determines the strength of the corner or the oblique edge by comparing the third evaluation value with a third threshold, and compares the fourth evaluation value with a fourth threshold to The feature point detection apparatus according to claim 2, wherein a strength of a horizontal edge or the vertical edge is determined.
画像を複数の部分領域に分割する分割部と、
前記分割部により分割された各部分領域の各画素ごとに、右下がり斜め方向の二次微分値、右上がり斜め方向の二次微分値、水平方向の二次微分値および垂直方向の二次微分値を算出する二次微分値算出部と、
各部分領域の各画素ごとに、前記右下がり斜め方向の二次微分値と前記右上がり斜め方向の二次微分値との絶対値差を第1評価値として算出し、かつ前記水平方向の二次微分値と前記垂直方向の二次微分値との絶対値差を第2評価値として算出する評価値算出部と、
各部分領域ごとに少なくとも一つの特徴点を検出する特徴点検出部と、を備え、
前記特徴点検出部は、
ある部分領域内の各画素の前記第1評価値と、第1閾値とをそれぞれ比較し、前記第1評価値が前記第1閾値を超える画素が前記部分領域内に少なくとも一つ存在する場合、その少なくとも一つの画素を前記部分領域の特徴点候補に決定し、
前記第1評価値が前記第1閾値を超える画素が前記部分領域内に存在しない場合、前記部分領域内の各画素の前記第2評価値と、第2閾値とをそれぞれ比較し、前記第2評価値が前記第2閾値を超える画素が前記部分領域内に少なくとも一つ存在する場合、その少なくとも一つの画素を前記部分領域の特徴点候補に決定することを特徴とする特徴点検出装置。
A dividing unit for dividing the image into a plurality of partial regions;
For each pixel in each of the partial areas divided by the dividing unit, a second-order differential value in the right-down diagonal direction, a second-order differential value in the right-up diagonal direction, a second-order differential value in the horizontal direction, and a second-order differential value in the vertical direction A second derivative calculation unit for calculating a value;
For each pixel in each partial region, an absolute value difference between the second-order differential value in the diagonally lower right direction and the second-order differential value in the diagonally right upward direction is calculated as a first evaluation value, and the second value in the horizontal direction is calculated. An evaluation value calculation unit that calculates an absolute value difference between the second derivative value and the second derivative value in the vertical direction as a second evaluation value;
A feature point detection unit for detecting at least one feature point for each partial region,
The feature point detection unit includes:
When the first evaluation value of each pixel in a certain partial region is compared with a first threshold value, and when at least one pixel having the first evaluation value exceeding the first threshold value exists in the partial region, Determining at least one pixel as a feature point candidate of the partial region;
If there is no pixel in the partial area where the first evaluation value exceeds the first threshold, the second evaluation value of each pixel in the partial area is compared with a second threshold, and the second When at least one pixel having an evaluation value exceeding the second threshold exists in the partial area, the feature point detection apparatus determines at least one pixel as a feature point candidate of the partial area.
前記評価値算出部は、
各画素または前記第1評価値が前記第1閾値を超える画素における、前記右下がり斜め方向の二次微分値の絶対値と、前記右上がり斜め方向の二次微分値の絶対値との和を第3評価値として算出し、
各画素または前記第2評価値が前記第2閾値を超える画素における、前記水平方向の二次微分値の絶対値と、前記垂直方向の二次微分値の絶対値との和を第4評価値として算出し、
前記特徴点検出部は、
前記部分領域において前記第1評価値が前記第1閾値を超える画素が存在する場合、前記第3評価値が最も大きい画素または前記第3評価値の大きい上位複数の画素を前記部分領域の特徴点に決定し、
前記部分領域において前記第1評価値が前記第1閾値を超える画素が存在せず、かつ前記第2評価値が前記第2閾値を超える画素が存在する場合、前記第4評価値が最も大きい画素または前記第4評価値の大きい上位複数の画素を前記部分領域の特徴点に決定することを特徴とする請求項4に記載の特徴点検出装置。
The evaluation value calculation unit
The sum of the absolute value of the second-order differential value in the right-down diagonal direction and the absolute value of the second-order differential value in the right-up diagonal direction at each pixel or the pixel where the first evaluation value exceeds the first threshold value. Calculated as the third evaluation value,
The fourth evaluation value is the sum of the absolute value of the secondary differential value in the horizontal direction and the absolute value of the secondary differential value in the vertical direction at each pixel or the pixel where the second evaluation value exceeds the second threshold value. As
The feature point detector
When there is a pixel having the first evaluation value exceeding the first threshold in the partial region, the pixel having the largest third evaluation value or the plurality of upper pixels having the large third evaluation value is selected as a feature point of the partial region Decided on
In the partial area, when there is no pixel whose first evaluation value exceeds the first threshold and there is a pixel whose second evaluation value exceeds the second threshold, the pixel having the largest fourth evaluation value The feature point detection apparatus according to claim 4, wherein a plurality of upper pixels having a large fourth evaluation value are determined as feature points of the partial region.
前記特徴点検出部は、
前記部分領域において前記第1評価値が前記第1閾値を超える画素が存在せず、かつ前記第2評価値が前記第2閾値を超える画素も存在しない場合、前記部分領域内のあらかじめ設定された固定位置の画素を前記部分領域の仮の特徴点に設定するとともに、正規の特徴点が存在しないことを示すフラグを立てることを特徴とする請求項4または5に記載の特徴点検出装置。
The feature point detector
In the partial area, when there is no pixel in which the first evaluation value exceeds the first threshold value and no pixel in which the second evaluation value exceeds the second threshold value, a preset value in the partial area is set. 6. The feature point detection device according to claim 4, wherein a pixel at a fixed position is set as a temporary feature point of the partial area, and a flag indicating that no regular feature point exists is set.
動画像に含まれるフレーム画像内から複数の特徴点を検出する請求項4から6のいずれかに記載の特徴点検出装置と、
前記特徴点検出装置により検出された複数の特徴点のオプティカルフローをそれぞれ算出するオプティカルフロー演算部と、
を備えることを特徴とする動画像処理装置。
The feature point detection device according to any one of claims 4 to 6, wherein a plurality of feature points are detected from a frame image included in the moving image;
An optical flow calculator that calculates optical flows of a plurality of feature points detected by the feature point detection device;
A moving image processing apparatus comprising:
動画像に含まれるフレーム画像内から複数の特徴点を検出する請求項6に記載の特徴点検出装置と、
前記特徴点検出装置により検出された複数の特徴点のオプティカルフローをそれぞれ算出するオプティカルフロー演算部と、
前記フラグが立っている部分領域の特徴点のオプティカルフローを無効とする後処理部と、
を備えることを特徴とする動画像処理装置。
The feature point detection apparatus according to claim 6, wherein a plurality of feature points are detected from within a frame image included in the moving image,
An optical flow calculator that calculates optical flows of a plurality of feature points detected by the feature point detection device;
A post-processing unit for invalidating the optical flow of the feature points of the partial area where the flag is set;
A moving image processing apparatus comprising:
JP2008198173A 2008-07-31 2008-07-31 Feature point detection device and moving image processor with the same Pending JP2010039520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008198173A JP2010039520A (en) 2008-07-31 2008-07-31 Feature point detection device and moving image processor with the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008198173A JP2010039520A (en) 2008-07-31 2008-07-31 Feature point detection device and moving image processor with the same

Publications (1)

Publication Number Publication Date
JP2010039520A true JP2010039520A (en) 2010-02-18

Family

ID=42012044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008198173A Pending JP2010039520A (en) 2008-07-31 2008-07-31 Feature point detection device and moving image processor with the same

Country Status (1)

Country Link
JP (1) JP2010039520A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014182637A (en) * 2013-03-19 2014-09-29 Fujitsu Ltd Image processor, image processing method and image processing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014182637A (en) * 2013-03-19 2014-09-29 Fujitsu Ltd Image processor, image processing method and image processing program

Similar Documents

Publication Publication Date Title
JP5975598B2 (en) Image processing apparatus, image processing method, and program
JP3944647B2 (en) Object measuring apparatus, object measuring method, and program
KR101303667B1 (en) Method and apparatus for detecting and removing false contour and method and apparatus for confirming whether pixel is contour and method and apparatus for computing simplicity
KR101811718B1 (en) Method and apparatus for processing the image
JP2008286725A (en) Person detector and detection method
JP5908844B2 (en) Image processing apparatus and image processing method
CN106469455B (en) Image processing method, image processing apparatus, and recording medium
JP5740844B2 (en) Imaging apparatus, image processing method, and computer program
EP3200442B1 (en) Method and apparatus for image processing
WO2013094151A1 (en) Object detection device and object detection method
JP2007156655A (en) Variable region detection apparatus and its method
JP5812705B2 (en) Crack detection method
JP6720845B2 (en) Image processing apparatus, image processing method and program
JP5849206B2 (en) Image processing apparatus, image processing method, and image processing program
JP2020107290A (en) Adhering matter detection device and adhering matter detection method
KR100627615B1 (en) Apparatus for removing color interpolation by using adjustable threshold
US6876778B2 (en) Edge enhancement method and apparatus in digital image scalar-up circuit
JP6198114B2 (en) Image processing program, image processing method, and image processing apparatus
JP2010039520A (en) Feature point detection device and moving image processor with the same
JP6207311B2 (en) Image processing apparatus, control method thereof, and control program
JP5708305B2 (en) Image recognition apparatus, image recognition method, and computer program for image recognition
KR20160132209A (en) Method and apparatus for extraction of depth information of image using fast convolution based on multi-color sensor
US20140152862A1 (en) Image processing apparatus, image pickup apparatus, image pickup system, image processing method, and non-transitory computer-readable storage medium
JP5754931B2 (en) Image analysis apparatus, image analysis method, and program
JP2011203853A (en) Image processing apparatus and program