JP6801366B2 - Line width measurement method, line width measurement program, storage medium and information processing device - Google Patents

Line width measurement method, line width measurement program, storage medium and information processing device Download PDF

Info

Publication number
JP6801366B2
JP6801366B2 JP2016211004A JP2016211004A JP6801366B2 JP 6801366 B2 JP6801366 B2 JP 6801366B2 JP 2016211004 A JP2016211004 A JP 2016211004A JP 2016211004 A JP2016211004 A JP 2016211004A JP 6801366 B2 JP6801366 B2 JP 6801366B2
Authority
JP
Japan
Prior art keywords
line width
edge
image
spatial filter
size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016211004A
Other languages
Japanese (ja)
Other versions
JP2018072115A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2016211004A priority Critical patent/JP6801366B2/en
Publication of JP2018072115A publication Critical patent/JP2018072115A/en
Application granted granted Critical
Publication of JP6801366B2 publication Critical patent/JP6801366B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Description

デジタル写真画像において撮影された被写体の表面に存在する線状オブジェクトの線幅を測定する線幅測定方法、線幅測定プログラム、記憶媒体及び情報処理装置に関する。 The present invention relates to a line width measuring method, a line width measuring program, a storage medium, and an information processing device for measuring the line width of a linear object existing on the surface of a subject photographed in a digital photographic image.

橋、トンネル、建物(建築物)の壁面や道路の路面などの構造物(建造物)の表面に生じるヒビ(ヒビ割れ)などの線状の欠陥の線幅を測定することで、その構造物の建て替えや改修の逼迫性を算出することができる。 By measuring the line width of linear defects such as cracks that occur on the surface of a structure (building) such as the wall surface of a bridge, tunnel, building (building) or road surface, the structure It is possible to calculate the tightness of rebuilding and repairing.

ここで、上述の構造物の表面に生じるヒビ(ヒビ割れ)などの線状の欠陥をデジタルカメラで撮影したデジタル写真を用いて検査する装置として、例えば特許文献1や特許文献2などが提案されている。 Here, for example, Patent Document 1 and Patent Document 2 have been proposed as devices for inspecting linear defects such as cracks (cracks) generated on the surface of the above-mentioned structure using a digital photograph taken by a digital camera. ing.

しかし、上記文献1,2の方法はヒビの線幅を測定する方法については開示していない。 However, the methods of Documents 1 and 2 above do not disclose a method of measuring the line width of a crack.

また、印刷、電子写真、インクジェットなど出力画像の線幅を測定する手段は例えば、特許文献3などで提案されているが、これらは測定用にあらかじめ定められたチャートをチャート上の照度が一様かつ毎回ほぼ一定になるよう制御された照明下で測定する。 Further, means for measuring the line width of an output image such as printing, electrophotographic, and inkjet have been proposed in Patent Document 3, for example, but these are charts predetermined for measurement and the illuminance on the chart is uniform. In addition, the measurement is performed under controlled illumination so as to be substantially constant each time.

一方で、トンネルなど照明条件や撮影条件を十分に制御できない環境下で撮影された画像には、制御できないノイズやボケ、照明ムラなど測定の障害となる妨害が重畳されるため、上述の特許文献3の印刷出力画像の線幅を測定する方法では、ヒビなどの線状オブジェクトの幅を正確に測定することは困難である。 On the other hand, an image taken in an environment where the lighting conditions and shooting conditions cannot be sufficiently controlled, such as a tunnel, is superposed with uncontrollable noise, blur, and interference that hinders measurement such as uneven lighting. With the method of measuring the line width of the print output image of No. 3, it is difficult to accurately measure the width of a linear object such as a crack.

さらに、特許文献3の方法では、一定の長さを持ち屈曲していない印刷の出力画像の直線部分を測定対象として想定したものであるが、構造物におけるヒビなどの線状のオブジェクトは短い不均一な間隔かつ不均一な角度で屈曲を繰り返しているため、特許文献3の方法は、構造物での線幅の測定に適用できない。 Further, in the method of Patent Document 3, a linear portion of a printed output image having a certain length and not being bent is assumed as a measurement target, but a linear object such as a crack in a structure is short. Since bending is repeated at uniform intervals and non-uniform angles, the method of Patent Document 3 cannot be applied to the measurement of line width in a structure.

そこで、本発明は上記事情に鑑み、ノイズやボケ、照明ムラなどの妨害が多いデジタル写真画像においても、撮影された被写体の表面に存在する線状のオブジェクトの線幅を正確に測定することができる線幅測定方法を提供することを目的とする。 Therefore, in view of the above circumstances, the present invention can accurately measure the line width of a linear object existing on the surface of a photographed subject even in a digital photographic image having many disturbances such as noise, blurring, and uneven lighting. It is an object of the present invention to provide a possible line width measuring method.

上記課題を解決するため、本発明の一態様ではデジタル写真画像において、撮影された被写体の表面に存在する線状オブジェクトの線幅を測定する線幅測定方法であって、前記デジタル写真画像である原画像から、第1のサイズの第1の空間フィルタを用いて前記線状オブジェクトの延伸方向を検出する方向検出ステップと、前記原画像から第1のサイズより小さい第2のサイズの第2の空間フィルタを用いてエッジ強調画像を作成し、前記エッジ強調画像から、前記線状オブジェクトの線幅方向の両側のエッジを検出するエッジ検出ステップと、前記エッジ強調画像の、前記線状オブジェクトの前記延伸方向に直交する方向における、前記エッジの間隔を、前記線状オブジェクトの線幅として測定する測定ステップと、を有し、前記第1の空間フィルタおよび前記第2の空間フィルタは二次微分フィルタであることを特徴とする線幅測定方法を提供する。 In order to solve the above problem, one aspect of the present invention is a line width measuring method for measuring the line width of a linear object existing on the surface of a photographed subject in a digital photographic image, which is the digital photographic image. A direction detection step of detecting the stretching direction of the linear object from the original image using a first spatial filter of the first size, and a second size of the second size smaller than the first size from the original image. An edge detection step of creating an edge-enhanced image using a spatial filter and detecting edges on both sides of the linear object in the line width direction from the edge-enhanced image, and the edge-enhanced image of the linear object. in a direction perpendicular to the stretching direction, the spacing of the edge, have a, a measuring step of measuring a width of the linear object, the first spatial filter and the second spatial filter secondary differential filter providing the line width measuring method, characterized in that it.

一態様によれば、線幅測定方法で、ノイズやボケ、照明ムラなどの妨害が多いデジタル写真画像においても、撮影された被写体の表面に存在する線状のオブジェクトの線幅を正確に測定することができる。 According to one aspect, the line width measuring method accurately measures the line width of a linear object existing on the surface of a photographed subject even in a digital photographic image having many disturbances such as noise, blurring, and uneven lighting. be able to.

ネットワークを介して画像データを取得する本発明の一実施形態に係る情報処理装置。An information processing device according to an embodiment of the present invention that acquires image data via a network. 外部記憶媒体を介して画像データを取得する本発明の他の実施形態に係る情報処理装置。An information processing device according to another embodiment of the present invention that acquires image data via an external storage medium. 本発明の実施形態に係る情報処理装置のハードウエアブロック図。The hardware block diagram of the information processing apparatus which concerns on embodiment of this invention. 本発明の第1実施形態に係る情報処理装置の機能ブロック図。The functional block diagram of the information processing apparatus which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係るヒビの線幅演算の基本フローチャート。The basic flowchart of the line width calculation of a crack which concerns on 1st Embodiment of this invention. 線幅の演算中の画像であって(a)は原画像、(b)は第1の空間フィルタで畳み込み処理を行った画像、(c)は最小二乗法で回帰直線を近似した画像、(d)は第2の空間フィルタで畳み込み処理を行った画像、(e)はエッジを決定し線幅を測定する方向の直線を示す画像。The image during the line width calculation, (a) is the original image, (b) is the image that has been convoluted by the first spatial filter, and (c) is the image that approximates the regression line by the least squares method. d) is an image obtained by convolution processing with the second spatial filter, and (e) is an image showing a straight line in the direction of determining the edge and measuring the line width. 畳み込み演算におけるz = LoG(r)について、(a)はz軸に垂直な方向から見た図、(b)はz軸の斜め上から見た図。Regarding z = LoG (r) in the convolution operation, (a) is a view seen from the direction perpendicular to the z-axis, and (b) is a view seen from diagonally above the z-axis. 第2の空間フィルタでのフィルタリングにより得られる一行分の画素値プロファイル例。An example of a pixel value profile for one line obtained by filtering with the second spatial filter. 本発明の検出精度向上ステップを含むヒビの線幅演算のフローチャート。The flowchart of the line width calculation of a crack including the detection accuracy improvement step of this invention. 画像内の測定対象領域をポインティングデバイスで指定する例。An example of specifying the measurement target area in the image with a pointing device. (a)は本来望ましい適切なサイズより小さいサイズの第1の空間フィルタで畳み込みの後、不適切に小さなスケールで検出された局所的な輝度の極小値に誘引され、線(ヒビ)の延伸方向を正しく検出できない例。(b)は適切なサイズの第1の空間フィルタを利用することで線(ヒビ)の延伸方向を正しく検出できる例。In (a), after convolution with a first spatial filter having a size smaller than the originally desirable appropriate size, the line (crack) is stretched by being attracted to the local brightness minimum value detected on an inappropriately small scale. An example where is not detected correctly. (B) is an example in which the stretching direction of a line (crack) can be correctly detected by using a first spatial filter of an appropriate size. 画像内の第1の空間フィルタのサイズをポインティングデバイスで指定する例。An example of specifying the size of the first spatial filter in an image with a pointing device. 画像内の第1の空間フィルタの大きさと測定対象領域の大きさを示す図。The figure which shows the size of the 1st space filter in an image, and the size of a measurement target area. (a)はノイズにより点をエッジ画素と誤検出してしまう例、(b)は(a)で誤検出された点をエッジ画素から除外した例。(A) is an example in which a point is erroneously detected as an edge pixel due to noise, and (b) is an example in which a point erroneously detected in (a) is excluded from the edge pixel. 検出された回帰直線の方向が垂直になるように、全画像領域を回転した画像。An image in which the entire image area is rotated so that the direction of the detected regression line is vertical.

以下、図面を参照して本発明を実施するための形態について説明する。下記、各図面において、同一構成部分には同一符号を付し、重複した説明を省略する場合がある。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. In each of the drawings below, the same components may be designated by the same reference numerals and duplicate description may be omitted.

<構成例>
本発明の線幅測定方法では、デジタル写真画像において、撮影された被写体の表面に存在する線状のオブジェクトの線幅を測定する。この線幅測定方法を実行する情報処理装置は、画像データを取得可能な情報処理装置であればよい。
<Configuration example>
In the line width measuring method of the present invention, the line width of a linear object existing on the surface of a photographed subject is measured in a digital photographic image. The information processing device that executes this line width measuring method may be any information processing device that can acquire image data.

図1に本発明の線幅測定方法を実行する情報処理装置1の複数の例を示す。 FIG. 1 shows a plurality of examples of the information processing apparatus 1 that executes the line width measuring method of the present invention.

ここで、図1に示すカメラ5は、定期検査、建築中の検査、老朽検査、災害後の被害状況確認などの様々な検査(状況確認)の際に、トンネル検査車、橋梁点検車、路面点検車、ヘリ、無人ロボット、ドローンなどに搭載されて、あるいは検査担当者(人)によって、写真を撮影する。撮影される写真の被写体は、コンクリート(アスファルト)などで構成されるトンネル、橋、道路、建物などの構造物の壁面や天井や地面であって、その写真から、本発明の情報処理装置1で、被写体の表面における、ヒビなどの異常を検出する。 Here, the camera 5 shown in FIG. 1 is used for a tunnel inspection vehicle, a bridge inspection vehicle, and a road surface during various inspections (status confirmation) such as periodic inspection, inspection during construction, aging inspection, and confirmation of damage status after a disaster. It is mounted on an inspection vehicle, helicopter, unmanned robot, drone, etc., or photographed by an inspector (person). The subject of the photograph to be taken is the wall surface, ceiling, or ground of a structure such as a tunnel, a bridge, a road, or a building made of concrete (asphalt), and the information processing device 1 of the present invention is used from the photograph. , Detects abnormalities such as cracks on the surface of the subject.

ここで、本発明の線幅測定方法で利用する画像データとなる被写体を撮影するカメラ5は、一般的なカメラよりも焦点深度を深く、ピントが合う範囲を広くした、EDoF(extended (enhanced)depth of field)カメラ(被写界深度拡大カメラ)であってもよい。 Here, the camera 5 that captures a subject as image data used in the line width measuring method of the present invention has a deeper depth of focus and a wider range of focus than a general camera, and is EDoF (extended (enhanced)). It may be a depth of field camera (a camera that expands the depth of field).

本発明の線幅測定方法を実行する情報処理装置1は図1に示すように、撮影された写真を画像データとして入手する。 As shown in FIG. 1, the information processing apparatus 1 that executes the line width measuring method of the present invention obtains a photograph taken as image data.

本発明の情報処理装置が画像データを入手する際、カメラと直接接続されていてもよいし、画像データ単独で入手してもよい。 When the information processing apparatus of the present invention obtains the image data, it may be directly connected to the camera, or the image data may be obtained by itself.

例えば、図1の例では画像データを撮影するカメラ5と直接接続される、パーソナルコンピュータ(PC)4や、タブレット端末やスマートフォン等のモバイル端末3で画像データを取得して、PC4やモバイル端末3が本発明の線幅測定方法を実行してもよい。 For example, in the example of FIG. 1, the image data is acquired by a personal computer (PC) 4 or a mobile terminal 3 such as a tablet terminal or a smartphone, which is directly connected to the camera 5 that captures the image data, and the PC 4 or the mobile terminal 3 May carry out the line width measuring method of the present invention.

あるいは、上記PC4や、モバイル端末3上では、実施に関するユーザからの指示の送信と結果の受信だけを行い、実際の測定はネットワーク2(WEBインターフェース)を介したサーバ装置6上で実行してもよい。 Alternatively, on the PC 4 or the mobile terminal 3, only the instruction from the user regarding the implementation and the reception of the result are transmitted, and the actual measurement is executed on the server device 6 via the network 2 (WEB interface). Good.

さらに、本発明の線幅測定方法を実行する情報処理装置1は、画像データを取得可能であれば、ネットワークや配線を介して画像データと接続されていなくてもよい。 Further, the information processing apparatus 1 that executes the line width measuring method of the present invention does not have to be connected to the image data via a network or wiring as long as the image data can be acquired.

図2に外部記憶媒体を介して画像データを取得する本発明の他の実施形態に係る情報処理装置1を示す。 FIG. 2 shows an information processing device 1 according to another embodiment of the present invention that acquires image data via an external storage medium.

図2に示すように、カメラによって撮影された画像データが格納された外部記憶媒体であるCD−ROM201やUSBメモリ202に接続されるPC4A(情報処理装置1)は線幅測定方法を実行する。この場合、PC4Aにおいて、CD−ROM201やUSBメモリ202を介して、画像データを取得する、CPU101(図3参照)のワークメモリであるRAM103は、画像データ取得手段15(図4参照)として機能する。 As shown in FIG. 2, the PC4A (information processing device 1) connected to the CD-ROM 201 or the USB memory 202, which is an external storage medium in which the image data captured by the camera is stored, executes the line width measuring method. In this case, in the PC 4A, the RAM 103, which is the work memory of the CPU 101 (see FIG. 3) that acquires image data via the CD-ROM 201 or the USB memory 202, functions as the image data acquisition means 15 (see FIG. 4). ..

さらに、本発明の線幅測定方法を実行させるための線幅測定プログラムを、CD−ROM201やUSBメモリ202へ記憶させて頒布(配布、販売)してもよい。この場合、図2に示すCD−ROM201やUSBメモリ202などの外部記憶媒体は、本発明の線幅測定方法をコンピュータに実行させるための線幅測定プログラムを記憶した、コンピュータによって読み取り可能な記憶媒体として機能する。 Further, the line width measuring program for executing the line width measuring method of the present invention may be stored in a CD-ROM 201 or a USB memory 202 and distributed (distributed and sold). In this case, the external storage medium such as the CD-ROM 201 or the USB memory 202 shown in FIG. 2 is a computer-readable storage medium that stores a line width measurement program for causing the computer to execute the line width measurement method of the present invention. Functions as.

なお、本発明の線幅測定プログラムを、インターネット(ネットワーク)を介してダウンロードさせることで、コンピュータへ頒布してもよい。 The line width measurement program of the present invention may be distributed to a computer by downloading it via the Internet (network).

図3に本発明の実施形態に係る情報処理装置1のハードウエアブロック図を示す。
図3に示すように、情報処理装置1は、バス110によって接続されたCPU101、ROM102、RAM103、I/Oコントローラ105と、補助記憶手段109等とを備える。
FIG. 3 shows a hardware block diagram of the information processing apparatus 1 according to the embodiment of the present invention.
As shown in FIG. 3, the information processing device 1 includes a CPU 101, a ROM 102, a RAM 103, an I / O controller 105, and an auxiliary storage means 109 connected by a bus 110.

CPU(Central Processing Unit)101は、情報処理装置1に、本発明の線幅測定方法を実行させる線幅測定プログラムをROM(Read Only Memory)102又は補助記憶手段109から読み出して、プログラムを実行する。 The CPU (Central Processing Unit) 101 reads a line width measuring program for causing the information processing device 1 to execute the line width measuring method of the present invention from the ROM (Read Only Memory) 102 or the auxiliary storage means 109, and executes the program. ..

RAM(Random Access Memory)103は、CPU101が、動作するために使用されるメモリ(ワークメモリ)であり、画像データを一時保存するためにも使われる。 The RAM (Random Access Memory) 103 is a memory (work memory) used by the CPU 101 to operate, and is also used to temporarily store image data.

補助記憶手段109は、情報処理装置1の外付けの記憶手段(外部記憶手段)であり、例えばHDD(Hard Disk Drive:ハードディスクドライブ)や、あるいは、図2に示すCD−ROM201やUSBメモリ202であってもよい。 The auxiliary storage means 109 is an external storage means (external storage means) of the information processing device 1, for example, an HDD (Hard Disk Drive), or a CD-ROM 201 or a USB memory 202 shown in FIG. There may be.

情報処理装置1は、さらにI/Oコントローラ(入出力コントローラ)105と接続されるVRAM(Video RAM)106、画像表示手段107及びポインティングデバイス108を備える。 The information processing device 1 further includes a VRAM (Video RAM) 106 connected to an I / O controller (input / output controller) 105, an image display means 107, and a pointing device 108.

画像表示手段107は、I/Oコントローラ105によって制御され、液晶やCRT(Cathode Ray Tube)などのモニタ画面を含んで構成されている。画像表示手段107は、原画像(デジタル写真画像)や演算中の画像を表示するとともに、その画像に重ねて示される所定の領域の輪郭や、方向や画素などを示す線や矢印などを表示する。 The image display means 107 is controlled by the I / O controller 105, and includes a monitor screen such as a liquid crystal display or a CRT (Cathode Ray Tube). The image display means 107 displays an original image (digital photographic image) or an image being calculated, and also displays an outline of a predetermined area shown superimposed on the image, a line or an arrow indicating a direction or a pixel, or the like. ..

ポインティングデバイス108は、I/Oコントローラ105によって制御される、マウス、キーボードのマウスポインタ、タッチパネルの指との接触位置など、画像表示手段107上に表示された画像の位置を指示する手段である。 The pointing device 108 is a means for instructing the position of the image displayed on the image display means 107, such as the mouse, the mouse pointer of the keyboard, and the contact position with the finger of the touch panel, which is controlled by the I / O controller 105.

VRAM106はI/Oコントローラ105によって制御され、画像表示手段107における、表示対象を一時的に保持する手段である。 The VRAM 106 is controlled by the I / O controller 105 and is a means for temporarily holding the display target in the image display means 107.

本発明の線幅測定方法を実行する実施手順は予め実行可能なプログラムとしてROM102またはHDD等の補助記憶手段109又は外部記憶媒体201,202などのコンピュータ読み取り可能な記憶媒体に記録されており、CPU101がRAM103上にワークエリアを確保してプログラムを実行することにより実施される。 The procedure for executing the line width measuring method of the present invention is recorded in a computer-readable storage medium such as ROM 102 or an auxiliary storage means 109 such as an HDD or external storage media 201 and 202 as an executable program in advance, and the CPU 101. Is implemented by securing a work area on the RAM 103 and executing the program.

図4に本発明の第1実施形態に係る情報処理装置1の機能ブロック図を示す。
演算の前提として、測定対象となる画像データ、即ち、紙上に描画された線や壁面のヒビなどの被写体を撮影した写真画像(原画像(図6(a))は、実際に測定を実行する情報処理装置1であるPC4、モバイル端末3、サーバ装置6に接続されたHDD等の補助記憶手段109(図3)や、外部記憶媒体201,202や、あるいはネットワーク2(図1)上に保存されている。
FIG. 4 shows a functional block diagram of the information processing apparatus 1 according to the first embodiment of the present invention.
As a premise of the calculation, the image data to be measured, that is, the photographic image (original image (FIG. 6A)) of the subject such as a line drawn on the paper or a crack on the wall surface is actually measured. Stored on auxiliary storage means 109 (FIG. 3) such as HDD connected to PC 4, mobile terminal 3, server device 6 which is information processing device 1, external storage media 201 and 202, or network 2 (FIG. 1). Has been done.

これらの記憶装置(補助記憶手段109やネットワーク2)は、撮影された被写体の表面に存在する線状オブジェクトを含むデジタル写真画像である原画像を取得する画像データ取得手段15として機能する。 These storage devices (auxiliary storage means 109 and network 2) function as image data acquisition means 15 for acquiring an original image which is a digital photographic image including a linear object existing on the surface of a photographed subject.

なお、カメラで撮影されたデジタル写真画像がカラー画像である場合は、画像データ取得手段において、輝度値を用いて白黒画像へ変換する、即ち、カラー画像の輝度情報又は白黒画像を用いて、下記の線幅測定方法を実施する。 When the digital photographic image taken by the camera is a color image, the image data acquisition means converts it into a black-and-white image using the brightness value, that is, using the brightness information of the color image or the black-and-white image as described below. The line width measurement method of is carried out.

そして、情報処理装置1の線幅測定プログラムはワークメモリであるRAM103上に読み込まれ、CPU101によって実行される図4に示す機能部によって逐次処理される。 Then, the line width measurement program of the information processing apparatus 1 is read into the RAM 103, which is a work memory, and sequentially processed by the functional unit shown in FIG. 4 executed by the CPU 101.

情報処理装置1は、演算を行う機能部として、方向検出手段11、エッジ検出手段12及び線幅測定手段13を備え、さらに、フィルタ記憶手段14及び画像データ取得手段15を備えている。 The information processing apparatus 1 includes a direction detecting means 11, an edge detecting means 12, and a line width measuring means 13 as functional units for performing calculations, and further includes a filter storage means 14 and an image data acquiring means 15.

方向検出手段11は、原画像から、第1のサイズの第1の空間フィルタ(二次微分空間フィルタ)を用いて線状オブジェクト(ヒビ)の延伸方向を検出する。 The direction detecting means 11 detects the stretching direction of the linear object (crack) from the original image by using the first spatial filter (secondary differential spatial filter) of the first size.

エッジ検出手段12は、原画像から、第1のサイズより小さい第2のサイズの第2の空間フィルタ(二次微分空間フィルタ)を用いてエッジ強調画像を作成し、エッジ強調画像から、線状オブジェクトの線幅方向のエッジを検出する。 The edge detecting means 12 creates an edge-enhanced image from the original image using a second spatial filter (secondary differential space filter) having a second size smaller than the first size, and linearly from the edge-enhanced image. Detects the edge of the object along the line width.

ここで第1のサイズの第1の空間フィルタは、ヒビの延伸方向(回帰直線)の方向を検出することを目的としているため、第1の空間フィルタは、ノイズを検出しにくく、分解能が低い(空間解像度が低い)ものを用いる。 Here, since the first spatial filter of the first size aims to detect the direction of the crack stretching direction (regression straight line), the first spatial filter is difficult to detect noise and has low resolution. Use the one (low spatial resolution).

一方、第2の空間フィルタは、ヒビの両側の端部(エッジ)を構成する、ヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素を検出することを目的としているため、分解能が高い(空間解像度が高い)ものを用いる。 On the other hand, the second spatial filter aims to detect two edge pixels for each part in the direction orthogonal to the stretching direction of the crack, which constitutes the edges on both sides of the crack. Therefore, the one with high resolution (high spatial resolution) is used.

線幅測定手段13は、エッジ強調画像で検出された、ヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素の間隔を、線状オブジェクトの線幅として測定する。 The line width measuring means 13 measures the distance between two edge pixels for each part in the direction orthogonal to the stretching direction of the crack detected in the edge-enhanced image as the line width of the linear object.

これらの機能部は、図3に示すCPU101によって実現される。 These functional units are realized by the CPU 101 shown in FIG.

その他、情報処理装置1には、演算に用いる空間フィルタを記憶するフィルタ記憶手段14が設けられていてもよく、フィルタ記憶手段14は、例えばHDDなどの補助記憶手段109又はROM102などによって実現される。 In addition, the information processing device 1 may be provided with a filter storage means 14 for storing a spatial filter used for calculation, and the filter storage means 14 is realized by, for example, an auxiliary storage means 109 such as an HDD or a ROM 102. ..

<ヒビの線幅演算フロー>
図5に本発明の第1実施形態に係るヒビの線幅演算の基本フローチャートを示す。図6に線幅の演算中の画像を示す。
<Crack line width calculation flow>
FIG. 5 shows a basic flowchart of a crack line width calculation according to the first embodiment of the present invention. FIG. 6 shows an image during the calculation of the line width.

図6において、(a)は原画像、(b)は第1の空間フィルタで畳み込み処理を行った画像、(c)は最小二乗法で回帰直線を近似した画像、(d)は第2の空間フィルタで畳み込み処理を行った画像、(e)はエッジ画素を決定し線幅を測定する方向の直線を示す画像である。 In FIG. 6, (a) is an original image, (b) is an image that has been convoluted by the first spatial filter, (c) is an image that approximates a regression line by the least squares method, and (d) is a second image. The image obtained by the convolution process by the spatial filter, (e) is an image showing a straight line in the direction in which the edge pixels are determined and the line width is measured.

方向検出手段11では、方向検出ステップとして、図5のS1とS2を実行する。 The direction detecting means 11 executes S1 and S2 of FIG. 5 as the direction detecting step.

S1:第1の空間フィルタで畳み込み。
方向検出手段11は、原画像(図6(a))を、第1の空間フィルタを用いて畳み込んで平滑化画像(図6(b))を作成する。
S1: Convolution with the first spatial filter.
The direction detecting means 11 convolves the original image (FIG. 6 (a)) with the first spatial filter to create a smoothed image (FIG. 6 (b)).

詳しくは、方向検出手段11は、例えば後述の(式2)に示すようなLaplacian of Gaussiansフィルタ(LoGフィルタ)や類似のDifference of Gaussiansフィルタ(DoGフィルタ)などの第1のサイズの空間フィルタ(第1の空間フィルタ)をRAM103上に生成し、RAM103上にある元の画像(原画像(図6(a))に対して畳み込み演算を実施する。あるいは、第1のサイズの空間フィルタは予め生成されてROM102やHDD等の補助記憶手段109上に記録されており、その第1のサイズの空間フィルタをRAM103上に読み込み、RAM103上にある測定対象の元の画像(原画像(図6(a))に対して畳み込み演算を実施する。 Specifically, the direction detecting means 11 is a first-sized spatial filter (first size) such as a Laplacian of Gaussians filter (LoG filter) or a similar Difference of Gaussians filter (DoG filter) as shown in (Equation 2) described later. 1 spatial filter) is generated on the RAM 103, and a convolution operation is performed on the original image (original image (FIG. 6 (a))) on the RAM 103, or a spatial filter of the first size is generated in advance. The original image (original image (FIG. 6 (a)) of the measurement target on the RAM 103 is read by reading the spatial filter of the first size into the auxiliary storage means 109 such as the ROM 102 or the HDD. )) Performs a convolution operation.

LoGフィルタでは、Gaussianで平滑化後,Laplacianでエッジ抽出する。DOGフィルタでは、ガウシアン画像間の差分画像であって、各画素における2次(偏)微分値(Laplacian)を近似的に示す。 In the LoG filter, after smoothing with Gaussian, edge extraction is performed with Laplacian. The DOG filter is a difference image between Gaussian images and approximates the quadratic (partial) differential value (Laplacian) in each pixel.

下記LoGフィルタを例として説明する。ここではフィルタ中心(x,y)からフィルタ内の点(x,y)までの距離rは The following LoG filter will be described as an example. Here, the distance r from the center of the filter (x 0 , y 0 ) to the point (x, y) in the filter is

であり、
σはフィルタの広がりを決定する定数、
cはフィルタの強度を決定する定数であるとして、
空間フィルタの分布を、下記(式2)で表す。
And
σ is a constant that determines the spread of the filter,
Assuming that c is a constant that determines the strength of the filter
The distribution of the spatial filter is represented by the following (Equation 2).

また、図7(a)は「z=LoG(r)」をz軸に垂直な方向から見た図であり、図7(b)は「z=LoG(r)」をz軸の斜め上方からみた図である。 Further, FIG. 7A is a view of “z = LoG (r)” viewed from a direction perpendicular to the z-axis, and FIG. 7B is a view of “z = LoG (r)” obliquely above the z-axis. It is an entwined figure.

フィルタのサイズはLoG(r)の総和がほぼ0と見なせるような「r」を与える矩形領域とする。したがって、σの値(フィルタの広がり)が大きくなるほどフィルタのサイズも大きくなる。 The size of the filter is a rectangular area that gives "r" so that the sum of LoG (r) can be regarded as almost 0. Therefore, the larger the value of σ (the spread of the filter), the larger the size of the filter.

二次微分空間フィルタである第1の空間フィルタのサイズをこのように決定することにより、均一で濃淡変化がない領域へのフィルタの畳み込み値は0となる。一方、濃淡(輝度)変化、すなわち局所的なコントラストの大きな領域ではその畳み込み値の絶対値は大きくなるため、濃淡変化のある領域とない領域の判別が容易になる。 By determining the size of the first spatial filter, which is a quadratic differential spatial filter, in this way, the convolution value of the filter in a region that is uniform and has no shading change becomes 0. On the other hand, since the absolute value of the convolution value becomes large in the region where the shading (luminance) changes, that is, the local contrast is large, it becomes easy to distinguish between the region where the shading changes and the region where there is no shading change.

このようなLoGフィルタである第1の空間フィルタを用いて、原画像(図6(a))に対して畳み込み処理を行った後の画像は、例えば、図6(b)になる。 The image after convolution processing is performed on the original image (FIG. 6 (a)) using the first spatial filter which is such a LoG filter is, for example, FIG. 6 (b).

図6(a)と比較して図6(b)では、畳み込みの結果、方向検出手段11が用いた空間フィルタの広がりに対応して平滑化されるため画像のノイズは低減され、ヒビ以外の場所に対するヒビの輝度コントラストが強調される。 Compared with FIG. 6A, in FIG. 6B, as a result of the convolution, the image is smoothed in accordance with the spread of the spatial filter used by the direction detecting means 11, so that the noise of the image is reduced and the noise other than the cracks is reduced. The brightness contrast of the cracks with respect to the place is emphasized.

上記の(式2)で例示する空間フィルタは正負の値を持つため、畳み込まれた結果の画像の画素値も実際には正負の値を持つが、図6(b)は表示の便宜上、最小値を0、最大値を255に規格化して表示している。 Since the spatial filter illustrated in (Equation 2) above has positive and negative values, the pixel value of the image as a result of convolution actually has positive and negative values, but FIG. 6 (b) shows for convenience of display. The minimum value is standardized to 0 and the maximum value is standardized to 255.

S2:最小二乗法で直線近似。
方向検出手段11は、平滑化画像(図6(b))に対して、最小二乗法により回帰直線を求めることで、線状オブジェクト(ヒビ)の延伸方向を検出する。
S2: Straight line approximation by the least squares method.
The direction detecting means 11 detects the stretching direction of the linear object (crack) by obtaining a regression line by the least squares method for the smoothed image (FIG. 6B).

詳しくは、方向検出手段11は第1のサイズの空間フィルタで畳み込まれた画像(図6(b))において、例えば画素値0以下の画素を選択し、これらの画素からの距離の総和が最小になるような直線を最小二乗法などで決定し、この直線(図6(c)の白線)の角度を測定対象の線の角度とする。即ち、図6(b)に示す畳み込み処理画像から、図6(c)に示すように最小二乗法で回帰直線を近似させる。 Specifically, the direction detecting means 11 selects, for example, pixels having a pixel value of 0 or less in the image (FIG. 6 (b)) convoluted by the spatial filter of the first size, and the total distance from these pixels is the sum. The straight line that becomes the minimum is determined by the least squares method or the like, and the angle of this straight line (white line in FIG. 6C) is defined as the angle of the line to be measured. That is, from the convolution-processed image shown in FIG. 6 (b), the regression line is approximated by the least squares method as shown in FIG. 6 (c).

この際、最小二乗法では、算出したヒビの近似直線と残差の2乗和が最小となるように回帰直線を設定するが、設定した回帰直線に対して残差が他のヒビ測定箇所から明らかに大きいデータ点が存在する場合は、その旨を通知してもよい。例えば、画面内にその残差が大きいデータ点が存在する旨と、そのデータ点を表示してもよい。 At this time, in the least squares method, the regression line is set so that the calculated sum of squares of the approximate straight line of the crack and the residual is minimized, but the residual is from another crack measurement point with respect to the set regression line. If there are clearly large data points, you may notify that fact. For example, the fact that there is a data point having a large residual on the screen and the data point may be displayed.

また、近似直線を求める別の方法として、選択された画素に対して主成分分析を行い、この画素の直線上に投影された画素の分散が最大になるような直線の方向である第1主成分軸を線の延伸方向(角度)と定めてもよい。 Further, as another method for obtaining an approximate straight line, principal component analysis is performed on the selected pixel, and the direction of the straight line is the direction in which the dispersion of the pixels projected on the straight line of this pixel is maximized. The component axis may be defined as the extending direction (angle) of the line.

さらに、近似直線を求める他の方法として、相関係数を用いて一次式「Y=aX+b」を推定する直線回帰を行ってもよい。例えば、直線回帰の他の具体例として、RMA回帰(reduced major axis:幾何平均回帰)や、中点回帰(midpoint line regression)などを実行してもよい。 Further, as another method for obtaining an approximate straight line, linear regression may be performed to estimate the linear equation “Y = aX + b” using the correlation coefficient. For example, as another specific example of linear regression, RMA regression (reduced major axis), midpoint line regression, or the like may be executed.

いずれの場合も、周囲と比較して明らかに誤差が大きいデータ点が存在する場合は、画面内にその残差が大きいデータ点が存在する旨と、そのデータ点の位置を表示してもよい。 In either case, if there is a data point with a large error compared to the surroundings, the fact that there is a data point with a large residual on the screen and the position of the data point may be displayed. ..

誤差が大きい点の存在を通知することで、画像内において、ノイズや、ヒビの枝分かれや、複数のヒビが存在することがわかる。このように通知することで後述する図9のS112において、この通知内容を参照しながら、近似直線を設定するための第1の空間フィルタの位置と範囲について再度設定したり、後述するS109で誤検出エッジ画素を除外したりすることができる。 By notifying the existence of a point having a large error, it can be seen that noise, crack branching, and a plurality of cracks are present in the image. By notifying in this way, in S112 of FIG. 9 described later, the position and range of the first spatial filter for setting the approximate straight line may be set again while referring to the notification content, or an error may be made in S109 described later. The detection edge pixel can be excluded.

このように、比較的大きなサイズの空間フィルタを第1の空間フィルタとして用いることによって、フィルタのサイズよりも小さなスケールの不規則な線(ヒビ)の屈曲を無視して、大局的に線(ヒビ)の方向を決定することが可能となる。 In this way, by using a spatial filter of a relatively large size as the first spatial filter, the bending of irregular lines (cracks) on a scale smaller than the size of the filter is ignored, and the lines (cracks) are broadly observed. ) Can be determined.

