JP6384050B2 - Line detection apparatus, line detection method, and program - Google Patents
Line detection apparatus, line detection method, and program Download PDFInfo
- Publication number
- JP6384050B2 JP6384050B2 JP2013262319A JP2013262319A JP6384050B2 JP 6384050 B2 JP6384050 B2 JP 6384050B2 JP 2013262319 A JP2013262319 A JP 2013262319A JP 2013262319 A JP2013262319 A JP 2013262319A JP 6384050 B2 JP6384050 B2 JP 6384050B2
- Authority
- JP
- Japan
- Prior art keywords
- search
- line
- unit
- image
- electric wire
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、線検出装置、線検出方法、及びプログラムに関する。 The present invention relates to a line detection device, a line detection method, and a program.
撮像した画像に映りこんだ、電線等の線状の物体を抽出し、画像処理により除去したいという要望がある。画像処理により電線等を抽出するためには、まず、画像中の電線等を検出しなければならない。画像に映りこんだ電線が直線形状を有する場合、特許文献1に開示された技術を用いてこの電線を検出することができる。
There is a demand for extracting a linear object such as an electric wire reflected in a captured image and removing it by image processing. In order to extract an electric wire or the like by image processing, first, the electric wire or the like in the image must be detected. When the electric wire reflected in the image has a linear shape, the electric wire can be detected using the technique disclosed in
特許文献1に開示された技術は、画像に映りこんだ、電線等の線状の物体が、直線以外の形状を有していた場合、この電線を検出することができない。
The technique disclosed in
本発明は、上記の課題に鑑みてなされたものであり、画像に映りこんだ、任意の形状を有する線状の物体を検出できる線検出装置、線検出方法、及びプログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and an object thereof is to provide a line detection device, a line detection method, and a program that can detect a linear object having an arbitrary shape reflected in an image. And
前記目的を達成するため、本発明に係る線検出装置の一態様は、
ターゲット画像に含まれている検出対象線の少なくとも一部を含む探索領域を生成する生成部と、
前記検出対象線の、前記探索領域に含まれる部分を表す線情報を取得し、前記探索領域から所定の探索方向に所定の距離だけ離れた位置に次の探索領域を生成して次の線情報を取得する動作を繰り返し、得られた複数の線情報を統合することにより、前記検出対象線を検出する探索部と、
前記探索部で取得された前記線情報で特定される前記検出対象線の形状を近似する近似曲線を求める近似部と、
前記近似部で求められた前記近似曲線との間の類似度が閾値以上である曲線を前記ターゲット画像から抽出し、抽出した前記曲線を特定する情報を求める抽出部と、
を備える、
ことを特徴とする。
また、前記目的を達成するため、本発明に係る線検出方法の一態様は、
検出対象線の少なくとも一部を含む探索領域を生成する生成ステップと、
前記検出対象線の前記探索領域に含まれる部分を表す線情報を取得し、前記検出対象線に沿った位置に次の探索領域を生成して次の線情報を取得する動作を繰り返す探索ステップと、
前記探索ステップにおいて取得された前記線情報で特定される前記検出対象線の形状を近似する近似曲線を求める近似ステップと、
前記近似ステップにおいて求められた前記近似曲線との間の類似度が閾値以上である曲線をターゲット画像から抽出し、抽出した前記曲線を特定する情報を求める抽出ステップと、
を含む、
ことを特徴とする。
また、前記目的を達成するため、本発明に係るプログラムの一態様は、
線検出装置を制御するコンピュータに、
検出対象線の少なくとも一部を含む探索領域を生成する生成機能、
前記検出対象線の前記探索領域に含まれる部分を表す線情報を取得し、前記検出対象線に沿った位置に次の探索領域を生成して次の線情報を取得する動作を繰り返す探索機能、
前記探索機能において取得された前記線情報で特定される前記検出対象線の形状を近似する近似曲線を求める近似機能、
前記近似機能において求められた前記近似曲線との間の類似度が閾値以上である曲線をターゲット画像から抽出し、抽出した前記曲線を特定する情報を求める抽出機能、
を実現させる、
ことを特徴とする。
In order to achieve the above object, one aspect of the line detection apparatus according to the present invention is:
A generating unit that generates a search region including at least a part of a detection target line included in the target image;
Line information representing a portion included in the search area of the detection target line is acquired, and the next line information is generated by generating a next search area at a position away from the search area in a predetermined search direction by a predetermined distance. A search unit for detecting the detection target line by repeating the operation of acquiring
An approximation unit for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired by the search unit;
An extraction unit for extracting a curve having a similarity between the approximate curve obtained by the approximation unit and a threshold value or more from the target image, and obtaining information for specifying the extracted curve;
Comprising
It is characterized by that.
In order to achieve the above object, one aspect of the line detection method according to the present invention includes:
A generation step for generating a search region including at least a part of the detection target line;
A search step of acquiring line information representing a portion included in the search area of the detection target line, repeating the operation of generating a next search area at a position along the detection target line and acquiring the next line information; ,
An approximation step for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired in the search step;
An extraction step for extracting information that specifies the extracted curve by extracting a curve having a similarity between the approximate curve obtained in the approximation step and a threshold value or more from a target image;
including,
It is characterized by that.
In order to achieve the above object, one aspect of the program according to the present invention is as follows:
In the computer that controls the line detector,
A generation function for generating a search area including at least a part of the detection target line;
A search function for acquiring line information representing a portion included in the search area of the detection target line, generating a next search area at a position along the detection target line, and repeating the operation of acquiring the next line information,
An approximation function for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired in the search function;
An extraction function for extracting information specifying the extracted curve by extracting a curve having a similarity between the approximate curve and the approximate curve obtained in the approximation function from a target image;
To realize,
It is characterized by that.
本発明によれば、画像に映りこんだ、任意の形状を有する線状の物体を検出できる線検出装置、線検出方法、及びプログラムを提供することができる。 According to the present invention, it is possible to provide a line detection apparatus, a line detection method, and a program that can detect a linear object having an arbitrary shape reflected in an image.
(実施形態1)
以下、本発明に係る線検出装置及び線検出方法を、画像処理装置を例に用い、図面を参照しながら詳細に説明する。なお、図中同一又は同等の部分には同じ符号を付す。
(Embodiment 1)
Hereinafter, a line detection apparatus and a line detection method according to the present invention will be described in detail using an image processing apparatus as an example with reference to the drawings. In addition, the same code | symbol is attached | subjected to the same or equivalent part in a figure.
本実施形態に係る画像処理装置1は、画像に映りこんだ線状の物体を特定して除去する機能を有し、図1に示すように、制御部11、主記憶部12、外部記憶部13、操作部14、ディスプレイ15、及びこれらの各部を相互に接続するシステムバスSBをハードウェア構成として備える。
The
制御部11は、CPU(Central Processing Unit)を備える。制御部11は、外部記憶部13が記憶している制御プログラム16を実行することにより画像処理装置1全体を制御すると共に、後述する、線探索、線抽出、線除去を含む各種機能を実現する。
The
主記憶部12は、RAM(Random Access Memory)を備える。主記憶部12は、制御部11のワークメモリとして機能し、処理対象の画像や処理過程の画像、その他のデータ、プログラムを一時的に記憶する。外部記憶部13が記憶している制御プログラム16は、主記憶部12に展開される。
The
外部記憶部13は、不揮発性メモリ(例えば、フラッシュメモリやハードディスク)を備え、線検出装置1全体の制御に必要な制御プログラム16、線除去を行うための画像処理プログラムを含む各種プログラム、各種固定データ等を固定的に記憶する。外部記憶部13は、記憶しているデータやプログラムを制御部11に供給する。また、外部記憶部13は、制御部11から供給されたデータを記憶する。
The
操作部14は、キーボード、マウス等の入力デバイスを備え、ユーザによる操作にしたがって入力を受け付け、制御部11に伝達する。
The
ディスプレイ15は、制御部11の制御に従って、主記憶部12及び外部記憶部13が記憶している各種画像や各種データを表示する。ディスプレイ15は、例えば、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)を備える。
The
システムバスSBは、制御部11〜ディスプレイ15を相互に接続する。
The system bus SB connects the
上記のハードウェア構成を有する画像処理装置1は、機能的には、図2に示すように、記憶部100と、表示部110と、選択部120と、線抽出部130と、微分部140と、勾配フィルタリング部150と、探索部160と、マスキング部170と、を備える。
As shown in FIG. 2, the
記憶部100は、処理対象のターゲット画像TGを記憶する。ターゲット画像TGは、図3に例示するように、除去対象となる電線PLの画像を含む処理対象の画像である。ターゲット画像TGは、外部の画像入力装置(例えば、デジタルカメラやメモリカード、ネットワーク)から取りこまれる。記憶部100は、外部記憶部13等によって実現される。
The
表示部110は、ターゲット画像TGを含む種々の画像を表示する。表示部110は、ディスプレイ15等によって実現される。
The
選択部120は、ユーザが、ターゲット画像TGに含まれる、除去を所望する電線PL上の任意の点POを選択した場合、この点POの位置を取得する。選択部120は、操作部14、ディスプレイ15、制御部11等から構成される。
When the user selects an arbitrary point PO on the electric wire PL to be removed, which is included in the target image TG, the
選択部120は、図4に示すように、ユーザが選択した点POを基準として、所定のサイズの矩形領域(探索領域SR)を生成する。所定のサイズは、電線PLの少なくとも一部を含むように任意の方法で設定されている。本実施形態において、探索領域SRは、あらかじめ設定した、電線PLの探索領域SRに含まれる部分が直線とみなせる程度のサイズに予め設定されている。
Selecting
線抽出部130は、図2に示すように、二値化部131と、線検出部132と、特徴量取得部133と、を備える。
As illustrated in FIG. 2, the
二値化部131は、探索領域SRの画像を、探索領域SRの輝度情報に基づいて設定した閾値を用いて二値化する。二値化部131は、制御部11等から構成される。
The
線検出部132は、二値化部131によって生成された探索領域SRの二値化画像から、公知技術により、電線PLを検出する。線検出部132は、制御部11等から構成される。
The
特徴量取得部133は、線検出部132によって検出された電線PLの幅wと、探索領域SR内の電線PLとそれ以外の部分との平均輝度の差dとを電線PLの特徴量として取得する。特徴量取得部133は、制御部11等から構成される。
The feature
微分部140は、ターゲット画像TGに微分フィルタを適用し、ターゲット画像TGのX方向微分画像gx及びY方向微分画像gyを生成する。微分部140は、制御部11等から構成される。
Differentiating
勾配フィルタリング部150は、微分部140が生成したX方向微分画像gx及びY方向微分画像gyを非特許文献1に開示されている技術を用いて勾配フィルタリングを行うことにより、勾配フィルタ画像Ex、Eyを生成する。勾配フィルタリング部150は、さらに、Ex画像とEy画像を加算してEx+Ey画像を生成し、さらに、これを二値化することにより、勾配フィルタ画像を生成する。勾配フィルタリング部150は、制御部11等から構成される。
The
具体的には、勾配フィルタリング部150は、X方向微分画像gxに下記の式(1)を適用してEx画像を生成し、Y方向微分画像gyに下記の式(2)を適用してEy画像を生成する。
Specifically, the
ここで、定数rは、評価対象画素の近傍−(2w+1)〜+(2w+1)の範囲に属する整数である。wは、特徴量取得部133が特徴量として取得した、探索領域SRの二値化画像から従来技術を用いて線検出部132により検出された電線PLの幅wである。
Here, the constant r is an integer that belongs to the vicinity of the evaluation target pixel-(2w + 1) to + (2w + 1). w is the width w of the electric wire PL detected by the
勾配フィルタリング部150は、さらに、Ex画像とEy画像の同一座標位置の画素の輝度を加算することによりEx+Ey画像を生成する。
The
勾配フィルタリング部150は、Ex+Ey画像中の、輝度が(Ex+Ey)≧th(式(3))を満たす画素に「1」の輝度を、式(3)を満たさない画素に「0」の輝度を、それぞれ付与することにより勾配フィルタ画像を生成する。
In the Ex + Ey image, the
式(3)中の閾値thは、例えば、特徴量取得部133が特徴量として取得した、線検出部132が電線PLとして抽出した部分とそれ以外の部分との間の輝度差dの半分d/2に設定される。
The threshold value th in the expression (3) is, for example, half d of the luminance difference d between the portion acquired as the feature amount by the feature
探索部160は、勾配フィルタリング部150が生成した勾配フィルタ画像内において電線PLに沿って線探索を行い、電線PLを構成する画素の位置(座標)を示す線情報を順次取得して蓄積する。探索部160は、制御部11等から構成される。
具体的には、探索部160は、勾配フィルタ画像内で、ユーザが選択した点POを基点として、探索領域SRを電線PLに沿って移動しながら順次生成し、探索領域SRに含まれる輝度値が「1」の画素の位置を示す線情報を生成する。探索部160が行う線探索処理の詳細については図5,図6のフローチャートを参照して後述する。
Specifically, the
マスキング部170は、線情報で示される位置にある画素の輝度値として、例えば、電線PL近傍の背景画像を構成する画素の輝度値を付与することにより、マスク画像を作成する。マスキング部170は、さらに、生成したマスク画像を用いて、ターゲット画像TGをマスクすることにより、ターゲット画像TG中の電線PLを除去する。
The
以下、上記の機能構成を有する画像処理装置1が、電線PLの画像をターゲット画像TGから除去する動作を、図5〜図7を参照しながら説明する。
Hereinafter, an operation in which the
画像処理装置1が備える外部記憶部13は、あらかじめ、ユーザが除去を所望する電線PLの画像を含むターゲット画像TGを外部の画像入力装置から取りこみ、記憶している。
The
ターゲット画像TGに含まれる電線PLの画像を除去したい場合、ターゲット画像TGを主記憶部12に展開すると共に画像処理装置1が備える複数の動作モードの1つである線除去モードを選択する。
When it is desired to remove the image of the electric wire PL included in the target image TG, the target image TG is developed in the
ユーザが線除去モードを選択すると、制御部11は、外部記憶部13から線探索プログラム及び画像処理プログラムをロードし、主記憶部12に展開する。ディスプレイ15は、図3(A)に例示するターゲット画像TGを表示する。
When the user selects the line removal mode, the
ユーザは、ディスプレイ15によって表示されたターゲット画像TG、例えば、図3(A)に示す画像TG中の、除去を所望する電線PL上の任意の点を、操作部14を用いて指定する。
The user designates an arbitrary point on the electric wire PL desired to be removed in the target image TG displayed on the
制御部11は、ユーザ操作に応答し、図5のフローチャートに示す除去処理を開始する。
In response to the user operation, the
選択部120は、ユーザが指定した点POのターゲット画像TG内における位置(座標(x,y))を取得する(ステップS101)。選択部120は、図4に例示するように、ステップS101で取得した点POの位置を中心として、矩形の探索領域SRを生成する(ステップS102)。上述したように、探索領域SRは、電線PLの探索領域SRに含まれる部分を直線とみなすことができる程十分に小さいサイズに予め設定されている。
The
二値化部131は、探索領域SRの画像を、平均輝度値等の予め設定した閾値を用いて二値化する(ステップS103)。線検出部132は、生成された二値化画像から、既知の任意の技術を用いて電線PLを検出する(ステップS104)。なお、ここで検出された電線PLは、ユーザが除去を所望する電線PLに加えて、孤立点や背景などのノイズを含んでいる可能性がある。このため、ここで検出された電線PLは、後述するステップS107で定数r及び閾値thを算出することにのみ利用する。
The
次に、特徴量取得部133は、検出された電線PLの特徴量を取得する(ステップS105)。具体的には、特徴量取得部133は、検出された電線PLの幅wを特徴量として取得する。さらに、特徴量取得部133は、ターゲット画像TG上で、探索領域SR内の電線PLとして検出された部分とそれ以外の部分との平均輝度値をそれぞれ算出し、これらの平均輝度値の差dを特徴量として取得する。
Next, the feature
次に、微分部140は、ターゲット画像TGを微分して微分画像を生成する(ステップS106)。具体的には、微分部140は、ターゲット画像TGに対して微分フィルタを適用し、ターゲット画像TGのX方向の輝度の勾配を表すX方向微分画像gxと、ターゲット画像TGのY方向の輝度の勾配を表すY方向微分画像gyと、を生成する。
Next, the
勾配フィルタリング部150は、ステップS105で特徴量として取得した電線PLの幅wと輝度差dとに基づいて、式(1)〜(3)で使用する定数rと閾値thとを下記(4)式、(5)式により算出する(ステップS107)。
r=2w+1 (式(4))
th=d/2 (式(5))
The
r = 2w + 1 (Formula (4))
th = d / 2 (Formula (5))
次に、勾配フィルタリング部150は、微分画像X方向微分画像gxとY方向微分画像gyとに、定数r及び閾値thを用いて勾配フィルタリングを行い、勾配フィルタ画像を生成する(ステップS108)。
Next, the
具体的には、勾配フィルタリング部150は、X方向微分画像gxに前述の式(1)を用いてEx画像を生成し、Y方向微分画像gyに前述の式(2)を用いてEy画像を生成する。続いて、勾配フィルタリング部150は、Ex画像とEy画像の相対位置が同一の画素の輝度値を加算することによりEx+Ey画像を生成する。さらに、勾配フィルタリング部150は、Ex+Ey画像中の、輝度値が式(3)を満たす画素に「1」の輝度値を、輝度値が式(3)を満たさない画素に「0」の輝度値を、それぞれ付与することにより二値の勾配フィルタ画像を生成する。
Specifically, the
次に、探索部160は、ステップS108で生成された勾配フィルタ画像中で、図6のフローチャートに詳細を示す線探索処理を行い、電線PLを構成する画素の位置を示す線情報を取得する(ステップS109)。ここで、図6及び図7を参照して、探索部160が行う線探索処理を詳細に説明する。
Next, the
探索部160は、図5のフローチャートのステップS102で生成した探索領域SRを基点とする線探索処理を行う。
The
まず、探索部160は、ステップS102において生成した探索領域SRを、その中心が除去対象の線上になる位置に補正する(ステップS1001)。より詳細には、図7(A)に例示するように、ユーザが指定した点POは除去対象の電線PLからずれていることがある。探索部160は、図7(B)に示すように、探索領域SRを、その中心CEが電線PL上に来る位置に移動する。
First, the
次に、探索部160は、勾配フィルタ画像上で、探索領域SR内で「1」の輝度値を有する画素の位置を、除去対象の電線PLを構成する画素の位置を示す線情報として取得し、記憶する(ステップS1002)。
Next, the
続いて、探索部160は、次の探索を行うため、勾配フィルタ画像上で、探索領域SRを電線PLに沿って移動する必要がある。そこで、探索部160は、まず、探索領域SRの移動方向と移動量を示す移動ベクトルAを求める(ステップS1003)。
移動ベクトルAを求めるに際し、探索領域SRの移動方向は、ユーザが指示した点POを起点として、電線PLに沿って2方向存在する。そこで、探索部160は、始めに、何れの方向に探索を行うかを特定する。これは、例えば、右方向優先というように予め設定しておけばよい。さらに、元の探索領域SRと新たな探索領域SR’とは、電線PLを構成する画像の抽出漏れを防ぐため、一部重複している必要がある。このため、探索部160は、探索領域SRを、電線PLの延びる方向に、探索領域SRに含まれる電線PLの長さL以下の距離だけ移動して、新たな探索領域SR’とする必要がある。また、電線PLが実際には曲線であることを考慮すると、移動量は、L/2程度が望ましい。
Subsequently, the
When obtaining the movement vector A, there are two directions of movement of the search region SR along the electric wire PL, starting from the point PO designated by the user. Therefore, the
そこで、探索部160は、電線PLの探索領域SRに含まれる部分の始点と終点を、図7(C)に示すように、それぞれ(x1、y1)及び(x2、y2)とすると、移動ベクトルAを、A=((x 2 −x 1 )/2,(y 2 −y 1 )/2) (式(5))と求める。
Therefore, the
探索部160は、図7(D)に示すように、探索領域SRを、移動ベクトルAが示す方向に、移動ベクトルAの大きさだけ移動し、新たな探索領域SR’を生成する(ステップS1004)。
As shown in FIG. 7D, the
探索部160は、ハフ変換、テンプレートマッチング等を用いて、元の探索領域SRの画像と、ステップS1004で生成した探索領域SR’の画像と、の間の画像間類似度を算出する(ステップS1005)。
The
探索部160は、ステップS1005で算出した画像間類似度が、所定の閾値以上か否かを判定する(ステップS1006)。
The
探索部160は、画像間類似度が閾値以上であると判別した場合(ステップS1006;Yes)、ステップS1002〜ステップS1006を繰り返し、探索領域SRを電線PLに沿って一方向に微小量ずつ移動しながら、ユーザにより特定された電線PLを構成する画素の位置情報を蓄積する。
When the
一方、探索部160が、ステップS1006で、画像間類似度が閾値より小さいと判別した場合(ステップS1006;No)、図7(E)に示すように、探索領域SRが電線PLの一端に達したと推定されるので、電線PLの一端へ向かう線探索を終了し、ステップS1007へ移る。
On the other hand, when the
探索部160は、電線PLの両端に向かって探索を行ったか否かを判別する(ステップS1007)。
この例では、探索部160は、電線PLの他端に向かって探索をまだ行っていないので、Noと判別し、ステップS1008に進む。
In this example, the
ステップS1008で、探索部160は、ステップS1001で位置を修正した探索領域SRから、電線PLの他端に向かう移動ベクトルAを求め、新たな探索領域SRを生成する(ステップS1008)。そして、ステップS1002〜ステップS1006の動作を、電線PLの他端側に向かって繰り返す。
In step S1008, the
処理が進み、ステップS1006で、新旧探索領域SRの画像の画像間類似度が閾値以下と判別されると(ステップS1006;No)、ステップS1007で、電線PLの両端に向かって探索済みであると判別され(ステップS1007;Yes)、処理はステップS1009に進む。 When the process proceeds and it is determined in step S1006 that the image similarity between the images in the new and old search areas SR is equal to or less than the threshold value (step S1006; No), in step S1007, it has been searched toward both ends of the electric wire PL. The determination is made (step S1007; Yes), and the process proceeds to step S1009.
探索部160は、ステップS1009で、それまでに蓄積した線情報によって示される電線PLの画像を構成する画素の位置を、重複を省きつつ統合し(ステップS1009)、線探索処理を終了し、図5のステップS110に進む。
In step S1009, the
ステップS110において、マスキング部170は、ステップS109で探索部160が電線PLの画素であるとして特定した位置(座標)に、電線PLの近傍の背景に相当する画像を展開して、マスク画像を作成する(ステップS110)。
In step S110, the
マスキング部170は、生成したマスク画像を用いて、ターゲット画像TG中の電線PLをマスクすることにより、図3(B)に例示するように、電線PLを除去し(ステップS111)、これをディスプレイ15に表示し、線除去処理を終了する。
The
以上説明したように、画像処理装置1は、ユーザが指定した電線PLに沿って探索領域SRを順次生成しながら線探索を行うことにより、任意の形状を有する電線PLを構成する画素の位置を特定することができる。さらに、孤立点や背景を誤って線として抽出してしまうことを防げる。
As described above, the
勾配フィルタリングに用いる閾値r、thが、特徴量取得部133が取得した特徴量wとdに基づいて決定されるため、ユーザが試行錯誤を通じて閾値を設定する必要がない。
Since the threshold values r and th used for gradient filtering are determined based on the feature values w and d acquired by the feature
なお、以上説明した実施形態では、ターゲット画像TGに含まれる電線を線探索し、抽出し、画像処理により除去する例を示したが、本発明はこれに限定されない。例えば、送配電線、電話線、ロープ、ホース等の、線状の任意の物体の画像を抽出して除去する場合に適用できる。 In the implementation form described above, the electric wire and the line search in the target image TG, extracted, an example of removing the image processing, the present invention is not limited thereto. For example, the present invention can be applied to a case where an image of a linear object such as a transmission / distribution electric wire, a telephone line, a rope, or a hose is extracted and removed.
本実施形態では、探索領域SRを縦長の長方形の領域として図示したが、正方形でも、円形でもよく、その形状は任意である。 In the present embodiment, the search area SR is illustrated as a vertically long rectangular area . However, the search area SR may be square or circular, and its shape is arbitrary.
本実施形態では、微分部140は、線探索を行う前に、ターゲット画像TG全体を微分することで微分画像を取得した。しかし、これに限定されず、ターゲット画像TG全体ではなく、探索領域SRのみを微分して微分画像を取得することとしてもよい。この場合には、ステップS1001とS1004で、探索領域SRを生成する度に、ステップS106〜S108の処理を行って、探索領域SRの微分画像gxとgyを生成し、勾配フィルタ画像を生成する。
In the present embodiment, the differentiating
本実施形態では、ある探索領域SRから、この探索領域SRに含まれる電線PLの長さLの半分の距離L/2だけ離れた位置に、次の探索領域SRを生成した。これに限定されず、2つの探索領域SRの間の距離は、2つの探索領域SRが共通部分を有する範囲で任意に設定できる。また、移動ベクトルAの向きは、探索領域SRの中心CEから電線PLの探索領域SR内の端点に向かう方向とする等、適宜設定可能である。 In the present embodiment, the next search region SR is generated from a certain search region SR at a position separated by a distance L / 2 that is half the length L of the electric wire PL included in the search region SR. However, the present invention is not limited to this, and the distance between the two search areas SR can be arbitrarily set within a range in which the two search areas SR have a common part. In addition, the direction of the movement vector A can be set as appropriate, such as the direction from the center CE of the search region SR toward the end point in the search region SR of the electric wire PL.
(実施形態2)
実施形態1では、探索部160は、電線PLの探索領域SRに含まれる部分を直線とみなし、この直線の傾きの方向へ探索領域SRを順次生成することにより電線PLに沿った線探索を行った。
実施形態1で示した方法とは異なる方法を用いて線探索を行うことができる。
(Embodiment 2)
In the first embodiment, the
The line search can be performed using a method different from the method shown in the first embodiment.
以下、電線PLの、探索領域SRに含まれる部分の接線方向へ探索領域SRを順次生成することにより、電線PLに沿った線探索を行う画像処理装置の機能及び動作を説明する。 Hereinafter, functions and operations of the image processing apparatus that performs line search along the electric wire PL by sequentially generating the search region SR in the tangential direction of the portion of the electric wire PL included in the search region SR will be described.
本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1とほぼ同様の機能構成を備える。ただし、探索部160の機能が実施形態1とは一部異なる。
The
本実施形態に係る画像処理装置1が備える探索部160は、電線PLの、探索領域SRに含まれる部分の接線方向へ探索領域SRを順次生成しながら線探索を行う。
The
また、探索部160は、探索領域SRを生成する度に、生成した探索領域SRが線探索対象の電線PLから外れていないかを判別し、探索領域SRが電線PLから外れていた場合、この探索領域SRを電線PL上に移動する。すなわち、探索部160は、順次生成される探索領域SRが全て電線PLに載るように各探索領域SRの位置を修正しながら線探索を行う。
In addition, every time the
以下、図8のフローチャートを参照して、探索部160が行う線探索処理を詳細に説明する。
Hereinafter, the line search process performed by the
本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1と同様に、図5のフローチャートに示す除去処理と同様の除去処理を行う。ただし、探索部160は、ステップS109において、図6のフローチャートに示す線探索処理の代わりに、図8のフローチャートに示す線探索処理を、勾配フィルタ画像中で行う。
Similar to the
探索部160は、図8のフローチャートに示す線探索処理を開始すると、まず、図5のフローチャートのステップS102で生成した探索領域SRが電線PLから外れている可能性があるため、図9(A)に示すように、この探索領域SRの中心CEと、電線PLの探索領域SRに含まれている部分の中心CNと、が一致する位置に補正する(ステップS2001)。
When the
探索部160は、位置を補正した探索領域SRが含む、勾配フィルタ画像内で「1」の輝度値を有する画素の位置を、電線PLの画像を構成する画素の位置を示す線情報として取得し、保存する(ステップS2002)。
The
次に、探索部160は、移動ベクトルBを生成する。ここでは、探索領域SRの中心CEにおける電線PLの接線を求め、接線の方向を移動ベクトルBの向きとする(ステップS2003)。一方、移動ベクトルBの大きさは、探索領域SRのサイズに基づいて、元の探索領域SRと新探索領域SR’とが必ず重なるように予め設定されている大きさとする。
Next, the
探索部160は、図9(B)に示すように、探索領域SRを移動ベクトルB従って移動し新たな探索領域SR’を生成する(ステップS2004)。
As shown in FIG. 9B, the
探索部160は、生成した新たな探索領域SR’の中心位置CEと、新探索領域SR’が含む電線PLの中心CNと、が一致するか否かを判別する(ステップS2005)。2つの中心CEとCNが一致すると判別すると(ステップS2005;Yes)、ステップS2007へ移る。
The
一方、新探索領域SR’の中心CEと新探索領域SR’内の電線PLの中心CNとが図9(c)に示すような位置関係の場合、探索部160は両中心が一致しないと判別する(ステップS2005;No)。この場合、探索部160は、探索領域SR’を、図9(D)に示すように、その中心CEと、探索領域SR’に含まれる電線PLの中心CNと、が一致する位置に補正する(ステップS2006)。
On the other hand, when the center CE of the new search region SR ′ and the center CN of the electric wire PL in the new search region SR ′ have a positional relationship as shown in FIG. 9C, the
探索部160は、元の探索領域SRの画像と、位置を補正した新探索領域SR’の画像と、の間の類似度を算出する(ステップS2007)。
The
探索部160は、ステップS2007で算出した画像間類似度が、所定の閾値以上か否かを判定する(ステップS2008)。
The
探索部160は、画像間類似度が閾値以上であると判別した場合(ステップS2008;Yes)、ステップS2002〜ステップS2008を繰り返す。
When the
探索部160は、画像間類似度が閾値より小さいと判別した場合(ステップS2008;No)、電線PLの一端に達したと推定されるので、電線PLの一端へ向かう線探索を終了し、ステップS2009へ移る。
When it is determined that the similarity between images is smaller than the threshold value (step S2008; No), the
探索部160は、電線PLの両端に向かって探索を行ったか否かを判別する(ステップS2009)。
探索部160は、電線PLの両端に向かって探索をまだ行っていないと判別すると(ステップS2009;No)、ステップS2010へ移り、電線PLの他端へ向かう探索を開始する。
When determining that the search has not yet been performed toward both ends of the electric wire PL (step S2009; No), the
探索部160は、ステップS2001で位置を補正した探索領域SRから、電線PLの他端に向かう方向への移動ベクトルBを生成し、新たな探索領域SRを生成する(ステップS2010)。そして、ステップS2002〜ステップS2008の動作を、電線PLの他端に向かって繰り返す。
The
探索部160は、ステップS2009で、電線PLの両端に向かって探索済みであると判別すると(ステップS2009;Yes)、それまでに取得した線情報によって示される、電線PLの画像を構成する画素の位置を、重複を省きつつ統合し、除去対象の電線PLを構成する画素の位置を示す線情報とし(ステップS2011)、線探索処理を終了する。
When the
以上説明したように、本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1と異なる方法を用いて電線PLに沿って線探索処理を行い、任意の形状を有する電線PLを抽出することができる。
As described above, the
実施形態1では、その領域に含まれる線を直線とみなせる程度に十分小さい領域を探索領域SRとした。本実施形態では、実施形態1における探索領域SRよりも大きい領域を探索領域SRとして用いることができる。このため、線探索が実施形態1に比べてより高速になり、処理負荷も小さくなる。 In the first embodiment, an area that is sufficiently small to allow a line included in the area to be regarded as a straight line is set as the search area SR. In the present embodiment, an area larger than the search area SR in the first embodiment can be used as the search area SR. For this reason, the line search is faster than the first embodiment, and the processing load is reduced.
本実施形態では、探索領域SRの中心CEが電線PLから外れた場合には、中心CEが電線PL上に戻るよう補正しながら線探索を行う。このため、確実に電線PLに沿って線探索を行い、電線PLを正確に抽出できる。 In the present embodiment, when the center CE of the search region SR deviates from the electric wire PL, the line search is performed while correcting the center CE so as to return to the electric wire PL. For this reason, a line search can be reliably performed along the electric wire PL, and the electric wire PL can be accurately extracted.
本実施形態では、探索領域SR内の電線PLの中心CNにおける接線方向ベクトルを移動ベクトルBとしたが、これに限定されない。中心CN以外の任意の点における接線方向ベクトルを移動ベクトルBの向きとしてもよい。具体的には、図10に例示するように、探索領域SR内における電線PLの端点EP1及びEP2における接線方向1、2の方向ベクトルを移動ベクトルBの向きとしてもよい。
In the present embodiment, the tangential direction vector at the center CN of the electric wire PL in the search region SR is the movement vector B, but the present invention is not limited to this. A tangential direction vector at an arbitrary point other than the center CN may be set as the direction of the movement vector B. Specifically, as illustrated in FIG. 10, the direction vector of the
また、探索領域SRの中心CEが電線PLからずれたときに、電線PLの最短距離の位置に中心CEが来るように探索領域SRの位置を補正する等してもよい。また、これに限らず、探索領域SR中の任意の基準点と、電線PL上の任意の基準点と、が一致するように探索領域SRの位置を補正することができる。 Further, the position of the search region SR may be corrected so that the center CE comes to the position of the shortest distance of the electric wire PL when the center CE of the search region SR is deviated from the electric wire PL. In addition, the position of the search region SR can be corrected so that an arbitrary reference point in the search region SR matches an arbitrary reference point on the electric wire PL.
(実施形態3)
実施形態1、2では、移動ベクトルA,Bを生成し、移動ベクトルに基づいて探索領域SRを順次生成することにより線探索を行ったが、探索領域SRを移動する手法は任意である。
(Embodiment 3)
In the first and second embodiments, the movement vectors A and B are generated, and the line search is performed by sequentially generating the search area SR based on the movement vector. However, the method for moving the search area SR is arbitrary.
以下、電線PLの形状を予想し、予想した形状に沿って探索領域を移動しつつ線探索を行う実施形態を説明する。 Hereinafter, an embodiment in which the shape of the electric wire PL is predicted and line search is performed while moving the search region along the predicted shape will be described.
本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1とほぼ同様の機能構成を備える。ただし、探索部160の機能が実施形態1とは一部異なる。
The
本実施形態に係る画像処理装置1が備える探索部160は、電線PLの形状を示す探索モデル(形状パターン)を予め複数記憶している。具体的には、探索部160は、電線PLの形状として予想される各種の曲線(例えば、懸垂曲線、放物線、ペジェ曲線)を表す関数を探索モデルとして記憶している。
The
探索部160は、勾配フィルタ画像上で、電線PLの形状を何れかの探索モデルで近似し、近似した探索モデルに沿って線探索処理を行う。
The
以下、図11のフローチャートを参照して、探索部160が行う線探索処理を詳細に説明する。
Hereinafter, the line search process performed by the
本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1と同様に、図5のフローチャートに示す除去処理とほぼ同様の除去処理を行う。ただし、探索部160は、図5のフローチャートのステップS109において、図6のフローチャートに示す線探索処理の代わりに、図11のフローチャートに示す線探索処理を、勾配フィルタ画像中で行う。
Similar to the
探索部160は、まず、探索領域SRの中心CEが電線PL上に来るように、探索領域SRの位置を補正する(ステップS3001)。
First, the
次に、探索部160は、勾配フィルタ画像上の探索領域SR内で「1」の輝度値を有する画素の位置に基づいて、探索モデルを決定する(ステップS3002)。具体的には、探索部160は、輝度値が「1」の画素の位置を、各探索モデルで表される曲線でフィッティングし、最も近似度の高い探索モデルを選択する。
Next, the
次に、探索部160は、勾配フィルタ画像上で探索領域SRに含まれている輝度値が「1」の画素の位置を、電線PLの画像を構成する画素の位置として取得する(ステップS3003)。
Next, the
続いて、探索部160は、図12に示すように、探索領域SRを、ステップS3002で決定した探索モデルで表される曲線FCに沿って、曲線FCの一端に向かって、予め設定した距離だけ移動し、次の探索領域SR’を生成する(ステップS3004)。
Subsequently, as illustrated in FIG. 12, the
探索部160は、ステップS3004で生成した探索領域SR’が、勾配フィルタ画像の周縁部に達したか否かを判別する(ステップS3005)。
The
探索部160は、探索領域SR’が画像の周縁に達していないと判別した場合(ステップS3005;No)、ステップS3003〜ステップS3005を繰り返す。
When the
探索部160は、探索領域SR’が画像の周縁に達したと判別した場合(ステップS3005;Yes)、探索モデルで表される曲線FCの一端へ向かう線探索を終了し、ステップS3006へ移る。
If the
探索部160は、曲線FCの両端に向かって探索を既に行ったか否かを判別する(ステップS3006)。
The
探索部160は、曲線FCの両端に向かって探索をまだ行っていないと判別すると(ステップS3006;No)、ステップS3007へ移り、曲線FCの他端へ向かう探索を開始する。
If it is determined that the search has not been performed toward both ends of the curve FC (step S3006; No), the
探索部160は、曲線FCの両端に向かって探索済みであると判別すると(ステップS3006;Yes)、それまでに取得した線情報によって示される、電線PLの画像を構成する画素の位置を、重複を省きつつ統合し、線情報を生成し(ステップS3008)、線探索処理を終了する。
When the
以上説明したように、本実施形態に係る画像処理装置1は、探索モデルに基づいて線探索処理を行い、電線PLを抽出する。探索モデルに基づいて線探索を行うため、孤立点や背景などを電線PLの一部として誤って認識してしまうことを防げる。また、電線PLの像が部分的かすれていたり、隠れていたりしても、電線PLを探索の途中で見失うことも防げるため、頑健な線探索を行うことができる。
As described above, the
本実施形態に係る画像処理装置1は、実施形態1、2に係る画像処理装置とは異なり、次の探索領域SRを生成するために、その直前に生成した探索領域SRに含まれる電線PLの情報を取得する必要がない。このため、本実施形態に係る画像処理装置1にかかる処理負荷は、実施形態1、2に係る画像処理装置にかかる処理負担に比べて小さい。
Unlike the image processing devices according to the first and second embodiments, the
本実施形態に係る画像処理装置1は、探索領域SRの画像と、次に生成した探索領域SR’の画像と、の間の画像間類似度に関わらず、ターゲット画像TGのエッジに達するまで線探索処理を行う。このため、線探索処理の対象の電線PLが、図3に例示したターゲット画像TG中の電線PLのように一部を遮られていたとしても、探索モデルに基づいて線探索処理を続行し、電線PLの、ターゲット画像TGに含まれる全ての部分を検出できる。
The
なお、本実施形態と実施形態1又は2とを組み合わせることができる。
In addition, this embodiment and
例えば、実施形態1又は2に係る線探索処理を行い、所定数以上の電線PLを構成する画素の位置を取得した時点で、本実施形態に係る線探索処理に切り替えてもよい。 For example, when the line search process according to the first or second embodiment is performed and the positions of pixels constituting a predetermined number or more of the electric wires PL are acquired, the line search process according to the present embodiment may be switched.
なお、ユーザが選択した探索モデルに基づいて線探索処理を行ってもよい。 The line search process may be performed based on the search model selected by the user.
(実施形態4)
電線が写り込んでいる場合、複数本の電線が写り込んでいる場合が多い。実施形態1〜3では、ユーザが指定した電線の画像のみをマスクため、ユーザは除去したい電線を順次指定しなければならず、煩雑である。
以下、ユーザが1つの電線を指定することで、類似する複数の電線の画像を除去する実施形態を説明する。
(Embodiment 4)
When an electric wire is reflected, a plurality of electric wires are often reflected. In Embodiments 1-3, since only the image of the electric wire designated by the user is masked, the user must sequentially designate the electric wires to be removed, which is complicated.
Hereinafter, an embodiment will be described in which a user designates one electric wire to remove images of a plurality of similar electric wires.
本実施形態に係る画像処理装置1が備えるマスキング部170は、電線の予測される形状を示す近似モデル(例えば、懸垂曲線、放物線、ペジェ曲線)を記憶している。
The
以下、図13のフローチャートを参照して、本実施形態に係る画像処理装置1が行う除去処理を説明する。
Hereinafter, the removal process performed by the
なお、理解を容易にするため、この例では、図14(A)に示すターゲット画像TG上で、ユーザにより電線LNが除去対象として指定されたものとする。 In order to facilitate understanding, in this example, it is assumed that the electric wire LN is designated as a removal target by the user on the target image TG shown in FIG.
マスキング部170は、実施形態1〜3と同様の手順により(他の手法でもかまわない)、指定された電線LNの線情報を取得する(ステップS409)。
次に、マスキング部170は、線情報で示される各画素の位置を、あらかじめ記憶している近似モデルでフィッティングし、最も近似度が高い線の形状を求める(ステップS410)。マスキング部170は、求めた最も近似度が高い線の形状を指定された電線LNの形状として線情報に加える(ステップS411)。
The
Next, the
マスキング部170は、次に、ステップS411で線情報に加えた形状を有する曲線との類似度があらかじめ設定した閾値以上である線をターゲット画像TGから抽出し(ステップS412)、抽出した線を特定する情報(その線を構成する画素の位置情報でも、その線をフィッティングする線の情報でもいずれもでも良い)を線情報に加える(ステップS413)。
Next, the
マスキング部170は、線情報で特定される複数の線の画素に、マスク用の画像を展開することにより、マスク画像を作成し(ステップS414)、マスク画像を適用して、ターゲット画像TGから複数の電線の画像を纏めて除去する(ステップS415)。
The
例えば、図14(A)で電線LNが除去対象として指定されたとする。この場合、まず、電線LNの線情報が収集される(ステップS409)。続いて、マスキング部170は、電線LNを最も良くフィッティングする線の形状が求められる(ステップS410)。ステップS410で求めた線の形状をステップS409で収集した線情報に追加すると(ステップS411)、続いて、マスキング部170は、電線LNをフィッティングする線に類似する線をターゲット画像TG上で求め、例えば、図14(A)の電線LN1,LN2、LN3を特定する(ステップS412)。
マスキング部170は、電線LN1,LN2、LN3を特定する情報を線情報に追加する(ステップS413)。
For example, it is assumed that the electric wire LN is designated as a removal target in FIG. In this case, first, the line information of the electric wire LN is collected (step S409). Subsequently, the
The
マスキング部170は、線情報で特定される画素群上、マスク用の画像を展開することにより、マスク画像を作成する(ステップS414)。
The
マスキング部170が生成したマスク画像を用いてターゲット画像TGから、図14(B)に示すように電線LN、及びLN1〜LN3をまとめて除去し(ステップS415)、除去処理を終了する。 As shown in FIG. 14B, the electric wires LN and LN1 to LN3 are collectively removed from the target image TG using the mask image generated by the masking unit 170 (step S415), and the removal process ends.
以上説明したように、本実施形態に係る画像処理装置1によれば、ターゲット画像TG上で、1つの電線を除去対象として特定することで、類似の形状を有する電線の画像を纏めて除去することができる。
As described above, according to the
実施形態1〜実施形態4では、本発明に係る線検出装置及び線検出方法を、画像処理装置1を例として用いて説明した。本発明に係る線検出装置及び線検出方法は、コンピュータや携帯電話機、PDA(Personal Digital Assistance)等の電子機器によって実現することもできる。
具体的には、コンピュータや携帯電話機、PDA等に本発明に係る線検出装置の動作を実行させるためのプログラムを、コンピュータや携帯電話機、PDA等が読み取り可能な記録媒体(例えば、メモリカードやCD−ROM(Compact Disc Read−Only Memory)、DVD−ROM(Digital Versatile Disc Read−Only Memory)等)に格納して配布し、このプログラムをコンピュータや携帯電話機、PDA等にインストールすることにより、本発明に係る線検出装置を実現することができる。
In the first to fourth embodiments, the line detection apparatus and the line detection method according to the present invention have been described using the
Specifically, a program for causing a computer, a mobile phone, a PDA or the like to execute the operation of the line detection apparatus according to the present invention is a recording medium (for example, a memory card or a CD) that can be read by the computer, the mobile phone, the PDA, or the like. By storing and distributing in a ROM (Compact Disc Read-Only Memory), DVD-ROM (Digital Versatile Disc Read-Only Memory, etc.) and installing this program in a computer, mobile phone, PDA, etc., the present invention The line detection apparatus according to the above can be realized.
あるいは、上記プログラムを、インターネット等の通信ネットワーク上のサーバ装置が有する記憶装置(例えば、ディスク装置等)に格納しておき、コンピュータや携帯電話機、PDA等がこのプログラムをダウンロードすることによって本発明に係る線検出装置を実現してもよい。 Alternatively, the program is stored in a storage device (for example, a disk device) of a server device on a communication network such as the Internet, and the computer, mobile phone, PDA, or the like downloads the program to the present invention. Such a line detection apparatus may be realized.
本発明に係る線検出装置の機能を、オペレーティングシステム(OS)とアプリケーションプログラムとの協働又は分担により実現する場合には、アプリケーションプログラム部分のみを記録媒体や記憶装置に格納してもよい。 When the function of the line detection apparatus according to the present invention is realized by cooperation or sharing of an operating system (OS) and an application program, only the application program portion may be stored in a recording medium or a storage device.
アプリケーションプログラムを搬送波に重畳し、通信ネットワークを介して配信してもよい。例えば、通信ネットワーク上の掲示板(BBS:Bulletin Board System)にアプリケーションプログラムを掲示し、ネットワークを介してアプリケーションプログラムを配信してもよい。そして、このアプリケーションプログラムをコンピュータにインストールして起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、本発明に係る線検出装置を実現してもよい。 The application program may be superimposed on a carrier wave and distributed via a communication network. For example, an application program may be posted on a bulletin board (BBS: Bulletin Board System) on a communication network, and the application program may be distributed via the network. The line detection apparatus according to the present invention may be realized by installing and starting this application program on a computer and executing the application program in the same manner as other application programs under the control of the OS.
以上、本発明の好ましい実施形態について説明したが、本発明は係る特定の実施形態に限定されるものではなく、本発明には、特許請求の範囲に記載された発明とその均等の範囲が含まれる。以下に、本願出願当初の特許請求の範囲に記載された発明を付記する。 As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to the specific embodiment which concerns, This invention includes the invention described in the claim, and its equivalent range It is. The invention described in the scope of claims at the beginning of the present application will be appended.
(付記1)
ターゲット画像に含まれている検出対象線の少なくとも一部を含む探索領域を生成する生成部と、
前記検出対象線の、前記探索領域に含まれる部分を表す線情報を取得し、前記探索領域から所定の探索方向に所定の距離だけ離れた位置に次の探索領域を生成して線情報を取得する動作を繰り返し、得られた線情報を統合することにより、検出対象線を検出する探索部と、
を備えることを特徴とする線検出装置。
(Appendix 1)
A generating unit that generates a search region including at least a part of a detection target line included in the target image;
Acquire line information representing a part of the detection target line included in the search area, and generate a next search area at a predetermined distance away from the search area in a predetermined search direction to acquire line information. A search unit for detecting a detection target line by repeating the operation to integrate the obtained line information;
A line detection apparatus comprising:
(付記2)
前記探索方向は、前記検出対象線の、前記探索領域に含まれる部分の傾きの方向である、
ことを特徴とする付記1に記載の線検出装置。
(Appendix 2)
The search direction is a direction of inclination of a portion of the detection target line included in the search area.
The line detection device according to
(付記3)
前記探索方向は、前記検出対象線の、前記探索領域に含まれる部分の、所定の位置における接線方向である、
ことを特徴とする付記1に記載の線検出装置。
(Appendix 3)
The search direction is a tangential direction at a predetermined position of a part of the detection target line included in the search area.
The line detection device according to
(付記4)
前記探索部は、前記検出対象線の形状を表す探索モデルを求め、探索モデルに基づいて前記探索方向を決定する、
ことを特徴とする付記1に記載の線検出装置。
(Appendix 4)
The search unit obtains a search model representing the shape of the detection target line, and determines the search direction based on the search model;
The line detection device according to
(付記5)
前記探索部は、前記探索領域が画像の周縁を含むか否かを判別し、含んでいると判別されると、線情報を取得する処理を終了する、
ことを特徴とする付記4に記載の線検出装置。
(Appendix 5)
The search unit determines whether or not the search region includes a peripheral edge of the image, and when it is determined that the search region includes, ends the process of acquiring line information.
The line detection apparatus according to appendix 4, characterized in that:
(付記6)
前記探索部は、前記探索領域を生成した際に、生成した探索領域内の所定の基準点と、前記検出対象線の前記探索領域に含まれる部分の基準点と、が一致するか否かを判別し、一致しないと判別した場合、生成した探索領域を、これら2つの基準点が一致するように移動する、
ことを特徴とする付記1乃至5の何れか1つに記載の線検出装置。
(Appendix 6)
The search unit determines whether or not a predetermined reference point in the generated search area matches a reference point of a portion included in the search area of the detection target line when the search area is generated. If it is determined that it does not match, the generated search area is moved so that these two reference points match.
The line detection apparatus according to any one of
(付記7)
前記探索部で取得された線情報で特定される検出対象線の形状を近似する近似曲線を求める近似手段を更に備える、
ことを特徴とする付記1乃至6の何れか1つに記載の線検出装置。
(Appendix 7)
An approximation means for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired by the search unit;
The line detection device according to any one of
(付記8)
前記近似手段で求められた近似曲線との間の類似度が閾値以上である曲線を前記ターゲット画像から抽出し、抽出した曲線を特定する情報を求める手段を備える、
ことを特徴とする付記7に記載の線検出装置。
(Appendix 8)
A means for extracting a curve having a similarity between the approximate curve obtained by the approximating means and a threshold value or more from the target image, and obtaining information for specifying the extracted curve;
The line detection apparatus according to appendix 7, characterized in that:
(付記9)
検出対象線の少なくとも一部を含む探索領域を生成する生成ステップと、
前記検出対象線の前記探索領域に含まれる部分を表す線情報を取得し、検出対象線に沿った位置に次の探索領域を生成して線情報を取得する動作を繰り返す探索ステップと、
を含むことを特徴とする線検出方法。
(Appendix 9)
A generation step for generating a search region including at least a part of the detection target line;
A search step of acquiring line information representing a portion included in the search area of the detection target line, repeating the operation of generating a next search area at a position along the detection target line and acquiring the line information,
A line detection method comprising:
(付記10)
線検出装置を制御するコンピュータに、
検出対象線の少なくとも一部を含む探索領域を生成する生成機能、
前記検出対象線の前記探索領域に含まれる部分を表す線情報を取得し、検出対象線に沿った位置に次の探索領域を生成して線情報を取得する動作を繰り返す探索機能、
を実現させるプログラム。
(Appendix 10)
In the computer that controls the line detector,
A generation function for generating a search area including at least a part of the detection target line;
A search function for acquiring line information representing a portion included in the search area of the detection target line, repeating the operation of generating a next search area at a position along the detection target line and acquiring the line information,
A program that realizes
1…画像処理装置、11…制御部、12…主記憶部、13…外部記憶部、14…操作部、15…ディスプレイ、16…制御プログラム、SB…システムバス、100…記憶部、110…表示部、120…選択部、130…線抽出部、131…二値化部、132…線検出部、133…特徴量取得部、140…微分部、150…勾配フィルタリング部、160…探索部、170…マスキング部
DESCRIPTION OF
Claims (8)
前記検出対象線の、前記探索領域に含まれる部分を表す線情報を取得し、前記探索領域から所定の探索方向に所定の距離だけ離れた位置に次の探索領域を生成して次の線情報を取得する動作を繰り返し、得られた複数の線情報を統合することにより、前記検出対象線を検出する探索部と、
前記探索部で取得された前記線情報で特定される前記検出対象線の形状を近似する近似曲線を求める近似部と、
前記近似部で求められた前記近似曲線との間の類似度が閾値以上である曲線を前記ターゲット画像から抽出し、抽出した前記曲線を特定する情報を求める抽出部と、
を備える、
ことを特徴とする線検出装置。 A generating unit that generates a search region including at least a part of a detection target line included in the target image;
Line information representing a portion included in the search area of the detection target line is acquired, and the next line information is generated by generating a next search area at a position away from the search area in a predetermined search direction by a predetermined distance. A search unit for detecting the detection target line by repeating the operation of acquiring
An approximation unit for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired by the search unit;
An extraction unit for extracting a curve having a similarity between the approximate curve obtained by the approximation unit and a threshold value or more from the target image, and obtaining information for specifying the extracted curve;
Comprising
A line detection apparatus characterized by that.
ことを特徴とする請求項1に記載の線検出装置。 The predetermined search direction is a direction of inclination of a portion of the detection target line included in the search area.
The line detection apparatus according to claim 1.
ことを特徴とする請求項1に記載の線検出装置。 The predetermined search direction, of the detection target line is tangential at a constant position at the portion included in the search area,
The line detection apparatus according to claim 1.
ことを特徴とする請求項1乃至3の何れか1項に記載の線検出装置。 The search unit obtains a search model representing the shape of the detection target line, and determines the predetermined search direction based on the search model;
Line detection device according to any one of claims 1 to 3, characterized in that.
ことを特徴とする請求項1乃至4の何れか1項に記載の線検出装置。 The search unit determines whether or not the search region includes a peripheral edge of the image, and when it is determined that the search area includes the peripheral edge of the image, the process of acquiring the line information is terminated.
The line detection apparatus according to claim 1 , wherein the line detection apparatus is a line detection apparatus.
ことを特徴とする請求項1乃至5の何れか1項に記載の線検出装置。 When the search unit generates the search area, whether or not a predetermined reference point in the generated search area matches a reference point of a part included in the search area of the detection target line If it is determined that they do not match, the generated search area is moved so that the two reference points match.
The line detection apparatus according to claim 1, wherein the line detection apparatus includes:
前記検出対象線の前記探索領域に含まれる部分を表す線情報を取得し、前記検出対象線に沿った位置に次の探索領域を生成して次の線情報を取得する動作を繰り返す探索ステップと、
前記探索ステップにおいて取得された前記線情報で特定される前記検出対象線の形状を近似する近似曲線を求める近似ステップと、
前記近似ステップにおいて求められた前記近似曲線との間の類似度が閾値以上である曲線をターゲット画像から抽出し、抽出した前記曲線を特定する情報を求める抽出ステップと、
を含む、
ことを特徴とする線検出方法。 A generation step for generating a search region including at least a part of the detection target line;
A search step of acquiring line information representing a portion included in the search area of the detection target line, repeating the operation of generating a next search area at a position along the detection target line and acquiring the next line information; ,
An approximation step for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired in the search step;
An extraction step for extracting information that specifies the extracted curve by extracting a curve having a similarity between the approximate curve obtained in the approximation step and a threshold value or more from a target image;
including,
A line detection method characterized by the above.
検出対象線の少なくとも一部を含む探索領域を生成する生成機能、
前記検出対象線の前記探索領域に含まれる部分を表す線情報を取得し、前記検出対象線に沿った位置に次の探索領域を生成して次の線情報を取得する動作を繰り返す探索機能、
前記探索機能において取得された前記線情報で特定される前記検出対象線の形状を近似する近似曲線を求める近似機能、
前記近似機能において求められた前記近似曲線との間の類似度が閾値以上である曲線をターゲット画像から抽出し、抽出した前記曲線を特定する情報を求める抽出機能、
を実現させる、
ことを特徴とするプログラム。 In the computer that controls the line detector,
A generation function for generating a search area including at least a part of the detection target line;
A search function for acquiring line information representing a portion included in the search area of the detection target line, generating a next search area at a position along the detection target line, and repeating the operation of acquiring the next line information,
An approximation function for obtaining an approximate curve that approximates the shape of the detection target line specified by the line information acquired in the search function;
An extraction function for extracting information specifying the extracted curve by extracting a curve having a similarity between the approximate curve and the approximate curve obtained in the approximation function from a target image;
To realize,
A program characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013262319A JP6384050B2 (en) | 2013-12-19 | 2013-12-19 | Line detection apparatus, line detection method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013262319A JP6384050B2 (en) | 2013-12-19 | 2013-12-19 | Line detection apparatus, line detection method, and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2015118596A JP2015118596A (en) | 2015-06-25 |
JP2015118596A5 JP2015118596A5 (en) | 2017-01-26 |
JP6384050B2 true JP6384050B2 (en) | 2018-09-05 |
Family
ID=53531240
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013262319A Expired - Fee Related JP6384050B2 (en) | 2013-12-19 | 2013-12-19 | Line detection apparatus, line detection method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6384050B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6852472B2 (en) * | 2017-03-09 | 2021-03-31 | 株式会社明電舎 | Sliding surface width detection device and method for trolley wire |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3333224B2 (en) * | 1991-12-16 | 2002-10-15 | マツダ株式会社 | Traveling path detection device for mobile vehicles |
JP3511454B2 (en) * | 1997-10-31 | 2004-03-29 | 大日本スクリーン製造株式会社 | Image clipping method and apparatus |
EP1607907A1 (en) * | 2004-06-16 | 2005-12-21 | Mitsubishi Electric Information Technology Centre Europe B.V. | Algorithm for line tracking using a circular sector search window |
JP2011164992A (en) * | 2010-02-10 | 2011-08-25 | Toyota Motor Corp | Image processing apparatus |
-
2013
- 2013-12-19 JP JP2013262319A patent/JP6384050B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015118596A (en) | 2015-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9552642B2 (en) | Apparatus and method for tracking object using feature descriptor, and apparatus and method for removing garbage feature | |
TWI619080B (en) | Method for calculating fingerprint overlapping region and electronic device | |
JP5699788B2 (en) | Screen area detection method and system | |
US8879847B2 (en) | Image processing device, method of controlling image processing device, and program for enabling computer to execute same method | |
CN106372255B (en) | A kind of recognition methods of street view image and device | |
JP6844235B2 (en) | Distance measuring device and distance measuring method | |
CN106469455B (en) | Image processing method, image processing apparatus, and recording medium | |
CN110910445B (en) | Object size detection method, device, detection equipment and storage medium | |
JP2014154160A (en) | Image processing device and method | |
CN106500684B (en) | Method and device for processing navigation path information | |
CN109102507A (en) | Screw thread detection method and device | |
JP2009134587A (en) | Image processing device | |
JP6744126B2 (en) | Character recognition device, character recognition program, character recognition method | |
CN111079730A (en) | Method for determining area of sample image in interface image and electronic equipment | |
JP6075294B2 (en) | Image processing system and image processing method | |
CN110827301B (en) | Method and apparatus for processing image | |
JP2009151759A (en) | Image processing method and image processor | |
JP6384050B2 (en) | Line detection apparatus, line detection method, and program | |
JP6221283B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2016053763A (en) | Image processor, image processing method and program | |
JP3919722B2 (en) | Skin shape measuring method and skin shape measuring apparatus | |
JP5116640B2 (en) | Image processing apparatus, image processing program, and computer-readable recording medium having detection candidate neighborhood exclusion function | |
CN107305683B (en) | Image processing method, image processing device and image processing apparatus | |
CN108629786B (en) | Image edge detection method and device | |
JP2011170554A (en) | Object recognition device, object recognition method, and object recognition program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161212 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20161212 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171113 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20171219 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180219 |
|
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: 20180710 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180723 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6384050 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |