JP2021118516A - Intersection detection method and device and camera calibration device - Google Patents

Intersection detection method and device and camera calibration device Download PDF

Info

Publication number
JP2021118516A
JP2021118516A JP2020012676A JP2020012676A JP2021118516A JP 2021118516 A JP2021118516 A JP 2021118516A JP 2020012676 A JP2020012676 A JP 2020012676A JP 2020012676 A JP2020012676 A JP 2020012676A JP 2021118516 A JP2021118516 A JP 2021118516A
Authority
JP
Japan
Prior art keywords
intersection
line segment
camera
image
line
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.)
Granted
Application number
JP2020012676A
Other languages
Japanese (ja)
Other versions
JP7198233B2 (en
Inventor
裕貴 鶴崎
Yuki Tsurusaki
裕貴 鶴崎
敬介 野中
Keisuke Nonaka
敬介 野中
良亮 渡邊
Ryosuke 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.)
KDDI Corp
Original Assignee
KDDI Corp
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 KDDI Corp filed Critical KDDI Corp
Priority to JP2020012676A priority Critical patent/JP7198233B2/en
Publication of JP2021118516A publication Critical patent/JP2021118516A/en
Application granted granted Critical
Publication of JP7198233B2 publication Critical patent/JP7198233B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To detect an intersection for camera calibration on the basis of a camera image of a line segment, and outputs a camera parameter.SOLUTION: An image acquisition unit 10 acquires a camera image I in unit of frames. A competition area extraction unit 20 extracts a competition area from the camera image I. A line segment extraction unit 30 extracts a line segment from the camera image I. An intersection coordinate calculation unit 40 calculates the coordinates of the intersection of each line segment. A patch image extraction unit 50 extracts a patch image from the camera image I at each intersection such that the center of each patch image coincides with the coordinates of each intersection. A pre-processing unit 61 performs pre-processing to smooth the line segment in the patch image after thinning the line segment. A line segment identification unit 62 identifies the line segment on the patch image after the preprocessing. An intersection correction unit 60 corrects each intersection to the intersection of the identified line segment for each patch image. A homography matrix determination unit 90 determines a homography matrix for camera calibration on the basis of the corrected intersection.SELECTED DRAWING: Figure 1

Description

本発明は、交点検出方法および装置ならびにカメラキャリブレーション装置に係り、特に、フィールド競技を撮影するカメラのキャリブレーションに好適な交点検出方法および装置ならびにカメラキャリブレーション装置に関する。 The present invention relates to an intersection detection method and device and a camera calibration device, and more particularly to an intersection detection method and device and a camera calibration device suitable for calibrating a camera for photographing a field competition.

特許文献1には、カメラ画像から白線を検出し、検出された白線とモデルデータを用いてホモグラフィ行列を算出することでカメラキャリブレーションを行う技術が開示されている。特許文献1では、白線が映っている領域が、統計的に求めた閾値を用いた閾値処理により抽出される。その後、カメラ画像にハフ変換を適用し、白線を検出することで交点が求められる。検出された白線の交点と方向と、モデルデータの白線の交点と方向を対応付けることでホモグラフィ行列が算出される。 Patent Document 1 discloses a technique of detecting a white line from a camera image and performing camera calibration by calculating a homography matrix using the detected white line and model data. In Patent Document 1, the area where the white line appears is extracted by threshold processing using a statistically obtained threshold. After that, the Hough transform is applied to the camera image, and the intersection is obtained by detecting the white line. The homography matrix is calculated by associating the detected intersections and directions of the white lines with the intersections and directions of the white lines in the model data.

特許文献1では、複数のホモグラフィ行列が算出されるが、n番目のフレーム画像とm番目のフレーム画像に各ホモグラフィ行列を適用し、そこで求められるカメラポイントの変位が最小となるホモグラフィ行列が選択され、選択されたホモグラフィ行列に基づいてキャリブレーションが行われる。 In Patent Document 1, a plurality of homography matrices are calculated, but each homography matrix is applied to the n-th frame image and the m-th frame image, and the homography matrix obtained there is the minimum displacement of the camera point. Is selected and calibration is performed based on the selected homography matrix.

非特許文献1には、Line Segment Detector (LSD)と呼ばれる、入力画像のエッジの勾配を用いて、線分となる領域を抽出して線分を検出する技術が開示されている。LSDは、検出精度が高い線分検出手法として知られている。 Non-Patent Document 1 discloses a technique called a Line Segment Detector (LSD) that extracts a region to be a line segment and detects the line segment by using the gradient of the edge of the input image. LSD is known as a line segment detection method with high detection accuracy.

非特許文献2,3には、畳み込みニューラルネットワークを用いた最新の線分検出手法が開示されている。ニューラルネットワークを用いる線分検出手法は、非特許文献1のLSDよりも線分検出精度が高いとされている。 Non-Patent Documents 2 and 3 disclose the latest line segment detection method using a convolutional neural network. The line segment detection method using a neural network is said to have higher line segment detection accuracy than the LSD of Non-Patent Document 1.

特許文献2には、入力画像の輝度と色差の平均値と標準偏差を用いた閾値処理にて競技領域を抽出する技術が開示されている。 Patent Document 2 discloses a technique for extracting a competition area by threshold processing using the average value and standard deviation of the brightness and color difference of an input image.

特開2018-137667号公報Japanese Unexamined Patent Publication No. 2018-137667 特許第6456244号公報Japanese Patent No. 6456244

R. G. V. Gioi, J. Jakubowicz, J. M. Morel and G. Randall, "LSD: a Line Segment Detector", Image Processing On Line, pp. 35-55, 2012.R. G. V. Gioi, J. Jakubowicz, J. M. Morel and G. Randall, "LSD: a Line Segment Detector", Image Processing On Line, pp. 35-55, 2012. Y. Zhou, H. Qi and Y. Ma, "End-to-End Wireframe Parsing", pp. 962-971, ICCV 2019.Y. Zhou, H. Qi and Y. Ma, "End-to-End Wireframe Parsing", pp. 962-971, ICCV 2019. N. Xue, S. Bai, F. Wang, G.-S. Xia, T. Wu and L. Zhang, "Learning Attraction Field Representation for Robust Line Segment Detection", pp.1595-1603, CVPR 2019.N. Xue, S. Bai, F. Wang, G.-S. Xia, T. Wu and L. Zhang, "Learning Attraction Field Representation for Robust Line Segment Detection", pp.1595-1603, CVPR 2019.

特許文献1では、白線が映っている領域の抽出精度が低く、また線分の検出方法に古典的な手法を用いているために線分検出精度が低いことから、カメラキャリブレーションの成功率が低いという問題がある。 In Patent Document 1, the success rate of camera calibration is low because the extraction accuracy of the area where the white line is reflected is low and the line segment detection accuracy is low because the classical method is used for the line segment detection method. There is a problem that it is low.

白線検出の前段処理として、白線が映っている領域を抽出する処理がある。特許文献1では、当該領域を抽出するにあたり、統計的な値を一意に決定し、決定された値を用いた閾値処理により当該領域を抽出している。統計的な値を映像シーン毎に一意に決定することは非常に困難な問題がある。また、特許文献1には統計的な値の具体的な求め方については開示されていない。 As a pre-stage process for detecting white lines, there is a process for extracting an area where white lines are reflected. In Patent Document 1, when extracting the region, a statistical value is uniquely determined, and the region is extracted by threshold processing using the determined value. There is a very difficult problem in determining the statistical value uniquely for each video scene. Further, Patent Document 1 does not disclose a specific method for obtaining a statistical value.

本発明の目的は、上記の技術課題を解決し、フィールド競技を撮影するカメラのキャリブレーションに好適な交点を精度よく検出できる交点検出方法および装置ならびにカメラキャリブレーション装置を提供することにある。 An object of the present invention is to solve the above technical problems and to provide an intersection detection method and device capable of accurately detecting an intersection suitable for calibrating a camera for shooting a field competition, and a camera calibration device.

上記の目的を達成するために、本発明は、線分の写ったカメラ画像に基づいてカメラキャリブレーション用の交点を検出する交点検出装置において、以下の構成を具備した点に特徴がある。 In order to achieve the above object, the present invention is characterized in that it has the following configuration in an intersection detection device that detects an intersection for camera calibration based on a camera image showing a line segment.

(1) カメラ画像から線分を抽出する手段と、各線分の交点の座標を計算する手段と、カメラ画像から各交点を含むパッチ画像を抽出する手段と、パッチ画像内の線分を細線化後に平滑化する前処理を実施する手段と、前処理後のパッチ画像上で線分を識別する手段と、パッチ画像ごとに各交点を前記識別された線分の交点に修正する手段とを具備した。 (1) A means for extracting line segments from a camera image, a means for calculating the coordinates of intersections of each line segment, a means for extracting a patch image including each intersection from a camera image, and a means for thinning the line segments in the patch image. It is provided with a means for performing a pretreatment for smoothing later, a means for identifying a line segment on the patch image after the pretreatment, and a means for correcting each intersection for each patch image to the intersection of the identified line segments. did.

(2) カメラ画像から競技領域を抽出する手段を具備し、当該カメラ画像から競技領域を抽出する手段は、カメラ画像の全領域を競技領域と推定した後、カメラ画像の統計値を用いた閾値処理により競技領域と推定する領域を段階的に狭める反復処理において閾値を更新し、所定の収束条件が成立した時点で競技領域と推定している領域を抽出するようにした。 (2) The means for extracting the competition area from the camera image is provided, and the means for extracting the competition area from the camera image is a threshold value using the statistical value of the camera image after estimating the entire area of the camera image as the competition area. The threshold value was updated in the iterative process of gradually narrowing the area estimated to be the competition area by the processing, and the area estimated to be the competition area was extracted when a predetermined convergence condition was satisfied.

(3) カメラ画像から線分を抽出する手段は、カメラ画像から線分片を検出する手段と、各線分片にカメラ画像の所定の端部から垂線を下ろし、当該垂線の角度および長さを計算する手段と、前記垂線の角度および長さが所定の関係を有する線分片同士を統合する手段とを具備した。 (3) The means for extracting a line segment from the camera image is a means for detecting a line segment from the camera image and a perpendicular line is drawn from a predetermined end of the camera image on each line segment, and the angle and length of the perpendicular line are determined. A means for calculating and a means for integrating line segments having a predetermined relationship between the angles and lengths of the perpendicular lines are provided.

(4) 線分の写ったカメラ画像に基づいてカメラキャリブレーション用のパラメータを出力するカメラキャリブレーション装置において、カメラ画像から線分を抽出する手段と、各線分の交点の座標を計算する手段と、カメラ画像から各交点を含むパッチ画像を抽出する手段と、パッチ画像内の線分を細線化後に平滑化する前処理を実施する手段と、前処理後のパッチ画像上で線分を識別する手段と、パッチ画像ごとに各交点を前記識別された線分の交点に修正する手段と、競技領域モデルの交点を記憶する手段と、修正した交点と競技領域モデルの交点とを対応付ける手段と、相互に対応する、修正した交点と競技領域モデルの交点とに基づいてホモグラフィ行列を決定する手段と、ホモグラフィ行列に基づいてカメラパラメータを計算する手段とを具備した。前記ホモグラフィ行列を決定する手段は、相互に対応する、修正した交点と競技領域モデルの交点とに基づいて複数のホモグラフィ行列候補を生成する手段と、前記ホモグラフィ行列候補ごとに、修正した各交点の特徴ベクトルと競技領域モデルの各交点の特徴ベクトルとのハミング距離を計算する手段と、前記ホモグラフィ行列候補ごとに、修正した各交点と、競技領域モデルの各交点を当該ホモグラフィ行列候補に基づいて投影した各交点との交点誤差を計算する手段と、前記ホモグラフィ行列候補ごとに、修正した各交点から延びる線分と、競技領域モデルの各交点を当該ホモグラフィ行列候補に基づいて投影した各交点から延びる線分との方向誤差を計算する手段とを具備し、前記ハミング距離、交点誤差および方向誤差の少なくとも2つが所定の閾値を下回るホモグラフィ行列候補をホモグラフィ行列に決定するようにした。 (4) In a camera calibration device that outputs parameters for camera calibration based on a camera image showing a line segment, a means for extracting the line segment from the camera image and a means for calculating the coordinates of the intersection of each line segment. , A means for extracting a patch image including each intersection from a camera image, a means for performing a preprocessing for smoothing a line segment in the patch image after thinning, and a means for identifying a line segment on the preprocessed patch image. Means, means for correcting each intersection to the intersection of the identified line segment for each patch image, means for storing the intersection of the competition area model, and means for associating the corrected intersection with the intersection of the competition area model. It was provided with means for determining the homography matrix based on the mutually corresponding modified intersections and the intersections of the competition area model, and means for calculating the camera parameters based on the homography matrix. The means for determining the homography matrix are a means for generating a plurality of homography matrix candidates based on the mutually corresponding modified intersections and the intersections of the competition area model, and the means modified for each of the homography matrix candidates. Means for calculating the humming distance between the feature vector of each intersection and the feature vector of each intersection of the competition area model, each modified intersection for each of the homography matrix candidates, and each intersection of the competition area model are the homography matrix. A means for calculating the intersection error with each intersection projected based on the candidate, a line segment extending from each corrected intersection for each of the homography matrix candidates, and each intersection of the competition area model based on the homography matrix candidate. A means for calculating a direction error with a line segment extending from each intersection point projected by I tried to do it.

本発明によれば、以下のような効果が達成される。 According to the present invention, the following effects are achieved.

(1) カメラ画像から抽出した交点を含むパッチ画像を抽出し、パッチ画像内の線分を細線化後に平滑化する前処理を実施し、前処理後のパッチ画像上で線分を識別し、パッチ画像ごとに各交点を前記識別された線分の交点に修正するので、前処理により鮮明化、明瞭化された線分に基づいて交点を計算できる。したがって、本来の交点を構成する線分の近傍に位置する線分に基づいて交点が誤検知されていた場合でも、少ない計算負荷で正確な交点を再計算できるようになる。 (1) Extract the patch image including the intersections extracted from the camera image, perform the preprocessing to smooth the line segments in the patch image after thinning, and identify the line segments on the preprocessed patch image. Since each intersection is corrected to the intersection of the identified line segment for each patch image, the intersection can be calculated based on the line segment clarified and clarified by the preprocessing. Therefore, even if an intersection is erroneously detected based on a line segment located near the line segment constituting the original intersection, an accurate intersection can be recalculated with a small calculation load.

(2) カメラ画像から競技領域を抽出する手段は、カメラ画像の全領域を競技領域と推定した後、カメラ画像の統計値を用いた閾値処理により競技領域と推定する領域を段階的に狭める反復処理において閾値を更新し、所定の収束条件が成立した時点で競技領域と推定している領域を抽出するので、競技領域を精度よく抽出できるようになる。 (2) The means for extracting the competition area from the camera image is to estimate the entire area of the camera image as the competition area and then gradually narrow the area to be estimated as the competition area by threshold processing using the statistical values of the camera image. Since the threshold value is updated in the process and the area estimated to be the competition area is extracted when a predetermined convergence condition is satisfied, the competition area can be extracted accurately.

(3) カメラ画像から線分を抽出する手段は、カメラ画像から線分片を検出し、各線分片にカメラ画像の所定の端部から垂線を下ろし、当該垂線の角度および長さを計算し、前記垂線の角度および長さが所定の関係を有する線分片同士を統合するので、垂線の向きに関わらずその特徴量としての垂線の角度および長さを実用的な値として求められるようになる。 (3) The means for extracting a line segment from a camera image is to detect a line segment from the camera image, draw a perpendicular line from a predetermined end of the camera image on each line segment, and calculate the angle and length of the perpendicular line. Since the line segments having a predetermined relationship in the angle and length of the perpendicular are integrated, the angle and length of the perpendicular as the feature amount can be obtained as a practical value regardless of the direction of the perpendicular. Become.

(4) ホモグラフィ行列候補ごとに、ハミング距離を計算し、交点誤差を計算し、方向誤差を計算し、ハミング距離、交点誤差および方向誤差の少なくとも2つが所定の閾値を下回るホモグラフィ行列候補をホモグラフィ行列に決定するので、ホモグラフィ行列の精度を向上させることができる。 (4) For each homography matrix candidate, the humming distance is calculated, the intersection error is calculated, the direction error is calculated, and at least two of the humming distance, the intersection error, and the direction error are below a predetermined threshold. Since the homography matrix is determined, the accuracy of the homography matrix can be improved.

