JP6384050B2 - Line detection apparatus, line detection method, and program - Google Patents

Line detection apparatus, line detection method, and program Download PDF

Info

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
Application number
JP2013262319A
Other languages
Japanese (ja)
Other versions
JP2015118596A5 (en
JP2015118596A (en
Inventor
優一 宮本
優一 宮本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2013262319A priority Critical patent/JP6384050B2/en
Publication of JP2015118596A publication Critical patent/JP2015118596A/en
Publication of JP2015118596A5 publication Critical patent/JP2015118596A5/ja
Application granted granted Critical
Publication of JP6384050B2 publication Critical patent/JP6384050B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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 Patent Document 1.

特開2004−272734号公報JP 2004-272734 A

宮岡 伸一郎、画像の勾配空間フィルタリング、情報処理学会論文誌、日本、2011、Vol.52、No.2、p.901〜p.909Shinichiro Miyaoka, Gradient Spatial Filtering of Images, Transactions of Information Processing Society of Japan, Japan, 2011, Vol. 52, no. 2, p. 901-p. 909

特許文献1に開示された技術は、画像に映りこんだ、電線等の線状の物体が、直線以外の形状を有していた場合、この電線を検出することができない。   The technique disclosed in Patent Document 1 cannot detect an electric wire when a linear object such as an electric wire reflected in an image has a shape other than a straight line.

本発明は、上記の課題に鑑みてなされたものであり、画像に映りこんだ、任意の形状を有する線状の物体を検出できる線検出装置、線検出方法、及びプログラムを提供することを目的とする。   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に係る画像処理装置のハードウェア構成の一例を示すブロック図である。2 is a block diagram illustrating an example of a hardware configuration of the image processing apparatus according to the first embodiment. FIG. 実施形態1に係る画像処理装置の機能構成の一例を示すブロック図である。2 is a block diagram illustrating an example of a functional configuration of the image processing apparatus according to the first embodiment. FIG. (A)は、ターゲット画像の一例を示す図である。(B)は、線除去処理の結果を例示するための図である。(A) is a figure showing an example of a target image. (B) is a figure for illustrating the result of line removal processing. 探索領域の生成を説明するための図である。It is a figure for demonstrating the production | generation of a search area | region. 実施形態1に係る画像処理装置が実行する線除去処理を説明するためのフローチャートである。5 is a flowchart for explaining line removal processing executed by the image processing apparatus according to the first embodiment. 実施形態1に係る画像処理装置が実行する線探索処理を説明するためのフローチャートである。5 is a flowchart for explaining line search processing executed by the image processing apparatus according to the first embodiment. (A)〜(E)は、いずれも、実施形態1に係る画像処理装置が実行する線探索処理を説明するための図である。(A)-(E) are all the figures for demonstrating the line search process which the image processing apparatus which concerns on Embodiment 1 performs. 実施形態2に係る画像処理装置が実行する線探索処理を説明するためのフローチャートである。10 is a flowchart for explaining line search processing executed by the image processing apparatus according to the second embodiment. (A)〜(D)は、いずれも、実施形態2に係る画像処理装置が実行する線探索処理を説明するための図である。(A)-(D) are all the figures for demonstrating the line search process which the image processing apparatus which concerns on Embodiment 2 performs. 実施形態2の変形例に係る画像処理装置が実行する線探索処理を説明するための図である。FIG. 10 is a diagram for describing line search processing executed by an image processing apparatus according to a modification of the second embodiment. 実施形態3に係る画像処理装置が実行する線探索処理を説明するためのフローチャートである。10 is a flowchart for explaining line search processing executed by the image processing apparatus according to the third embodiment. 実施形態3に係る画像処理装置が実行する線探索処理を説明するための図である。FIG. 10 is a diagram for explaining line search processing executed by an image processing apparatus according to a third embodiment. 実施形態4に係る画像処理装置が実行する線除去処理を説明するためのフローチャートである。10 is a flowchart for explaining line removal processing executed by an image processing apparatus according to a fourth embodiment. (A)は、ターゲット画像の一例を示す図である。(B)は、線除去処理の結果を例示するための図である。(A) is a figure showing an example of a target image. (B) is a figure for illustrating the result of line removal processing.

(実施形態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 image processing apparatus 1 according to the present embodiment has a function of identifying and removing a linear object reflected in an image. As shown in FIG. 1, a control unit 11, a main storage unit 12, an external storage unit 13, an operation unit 14, a display 15, and a system bus SB that interconnects these units as a hardware configuration.

制御部11は、CPU(Central Processing Unit)を備える。制御部11は、外部記憶部13が記憶している制御プログラム16を実行することにより画像処理装置1全体を制御すると共に、後述する、線探索、線抽出、線除去を含む各種機能を実現する。   The control unit 11 includes a CPU (Central Processing Unit). The control unit 11 controls the entire image processing apparatus 1 by executing the control program 16 stored in the external storage unit 13 and realizes various functions including line search, line extraction, and line removal, which will be described later. .

主記憶部12は、RAM(Random Access Memory)を備える。主記憶部12は、制御部11のワークメモリとして機能し、処理対象の画像や処理過程の画像、その他のデータ、プログラムを一時的に記憶する。外部記憶部13が記憶している制御プログラム16は、主記憶部12に展開される。   The main storage unit 12 includes a RAM (Random Access Memory). The main storage unit 12 functions as a work memory of the control unit 11, and temporarily stores an image to be processed, an image in the process, other data, and a program. The control program 16 stored in the external storage unit 13 is expanded in the main storage unit 12.

外部記憶部13は、不揮発性メモリ(例えば、フラッシュメモリやハードディスク)を備え、線検出装置1全体の制御に必要な制御プログラム16、線除去を行うための画像処理プログラムを含む各種プログラム、各種固定データ等を固定的に記憶する。外部記憶部13は、記憶しているデータやプログラムを制御部11に供給する。また、外部記憶部13は、制御部11から供給されたデータを記憶する。   The external storage unit 13 includes a non-volatile memory (for example, a flash memory or a hard disk), and includes a control program 16 necessary for overall control of the line detection device 1, various programs including an image processing program for performing line removal, and various fixed operations. Store data etc. in a fixed manner. The external storage unit 13 supplies the stored data and program to the control unit 11. In addition, the external storage unit 13 stores data supplied from the control unit 11.

操作部14は、キーボード、マウス等の入力デバイスを備え、ユーザによる操作にしたがって入力を受け付け、制御部11に伝達する。   The operation unit 14 includes input devices such as a keyboard and a mouse, receives an input according to an operation by the user, and transmits the input to the control unit 11.

ディスプレイ15は、制御部11の制御に従って、主記憶部12及び外部記憶部13が記憶している各種画像や各種データを表示する。ディスプレイ15は、例えば、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)を備える。   The display 15 displays various images and various data stored in the main storage unit 12 and the external storage unit 13 under the control of the control unit 11. The display 15 includes, for example, a CRT (Cathode Ray Tube) and an LCD (Liquid Crystal Display).

システムバスSBは、制御部11〜ディスプレイ15を相互に接続する。   The system bus SB connects the control unit 11 to the display 15 to each other.

上記のハードウェア構成を有する画像処理装置1は、機能的には、図2に示すように、記憶部100と、表示部110と、選択部120と、線抽出部130と、微分部140と、勾配フィルタリング部150と、探索部160と、マスキング部170と、を備える。   As shown in FIG. 2, the image processing apparatus 1 having the above hardware configuration functionally includes a storage unit 100, a display unit 110, a selection unit 120, a line extraction unit 130, and a differentiation unit 140. A gradient filtering unit 150, a search unit 160, and a masking unit 170.

記憶部100は、処理対象のターゲット画像TGを記憶する。ターゲット画像TGは、図3に例示するように、除去対象となる電線PLの画像を含む処理対象の画像である。ターゲット画像TGは、外部の画像入力装置(例えば、デジタルカメラやメモリカード、ネットワーク)から取りこまれる。記憶部100は、外部記憶部13等によって実現される。   The storage unit 100 stores a target image TG to be processed. As illustrated in FIG. 3, the target image TG is an image to be processed including an image of the electric wire PL to be removed. The target image TG is captured from an external image input device (for example, a digital camera, a memory card, or a network). The storage unit 100 is realized by the external storage unit 13 or the like.

表示部110は、ターゲット画像TGを含む種々の画像を表示する。表示部110は、ディスプレイ15等によって実現される。   The display unit 110 displays various images including the target image TG. The display unit 110 is realized by the display 15 or the like.

選択部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 selection unit 120 acquires the position of this point PO. The selection unit 120 includes an operation unit 14, a display 15, a control unit 11, and the like.

選択部120は、図4に示すように、ユーザが選択した点POを基準として、所定サイズの矩形領域(探索領域SR)を生成する。所定のサイズは、電線PLの少なくとも一部を含むように任意の方法で設定されている。本実施形態において、探索領域SRは、あらかじめ設定した、電線PLの探索領域SRに含まれる部分が直線とみなせる程度のサイズに予め設定されている。 Selecting unit 120, as shown in FIG. 4, as a reference point PO selected by the user, generates a rectangular region of a predetermined size (search area SR). The predetermined size is set by an arbitrary method so as to include at least a part of the electric wire PL. In the present embodiment, the search area SR is set in advance to a size that allows a portion included in the search area SR of the electric wire PL to be regarded as a straight line.

線抽出部130は、図2に示すように、二値化部131と、線検出部132と、特徴量取得部133と、を備える。   As illustrated in FIG. 2, the line extraction unit 130 includes a binarization unit 131, a line detection unit 132, and a feature amount acquisition unit 133.

二値化部131は、探索領域SRの画像を、探索領域SRの輝度情報に基づいて設定した閾値を用いて二値化する。二値化部131は、制御部11等から構成される。   The binarization unit 131 binarizes the image of the search area SR using a threshold set based on the luminance information of the search area SR. The binarization unit 131 includes the control unit 11 and the like.

線検出部132は、二値化部131によって生成された探索領域SRの二値化画像から、公知技術により、電線PLを検出する。線検出部132は、制御部11等から構成される。   The line detection unit 132 detects the electric wire PL from the binarized image of the search area SR generated by the binarization unit 131 by a known technique. The line detection unit 132 includes the control unit 11 and the like.

特徴量取得部133は、線検出部132によって検出された電線PLの幅wと、探索領域SR内の電線PLとそれ以外の部分との平均輝度の差dとを電線PLの特徴量として取得する。特徴量取得部133は、制御部11等から構成される。   The feature amount acquisition unit 133 acquires, as the feature amount of the electric wire PL, the width w of the electric wire PL detected by the line detection unit 132 and the average luminance difference d between the electric wire PL in the search region SR and the other portion. To do. The feature quantity acquisition unit 133 includes the control unit 11 and the like.

微分部140は、ターゲット画像TGに微分フィルタを適用し、ターゲット画像TGのX方向微分画像g及びY方向微分画像gを生成する。微分部140は、制御部11等から構成される。 Differentiating unit 140 applies a differential filter to the target image TG, generates an X-direction differential image g x and Y direction differential image g y of the target image TG. The differentiation unit 140 includes the control unit 11 and the like.

勾配フィルタリング部150は、微分部140が生成したX方向微分画像g及びY方向微分画像gを非特許文献1に開示されている技術を用いて勾配フィルタリングを行うことにより、勾配フィルタ画像Ex、Eyを生成する。勾配フィルタリング部150は、さらに、Ex画像とEy画像を加算してEx+Ey画像を生成し、さらに、これを二値化することにより、勾配フィルタ画像を生成する。勾配フィルタリング部150は、制御部11等から構成される。 The gradient filtering unit 150, by performing a gradient filtering using techniques disclosed an X-direction differential image g x and Y direction differential image g y differentiator 140 is generated in the non-patent document 1, the gradient filter image Ex , Ey. The gradient filtering unit 150 further adds the Ex image and the Ey image to generate an Ex + Ey image, and further binarizes the image to generate a gradient filter image. The gradient filtering unit 150 includes the control unit 11 and the like.

具体的には、勾配フィルタリング部150は、X方向微分画像gに下記の式(1)を適用してEx画像を生成し、Y方向微分画像gに下記の式(2)を適用してEy画像を生成する。 Specifically, the gradient filtering unit 150 generates an Ex image by applying the equation (1) below in the X-direction differential image g x, and applying equation (2) below in the Y direction differential image g y To generate an Ey image.

Figure 0006384050
Figure 0006384050

Figure 0006384050
Figure 0006384050

ここで、定数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 line detection unit 132 from the binarized image of the search region SR acquired by the feature amount acquisition unit 133 as the feature amount using a conventional technique.

勾配フィルタリング部150は、さらに、Ex画像とEy画像の同一座標位置の画素の輝度を加算することによりEx+Ey画像を生成する。   The gradient filtering unit 150 further generates an Ex + Ey image by adding luminances of pixels at the same coordinate position of the Ex image and the Ey image.

勾配フィルタリング部150は、Ex+Ey画像中の、輝度が(Ex+Ey)≧th(式(3))を満たす画素に「1」の輝度を、式(3)を満たさない画素に「0」の輝度を、それぞれ付与することにより勾配フィルタ画像を生成する。   In the Ex + Ey image, the gradient filtering unit 150 assigns a luminance of “1” to pixels satisfying (Ex + Ey) ≧ th (equation (3)) and a luminance of “0” to pixels not satisfying equation (3). , Respectively, to generate a gradient filter image.

式(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 amount acquisition unit 133 and the portion extracted as the electric wire PL by the line detection unit 132 and the other portion. / 2 is set.

探索部160は、勾配フィルタリング部150が生成した勾配フィルタ画像内において電線PLに沿って線探索を行い、電線PLを構成する画素の位置(座標)を示す線情報を順次取得して蓄積する。探索部160は、制御部11等から構成される。   Search unit 160 performs a line search along electric wire PL in the gradient filter image generated by gradient filtering unit 150, and sequentially acquires and accumulates line information indicating the positions (coordinates) of the pixels constituting electric wire PL. The search unit 160 includes the control unit 11 and the like.

具体的には、探索部160は、勾配フィルタ画像内で、ユーザが選択した点POを基点として、探索領域SRを電線PLに沿って移動しながら順次生成し、探索領域SRに含まれる輝度値が「1」の画素の位置を示す線情報を生成する。探索部160が行う線探索処理の詳細については図5,図6のフローチャートを参照して後述する。   Specifically, the search unit 160 sequentially generates the search area SR while moving along the electric wire PL with the point PO selected by the user as a base point in the gradient filter image, and the luminance value included in the search area SR. The line information indicating the position of the pixel with “1” is generated. Details of the line search processing performed by the search unit 160 will be described later with reference to the flowcharts of FIGS.

マスキング部170は、線情報で示される位置にある画素の輝度値として、例えば、電線PL近傍の背景画像を構成する画素の輝度値を付与することにより、マスク画像を作成する。マスキング部170は、さらに、生成したマスク画像を用いて、ターゲット画像TGをマスクすることにより、ターゲット画像TG中の電線PLを除去する。   The masking unit 170 creates a mask image by assigning, for example, the luminance value of the pixels constituting the background image near the electric wire PL as the luminance value of the pixel at the position indicated by the line information. The masking unit 170 further removes the electric wires PL in the target image TG by masking the target image TG using the generated mask image.

以下、上記の機能構成を有する画像処理装置1が、電線PLの画像をターゲット画像TGから除去する動作を、図5〜図7を参照しながら説明する。   Hereinafter, an operation in which the image processing apparatus 1 having the above-described functional configuration removes the image of the electric wire PL from the target image TG will be described with reference to FIGS.

画像処理装置1が備える外部記憶部13は、あらかじめ、ユーザが除去を所望する電線PLの画像を含むターゲット画像TGを外部の画像入力装置から取りこみ、記憶している。   The external storage unit 13 included in the image processing apparatus 1 stores in advance a target image TG including an image of the electric wire PL that the user desires to remove from an external image input device.

ターゲット画像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 main storage unit 12 and a line removal mode which is one of a plurality of operation modes provided in the image processing apparatus 1 is selected.

ユーザが線除去モードを選択すると、制御部11は、外部記憶部13から線探索プログラム及び画像処理プログラムをロードし、主記憶部12に展開する。ディスプレイ15は、図3(A)に例示するターゲット画像TGを表示する。   When the user selects the line removal mode, the control unit 11 loads the line search program and the image processing program from the external storage unit 13 and develops them in the main storage unit 12. The display 15 displays the target image TG illustrated in FIG.

ユーザは、ディスプレイ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 display 15, for example, the image TG shown in FIG.

制御部11は、ユーザ操作に応答し、図5のフローチャートに示す除去処理を開始する。   In response to the user operation, the control unit 11 starts the removal process illustrated in the flowchart of FIG.

選択部120は、ユーザが指定した点POのターゲット画像TG内における位置(座標(x,y))を取得する(ステップS101)。選択部120は、図4に例示するように、ステップS101で取得した点POの位置を中心として、矩形の探索領域SRを生成する(ステップS102)。上述したように、探索領域SRは、電線PLの探索領域SRに含まれる部分を直線とみなすことができる程十分に小さいサイズに予め設定されている。   The selection unit 120 acquires the position (coordinates (x, y)) of the point PO specified by the user in the target image TG (step S101). As illustrated in FIG. 4, the selection unit 120 generates a rectangular search region SR with the position of the point PO acquired in Step S101 as the center (Step S102). As described above, the search area SR is set in advance to a sufficiently small size so that a portion included in the search area SR of the electric wire PL can be regarded as a straight line.

二値化部131は、探索領域SRの画像を、平均輝度値等の予め設定した閾値を用いて二値化する(ステップS103)。線検出部132は、生成された二値化画像から、既知の任意の技術を用いて電線PLを検出する(ステップS104)。なお、ここで検出された電線PLは、ユーザが除去を所望する電線PLに加えて、孤立点や背景などのノイズを含んでいる可能性がある。このため、ここで検出された電線PLは、後述するステップS107で定数r及び閾値thを算出することにのみ利用する。   The binarization unit 131 binarizes the image of the search area SR using a preset threshold value such as an average luminance value (step S103). The line detection unit 132 detects the electric wire PL from the generated binarized image using any known technique (step S104). Note that the electric wire PL detected here may contain noise such as an isolated point and a background in addition to the electric wire PL that the user desires to remove. For this reason, the electric wire PL detected here is used only for calculating the constant r and the threshold th in step S107 described later.

次に、特徴量取得部133は、検出された電線PLの特徴量を取得する(ステップS105)。具体的には、特徴量取得部133は、検出された電線PLの幅wを特徴量として取得する。さらに、特徴量取得部133は、ターゲット画像TG上で、探索領域SR内の電線PLとして検出された部分とそれ以外の部分との平均輝度値をそれぞれ算出し、これらの平均輝度値の差dを特徴量として取得する。   Next, the feature amount acquisition unit 133 acquires the feature amount of the detected electric wire PL (step S105). Specifically, the feature amount acquisition unit 133 acquires the detected width w of the electric wire PL as a feature amount. Furthermore, the feature amount acquisition unit 133 calculates an average luminance value between the portion detected as the electric wire PL in the search region SR and the other portion on the target image TG, and the difference d between these average luminance values d. Is acquired as a feature value.

次に、微分部140は、ターゲット画像TGを微分して微分画像を生成する(ステップS106)。具体的には、微分部140は、ターゲット画像TGに対して微分フィルタを適用し、ターゲット画像TGのX方向の輝度の勾配を表すX方向微分画像gと、ターゲット画像TGのY方向の輝度の勾配を表すY方向微分画像gと、を生成する。 Next, the differentiation unit 140 differentiates the target image TG to generate a differentiated image (step S106). Specifically, the differentiating unit 140 applies a differential filter to the target image TG, and an X-direction differential image g x representing a gradient of the luminance in the X direction of the target image TG and the luminance in the Y direction of the target image TG. a Y-direction differential image g y representing the gradient of generating a.

勾配フィルタリング部150は、ステップS105で特徴量として取得した電線PLの幅wと輝度差dとに基づいて、式(1)〜(3)で使用する定数rと閾値thとを下記(4)式、(5)式により算出する(ステップS107)。
r=2w+1 (式(4))
th=d/2 (式(5))
The gradient filtering unit 150 sets the constant r and the threshold th used in the formulas (1) to (3) based on the width w and the luminance difference d of the electric wire PL acquired as the feature values in step S105 as follows (4). Calculation is performed using the equation (5) (step S107).
r = 2w + 1 (Formula (4))
th = d / 2 (Formula (5))

次に、勾配フィルタリング部150は、微分画像X方向微分画像gとY方向微分画像gとに、定数r及び閾値thを用いて勾配フィルタリングを行い、勾配フィルタ画像を生成する(ステップS108)。 Next, the gradient filtering unit 150 to the differential image X direction differential image g x and Y direction differential image g y, performs a gradient filtered using a constant r and the threshold th, to generate a gradient filter image (step S108) .

具体的には、勾配フィルタリング部150は、X方向微分画像gに前述の式(1)を用いてEx画像を生成し、Y方向微分画像gに前述の式(2)を用いてEy画像を生成する。続いて、勾配フィルタリング部150は、Ex画像とEy画像の相対位置が同一の画素の輝度値を加算することによりEx+Ey画像を生成する。さらに、勾配フィルタリング部150は、Ex+Ey画像中の、輝度値が式(3)を満たす画素に「1」の輝度値を、輝度値が式(3)を満たさない画素に「0」の輝度値を、それぞれ付与することにより二値の勾配フィルタ画像を生成する。 Specifically, the gradient filtering unit 150 generates an Ex image using the above equations in the X direction differential image g x (1), in the Y direction differential image g y using equation (2) described above Ey Generate an image. Subsequently, the gradient filtering unit 150 generates an Ex + Ey image by adding luminance values of pixels having the same relative position between the Ex image and the Ey image. Further, the gradient filtering unit 150 sets a luminance value of “1” to a pixel whose luminance value satisfies Expression (3) and a luminance value of “0” to a pixel whose luminance value does not satisfy Expression (3) in the Ex + Ey image. , Respectively, to generate a binary gradient filter image.

次に、探索部160は、ステップS108で生成された勾配フィルタ画像中で、図6のフローチャートに詳細を示す線探索処理を行い、電線PLを構成する画素の位置を示す線情報を取得する(ステップS109)。ここで、図6及び図7を参照して、探索部160が行う線探索処理を詳細に説明する。   Next, the search unit 160 performs line search processing shown in detail in the flowchart of FIG. 6 in the gradient filter image generated in step S108, and acquires line information indicating the positions of the pixels constituting the electric wire PL ( Step S109). Here, the line search process performed by the search unit 160 will be described in detail with reference to FIGS.

探索部160は、図5のフローチャートのステップS102で生成した探索領域SRを基点とする線探索処理を行う。   The search unit 160 performs a line search process using the search region SR generated in step S102 in the flowchart of FIG. 5 as a base point.

まず、探索部160は、ステップS102において生成した探索領域SRを、その中心が除去対象の線上になる位置に補正する(ステップS1001)。より詳細には、図7(A)に例示するように、ユーザが指定した点POは除去対象の電線PLからずれていることがある。探索部160は、図7(B)に示すように、探索領域SRを、その中心CEが電線PL上に来る位置に移動する。   First, the search unit 160 corrects the search region SR generated in step S102 to a position whose center is on the line to be removed (step S1001). More specifically, as illustrated in FIG. 7A, the point PO specified by the user may be displaced from the electric wire PL to be removed. As shown in FIG. 7B, the search unit 160 moves the search region SR to a position where the center CE comes on the electric wire PL.

次に、探索部160は、勾配フィルタ画像上で、探索領域SR内で「1」の輝度値を有する画素の位置を、除去対象の電線PLを構成する画素の位置を示す線情報として取得し、記憶する(ステップS1002)。   Next, the search unit 160 acquires, on the gradient filter image, the position of the pixel having a luminance value of “1” in the search region SR as line information indicating the position of the pixel constituting the removal target electric wire PL. (Step S1002).

続いて、探索部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 search unit 160 needs to move the search region SR along the electric wire PL on the gradient filter image in order to perform the next search. Accordingly, the search unit 160 first obtains a movement vector A indicating the movement direction and the movement amount of the search area SR (step S1003).
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 search unit 160 first specifies in which direction the search is performed. This may be set in advance, for example, to give priority to the right direction. Furthermore, the original search area SR and the new search area SR ′ need to partially overlap to prevent omission of images constituting the electric wire PL. For this reason, the search unit 160 needs to move the search region SR in the direction in which the electric wire PL extends by a distance equal to or shorter than the length L of the electric wire PL included in the search region SR to be a new search region SR ′. is there. Further, considering that the electric wire PL is actually a curve, the movement amount is preferably about L / 2.

そこで、探索部160は、電線PLの探索領域SRに含まれる部分の始点と終点を、図7(C)に示すように、それぞれ(x、y)及び(x、y)とすると、移動ベクトルAを、A=(( −x )/2,( −y )/2) (式(5))と求める。 Therefore, the search unit 160 sets the start point and end point of the part included in the search region SR of the electric wire PL as (x 1 , y 1 ) and (x 2 , y 2 ), respectively, as shown in FIG. Then, the movement vector A is obtained as A = (( x 2 −x 1 ) / 2, ( y 2 −y 1 ) / 2) (formula (5)).

探索部160は、図7(D)に示すように、探索領域SRを、移動ベクトルAが示す方向に、移動ベクトルAの大きさだけ移動し、新たな探索領域SR’を生成する(ステップS1004)。   As shown in FIG. 7D, the search unit 160 moves the search area SR in the direction indicated by the movement vector A by the magnitude of the movement vector A to generate a new search area SR ′ (step S1004). ).

探索部160は、ハフ変換、テンプレートマッチング等を用いて、元の探索領域SRの画像と、ステップS1004で生成した探索領域SR’の画像と、の間の画像間類似度を算出する(ステップS1005)。   The search unit 160 calculates the inter-image similarity between the image of the original search region SR and the image of the search region SR ′ generated in step S1004 using Hough transform, template matching, and the like (step S1005). ).

探索部160は、ステップS1005で算出した画像間類似度が、所定の閾値以上か否かを判定する(ステップS1006)。   The search unit 160 determines whether or not the image similarity calculated in step S1005 is equal to or greater than a predetermined threshold (step S1006).

探索部160は、画像間類似度が閾値以上であると判別した場合(ステップS1006;Yes)、ステップS1002〜ステップS1006を繰り返し、探索領域SRを電線PLに沿って一方向に微小量ずつ移動しながら、ユーザにより特定された電線PLを構成する画素の位置情報を蓄積する。   When the search unit 160 determines that the similarity between images is equal to or greater than the threshold (step S1006; Yes), the search unit 160 repeats steps S1002 to S1006 and moves the search region SR by one minute amount in one direction along the electric wire PL. However, the position information of the pixels constituting the electric wire PL specified by the user is accumulated.

一方、探索部160が、ステップS1006で、画像間類似度が閾値より小さいと判別した場合(ステップS1006;No)、図7(E)に示すように、探索領域SRが電線PLの一端に達したと推定されるので、電線PLの一端へ向かう線探索を終了し、ステップS1007へ移る。   On the other hand, when the search unit 160 determines in step S1006 that the similarity between images is smaller than the threshold (step S1006; No), the search region SR reaches one end of the electric wire PL as shown in FIG. Therefore, the line search toward one end of the electric wire PL is terminated, and the process proceeds to step S1007.

探索部160は、電線PLの両端に向かって探索を行ったか否かを判別する(ステップS1007)。   Search unit 160 determines whether or not a search has been performed toward both ends of electric wire PL (step S1007).

この例では、探索部160は、電線PLの他端に向かって探索をまだ行っていないので、Noと判別し、ステップS1008に進む。   In this example, the search unit 160 has not yet searched toward the other end of the electric wire PL, so it is determined No and the process proceeds to step S1008.

ステップS1008で、探索部160は、ステップS1001で位置を修正した探索領域SRから、電線PLの他端に向かう移動ベクトルAを求め、新たな探索領域SRを生成する(ステップS1008)。そして、ステップS1002〜ステップS1006の動作を、電線PLの他端側に向かって繰り返す。   In step S1008, the search unit 160 obtains a movement vector A toward the other end of the electric wire PL from the search area SR whose position has been corrected in step S1001, and generates a new search area SR (step S1008). And the operation | movement of step S1002-step S1006 is repeated toward the other end side of the electric wire PL.

処理が進み、ステップ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 search unit 160 integrates the positions of the pixels constituting the image of the electric wire PL indicated by the line information accumulated so far while omitting duplication (step S1009), and ends the line search process. Proceed to step S110 of step 5.

ステップS110において、マスキング部170は、ステップS109で探索部160が電線PLの画素であるとして特定した位置(座標)に、電線PLの近傍の背景に相当する画像を展開して、マスク画像を作成する(ステップS110)。   In step S110, the masking unit 170 creates a mask image by developing an image corresponding to the background near the electric wire PL at the position (coordinates) specified by the search unit 160 as being a pixel of the electric wire PL in step S109. (Step S110).

マスキング部170は、生成したマスク画像を用いて、ターゲット画像TG中の電線PLをマスクすることにより、図3(B)に例示するように、電線PLを除去し(ステップS111)、これをディスプレイ15に表示し、線除去処理を終了する。   The masking unit 170 masks the electric wire PL in the target image TG using the generated mask image, thereby removing the electric wire PL as illustrated in FIG. 3B (step S111), and displaying this. 15, and the line removal process is terminated.

以上説明したように、画像処理装置1は、ユーザが指定した電線PLに沿って探索領域SRを順次生成しながら線探索を行うことにより、任意の形状を有する電線PLを構成する画素の位置を特定することができる。さらに、孤立点や背景を誤って線として抽出してしまうことを防げる。   As described above, the image processing apparatus 1 performs the line search while sequentially generating the search region SR along the electric wire PL designated by the user, thereby determining the position of the pixel constituting the electric wire PL having an arbitrary shape. Can be identified. Furthermore, it is possible to prevent isolated points and backgrounds from being erroneously extracted as lines.

勾配フィルタリングに用いる閾値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 value acquisition unit 133, it is not necessary for the user to set the threshold values through trial and error.

なお、以上説明した施形態では、ターゲット画像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の微分画像gとgを生成し、勾配フィルタ画像を生成する。 In the present embodiment, the differentiating unit 140 obtains a differentiated image by differentiating the entire target image TG before performing a line search. However, the present invention is not limited to this, and the differential image may be obtained by differentiating only the search region SR, not the entire target image TG. In this case, in step S1001 and S1004, each time to produce a search region SR, and performs the processing of steps S106 to S108, generates a differential image g x and g y of the search area SR, generates a gradient filter image To do.

本実施形態では、ある探索領域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 search unit 160 regards a portion included in the search region SR of the electric wire PL as a straight line, and performs a line search along the electric wire PL by sequentially generating the search region SR in the direction of the inclination of the straight line. It was.
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 image processing apparatus 1 according to the present embodiment has substantially the same functional configuration as the image processing apparatus 1 according to the first embodiment. However, the function of the search unit 160 is partially different from that of the first embodiment.

本実施形態に係る画像処理装置1が備える探索部160は、電線PLの、探索領域SRに含まれる部分の接線方向へ探索領域SRを順次生成しながら線探索を行う。   The search unit 160 included in the image processing apparatus 1 according to the present embodiment performs a line search while sequentially generating the search region SR in the tangential direction of the portion included in the search region SR of the electric wire PL.

また、探索部160は、探索領域SRを生成する度に、生成した探索領域SRが線探索対象の電線PLから外れていないかを判別し、探索領域SRが電線PLから外れていた場合、この探索領域SRを電線PL上に移動する。すなわち、探索部160は、順次生成される探索領域SRが全て電線PLに載るように各探索領域SRの位置を修正しながら線探索を行う。   In addition, every time the search unit 160 generates the search region SR, the search unit 160 determines whether the generated search region SR is not separated from the electric wire PL to be searched for. If the search region SR is out of the electric wire PL, The search area SR is moved onto the electric wire PL. That is, the search unit 160 performs a line search while correcting the position of each search region SR so that all the search regions SR that are sequentially generated are placed on the electric wire PL.

以下、図8のフローチャートを参照して、探索部160が行う線探索処理を詳細に説明する。   Hereinafter, the line search process performed by the search unit 160 will be described in detail with reference to the flowchart of FIG.

本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1と同様に、図5のフローチャートに示す除去処理と同様の除去処理を行う。ただし、探索部160は、ステップS109において、図6のフローチャートに示す線探索処理の代わりに、図8のフローチャートに示す線探索処理を、勾配フィルタ画像中で行う。   Similar to the image processing apparatus 1 according to the first embodiment, the image processing apparatus 1 according to the present embodiment performs a removal process similar to the removal process illustrated in the flowchart of FIG. However, in step S109, the search unit 160 performs the line search process shown in the flowchart of FIG. 8 in the gradient filter image instead of the line search process shown in the flowchart of FIG.

探索部160は、図8のフローチャートに示す線探索処理を開始すると、まず、図5のフローチャートのステップS102で生成した探索領域SRが電線PLから外れている可能性があるため、図9(A)に示すように、この探索領域SRの中心CEと、電線PLの探索領域SRに含まれている部分の中心CNと、が一致する位置に補正する(ステップS2001)。   When the search unit 160 starts the line search process shown in the flowchart of FIG. 8, first, the search region SR generated in step S102 of the flowchart of FIG. 5 may be out of the electric wire PL. ), The center CE of the search region SR is corrected to a position where the center CN of the portion included in the search region SR of the electric wire PL coincides (step S2001).

探索部160は、位置を補正した探索領域SRが含む、勾配フィルタ画像内で「1」の輝度値を有する画素の位置を、電線PLの画像を構成する画素の位置を示す線情報として取得し、保存する(ステップS2002)。   The search unit 160 acquires the position of the pixel having the luminance value “1” in the gradient filter image included in the search region SR whose position is corrected as line information indicating the position of the pixel constituting the image of the electric wire PL. And save (step S2002).

次に、探索部160は、移動ベクトルBを生成する。ここでは、探索領域SRの中心CEにおける電線PLの接線を求め、接線の方向を移動ベクトルBの向きとする(ステップS2003)。一方、移動ベクトルBの大きさは、探索領域SRのサイズに基づいて、元の探索領域SRと新探索領域SR’とが必ず重なるように予め設定されている大きさとする。   Next, the search unit 160 generates a movement vector B. Here, the tangent of the electric wire PL at the center CE of the search region SR is obtained, and the direction of the tangent is set as the direction of the movement vector B (step S2003). On the other hand, the size of the movement vector B is set to a size set in advance so that the original search region SR and the new search region SR 'always overlap based on the size of the search region SR.

探索部160は、図9(B)に示すように、探索領域SRを移動ベクトルB従って移動し新たな探索領域SR’を生成する(ステップS2004)。   As shown in FIG. 9B, the search unit 160 moves the search area SR according to the movement vector B and generates a new search area SR '(step S2004).

探索部160は、生成した新たな探索領域SR’の中心位置CEと、新探索領域SR’が含む電線PLの中心CNと、が一致するか否かを判別する(ステップS2005)。2つの中心CEとCNが一致すると判別すると(ステップS2005;Yes)、ステップS2007へ移る。   The search unit 160 determines whether or not the generated center position CE of the new search region SR ′ matches the center CN of the electric wire PL included in the new search region SR ′ (step S2005). If it is determined that the two centers CE and CN match (step S2005; Yes), the process proceeds to step S2007.

一方、新探索領域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 search unit 160 determines that the centers do not match. (Step S2005; No). In this case, the search unit 160 corrects the search area SR ′ to a position where the center CE coincides with the center CN of the electric wire PL included in the search area SR ′, as shown in FIG. 9D. (Step S2006).

探索部160は、元の探索領域SRの画像と、位置を補正した新探索領域SR’の画像と、の間の類似度を算出する(ステップS2007)。   The search unit 160 calculates the similarity between the image of the original search region SR and the image of the new search region SR ′ whose position has been corrected (step S2007).

探索部160は、ステップS2007で算出した画像間類似度が、所定の閾値以上か否かを判定する(ステップS2008)。   The search unit 160 determines whether or not the similarity between images calculated in step S2007 is greater than or equal to a predetermined threshold (step S2008).

