JP2770849B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP2770849B2
JP2770849B2 JP25330695A JP25330695A JP2770849B2 JP 2770849 B2 JP2770849 B2 JP 2770849B2 JP 25330695 A JP25330695 A JP 25330695A JP 25330695 A JP25330695 A JP 25330695A JP 2770849 B2 JP2770849 B2 JP 2770849B2
Authority
JP
Japan
Prior art keywords
image
line segment
straightness
coordinates
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP25330695A
Other languages
Japanese (ja)
Other versions
JPH0997331A (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.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP25330695A priority Critical patent/JP2770849B2/en
Publication of JPH0997331A publication Critical patent/JPH0997331A/en
Application granted granted Critical
Publication of JP2770849B2 publication Critical patent/JP2770849B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、スキャナやカメラ
から入力された画像を加工する画像処理装置に関し、特
に入力された画像から直線分図形を抽出する線分抽出処
理を行なう画像処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for processing an image input from a scanner or a camera, and more particularly to an image processing apparatus for performing a line segment extracting process for extracting a straight line figure from an input image.

【0002】[0002]

【従来の技術】入力された画像から線分を抽出する線分
抽出処理を行なう画像処理装置は、文書画像のレイアウ
ト解析、物体の判別や位置決め、さらには認識といっ
た、視覚情報処理の基本モジュールのひとつとして使用
されている。従来、この種の画像処理装置では、パタン
の中の直線成分を抽出するための処理として、ハフ変換
が用いられていた。例えば、1982年、コンピュータ
ビジョン123〜124頁(Computer Vis
ion,1982,pp.123−124)に示されて
いるように、従来の画像処理装置で直線成分を抽出する
ための処理として、線幅1の直線とパタンとの整合を取
り、その際に整合性の高い部分を直線成分として抽出し
ていた。
2. Description of the Related Art An image processing apparatus for performing a line segment extraction process for extracting a line segment from an input image is a basic module for visual information processing such as layout analysis of a document image, determination and positioning of an object, and recognition. Used as one. Conventionally, in this type of image processing apparatus, Hough transform has been used as processing for extracting a linear component in a pattern. For example, in 1982, Computer Vision Pages 123 to 124 (Computer Vis
ion, 1982, pp. As shown in 123-124), as a process for extracting a straight line component by a conventional image processing apparatus, a straight line having a line width of 1 is matched with a pattern, and a portion having high matching is determined at that time. It was extracted as a linear component.

【0003】従来技術の中で用いられるハフ変換につい
て説明する。ハフ変換は、画像走査部および投票箱と呼
ばれる記憶部からなる。画像中のある点を通りある傾き
をもつ直線は、投票箱のひとつと結びつけられている。
ただし異なる点を通る直線でも、傾きおよび切片が等し
ければ同じ投票箱に結びつけられているものとする。ま
ず、画像走査部が入力画像全面を順に走査してゆき、あ
る座標(i,j)の画素が値Iijを持っていたとする。
その際、画像走査部は座標(i,j)を通るすべての直
線に結びつけられている投票箱の値をそれぞれIijずつ
インクリメントする。画像全面の走査が終了した時点
で、すべての投票箱の値を調べて、所定より値の大きい
投票箱に対応する直線を、検出されるべき直線として選
ぶ。最終的に、直線と原画像の画素ごとの論理積を取れ
ば、画像から線分を抽出することができる。
[0003] The Hough transform used in the prior art will be described. The Hough transform includes an image scanning unit and a storage unit called a ballot box. A straight line that passes through a point in the image and has a certain slope is connected to one of the ballot boxes.
However, straight lines passing through different points are tied to the same ballot box if the slope and intercept are equal. First, it is assumed that the image scanning unit sequentially scans the entire input image, and a pixel at a certain coordinate (i, j) has a value I ij .
At that time, the image scanning unit increments coordinates (i, j) the value of the ballot box that is tied to all of the straight line passing through each respective I ij. When the scanning of the entire image is completed, the values of all the ballot boxes are checked, and a straight line corresponding to a ballot box having a value larger than a predetermined value is selected as a straight line to be detected. Finally, by taking the logical product of the straight line and the pixel of the original image for each pixel, a line segment can be extracted from the image.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、ハフ変
換による線分抽出では、厳密に直線と整合する図形でな
ければ直線として抽出できないという問題点があった。
図2は従来技術による線分抽出の問題点を表している。
この例のようにハフ変換では、図2(a)に示すよう
に、大局的に見て比較的にまっすぐな線図形であっても
少しでもわん曲があれば、図2(c)に示すように、端
点が正確に抽出されない、あるいは図2(b)に示すよ
うに、もともと単一の線分であったものが、図2(d)
に示すように、複数部分に分離されてしまうことがあ
る、などの問題点があった。さらには、パタン中に図形
がまばらに存在するようなケースでは、画像全面を走査
するハフ変換は処理量の面で無駄が多いという点も問題
であった。したがって、多少のわん曲があるような線図
形であっても、正確に端点を抽出でき、連結な図形を連
結なまま取り出すことのできる線分抽出の手段が必要と
されていた。
However, in the line segment extraction by the Hough transform, there is a problem that a line cannot be extracted as a straight line unless the figure exactly matches the straight line.
FIG. 2 shows a problem of line segment extraction according to the prior art.
In the Hough transform as in this example, as shown in FIG. 2 (a), if there is any curvature even if it is a relatively straight line figure in the whole, it is shown in FIG. 2 (c). As shown in FIG. 2B, the end points are not accurately extracted, or as shown in FIG.
As shown in FIG. 1, there is a problem that it may be separated into a plurality of parts. Further, in the case where figures are sparsely present in the pattern, the Hough transform for scanning the entire image is wasteful in terms of processing amount. Therefore, there has been a need for a line segment extracting means capable of accurately extracting an end point of a line graphic having some curvature and extracting a connected graphic without connecting it.

【0005】そこで、本発明の目的は、複数個の図形パ
タンの中から直線分図形を、その端点を正確に検出しつ
つ、かつ連結性を損なわずに高速抽出する線分抽出装置
を提供することである。例えば、図3(a)に示すよう
な大局的に見て比較的にまっすぐな線図形であれば少し
ぐらいわん曲があっても、図3(c)に示すように、端
点を正確に抽出でき、あるいは図3(b)に示すよう
に、もともと単一の線分であったものは、図3(d)に
示すように、単一の線分として抽出できる、すなわち、
フレキシブルな線分抽出を実現することである。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a line segment extraction apparatus for extracting a straight line figure from a plurality of figure patterns at a high speed while accurately detecting an end point thereof and without losing connectivity. That is. For example, in the case of a line figure which is relatively straight when viewed globally as shown in FIG. 3 (a), even if there is a slight curve, the end points are accurately extracted as shown in FIG. 3 (c). 3B, or what was originally a single line segment as shown in FIG. 3B can be extracted as a single line segment as shown in FIG.
The purpose is to realize flexible line segment extraction.

【0006】[0006]

【課題を解決するための手段】上述した課題を解決する
ため、本発明による画像処理装置は、入力画像を格納す
る画像記憶手段と、該画像記憶手段から取り出した画像
から、同一連結成分からなる任意形状の図形を抽出する
ラベリング手段と、該ラベリング手段が抽出した各々の
図形を構成する画素集合の平均値及び分散を計算する統
計量計算手段と、前記各図形を最小自乗法で直線近似し
て線分を当てはめたときの当該線分の両端点として、前
記各図形の両端点を検出する端点検出手段と、前記各図
形が2値画像で構成されている場合及び多値画像で構成
されている場合の少なくとも一方を処理対象とし、前記
2値画像で構成されている場合には前記各図形を構成す
る画素の集合の座標の相関係数と画素数とに基づいて、
一方、前記多値画像で構成されている場合には前記相関
係数と前記各画素の濃度レベルの総和とに基づいて、線
分らしさを示す真直度を計算する真直度評価手段と、前
記各図形に係る前記両端点の座標と真直度とにより、線
分図形を選び出す線分選択手段とを備える。
In order to solve the above-mentioned problems, an image processing apparatus according to the present invention comprises an image storage means for storing an input image and the same connected component from an image taken out of the image storage means. A labeling unit for extracting a figure of an arbitrary shape; a statistic calculation unit for calculating an average value and a variance of a set of pixels constituting each figure extracted by the labeling unit; and a linear approximation of each figure by a least square method. End point detecting means for detecting both end points of each figure as both end points of the line segment when the line segment is applied, and a case where each figure is formed of a binary image and a multi-valued image. If at least one of the cases is to be processed, and if constituted by the binary image, based on the correlation coefficient and the number of pixels of the coordinates of the set of pixels constituting each figure,
On the other hand, in the case of being constituted by the multi-valued image, based on the correlation coefficient and the sum of the density levels of the respective pixels, straightness evaluation means for calculating straightness indicating the likelihood of a line segment; A line segment selecting means for selecting a line segment figure based on the coordinates of the both ends and the straightness of the figure;

【0007】本発明による画像処理装置では、はじめに
パタン中の同一連結成分からなる任意形状の図形成分を
抽出する。次に、各図形を構成する画素集合の座標値の
相関係数および画素数の大きさあるいは画素の濃度レベ
ルの図形全体的な高さによって、その図形の真直度(ど
れほど線分らしいか)を見積もり、直線的な図形成分を
選んで出力する。また、図形を最小自乗法により線分近
似して、その両端点を求めるため、各図形の連結性を完
全に保ち、かつ端点の位置を正確に取り出す線分抽出が
可能となる。
[0007] In the image processing apparatus according to the present invention, first, an arbitrary shape graphic component composed of the same connected component in the pattern is extracted. Next, the straightness (how likely a line segment is) of the figure is determined by the correlation coefficient of the coordinate value of the pixel set constituting the figure and the size of the number of pixels or the overall height of the figure at the pixel density level. Estimate and select and output linear graphic components. Further, since the figure is approximated by a line segment by the method of least squares and its both end points are obtained, it is possible to extract the line segment that completely maintains the connectivity of each figure and accurately extracts the position of the end point.

【0008】[0008]

【発明の実施の形態】以下、本発明の実施例に係る画像
処理装置について図面を参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.

【0009】図1は、本発明の一実施例を示すブロック
図である。この実施例は、入力された2値画像を格納す
るための画像記憶手段11と、入力された画像から任意
形状の図形を抽出するラベリング手段12と、抽出した
図形の輪郭点の座標を格納する図形記憶手段13と、図
形の輪郭点の座標から、図形を構成する画素集合の平均
値および分散といった統計量を計算する統計量計算手段
14と、統計量と図形の輪郭点により、図形を最小自乗
法により線分近似したときの端点座標を求める端点検出
手段15と、統計量から図形を構成する画素集合の相関
係数を計算し、その図形の真直度を評価する真直度評価
手段16と、端点検出手段15および真直度評価手段1
6の出力を統合して、線分のみを選んで出力する線分選
択手段17から構成される。画像記憶手段11は、図示
されない画像入力手段(スキャナやカメラなど)および
入力された画像を格納する記憶手段から構成されてい
る。
FIG. 1 is a block diagram showing one embodiment of the present invention. In this embodiment, an image storage unit 11 for storing an input binary image, a labeling unit 12 for extracting a graphic having an arbitrary shape from the input image, and the coordinates of contour points of the extracted graphic are stored. A figure storage means 13, a statistic calculation means 14 for calculating statistics such as an average value and a variance of a set of pixels constituting the figure from the coordinates of the figure outline points, and a statistic and the outline points of the figure to minimize the figure. An end point detecting means 15 for obtaining end point coordinates when a line segment is approximated by a square method; a straightness evaluation means 16 for calculating a correlation coefficient of a set of pixels constituting a figure from statistics and evaluating the straightness of the figure; , Endpoint detection means 15 and straightness evaluation means 1
6 is composed of a line segment selecting means 17 for integrating the outputs of FIG. The image storage unit 11 includes an image input unit (such as a scanner or a camera) (not shown) and a storage unit that stores the input image.

【0010】さて、図1、図4、図5、図6および図7
を参照して、本実施例の動作について説明する。画像記
憶手段11に2値の入力画像が格納されると、ラベリン
グ手段12は画像中に存在する各々の図形に、輪郭追跡
などによってラベルづけを行なう。ラベリング手段12
はさらに、各々の図形の形状に関する情報、例えば輪郭
点の座標(x1 ,y1 ),(x2 ,y2 ),…,
(xn ,yn )を図形記憶手段13に格納する。ここに
nは輪郭点の個数を表す。統計量計算手段14では、図
形記憶手段13に格納された輪郭点の座標から、輪郭点
の重心座標mx ,myおよび輪郭点の分散と共分散
σx ,σy ,σxyを算出し、端点記憶手段15および真
直度評価手段16に送る。ここに重心座標とは輪郭点の
座標値の平均を意味し、重心、分散および共分散は下記
数1式によって求める。
Now, FIGS. 1, 4, 5, 6, and 7 will be described.
The operation of this embodiment will be described with reference to FIG. When the binary input image is stored in the image storage unit 11, the labeling unit 12 labels each figure present in the image by contour tracing or the like. Labeling means 12
Further includes information on the shape of each figure, for example, coordinates (x 1 , y 1 ), (x 2 , y 2 ),.
(X n , y n ) is stored in the figure storage means 13. Here, n represents the number of contour points. In statistic calculation unit 14, from been contour point coordinates stored in the graphic storing means 13 calculates center coordinates m x of the contour points, m y and contour points variances and covariances σ x, σ y, σ the xy Are sent to the end point storage means 15 and the straightness evaluation means 16. Here, the barycentric coordinates mean the average of the coordinate values of the contour points, and the barycenter, variance, and covariance are obtained by the following equation (1).

【0011】[0011]

【数1】 端点検出手段15では、図4に示すような最小自乗法に
よる近似直線20の方向ベクトル(σx ,σxy)あるい
は(σxy,σy )と、各々の輪郭点座標の位置ベクトル
(xi ,yi )との内積を計算して、図5に示すよう
に、内積の最大値と最小値に対応する輪郭点の座標2
2、23を求め、これらを線分近似した場合の両端点と
して線分選択手段17へ送る。尚、図5において、21
は図4に示した近似直線20に対応する線を示す。
(Equation 1) In the end point detecting means 15, the direction vector (σ x , xy ) or (σ xy , σ y ) of the approximate straight line 20 by the least square method as shown in FIG. 4 and the position vector (x i ) of each contour point coordinate , Y i ) is calculated, and as shown in FIG. 5, the coordinates 2 of the contour point corresponding to the maximum value and the minimum value of the inner product are calculated.
2 and 23 are obtained, and sent to the line segment selecting means 17 as both end points when the line segments are approximated. Incidentally, in FIG.
Indicates a line corresponding to the approximate straight line 20 shown in FIG.

