JP2018060343A - Image processing apparatus, image processing method and image processing program - Google Patents

Image processing apparatus, image processing method and image processing program Download PDF

Info

Publication number
JP2018060343A
JP2018060343A JP2016196882A JP2016196882A JP2018060343A JP 2018060343 A JP2018060343 A JP 2018060343A JP 2016196882 A JP2016196882 A JP 2016196882A JP 2016196882 A JP2016196882 A JP 2016196882A JP 2018060343 A JP2018060343 A JP 2018060343A
Authority
JP
Japan
Prior art keywords
straight line
edge
hough space
origin
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016196882A
Other languages
Japanese (ja)
Other versions
JP6812731B2 (en
Inventor
山田 邦男
Kunio Yamada
邦男 山田
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.)
JVCKenwood Corp
Original Assignee
JVCKenwood Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2016196882A priority Critical patent/JP6812731B2/en
Publication of JP2018060343A publication Critical patent/JP2018060343A/en
Application granted granted Critical
Publication of JP6812731B2 publication Critical patent/JP6812731B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of extracting a straight line included in an image with a small quantity of calculation.SOLUTION: An edge extraction unit 1 extracts an edge in the horizontal (or vertical) direction included in an image signal. A Hough space storage unit 2 stores in the Hough space an angle indicative of the complete horizontal (or vertical) direction and a data represented by a vote value for which the first pixel number of pixels constituting the edge for a first pair of the angle indicative of the complete horizontal (or vertical) direction and a distance from the origin to a straight line is voted. An inclined straight line fitting unit 3 calculates an actual inclination angle of the edge, the second pixel number of the edge included in an inclined straight line, and the distance from the origin to the inclined straight line. A Hough space correcting unit 4 adds the second pixel number to a voting value for a second pair of an actual inclination angle and a distance to the straight line inclined from the origin and subtracts the second pair of voting values from the first number of pixels to correct the Hough space. A straight line extracting unit 5 extracts the data of the voting value exceeding a predetermined threshold value in the corrected Hough space as a straight line.SELECTED DRAWING: Figure 1

Description

本発明は、画像に含まれる直線を抽出する画像処理装置、画像処理方法、画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program for extracting a straight line included in an image.

例えばトンネル内部の壁面ようなコンクリートの壁面は、経時劣化によってひび割れすることがある。非特許文献1に記載されているように、コンクリートの壁面をカメラで撮影してひび割れの有無を検出することが提案されている。撮影した画像のエッジを抽出することによってひび割れを検出することができる。   For example, a concrete wall such as a wall inside a tunnel may crack due to deterioration over time. As described in Non-Patent Document 1, it has been proposed to detect the presence or absence of cracks by photographing a concrete wall surface with a camera. Cracks can be detected by extracting the edges of the captured image.

ところが、トンネル内部の壁面を撮影した画像のエッジを抽出すると、非直線状のひび割れを示すエッジの他に、ほぼ直線状のエッジが抽出されることがある。直線状のエッジは、壁面の施工の仕方、壁面の構造等の要因によって発生する。非直線状のひび割れと直線とが混在した画像から直線を抽出することができれば、直線を取り除くことができる。   However, when an edge of an image obtained by photographing a wall surface inside a tunnel is extracted, a substantially linear edge may be extracted in addition to an edge indicating a non-linear crack. The straight edge is generated due to factors such as the construction method of the wall surface and the structure of the wall surface. If a straight line can be extracted from an image in which non-linear cracks and straight lines are mixed, the straight lines can be removed.

特許文献1及び2、非特許文献1に記載されているように、画像に含まれる直線を抽出するためにハフ変換が多く用いられる。   As described in Patent Documents 1 and 2 and Non-Patent Document 1, Hough transform is often used to extract a straight line included in an image.

特開2006−252400号公報JP 2006-252400 A 特開2014−146326号公報JP 2014-146326 A

