JP5371015B2 - Cross mark detection apparatus and method, and program - Google Patents

Cross mark detection apparatus and method, and program Download PDF

Info

Publication number
JP5371015B2
JP5371015B2 JP2010089547A JP2010089547A JP5371015B2 JP 5371015 B2 JP5371015 B2 JP 5371015B2 JP 2010089547 A JP2010089547 A JP 2010089547A JP 2010089547 A JP2010089547 A JP 2010089547A JP 5371015 B2 JP5371015 B2 JP 5371015B2
Authority
JP
Japan
Prior art keywords
cross mark
image
point
luminance
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010089547A
Other languages
Japanese (ja)
Other versions
JP2011221747A (en
Inventor
隆 吉見
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
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 National Institute of Advanced Industrial Science and Technology AIST filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP2010089547A priority Critical patent/JP5371015B2/en
Publication of JP2011221747A publication Critical patent/JP2011221747A/en
Application granted granted Critical
Publication of JP5371015B2 publication Critical patent/JP5371015B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To perform stable detection of a cross mark by detecting change of luminance of the surroundings of each pixel without relying on a template. <P>SOLUTION: This cross mark detection device consists of: a cross mark candidate image creation means for determining the center of cross marks for each point in an image to be considered as a cross mark candidate point image; a cross mark candidate image line thickening means for thickening lines of the cross mark candidate image, performing area division to output an area image obtained by giving the same area number to cross mark candidate points in the vicinity; a cross mark center coordinate calculation means for making the cross mark candidate point into an intersection of two straight lines using luminance information in the vicinity to calculate cross mark center coordinates; and a representative point adoption means for considering a point having the maximum score among points having the same area number as a representative point of the area to be determined as the center of the cross mark. <P>COPYRIGHT: (C)2012,JPO&amp;INPIT

Description

本発明は、撮影された輝度画像中からクロスマークを検出するクロスマーク検出装置及び方法、並びにプログラム   The present invention relates to a cross mark detection device and method for detecting a cross mark from a captured luminance image, and a program

3次元物体の特定の点をカメラで撮像した際の画像中の位置を知りたい場合、撮影環境に影響を受けにくく、画像処理によって座標が正確に計算可能なマークを撮影することがある。たとえば、カメラ自身の空間の点の三次元座標から二次元座標への射影変換に必要なパラメータを計算する場合には、あらかじめ三次元座標が既知の点にマークを置き、撮影されたマークの二次元座標をもとにパラメータを計算する。また、射影変換が既知の状態で空間中の未知の位置や動きを計測する際にも用いられる。   When it is desired to know a position in an image when a specific point of a three-dimensional object is imaged by a camera, a mark that is less affected by the imaging environment and whose coordinates can be accurately calculated by image processing may be captured. For example, when calculating the parameters required for projective transformation from 3D coordinates to 2D coordinates of a point in the camera's own space, a mark is placed on a point where the 3D coordinates are already known, Calculate parameters based on dimensional coordinates. It is also used when measuring unknown positions and movements in space with projective transformation known.

このような場合に使われるマークの一つに、図1に示すクロスマークがある。これは平面上に白と黒が交互に現れるようなパターンであり、背景の明るさにかかわらず使用可能であり、マークの中央の点は二つの直線の交点として計算可能なので、サブピクセルの精度で座標値を得ることが可能である。特許文献1、或いは特許文献2においても利用されている。このようなクロスマークを画像中で検出するプログラムにおいては、テンプレートマッチングによるものがある。あらかじめ作成しておいた二次元のパターン(テンプレート)と画像中の同じサイズの矩形の輝度パターン(ウィンドウ)との輝度差を計算し、それが閾値以内であればクロスマークとする方法である。テンプレートマッチングの手法には問題点が二つある。   One of the marks used in such a case is a cross mark shown in FIG. This is a pattern in which white and black appear alternately on the plane, can be used regardless of the brightness of the background, and the center point of the mark can be calculated as the intersection of two lines, so the subpixel accuracy It is possible to obtain coordinate values with It is also used in Patent Document 1 or Patent Document 2. Some programs for detecting such a cross mark in an image are based on template matching. In this method, a luminance difference between a two-dimensional pattern (template) created in advance and a rectangular luminance pattern (window) of the same size in the image is calculated, and if it is within a threshold value, a cross mark is obtained. There are two problems with the template matching method.

第一の問題点は、存在するクロスマークを見落とす問題である。撮影条件などにより、クロスマークがおかれた場所が明るかったり暗かったりすると、テンプレートとの間に輝度差が生じてマークではないと判定されることがある。また、図2に示すように、テンプレートがカメラの画像面に正対せず斜めになっている場合や回転している場合にも、テンプレートとの画像間に差が生じてクロスマークでないと判定する場合がある。   The first problem is the problem of overlooking existing cross marks. If the place where the cross mark is placed is bright or dark depending on the shooting conditions or the like, it may be determined that the mark is not a mark due to a luminance difference with the template. In addition, as shown in FIG. 2, even when the template is not facing the image plane of the camera and is inclined or rotated, it is determined that the template is not a cross mark due to a difference between the image with the template. There is a case.

第二の問題点は、クロスマークでない場所をクロスマークとして検出する場合である。典型的には、図3に示す線状の図形もテンプレートとある程度の類似性が生じ、閾値の条件によってはクロスマークとして検出されることがある。   The second problem is when a place that is not a cross mark is detected as a cross mark. Typically, the linear figure shown in FIG. 3 also has a certain degree of similarity with the template, and may be detected as a cross mark depending on threshold conditions.

特開2005-28468号公報JP 2005-28468 A 特開2009-279663号公報JP 2009-279663 A

上述の二つの問題は、閾値の設定によって解決される場合もあるが、通常、相反する結果をもたらす。すなわち、閾値をあげてテンプレートとの輝度差を許容しなくすれば見落としが増え、逆に閾値を下げれば誤ってクロスマークと判定する場合が増える。   The above two problems may be solved by setting a threshold value, but usually give conflicting results. That is, if the threshold value is increased and the luminance difference from the template is not allowed, oversight increases. Conversely, if the threshold value is decreased, the number of cases where a cross mark is erroneously determined increases.

本発明は、係る問題点を解決して、テンプレートに頼らず、各画素の周囲の輝度の変化を検出することで、安定したクロスマークの検出を行うことを目的としている。   An object of the present invention is to solve such a problem and to detect a stable cross mark by detecting a change in luminance around each pixel without depending on a template.

本発明のクロスマーク検出装置は、撮影された輝度画像中からクロスマークを検出する。このクロスマーク検出装置は、検出すべきクロスマークのある輝度画像が入力されて、画像中の各点についてクロスマークの中心であるか否かを判定して、その結果をクロスマーク候補点画像とするクロスマーク候補画像作成手段と、前記クロスマーク候補画像を太線化し、領域分割して近傍にあるクロスマーク候補点に同じ領域番号を付与した領域画像を出力するクロスマーク候補画像太線化手段と、前記クロスマーク候補画像におけるクロスマーク候補点に対して近傍の輝度情報を使って二直線を決定してその交点としてクロスマーク中心座標を計算するクロスマーク中心座標計算手段と、前記領域画像内で同一の領域番号を持つ点の中で最大のスコアを持つ点を領域の代表点として採用し、この領域の代表点をクロスマークの中心であると判定する代表点採用手段と、から成る。   The cross mark detection apparatus of the present invention detects a cross mark from a captured luminance image. This cross mark detection apparatus receives a luminance image having a cross mark to be detected, determines whether each point in the image is the center of the cross mark, and determines the result as a cross mark candidate point image. Cross mark candidate image creating means, and cross mark candidate image thickening means for thickening the cross mark candidate image and outputting a region image obtained by dividing the region and assigning the same region number to a nearby cross mark candidate point; Same as the cross mark center coordinate calculation means for determining the two straight lines using the luminance information in the vicinity of the cross mark candidate point in the cross mark candidate image and calculating the cross mark center coordinate as the intersection. The point with the highest score among the points with the region number of is selected as the representative point of the region, and the representative point of this region is the center of the cross mark. A representative point employed means determines that consists.

また、本発明のクロスマーク検出方法は、輝度画像中の全画素についてクロスマークの中心としての判定を行い、その結果をクロスマーク候補点画像とし、前記クロスマーク候補点画像の太線化を行い、領域画像をつくり、前記領域画像に対してクロスマーク候補点が隣接しているものに対して同じ領域番号を割り振る領域分割を行ない、各々のクロスマーク候補点を中心にする近傍点の輝度パターンを使ってクロスマークの中心座標を計算し、同時にクロスマークの強度であるスコアを計算し、前記領域画像において同じ領域番号を持つクロスマーク候補点画像における候補点の中で最大のスコアを持つクロスマーク候補点を領域の代表点として採用し、領域番号の数だけのクロスマーク二次元座標値を得ることから成る。   Further, the cross mark detection method of the present invention performs determination as the center of the cross mark for all pixels in the luminance image, sets the result as a cross mark candidate point image, thickens the cross mark candidate point image, Create an area image, perform area division to assign the same area number to the area image where the cross mark candidate point is adjacent, and calculate the luminance pattern of the neighboring points centering on each cross mark candidate point Use this to calculate the center coordinates of the cross mark, and at the same time calculate the score that is the strength of the cross mark, and the cross mark having the highest score among the candidate points in the cross mark candidate point image having the same area number in the area image The candidate point is adopted as a representative point of the region, and the cross mark two-dimensional coordinate values corresponding to the number of region numbers are obtained.

また、本発明のクロスマーク検出プログラムは、輝度画像中の全画素についてクロスマークの中心としての判定を行い、その結果をクロスマーク候補点画像とする手順と、前記クロスマーク候補点画像の太線化を行い、領域画像をつくる手順と、前記領域画像に対してクロスマーク候補点が隣接しているものに対して同じ領域番号を割り振る領域分割を行なう手順と、各々のクロスマーク候補点を中心にする近傍点の輝度パターンを使ってクロスマークの中心座標を計算し、同時にクロスマークの強度であるスコアを計算する手順と、前記領域画像において同じ領域番号を持つクロスマーク候補点画像における候補点の中で最大のスコアを持つクロスマーク候補点を領域の代表点として採用し、領域番号の数だけのクロスマーク二次元座標値を得る手順と、から成る各手順をコンピュータに実行させる。   Further, the cross mark detection program of the present invention performs the determination as the center of the cross mark for all pixels in the luminance image and sets the result as a cross mark candidate point image, and the cross mark candidate point image is thickened. To create a region image, to perform region division for assigning the same region number to the region image adjacent to the cross mark candidate point, and to center each cross mark candidate point Calculating the center coordinates of the cross mark using the luminance pattern of the neighboring points to be calculated, and simultaneously calculating the score that is the strength of the cross mark, and the candidate points in the cross mark candidate point image having the same area number in the area image The cross mark candidate point with the highest score is adopted as the representative point of the area, and the cross mark two-dimensional coordinate value is equal to the number of area numbers. A step of obtaining, to execute the respective steps in a computer comprising a.

前記クロスマークの中心としての判定は、対象点の周囲に連続したリング状のマスクを作成し、該マスク上の輝度情報により行う。前記クロスマーク中心座標計算は、前記境界点に対応する元画像の点と注目点を結ぶ直線の近傍において輝度分布の傾斜が大きい点を検出し、対向する境界点との間で平行な二直線をあてはめ、その中央に位置する直線を代表直線とし、交差する二代表直線の交点として二次元座標値を計算する。   The determination as the center of the cross mark is performed by creating a continuous ring-shaped mask around the target point and using luminance information on the mask. The cross mark center coordinate calculation is performed by detecting a point having a large slope of the luminance distribution in the vicinity of a straight line connecting the point of the original image corresponding to the boundary point and the point of interest, and two parallel lines between the opposing boundary points. And a straight line located at the center thereof is used as a representative straight line, and a two-dimensional coordinate value is calculated as an intersection of two intersecting representative straight lines.

本発明によれば、テンプレートに頼らず、各画素の周囲の輝度の変化を検出することで、安定したクロスマークの検出を行うことができる。   According to the present invention, stable cross marks can be detected by detecting a change in luminance around each pixel without relying on a template.

クロスマークを例示する図である。It is a figure which illustrates a cross mark. テンプレートが検出しないクロスマークの歪みを説明する図である。It is a figure explaining distortion of the cross mark which a template does not detect. テンプレートが誤って検出する画像例を示す図である。It is a figure which shows the example of an image which a template detects accidentally. 本発明に基づき構成したクロスマーク検出装置を例示する図である。It is a figure which illustrates the cross mark detection apparatus comprised based on this invention. 動作アルゴリズムを例示する図である。It is a figure which illustrates an operation | movement algorithm. リングマスクと配列Rを説明する図である。It is a figure explaining a ring mask and the arrangement | sequence R. FIG. 輝度差による判定を説明する図である。It is a figure explaining the determination by a luminance difference. 領域数判定における不可の例を説明する図である。It is a figure explaining the example of the impossibility in the area number determination. 境界の対称性条件を説明する図である。It is a figure explaining the symmetry condition of a boundary. 狭すぎる条件を説明する図である。It is a figure explaining the conditions which are too narrow. テンプレート判定を説明する図である。It is a figure explaining template determination. 領域分割例を説明する図である。It is a figure explaining the example of area division. エッジ点の抽出とセグメントを説明する図である。It is a figure explaining extraction of an edge point and a segment. ずれのあるセグメント例を説明する図である。It is a figure explaining the example of a segment with a shift | offset | difference. ずれたセグメントの傾き計算を説明する図である。It is a figure explaining inclination calculation of a shifted segment.

以下、例示に基づき本発明を説明する。図4は、本発明に基づき構成したクロスマーク検出装置の全体構成を示す概略図である。検出すべきクロスマークのある輝度画像I1がカメラにおいて撮影され、クロスマーク候補画像作成手段に入力されて、画像中からクロスマークのサブピクセル精度の中心位置を計算する。ここでいうサブピクセル精度(1画素より小さい精度)とは、クロスマークの中心座標が小数点以下の座標値として計算されることを意味する。このために、画像中の各点についてクロスマークの中心であるための条件を満たしているか否かを判定して、その結果をクロスマーク候補点画像I2とする。クロスマーク候補画像太線化手段は、クロスマーク候補画像I2を太線化し、領域分割して近傍にあるクロスマーク候補点に同じ領域番号を付与した領域画像I3を出力する。クロスマーク中心座標計算手段は、画像I2におけるクロスマーク候補点に対して近傍の輝度情報を使って二直線を決定してその交点としてクロスマーク中心座標をサブピクセル精度で計算する。代表点採用手段は、画像I3内で同一の領域番号を持つ点の中で最大のスコアを持つ点を領域の代表点として採用する。この領域の代表点が、クロスマークの中心であると判定される。   Hereinafter, the present invention will be described based on examples. FIG. 4 is a schematic diagram showing the overall configuration of a cross mark detection apparatus configured according to the present invention. A luminance image I1 having a cross mark to be detected is photographed by the camera and input to the cross mark candidate image creating means to calculate the center position of the cross mark with sub-pixel accuracy from the image. The sub-pixel accuracy (accuracy smaller than one pixel) here means that the center coordinate of the cross mark is calculated as a coordinate value after the decimal point. Therefore, it is determined whether or not each point in the image satisfies the condition for being the center of the cross mark, and the result is set as a cross mark candidate point image I2. The cross mark candidate image thickening means thickens the cross mark candidate image I2, outputs a region image I3 obtained by dividing the region and assigning the same region number to the cross mark candidate points in the vicinity. The cross mark center coordinate calculation means determines two straight lines using luminance information in the vicinity of the cross mark candidate point in the image I2, and calculates the cross mark center coordinate as the intersection with sub-pixel accuracy. The representative point adopting means adopts a point having the maximum score among the points having the same area number in the image I3 as the representative point of the area. It is determined that the representative point of this area is the center of the cross mark.

次に、図4に示したクロスマーク検出装置の動作について、動作アルゴリズムを示す図5を参照しつつ、さらに説明する。例示のプログラムは大きくわけて4個のステップ(S1〜S4)の処理からなる。   Next, the operation of the cross mark detection apparatus shown in FIG. 4 will be further described with reference to FIG. 5 showing an operation algorithm. The example program is roughly divided into four steps (S1 to S4).

第一のステップS1では、画像I1中の全画素についてクロスマークの中心としての判定を行い、その結果をクロスマーク候補点画像I2とする。このステップで行うクロスマークの判定には以下の条件を組み合わせたものを用いる。また、必要に応じて他の条件を組み合わせることも可能である。その際に、図6に示すように、判定のために対象点Pの周囲に連続したリング状のマスクを作成し、その上の輝度情報を円周方向に番号付けした一次元配列Rを用いる。リング状のマスクは、ある点を中心とする等方的な周囲の輝度変化をみることができるものであれば、例示した円形に限らず、例えば、正方形或いは多角形でも良い。配列Rはリングバッファで先頭と末尾が連続したものとして扱う。以下の記述において、配列Rの長さをmとする。配列Rを用いるのは、画像中のクロスマークの姿勢に依存しない処理を行うためである。   In the first step S1, all pixels in the image I1 are determined as the center of the cross mark, and the result is set as a cross mark candidate point image I2. A combination of the following conditions is used for the cross mark determination performed in this step. In addition, other conditions can be combined as necessary. At this time, as shown in FIG. 6, a continuous ring-shaped mask is created around the target point P for determination, and a one-dimensional array R in which luminance information on the mask is numbered in the circumferential direction is used. . The ring-shaped mask is not limited to the illustrated circle, and may be, for example, a square or a polygon as long as the isotropic surrounding luminance change around a certain point can be seen. Array R is treated as a sequence of head and tail in the ring buffer. In the following description, the length of the array R is m. The reason why the array R is used is to perform processing independent of the posture of the cross mark in the image.

(1)図7に示すように、配列R内の最大輝度と最小輝度の差が閾値t0より小さい場合には不可とする。 (1) As shown in FIG. 7, when the difference between the maximum luminance and the minimum luminance in the array R is smaller than the threshold value t0, it is impossible.

(2)図8に示すように、配列R内の輝度分布を考慮した閾値t1を用いて配列Rを二値化し、輝度の高い領域と輝度の低い領域が二個ずつ交互に存在しない場合には不可とする。即ち、マスク上の点の輝度分布に基づく輝度閾値をまたがる境界が4個でなければクロスマーク候補としない。 (2) When the array R is binarized using the threshold value t1 considering the luminance distribution in the array R as shown in FIG. 8, and there are not two high-luminance areas and two low-luminance areas alternately. Is not allowed. That is, if there are not four boundaries across the luminance threshold based on the luminance distribution of the points on the mask, the cross mark candidate is not used.

(3)図9に示すように、閾値t1によって区切られた上記の輝度の高い領域と輝度の低い領域の偶数番目の境界A2, A4の距離がm/2と近い値を持たない場合には不可とする。即ち、境界点が対称位置になければクロスマーク候補としない。 (3) As shown in FIG. 9, when the distance between the high-brightness region and the even-numbered boundaries A2 and A4 between the high-brightness region and the low-brightness region divided by the threshold t1 does not have a value close to m / 2 Impossible. That is, if the boundary point is not in a symmetric position, it is not a cross mark candidate.

(4)上記と同様に、奇数番目の境界 A1, A3 の距離がm/2と近い値を持たない場合には不可とする。 (4) Similarly to the above, it is not possible when the distance between the odd-numbered boundaries A1 and A3 does not have a value close to m / 2.

(5)図10に示すように、閾値t1によって区切られた隣接する境界{Ai,Ai+1}の間の画素数が閾値t2よりも少ない場合には不可とする。即ち、境界点の間隔が十分に広くなければクロスマーク候補としない。 (5) As shown in FIG. 10, when the number of pixels between adjacent boundaries {Ai, Ai + 1} delimited by the threshold t1 is smaller than the threshold t2, it is not allowed. That is, if the distance between the boundary points is not wide enough, the cross mark candidate is not used.

(6)図11に示すように、元画像中で{A1…A4}に対応する点を{B1…B4}とし、3枚のテンプレート画像T1,T2,T3を作成する。テンプレート判定のために対象点Pを中心とする近傍に設定するテンプレート画像のウィンドウのサイズw1は、リングマスクを包含するサイズにする。テンプレート画像T1は直線B1-B3と直線B2-B4を境界線とする。この画像はクロスマークに対応するテンプレートである。テンプレート画像T2は直線B1-B2と直線B3-B4を境界線とする。テンプレート画像T3は直線B2-B3と直線B4-B1を境界線とする。画像T2および画像T3は直線状のパターンに対応したテンプレートである。それぞれのテンプレートの境界線以外の輝度は、配列R内の領域[Ai,Ai+1]の明暗状態とテンプレート内の領域[Bi,Bi+1]の明暗状態が一致するように作成する。画像の点Pを中心とするサイズがw1のウィンドウと3個のテンプレートを比較し、T1との類似性が最も近くない場合には不可とする。即ち、境界点に対応する元画像の点を通り、クロスマーク状の輝度分布を持つテンプレートと帯状のテンプレートを二種類作成し、クロスマーク状の輝度分布を持つテンプレートとの類似性が最も高くなければクロスマーク候補としない。 (6) As shown in FIG. 11, the point corresponding to {A1... A4} in the original image is {B1... B4}, and three template images T1, T2, and T3 are created. The size w1 of the template image window set in the vicinity of the target point P for template determination is set to a size including the ring mask. The template image T1 has a straight line B1-B3 and a straight line B2-B4 as boundary lines. This image is a template corresponding to a cross mark. The template image T2 has a straight line B1-B2 and a straight line B3-B4 as boundary lines. The template image T3 has a straight line B2-B3 and a straight line B4-B1 as boundary lines. Image T2 and image T3 are templates corresponding to a linear pattern. The brightness other than the border line of each template is created so that the brightness state of the area [Ai, Ai + 1] in the array R matches the brightness state of the area [Bi, Bi + 1] in the template. A window having a size w1 around the point P of the image is compared with three templates, and this is not possible if the similarity to T1 is not the closest. In other words, two types of templates with cross mark-like luminance distributions and band-like templates are created by passing through the points of the original image corresponding to the boundary points, and the similarity between the template with the cross mark-like luminance distributions must be the highest. If it is not a cross mark candidate.

図5に示す第二のステップS2では、図12に示すように、クロスマーク候補点画像I2の太線化を行い、領域画像I3をつくる。図12の左上に、クロスマーク候補画像I2を例示している。太線化は、画像I2における非クロスマーク候補点に対し、既存のクロスマーク候補点からの距離が与えられた画素d離れた点もクロスマーク候補点とする操作である。たとえば、クロスマーク候補画像が、クロスマーク候補点が0、非クロスマーク候補点が−1である二値画像とすると、0の値を持つ点に隣接した−1の点をすべて0にする操作を行うと、1画素分の太線化が可能になり、これをd回繰り返すことでd画素の太線化ができる。図12の右上に、太線化結果画像を例示している。太線化後の領域画像I3に対してクロスマーク候補点が隣接しているものに対して同じ領域番号を割り振る領域分割を行う。これは、図12の左下に示すように、領域1、領域2のそれぞれにおける太線化した複数個のクロスマーク候補点に対して同じ領域番号を付与する。言い換えると、領域分割の処理において連続した領域一つ一つに個別の領域番号を割り当てる。この処理は、同一のクロスマークに対応するクロスマーク候補点が必ずしも連続した領域とならないために必要である。   In the second step S2 shown in FIG. 5, as shown in FIG. 12, the cross mark candidate point image I2 is thickened to create a region image I3. The cross mark candidate image I2 is illustrated in the upper left of FIG. The thickening is an operation in which a point away from the non-cross mark candidate point in the image I2 by a pixel d given a distance from the existing cross mark candidate point is also set as a cross mark candidate point. For example, if the cross mark candidate image is a binary image in which the cross mark candidate point is 0 and the non-cross mark candidate point is -1, an operation of setting all -1 points adjacent to a point having a value of 0 to 0 If this is done, thickening of one pixel becomes possible, and d pixels can be thickened by repeating this d times. In the upper right of FIG. 12, a thick line result image is illustrated. Region division is performed in which the same region number is assigned to the region image I3 that has been bolded and adjacent to the cross mark candidate points. As shown in the lower left of FIG. 12, the same region number is assigned to a plurality of thick cross mark candidate points in each of region 1 and region 2. In other words, individual area numbers are assigned to each successive area in the area division process. This processing is necessary because the cross mark candidate points corresponding to the same cross mark are not necessarily continuous regions.

第三のステップS3では、おのおののクロスマーク候補点Pを中心にする近傍点の輝度パターンを使ってクロスマークの中心座標を計算し、同時にクロスマークの強度(スコア)を計算する。このクロスマーク中心座標計算は、境界点に対応する元画像の点と注目点を結ぶ直線の近傍において輝度分布の傾斜が大きい点を検出し、対向する境界点との間で平行な二直線をあてはめ、その中央に位置する直線を代表直線とし、交差する二代表直線の交点として二次元座標値を計算する。   In the third step S3, the center coordinates of the cross mark are calculated using the luminance pattern of the neighboring points centering on each cross mark candidate point P, and at the same time, the strength (score) of the cross mark is calculated. This cross mark center coordinate calculation detects a point where the gradient of the luminance distribution is large in the vicinity of the straight line connecting the point of the original image corresponding to the boundary point and the point of interest, and creates two parallel lines between the opposing boundary points. The straight line located at the center is used as a representative line, and a two-dimensional coordinate value is calculated as the intersection of two intersecting representative lines.

このために、まず、図13に示すように、注目点Pのまわりに大きさw2の近傍ウィンドウを設定する。ウィンドウサイズw2は、画像中のクロスマークより大きくなく、小さすぎないような値に、ユーザーが設定する。大きくしすぎるとクロスマークでない場所の影響を受けて誤差を生じ、小さくしすぎて直線を計算するのに使う点の数が減ればやはり誤差が生じることになる。次に、注目点Pと画像中のリングマスク上の境界点Bi を結ぶ線の近傍においてセグメントウィンドウをつくり、その中で輝度の変化が大きい点としてエッジ点を複数個抽出する。エッジ点は、たとえば微分などの方法により求める。これらの点の集合をセグメントとする。抽出した各エッジ点に対して輝度変化の大きさを反映したスコア値を計算する。スコア値は、たとえば輝度の微分値の大きさなどを用いる。あるセグメント上のエッジ点に対して計算されたスコア値を合計したものを、そのセグメントのスコア値とする。   For this purpose, first, a neighborhood window of size w2 is set around the point of interest P as shown in FIG. The window size w2 is set by the user so as not to be larger than the cross mark in the image and not too small. If it is too large, an error will occur due to the influence of the location that is not a cross mark, and if it is too small and the number of points used to calculate a straight line decreases, an error will still occur. Next, a segment window is created in the vicinity of the line connecting the point of interest P and the boundary point Bi on the ring mask in the image, and a plurality of edge points are extracted as points having a large luminance change. The edge point is obtained by a method such as differentiation. A set of these points is defined as a segment. A score value reflecting the magnitude of the luminance change is calculated for each extracted edge point. As the score value, for example, the magnitude of the differential value of luminance is used. The sum of the score values calculated for the edge points on a certain segment is taken as the score value for that segment.

次に、奇数番目のセグメントs1およびs3上のエッジ点に対して直線L13、偶数番目のセグメントs2およびs4上のエッジ点に対して直線L24を計算する。なお、s1は点PからみてB1方向のセグメントで、他のセグメントも同様に記述する。奇数番目のセグメント同士または偶数番目のセグメント同士は、本来、同一の直線であるが、実際に撮影した画像では、明るい部分または暗い部分が膨張し、図14に示すようなずれが生じることがある。こういった可能性を考慮し、直線の計算の際にはそれぞれのセグメントが法線方向にわずかに偏移した平行直線であり、その偏移量が等しいとして中央の直線を計算する。   Next, a straight line L13 is calculated for the edge points on the odd-numbered segments s1 and s3, and a straight line L24 is calculated for the edge points on the even-numbered segments s2 and s4. Note that s1 is a segment in the B1 direction as seen from the point P, and the other segments are described in the same manner. The odd-numbered segments or the even-numbered segments are originally the same straight line, but in an actually photographed image, a bright part or a dark part may expand and a shift as shown in FIG. 14 may occur. . Taking these possibilities into consideration, when calculating a straight line, each segment is a parallel straight line slightly shifted in the normal direction, and the central straight line is calculated assuming that the amount of shift is equal.

以下で、直線L13を例に直線の式の係数を計算する方法を示す。もし注目点Pがクロスマークの中心であればS1とS3は同じ傾きをもつ線分になる。ここで、S1、S3の直線の式を次のように記述する。
S1: α13X+β13Y+γ1=0
S3: α13X+β13Y+γ3=0
ただし、α13 213 2=1とする。
Hereinafter, a method of calculating the coefficient of the straight line equation will be described using the straight line L13 as an example. If the point of interest P is the center of the cross mark, S1 and S3 are line segments having the same inclination. Here, the linear equation of S1 and S3 is described as follows.
S1: α 13 X + β 13 Y + γ 1 = 0
S3: α 13 X + β 13 Y + γ 3 = 0
However, α 13 2 + β 13 2 = 1.

α13、β13、γ1、γ3の計算は次のように行う。図15に示すように、S1を構成する点群{C1i}の重心をG1、S3を構成する点{C3i}の重心をG3とする。このとき、C1i−G1
およびC3i−G3のベクトルを計算し、それらの共分散行列の固有値および固有ベクトルを計算する。α13およびβ13は、最小固有値に対応する固有ベクトルとなる。γ1およびγ3は、α13およびβ13を使って次のように計算される。
γ1=−α13G1x−β13G1y
γ3=−α13G3x−β13G3y
Calculation of α 13 , β 13 , γ 1 , and γ 3 is performed as follows. As shown in FIG. 15, the center of gravity of the point group {C 1 i} constituting S1 is G 1 , and the center of gravity of the point {C 3 i} constituting S3 is G 3 . At this time, C 1 i−G 1
And C 3 i−G 3 vectors, and the eigenvalues and eigenvectors of their covariance matrices. α 13 and β 13 are eigenvectors corresponding to the minimum eigenvalue. γ 1 and γ 3 are calculated using α 13 and β 13 as follows.
γ 1 = −α 13 G 1 x−β 13 G 1 y
γ 3 = −α 13 G 3 x−β 13 G 3 y

ただし、G1x,G1yは重心G1のXおよびY成分、G3x,G3yはG3のXおよびY成分を示す。γ1とγ3の差 |γ1−γ3|は二つのセグメントの平行線間の距離を示し、この値が大きい場合には直線のあてはめが失敗したとする。また、直線あてはめが成功したと判定された場合には、二つのセグメントの中央の直線をB1B3方向の直線とする。その式は次のように表わされる。
直線B1B3: α13X+β13Y+(γ13)/2= 0
However, G 1 x, G 1 y X and Y components of the center of gravity G 1, G 3 x, G 3 y indicates the X and Y components of G 3. The difference between γ 1 and γ 3 | γ 1 −γ 3 | indicates the distance between the parallel lines of the two segments. If this value is large, it is assumed that the fitting of the line fails. If it is determined that the straight line fitting is successful, the central straight line of the two segments is set as the straight line in the B1B3 direction. The formula is expressed as follows.
Line B1B3: α 13 X + β 13 Y + (γ 1 + γ 3 ) / 2 = 0

直線B1B3と同様に直線B2B4も計算する。その後、直線B1B3と直線B2B4の交点を計算し、クロスマークの二次元座標値とする。クロスマークのスコアには、すべてのセグメントのスコアを総和したものを用いる。   The straight line B2B4 is calculated in the same manner as the straight line B1B3. Thereafter, the intersection of the straight line B1B3 and the straight line B2B4 is calculated and set as the two-dimensional coordinate value of the cross mark. As the cross mark score, the sum of the scores of all the segments is used.

第四のステップS4では、領域画像I3において同じ領域番号を持つクロスマーク候補点画像I2における候補点の中で最大のスコアを持つクロスマーク候補点を領域の代表点として採用する。この結果、領域番号の数だけのクロスマーク二次元座標値が得られる。
In the fourth step S4, the cross mark candidate point having the maximum score among the candidate points in the cross mark candidate point image I2 having the same area number in the area image I3 is adopted as the representative point of the area. As a result, as many cross mark two-dimensional coordinate values as the number of region numbers are obtained.

Claims (11)

撮影された輝度画像中からクロスマークを検出するクロスマーク検出装置において、
検出すべきクロスマークのある輝度画像が入力されて、画像中の各点についてクロスマークの中心であるか否かを判定して、その結果をクロスマーク候補点画像とするクロスマーク候補画像作成手段と、
前記クロスマーク候補画像を太線化し、領域分割して近傍にあるクロスマーク候補点に同じ領域番号を付与した領域画像を出力するクロスマーク候補画像太線化手段と、
前記クロスマーク候補画像におけるクロスマーク候補点に対して近傍の輝度情報を使って二直線を決定してその交点としてクロスマーク中心座標を計算するクロスマーク中心座標計算手段と、
前記領域画像内で同一の領域番号を持つ点の中で最大のスコアを持つ点を領域の代表点として採用し、この領域の代表点をクロスマークの中心であると判定する代表点採用手段と、
から成るクロスマーク検出装置。
In a cross mark detection device that detects a cross mark from a captured luminance image,
A luminance image having a cross mark to be detected is input, and it is determined whether or not each point in the image is the center of the cross mark, and the result is used as a cross mark candidate point image creation means. When,
Cross mark candidate image thickening means for thickening the cross mark candidate image and outputting a region image obtained by dividing the region and assigning the same region number to a cross mark candidate point in the vicinity;
Cross mark center coordinate calculating means for determining a two-line using luminance information of the cross mark candidate point in the cross mark candidate image and calculating a cross mark center coordinate as the intersection point;
A point having the maximum score among points having the same region number in the region image is adopted as a representative point of the region, and representative point adopting means for determining that the representative point of this region is the center of the cross mark; ,
A cross mark detection device comprising:
撮影された輝度画像中からクロスマークを検出するクロスマーク検出方法において、
前記輝度画像中の全画素についてクロスマークの中心としての判定を行い、その結果をクロスマーク候補点画像とし、
前記クロスマーク候補点画像の太線化を行い、領域画像をつくり、
前記領域画像に対してクロスマーク候補点が隣接しているものに対して同じ領域番号を割り振る領域分割を行ない、
各々のクロスマーク候補点を中心にする近傍点の輝度パターンを使ってクロスマークの中心座標を計算し、同時にクロスマークの強度であるスコアを計算し、
前記領域画像において同じ領域番号を持つクロスマーク候補点画像における候補点の中で最大のスコアを持つクロスマーク候補点を領域の代表点として採用し、領域番号の数だけのクロスマーク二次元座標値を得る、
ことから成るクロスマーク検出方法。
In a cross mark detection method for detecting a cross mark from a captured luminance image,
Perform determination as the center of the cross mark for all pixels in the luminance image, the result is a cross mark candidate point image,
The cross mark candidate point image is thickened to create an area image,
Perform area division to assign the same area number to the area image adjacent to the cross mark candidate points,
Calculate the center coordinate of the cross mark using the brightness pattern of the neighboring points centered on each cross mark candidate point, and simultaneously calculate the score that is the strength of the cross mark,
The cross mark candidate point having the largest score among the candidate points in the cross mark candidate point image having the same area number in the area image is adopted as the representative point of the area, and the cross mark two-dimensional coordinate values corresponding to the number of the area numbers are used. Get the
A cross mark detection method comprising:
前記クロスマークの中心としての判定は、対象点の周囲に連続したリング状のマスクを作成し、該マスク上の輝度情報により行う請求項2に記載のクロスマーク検出方法。   The cross mark detection method according to claim 2, wherein the determination as the center of the cross mark is performed by creating a continuous ring-shaped mask around a target point and using luminance information on the mask. 前記判定は、一次元配列内の最大輝度と最小輝度の差が閾値より小さい場合には不可とする請求項3に記載のクロスマーク検出方法。   The cross mark detection method according to claim 3, wherein the determination is not possible when a difference between the maximum luminance and the minimum luminance in the one-dimensional array is smaller than a threshold value. 前記判定は、一次元配列内の輝度分布を考慮した閾値を用いて該配列を二値化し、輝度の高い領域と輝度の低い領域が二個ずつ交互に存在しない場合には不可とする請求項3に記載のクロスマーク検出方法。   The determination is made impossible when the array is binarized using a threshold value taking into account the luminance distribution in the one-dimensional array, and there are not two high-luminance regions and two low-luminance regions alternately. 4. The cross mark detection method according to 3. 前記判定は、一次元配列内の輝度分布を考慮した閾値によって区切られた輝度の高い領域と輝度の低い領域の偶数番目の境界の距離又は奇数番目の境界の距離が、一次元配列の長さをmとして、 m/2と近い値を持たない場合には不可とする請求項3に記載のクロスマーク検出方法。   In the determination, the distance between the even-numbered boundary or the odd-numbered boundary between the high-brightness area and the low-brightness area divided by the threshold considering the luminance distribution in the one-dimensional array is the length of the one-dimensional array. The cross mark detection method according to claim 3, wherein m is not allowed when m is not a value close to m / 2. 前記判定は、一次元配列内の輝度分布を考慮した第1の閾値によって区切られた隣接する境界の間の画素数が第2の閾値よりも少ない場合には不可とする請求項3に記載のクロスマーク検出方法。   4. The determination according to claim 3, wherein the determination is not allowed when the number of pixels between adjacent boundaries delimited by a first threshold considering a luminance distribution in a one-dimensional array is smaller than a second threshold. Cross mark detection method. 前記判定は、境界点に対応する元画像の点を通り、クロスマーク状の輝度分布を持つテンプレートと帯状のテンプレートを二種類作成し、クロスマーク状の輝度分布を持つテンプレートとの類似性が最も高くなければ不可とする請求項3に記載のクロスマーク検出方法。   In the determination, two types of templates having a cross mark-like luminance distribution and a band-like template are created through the points of the original image corresponding to the boundary points, and the similarity between the template having the cross mark-like luminance distribution is the highest. 4. The cross mark detection method according to claim 3, wherein the cross mark detection method is not allowed unless it is high. 前記クロスマーク中心座標計算は、前記境界点に対応する元画像の点と注目点を結ぶ直線の近傍において輝度分布の傾斜が大きい点を検出し、対向する境界点との間で平行な二直線をあてはめ、その中央に位置する直線を代表直線とし、交差する二代表直線の交点として二次元座標値を計算する請求項2に記載のクロスマーク検出方法。   The cross mark center coordinate calculation is performed by detecting a point having a large slope of the luminance distribution in the vicinity of a straight line connecting the point of the original image corresponding to the boundary point and the point of interest, and two parallel lines between the opposing boundary points. The cross mark detection method according to claim 2, wherein a two-dimensional coordinate value is calculated as an intersection of two intersecting representative lines. 前記対向する境界点との間で平行な二直線をあてはめる際に、二直線の間隔が閾値より大きい場合に計算を失敗とする請求項9に記載のクロスマーク検出方法。   The cross mark detection method according to claim 9, wherein when fitting two parallel straight lines between the opposing boundary points, the calculation fails when the distance between the two straight lines is larger than a threshold value. 撮影された輝度画像中からクロスマークを検出するクロスマーク検出プログラムにおいて、
前記輝度画像中の全画素についてクロスマークの中心としての判定を行い、その結果をクロスマーク候補点画像とする手順と、
前記クロスマーク候補点画像の太線化を行い、領域画像をつくる手順と、
前記領域画像に対してクロスマーク候補点が隣接しているものに対して同じ領域番号を割り振る領域分割を行なう手順と、
各々のクロスマーク候補点を中心にする近傍点の輝度パターンを使ってクロスマークの中心座標を計算し、同時にクロスマークの強度であるスコアを計算する手順と、
前記領域画像において同じ領域番号を持つクロスマーク候補点画像における候補点の中で最大のスコアを持つクロスマーク候補点を領域の代表点として採用し、領域番号の数だけのクロスマーク二次元座標値を得る手順と、
から成る各手順をコンピュータに実行させるためのクロスマーク検出プログラム。
In a cross mark detection program that detects a cross mark from a captured luminance image,
A procedure for determining all pixels in the luminance image as the center of the cross mark and setting the result as a cross mark candidate point image;
A procedure for thickening the cross mark candidate point image and creating an area image;
A procedure for performing region division for assigning the same region number to the region image adjacent to the cross mark candidate points;
A procedure for calculating the center coordinate of the cross mark using the luminance pattern of the neighboring points centered on each cross mark candidate point, and simultaneously calculating a score that is the strength of the cross mark,
The cross mark candidate point having the largest score among the candidate points in the cross mark candidate point image having the same area number in the area image is adopted as the representative point of the area, and the cross mark two-dimensional coordinate values corresponding to the number of the area numbers are used. And the procedure to get
A cross mark detection program for causing a computer to execute each of the steps.
JP2010089547A 2010-04-08 2010-04-08 Cross mark detection apparatus and method, and program Active JP5371015B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010089547A JP5371015B2 (en) 2010-04-08 2010-04-08 Cross mark detection apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010089547A JP5371015B2 (en) 2010-04-08 2010-04-08 Cross mark detection apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2011221747A JP2011221747A (en) 2011-11-04
JP5371015B2 true JP5371015B2 (en) 2013-12-18

Family

ID=45038668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010089547A Active JP5371015B2 (en) 2010-04-08 2010-04-08 Cross mark detection apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP5371015B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110782411B (en) * 2019-10-28 2023-03-14 西安工程大学 Anti-vibration hammer slip identification method based on image processing

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07282256A (en) * 1994-04-06 1995-10-27 Sanyo Electric Co Ltd Seal matching device and angle positioning device for two body images
US6137893A (en) * 1996-10-07 2000-10-24 Cognex Corporation Machine vision calibration targets and methods of determining their location and orientation in an image
JP2009250739A (en) * 2008-04-04 2009-10-29 Nikon Corp Method for processing image and program

Also Published As

Publication number Publication date
JP2011221747A (en) 2011-11-04

Similar Documents

Publication Publication Date Title
US10666924B2 (en) Virtual viewpoint image generation system based on captured images, virtual viewpoint image generation apparatus, and method of controlling same
CN109751973B (en) Three-dimensional measuring device, three-dimensional measuring method, and storage medium
EP3081900B1 (en) Measurement devices and methods for measuring the shape of an object to be measured, and method of manufacturing an article
US10024653B2 (en) Information processing apparatus, information processing method, and storage medium
US10006762B2 (en) Information processing apparatus, information processing method, and storage medium
US9613425B2 (en) Three-dimensional measurement apparatus, three-dimensional measurement method and program
EP2887313B1 (en) Image processing apparatus, system, image processing method, and computer-readable recording medium
JP2015184929A (en) Three-dimensional object detection apparatus, three-dimensional object detection method and three-dimensional object detection program
JP6107372B2 (en) Image processing apparatus, image processing method, and image processing program
JP4296617B2 (en) Image processing apparatus, image processing method, and recording medium
JP2017003331A (en) Measurement device for measuring a shape of a body to be measured, calculation device, and calculation method and program
JP2020126383A (en) Moving object detection device, moving object detection method, and moving body detection program
JP6452361B2 (en) Information processing apparatus, information processing method, and program
JP5371015B2 (en) Cross mark detection apparatus and method, and program
WO2017032096A1 (en) Method for predicting stereoscopic depth and apparatus thereof
JP6412372B2 (en) Information processing apparatus, information processing system, information processing apparatus control method, and program
JP2009146150A (en) Method and device for detecting feature position
WO2022254854A1 (en) Three-dimensional measurement device
JP6867766B2 (en) Information processing device and its control method, program
JP2007141167A (en) Lane detector, lane detection method, and lane detection program
JP2018092507A (en) Image processing apparatus, image processing method, and program
JP5968370B2 (en) Three-dimensional measuring apparatus, three-dimensional measuring method, and program
EP3029605A2 (en) Marker recognition device, marker recognition method, and recognition program
WO2019188194A1 (en) Method for determining center of pattern on lens marker, device for same, program for causing computer to execute said determination method, and recording medium for program
JP4351090B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130829

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130910

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130911

R150 Certificate of patent or registration of utility model

Ref document number: 5371015

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250