【0012】一方、真直度評価手段16では、分散と共
分散を用いて輪郭点座標値の相関係数σxy 2 /σx σy
を計算する。さらに相関係数と輪郭点の個数によって、
図形の真直度nσxy 2 /σx σy を算出する。真直度
は、図6に示すように図形の直線性が高いときに高い値
を取り、また図7に示すように図形の直線性が低いとき
に低い値を取る。尚、図6及び図7において、24及び
25は図形の直線性の高低を測る基準となる仮想的な直
線を示している。
On the other hand, the straightness evaluation means 16 uses the variance and covariance to calculate the correlation coefficient σ xy 2 / σ x σ y of the coordinate values of the contour points.
Is calculated. Furthermore, by the correlation coefficient and the number of contour points,
The straightness nσ xy 2 / σ x σ y of the figure is calculated. The straightness takes a high value when the linearity of the graphic is high as shown in FIG. 6, and a low value when the linearity of the graphic is low as shown in FIG. In FIGS. 6 and 7, reference numerals 24 and 25 denote virtual straight lines that serve as references for measuring the degree of linearity of the figure.

【0013】真直度評価手段16は、各々の図形につい
ての真直度を線分選択手段17へ送る。線分選択手段1
7では、図形端点座標および図形真直度を受け取り、以
下のような処理を行なって線分情報を出力する。すなわ
ち、各々の図形について、その真直度が所定値よりも大
きければ、その図形は線分であるとして、対応する端点
座標を線分情報として出力する。両端点の座標が与えら
れれば、線分は一意に決定される。一方、真直度が所定
値よりも大きくなければ、その図形は線分ではないとみ
なして端点座標を棄却する。結果として、複数個の図形
から、直線分図形が選択されて、線分として出力され
る。
The straightness evaluation means 16 sends the straightness of each figure to the line segment selection means 17. Line segment selection means 1
In step 7, the coordinates of the figure end point and the straightness of the figure are received, and the following processing is performed to output line segment information. That is, if the straightness of each figure is greater than a predetermined value, the figure is determined to be a line segment, and the corresponding end point coordinates are output as line segment information. Given the coordinates of both end points, a line segment is uniquely determined. On the other hand, if the straightness is not larger than the predetermined value, the figure is regarded as not a line segment and the end point coordinates are rejected. As a result, a straight line segment figure is selected from the plurality of figures and output as a line segment.

【0014】多値画像からの線分抽出に関して、本発明
の他の実施例を説明する。この実施例のブロック図は、
同じく図1のように表される。入力された多値画像を格
納するための画像記憶手段11と、入力された画像から
任意形状の多値図形を抽出するラベリング手段12と、
抽出した多値図形に含まれる画素の濃度レベルおよび座
標値を格納する図形記憶手段13と、図形に含まれる画
素の濃度レベルおよび座標値から、図形の重心および分
散といった統計量を計算する統計量計算手段14と、前
記統計量と図形に含まれる画素の濃度レベルおよび座標
値より、図形を最小自乗法により線分近似したときの端
点座標を求める端点検出手段15と、前記統計量から図
形を構成する画素集合の座標値の相関係数を計算し、さ
らに相関係数と画素ごとの濃度レベルにより、その図形
の真直度を評価する真直度評価手段16と、端点検出手
段15および真直度評価手段16の出力を統合して、線
分のみを選んで出力する線分選択手段17から構成され
る。
Another embodiment of the present invention will be described with respect to line segment extraction from a multivalued image. The block diagram of this embodiment is:
Similarly, it is represented as shown in FIG. An image storage unit 11 for storing an input multi-valued image, a labeling unit 12 for extracting a multi-valued figure of an arbitrary shape from the input image,
A figure storage unit 13 for storing density levels and coordinate values of pixels included in the extracted multi-valued figure, and a statistic for calculating statistics such as the center of gravity and variance of the figure from the density levels and coordinate values of the pixels included in the figure. Calculating means 14; end point detecting means 15 for obtaining end point coordinates when the figure is approximated by a line segment from the statistic and the density levels and coordinate values of pixels included in the figure; Calculating a correlation coefficient of the coordinate values of the constituent pixel sets, and further evaluating straightness of the figure based on the correlation coefficient and the density level of each pixel; an end point detecting means 15; It comprises a line segment selecting unit 17 for integrating the outputs of the unit 16 and selecting and outputting only line segments.

【0015】本実施例の動作について説明する。画像記
憶手段11に多値の入力画像が格納されると、ラベリン
グ手段12は画像中に存在する各々の図形に、ラスタス
キャンなどによってラベルづけを行なう。ラベリング手
段12はさらに、各々の図形の形状および濃度レベルに
関する情報、例えば図形中の各々の画素の座標値および
画素値のセット(x1 ,y1 ,I1 ),(x2 ,y2
2 ),…,(xn ,yn ,In )を図形記憶手段13
に格納する。統計量計算手段14では、図形記憶手段1
3に格納された各画素の座標から、図形の重心座標
x ,my および図形の分散と共分散σx ,σy ,σxy
を算出し、端点記憶手段15および真直度評価手段16
に送る。ここに重心とは画素の座標値の平均を意味し、
重心、分散および共分散は下記数2式のように、画素の
濃度レベルに応じた重みを考慮して計算する。
The operation of the embodiment will be described. When a multi-valued input image is stored in the image storage unit 11, the labeling unit 12 labels each figure present in the image by raster scanning or the like. The labeling means 12 further provides information on the shape and density level of each figure, for example, a set of coordinates and pixel values (x 1 , y 1 , I 1 ), (x 2 , y 2 ,
I 2 ),..., (X n , y n , I n )
To be stored. In the statistic calculation means 14, the figure storage means 1
From the coordinates of each pixel stored in the 3, the center coordinates of the graphic m x, m y and shapes variances and covariances σ x, σ y, σ xy
And the end point storage means 15 and the straightness evaluation means 16
Send to Here, the center of gravity means the average of the coordinate values of the pixels,
The center of gravity, the variance, and the covariance are calculated in consideration of the weight according to the density level of the pixel as in the following equation (2).