本発明を適用したカメラキャリブレーション装置の機能ブロック図である。It is a functional block diagram of the camera calibration apparatus to which this invention is applied. 競技領域の抽出手順を示したフローチャートである。It is a flowchart which showed the extraction procedure of the competition area. 線分片特徴量の求め方を示した図である。It is a figure which showed the method of obtaining the line segment feature amount. 交点修正部の機能ブロック図である。It is a functional block diagram of the intersection correction part. 交点の修正方法を示した図である。It is a figure which showed the correction method of the intersection point. 特徴ベクトル要素の設定方法を示した図である。It is a figure which showed the setting method of a feature vector element. カメラ交点特徴ベクトルの生成方法を示した図である。It is a figure which showed the generation method of the camera intersection feature vector. 特徴ベクトルVc,Vmのマッチング方法を示した図である。It is the figure which showed the matching method of the feature vector Vc, Vm. ホモグラフィ行列決定部の機能ブロック図である。It is a functional block diagram of the homography matrix determination part.

以下、図面を参照して本発明の実施の形態について詳細に説明する。図1は、本発明の交点検出装置を適用したカメラキャリブレーション装置1の主要部の構成を示した機能ブロック図である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a functional block diagram showing a configuration of a main part of a camera calibration device 1 to which the intersection detection device of the present invention is applied.

このようなカメラキャリブレーション装置は、汎用のコンピュータやサーバに各機能を実現するアプリケーション(プログラム)を実装することで構成できる。あるいはアプリケーションの一部をハードウェア化またはソフトウェア化した専用機や単能機としても構成できる。 Such a camera calibration device can be configured by implementing an application (program) that realizes each function on a general-purpose computer or server. Alternatively, it can be configured as a dedicated machine or a single-purpose machine in which a part of the application is made into hardware or software.

画像取得部10は、フィールド競技のカメラ画像Iをフレーム単位で取得する。カメラ画像Iは、フィールド競技を撮影中のカメラから直接取得しても良いし、HDDなどに保存した後に読み出して取得するようにしても良い。 The image acquisition unit 10 acquires the camera image I of the field competition in frame units. The camera image I may be acquired directly from the camera during which the field competition is being photographed, or may be saved in an HDD or the like and then read out and acquired.

競技領域抽出部20は、フィールド競技の競技領域が観客席等と共に映ったカメラ画像Iから競技領域を抽出する。多くの競技では、競技領域が一色又は類似の色で構成され、競技領域以外は別の色となることが多い。また、競技を撮影したカメラ画像では、競技領域の色がそれ以外の領域の色よりも多くの面積を占めることが経験的に認められる。 The competition area extraction unit 20 extracts the competition area from the camera image I in which the competition area of the field competition is captured together with the spectators' seats and the like. In many competitions, the competition area is composed of one color or a similar color, and the outside of the competition area is often a different color. In addition, it is empirically recognized that the color of the competition area occupies a larger area than the color of the other areas in the camera image of the competition.

そこで、本実施形態ではフィールド競技を撮影したカメラ画像に固有の特徴を利用して、カメラ画像の全領域を競技領域と仮定した後、カメラ画像Iに対する統計値を用いた閾値処理により競技領域と推定する領域を徐々に狭める反復処理において閾値を自動更新し、所定の収束条件が成立した時点で競技領域と推定されている領域を競技領域として抽出するようにしている。 Therefore, in the present embodiment, the feature peculiar to the camera image of the field competition is used, the entire area of the camera image is assumed to be the competition area, and then the competition area is determined by the threshold processing using the statistical value for the camera image I. The threshold value is automatically updated in the iterative process of gradually narrowing the estimated area, and the area estimated to be the competition area is extracted as the competition area when a predetermined convergence condition is satisfied.

図2は、前記競技領域抽出部20による競技領域の抽出手順を示したフローチャートであり、ステップS1では、フレーム単位で入力されるカメラ画像Iの色空間がHSV色空間に変換される。ステップS2では、カメラ画像Iのマスク画像mask (i, j)が初期化される。本実施形態では、マスク画像mask (i,j)の競技領域と推定されている画素には「1」、競技領域以外と推定されている画素には「0」が登録されるが、初期化されると全ての画素が「1」となる。 FIG. 2 is a flowchart showing a procedure for extracting the competition area by the competition area extraction unit 20, and in step S1, the color space of the camera image I input in frame units is converted into the HSV color space. In step S2, the mask image mask (i, j) of the camera image I is initialized. In the present embodiment, "1" is registered for the pixel estimated to be the competition area of the mask image mask (i, j), and "0" is registered to the pixel estimated to be outside the competition area. When it is done, all the pixels become "1".

ステップS3では、カメラ画像に占める競技領域の割合に基づいて、マスク画像の更新条件が成立したか否かが判断される。本実施形態では、Xをカメラ画像Iの横方向の画素数、Yをカメラ力画像Iの縦方向の画素数、rをカメラ画像Iに占める競技領域の上限割合(1以下の固定係数値)、cをmask (i, j)の値が「1」の数をカウントした値とし、次式(1)が成立すればマスク画像mask (i, j)の更新条件が成立したと判断される。 In step S3, it is determined whether or not the mask image update condition is satisfied based on the ratio of the competition area to the camera image. In the present embodiment, X is the number of pixels in the horizontal direction of the camera image I, Y is the number of pixels in the vertical direction of the camera force image I, and r is the upper limit ratio of the competition area to the camera image I (fixed coefficient value of 1 or less). , C is the value obtained by counting the number of mask (i, j) values of "1", and if the following equation (1) is satisfied, it is judged that the update condition of the mask image mask (i, j) is satisfied. ..

Figure 2021118516
Figure 2021118516

マスク画像mask (i, j)が初期化された直後はcの値が十分に大きく、上式(1)が不成立と判断されるのでステップS4へ進む。ステップS4では、次式(2),(3)を用いてカメラ画像IのH成分(色相)の平均値μHおよび標準偏差σH、ならびにS成分(彩度)の平均値μSおよび標準偏差σS(S成分については、式省略)が求められる。ここで、IHはH成分の配列、i,jは画素位置を表す添字である。 Immediately after the mask image mask (i, j) is initialized, the value of c is sufficiently large, and it is determined that the above equation (1) does not hold, so the process proceeds to step S4. In step S4, the average value μ H and standard deviation σ H of the H component (hue) of the camera image I, and the average value μ S and standard of the S component (saturation) of the camera image I using the following equations (2) and (3). The deviation σ S (formula omitted for the S component) is obtained. Here, I H is an array of H components, and i and j are subscripts representing pixel positions.

Figure 2021118516
Figure 2021118516

Figure 2021118516
Figure 2021118516

ステップS5では、マスク画像mask (i, j)の更新式(5)で用いる3つの閾値が次式(4)に基づいて更新される。ここで、αは更新式(5)の閾値処理のレンジを調整する1以上の係数値である。 In step S5, the three threshold values used in the update equation (5) of the mask image mask (i, j) are updated based on the following equation (4). Here, α is a coefficient value of 1 or more that adjusts the range of the threshold processing of the update equation (5).

Figure 2021118516
Figure 2021118516

ステップS6では、次式(5)に基づいてマスク画像mask (i, j)が更新される。本実施形態では、画素Ii, jのH成分が所定の下限値HMIN以上かつ上限値HMAX以下であって、そのS成分が所定の下限値SMIN以上であれば「1」、それ以外であれば「0」とされる。 In step S6, the mask image mask (i, j) is updated based on the following equation (5). In the present embodiment , if the H component of pixels I i and j is equal to or greater than the predetermined lower limit value H MIN and equal to or less than the upper limit value H MAX , and the S component is equal to or greater than the predetermined lower limit value S MIN, then "1". If it is other than, it is set to "0".

Figure 2021118516
Figure 2021118516

ステップS7では、前記更新後のマスク画像mask (i, j)にメディアンフィルタを適用することでノイズが除去される。ステップS8では、次式(6)に基づいて競技領域推定の収束判定がなされる。 In step S7, noise is removed by applying a median filter to the updated mask image mask (i, j). In step S8, the convergence test of the competition area estimation is made based on the following equation (6).

Figure 2021118516
Figure 2021118516

ここで、差分DはH成分の現在の標準偏差σHと前回の標準偏差σH'との差分であり、次式(7)で求められる。上式(6)が不成立であれば、ステップS3へ戻って上記の各処理が繰り返される。 Here, the difference D is the difference between the current standard deviation σ H of the H component and the previous standard deviation σ H ', and is obtained by the following equation (7). If the above equation (6) is not satisfied, the process returns to step S3 and each of the above processes is repeated.

Figure 2021118516
Figure 2021118516

その後、ステップS3の判断が肯定となるとステップS10へ進み、前記αに1未満の更新ステップ幅tが加算される。ステップS11では、マスク画像mask (i, j)が更新前のマスク画像mask_(i, j)に置き換えられる。 After that, if the determination in step S3 becomes affirmative, the process proceeds to step S10, and the update step width t less than 1 is added to the α. In step S11, the mask image mask (i, j) is replaced with the mask image mask_ (i, j) before the update.

その後、ステップS8において競技領域推定の収束判定の判断が肯定となるとステップS9へ進む。ステップS9では、次式(8)に基づいてカメラ画像Iに現在のマスク画像mask (i, j)を適用することで競技領域の画像Fi, jが抽出されて次段へ出力される。 After that, if the determination of the convergence test of the competition area estimation is affirmative in step S8, the process proceeds to step S9. In step S9, by applying the current mask image mask (i, j) to the camera image I based on the following equation (8), the images F i and j of the competition area are extracted and output to the next stage.

Figure 2021118516
Figure 2021118516

なお、上記の実施例ではHSV色空間を例にして説明をしたが、本発明は色空間に限定されない。 In the above embodiment, the HSV color space has been described as an example, but the present invention is not limited to the color space.

図1へ戻り、線分抽出部30は、カメラ画像Iの競技領域からフィールドラインを構成する線分を検出する。線分抽出部30において、線分片検出部31は、競技領域に周知のLSDを適用して、フィールドラインの構成要素であるセグメント(線分片)を検出する。各線分片は始点座標および終点座標により定義される。線分片特徴量計算部32は、図3に示したように、各線分片Sgまたはその延長線上にカメラ画像Iの例えば左上頂部から垂線Peを下ろし、当該垂線Peとx軸との角度θおよび当該垂線Peの長さρを各線分片Sgの特徴量として計算する。 Returning to FIG. 1, the line segment extraction unit 30 detects the line segments constituting the field line from the competition area of the camera image I. In the line segment extraction unit 30, the line segment detection unit 31 applies a well-known LSD to the competition area to detect a segment (line segment) which is a component of the field line. Each line fragment is defined by the start point coordinates and the end point coordinates. As shown in FIG. 3, the line segment feature amount calculation unit 32 draws a perpendicular line Pe from, for example, the upper left top of the camera image I on each line segment Sg or an extension line thereof, and the angle θ between the perpendicular line Pe and the x-axis. And the length ρ of the perpendicular line Pe is calculated as the feature quantity of each line segment Sg.

線分片統合部33は、線分片のペアごとに特徴量としての角度θおよび長さρの各差分を計算し、所定の条件を充足する線分片ペアを統合する。本実施形態では、任意に抽出した2つの線分Sg1=(ρ1, θ1),Sg2=(ρ2, θ2)について、その一方(例えば、線分Sg1)をその中点を中心にθ2−θ1度だけ回転させた線分Sg1'=(ρ1', θ2)を定義し、次式(9)を満たす線分片ペアSg1,Sg2を同一の線分を構成する線分片と判定して統合する。 The line segment integration unit 33 calculates the difference between the angle θ and the length ρ as feature quantities for each pair of line segments, and integrates the pair of line segments that satisfy a predetermined condition. In the present embodiment, for two arbitrarily extracted line segments Sg 1 = (ρ 1 , θ 1 ) and Sg 2 = (ρ 2 , θ 2 ), one of them (for example, the line segment Sg 1 ) is the midpoint thereof. Define the line segment Sg 1 '= (ρ 1 ', θ 2 ) rotated by θ 2 − θ 1 degree around the center, and make the line segment pairs Sg 1 and Sg 2 that satisfy the following equation (9) the same. It is determined that it is a line segment that constitutes a line segment and integrated.

Figure 2021118516
Figure 2021118516

ここで、Tθ,Tρは定数の閾値である。また、同一直線上にある線分片であっても、端点の間隔が閾値以上の場合は統合しない。線分片統合部33は、統合された線分片の各端点の座標を出力する。線分剪定部34は、統合された各線分を、その傾きkに基づいて水平線分LHおよび垂直線分LVのいずれかに分類する。 Here, T θ and T ρ are constant threshold values. Further, even if the line segments are on the same straight line, they are not integrated when the distance between the end points is equal to or more than the threshold value. The line segment integration unit 33 outputs the coordinates of each end point of the integrated line segment. The line segment pruning unit 34 classifies each integrated line segment into either a horizontal line segment L H or a vertical line segment L V based on its slope k.

本実施形態では、分類閾値γを予め定義しておき、|ki|>γならば垂直線分LVに分類し、|ki|≦γならば水平線分LHに分類する。また、分類閾値はカメラの位置および撮影方向によって異なることがある。したがって、分類処理の後、水平線分LHおよび垂直線分LVは2つのサブセットになっている。 In the present embodiment, the classification threshold value γ is defined in advance, and if | ki |> γ, it is classified as a vertical line segment L V , and if | ki | ≤ γ, it is classified as a horizontal line segment L H. In addition, the classification threshold value may differ depending on the position of the camera and the shooting direction. Therefore, after the classification process, the horizontal line segment L H and the vertical line segment L V are two subsets.

ソーティング部35は、水平線分LHをその座標に基づいて上から下にソートし、垂直線分LVをその座標に基づいて左から右にソートする。水平線分LHをソートする際はオフセットを使用して、対応する線分を上から下にソートする。垂直線分LVのソートでは、一番上の水平線分LHに注目して当該水平線分LHと各垂直線分LVとの交点を算出し、当該交点のx座標値に従って各垂直線分LVをソートする。 The sorting unit 35 sorts the horizontal line segment L H from top to bottom based on its coordinates, and sorts the vertical line segment L V from left to right based on its coordinates. When sorting the horizontal line segments L H , use offsets to sort the corresponding line segments from top to bottom. Sorting of the vertical line L V, focusing on the top of the horizontal line segment L H to calculate the intersection between the horizontal line segment L H and the vertical line L V, each vertical line in accordance with the x-coordinate value of the intersection point Sort the minutes L V.

交点座標計算部40は、ソートされた各水平線分と垂直線分との交点を検出し、その座標を計算する。パッチ画像抽出部50は、カメラ画像Iから交点ごとに当該交点の座標位置を中心としたN×Mサイズのパッチ画像を抽出する。 The intersection coordinate calculation unit 40 detects the intersection of each sorted horizontal line segment and the vertical line segment, and calculates the coordinates thereof. The patch image extraction unit 50 extracts an N × M size patch image centered on the coordinate position of the intersection for each intersection from the camera image I.

交点修正部60は、図4に示したように、前処理部61、線分識別部62、交点計算部63、特徴ベクトル要素生成部64およびカメラ交点特徴ベクトル生成部65を含み、グレースケール化した各パッチ画像上で、前記交点座標計算部40が計算した交点の位置を修正し、修正後の各交点の情報をベクトル化する。 As shown in FIG. 4, the intersection correction unit 60 includes a preprocessing unit 61, a line segment identification unit 62, an intersection calculation unit 63, a feature vector element generation unit 64, and a camera intersection feature vector generation unit 65, and is grayscaled. On each of the patch images, the position of the intersection calculated by the intersection coordinate calculation unit 40 is corrected, and the information of each corrected intersection is vectorized.

前記交点修正部60において、前処理部61は、抽出した線分ごとに前処理として、(1) 当該線分が垂直姿勢となるようにパッチ画像を回転させ、(2) バイラテラルフィルタを適用し、(3) 所定の閾値処理により画像を0または255の二値の画像に変換し、(4) メディアンフィルタを適用してノイズを除去し、(5) ノイズ除去された線分を、図5(a)に示したように細線化し、(6) ガウシアンフィルタを適用した平滑化により細線化した線分に勾配を持たせる、ことにより前処理後パッチ画像を得る。 In the intersection correction unit 60, the preprocessing unit 61 rotates the patch image so that the line segment is in a vertical posture as preprocessing for each extracted line segment, and (2) applies a bilateral filter. Then, (3) the image is converted into a binary image of 0 or 255 by a predetermined threshold processing, (4) a median filter is applied to remove noise, and (5) the line segment from which noise is removed is shown in the figure. A preprocessed patch image is obtained by thinning the line segment as shown in 5 (a) and (6) giving a gradient to the thinned line segment by smoothing with a Gaussian filter applied.