次に、エッジ検出手段12は、エッジ検出ステップである下記S3とS4を実行する。 Next, the edge detection means 12 executes the following S3 and S4, which are edge detection steps.

S3:第2の空間フィルタで畳み込み。
エッジ検出手段12は、原画像内の第1のサイズよりも大きい領域を測定対象領域として、測定対象領域に対して第2の空間フィルタを用いて畳み込んでエッジ強調画像を作成する。
S3: Convolution with the second spatial filter.
The edge detecting means 12 creates an edge-enhanced image by convolving a region larger than the first size in the original image as a measurement target region with the measurement target region using a second spatial filter.

詳しくは、エッジ検出手段12は第1のサイズ以下のサイズの空間フィルタ(第2のサイズの空間フィルタ)をRAM103上に生成し、RAM103上にある原画像(図6(a))に、畳み込み演算を実施する(図6(c))。あるいは、第2のサイズの空間フィルタは予め生成されてROM102やHDDなど補助記憶手段109上に記録されており、その第2のサイズの空間フィルタをRAM103上に読み込み、RAM103上にある測定画像(原画像(図6(a))に対して畳み込み演算を実施する(図6(c))。 Specifically, the edge detecting means 12 generates a spatial filter (second size spatial filter) having a size smaller than or equal to the first size on the RAM 103, and convolves the original image (FIG. 6A) on the RAM 103. The calculation is performed (FIG. 6 (c)). Alternatively, the second size spatial filter is generated in advance and recorded on the auxiliary storage means 109 such as the ROM 102 or HDD, and the second size spatial filter is read onto the RAM 103 to read the measurement image (measured image) on the RAM 103. A convolution operation is performed on the original image (FIG. 6 (a)) (FIG. 6 (c)).

S3における、畳み込み演算においても、S1と同様に二次微分空間フィルタであるLoGフィルタを用いる。この際、第2のサイズの空間フィルタを構成するLoGフィルタも上述の(式2)で表すことができるが、(式2)のσの値(フィルタの広がり)が、第1のサイズの空間フィルタのLoGフィルタのσの値よりも小さい点が異なる。LoGフィルタにおいてσの値を小さくすることで、フィルタのサイズが小さくなり、より空間周波数の高い画像構造の検出が可能となる。 Also in the convolution operation in S3, the LoG filter, which is a second-order differential space filter, is used as in S1. At this time, the LoG filter constituting the space filter of the second size can also be expressed by the above-mentioned (Equation 2), but the value of σ (spread of the filter) of (Equation 2) is the space of the first size. The difference is that it is smaller than the σ value of the LoG filter of the filter. By reducing the value of σ in the LoG filter, the size of the filter becomes smaller, and it becomes possible to detect an image structure having a higher spatial frequency.

このように第2のサイズを第1のサイズより小さくする理由は、一般に線(ヒビ)の幅を測定しようとする際の、線(ヒビ)とその延伸方向に直行する方向の直線との交点である2つの点、すなわちエッジ間の間隔は、測定対象である線(ヒビ)の延伸方向の長さより短い、ためである。 The reason why the second size is made smaller than the first size in this way is generally the intersection of the line (crack) and the straight line in the direction orthogonal to the extending direction when trying to measure the width of the line (crack). This is because the distance between the two points, that is, the edges, is shorter than the length of the line (crack) to be measured in the extending direction.

上記のように、第2のサイズの空間フィルタはσの値が小さいため、原画像の測定対象領域の局所的なコントラストをより微細なスケールで検出することができる。 As described above, since the spatial filter of the second size has a small value of σ, the local contrast of the measurement target region of the original image can be detected on a finer scale.

ここで、写真画像内の線(ヒビ)とその周辺領域との間の輝度コントラストは高く、測定領域に対してヒビのエッジ間隔は微細であるため、エッジを検出するためには、よりσの値の小さな第2のサイズの空間フィルタの方が有利である。 Here, since the luminance contrast between the line (crack) in the photographic image and the peripheral region thereof is high and the edge spacing of the crack is fine with respect to the measurement region, it is more σ to detect the edge. A second size spatial filter with a smaller value is more advantageous.

原画像(図6(a))に対して、第2の空間フィルタで畳み込み処理を行った後の画像は、例えば、図6(d)になる。なお、図6(d)では、原画像のサイズと測定対象領域のサイズが等しい場合の例を示す。画像の畳み込み処理(演算)とは、フィルタの各画素と、それに対応する原画像の各画素との積和演算をフィルタの位置を変えながら実施する演算であって、測定対象領域に対して、この畳み込みを行う。 The image of the original image (FIG. 6 (a)) after the convolution process is performed by the second spatial filter is, for example, FIG. 6 (d). Note that FIG. 6D shows an example in which the size of the original image and the size of the measurement target area are equal. The image convolution process (calculation) is an operation of performing a product-sum operation of each pixel of the filter and each pixel of the corresponding original image while changing the position of the filter, and is an operation for the measurement target area. Do this convolution.

図6(a)と比較して図6(d)では、画像のノイズは低減されつつ、より小さなスケールでエッジが強調されることになり、より正確、かつ容易にエッジ画素の検出が可能となる。 In FIG. 6D as compared with FIG. 6A, the noise of the image is reduced and the edges are emphasized on a smaller scale, so that the edge pixels can be detected more accurately and easily. Become.

S4:画素検索によりエッジ画素決定。
エッジ検出手段12は、エッジ強調画像(図6(d))の画素値に対して、方向検出ステップ(S3,S4)で検出された回帰直線で規定する延伸方向に直交する方向に画素を探索することで、エッジを構成するヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素を検出する。
S4: Edge pixels are determined by pixel search.
The edge detecting means 12 searches for pixels in a direction orthogonal to the stretching direction defined by the regression line detected in the direction detection steps (S3, S4) with respect to the pixel values of the edge-enhanced image (FIG. 6D). By doing so, two edge pixels are detected for each portion in the direction orthogonal to the stretching direction of the cracks constituting the edge.

詳しくは、エッジ検出手段12は、第2の空間フィルタ後の画像(図6(d))において、画像の各行から画素値が最小となる画素を検出する。その画素を通り、線の近似直線(図6(c)の白線)に垂直となる方向(図6(e)の黒色矢印の方向)の画素値プロファイルを求める。 Specifically, the edge detecting means 12 detects the pixel having the smallest pixel value from each row of the image in the image after the second spatial filter (FIG. 6 (d)). A pixel value profile is obtained in a direction (direction of a black arrow in FIG. 6 (e)) that passes through the pixel and is perpendicular to an approximate straight line (white line in FIG. 6 (c)).

図8に第2の空間フィルタでのフィルタリングにより得られる一行分の画素値プロファイル例を示す。図8を用いて、最小値となる画素から左方向、右方向それぞれに探索を行い、最初に画素値0と交差する2点をそれぞれエッジ画素として決定する。なお、図8で示す画素値ファイルの左方向、右方向は、線状オブジェクトの延伸方向に直交する方向(図6(e)黒色矢印の方向)に相当する。 FIG. 8 shows an example of a pixel value profile for one line obtained by filtering with the second spatial filter. Using FIG. 8, a search is performed in each of the left and right directions from the pixel having the minimum value, and the two points that first intersect the pixel value 0 are determined as edge pixels. The left and right directions of the pixel value file shown in FIG. 8 correspond to directions orthogonal to the stretching direction of the linear object (direction of the black arrow in FIG. 6E).

このようにして、図6(d)に示す畳み込み処理画像から、図6(e)に示すようにプロファイルの最小値と交差する点からエッジ画素を決定する。 In this way, from the convolution-processed image shown in FIG. 6D, the edge pixels are determined from the points intersecting with the minimum value of the profile as shown in FIG. 6E.

また別の方法として、第2の空間フィルタ後の画像の各行の画素値が最小となる画素を通り、線の近似直線に垂直となる線上で、画素値が最小となる画素をはさんだ両側の画素値が最大となる2点を検出し、その2点からそれぞれ画素値が最小となる画素の方向に探索を行い、最初に画素値0と交差する2点をそれぞれエッジ画素として決定してもよい。 Alternatively, on the line that passes through the pixel with the minimum pixel value in each row of the image after the second spatial filter and is perpendicular to the approximate straight line of the line, on both sides of the pixel with the minimum pixel value. Even if two points with the maximum pixel value are detected, a search is performed from the two points in the direction of the pixel with the minimum pixel value, and the two points that first intersect the pixel value 0 are determined as edge pixels. Good.

S5:エッジ間隔測定。
線幅測定手段13は、エッジ強調画像(図6(d))の、方向検出手段11で検出された線状オブジェクトの延伸方向に直交する方向における、エッジ検出手段12で検出されたエッジを構成する、ヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素の間隔を、線状オブジェクトの線幅として測定する。
S5: Edge spacing measurement.
The line width measuring means 13 constitutes an edge detected by the edge detecting means 12 in a direction orthogonal to the stretching direction of the linear object detected by the direction detecting means 11 in the edge-enhanced image (FIG. 6 (d)). The distance between each of the two edge pixels for each part in the direction orthogonal to the stretching direction of the crack is measured as the line width of the linear object.

詳しくは、線幅測定手段13は測定対象領域内の画素値が0と交差する点が整数値でない場合には、前後の画素位置からの線形補間などでより正確な値(エッジの位置)を求めてもよい。そして、エッジを構成するヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素において、夫々線幅方向に対向しているエッジ画素の間の間隔を求め、線幅を測定する。 Specifically, when the point where the pixel value in the measurement target area intersects 0 is not an integer value, the line width measuring means 13 obtains a more accurate value (edge position) by linear interpolation from the previous and next pixel positions. You may ask. Then, in each of the two edge pixels in the direction orthogonal to the extending direction of the cracks constituting the edge, the distance between the edge pixels facing each other in the line width direction is obtained, and the line width is measured. To do.

この方法により、ノイズやボケ、照明ムラなどの妨害が多いデジタル写真画像においても、撮影された被写体の表面に存在する短い不均一な間隔かつ不均一な角度で屈曲を繰り返す線状のオブジェクトの線幅を正確に測定することができる。 By this method, even in a digital photographic image with many disturbances such as noise, blur, and uneven lighting, a line of a linear object existing on the surface of the photographed subject and repeatedly bending at short non-uniform intervals and non-uniform angles. The width can be measured accurately.

なお上記図5のフローは、本発明の基本的な線幅測定の演算動作を示したが、より検出精度を向上させたい場合は、図9に示す様に、図5の線幅測定の基本フローに追加のステップを加えて実施してもよい。 The flow of FIG. 5 shows the basic operation of the line width measurement of the present invention, but if it is desired to further improve the detection accuracy, the basic line width measurement of FIG. 5 is shown as shown in FIG. Additional steps may be added to the flow.

<精度向上ステップを含む線幅演算のフローチャート>
図9に本発明の検出精度向上ステップを含むヒビの線幅演算のフローチャートを示す。
図9のフローにおいて、実線で示すステップS104は図5のステップS1に相当し、S105はS2に相当し、S107はS3に相当し、S108はS4に相当し、S110はS5に相当している。
<Flowchart of line width calculation including accuracy improvement step>
FIG. 9 shows a flowchart of the line width calculation of the crack including the step of improving the detection accuracy of the present invention.
In the flow of FIG. 9, step S104 shown by a solid line corresponds to step S1 of FIG. 5, S105 corresponds to S2, S107 corresponds to S3, S108 corresponds to S4, and S110 corresponds to S5. ..

点線で示すステップS101,S102,S103,S106,S109,S111,S112は、図5に示す基本フローに対して、精度を向上させるための追加ステップであって、1又は複数のこれらのステップを適宜省略してもよい。 Steps S101, S102, S103, S106, S109, S111, and S112 shown by dotted lines are additional steps for improving the accuracy of the basic flow shown in FIG. 5, and one or a plurality of these steps are appropriately performed. It may be omitted.

[測定対象領域の設定]
図10に画像内の測定対象領域をポインティングデバイス108で指定する例を示す。
[Measurement target area setting]
FIG. 10 shows an example in which the measurement target area in the image is designated by the pointing device 108.

図9に示すように、検出精度向上ステップを含むヒビの線幅演算のフローでは、まず、測定対象領域を指定する測定対象領域指定ステップ(図9、S101)を実行する。 As shown in FIG. 9, in the flow of the line width calculation of the crack including the detection accuracy improvement step, first, the measurement target area designation step (FIG. 9, S101) for designating the measurement target area is executed.

測定対象領域指定ステップ(図9、S101)は、方向検出ステップ(図9、S104及びS105)の前であって、後述するノイズ検知及び第1の空間フィルタ選択ステップ(図9、S102及びS103)の前に、実行する。 The measurement target area designation step (FIG. 9, S101) is prior to the direction detection step (FIGS. 9, S104 and S105), and is a noise detection and first spatial filter selection step (FIGS. 9, S102 and S103) described later. Execute before.

S101の測定対象領域指定ステップでは、第1のサイズ以上のサイズの測定対象領域の候補となる領域の輪郭を画像表示手段107上の原画像の範囲内に表示させる。使用者がこの候補領域で測定を行うと判断した場合には、この領域を測定対象領域とする。使用者がこの候補領域では測定を行わないと判断した場合には、第1のサイズ以上で前記候補領域とは異なるサイズの候補領域の輪郭を画像表示手段107上の原画像の範囲内に表示させ、使用者の判断を待つ。 In the measurement target area designation step of S101, the outline of the area that is a candidate for the measurement target area having a size equal to or larger than the first size is displayed within the range of the original image on the image display means 107. When the user determines that the measurement is performed in this candidate area, this area is set as the measurement target area. When the user determines that the measurement is not performed in this candidate area, the outline of the candidate area having a size larger than the first size and different from the candidate area is displayed within the range of the original image on the image display means 107. Wait for the user's judgment.

なお、測定対象領域は、第1のサイズ以上のサイズであって、第1の空間フィルタを用いてその領域内の線(ヒビ)の延伸方向を検出し、第2の空間フィルタを用いてヒビの両側の端部(エッジ)を構成する、前記ヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素を検出し、線(ヒビ)の幅を測定する領域である。 The measurement target region has a size equal to or larger than the first size, the stretching direction of the line (crack) in the region is detected by using the first spatial filter, and the crack is detected by using the second spatial filter. This is a region for measuring the width of a line (crack) by detecting two edge pixels for each portion in a direction orthogonal to the extending direction of the crack, which constitutes the end portions (edges) on both sides of the crack.

詳しくは、本実施形態においては、測定対象画像は画像表示手段(モニタ画面)107に表示される。使用者は、位置指定手段であるマウス等のポインティングデバイス108を用いてモニタ画面上の原画像において、測定したい測定対象領域の位置とサイズを指示する。 Specifically, in the present embodiment, the image to be measured is displayed on the image display means (monitor screen) 107. The user instructs the position and size of the measurement target area to be measured in the original image on the monitor screen by using the pointing device 108 such as a mouse which is a position designation means.

この際、図10では、画面上で使用者の指示とともに移動するマウスカーソルは測定対象領域の輪郭を表す矩形をしており、マウスカーソルの中心、あるいは、左上の位置が被験者の指示位置となる。 At this time, in FIG. 10, the mouse cursor that moves with the instruction of the user on the screen has a rectangular shape representing the outline of the measurement target area, and the center of the mouse cursor or the upper left position is the instruction position of the subject. ..

さらに、使用者がマウスカーソルサイズの大小変化に予め割り当てられたキーボードの特定のキーを押下することにより、矩形であるマウスカーソルのサイズが大小に変化し、測定対象領域もそれに合わせて大小変化する。 Furthermore, when the user presses a specific key on the keyboard assigned in advance to change the size of the mouse cursor, the size of the rectangular mouse cursor changes in size, and the measurement target area also changes in size accordingly. ..

例えば、図10(b)では、"l(エル)"キーを押下することで測定対象領域を大きくした例、図10(c)では"s"キーを押下することで測定対象領域を小さくした例を示す。ここで使用者が測定対象領域の位置とサイズが適切であると判断し、前記"l(エル)"キーや"s"キー以外の例えば"c"キーなどが押下されると、その位置のそのサイズの領域を測定対象領域としてS102以降の測定手順が開始される。 For example, in FIG. 10 (b), the measurement target area is enlarged by pressing the "l" key, and in FIG. 10 (c), the measurement target area is decreased by pressing the "s" key. An example is shown. Here, when the user determines that the position and size of the measurement target area are appropriate and a key such as the "c" key other than the "l" key or the "s" key is pressed, the position is changed. The measurement procedure after S102 is started with the area of that size as the measurement target area.

なお、ここでは測定対象領域の選択を、方向検出(S104,S105)及び後述するノイズ検知及び第1のフィルタ選択ステップ(S102,S103)の前に実行する例を説明したが、方向検出(図9のS104及びS105)の後に、測定対象領域を選択してもよい。 Here, an example in which the selection of the measurement target region is executed before the direction detection (S104, S105), the noise detection described later, and the first filter selection step (S102, S103) has been described, but the direction detection (FIG. After S104 and S105) of 9, the measurement target area may be selected.

このように手動で測定対象領域を設定することにより、短い不均一な間隔かつ不均一な角度で屈曲を繰り返す線状のオブジェクトから比較的直線的な領域を選んで測定を行うことが可能となり、より正確な線幅の測定が可能となる。 By manually setting the measurement target area in this way, it is possible to select a relatively linear area from linear objects that repeatedly bend at short non-uniform intervals and non-uniform angles for measurement. More accurate line width measurement is possible.

[第1の空間フィルタの選択]
<エッジ間隔に基づくフィルタ選択>
図11(a)は本来望ましい適切なサイズより小さなサイズの第1の空間フィルタで畳み込みの後、不適切に小さなスケールで検出された局所的な輝度の極小値に誘引され、線(ヒビ)の延伸方向を正しく検出できない例、図11(b)は適切なサイズの第1の空間フィルタを利用することで線(ヒビ)の延伸方向を正しく検出できる例を示す。
[Selection of first spatial filter]
<Filter selection based on edge spacing>
FIG. 11 (a) shows the lines (cracks) drawn to the local brightness minimums detected on an improperly small scale after convolution with a first spatial filter that is smaller than the originally desirable size. An example in which the stretching direction cannot be detected correctly, FIG. 11B shows an example in which the stretching direction of the line (crack) can be correctly detected by using a first spatial filter of an appropriate size.

被写体の線状のオブジェクトに対して、本来望ましい適切なサイズより小さなサイズの第1の空間フィルタを用いた場合、畳み込み後の画像において線(ヒビ)の内部に不適切に小さなスケールで検出された局所的な輝度の極小値に誘引され、線の延伸方向を正しく検出できない場合がある。図11(a)の例では、第1のサイズのフィルタによる処理の後、線(ヒビ)の中で不適切に小さなスケールで検出された局所的な輝度の極小値があったため、線(ヒビ)の延伸方向に対して斜めの回帰直線(近似直線)が設定されてしまっている。 When a first spatial filter with a size smaller than the originally desired appropriate size was used for the linear object of the subject, it was detected at an inappropriately small scale inside the line (crack) in the convolved image. In some cases, the direction of line extension cannot be detected correctly due to being attracted to the local minimum value of brightness. In the example of FIG. 11A, after processing by the filter of the first size, there was a minimum value of local brightness detected in the line (crack) on an inappropriately small scale, so that the line (crack) was detected. A regression line (approximate straight line) diagonal to the stretching direction of) has been set.