【0016】[0016]

【数2】 端点検出手段15では、図4に示すような最小自乗法に
よる近似直線20の方向ベクトル(σx ,σxy)あるい
は(σxy,σy )と、図形中の各々の点の座標の位置ベ
クトル(xi ,yi )との内積を計算して、内積の最大
値と最小値に対応する点の座標22、23を図5のよう
に求め、それらを図形の近似的両端点として線分選択手
段17へ送る。一方、真直度評価手段16では、統計量
を用いて図形を構成する画素集合の座標値の相関関数n
σxy 2 /σx σy を計算し、さらに各々の画素の濃度レ
ベルを用いて、図形の真直度(I1 +I2 +…+In
・σxy 2 /σx σy を算出する。真直度は、図6に示す
ように図形の直線性が高いときに大きい値を取り、また
図7に示すように図形の直線性が低いときに小さい値を
取る。各々の図形についての真直度を線分選択手段17
へ送る。線分選択手段17では、図形端点座標および図
形真直度を受け取り、各々の図形について、その真直度
が所定値よりも大きければ、その図形は線分であるとし
て、端点検出手段15において求めた、対応する両端点
座標を線分情報として出力する。両端点の座標が与えら
れれば、線分は一意に決定される。一方、真直度が所定
値よりも小さければ、その図形は線分ではないとして端
点座標を棄却する。結果として、複数個の図形から、直
線分が残されて出力される。
(Equation 2) In the end point detecting means 15, the direction vector (σ x , xy ) or (σ xy , σ y ) of the approximate straight line 20 by the least square method as shown in FIG. 4 and the position vector of the coordinates of each point in the figure The inner product of (x i , y i ) is calculated, and the coordinates 22 and 23 of the points corresponding to the maximum value and the minimum value of the inner product are obtained as shown in FIG. Send to selection means 17. On the other hand, the straightness evaluation means 16 uses the statistical function to calculate the correlation function n of the coordinate values of the set of pixels constituting the figure.
σ xy 2 / σ x σ y is calculated, and the straightness of the figure (I 1 + I 2 +... + I n ) is calculated using the density level of each pixel.
Calculate σ xy 2 / σ x σ y . The straightness takes a large value when the linearity of the figure is high as shown in FIG. 6, and takes a small value when the linearity of the figure is low as shown in FIG. The straightness of each figure is determined by the line segment selecting means 17.
Send to The line segment selecting means 17 receives the graphic end point coordinates and the graphic straightness, and for each graphic, if the straightness is greater than a predetermined value, determines that the graphic is a line segment and obtains the graphic by the end point detecting means 15. The corresponding end point coordinates are output as line segment information. Given the coordinates of both end points, a line segment is uniquely determined. On the other hand, if the straightness is smaller than the predetermined value, the figure is not a line segment and the end point coordinates are rejected. As a result, a straight line segment is output from the plurality of figures.

【0017】[0017]

【発明の効果】以上説明したように、本発明による画像
処理装置は、画像中の個々の図形について直線分かどう
かの判定を下すための、ラベリング手段、端点検出手段
および真直度評価手段を備えたことにより、図形の連結
性を保ち、かつ端点を正確に検出して、線分図形を他の
図形から分離して抽出する機能が実現できる。また、端
点検出手段において、近似線分の方向ベクトルと図形中
の点の位置ベクトルの内積という、簡単に計算できる量
を評価値として使用することにより、高速な処理を実現
している。
As described above, the image processing apparatus according to the present invention is provided with the labeling means, the end point detecting means, and the straightness evaluation means for determining whether each figure in the image is a straight line. As a result, it is possible to realize a function of maintaining the connectivity of the figures, accurately detecting the end points, and separating and extracting the line figure from other figures. Further, the end point detecting means uses an easily calculated amount, which is an inner product of the direction vector of the approximate line segment and the position vector of a point in the figure, as an evaluation value, thereby realizing high-speed processing.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例に係る画像処理装置の機能的
な構成を表したブロック図である。
FIG. 1 is a block diagram illustrating a functional configuration of an image processing apparatus according to an embodiment of the present invention.

【図2】従来技術の問題点を示す図であり、(a)は大
局的に見て比較的にまっすぐであるが少しわん曲がある
線図形、(b)はもともと単一の線分であるが不規則な
わん曲が連続する線図形、(c)は(a)の線図形の端
点が正確に抽出されない状態、(d)は(b)の線図形
が複数部分に分離されてしまう状態を示す。
FIGS. 2A and 2B are diagrams showing the problems of the prior art, in which FIG. 2A is a line figure which is relatively straight but slightly curved when viewed globally, and FIG. There is a line figure having irregular but continuous curves, (c) shows a state in which the end points of the line figure in (a) are not accurately extracted, and (d) shows a state in which the line figure in (b) is separated into a plurality of parts. Indicates the status.

【図3】本発明による課題解決例を示す図であり、
(a)は大局的に見て比較的にまっすぐであるが少しわ
ん曲がある線図形、(b)はもともと単一の線分である
が不規則なわん曲が連続する線図形、(c)は(a)の
線図形の端点が正確に抽出された状態、(d)は(b)
の線図形を単一の線分として抽出できた状態を示す。
FIG. 3 is a diagram showing a problem solving example according to the present invention;
(A) is a line figure that is relatively straight but has a slight curvature when viewed globally, (b) is a line figure that is originally a single line segment but has irregular curvatures continuing, (c) ) Shows a state in which the end points of the line figure in (a) are correctly extracted, and (d) shows a state in (b).
Shows a state in which the line figure was extracted as a single line segment.