このような前処理により、不鮮明、不明瞭であるために前記線分抽出部30が不完全にしか抽出できなかった線分を鮮明化、明瞭化して線分検出され易くできる。また、このような前処理は一般的に多くの計算量を必要とするが、本実施形態では前処理がパッチ画像に対してのみ実施されるので、計算量の増加を抑えながら交点検出に影響する実質的に全ての線分を検出され易くできる。 By such a pretreatment, a line segment that can be extracted only incompletely by the line segment extraction unit 30 due to unclearness and unclearness can be clarified and clarified so that the line segment can be easily detected. Further, such preprocessing generally requires a large amount of calculation, but in the present embodiment, since the preprocessing is performed only on the patch image, it affects the intersection detection while suppressing the increase in the calculation amount. It is possible to easily detect substantially all line segments.

線分識別部62は、前処理後パッチ画像に周知のLSD(Line Segment Detector)を適用して線分を識別する。本実施形態では、前処理後パッチ画像に対するラスタスキャンにより、図5(b)に示したように、線分ごとにその一方側エッジおよび他方側エッジに沿って2本の線分が検知されるので、2つの線分の向きの差|θ|を求める。更に、|θ|<閾値THを満たす線分ペアについて、ラスタスキャンの位置ごとに検知された一方側および他方側の各座標の中点座標を求め、中点座標間の距離が最長となる中点座標ペアを通る線分を修正後の線分として識別する。 The line segment identification unit 62 identifies a line segment by applying a well-known LSD (Line Segment Detector) to the preprocessed patch image. In the present embodiment, as shown in FIG. 5B, by raster scanning of the preprocessed patch image, two line segments are detected along one side edge and the other side edge for each line segment. Therefore, the difference between the directions of the two line segments | θ | is obtained. Further, for a line segment pair satisfying | θ | <threshold TH, the midpoint coordinates of each of the one-sided and the other-side coordinates detected at each position of the raster scan are obtained, and the distance between the midpoint coordinates is the longest. The line segment passing through the point coordinate pair is identified as the modified line segment.

交点計算部63は、修正後の線分の交点を再計算し、図5(c)に示したように、再計算結果に基づいて交点の座標を修正する。特徴ベクトル要素生成部64は、再計算された交点ごとに当該交点から各方向へ延びる線分の存否に基づいて特徴ベクトル要素を生成する。本実施形態では、図6に示したように、交点ごとに各方向へ延びる線分の存否が、4ビットのバイナリデータで構成される特徴ベクトル要素の各ビットに割り当てられ、例えば、「UP」方向への存否が最上位ビット(MSB1)に割り当てられる。 The intersection calculation unit 63 recalculates the intersection of the corrected line segments, and corrects the coordinates of the intersection based on the recalculation result as shown in FIG. 5 (c). The feature vector element generation unit 64 generates a feature vector element for each recalculated intersection based on the presence or absence of a line segment extending from the intersection in each direction. In the present embodiment, as shown in FIG. 6, the presence or absence of a line segment extending in each direction at each intersection is assigned to each bit of the feature vector element composed of 4-bit binary data, for example, "UP". The presence or absence in the direction is assigned to the most significant bit (MSB1).

同様に、「RIGHT」方向への存否がMSB2に割り当てられ、「DOWN」方向への存否がMSB3に割り当てられ、「LEFT」方向への存否が最下位ビット(MSB4)に割り当てられる。そして、各ビットに対して、フィールドラインが存在していれば「1」、存在していなければ「0」がセットされる。したがって、「UP」方向へ延びる垂直フィールドラインと「LEFT」方向へ延びる垂直フィールドラインとが検知されている交点の特徴ベクトル要素は"1001"となる。 Similarly, the presence / absence in the "RIGHT" direction is assigned to MSB2, the presence / absence in the "DOWN" direction is assigned to MSB3, and the presence / absence in the "LEFT" direction is assigned to the least significant bit (MSB4). Then, for each bit, "1" is set if the field line exists, and "0" is set if the field line does not exist. Therefore, the feature vector element of the intersection where the vertical field line extending in the "UP" direction and the vertical field line extending in the "LEFT" direction is detected is "1001".

カメラ交点特徴ベクトル生成部65は、カメラ交点に基づいて、各交点の特徴ベクトル要素を所定の順序、例えば図7に示したようなラスタスキャンの順序で一次元に配列することで、カメラ交点特徴ベクトルVcを生成する。図7の例ではカメラ交点特徴ベクトルVcは次式(10)のようになる。 The camera intersection feature vector generation unit 65 arranges the feature vector elements of each intersection in a predetermined order, for example, in the raster scan order as shown in FIG. 7, based on the camera intersections, so that the camera intersection features 65 Generate the vector Vc. In the example of FIG. 7, the camera intersection feature vector Vc is as shown in the following equation (10).

Vc =[1110, 0101, 0011, 1110, 0011, 1010, 1110, 0101, 1001] (10) Vc = [1110, 0101, 0011, 1110, 0011, 1010, 1110, 0101, 1001] (10)

このように、本実施形態ではパッチ画像単位で前処理を実行してパッチ画像内の線分を鮮明化、明瞭化した後に各線分を改めて識別し、当該識別の結果に基づいて交点が計算される。したがって、前記線分抽出部30が、本来の交点を構成する線分以外の線分に基づいて交点を誤検知していた場合でも、少ない計算負荷で正確な交点を再計算できるようになる。 As described above, in the present embodiment, preprocessing is executed for each patch image to clarify and clarify the line segments in the patch image, and then each line segment is identified again, and the intersection is calculated based on the result of the identification. NS. Therefore, even if the line segment extraction unit 30 erroneously detects an intersection based on a line segment other than the line segment constituting the original intersection, the accurate intersection can be recalculated with a small calculation load.

図1へ戻り、モデル交点特徴ベクトル(Vm)要素記憶部70には、競技領域モデルの各フィールドラインの交点(モデル交点)ごとに、当該交点を通るフィールドラインの数および方向に基づいて予め上記と同様の手順で生成したモデル交点特徴ベクトル要素が記憶されている。 Returning to FIG. 1, in the model intersection feature vector (Vm) element storage unit 70, for each intersection (model intersection) of each field line of the competition area model, the above is described in advance based on the number and direction of the field lines passing through the intersection. The model intersection feature vector element generated by the same procedure as in is stored.

対応点設定部80は、マッチング候補抽出部81,モデル交点特徴ベクトル生成部82およびマッチング部83を含み、カメラ画像と競技領域モデルとの対応する交点(対応点)を設定する。 The corresponding point setting unit 80 includes a matching candidate extraction unit 81, a model intersection feature vector generation unit 82, and a matching unit 83, and sets corresponding intersections (corresponding points) between the camera image and the competition area model.

マッチング候補抽出部81は、カメラ交点特徴ベクトルVcの各特徴ベクトル要素に係る交点を定義した水平フィールドラインLHおよび垂直フィールドラインLVの各本数に応じて、カメラ交点特徴ベクトルVcの各特徴ベクトル要素と交点の配列が類似するモデル交点特徴ベクトル要素の組み合わせを抽出する。 The matching candidate extraction unit 81 defines each feature vector of the camera intersection feature vector Vc according to the number of horizontal field lines L H and vertical field line L V that define the intersections related to each feature vector element of the camera intersection feature vector Vc. A model with a similar array of elements and intersections Extracts a combination of intersection feature vector elements.

モデル交点特徴ベクトル生成部82は、当該モデル交点特徴ベクトル要素の組み合わせごとに各特徴ベクトル要素を配列して複数のモデル交点特徴ベクトルVmを生成する。マッチング部83は、カメラ交点特徴ベクトルVcと各モデル交点特徴ベクトルVmとの間でマッチングを実行し、類似度が最も高いモデル交点特徴ベクトルVmとカメラ交点特徴ベクトルVcとの対応関係に基づいて対応点を設定する。 The model intersection feature vector generation unit 82 arranges each feature vector element for each combination of the model intersection feature vector elements to generate a plurality of model intersection feature vectors Vm. The matching unit 83 executes matching between the camera intersection feature vector Vc and each model intersection feature vector Vm, and corresponds based on the correspondence between the model intersection feature vector Vm having the highest similarity and the camera intersection feature vector Vc. Set a point.

図8は、カメラ交点特徴ベクトルVcとモデル交点特徴ベクトルVmとのマッチング方法を模式的に示した図である。 FIG. 8 is a diagram schematically showing a matching method between the camera intersection feature vector Vc and the model intersection feature vector Vm.

カメラ交点特徴ベクトルVcが、例えば3本の水平フィールドラインLHと2本の垂直フィールドラインLVとの交点に関する6つの特徴ベクトル要素をラスタスキャン順に連結して構成されていると、マッチング候補抽出部81は、Vm要素記憶部70から、競技領域モデルの3本の水平フィールドラインと2本の垂直フィールドラインとの交点、すなわちカメラ画像の交点と配列(水平及び垂直位置)が類似する交点に係る6つの特徴ベクトル要素のセットを全て抽出し、それぞれをラスタスキャン順に連結してモデル交点特徴ベクトルVmを生成する。 If the camera intersection feature vector Vc is composed of, for example, six feature vector elements related to the intersection of three horizontal field lines L H and two vertical field lines L V connected in raster scan order, matching candidate extraction is performed. From the Vm element storage unit 70, the unit 81 is set to the intersection of the three horizontal field lines and the two vertical field lines of the competition area model, that is, the intersections of the camera images and the intersections (horizontal and vertical positions) similar to each other. All the sets of the six feature vector elements are extracted and connected in the order of raster scan to generate the model intersection feature vector Vm.

すなわち、競技領域モデルが6本の水平フィールドラインLHと7本の垂直フィールドラインLVとから構成されていると、6本の水平フィールドラインLHから任意に選択した3本(6C3=20通り)と、7本の垂直フィールドラインLVから任意に選択した2本(7C2=21通り)との各交点に関する6つの特徴ベクトル要素の組み合わせを前記Vm要素記憶部70から取得し、組み合わせごとに6つの特徴ベクトル要素を連結して420個のモデル交点特徴ベクトルVmを生成する。 That is, if the competition area model is composed of 6 horizontal field lines L H and 7 vertical field lines L V , 3 arbitrarily selected from 6 horizontal field lines L H (6 C 3). = 20 ways) and 6 feature vector element combinations for each intersection of 2 lines ( 7 C 2 = 21 ways) arbitrarily selected from 7 vertical field lines L V are acquired from the Vm element storage unit 70. Then, 6 feature vector elements are connected for each combination to generate 420 model intersection feature vectors Vm.

ホモグラフィ行列決定部90は、図9に示したように、ホモグラフィ行列生成部91,ハミング距離計算部92,交点誤差計算部93および方向誤差計算部94を含み、ハミング距離、交点誤差、方向誤差の少なくとも2つが閾値未満となるホモグラフィ行列をカメラキャリブレーション用のホモグラフィ行列に決定する。 As shown in FIG. 9, the homography matrix determination unit 90 includes a homography matrix generation unit 91, a humming distance calculation unit 92, an intersection error calculation unit 93, and a direction error calculation unit 94, and includes a humming distance, an intersection error, and a direction. The homography matrix in which at least two of the errors are less than the threshold is determined as the homography matrix for camera calibration.

ホモグラフィ行列生成部91は、対応点の関係にあるカメラ画像の交点座標と競技領域モデルの交点座標との対応関係を用いてホモグラフィ行列を生成する。本実施形態では、水平方向の線分Nh本からnh本、垂直方向の線分Nv本からnv本を選択し、nv×nh個の交点を決める。このとき、nhは2以上Nh以下、nvは2以上Nv以下でなければならない。 The homography matrix generation unit 91 generates a homography matrix by using the correspondence between the intersection coordinates of the camera image and the intersection coordinates of the competition area model, which are in the relationship of the corresponding points. In the present embodiment, nh lines from Nh horizontal line segments and nv lines from Nv vertical line segments are selected, and nv × nh intersections are determined. At this time, nh must be 2 or more and Nh or less, and nv must be 2 or more and Nv or less.

このとき、線分の選び方は、水平方向がNhCnh通り、垂直方向がNvCnv通りあるため、組み合わせパターンはNhCnh×NvCnv通りとなる。本実施形態では、これら全てのパターンに対してホモグラフィ行列が求められる。 At this time, the line segment is selected in Nh C nh ways in the horizontal direction and Nv C nv ways in the vertical direction, so the combination pattern is Nh C nh × Nv C nv ways. In this embodiment, a homography matrix is required for all these patterns.

前記ハミング距離計算部92は、カメラ交点特徴ベクトルVcとモデル交点特徴ベクトルVmとのハミング距離を計算する。ハミング距離の計算結果は、ホモグラフィ行列の生成に用いたカメラ交点およびモデル交点の対応点としての正当性を評価する指標として用いられる。
交点誤差計算部93は、競技領域モデルの各交点座標をホモグラフィ行列生成部91が生成したホモグラフィ行列を用いて投影した座標と、カメラ画像の各交点座標との誤差を計算する。方向誤差計算部94は、競技領域モデルの各交点座標をホモグラフィ行列生成部91が生成したホモグラフィ行列を用いて投影した各座標から伸びる線分(白線)と、カメラ画像の交点座標から延びる線分との方向の誤差を計算する。
The Hamming distance calculation unit 92 calculates the Hamming distance between the camera intersection feature vector Vc and the model intersection feature vector Vm. The calculation result of the Hamming distance is used as an index for evaluating the validity of the camera intersection and the model intersection used for generating the homography matrix as corresponding points.
The intersection error calculation unit 93 calculates an error between the coordinates of each intersection of the competition area model projected using the homography matrix generated by the homography matrix generation unit 91 and the coordinates of each intersection of the camera image. The direction error calculation unit 94 extends from the line segment (white line) extending from each coordinate obtained by projecting each intersection coordinate of the competition area model using the homography matrix generated by the homography matrix generation unit 91 and the intersection coordinate of the camera image. Calculate the difference in direction from the line segment.

前記ホモグラフィ行列決定部90は、前記ハミング距離、交点誤差および方向誤差の少なくとも2つが所定の閾値未満となるホモグラフィ行列を選択する。少なくとも2つが閾値未満となるホモグラフィ行列が存在しなかった場合はエラーを出力し、キャリブレーションは失敗とする。なお、ホモグラフィ行列の候補が複数あった場合は、次の手順で1つに絞り込むことができる。 The homography matrix determination unit 90 selects a homography matrix in which at least two of the Hamming distance, the intersection error, and the direction error are less than a predetermined threshold value. If there is no homography matrix in which at least two are below the threshold value, an error is output and the calibration fails. If there are multiple candidates for the homography matrix, it can be narrowed down to one by the following procedure.

手順1:競技領域内で検出された水平方向および垂直方向の各線分を背景が黒色の画像に白線で描画し、二値(0:黒色または255:白色)の二値白線画像W0を生成する。 Step 1: Draw each horizontal and vertical line segment detected in the competition area with a white line on an image with a black background to generate a binary (0: black or 255: white) binary white line image W 0 . do.

手順2:競技領域モデルの交点座標を各ホモグラフィ行列候補を用いて変換し、変換された交点座標を用いて背景が黒色の画像に白線を描画し、白線画像W(1~K)を生成する(ここで生成される白線画像はホモグラフィ行列の候補数分(K枚)となる)。 Step 2: Convert the intersection coordinates of the competition area model using each homography matrix candidate, draw a white line on the image with a black background using the converted intersection coordinates, and generate a white line image W (1 to K). (The white line images generated here are the number of candidates for the homography matrix (K images)).

手順3:手順1で生成した白線画像W0と、手順2で生成した白線画像W(1~K)とをそれぞれ重ね合わせ、W0の白線と重なる面積が最も大きくなる白線画像WL(Lは1以上K以下の整数)の生成に用いたホモグラフィ行列を出力用のホモグラフィ行列に決定する。 Step 3: The white line image W 0 generated in step 1 and the white line image W (1 to K) generated in step 2 are overlapped with each other, and the white line image W L (L) having the largest area overlapping with the white line of W 0 is obtained. Determines the homography matrix used to generate (an integer between 1 and K) as the output homography matrix.

カメラパラメータ計算部100は、前記決定されたホモグラフィ行列とカメラの内部パラメータとに基づいてカメラキャリブレーション行列を計算して出力する。 The camera parameter calculation unit 100 calculates and outputs a camera calibration matrix based on the determined homography matrix and the internal parameters of the camera.