ここで、第1の空間フィルタの本来望ましい適切なサイズとは、LoGフィルタやDoGフィルタの中央部の正の値を持つ領域の直径が、線(ヒビ)の幅とほぼ同等かそれ以上となるようなサイズである。ただし、このサイズをあまり大きくしてしまうと、畳み込み演算の処理時間が長くなってしまうため、測定する線(ヒビ)の幅とほぼ同等となるサイズを選択する方が良い。 Here, the originally desirable appropriate size of the first spatial filter is that the diameter of the region having a positive value in the center of the LoG filter or the DoG filter is approximately equal to or larger than the width of the line (crack). It is a size like. However, if this size is made too large, the processing time of the convolution operation becomes long, so it is better to select a size that is almost equal to the width of the line (crack) to be measured.

このような場合、第1の空間フィルタのサイズを大きくすることにより、図11(b)のように線(ヒビ)の両側のエッジの略中央を通る、ヒビの延伸方向を示す回帰直線を正しく検出することができる。 In such a case, by increasing the size of the first spatial filter, the regression line indicating the extending direction of the crack, which passes substantially in the center of the edges on both sides of the line (crack) as shown in FIG. Can be detected.

そこで、本実施形態では、1回目の線幅演算のフローを終了した後、エッジ間隔と直線の方向とを比較して、エッジ間隔に対して近似直線の方向が適切かどうか判断するステップ(図9のS111)を含み、図11(a)に示すような場合で不適切と判断した場合(No)、再度、線幅演算の基本フローを実行させる。 Therefore, in the present embodiment, after completing the flow of the first line width calculation, the step of comparing the edge spacing with the direction of the straight line and determining whether the direction of the approximate straight line is appropriate for the edge spacing (FIG. If S111) of 9 is included and it is determined to be inappropriate in the case shown in FIG. 11A (No), the basic flow of line width calculation is executed again.