探索部160は、画像間類似度が閾値以上であると判別した場合(ステップS2008;Yes)、ステップS2002〜ステップS2008を繰り返す。   When the search unit 160 determines that the similarity between images is greater than or equal to the threshold (step S2008; Yes), the search unit 160 repeats steps S2002 to S2008.

探索部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 search unit 160 is estimated to have reached one end of the electric wire PL, and thus ends the line search toward one end of the electric wire PL. Move on to S2009.

探索部160は、電線PLの両端に向かって探索を行ったか否かを判別する(ステップS2009)。   Search unit 160 determines whether or not a search is performed toward both ends of electric wire PL (step 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 search unit 160 moves to step S2010 and starts searching toward the other end of the electric wire PL.

探索部160は、ステップS2001で位置を補正した探索領域SRから、電線PLの他端に向かう方向への移動ベクトルBを生成し、新たな探索領域SRを生成する(ステップS2010)。そして、ステップS2002〜ステップS2008の動作を、電線PLの他端に向かって繰り返す。   The search unit 160 generates a movement vector B in the direction toward the other end of the electric wire PL from the search region SR whose position is corrected in step S2001, and generates a new search region SR (step S2010). And the operation | movement of step S2002-step S2008 is repeated toward the other end of the electric wire PL.

探索部160は、ステップS2009で、電線PLの両端に向かって探索済みであると判別すると(ステップS2009;Yes)、それまでに取得した線情報によって示される、電線PLの画像を構成する画素の位置を、重複を省きつつ統合し、除去対象の電線PLを構成する画素の位置を示す線情報とし(ステップS2011)、線探索処理を終了する。   When the search unit 160 determines in step S2009 that the search has been completed toward both ends of the electric wire PL (step S2009; Yes), the search unit 160 indicates the pixel constituting the image of the electric wire PL indicated by the line information acquired so far. The positions are integrated while omitting duplication to obtain line information indicating the positions of the pixels constituting the electric wire PL to be removed (step S2011), and the line search process ends.

以上説明したように、本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1と異なる方法を用いて電線PLに沿って線探索処理を行い、任意の形状を有する電線PLを抽出することができる。   As described above, the image processing apparatus 1 according to the present embodiment performs a line search process along the electric wire PL using a method different from the image processing apparatus 1 according to the first embodiment, and the electric wire PL having an arbitrary shape. Can be extracted.

実施形態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 tangential directions 1 and 2 at the end points EP1 and EP2 of the electric wire PL in the search region SR may be set as the direction of the movement vector B.

また、探索領域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 image processing apparatus 1 according to the present embodiment has substantially the same functional configuration as the image processing apparatus 1 according to the first embodiment. However, the function of the search unit 160 is partially different from that of the first embodiment.

本実施形態に係る画像処理装置1が備える探索部160は、電線PLの形状を示す探索モデル(形状パターン)を予め複数記憶している。具体的には、探索部160は、電線PLの形状として予想される各種の曲線(例えば、懸垂曲線、放物線、ペジェ曲線)を表す関数を探索モデルとして記憶している。   The search unit 160 included in the image processing apparatus 1 according to the present embodiment stores a plurality of search models (shape patterns) indicating the shape of the electric wires PL in advance. Specifically, the search unit 160 stores, as a search model, functions representing various curves (for example, a suspension curve, a parabola, and a Pezier curve) that are expected as the shape of the electric wire PL.

探索部160は、勾配フィルタ画像上で、電線PLの形状を何れかの探索モデルで近似し、近似した探索モデルに沿って線探索処理を行う。   The search unit 160 approximates the shape of the electric wire PL on any one of the search models on the gradient filter image, and performs a line search process along the approximated search model.

以下、図11のフローチャートを参照して、探索部160が行う線探索処理を詳細に説明する。   Hereinafter, the line search process performed by the search unit 160 will be described in detail with reference to the flowchart of FIG.

本実施形態に係る画像処理装置1は、実施形態1に係る画像処理装置1と同様に、図5のフローチャートに示す除去処理とほぼ同様の除去処理を行う。ただし、探索部160は、図5のフローチャートのステップS109において、図6のフローチャートに示す線探索処理の代わりに、図11のフローチャートに示す線探索処理を、勾配フィルタ画像中で行う。   Similar to the image processing apparatus 1 according to the first embodiment, the image processing apparatus 1 according to the present embodiment performs substantially the same removal process as the removal process illustrated in the flowchart of FIG. However, in step S109 of the flowchart of FIG. 5, the search unit 160 performs the line search process shown in the flowchart of FIG. 11 in the gradient filter image instead of the line search process shown in the flowchart of FIG.

探索部160は、まず、探索領域SRの中心CEが電線PL上に来るように、探索領域SRの位置を補正する(ステップS3001)。   First, the search unit 160 corrects the position of the search region SR so that the center CE of the search region SR is on the electric wire PL (step S3001).

次に、探索部160は、勾配フィルタ画像上の探索領域SR内で「1」の輝度値を有する画素の位置に基づいて、探索モデルを決定する(ステップS3002)。具体的には、探索部160は、輝度値が「1」の画素の位置を、各探索モデルで表される曲線でフィッティングし、最も近似度の高い探索モデルを選択する。   Next, the search unit 160 determines a search model based on the position of a pixel having a luminance value of “1” in the search region SR on the gradient filter image (step S3002). Specifically, the search unit 160 fits the position of the pixel having the luminance value “1” with a curve represented by each search model, and selects the search model with the highest degree of approximation.

次に、探索部160は、勾配フィルタ画像上で探索領域SRに含まれている輝度値が「1」の画素の位置を、電線PLの画像を構成する画素の位置として取得する(ステップS3003)。   Next, the search unit 160 acquires the position of the pixel having the luminance value “1” included in the search region SR on the gradient filter image as the position of the pixel constituting the image of the electric wire PL (step S3003). .

続いて、探索部160は、図12に示すように、探索領域SRを、ステップS3002で決定した探索モデルで表される曲線FCに沿って、曲線FCの一端に向かって、予め設定した距離だけ移動し、次の探索領域SR’を生成する(ステップS3004)。   Subsequently, as illustrated in FIG. 12, the search unit 160 sets the search region SR by a preset distance toward one end of the curve FC along the curve FC represented by the search model determined in step S3002. The next search area SR ′ is generated by moving (step S3004).

探索部160は、ステップS3004で生成した探索領域SR’が、勾配フィルタ画像の周縁部に達したか否かを判別する(ステップS3005)。   The search unit 160 determines whether or not the search region SR ′ generated in step S3004 has reached the periphery of the gradient filter image (step S3005).

探索部160は、探索領域SR’が画像の周縁に達していないと判別した場合(ステップS3005;No)、ステップS3003〜ステップS3005を繰り返す。   When the search unit 160 determines that the search region SR ′ has not reached the periphery of the image (step S3005; No), the search unit 160 repeats steps S3003 to S3005.

探索部160は、探索領域SR’が画像の周縁に達したと判別した場合(ステップS3005;Yes)、探索モデルで表される曲線FCの一端へ向かう線探索を終了し、ステップS3006へ移る。   If the search unit 160 determines that the search region SR 'has reached the periphery of the image (step S3005; Yes), the search unit 160 ends the line search toward one end of the curve FC represented by the search model, and proceeds to step S3006.

探索部160は、曲線FCの両端に向かって探索を既に行ったか否かを判別する(ステップS3006)。   The search unit 160 determines whether a search has already been performed toward both ends of the curve FC (step S3006).

探索部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 search unit 160 proceeds to step S3007 and starts searching toward the other end of the curve FC.

探索部160は、曲線FCの両端に向かって探索済みであると判別すると(ステップS3006;Yes)、それまでに取得した線情報によって示される、電線PLの画像を構成する画素の位置を、重複を省きつつ統合し、線情報を生成し(ステップS3008)、線探索処理を終了する。   When the search unit 160 determines that the search has been completed toward both ends of the curve FC (step S3006; Yes), the positions of the pixels constituting the image of the electric wire PL indicated by the line information acquired so far are overlapped. Are integrated, line information is generated (step S3008), and the line search process is terminated.

以上説明したように、本実施形態に係る画像処理装置1は、探索モデルに基づいて線探索処理を行い、電線PLを抽出する。探索モデルに基づいて線探索を行うため、孤立点や背景などを電線PLの一部として誤って認識してしまうことを防げる。また、電線PLの像が部分的かすれていたり、隠れていたりしても、電線PLを探索の途中で見失うことも防げるため、頑健な線探索を行うことができる。   As described above, the image processing apparatus 1 according to the present embodiment performs a line search process based on the search model and extracts the electric wire PL. Since line search is performed based on the search model, it is possible to prevent an isolated point or background from being erroneously recognized as a part of the electric wire PL. Further, even if the image of the electric wire PL is partially blurred or hidden, it is possible to prevent the electric wire PL from being lost during the search, so that a robust line search can be performed.

本実施形態に係る画像処理装置1は、実施形態1、2に係る画像処理装置とは異なり、次の探索領域SRを生成するために、その直前に生成した探索領域SRに含まれる電線PLの情報を取得する必要がない。このため、本実施形態に係る画像処理装置1にかかる処理負荷は、実施形態1、2に係る画像処理装置にかかる処理負担に比べて小さい。   Unlike the image processing devices according to the first and second embodiments, the image processing device 1 according to the present embodiment generates the next search region SR, so that the electric wires PL included in the search region SR generated immediately before the next search region SR. There is no need to obtain information. For this reason, the processing load applied to the image processing apparatus 1 according to the present embodiment is smaller than the processing load applied to the image processing apparatus according to the first and second embodiments.

本実施形態に係る画像処理装置1は、探索領域SRの画像と、次に生成した探索領域SR’の画像と、の間の画像間類似度に関わらず、ターゲット画像TGのエッジに達するまで線探索処理を行う。このため、線探索処理の対象の電線PLが、図3に例示したターゲット画像TG中の電線PLのように一部を遮られていたとしても、探索モデルに基づいて線探索処理を続行し、電線PLの、ターゲット画像TGに含まれる全ての部分を検出できる。   The image processing apparatus 1 according to the present embodiment uses the line until the edge of the target image TG is reached regardless of the similarity between images between the image of the search region SR and the next generated image of the search region SR ′. Perform search processing. For this reason, even if the electric wire PL subject to the line search process is partially blocked like the electric wire PL in the target image TG illustrated in FIG. 3, the line search process is continued based on the search model, All portions of the electric wire PL included in the target image TG can be detected.

なお、本実施形態と実施形態1又は2とを組み合わせることができる。   In addition, this embodiment and Embodiment 1 or 2 can be combined.

例えば、実施形態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 masking unit 170 included in the image processing apparatus 1 according to the present embodiment stores an approximate model (for example, a catenary curve, a parabola, a Pezier curve) that indicates a predicted shape of the electric wire.

以下、図13のフローチャートを参照して、本実施形態に係る画像処理装置1が行う除去処理を説明する。   Hereinafter, the removal process performed by the image processing apparatus 1 according to the present embodiment will be described with reference to the flowchart of FIG.

なお、理解を容易にするため、この例では、図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 masking unit 170 acquires the line information of the designated electric wire LN by the same procedure as in the first to third embodiments (other methods may be used) (step S409).
Next, the masking unit 170 fits the position of each pixel indicated by the line information with an approximate model stored in advance, and obtains the shape of the line having the highest degree of approximation (step S410). The masking unit 170 adds the obtained shape of the line with the highest degree of approximation to the line information as the shape of the designated electric wire LN (step S411).

マスキング部170は、次に、ステップS411で線情報に加えた形状を有する曲線との類似度があらかじめ設定した閾値以上である線をターゲット画像TGから抽出し(ステップS412)、抽出した線を特定する情報(その線を構成する画素の位置情報でも、その線をフィッティングする線の情報でもいずれもでも良い)を線情報に加える(ステップS413)。   Next, the masking unit 170 extracts, from the target image TG, a line whose similarity with the curve having the shape added to the line information in step S411 is equal to or greater than a preset threshold (step S412), and identifies the extracted line Information (position information of pixels constituting the line or information on a line fitting the line may be used) is added to the line information (step S413).

マスキング部170は、線情報で特定される複数の線の画素に、マスク用の画像を展開することにより、マスク画像を作成し(ステップS414)、マスク画像を適用して、ターゲット画像TGから複数の電線の画像を纏めて除去する(ステップS415)。   The masking unit 170 creates a mask image by developing a mask image on pixels of a plurality of lines specified by the line information (step S414), and applies the mask image to generate a plurality of mask images from the target image TG. The images of the electric wires are collectively removed (step S415).

例えば、図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 masking unit 170 obtains the shape of the line that best fits the electric wire LN (step S410). When the shape of the line obtained in step S410 is added to the line information collected in step S409 (step S411), the masking unit 170 subsequently obtains a line similar to the line fitting the electric wire LN on the target image TG, For example, the electric wires LN1, LN2, and LN3 in FIG. 14A are specified (step S412).
The masking unit 170 adds information specifying the electric wires LN1, LN2, and LN3 to the line information (step S413).

マスキング部170は、線情報で特定される画素群上、マスク用の画像を展開することにより、マスク画像を作成する(ステップS414)。   The masking unit 170 creates a mask image by developing a mask image on the pixel group specified by the line information (step S414).

マスキング部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 image processing apparatus 1 according to the present embodiment, by identifying one electric wire as a removal target on the target image TG, images of electric wires having similar shapes are collectively removed. be able to.

実施形態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 image processing apparatus 1 as an example. The line detection apparatus and line detection method according to the present invention can also be realized by an electronic device such as a computer, a mobile phone, or a PDA (Personal Digital Assistance).
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 attachment 1, wherein

(付記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 attachment 1, wherein

(付記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 attachment 1, wherein

(付記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 appendices 1 to 5, wherein

(付記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 supplementary notes 1 to 6, wherein

(付記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 SYMBOLS 1 ... Image processing apparatus, 11 ... Control part, 12 ... Main storage part, 13 ... External storage part, 14 ... Operation part, 15 ... Display, 16 ... Control program, SB ... System bus, 100 ... Storage part, 110 ... Display , 120 ... selection part, 130 ... line extraction part, 131 ... binarization part, 132 ... line detection part, 133 ... feature quantity acquisition part, 140 ... differentiation part, 150 ... gradient filtering part, 160 ... search part, 170 ... masking part

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.
前記探索部は、前記探索領域を生成した際に、生成した前記探索領域内の所定の基準点と、前記検出対象線の前記探索領域に含まれる部分の基準点と、が一致するか否かを判別し、一致しないと判別した場合、生成した前記探索領域を、2つの基準点が一致するように移動する、
ことを特徴とする請求項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.
JP2013262319A 2013-12-19 2013-12-19 Line detection apparatus, line detection method, and program Expired - Fee Related JP6384050B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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