10…画像取得部,20…競技領域抽出部,30…線分抽出部,40…交点座標計算部,50…パッチ画像抽出部,60…交点修正部,61…前処理部,62…線分識別部,63…交点計算部,64…特徴ベクトル要素生成部,65…カメラ交点特徴ベクトル生成部,70…Vm要素記憶部,80…対応点設定部,81…マッチング候補抽出部,82…交点特徴ベクトル生成部,83…マッチング部,90…ホモグラフィ行列決定部,91…ホモグラフィ行列生成部,92…ハミング距離計算部,93…交点誤差計算部,94…方向誤差計算部,100…カメラパラメータ計算部 10 ... image acquisition unit, 20 ... competition area extraction unit, 30 ... line segment extraction unit, 40 ... intersection coordinate calculation unit, 50 ... patch image extraction unit, 60 ... intersection correction unit, 61 ... preprocessing unit, 62 ... line segment Identification unit, 63 ... Intersection calculation unit, 64 ... Feature vector element generation unit, 65 ... Camera intersection feature vector generation unit, 70 ... Vm element storage unit, 80 ... Corresponding point setting unit, 81 ... Matching candidate extraction unit, 82 ... Intersection point Feature vector generation unit, 83 ... matching unit, 90 ... homography matrix determination unit, 91 ... homography matrix generation unit, 92 ... humming distance calculation unit, 93 ... intersection error calculation unit, 94 ... direction error calculation unit, 100 ... camera Parameter calculation unit

Claims (15)

線分の写ったカメラ画像に基づいてカメラキャリブレーション用の交点を検出する交点検出装置において、
カメラ画像から線分を抽出する手段と、
各線分の交点の座標を計算する手段と、
カメラ画像から各交点を含むパッチ画像を抽出する手段と、
パッチ画像内の線分を細線化後に平滑化する前処理を実施する手段と、
前処理後のパッチ画像上で線分を識別する手段と、
パッチ画像ごとに各交点を前記識別された線分の交点に修正する手段とを具備したことを特徴とする交点検出装置。
In an intersection detection device that detects an intersection for camera calibration based on a camera image showing a line segment,
A means to extract line segments from camera images,
A means to calculate the coordinates of the intersection of each line segment,
A means to extract a patch image including each intersection from a camera image,
A means of performing preprocessing to smooth the line segments in the patch image after thinning,
A means of identifying line segments on the preprocessed patch image,
An intersection detection device comprising means for correcting each intersection for each patch image to the intersection of the identified line segments.
前記パッチ画像を抽出する手段は、各パッチ画像の中心が各交点の座標と一致するように各パッチ画像を抽出することを特徴とする請求項1に記載の交点検出装置。 The intersection detection device according to claim 1, wherein the means for extracting the patch image extracts each patch image so that the center of each patch image coincides with the coordinates of each intersection. 前記前処理を実施する手段は、グレースケール化したパッチ画像に対して前処理を実施することを特徴とする請求項1または2に記載の交点検出装置。 The intersection detection device according to claim 1 or 2, wherein the means for performing the preprocessing is to perform the preprocessing on a grayscaled patch image. 前記線分を識別する手段は、
前処理後のパッチ画像内の線分ごとにエッジ検出を行って一端側および他端側のエッジ座標ペアを検出する手段を具備し、
前記エッジ座標ペアごとに各エッジ座標の中心座標を求め、中心座標間の距離が最長となる中心座標ペアの各中心座標を通る線分を識別結果とすることを特徴とする請求項1ないし3のいずれかに記載の交点検出装置。
The means for identifying the line segment is
A means for detecting edge coordinate pairs on one end side and the other end side by performing edge detection for each line segment in the patch image after preprocessing is provided.
Claims 1 to 3 are characterized in that the center coordinates of each edge coordinate are obtained for each edge coordinate pair, and the line segment passing through each center coordinate of the center coordinate pair having the longest distance between the center coordinates is used as the identification result. The intersection detection device according to any one of.
カメラ画像から競技領域を抽出する手段を具備し、
前記線分を抽出する手段は、前記競技領域から線分を抽出することを特徴とする請求項1ないし4のいずれかに記載の交点検出装置。
Equipped with a means to extract the competition area from the camera image,
The intersection detection device according to any one of claims 1 to 4, wherein the means for extracting the line segment is for extracting the line segment from the competition area.
前記競技領域を抽出する手段は、カメラ画像の全領域を競技領域と推定した後、カメラ画像の統計値を用いた閾値処理により競技領域と推定する領域を段階的に狭める反復処理において閾値を更新し、所定の収束条件が成立した時点で競技領域と推定している領域を抽出することを特徴とする請求項5に記載の交点検出装置。 The means for extracting the competition area updates the threshold in an iterative process in which the entire area of the camera image is estimated as the competition area and then the area estimated to be the competition area is gradually narrowed by the threshold processing using the statistical values of the camera image. The intersection detection device according to claim 5, wherein a region estimated to be a competition region is extracted when a predetermined convergence condition is satisfied. 前記カメラ画像から線分を抽出する手段は、
カメラ画像から線分片を検出する手段と、
各線分片にカメラ画像の所定の端部から垂線を下ろし、当該垂線の角度および長さを計算する手段と、
前記垂線の角度および長さが所定の関係を有する線分片同士を統合する手段とを具備したことを特徴とする請求項1ないし6のいずれかに記載の交点検出装置。
The means for extracting a line segment from the camera image is
A means to detect line segments from camera images,
A means of drawing a perpendicular line from a predetermined end of a camera image on each line segment and calculating the angle and length of the perpendicular line.
The intersection detection device according to any one of claims 1 to 6, further comprising a means for integrating line segments having a predetermined relationship between the angles and lengths of the perpendicular lines.
線分の写ったカメラ画像に基づいて、コンピュータがカメラキャリブレーション用の交点を検出する交点検出方法において、
カメラ画像から線分を抽出し、
各線分の交点の座標を計算し、
カメラ画像から各交点を含むパッチ画像を抽出し、
パッチ画像内の線分を細線化後に平滑化する前処理を実施し、
前処理後のパッチ画像上で線分を識別し、
パッチ画像ごとに各交点の座標を前記識別された線分の交点の座標に修正することを特徴とする交点検出方法。
In an intersection detection method in which a computer detects an intersection for camera calibration based on a camera image showing a line segment.
Extract the line segment from the camera image and
Calculate the coordinates of the intersection of each line segment
Extract the patch image including each intersection from the camera image and
Pre-processing is performed to smooth the line segments in the patch image after thinning them.
Identify the line segment on the preprocessed patch image and
A method for detecting an intersection, which comprises modifying the coordinates of each intersection for each patch image to the coordinates of the intersection of the identified line segment.
前記カメラ画像から線分を抽出する際に、
カメラ画像から線分片を検出し、
各線分片にカメラ画像の所定の端部から垂線を下ろし、当該垂線の角度および長さを計算し、
前記垂線の角度および長さが所定の関係を有する線分片同士を統合することを特徴とする請求項8に記載の交点検出方法。
When extracting a line segment from the camera image
Detects line segments from camera images and
A perpendicular line is drawn from a predetermined end of the camera image on each line segment, and the angle and length of the perpendicular line are calculated.
The intersection detection method according to claim 8, wherein the line segments having a predetermined relationship between the angles and lengths of the perpendicular lines are integrated.
線分の写ったカメラ画像に基づいてカメラキャリブレーション用のパラメータを出力するカメラキャリブレーション装置において、
カメラ画像から線分を抽出する手段と、
各線分の交点の座標を計算する手段と、
カメラ画像から各交点を含むパッチ画像を抽出する手段と、
パッチ画像内の線分を細線化後に平滑化する前処理を実施する手段と、
前処理後のパッチ画像上で線分を識別する手段と、
パッチ画像ごとに各交点を前記識別された線分の交点に修正する手段と、
競技領域モデルの交点を記憶する手段と、
修正した交点と競技領域モデルの交点とを対応付ける手段と、
相互に対応する、修正した交点と競技領域モデルの交点とに基づいてホモグラフィ行列を決定する手段と、
前記ホモグラフィ行列に基づいてカメラパラメータを計算する手段とを具備したことを特徴とするカメラキャリブレーション装置。
In a camera calibration device that outputs parameters for camera calibration based on a camera image showing a line segment.
A means to extract line segments from camera images,
A means to calculate the coordinates of the intersection of each line segment,
A means to extract a patch image including each intersection from a camera image,
A means of performing preprocessing to smooth the line segments in the patch image after thinning,
A means of identifying line segments on the preprocessed patch image,
A means for correcting each intersection to the intersection of the identified line segments for each patch image, and
A means of memorizing the intersections of the competition area model,
A means of associating the modified intersection with the intersection of the competition area model,
A means of determining the homography matrix based on the mutually corresponding modified intersections and the intersections of the competition area model,
A camera calibration apparatus including a means for calculating camera parameters based on the homography matrix.
前記ホモグラフィ行列を決定する手段は、
相互に対応する、修正した交点と競技領域モデルの交点とに基づいて複数のホモグラフィ行列候補を生成する手段と、
前記ホモグラフィ行列候補ごとに、修正した各交点の特徴ベクトルと競技領域モデルの各交点の特徴ベクトルとのハミング距離を計算する手段と、
前記ホモグラフィ行列候補ごとに、修正した各交点と、競技領域モデルの各交点を当該ホモグラフィ行列候補に基づいて投影した各交点との交点誤差を計算する手段と、
前記ホモグラフィ行列候補ごとに、修正した各交点から延びる線分と、競技領域モデルの各交点を当該ホモグラフィ行列候補に基づいて投影した各交点から延びる線分との方向誤差を計算する手段とを具備し、
前記ハミング距離、交点誤差および方向誤差の少なくとも2つが所定の閾値を下回るホモグラフィ行列候補をホモグラフィ行列に決定することを特徴とする請求項10に記載のカメラキャリブレーション装置。
The means for determining the homography matrix is
A means of generating multiple homography matrix candidates based on the mutually corresponding modified intersections and the intersections of the competition area model,
A means for calculating the Hamming distance between the modified feature vector of each intersection and the feature vector of each intersection of the competition area model for each of the homography matrix candidates.
For each of the homography matrix candidates, a means for calculating the intersection error between each corrected intersection and each intersection projected from each intersection of the competition area model based on the homography matrix candidate.
As a means for calculating the directional error between the line segment extending from each of the modified intersections and the line segment extending from each intersection projected from each intersection of the competition area model based on the homography matrix candidate for each of the homography matrix candidates. Equipped with
The camera calibration apparatus according to claim 10, wherein at least two of the Hamming distance, the intersection error, and the direction error are less than a predetermined threshold value, and the homography matrix candidate is determined as the homography matrix.
前記線分を識別する手段は、
前処理後のパッチ画像内の線分ごとにエッジ検出を行って一端側および他端側のエッジ座標ペアを検出する手段を具備し、
前記エッジ座標ペアごとに各エッジ座標の中心座標を求め、中心座標間の距離が最長となる中心座標ペアの各中心座標を通る線分を識別結果とすることを特徴とする請求項10または11に記載のカメラキャリブレーション装置。
The means for identifying the line segment is
A means for detecting edge coordinate pairs on one end side and the other end side by performing edge detection for each line segment in the patch image after preprocessing is provided.
10. The camera calibrator described in.
カメラ画像から競技領域を抽出する手段を具備し、
前記線分を抽出する手段は、前記競技領域から線分を検出することを特徴とする請求項10ないし12のいずれかに記載のカメラキャリブレーション装置。
Equipped with a means to extract the competition area from the camera image,
The camera calibration apparatus according to any one of claims 10 to 12, wherein the means for extracting the line segment is to detect the line segment from the competition area.
前記競技領域を抽出する手段は、カメラ画像の全領域を競技領域と推定した後、カメラ画像の統計値を用いた閾値処理により競技領域と推定する領域を段階的に狭める反復処理において閾値を更新し、所定の収束条件が成立した時点で競技領域と推定している領域を抽出することを特徴とする請求項13に記載のカメラキャリブレーション装置。 The means for extracting the competition area updates the threshold in an iterative process in which the entire area of the camera image is estimated as the competition area and then the area estimated to be the competition area is gradually narrowed by the threshold processing using the statistical values of the camera image. The camera calibration apparatus according to claim 13, wherein a region estimated to be a competition region is extracted when a predetermined convergence condition is satisfied. 前記カメラ画像から線分を抽出する手段は、
カメラ画像から線分片を検出する手段と、
各線分片にカメラ画像の所定の端部から垂線を下ろし、当該垂線の角度および長さを計算する手段と、
前記垂線の角度および長さが所定の関係を有する線分片同士を統合する手段とを具備したことを特徴とする請求項10ないし14のいずれかに記載のカメラキャリブレーション装置。
The means for extracting a line segment from the camera image is
A means to detect line segments from camera images,
A means of drawing a perpendicular line from a predetermined end of a camera image on each line segment and calculating the angle and length of the perpendicular line.
The camera calibration apparatus according to any one of claims 10 to 14, further comprising a means for integrating line segments having a predetermined relationship between the angles and lengths of the perpendicular lines.
JP2020012676A 2020-01-29 2020-01-29 INTERSECTION DETECTION METHOD AND DEVICE AND CAMERA CALIBRATION DEVICE Active JP7198233B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020012676A JP7198233B2 (en) 2020-01-29 2020-01-29 INTERSECTION DETECTION METHOD AND DEVICE AND CAMERA CALIBRATION DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020012676A JP7198233B2 (en) 2020-01-29 2020-01-29 INTERSECTION DETECTION METHOD AND DEVICE AND CAMERA CALIBRATION DEVICE