この際、方向検出ステップ(図9、S104)の前に、第2のサイズ以上のサイズに対応した複数の空間フィルタから1つの空間フィルタを、方向検出ステップ(S104,S105)で使用される第1の空間フィルタとして選択する、第1の空間フィルタ選択ステップ(S112)を実行する。 At this time, before the direction detection step (FIG. 9, S104), one spatial filter from a plurality of spatial filters corresponding to the second size or larger is used in the direction detection step (S104, S105). The first spatial filter selection step (S112), which is selected as the spatial filter of 1, is executed.

この第1の空間フィルタ選択ステップ(S112)では、S110で検出したエッジ間隔を基に、第1の空間フィルタを再選択する。即ち、1回目のフローのときよりも、第1の空間フィルタのサイズを大きくし、フィルタの中央部の正の値を持つ領域の直径が線(ヒビ)の幅とほぼ同等となるようなサイズの第1の空間フィルタを用いるように選択する。 In this first spatial filter selection step (S112), the first spatial filter is reselected based on the edge spacing detected in S110. That is, the size of the first spatial filter is made larger than that of the first flow, and the diameter of the region having a positive value in the center of the filter is approximately equal to the width of the line (crack). Choose to use the first spatial filter of.

S112を実施する際、方向検出手段11は、複数のサイズの第1の空間フィルタをRAM103上に生成、あるいは予め生成したものをフィルタ記憶手段15上に記録しておいて、適切なサイズの第1の空間フィルタを選択する。この際、方向検出手段11は1回目に測定された線幅よりも大きなサイズの第1の空間フィルタを自動的に選択するものとする。そして、選択した適切なサイズの第1の空間フィルタをRAM103上に読み込んで、方向検出を行うことにより、正しく方向を検出することができる(S104,S105)。なお、S112での選択動作を、画面を見ている使用者によって、手動で実施させてもよい。 When carrying out S112, the direction detecting means 11 generates first spatial filters of a plurality of sizes on the RAM 103, or records the generated ones on the filter storage means 15, and the first spatial filter of an appropriate size is recorded. Select the spatial filter of 1. At this time, the direction detecting means 11 automatically selects the first spatial filter having a size larger than the line width measured at the first time. Then, the direction can be correctly detected by reading the selected first spatial filter of an appropriate size onto the RAM 103 and performing the direction detection (S104, S105). The selection operation in S112 may be manually performed by the user who is viewing the screen.

そして、再度図5と同様のフローを実施し、S111でエッジ間隔に対して近似直線の方向が、適切かどうか判断する。S111において、図11(b)のように、ヒビの両側(エッジ)の略中央を通る、ヒビの延伸方向を示す回帰直線を検出することができた場合は、ヒビの延伸方向及びヒビのエッジの間隔は正確であるとして、フローを終了する。 Then, the same flow as in FIG. 5 is performed again, and it is determined in S111 whether the direction of the approximate straight line is appropriate with respect to the edge spacing. In S111, when a regression line indicating the crack stretching direction can be detected passing through substantially the center of both sides (edges) of the crack as shown in FIG. 11B, the crack stretching direction and the crack edge End the flow, assuming that the intervals between are accurate.

このようにフィルタを選択することにより、デジタル写真画像において、撮影された被写体の表面に存在する、線状のオブジェクトの幅が広い場合であっても、線状オブジェクトの延伸方向及び線幅を正確に測定することができる。 By selecting the filter in this way, even when the width of the linear object existing on the surface of the photographed subject is wide in the digital photographic image, the stretching direction and the line width of the linear object can be accurately determined. Can be measured.

<ノイズに基づくフィルタ選択>
また、被写体の撮影の際の照明の強度、露光時間などの制約によってノイズが非常に多い写真から線幅を測定したい場合に、実際のヒビ以外の場所のノイズに誘引されて線の正しい方向を検出できない場合もある。例えば、コンクリートを用いて建造物を建築する場合、建築の段階で表面は平坦ではなく、細かい凹凸や傷のようなものが発生することがあり、これらをノイズとして検知してしまう場合がある。
<Filter selection based on noise>
Also, when you want to measure the line width from a photograph that is very noisy due to restrictions such as the lighting intensity and exposure time when shooting the subject, you will be attracted by the noise in places other than the actual cracks and the correct direction of the line It may not be detected. For example, when a building is constructed using concrete, the surface is not flat at the stage of construction, and fine irregularities and scratches may occur, which may be detected as noise.

このような場合には、ノイズの空間的なスケールよりも大きなサイズの第1の空間フィルタを用いることにより、正しく方向を検出することができる。 In such a case, the direction can be detected correctly by using the first spatial filter having a size larger than the spatial scale of the noise.

そこで、本実施形態では、方向検出ステップ(図9、S104,S105)の前に、第2のサイズ以上のサイズに対応した複数の空間フィルタから1つの空間フィルタを、方向検出ステップで使用される第1の空間フィルタとして選択する、第1の空間フィルタ選択ステップ(S102,S103)を有する。 Therefore, in the present embodiment, before the direction detection step (FIGS. 9, S104, S105), one spatial filter from a plurality of spatial filters corresponding to the second size or larger is used in the direction detection step. It has a first spatial filter selection step (S102, S103) that is selected as the first spatial filter.

また、第1の空間フィルタ選択ステップの前に、さらに原画像(図6(a))の測定対象領域を2次元フーリエ変換して(空間周波数解析をして)、フーリエ変換像を作成することで、原画像のノイズを検出してノイズの大きさ(空間的なスケール)を測定するステップ(S102)を有する。 Further, before the first spatial filter selection step, the measurement target region of the original image (FIG. 6A) is further subjected to two-dimensional Fourier transform (spatial frequency analysis) to create a Fourier transform image. It has a step (S102) of detecting the noise of the original image and measuring the magnitude (spatial scale) of the noise.

そして、ノイズの大きさより大きいサイズのフィルタを、第1の空間フィルタとして選択する(S103)。 Then, a filter having a size larger than the magnitude of noise is selected as the first spatial filter (S103).

S103を実施する際、方向検出手段11は、複数のサイズの第1の空間フィルタをRAM103上に生成し、あるいは予め生成したものを、フィルタ記憶手段15上に記録しておいて、適切なサイズの第1の空間フィルタを選択する。この際、方向検出手段11は検出したノイズよりも大きなサイズの第1の空間フィルタを自動的に選択するものとする。 When carrying out S103, the direction detecting means 11 generates first spatial filters of a plurality of sizes on the RAM 103, or records the generated ones on the filter storage means 15 in an appropriate size. Select the first spatial filter of. At this time, the direction detecting means 11 automatically selects a first spatial filter having a size larger than the detected noise.

そして、選択した適切なサイズの第1の空間フィルタをRAM103上に読み込んで、方向検出を行うことにより、正しく方向を検出することができる(S104,S105)。 Then, the direction can be correctly detected by reading the selected first spatial filter of an appropriate size onto the RAM 103 and performing the direction detection (S104, S105).

なお、S103での、第1の空間フィルタの選択動作を、画面を見ている使用者によって、手動で実施させてもよい。 The selection operation of the first spatial filter in S103 may be manually performed by the user who is viewing the screen.

このように空間フィルタを選択することで、ノイズを考慮して、線幅を演算するので、ノイズやボケ、照明ムラなどの妨害が多いデジタル写真画像において、撮影された被写体の表面に存在する、線状オブジェクトの線幅を正確に測定することができる。 By selecting the spatial filter in this way, the line width is calculated in consideration of noise, so that it exists on the surface of the photographed subject in a digital photographic image with many disturbances such as noise, blur, and uneven illumination. The line width of a linear object can be measured accurately.

<使用者によるフィルタ選択>
上述の例の図9のS103の第1の空間フィルタ選択ステップでは、S102で算出したノイズの大きさ(特性)に基づいて、CPU101が第1の空間フィルタを選択したが、S103を使用者によって実行させてもよい。
<Filter selection by user>
In the first spatial filter selection step of S103 of FIG. 9 of the above example, the CPU 101 selected the first spatial filter based on the noise magnitude (characteristic) calculated in S102, but S103 was selected by the user. You may let it run.

この場合、原画像を画像表示手段107上に表示させ、さらに第2のサイズ以上のサイズに対応した複数の空間フィルタの輪郭を画像表示手段107上の原画像の範囲内に表示させた状態で、使用者に第1の空間フィルタを選択させる。 In this case, the original image is displayed on the image display means 107, and the contours of a plurality of spatial filters corresponding to the second size or larger are displayed within the range of the original image on the image display means 107. Let the person select the first spatial filter.

図12に画像内の空間フィルタのサイズをポインティングデバイス108で指定する例を示す。 FIG. 12 shows an example in which the size of the spatial filter in the image is specified by the pointing device 108.

例えば、使用者は、予めフィルタ記憶手段14に記憶された複数の空間フィルタのうち、一番小さなサイズの空間フィルタに割り当てられた"0(ゼロ)"キーあるいは、より大きなサイズの空間フィルタに割り当てられた"1(イチ)"キーを押下して方向検出手段11が使用する空間フィルタを指定する。 For example, the user assigns the "0 (zero)" key assigned to the smallest size spatial filter or the larger size spatial filter among the plurality of spatial filters stored in the filter storage means 14 in advance. By pressing the "1" key, the spatial filter used by the direction detecting means 11 is specified.

この際、図12(a)、図12(b)に示すように、方向検出手段11が使用する第1の空間フィルタと同じサイズの矩形(輪郭)がモニタ画面上に表示される。表示されたサイズの空間フィルタで良い場合は、予め方向検出開始に割り当てられた例えば"c"キーを押下して、方向検出の開始(S104の開始)を指示する。 At this time, as shown in FIGS. 12A and 12B, a rectangle (contour) having the same size as the first spatial filter used by the direction detecting means 11 is displayed on the monitor screen. If a spatial filter of the displayed size is acceptable, the start of direction detection (start of S104) is instructed by pressing, for example, the "c" key assigned in advance to start direction detection.

例えば、構造物を撮影した場合、原画像の中に複数のヒビが存在していたり、ヒビが枝分かれしている可能性が多い。このように方向を決定する第1の空間フィルタを使用者が目視により確認しながら設定することで、複数のヒビや、枝分かれしたヒビを区間毎に別々に検出することができる。よって、適切なサイズの空間フィルタを確認することが可能となるので、より正確に線状オブジェクトの方向及び線幅を検出することが可能となる。 For example, when a structure is photographed, there is a high possibility that a plurality of cracks are present in the original image or the cracks are branched. By setting the first spatial filter for determining the direction while visually confirming it by the user, a plurality of cracks and branched cracks can be detected separately for each section. Therefore, it is possible to confirm the spatial filter of an appropriate size, and it is possible to detect the direction and line width of the linear object more accurately.