小畑、山崎、坪内、「移動カメラによる屋内壁面のひび割れ点検の自動化」、第13回画像センシングシンポジウム講演論文集、IN3-02, (CD-ROM), 2007. (http://www.jsk.t.u-tokyo.ac.jp/~yamazaki/rp/SSII2007_yamazaki.pdf)Obata, Yamazaki, Tsubouchi, “Automated Inspection of Cracks on Indoor Walls Using a Moving Camera,” Proceedings of the 13th Image Sensing Symposium, IN3-02, (CD-ROM), 2007. (http: //www.jsk. (tu-tokyo.ac.jp/~yamazaki/rp/SSII2007_yamazaki.pdf)

直線は水平方向または垂直方向であることが多いが、水平または垂直からわずかに傾いていることがある。直線は断続的に発生することがある。トンネル内部の壁面を撮影した画像には、低コントラストで、水平方向または垂直方向とは限らない複数の直線がフレーム内の全体に発生することがある。   The straight line is often horizontal or vertical, but may be slightly inclined from horizontal or vertical. Straight lines may occur intermittently. In an image obtained by photographing a wall surface inside a tunnel, a plurality of straight lines having a low contrast and not necessarily in a horizontal direction or a vertical direction may occur in the entire frame.

フレーム内の全体に存在する複数の直線をハフ変換を用いて抽出するには、膨大な計算量が必要となる。ハフ変換を用いながら、少ない計算量で、直線を抽出することができる画像処理装置、画像処理方法、画像処理プログラムが求められる。   In order to extract a plurality of straight lines existing in the entire frame using the Hough transform, a huge amount of calculation is required. There is a need for an image processing apparatus, an image processing method, and an image processing program that can extract a straight line with a small amount of calculation while using the Hough transform.

本発明は、画像に含まれる直線を、ハフ変換を用いながら、少ない計算量で抽出することができる画像処理装置、画像処理方法、画像処理プログラムを提供することを目的とする。   It is an object of the present invention to provide an image processing apparatus, an image processing method, and an image processing program that can extract a straight line included in an image with a small amount of calculation using Hough transform.

本発明は、入力された画像信号に含まれる水平方向と垂直方向とのうちの少なくとも一方のエッジを抽出するエッジ抽出部と、前記エッジ抽出が抽出した前記エッジは完全な水平方向または垂直方向の直線であるとみなして、前記エッジを構成するそれぞれの画素をハフ変換して、完全な水平方向または垂直方向を示す角度と、前記画像信号のフレームの原点から前記直線までの距離との第1の組に対して、前記エッジを構成する画素の第1の画素数を投票した投票値で表されるデータをハフ空間に格納するハフ空間格納部と、前記エッジの実際の傾斜角度を算出して前記エッジを傾斜した直線へとフィッティングさせ、前記傾斜した直線に含まれる前記エッジの第2の画素数と、前記原点から前記傾斜した直線までの距離を算出する傾斜直線フィッティング部と、前記実際の傾斜角度と前記原点から前記傾斜した直線までの距離との第2の組の投票値に前記第2の画素数を加算し、前記第1の組の投票値より前記第2の画素数を減算して、ハフ空間を修正するハフ空間修正部と、前記ハフ空間修正部によって修正されたハフ空間における所定の閾値を超える投票値のデータを直線として抽出する直線抽出部とを備えることを特徴とする画像処理装置を提供する。   The present invention provides an edge extraction unit that extracts at least one of a horizontal direction and a vertical direction included in an input image signal, and the edge extracted by the edge extraction is a complete horizontal or vertical direction. The first pixel of the angle indicating the complete horizontal direction or the vertical direction and the distance from the origin of the frame of the image signal to the straight line is assumed by performing a Hough transform on each pixel constituting the edge. And a Hough space storage unit for storing data represented by a vote value obtained by voting the first number of pixels constituting the edge in a Hough space, and an actual inclination angle of the edge is calculated. The edge is fitted to an inclined straight line, and the second pixel number of the edge included in the inclined straight line and the distance from the origin to the inclined straight line are calculated. The second pixel number is added to a second set of voting values of the fitting unit, the actual tilt angle and the distance from the origin to the tilted straight line, and the voting value of the first set A Hough space correction unit that corrects the Hough space by subtracting the second number of pixels, and a straight line extraction unit that extracts data of voting values exceeding a predetermined threshold in the Hough space corrected by the Hough space correction unit as a straight line An image processing apparatus is provided.

本発明は、画像信号に含まれる水平方向と垂直方向とのうちの少なくとも一方のエッジを抽出し、抽出された前記エッジは完全な水平方向または垂直方向の直線であるとみなして、前記エッジを構成するそれぞれの画素をハフ変換して、完全な水平方向または垂直方向を示す角度と、前記画像信号のフレームの原点から前記直線までの距離との第1の組に対して、前記エッジを構成する画素の第1の画素数を投票した投票値で表されるデータをハフ空間に格納し、前記エッジの実際の傾斜角度を算出して前記エッジを傾斜した直線へとフィッティングさせ、前記傾斜した直線に含まれる前記エッジの第2の画素数と、前記原点から前記傾斜した直線までの距離を算出し、前記実際の傾斜角度と前記原点から前記傾斜した直線までの距離との第2の組の投票値に前記第2の画素数を加算し、前記第1の組の投票値より前記第2の画素数を減算して、ハフ空間を修正し、修正されたハフ空間における所定の閾値を超える投票値のデータを直線として抽出することを特徴とする画像処理方法を提供する。   The present invention extracts at least one of a horizontal direction and a vertical direction included in an image signal, regards the extracted edge as a complete horizontal or vertical straight line, The edge is formed for a first set of an angle indicating a complete horizontal direction or a vertical direction and a distance from the origin of the frame of the image signal to the straight line by performing a Hough transform on each of the constituting pixels. The data represented by the vote value obtained by voting the first number of pixels to be stored is stored in the Hough space, the actual inclination angle of the edge is calculated and the edge is fitted to the inclined straight line, the inclination A second pixel number of the edge included in a straight line and a distance from the origin to the inclined straight line are calculated, and an actual inclination angle and a distance from the origin to the inclined straight line are calculated. The second number of pixels is added to the voting value of the set, and the second number of pixels is subtracted from the voting value of the first set to correct the Hough space, and a predetermined value in the corrected Hough space is determined. Provided is an image processing method characterized by extracting data of voting values exceeding a threshold value as a straight line.

本発明は、コンピュータに、画像信号に含まれる水平方向と垂直方向とのうちの少なくとも一方のエッジを抽出するステップと、抽出された前記エッジは完全な水平方向または垂直方向の直線であるとみなして、前記エッジを構成するそれぞれの画素をハフ変換して、完全な水平方向または垂直方向を示す角度と、前記画像信号のフレームの原点から前記直線までの距離との第1の組に対して、前記エッジを構成する画素の第1の画素数を投票した投票値で表されるデータをハフ空間に格納するステップと、前記エッジの実際の傾斜角度を算出して前記エッジを傾斜した直線へとフィッティングさせ、前記傾斜した直線に含まれる前記エッジの第2の画素数と、前記原点から前記傾斜した直線までの距離を算出するステップと、前記実際の傾斜角度と前記原点から前記傾斜した直線までの距離との第2の組の投票値に前記第2の画素数を加算し、前記第1の組の投票値より前記第2の画素数を減算して、ハフ空間を修正するステップと、修正されたハフ空間における所定の閾値を超える投票値のデータを直線として抽出するステップとを実行させることを特徴とする画像処理プログラムを提供する。   According to the present invention, a computer extracts at least one of a horizontal direction and a vertical direction included in an image signal, and the extracted edge is regarded as a complete horizontal or vertical straight line. Then, Hough transform is performed on each pixel constituting the edge, and a first set of an angle indicating a complete horizontal direction or a vertical direction and a distance from the origin of the frame of the image signal to the straight line Storing the data represented by the vote value obtained by voting the first number of pixels constituting the edge in a Hough space, and calculating the actual inclination angle of the edge to a straight line inclined the edge. And calculating a second pixel number of the edge included in the inclined straight line, a distance from the origin to the inclined straight line, and the actual inclination The second number of pixels is added to a second set of vote values of an angle and the distance from the origin to the inclined straight line, and the second number of pixels is subtracted from the first set of vote values. Thus, there is provided an image processing program characterized by executing a step of correcting a Hough space and a step of extracting data of voting values exceeding a predetermined threshold in the corrected Hough space as a straight line.

本発明の画像処理装置、画像処理方法、画像処理プログラムによれば、画像に含まれる直線を、ハフ変換を用いながら、少ない計算量で抽出することができる。   According to the image processing apparatus, the image processing method, and the image processing program of the present invention, a straight line included in an image can be extracted with a small amount of calculation while using the Hough transform.

一実施形態の画像処理装置を示すブロック図である。It is a block diagram which shows the image processing apparatus of one Embodiment. 非直線状のひび割れ線と複数の直線とを含むコンクリートの壁面を撮影した画像の一例を示す図である。It is a figure which shows an example of the image which image | photographed the wall surface of the concrete containing a non-linear crack line and a some straight line. ハフ変換を説明するための図である。It is a figure for demonstrating Hough conversion. 水平直線の傾斜直線フィッティング動作を説明するための図である。It is a figure for demonstrating the inclination straight line fitting operation | movement of a horizontal straight line. 垂直直線の傾斜直線フィッティング動作を説明するための図である。It is a figure for demonstrating the inclination straight line fitting operation | movement of a vertical straight line. 一実施形態の画像処理方法による処理、及び、一実施形態の画像処理プログラムで実行される手順を示すフローチャートである。It is a flowchart which shows the procedure performed with the process by the image processing method of one Embodiment, and the image processing program of one Embodiment. 第1の変形例を示すブロック図である。It is a block diagram which shows a 1st modification. 第2の変形例を示すブロック図である。It is a block diagram which shows the 2nd modification.

以下、一実施形態の画像処理装置、画像処理方法、画像処理プログラムについて、添付図面を参照して説明する。本実施形態においては、トンネル内部の壁面のようなコンクリートの壁面を撮影した画像を、直線状のエッジを含む画像の例とする。直線状のエッジを含む画像はコンクリートの壁面を撮影した画像に限定されない。   Hereinafter, an image processing apparatus, an image processing method, and an image processing program according to an embodiment will be described with reference to the accompanying drawings. In this embodiment, an image obtained by photographing a concrete wall such as a wall inside a tunnel is an example of an image including a straight edge. An image including a straight edge is not limited to an image obtained by photographing a concrete wall surface.

<画像処理装置>
まず、図1を用いて、一実施形態の画像処理装置の構成及び動作を説明する。図1において、エッジ抽出部1には、図2に示すような、コンクリートの壁面を撮影した画像信号のフレーム10を構成する画素が順に入力される。エッジ抽出部1に入力される画像信号は例えば静止画の画像信号であり、グレースケールの画像信号でよい。
<Image processing device>
First, the configuration and operation of an image processing apparatus according to an embodiment will be described with reference to FIG. In FIG. 1, the edge extraction unit 1 is sequentially input with pixels constituting a frame 10 of an image signal obtained by photographing a concrete wall as shown in FIG. The image signal input to the edge extraction unit 1 is, for example, a still image signal, and may be a grayscale image signal.

画像信号のフレーム10は、壁面に生じているひび割れである非直線状のひび割れ線11と、ほぼ水平方向に伸びる複数の直線12a〜12cと、ほぼ垂直方向に伸びる複数の直線13a〜13iを含む。ほぼ水平方向に伸びる直線12a〜12cを水平直線12と総称し、ほぼ垂直方向に伸びる直線13a〜13iを垂直直線13と総称することとする。   The frame 10 of the image signal includes a non-linear crack line 11 which is a crack generated on a wall surface, a plurality of straight lines 12a to 12c extending in a substantially horizontal direction, and a plurality of straight lines 13a to 13i extending in a substantially vertical direction. . The straight lines 12a to 12c extending in the substantially horizontal direction are collectively referred to as the horizontal straight line 12, and the straight lines 13a to 13i extending in the substantially vertical direction are collectively referred to as the vertical straight line 13.

水平直線12は水平からわずかに傾いており、垂直直線13は垂直からわずかに傾いている。水平直線12が完全に水平の直線を含んでいてもよいし、垂直直線13が完全に垂直の直線を含んでいてもよい。   The horizontal straight line 12 is slightly inclined from the horizontal, and the vertical straight line 13 is slightly inclined from the vertical. The horizontal straight line 12 may include a completely horizontal straight line, or the vertical straight line 13 may include a completely vertical straight line.

図2において、フレーム10の左上角部を原点である座標(0,0)とし、画素座標を(i,j)とする。フレーム10の幅(水平画素数)をw、高さ(垂直画素数)をhとする。本実施形態においては、水平方向を0°、時計回りに回転した垂直方向を90°とする。   In FIG. 2, the upper left corner of the frame 10 is the origin coordinate (0, 0), and the pixel coordinate is (i, j). The width (number of horizontal pixels) of the frame 10 is w, and the height (number of vertical pixels) is h. In the present embodiment, the horizontal direction is 0 °, and the vertical direction rotated clockwise is 90 °.

エッジ抽出部1は、例えば、注目画素を中心とする水平3画素、垂直3画素の9画素に対して微分フィルタを施すことによって、画像のエッジを抽出する。微分フィルタとしては例えばSobelフィルタが用いられる。エッジ抽出部1は、注目画素は水平方向のエッジ(以下、水平エッジ)である、注目画素は垂直方向のエッジ(以下、垂直エッジ)である、注目画素はエッジではない、の3つに分類分けする。   For example, the edge extraction unit 1 extracts an edge of an image by applying a differential filter to 9 pixels of 3 horizontal pixels and 3 vertical pixels centered on the target pixel. For example, a Sobel filter is used as the differential filter. The edge extraction unit 1 classifies the pixel of interest into three types: an edge in the horizontal direction (hereinafter, horizontal edge), the pixel of interest is an edge in the vertical direction (hereinafter, vertical edge), and the pixel of interest is not an edge. Divide.

ハフ空間格納部2は、水平エッジまたは垂直エッジであるとして抽出されたそれぞれの画素をハフ変換して、ハフ変換したデータをハフ空間に格納する。   The Hough space storage unit 2 performs Hough transform on each pixel extracted as being a horizontal edge or a vertical edge, and stores the Hough transformed data in the Hough space.

ここで、一般的なハフ変換について説明する。図3に示すように、ハフ変換する前の座標を(x,y)とすると、座標(x,y)を通る直線Lは、ρ=x・cosθ+y・sinθで表される。θは水平線を基準としたときの角度、ρは原点である座標(0,0)から直線Lまでの距離である。座標(x,y)を通る直線の角度θと距離ρの組は無数に存在する。一般的なハフ変換においては、角度θと距離ρの組の候補に投票し、多数決によって1つの角度θと距離ρの組が選択される。このようなハフ変換には膨大な計算量が必要となる。   Here, general Hough transform will be described. As shown in FIG. 3, when the coordinates before the Hough transform are (x, y), a straight line L passing through the coordinates (x, y) is represented by ρ = x · cos θ + y · sin θ. θ is an angle relative to the horizontal line, and ρ is the distance from the origin (0,0) to the straight line L. There are an infinite number of pairs of the angle θ and the distance ρ of the straight line passing through the coordinates (x, y). In general Hough transform, a candidate for a set of angle θ and distance ρ is voted, and one set of angle θ and distance ρ is selected by majority vote. Such a Hough transform requires a huge amount of calculation.

そこで、本実施形態においては、図2に示す水平直線12及び垂直直線13の角度は完全な水平方向または垂直方向の直線であるとみなして、水平直線12及び垂直直線13を構成するそれぞれ画素をそれぞれ0°と90°に限定してハフ変換を実施することとする。   Therefore, in the present embodiment, the angle of the horizontal straight line 12 and the vertical straight line 13 shown in FIG. 2 is regarded as a complete horizontal direction or a straight line in the vertical direction, and each of the pixels constituting the horizontal straight line 12 and the vertical straight line 13 is determined. It is assumed that the Hough transform is performed by limiting to 0 ° and 90 °, respectively.

なお、図3より分かるように、角度θが0°のとき直線Lは垂直の直線となり、角度θが90°のとき直線Lは水平の直線となる。従って、ハフ空間格納部2は、図2で定義した角度0°及び90°を角度90°から減じて、一般的なハフ変換で用いられる角度θに変換してハフ変換を実施する。但し、説明を簡略化するため、図3に示す角度θであると注記しない限り、ハフ空間における角度を図2で定義した角度で説明することとする。   As can be seen from FIG. 3, the straight line L is a vertical straight line when the angle θ is 0 °, and the straight line L is a horizontal straight line when the angle θ is 90 °. Therefore, the Hough space storage unit 2 performs the Hough transform by subtracting the angles 0 ° and 90 ° defined in FIG. 2 from the angle 90 ° and converting them to an angle θ used in general Hough transform. However, in order to simplify the description, the angle in the Hough space will be described with the angle defined in FIG. 2 unless it is noted that the angle θ is shown in FIG.

本実施形態においては水平直線12の角度を0°に限定したから、任意の座標(i,j)における水平エッジを含む直線は、図4に破線で示すように、角度が0°、原点からの距離はjで表すことができる。ハフ空間格納部2は、ハフ空間H[0,j]に1を投票する。また、本実施形態においては垂直直線13の角度を90°に限定したから、任意の座標(i,j)における垂直エッジを含む直線は、図5に破線で示すように、角度が90°、原点からの距離はiで表すことができる。ハフ空間格納部2は、ハフ空間H[90,i]に1を投票する。   In this embodiment, since the angle of the horizontal straight line 12 is limited to 0 °, a straight line including a horizontal edge at an arbitrary coordinate (i, j) has an angle of 0 ° from the origin as shown by a broken line in FIG. Can be represented by j. The Hough space storage unit 2 votes 1 for the Hough space H [0, j]. Further, in the present embodiment, the angle of the vertical straight line 13 is limited to 90 °, and therefore a straight line including a vertical edge at an arbitrary coordinate (i, j) has an angle of 90 °, as indicated by a broken line in FIG. The distance from the origin can be represented by i. The Hough space storage unit 2 votes 1 for the Hough space H [90, i].

ハフ空間格納部2は、フレーム10内で、水平エッジまたは垂直エッジであるとして抽出されたそれぞれの画素において、ハフ空間H[0,j]またはH[90,i]に1を投票する。フレーム10内での投票の結果、図2において水平直線12が位置する垂直位置jのハフ空間H[0,j]と、垂直直線13が位置する水平位置iのハフ空間H[90,i]とが大きな値となる。   The Hough space storage unit 2 votes 1 in the Hough space H [0, j] or H [90, i] in each pixel extracted as a horizontal edge or a vertical edge in the frame 10. As a result of voting in the frame 10, the Hough space H [0, j] at the vertical position j where the horizontal straight line 12 is located and the Hough space H [90, i] at the horizontal position i where the vertical straight line 13 is located as shown in FIG. Is a large value.

ハフ空間格納部2には、完全な水平方向または垂直方向を示す角度と、フレーム10の原点から直線までの距離との第1の組に対して、エッジを構成する画素の第1の画素数を投票した投票値で表されるデータが格納されることになる。図2に示す画像の場合、第1の組は複数存在する。   The Hough space storage unit 2 includes a first number of pixels constituting an edge with respect to a first set of an angle indicating a complete horizontal direction or a vertical direction and a distance from the origin of the frame 10 to a straight line. Data represented by the vote value obtained by voting is stored. In the case of the image shown in FIG. 2, there are a plurality of first sets.

傾斜直線フィッティング部3は、抽出された直線を実際の水平直線12または垂直直線13に一致させるようにフィッティングさせる。傾斜直線フィッティング部3は、水平エッジの画素が水平方向に並んでいるか、または、水平エッジの画素がフレーム10の右側に向かうに従って順に上がっていくか、もしくは下がっていくかによって厳密な水平直線であるか否かを判定する。傾斜直線フィッティング部3は、垂直エッジの画素が垂直方向に並んでいるか、または、垂直エッジの画素がフレーム10の下側に向かうに従って順に右側にずれていくか、もしくは左側にずれていくかによって厳密な垂直直線であるか否かを判定する。   The inclined straight line fitting unit 3 performs fitting so that the extracted straight line matches the actual horizontal straight line 12 or vertical straight line 13. The inclined straight line fitting unit 3 is a strict horizontal straight line depending on whether the pixels of the horizontal edge are arranged in the horizontal direction, or the pixels of the horizontal edge go up or down in order toward the right side of the frame 10. It is determined whether or not there is. The inclined straight line fitting unit 3 determines whether the vertical edge pixels are arranged in the vertical direction, or whether the vertical edge pixels are sequentially shifted to the right side or the left side as they go to the lower side of the frame 10. It is determined whether or not it is a strict vertical straight line.

図4及び図5を用いて、傾斜直線フィッティング部3の動作を具体的に説明する。図4に示すように、傾斜直線フィッティング部3は、座標(0,j)と座標(w,j+n)とを結ぶ直線上の水平エッジの数をカウントする。ここで、nは例えば±w×0.1である。図4に示す角度範囲は、arctan(0.1)=5.7°より、水平方向に対して約±6°程度の角度範囲となる。この角度範囲内の任意の角度を正または負の角度pとする。   The operation of the inclined straight line fitting unit 3 will be specifically described with reference to FIGS. 4 and 5. As shown in FIG. 4, the inclined straight line fitting unit 3 counts the number of horizontal edges on the straight line connecting the coordinates (0, j) and the coordinates (w, j + n). Here, n is ± w × 0.1, for example. The angle range shown in FIG. 4 is about ± 6 ° with respect to the horizontal direction from arctan (0.1) = 5.7 °. An arbitrary angle within this angle range is defined as a positive or negative angle p.

水平エッジの最大のカウント値をedhmaxとし、最大のカウント値edhmaxが得られるときの角度pを角度pmax、角度pmaxの直線と座標(0,0)との距離をrhとする。水平エッジの最大のカウント値は画素数で表される。   The maximum count value of the horizontal edge is edhmax, the angle p when the maximum count value edhmax is obtained is the angle pmax, and the distance between the straight line of the angle pmax and the coordinate (0, 0) is rh. The maximum count value of the horizontal edge is represented by the number of pixels.

図5に示すように、傾斜直線フィッティング部3は、座標(i,0)と座標(i+m,h)とを結ぶ直線上の垂直エッジの数をカウントする。ここで、mは例えば±h×0.1である。図5に示す角度範囲も、垂直方向に対して約±6°程度の角度範囲となる。この角度範囲内の任意の角度を正または負の角度qとする。   As shown in FIG. 5, the inclined straight line fitting unit 3 counts the number of vertical edges on the straight line connecting the coordinates (i, 0) and the coordinates (i + m, h). Here, m is ± h × 0.1, for example. The angle range shown in FIG. 5 is also about ± 6 ° with respect to the vertical direction. An arbitrary angle within this angle range is defined as a positive or negative angle q.

垂直エッジの最大のカウント値をedvmaxとし、最大のカウント値edvmaxが得られるときの角度qを角度qmax、角度qmaxの直線と座標(0,0)との距離をrvする。垂直エッジの最大のカウント値は画素数で表される。   The maximum count value of the vertical edge is edvmax, the angle q when the maximum count value edvmax is obtained is the angle qmax, and the distance between the straight line of the angle qmax and the coordinate (0, 0) is rv. The maximum count value of the vertical edge is represented by the number of pixels.

このように、傾斜直線フィッティング部3は、水平エッジ及び垂直エッジの実際の傾斜角度(pmaxまたはqmax)を算出して、水平エッジ及び垂直エッジを傾斜した直線へとフィッティングさせる。傾斜直線フィッティング部3は、傾斜した直線に含まれる水平エッジまたは垂直エッジの第2の画素数(edhmaxまたはedvmax)と、原点から傾斜した直線までの距離(rhまたはrv)を算出する。   In this way, the inclined straight line fitting unit 3 calculates the actual inclination angle (pmax or qmax) of the horizontal edge and the vertical edge, and fits the horizontal edge and the vertical edge to an inclined straight line. The inclined straight line fitting unit 3 calculates a second pixel number (edhmax or edvmax) of a horizontal edge or a vertical edge included in the inclined straight line and a distance (rh or rv) from the origin to the inclined straight line.

ハフ空間修正部4は、傾斜直線フィッティング部3において角度pmaxが0°ではなく(実際の角度が0°ではなく)傾斜していると判断された水平直線12と、角度qmaxが90°ではなく(実際の角度が90°ではなく)傾斜していると判断された垂直直線13におけるハフ空間を修正する。   The Hough space correction unit 4 has a horizontal straight line 12 that is determined by the inclined straight line fitting unit 3 to have an angle pmax that is not 0 ° (the actual angle is not 0 °) and an angle qmax that is not 90 °. The Hough space in the vertical straight line 13 determined to be inclined (not the actual angle is 90 °) is corrected.

ハフ空間修正部4は、ハフ空間H[pmax,rh]の投票値にカウント値edhmaxを加算し、ハフ空間H[90+qmax,rv]の投票値にカウント値edvmaxを加算する。さらに、ハフ空間修正部4は、ハフ空間H[0,j]の投票値よりカウント値edhmaxを減算し、ハフ空間H[90,i]の投票値よりカウント値edvmaxを減算する。   The Hough space correction unit 4 adds the count value edhmax to the vote value of the Hough space H [pmax, rh], and adds the count value edvmax to the vote value of the Hough space H [90 + qmax, rv]. Further, the Hough space correction unit 4 subtracts the count value edhmax from the vote value of the Hough space H [0, j], and subtracts the count value edvmax from the vote value of the Hough space H [90, i].

このように、ハフ空間修正部4は、実際の傾斜角度と原点から傾斜した直線までの距離との第2の組の投票値に第2の画素数を加算し、第1の組の投票値より第2の画素数を減算して、ハフ空間を修正する。これによって、ハフ空間が修正される。   In this way, the Hough space correction unit 4 adds the second number of pixels to the second set of voting values of the actual inclination angle and the distance from the origin to the inclined line, and the first set of voting values The Hough space is corrected by subtracting the second number of pixels. This corrects the Hough space.

直線抽出部5は、ハフ空間の投票値が所定の閾値thrを超えるデータを直線として抽出する。以上によって、本実施形態の画像処理装置によれば、画像に含まれる直線を、ハフ変換を用いながら、少ない計算量で抽出することができる。   The straight line extraction unit 5 extracts data whose voting value in the Hough space exceeds a predetermined threshold value thr as a straight line. As described above, according to the image processing apparatus of the present embodiment, a straight line included in an image can be extracted with a small amount of calculation while using the Hough transform.

画像修正部6には、画像信号と、直線抽出部5よって抽出された水平直線12及び垂直直線13を示す情報が入力される。水平直線12及び垂直直線13を示す情報は、水平直線12及び垂直直線13それぞれを構成する画素の座標で表すことができる。   The image correction unit 6 receives an image signal and information indicating the horizontal straight line 12 and the vertical straight line 13 extracted by the straight line extraction unit 5. Information indicating the horizontal straight line 12 and the vertical straight line 13 can be represented by the coordinates of the pixels constituting the horizontal straight line 12 and the vertical straight line 13 respectively.

画像修正部6は、水平直線12及び垂直直線13を示す情報に基づいて、図2に示す画像より、水平直線12及び垂直直線13を消去したり、水平直線12及び垂直直線13を目立たないように加工したりすることによって、ひび割れ線11が視覚的に目立つように画像を修正する。修正画像信号を図示していないディスプレイに供給して修正画像を表示すれば、検査者は容易にひび割れ線11を認識することができる。   Based on the information indicating the horizontal straight line 12 and the vertical straight line 13, the image correction unit 6 deletes the horizontal straight line 12 and the vertical straight line 13 from the image shown in FIG. 2 or makes the horizontal straight line 12 and the vertical straight line 13 inconspicuous. Or the like, the image is corrected so that the crack line 11 is visually conspicuous. If the corrected image signal is supplied to a display (not shown) to display the corrected image, the inspector can easily recognize the crack line 11.

図1に示す画像処理装置は、ハードウェアによって構成されていてもよいし、ソフトウェアによって構成されていてもよいし、ハードウェアとソフトウェアとが組み合わされて構成されていてもよい。   The image processing apparatus illustrated in FIG. 1 may be configured by hardware, may be configured by software, or may be configured by combining hardware and software.

図1に示す画像処理装置は、マイクロコンピュータの中央処理装置(CPU)及びメモリ、または、集積回路で構成されていてもよい。メモリに記憶されたコンピュータプログラム(画像処理プログラム)をCPUによって実行することによって、図1に示す画像処理装置が機能的に実現されていてもよい。   The image processing apparatus shown in FIG. 1 may be composed of a central processing unit (CPU) and a memory of a microcomputer, or an integrated circuit. The image processing apparatus shown in FIG. 1 may be functionally realized by a computer program (image processing program) stored in the memory being executed by the CPU.

<画像処理方法及び画像処理プログラム>
次に、図6を用いて、一実施形態の画像処理プログラムで実行される手順を説明する。図6は、一実施形態の画像処理方法による処理も示している。
<Image processing method and image processing program>
Next, a procedure executed by the image processing program according to the embodiment will be described with reference to FIG. FIG. 6 also shows processing by the image processing method of one embodiment.

図6において、画像処理プログラムが実行されて処理が開始されると、CPUは、ステップS11にて、画像信号を取り込む。CPUは、ステップS12にて、水平エッジ及び垂直エッジを抽出する。ステップS11及びステップS12は、エッジ抽出部1で実行される処理に相当する。   In FIG. 6, when the image processing program is executed and processing is started, the CPU captures an image signal in step S11. In step S12, the CPU extracts a horizontal edge and a vertical edge. Steps S <b> 11 and S <b> 12 correspond to processing executed by the edge extraction unit 1.

CPUは、ステップS21にて、水平直線12それぞれの画素においてハフ空間H[0,j]に1を投票する。ステップS21は、ハフ空間格納部2で実行される処理に相当する。   In step S21, the CPU votes 1 in the Hough space H [0, j] for each pixel of the horizontal straight line 12. Step S21 corresponds to the processing executed in the Hough space storage unit 2.

CPUは、ステップS22にて、角度(0+p)°の傾きで座標(0,j)を通る直線上の水平エッジの数をカウントする。CPUは、ステップS23にて、最大のカウント値edhmaxが得られるときの角度pを角度pmaxとし、角度pmaxの直線と原点との距離rhを算出する。ステップS22及びS23は、傾斜直線フィッティング部3で実行される処理に相当する。   In step S22, the CPU counts the number of horizontal edges on a straight line passing through the coordinates (0, j) with an inclination of an angle (0 + p) °. In step S23, the CPU sets the angle p when the maximum count value edhmax is obtained as the angle pmax, and calculates the distance rh between the straight line having the angle pmax and the origin. Steps S <b> 22 and S <b> 23 correspond to processing executed by the inclined straight line fitting unit 3.

CPUは、ステップS24にて、ハフ空間H[pmax,rh]の投票値にカウント値edhmaxを加算し、ステップS25にて、ハフ空間H[0,j]の投票値よりカウント値edhmaxを減算する。ステップS24及びS25は、ハフ空間修正部4で実行される処理に相当する。   In step S24, the CPU adds the count value edhmax to the vote value of the Hough space H [pmax, rh], and subtracts the count value edhmax from the vote value of the Hough space H [0, j] in step S25. . Steps S <b> 24 and S <b> 25 correspond to processing executed by the Hough space correction unit 4.

以上のステップS21〜S25と並行して、CPUはステップS31〜S35を実行する。CPUは、ステップS31にて、垂直直線13それぞれの画素においてハフ空間[H90,i]に1を投票する。ステップS31は、ハフ空間格納部2で実行される処理に相当する。   In parallel with the above steps S21 to S25, the CPU executes steps S31 to S35. In step S31, the CPU votes 1 in the Hough space [H90, i] for each pixel of the vertical straight line 13. Step S31 corresponds to the processing executed in the Hough space storage unit 2.

CPUは、ステップS32にて、角度(90+q)°の傾きで座標(i,0)を通る直線上の垂直エッジの数をカウントする。CPUは、ステップS33にて、最大のカウント値edvmaxが得られるときの角度qを角度qmaxとし、角度qmaxの直線と原点との距離rvを算出する。ステップS32及びS33は、傾斜直線フィッティング部3で実行される処理に相当する。   In step S32, the CPU counts the number of vertical edges on a straight line passing through the coordinates (i, 0) with an inclination of angle (90 + q) °. In step S33, the CPU calculates the distance rv between the straight line having the angle qmax and the origin by setting the angle q when the maximum count value edvmax is obtained as the angle qmax. Steps S <b> 32 and S <b> 33 correspond to processing executed by the inclined straight line fitting unit 3.

CPUは、ステップS34にて、ハフ空間H[90+qmax,rv]の投票値にカウント値edvmaxを加算し、ステップS35にて、ハフ空間H[90,i]の投票値よりカウント値edvmaxを減算する。ステップS34及びS35は、ハフ空間修正部4で実行される処理に相当する。   In step S34, the CPU adds the count value edvmax to the vote value of the Hough space H [90 + qmax, rv], and subtracts the count value edvmax from the vote value of the Hough space H [90, i] in step S35. . Steps S34 and S35 correspond to processing executed by the Hough space correction unit 4.

CPUは、ステップS41にて、ハフ空間H[θ,ρ]>thrを満たすデータを抽出すべき直線として選択して終了する。これによって、図2の水平直線12及び垂直直線13が抽出される。ステップS41は、直線抽出部5で実行される処理に相当する。ステップS41での角度θと距離ρは、図3で定義した直線の角度と原点から直線までの距離である。   In step S41, the CPU selects data satisfying the Hough space H [θ, ρ]> thr as a straight line to be extracted, and the process ends. Thereby, the horizontal straight line 12 and the vertical straight line 13 of FIG. 2 are extracted. Step S <b> 41 corresponds to a process executed by the straight line extraction unit 5. The angle θ and the distance ρ in step S41 are the straight line angle defined in FIG. 3 and the distance from the origin to the straight line.

本実施形態の画像処理方法及び画像処理プログラムによれば、上述した本実施形態の画像処理装置による効果と同様の効果を奏する。画像処理プログラムは、非一時的な記憶媒体に記憶されていてもよいし、インターネット等の通信回線で配信されてもよい。   According to the image processing method and the image processing program of the present embodiment, the same effects as those obtained by the image processing apparatus of the present embodiment described above can be obtained. The image processing program may be stored in a non-transitory storage medium, or distributed via a communication line such as the Internet.

<第1の変形例>
画像修正部6における画像信号の修正を容易にするため、図7に示すように構成してもよい。図7においては、ハフ空間格納部2からハフ空間修正部4までの図示を省略している。図7において、2値変換部7は、画像信号を2値化して画像修正部6に供給する。
<First Modification>
In order to facilitate the correction of the image signal in the image correction unit 6, the configuration may be as shown in FIG. In FIG. 7, the illustration from the Hough space storage unit 2 to the Hough space correction unit 4 is omitted. In FIG. 7, the binary conversion unit 7 binarizes the image signal and supplies it to the image correction unit 6.

このようにすると、図2におけるひび割れ線11、水平直線12及び垂直直線13の部分は白で表され、他の部分は黒で表される。画像修正部6は、水平直線12及び垂直直線13を示す情報に基づいて、水平直線12及び垂直直線13の部分を白から黒へと置換することによって、水平直線12及び垂直直線13を容易に消去することができる。   If it does in this way, the part of the crack line 11, the horizontal straight line 12, and the vertical straight line 13 in FIG. 2 will be represented by white, and another part will be represented by black. The image correcting unit 6 easily replaces the horizontal straight line 12 and the vertical straight line 13 from white to black on the basis of the information indicating the horizontal straight line 12 and the vertical straight line 13 to easily change the horizontal straight line 12 and the vertical straight line 13. Can be erased.

図7に示す構成によって、修正画像信号を図示していないディスプレイに供給して修正画像を表示すれば、ひび割れ線11のみが白で表示されるので、検査者は容易にひび割れ線11を認識することができる。   With the configuration shown in FIG. 7, when the corrected image signal is supplied to a display (not shown) and the corrected image is displayed, only the crack line 11 is displayed in white, so that the inspector easily recognizes the crack line 11. be able to.

<第2の変形例>
上述した本実施形態においては、水平直線12は水平からわずかに傾いている直線であり、垂直直線13は垂直からわずかに傾いている直線である場合を例としている。水平方向に伸びる直線が水平から大きく傾き、垂直方向に伸びる直線が垂直から大きく傾く場合には、傾斜直線フィッティング部3における座標(w,j+n)のn、座標(i+m,h)のmを大きな値としなければならず、傾斜直線フィッティング部3での演算量が増大する。
<Second Modification>
In the embodiment described above, the horizontal straight line 12 is a straight line slightly inclined from the horizontal, and the vertical straight line 13 is a straight line slightly inclined from the vertical. When the straight line extending in the horizontal direction is greatly inclined from the horizontal and the straight line extending in the vertical direction is greatly inclined from the vertical, n of the coordinates (w, j + n) and m of the coordinates (i + m, h) in the inclined straight line fitting unit 3 are increased. It must be a value, and the amount of calculation in the inclined straight line fitting unit 3 increases.

このような場合には、図8に示すように、エッジ抽出部1の前段にアフィン変換部8を設けることが好ましい。アフィン変換部8は、水平から大きく傾く直線を水平に近付ける(または完全に水平とする)よう、垂直から大きく傾く方向の直線を垂直に近付ける(または完全に垂直とする)よう、画像信号を回転させる。エッジ抽出部1以降の動作は図1と同じである。なお、図8においては、画像修正部6の図示を省略している。   In such a case, as shown in FIG. 8, it is preferable to provide an affine transformation unit 8 before the edge extraction unit 1. The affine transformation unit 8 rotates the image signal so that a straight line greatly inclined from the horizontal approaches the horizontal (or completely horizontal), and a straight line inclined greatly from the vertical approaches the vertical (or completely vertical). Let The operations after the edge extraction unit 1 are the same as those in FIG. In FIG. 8, the illustration of the image correction unit 6 is omitted.

<第3の変形例>
図7に示す第1の変形例と図8に示す第2の変形例とを組み合わせた構成としてもよい。
<Third Modification>
It is good also as a structure which combined the 1st modification shown in FIG. 7 and the 2nd modification shown in FIG.

本発明は以上説明した本実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々変更可能である。本実施形態においては、画像信号が水平直線12及び垂直直線13の双方を含むことを前提としたが、水平直線12と垂直直線13の一方のみが含まれることもある。この場合は、水平直線12と垂直直線13の一方のみを抽出する処理を実行すればよい。画像処理装置に入力される画像信号を静止画の画像信号としたが、動画像信号であってもよい。   The present invention is not limited to the embodiment described above, and various modifications can be made without departing from the scope of the present invention. In the present embodiment, it is assumed that the image signal includes both the horizontal straight line 12 and the vertical straight line 13, but only one of the horizontal straight line 12 and the vertical straight line 13 may be included. In this case, a process of extracting only one of the horizontal straight line 12 and the vertical straight line 13 may be executed. Although the image signal input to the image processing apparatus is a still image signal, it may be a moving image signal.

画像に含まれる直線を抽出することのみを目的とする場合には、画像修正部6は省略可能である。画像を修正する目的以外で画像に含まれる直線を抽出する画像処理装置、画像処理方法、画像処理プログラムが用いられてもよいことは勿論である。   When the purpose is only to extract a straight line included in the image, the image correction unit 6 can be omitted. Of course, an image processing apparatus, an image processing method, and an image processing program for extracting a straight line included in an image may be used for purposes other than the purpose of correcting the image.

1 エッジ抽出部
2 ハフ空間格納部
3 傾斜直線フィッティング部
4 ハフ空間修正部
5 直線抽出部
6 画像修正部
7 2値変換部
8 アフィン変換部
DESCRIPTION OF SYMBOLS 1 Edge extraction part 2 Hough space storage part 3 Inclined straight line fitting part 4 Hough space correction part 5 Straight line extraction part 6 Image correction part 7 Binary conversion part 8 Affine transformation part

Claims (4)

入力された画像信号に含まれる水平方向と垂直方向とのうちの少なくとも一方のエッジを抽出するエッジ抽出部と、
前記エッジ抽出部が抽出した前記エッジは完全な水平方向または垂直方向の直線であるとみなして、前記エッジを構成するそれぞれの画素をハフ変換して、完全な水平方向または垂直方向を示す角度と、前記画像信号のフレームの原点から前記直線までの距離との第1の組に対して、前記エッジを構成する画素の第1の画素数を投票した投票値で表されるデータをハフ空間に格納するハフ空間格納部と、
前記エッジの実際の傾斜角度を算出して前記エッジを傾斜した直線へとフィッティングさせ、前記傾斜した直線に含まれる前記エッジの第2の画素数と、前記原点から前記傾斜した直線までの距離を算出する傾斜直線フィッティング部と、
前記実際の傾斜角度と前記原点から前記傾斜した直線までの距離との第2の組の投票値に前記第2の画素数を加算し、前記第1の組の投票値より前記第2の画素数を減算して、ハフ空間を修正するハフ空間修正部と、
前記ハフ空間修正部によって修正されたハフ空間における所定の閾値を超える投票値のデータを直線として抽出する直線抽出部と、
を備えることを特徴とする画像処理装置。
An edge extraction unit that extracts at least one edge of the horizontal direction and the vertical direction included in the input image signal;
The edge extracted by the edge extraction unit is considered to be a straight line in a complete horizontal direction or a vertical direction, Hough transforms each pixel constituting the edge, and an angle indicating a complete horizontal direction or a vertical direction The data represented by the vote value obtained by voting the first number of pixels constituting the edge with respect to the first set of the distance from the origin of the frame of the image signal to the straight line is stored in the Hough space. A Hough space storage to store;
The actual inclination angle of the edge is calculated and the edge is fitted to an inclined straight line, and the second number of pixels of the edge included in the inclined straight line and the distance from the origin to the inclined straight line are calculated. An inclined straight line fitting part to be calculated;
The second pixel number is added to a second set of voting values of the actual tilt angle and the distance from the origin to the tilted straight line, and the second pixel is calculated from the first set of voting values. A Hough space correction unit that corrects the Hough space by subtracting the number;
A straight line extraction unit that extracts data of voting values exceeding a predetermined threshold in the Hough space corrected by the Hough space correction unit;
An image processing apparatus comprising:
前記画像信号は、非直線と水平方向または垂直方向の直線とを含む画像を示す画像信号であり、
前記画像に含まれる前記非直線が視覚的に認識されやすいように、前記直線抽出部によって抽出された直線に基づいて前記画像信号を修正する画像修正部をさらに含む
ことを特徴とする請求項1に記載の画像処理装置。
The image signal is an image signal indicating an image including a non-linear line and a straight line in a horizontal direction or a vertical direction,
The image correction unit for correcting the image signal based on the straight line extracted by the straight line extraction unit so that the non-straight line included in the image is easily recognized visually. An image processing apparatus according to 1.
画像信号に含まれる水平方向と垂直方向とのうちの少なくとも一方のエッジを抽出し、
抽出された前記エッジは完全な水平方向または垂直方向の直線であるとみなして、前記エッジを構成するそれぞれの画素をハフ変換して、完全な水平方向または垂直方向を示す角度と、前記画像信号のフレームの原点から前記直線までの距離との第1の組に対して、前記エッジを構成する画素の第1の画素数を投票した投票値で表されるデータをハフ空間に格納し、
前記エッジの実際の傾斜角度を算出して前記エッジを傾斜した直線へとフィッティングさせ、前記傾斜した直線に含まれる前記エッジの第2の画素数と、前記原点から前記傾斜した直線までの距離を算出し、
前記実際の傾斜角度と前記原点から前記傾斜した直線までの距離との第2の組の投票値に前記第2の画素数を加算し、前記第1の組の投票値より前記第2の画素数を減算して、ハフ空間を修正し、
修正されたハフ空間における所定の閾値を超える投票値のデータを直線として抽出する
ことを特徴とする画像処理方法。
Extracting at least one edge of the horizontal direction and the vertical direction included in the image signal;
The extracted edge is regarded as a straight line in the complete horizontal direction or the vertical direction, and each pixel constituting the edge is subjected to a Hough transform to obtain an angle indicating the complete horizontal direction or the vertical direction, and the image signal. Storing the data represented by the vote value obtained by voting the first number of pixels constituting the edge in the Hough space for the first set of the distance from the origin of the frame to the straight line,
The actual inclination angle of the edge is calculated and the edge is fitted to an inclined straight line, and the second number of pixels of the edge included in the inclined straight line and the distance from the origin to the inclined straight line are calculated. Calculate
The second pixel number is added to a second set of voting values of the actual tilt angle and the distance from the origin to the tilted straight line, and the second pixel is calculated from the first set of voting values. Subtract the number to fix the Hough space,
An image processing method characterized by extracting data of voting values exceeding a predetermined threshold in a modified Hough space as a straight line.
コンピュータに、
画像信号に含まれる水平方向と垂直方向とのうちの少なくとも一方のエッジを抽出するステップと、
抽出された前記エッジは完全な水平方向または垂直方向の直線であるとみなして、前記エッジを構成するそれぞれの画素をハフ変換して、完全な水平方向または垂直方向を示す角度と、前記画像信号のフレームの原点から前記直線までの距離との第1の組に対して、前記エッジを構成する画素の第1の画素数を投票した投票値で表されるデータをハフ空間に格納するステップと、
前記エッジの実際の傾斜角度を算出して前記エッジを傾斜した直線へとフィッティングさせ、前記傾斜した直線に含まれる前記エッジの第2の画素数と、前記原点から前記傾斜した直線までの距離を算出するステップと、
前記実際の傾斜角度と前記原点から前記傾斜した直線までの距離との第2の組の投票値に前記第2の画素数を加算し、前記第1の組の投票値より前記第2の画素数を減算して、ハフ空間を修正するステップと、
修正されたハフ空間における所定の閾値を超える投票値のデータを直線として抽出するステップと、
を実行させることを特徴とする画像処理プログラム。
On the computer,
Extracting at least one edge of the horizontal direction and the vertical direction included in the image signal;
The extracted edge is regarded as a straight line in the complete horizontal direction or the vertical direction, and each pixel constituting the edge is subjected to a Hough transform to obtain an angle indicating the complete horizontal direction or the vertical direction, and the image signal. Storing in the Hough space data represented by a vote value obtained by voting the first number of pixels constituting the edge with respect to the first set of the distance from the origin of the frame to the straight line; ,
The actual inclination angle of the edge is calculated and the edge is fitted to an inclined straight line, and the second number of pixels of the edge included in the inclined straight line and the distance from the origin to the inclined straight line are calculated. A calculating step;
The second pixel number is added to a second set of voting values of the actual tilt angle and the distance from the origin to the tilted straight line, and the second pixel is calculated from the first set of voting values. Subtracting the number to correct the Hough space;
Extracting data of voting values exceeding a predetermined threshold in the modified Hough space as a straight line;
An image processing program for executing
JP2016196882A 2016-10-05 2016-10-05 Image processing device, image processing method, image processing program Active JP6812731B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016196882A JP6812731B2 (en) 2016-10-05 2016-10-05 Image processing device, image processing method, image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016196882A JP6812731B2 (en) 2016-10-05 2016-10-05 Image processing device, image processing method, image processing program

Publications (2)

Publication Number Publication Date
JP2018060343A true JP2018060343A (en) 2018-04-12
JP6812731B2 JP6812731B2 (en) 2021-01-13

Family

ID=61910003

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016196882A Active JP6812731B2 (en) 2016-10-05 2016-10-05 Image processing device, image processing method, image processing program

Country Status (1)

Country Link
JP (1) JP6812731B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792601A (en) * 2021-08-10 2021-12-14 武汉光庭信息技术股份有限公司 Hoff straight line detection result-based parking space line fitting method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003139519A (en) * 2001-11-05 2003-05-14 Nec Corp Electronic component inspection device and program
JP2007026255A (en) * 2005-07-20 2007-02-01 East Japan Railway Co Method for extracting progress of defective point inside image
JP2014146326A (en) * 2013-01-25 2014-08-14 Ricoh Co Ltd Detecting method and detecting system for multiple lane

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003139519A (en) * 2001-11-05 2003-05-14 Nec Corp Electronic component inspection device and program
JP2007026255A (en) * 2005-07-20 2007-02-01 East Japan Railway Co Method for extracting progress of defective point inside image
JP2014146326A (en) * 2013-01-25 2014-08-14 Ricoh Co Ltd Detecting method and detecting system for multiple lane

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
大寺 亮、堀内 隆彦: ""Hough空間を利用したFAX帳票の位置合わせと識別手法"", 画像電子学会誌, vol. 34, no. 3, JPN6020044157, 25 May 2005 (2005-05-25), JP, pages 202 - 209, ISSN: 0004388840 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792601A (en) * 2021-08-10 2021-12-14 武汉光庭信息技术股份有限公司 Hoff straight line detection result-based parking space line fitting method and system
CN113792601B (en) * 2021-08-10 2024-01-12 武汉光庭信息技术股份有限公司 Parking space line fitting method and system based on Hough straight line detection result

Also Published As

Publication number Publication date
JP6812731B2 (en) 2021-01-13

Similar Documents

Publication Publication Date Title
AU2017232186A1 (en) Fast and robust image alignment for burst mode
CN110136069B (en) Text image correction method and device and electronic equipment
CN109479082B (en) Image processing method and apparatus
US9245194B2 (en) Efficient line detection method
JP2011134012A (en) Image processor, image processing method for the same and program
CN114143519A (en) Method and device for automatically matching projection image with curtain area and projector
CN109191516B (en) Rotation correction method and device of structured light module and readable storage medium
US10074551B2 (en) Position detection apparatus, position detection method, information processing program, and storage medium
CN114723755B (en) Fillet defect detection method, device and equipment for glass screen and storage medium
JP6709950B2 (en) License plate recognition device, license plate recognition system, and license plate recognition method
CN110766615A (en) Picture correction method, device, terminal and computer readable storage medium
US11216905B2 (en) Automatic detection, counting, and measurement of lumber boards using a handheld device
CN110738604A (en) Canny operator and Hough transformation-based large-dip angle certificate image correction method and system
JP6812731B2 (en) Image processing device, image processing method, image processing program
CN109600598B (en) Image processing method, image processing device and computer readable recording medium
CN108304840B (en) Image data processing method and device
CN111445513A (en) Plant canopy volume obtaining method and device based on depth image, computer equipment and storage medium
JP7027043B2 (en) Information processing equipment, information processing methods and programs
CN107239776B (en) Method and apparatus for tilt image correction
CN115983304A (en) Two-dimensional code dynamic adjustment method and device, electronic equipment and storage medium
JP2019120693A (en) Method for detecting damage to exterior materials
EP4068151B1 (en) Linear processing method and apparatus in face image, terminal device, and storage medium
CN111142825B (en) Multi-screen visual field display method and system and electronic equipment
JP2018197692A (en) Damage state processing system
US20220198814A1 (en) Image dewarping with curved document boundaries

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190930

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201112

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201130

R150 Certificate of patent or registration of utility model

Ref document number: 6812731

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150