Publications (2)

Publication Number Publication Date
JP2021118516A true JP2021118516A (en) 2021-08-10
JP7198233B2 JP7198233B2 (en) 2022-12-28

Family

ID=77175788

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020012676A Active JP7198233B2 (en) 2020-01-29 2020-01-29 INTERSECTION DETECTION METHOD AND DEVICE AND CAMERA CALIBRATION DEVICE

Country Status (1)

Country Link
JP (1) JP7198233B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008131177A (en) * 2006-11-17 2008-06-05 Aisin Seiki Co Ltd Correcting device for on-board camera, correcting method, and production method for vehicle using same correcting method
JP2018137667A (en) * 2017-02-23 2018-08-30 Kddi株式会社 Camera calibration method, program and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008131177A (en) * 2006-11-17 2008-06-05 Aisin Seiki Co Ltd Correcting device for on-board camera, correcting method, and production method for vehicle using same correcting method
JP2018137667A (en) * 2017-02-23 2018-08-30 Kddi株式会社 Camera calibration method, program and device

Also Published As

Publication number Publication date
JP7198233B2 (en) 2022-12-28

Similar Documents

Publication Publication Date Title
US9269155B2 (en) Region growing method for depth map/color image
JP5542889B2 (en) Image processing device
US8170368B2 (en) Correcting device and method for perspective transformed document images
CN108229475B (en) Vehicle tracking method, system, computer device and readable storage medium
US9767383B2 (en) Method and apparatus for detecting incorrect associations between keypoints of a first image and keypoints of a second image
Zhang et al. Robust metric reconstruction from challenging video sequences
CN110546651B (en) Method, system and computer readable medium for identifying objects
US8331670B2 (en) Method of detection document alteration by comparing characters using shape features of characters
US8699786B2 (en) 3D model generating apparatus, method and CRM by line pattern imaging
CN108399627B (en) Video inter-frame target motion estimation method and device and implementation device
CN109714530B (en) Aerial camera image focusing method
US20230095142A1 (en) Method and apparatus for improving object image
CN113903024A (en) Handwritten bill numerical value information identification method, system, medium and device
KR101741758B1 (en) A Real-time Face Tracking Method Robust to Occlusion Based on Improved CamShift with Depth Information
JP7198233B2 (en) INTERSECTION DETECTION METHOD AND DEVICE AND CAMERA CALIBRATION DEVICE
JP2003303346A (en) Method, device and program for tracing target, and recording medium recording the program
KR20150059302A (en) Method for recognizing character by fitting image shot, and information processing device for executing it
JP2018137667A (en) Camera calibration method, program and device
JP2021022028A (en) Image processing system, image processing method and image processing program
CN111091895A (en) Breast image analysis method, system and non-transitory computer readable medium
KR102101481B1 (en) Apparatus for lenrning portable security image based on artificial intelligence and method for the same
JP7297720B2 (en) Camera calibration method, apparatus and program
CN114359322A (en) Image correction and splicing method, and related device, equipment, system and storage medium
JP6278757B2 (en) Feature value generation device, feature value generation method, and program
JP2018160024A (en) Image processing device, image processing method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221024

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221102

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221128

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221216

R150 Certificate of patent or registration of utility model

Ref document number: 7198233

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150