[エッジの取捨選択]
図13に本発明における、画像内の、第1の空間フィルタの大きさと、測定対象領域の大きさを示す図を示す。図10で説明したように、設定する測定対象領域のサイズは線(ヒビ)の幅に比べて十分大きいため、ノイズにより点をエッジ画素と誤検出してしまう可能性がある。
[Selection of edges]
FIG. 13 shows a diagram showing the size of the first spatial filter and the size of the measurement target area in the image in the present invention. As described with reference to FIG. 10, since the size of the measurement target area to be set is sufficiently larger than the width of the line (crack), there is a possibility that the point may be erroneously detected as an edge pixel due to noise.

図14(a)はノイズにより点をエッジ画素と誤検出してしまう例、図14(b)は図14(a)で誤検出された点をエッジ画素から除外した例を示す。 FIG. 14A shows an example in which a point is erroneously detected as an edge pixel due to noise, and FIG. 14B shows an example in which a point erroneously detected in FIG. 14A is excluded from the edge pixel.

図13に示すように、本実施形態で、ある領域(任意の領域)内の平均的な線幅を求めるために、上述のように第1の空間フィルタよりも大きな測定対象領域を設けるステップ(図9、S101)を有しており、S107,S108で測定対象領域内すべての線のエッジを検出する。 As shown in FIG. 13, in the present embodiment, in order to obtain the average line width in a certain region (arbitrary region), a step of providing a measurement target region larger than the first spatial filter as described above ( 9 and S101), and S107 and S108 detect the edges of all the lines in the measurement target area.

ここで、測定対象領域に多くのノイズが重畳されていた場合、図14(a)に示すように本来線のエッジではない位置をエッジ画素と誤検出してしまう事態が生じる。 Here, when a large amount of noise is superimposed on the measurement target area, a situation occurs in which a position other than the edge of the original line is erroneously detected as an edge pixel as shown in FIG. 14A.

そこで、本実施形態では、エッジ検出ステップ(図9のS108)の後に、検出されたヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素のうち誤検出されたと想定されるエッジ画素を、エッジの間隔を測定する対象から除外する誤検出エッジ画素除外ステップ(図9、S109)を有する。 Therefore, in the present embodiment, it is assumed that after the edge detection step (S108 in FIG. 9), each of the two edge pixels is erroneously detected for each portion in the direction orthogonal to the extending direction of the detected crack. It has a false detection edge pixel exclusion step (FIG. 9, S109) for excluding the edge pixels from the target for which the edge spacing is measured.

例えば、S109の誤検出エッジ画素除外ステップでは、検出された回帰直線と検出されたヒビの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素との間の夫々の距離と、夫々の距離の平均距離と、夫々の距離の標準偏差を夫々算出する。そして、算出した平均距離に対して標準偏差以上ずれて検出されたエッジ画素とその画素と対になる反対側のエッジ画素の両方を除外する。 For example, in the false detection edge pixel exclusion step of S109, the distance between each of the two edge pixels with respect to each part in the direction orthogonal to the detected regression line and the direction in which the detected crack is stretched is determined. Calculate the average distance of each distance and the standard deviation of each distance. Then, both the edge pixel detected with a deviation of the standard deviation or more with respect to the calculated average distance and the edge pixel on the opposite side paired with the pixel are excluded.

詳しくは、エッジ検出手段12で測定された線の両側のエッジを構成する画素群(エッジ画素群)それぞれに対して、例えば方向検出手段によって検出された回帰直線からのそれぞれのエッジ画素の平均距離(d)とその標準偏差(SD)を求める。算出した平均距離(d)と標準偏差(S)をもとに閾値を決定する。そして、平均距離(d)に対して標準偏差(SD)以上ずれて(検出された回帰直線との間の距離が閾値以上ずれて)検出されたエッジ画素とその画素と対になる反対側のエッジ画素を両方とも除外する(図14(b)参照)などの処理を行う。 Specifically, for each of the pixel groups (edge pixel groups) constituting the edges on both sides of the line measured by the edge detecting means 12, for example, the average distance of each edge pixel from the regression line detected by the direction detecting means. (D) and its standard deviation (SD) are obtained. The threshold value is determined based on the calculated average distance (d) and standard deviation (S). Then, the detected edge pixel is deviated by the standard deviation (SD) or more from the average distance (d) (the distance between the detected regression line is deviated by the threshold value or more) and the opposite side paired with the pixel. Processing such as excluding both edge pixels (see FIG. 14B) is performed.

本実施形態においてはエッジ画素除外の判断に用いる平均値からのずれ量の閾値を標準偏差とした例を示したが、エッジ画素除外の閾値に、標準偏差以外の量を用いても構わない。例えば、エッジの位置の連続性などに着目して不連続の場合に除外対象とするなどしてもよい。 In the present embodiment, an example is shown in which the threshold value of the deviation amount from the average value used for determining the edge pixel exclusion is set as the standard deviation, but an amount other than the standard deviation may be used as the threshold value for edge pixel exclusion. For example, paying attention to the continuity of the edge positions and the like, the discontinuity may be excluded.

このように、線幅を測定するエッジ画素を取捨選択することで、エッジの誤検出を減少させ、より正しい線幅を測定することができる。 By selecting the edge pixels for which the line width is to be measured in this way, it is possible to reduce false detection of edges and measure a more correct line width.

[測定対象領域の回転]
図15に検出された回帰直線の方向が垂直になるように、全画像領域を回転した画像を示す。
[Rotation of measurement target area]
FIG. 15 shows an image in which the entire image area is rotated so that the direction of the detected regression line is vertical.

本実施形態では、方向検出ステップの後、原画像を画像表示手段107上に表示させ、検出された線状オブジェクトの延伸方向が、画像表示手段107内で垂直方向あるいは水平方向になるように、少なくとも、第2の空間フィルタを用いて畳み込みが行われる測定対象領域を回転する測定対象領域回転ステップ(図9、S106)を有している。 In the present embodiment, after the direction detection step, the original image is displayed on the image display means 107 so that the stretched direction of the detected linear object is the vertical direction or the horizontal direction in the image display means 107. At least, it has a measurement target area rotation step (FIG. 9, S106) for rotating the measurement target area to be convoluted by using the second spatial filter.

図15に示すように、測定対象領域回転ステップを実行するCPU101の測定対象領域回転手段(不図示)は、方向検出手段11によって線の方向が検出された後、検出された回帰直線の方向が垂直、あるいは水平になるように(回転後の回帰直線は図15の白線に相当)、測定対象領域あるいは全画像領域を回転する。 As shown in FIG. 15, in the measurement target area rotation means (not shown) of the CPU 101 that executes the measurement target area rotation step, after the direction of the line is detected by the direction detection means 11, the direction of the detected regression line is changed. The measurement target area or the entire image area is rotated so as to be vertical or horizontal (the return straight line after rotation corresponds to the white line in FIG. 15).

このように表示を設定することにより、エッジ検出手段12がエッジ画素を検出する際に用いる画素値プロファイルの方向(図15の黒色矢印)の方向)が、画像の水平方向、垂直方向と一致するため、エッジ画素の探索をより容易に、より高速に実施できる。 By setting the display in this way, the direction of the pixel value profile (direction of the black arrow in FIG. 15) used by the edge detecting means 12 when detecting the edge pixel coincides with the horizontal direction and the vertical direction of the image. Therefore, the search for edge pixels can be performed more easily and at higher speed.

上記実施形態で説明した、直交、水平、垂直などの方向は、本発明の効果を損なわない程度のズレを許容するものとする。 The directions such as orthogonal, horizontal, and vertical described in the above embodiment allow deviation to the extent that the effect of the present invention is not impaired.

以上、本発明の実施形態について説明したが、上記実施形態に挙げた構成等に、その他の要素との組み合わせなど、ここで示した構成に本発明が限定されるものではない。これらの点に関しては、本発明の趣旨を逸脱しない範囲で変更することが可能であり、その応用形態に応じて適切に定めることができる。 Although the embodiments of the present invention have been described above, the present invention is not limited to the configurations shown here, such as combinations with other elements in the configurations and the like described in the above embodiments. These points can be changed without departing from the spirit of the present invention, and can be appropriately determined according to the application form thereof.

1 情報処理装置
2 ネットワーク
3 モバイル端末
4,4A パーソナルコンピュータ(PC)
6 サーバ装置
11 方向検出手段
12 エッジ検出手段
13 線幅測定手段
14 フィルタ記憶手段
15 画像データ取得手段
107 モニタ画面(画像表示手段)
201,202 記憶媒体
1 Information processing device 2 Network 3 Mobile terminal 4, 4A Personal computer (PC)
6 Server device 11 Direction detection means 12 Edge detection means 13 Line width measurement means 14 Filter storage means 15 Image data acquisition means 107 Monitor screen (image display means)
201,202 Storage medium

特開2007−212309号公報JP-A-2007-212309 特開2009−133085号公報JP-A-2009-133085 特開2002−008046号公報JP-A-2002-008046

Claims (13)