【図4】図1に示した実施例における最小自乗法による
直線近似例を示す図である。
FIG. 4 is a diagram showing an example of a straight line approximation by the least square method in the embodiment shown in FIG. 1;

【図5】図1に示した実施例における図形の端点検出例
を示す図である。
FIG. 5 is a diagram showing an example of detecting an end point of a graphic in the embodiment shown in FIG. 1;

【図6】図1に示した実施例における真直度(線分らし
さ)の高い図形の例を示す図である。
FIG. 6 is a diagram showing an example of a graphic having a high straightness (likelihood of a line segment) in the embodiment shown in FIG. 1;

【図7】図1に示した実施例における真直度(線分らし
さ)の低い図形の例を示す図である。
FIG. 7 is a diagram showing an example of a graphic with low straightness (likelihood of a line segment) in the embodiment shown in FIG. 1;

【符号の説明】[Explanation of symbols]

11 画像記憶手段 12 ラベリング手段 13 図形記憶手段 14 統計量計算手段 15 端点検出手段 16 真直度評価手段 17 線分選択手段 DESCRIPTION OF SYMBOLS 11 Image storage means 12 Labeling means 13 Graphic storage means 14 Statistical amount calculation means 15 Endpoint detection means 16 Straightness evaluation means 17 Line segment selection means

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力画像を格納する画像記憶手段と、 該画像記憶手段から取り出した画像から、同一連結成分
からなる任意形状の図形を抽出するラベリング手段と、 該ラベリング手段が抽出した各々の図形を構成する画素
集合の平均値及び分散を計算する統計量計算手段と、 前記各図形を最小自乗法で直線近似して線分を当てはめ
たときの当該線分の両端点として、前記各図形の両端点
を検出する端点検出手段と、 前記各図形が2値画像で構成されている場合及び多値画
像で構成されている場合の少なくとも一方を処理対象と
し、前記2値画像で構成されている場合には前記各図形
を構成する画素の集合の座標の相関係数と画素数とに基
づいて、一方、前記多値画像で構成されている場合には
前記相関係数と前記各画素の濃度レベルの総和とに基づ
いて、線分らしさを示す真直度を計算する真直度評価手
段と、 前記各図形に係る前記両端点の座標と真直度とにより、
線分図形を選び出す線分選択手段とを有することを特徴
とする画像処理装置。
1. An image storage unit for storing an input image, a labeling unit for extracting a figure of an arbitrary shape composed of the same connected component from an image extracted from the image storage unit, and each figure extracted by the labeling unit A statistic calculation means for calculating an average value and a variance of a pixel set constituting the above, and as the both end points of the line segment when the line segment is applied by linear approximation by the least squares method, An end point detecting means for detecting both end points, and at least one of a case where each figure is constituted by a binary image and a case where each figure is constituted by a multi-valued image, and constituted by the binary image In the case, based on the correlation coefficient of the coordinates of the set of pixels constituting each figure and the number of pixels, on the other hand, when composed of the multi-valued image, the correlation coefficient and the density of each pixel Sum of levels Based on the straightness evaluation means for calculating a straightness indicating a line segment likeness, the by the coordinates and straightness of the end points of the respective graphics to,
An image processing apparatus comprising: a line segment selecting unit that selects a line segment figure.
【請求項2】 前記統計量計算手段が、前記図形を構成
する画素集合の平均及び分散といった統計量を計算する
際に、前記画素の濃度レベルによる重み付けをして、前
記統計量を計算することを特徴とする請求項1記載の画
像処理装置。
2. The statistic calculating means calculates the statistic by performing weighting based on a density level of the pixel when calculating a statistic such as an average and a variance of a set of pixels constituting the figure. The image processing apparatus according to claim 1, wherein:
【請求項3】 前記端点検出手段において、前記近似直
線の方向ベクトルを算出し、当該方向ベクトルと前記図
形を構成する各々の点の位置ベクトルとの内積を評価値
として、当該評価値の最大値と最小値を求め、それらに
対応する図形上の点を前記図形の両端点として出力する
ことを特徴とする請求項1記載の画像処理装置。
3. The end point detecting means calculates a direction vector of the approximate straight line, and sets an inner product of the direction vector and a position vector of each point constituting the figure as an evaluation value, and sets a maximum value of the evaluation value as an evaluation value. 2. The image processing apparatus according to claim 1, wherein a minimum value and a minimum value are obtained, and points on the graphic corresponding to the calculated values are output as both end points of the graphic.
JP25330695A 1995-09-29 1995-09-29 Image processing device Expired - Fee Related JP2770849B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25330695A JP2770849B2 (en) 1995-09-29 1995-09-29 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25330695A JP2770849B2 (en) 1995-09-29 1995-09-29 Image processing device