デジタル写真画像において、撮影された被写体の表面に存在する線状オブジェクトの線幅を測定する線幅測定方法であって、
前記デジタル写真画像である原画像から、第1のサイズの第1の空間フィルタを用いて前記線状オブジェクトの延伸方向を検出する方向検出ステップと、
前記原画像から第1のサイズより小さい第2のサイズの第2の空間フィルタを用いてエッジ強調画像を作成し、前記エッジ強調画像から、前記線状オブジェクトの線幅方向の両側のエッジを検出するエッジ検出ステップと、
前記エッジ強調画像の、前記線状オブジェクトの前記延伸方向に直交する方向における、前記エッジの間隔を、前記線状オブジェクトの線幅として測定する測定ステップと、を有し、
前記第1の空間フィルタおよび前記第2の空間フィルタは二次微分空間フィルタであることを特徴とする
線幅測定方法。
A line width measuring method for measuring the line width of a linear object existing on the surface of a photographed subject in a digital photographic image.
A direction detection step of detecting the stretching direction of the linear object using the first spatial filter of the first size from the original image which is the digital photographic image, and
An edge-enhanced image is created from the original image using a second spatial filter having a second size smaller than the first size, and edges on both sides of the linear object in the line width direction are detected from the edge-enhanced image. Edge detection step and
The edge enhanced image, in a direction perpendicular to the extending direction of the linear object, the distance of the edge, have a, a measuring step of measuring a width of the linear object,
A line width measuring method, characterized in that the first spatial filter and the second spatial filter are quadratic differential spatial filters .
前記方向検出ステップでは、
前記原画像を前記第1の空間フィルタを用いて畳み込んで平滑化画像を作成し、該平滑化画像に対して回帰直線を求めることで、前記線状オブジェクトの前記延伸方向を検出することを特徴とする
請求項1に記載の線幅測定方法。
In the direction detection step,
By convolving the original image with the first spatial filter to create a smoothed image and obtaining a regression line from the smoothed image, it is possible to detect the stretching direction of the linear object. The line width measuring method according to claim 1, wherein the line width is measured.
前記エッジ検出ステップでは、
前記原画像内の前記第1のサイズよりも大きい領域を測定対象領域として、前記測定対象領域に対して前記第2の空間フィルタを用いて畳み込んでエッジ強調画像を作成し、該エッジ強調画像の画素値に対して、前記回帰直線で規定する前記線状オブジェクトの前記延伸方向に直交する方向に画素を探索することで、前記エッジを構成する、前記線状オブジェクトの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素を検出することを特徴とする
請求項2に記載の線幅測定方法。
In the edge detection step,
An edge-enhanced image is created by convolving the area to be measured with a region larger than the first size in the original image using the second spatial filter, and the edge-enhanced image. By searching for pixels in a direction orthogonal to the stretching direction of the linear object defined by the regression line with respect to the pixel value of, a direction orthogonal to the stretching direction of the linear object constituting the edge. The line width measuring method according to claim 2, wherein two edge pixels are detected for each portion of the above.
前記第1の空間フィルタ及び前記第2の空間フィルタには、LoG(Laplacian of Gaussians)フィルタを用いることを特徴とする
請求項1乃至3のいずれか一項に記載の線幅測定方法。
The line width measuring method according to any one of claims 1 to 3, wherein a LoG (Laplastician of Gaussians) filter is used for the first spatial filter and the second spatial filter.
前記方向検出ステップの前に、前記第2のサイズ以上のサイズに対応した複数の空間フィルタから1つの空間フィルタを、前記方向検出ステップで使用される前記第1の空間フィルタとして選択する、第1の空間フィルタ選択ステップを有することを特徴とする
請求項1乃至4のいずれか一項に記載の線幅測定方法。
Prior to the direction detection step, a first spatial filter is selected from a plurality of spatial filters corresponding to the size of the second size or larger as the first spatial filter used in the direction detection step. The line width measuring method according to any one of claims 1 to 4, wherein the space filter selection step is provided.
前記第1の空間フィルタ選択ステップでは、
前記原画像を画像表示手段上に表示させ、前記第2のサイズ以上のサイズに対応した複数の空間フィルタの輪郭を前記画像表示手段上の前記原画像の範囲内に表示させた状態で、使用者に前記第1の空間フィルタを選択させることを特徴とする
請求項5に記載の線幅測定方法。
In the first spatial filter selection step,
Used in a state where the original image is displayed on the image display means and the contours of a plurality of spatial filters corresponding to the size of the second size or larger are displayed within the range of the original image on the image display means. The line width measuring method according to claim 5, wherein the person is allowed to select the first spatial filter.
前記エッジ検出ステップの後に、
検出された前記線状オブジェクトの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素のうち誤検出されたと想定されるエッジ画素を、前記エッジの前記間隔を測定する対象から除外する誤検出エッジ画素除外ステップを有することを特徴とする
請求項3に記載の線幅測定方法。
After the edge detection step
Of the two edge pixels for each part in the direction orthogonal to the extending direction of the detected linear object, the edge pixels that are assumed to be erroneously detected are excluded from the target for measuring the interval of the edges. The line width measuring method according to claim 3, further comprising a false detection edge pixel exclusion step.
前記誤検出エッジ画素除外ステップでは、
検出された前記回帰直線と検出された前記線状オブジェクトの延伸方向に直交する方向の各部位に対して夫々2個のエッジ画素との間の夫々の距離と、前記夫々の距離の平均距離と、前記夫々の距離の標準偏差を夫々算出し、算出した前記平均距離と標準偏差をもとに閾値を決定し、
検出された前記回帰直線との間の距離が前記閾値以上ずれて検出されたエッジ画素とその画素と対になる反対側のエッジ画素の両方を除外することを特徴とする
請求項に記載の線幅測定方法。
In the false positive edge pixel exclusion step,
The distance between each of the two edge pixels for each part in the direction orthogonal to the extending direction of the detected linear object and the detected linear object, and the average distance of each of the distances. , The standard deviation of each of the distances is calculated, and the threshold value is determined based on the calculated average distance and the standard deviation.
The seventh aspect of claim 7 , wherein both the edge pixel detected with the distance between the detected regression line and the regression line deviating from the threshold value and the edge pixel on the opposite side paired with the pixel are excluded. Line width measurement method.
前記方向検出ステップの後、前記原画像を画像表示手段上に表示させ、検出された前記線状オブジェクトの前記延伸方向が、前記画像表示手段内で垂直方向あるいは水平方向になるように、少なくとも、前記第2の空間フィルタを用いて畳み込みが行われる測定対象領域を回転する測定対象領域回転ステップを有すること特徴とする
請求項1乃至のいずれか一項に記載の線幅測定方法。
After the direction detection step, the original image is displayed on the image display means so that the stretched direction of the detected linear object is at least vertical or horizontal in the image display means. The line width measuring method according to any one of claims 1 to 8 , further comprising a measurement target area rotation step for rotating a measurement target area to be convoluted using the second spatial filter.
前記方向検出ステップの前、前記原画像を画像表示手段上に表示させ、測定対象領域を指定する測定対象領域指定ステップを有し、
前記測定対象領域指定ステップでは、使用者が指定する前記第1のサイズ以上のサイズに対応した測定対象領域の輪郭を前記画像表示手段上の前記原画像の範囲内に表示して、使用者に前記測定対象領域の位置とサイズを決定させることを特徴とする
請求項1乃至のいずれか一項に記載の線幅測定方法。
Prior to the direction detection step, there is a measurement target area designation step in which the original image is displayed on the image display means and the measurement target area is designated.
In the measurement target area designation step, the outline of the measurement target area corresponding to the size equal to or larger than the first size designated by the user is displayed within the range of the original image on the image display means, and the user is informed. The line width measuring method according to any one of claims 1 to 9 , wherein the position and size of the measurement target region are determined.
請求項1〜又はのいずれか一項に記載の線幅測定方法をコンピュータに実行させる
線幅測定プログラム。
A line width measuring program for causing a computer to execute the line width measuring method according to any one of claims 1 to 5 or 7 to 9 .
請求項11に記載の線幅測定プログラムを記憶した、コンピュータによって読み取り可能な記憶媒体。 A computer-readable storage medium that stores the line width measurement program according to claim 11 . デジタル写真画像において、撮影された被写体の表面に存在する線状オブジェクトの線幅を測定する情報処理装置であって、
前記デジタル写真画像である原画像から、第1のサイズの第1の空間フィルタを用いて前記線状オブジェクトの延伸方向を検出する方向検出手段と、
前記原画像から第1のサイズより小さい第2のサイズの第2の空間フィルタを用いてエッジ強調画像を作成し、前記エッジ強調画像から、前記線状オブジェクトの線幅方向の両側のエッジを検出するエッジ検出手段と、
前記エッジ強調画像の、前記線状オブジェクトの前記延伸方向に直交する方向における、前記エッジの間隔を、前記線状オブジェクトの線幅として測定する線幅測定手段と、を有し、
前記第1の空間フィルタおよび前記第2の空間フィルタとして二次微分空間フィルタを用いることを特徴とする
情報処理装置。
An information processing device that measures the line width of a linear object existing on the surface of a photographed subject in a digital photographic image.
A direction detecting means for detecting the stretching direction of the linear object using the first spatial filter of the first size from the original image which is the digital photographic image,
An edge-enhanced image is created from the original image using a second spatial filter having a second size smaller than the first size, and edges on both sides of the linear object in the line width direction are detected from the edge-enhanced image. Edge detection means and
The edge enhanced image, in a direction perpendicular to the extending direction of the linear object, the distance of the edge, have a, a line width measuring means for measuring the width of the linear object,
An information processing apparatus characterized in that a second-order differential space filter is used as the first space filter and the second space filter .
JP2016211004A 2016-10-27 2016-10-27 Line width measurement method, line width measurement program, storage medium and information processing device Active JP6801366B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016211004A JP6801366B2 (en) 2016-10-27 2016-10-27 Line width measurement method, line width measurement program, storage medium and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016211004A JP6801366B2 (en) 2016-10-27 2016-10-27 Line width measurement method, line width measurement program, storage medium and information processing device

Publications (2)

Publication Number Publication Date
JP2018072115A JP2018072115A (en) 2018-05-10
JP6801366B2 true JP6801366B2 (en) 2020-12-16

Family

ID=62114122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016211004A Active JP6801366B2 (en) 2016-10-27 2016-10-27 Line width measurement method, line width measurement program, storage medium and information processing device

Country Status (1)

Country Link
JP (1) JP6801366B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7249828B2 (en) * 2019-03-18 2023-03-31 株式会社安藤・間 Crack extraction system and crack extraction method
KR102202572B1 (en) * 2019-11-25 2021-01-12 서울시립대학교 산학협력단 road crack assessment method and system using drone image and artificial intelligent algorithm
CN117442190B (en) * 2023-12-21 2024-04-02 山东第一医科大学附属省立医院(山东省立医院) Automatic wound surface measurement method and system based on target detection

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3316977B2 (en) * 1993-10-12 2002-08-19 日本アビオニクス株式会社 Pattern inspection method
JPH07248821A (en) * 1994-03-10 1995-09-26 Fujitsu Ltd Line tracking device
JPH10111939A (en) * 1996-10-08 1998-04-28 Mitsubishi Electric Corp On-vehicle image processor
EP1037166A1 (en) * 1999-03-16 2000-09-20 Philips Corporate Intellectual Property GmbH Method for the detection of contours in an X-Ray image
JP2005156206A (en) * 2003-11-21 2005-06-16 Canon Inc Crackwidth calculation method
JP3930493B2 (en) * 2004-05-17 2007-06-13 ジーイー・メディカル・システムズ・グローバル・テクノロジー・カンパニー・エルエルシー Image processing method, image processing apparatus, and X-ray CT apparatus
JP2007034411A (en) * 2005-07-22 2007-02-08 Fuji Xerox Co Ltd Linewidth measuring method and apparatus
JP4742832B2 (en) * 2005-11-25 2011-08-10 パナソニック電工株式会社 Appearance inspection method, appearance inspection apparatus, program

Also Published As

Publication number Publication date
JP2018072115A (en) 2018-05-10

Similar Documents

Publication Publication Date Title
JP6620477B2 (en) Method and program for detecting cracks in concrete
JP5025442B2 (en) Tire shape inspection method and apparatus
JP4154374B2 (en) Pattern matching device and scanning electron microscope using the same
KR100499764B1 (en) Method and system of measuring an object in a digital
JP4160991B2 (en) Linear defect detection apparatus and semiconductor substrate manufacturing apparatus, linear defect detection method and semiconductor substrate manufacturing method, computer connected to the detection apparatus or ...
JP6801366B2 (en) Line width measurement method, line width measurement program, storage medium and information processing device
JP2007285754A (en) Flaw detection method and flaw detector
JP6823486B2 (en) Crack detection method
JP5705711B2 (en) Crack detection method
CN109155062A (en) Analysis on cracks device and method
CN110879131B (en) Imaging quality testing method and imaging quality testing device for visual optical system, and electronic apparatus
JP4279833B2 (en) Appearance inspection method and appearance inspection apparatus
KR101977647B1 (en) Apparatus and Method for Detection MURA in Display Device
KR20230136291A (en) Method for assessing 3D mesh quality using structural similarity of projective space, apparatus and computer program for performing the method
JP2009036582A (en) Inspection method, inspection device and inspection program of plane display panel
JP2003167529A (en) Method and device for picture defect detection, and program for picture defect detection
JP2021135209A (en) Device and method for determining crack region and program for the same
CN113783996B (en) Screen defect optimization method, device and equipment and computer storage medium
JP4452793B2 (en) Illegal dumping point detection device, method, and program
JP2019120644A (en) Surface inspection device and surface inspection method
JP7340434B2 (en) Reinforcement inspection system, reinforcement inspection method, and reinforcement inspection program
KR20120036145A (en) Feature point detecting method of welding joint using laser vision system
JP5167674B2 (en) Evaluation method of paint pattern
JP2019197002A (en) Image processing device, image processing method, and program
JP6747692B2 (en) External wall inspection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190827

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200617

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200721

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200916

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201109

R151 Written notification of patent or utility model registration

Ref document number: 6801366

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151