Publications (2)

Publication Number Publication Date
JPH0997331A JPH0997331A (en) 1997-04-08
JP2770849B2 true JP2770849B2 (en) 1998-07-02

Family

ID=17249462

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25330695A Expired - Fee Related JP2770849B2 (en) 1995-09-29 1995-09-29 Image processing device

Country Status (1)

Country Link
JP (1) JP2770849B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1305008C (en) * 2003-12-22 2007-03-14 中国科学院自动化研究所 Automatic dividing method for cerebral ischemia focus area
JP5922520B2 (en) * 2012-07-23 2016-05-24 富士フイルム株式会社 Straightness measuring device and straightness measuring method
CN112964173A (en) * 2020-12-31 2021-06-15 四川和心亿科技有限公司 Structural member quality detection method
CN113724313B (en) * 2021-09-01 2024-05-28 河北工业大学 Depth image straight line segment identification and extraction method based on correlation analysis

Also Published As

Publication number Publication date
JPH0997331A (en) 1997-04-08

Similar Documents

Publication Publication Date Title
US5081689A (en) Apparatus and method for extracting edges and lines
US8401342B2 (en) System and method to match images using topologically equivalent correspondences
US6516087B1 (en) Method for real time correlation of stereo images
US8320682B2 (en) Evaluation of edge direction information
EP1693783A1 (en) Fast method of object detection by statistical template matching
JP4894741B2 (en) Information processing apparatus, information processing method, program, and recording medium
US8340433B2 (en) Image processing apparatus, electronic medium, and image processing method
US7231087B2 (en) Matching binary templates against range map derived silhouettes for object pose estimation
US7928978B2 (en) Method for generating multi-resolution three-dimensional model
JPH0823890B2 (en) Method and apparatus for automatically verifying signature
CN104463066B (en) Method for rapidly positioning and recognizing one-dimensional barcode of outer commodity package
US20030107653A1 (en) Method and apparatus for object recognition
CN108960267A (en) System and method for model adjustment
Chen et al. Perfecting vectorized mechanical drawings
CN110832542A (en) Recognition processing device, recognition processing method, and program
KR101725501B1 (en) Method and apparatus for recognizing character
US20100021058A1 (en) Method and Apparatus for Image Processing
JP2770849B2 (en) Image processing device
JP2002133413A (en) Method and device for identifying three-dimensional object using image processing
US7440636B2 (en) Method and apparatus for image processing
Bourja et al. Speed estimation using simple line
CN116420176A (en) Method and apparatus for distinguishing between different configuration states of an object based on an image representation of the object
JP2858530B2 (en) Edge enhancement device
CN111931791B (en) Method for realizing image turnover invariance
JP3388918B2 (en) String reader

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980318

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080417

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090417

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100417

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110417

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 14

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 14

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130417

Year of fee payment: 15

LAPS Cancellation because of no payment of annual fees