JPH0997331A - Image processor - Google Patents
Image processorInfo
- Publication number
- JPH0997331A JPH0997331A JP25330695A JP25330695A JPH0997331A JP H0997331 A JPH0997331 A JP H0997331A JP 25330695 A JP25330695 A JP 25330695A JP 25330695 A JP25330695 A JP 25330695A JP H0997331 A JPH0997331 A JP H0997331A
- Authority
- JP
- Japan
- Prior art keywords
- graphic
- line segment
- image
- straightness
- image processing
- 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
Links
- 238000002372 labelling Methods 0.000 claims abstract description 13
- 238000000034 method Methods 0.000 claims abstract description 11
- 238000011156 evaluation Methods 0.000 claims description 13
- 238000000605 extraction Methods 0.000 abstract description 7
- 230000005484 gravity Effects 0.000 abstract description 5
- 239000000284 extract Substances 0.000 abstract 2
- 239000006185 dispersion Substances 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 9
- 238000001514 detection method Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 4
- 230000001788 irregular Effects 0.000 description 2
- 238000005452 bending Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000005314 correlation function Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Complex Calculations (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【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 line segment extraction processing for extracting a straight line segment pattern 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 line segment extraction processing for extracting line segments from an input image is a basic module for visual information processing such as layout analysis of document images, discrimination and positioning of objects, and recognition. It is used as one. Conventionally, in this type of image processing apparatus, the Hough transform has been used as a process for extracting a linear component in a pattern. For example, in 1982, Computer Vision, pp. 123-124 (Computer Vis.
Ion, 1982, pp. 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 at that time, a portion having a high consistency is detected. It was extracted as a linear component.
【0003】従来技術の中で用いられるハフ変換につい
て説明する。ハフ変換は、画像走査部および投票箱と呼
ばれる記憶部からなる。画像中のある点を通りある傾き
をもつ直線は、投票箱のひとつと結びつけられている。
ただし異なる点を通る直線でも、傾きおよび切片が等し
ければ同じ投票箱に結びつけられているものとする。ま
ず、画像走査部が入力画像全面を順に走査してゆき、あ
る座標(i,j)の画素が値Iijを持っていたとする。
その際、画像走査部は座標(i,j)を通るすべての直
線に結びつけられている投票箱の値をそれぞれIijずつ
インクリメントする。画像全面の走査が終了した時点
で、すべての投票箱の値を調べて、所定より値の大きい
投票箱に対応する直線を、検出されるべき直線として選
ぶ。最終的に、直線と原画像の画素ごとの論理積を取れ
ば、画像から線分を抽出することができる。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 passing through a point in the image and having a slope is associated with one of the ballot boxes.
However, even straight lines that pass through different points shall be linked 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 the pixel at a certain coordinate (i, j) has the value I ij .
At that time, the image scanning unit increments the values of the voting boxes associated with all the straight lines passing through the coordinates (i, j) by I ij . When the scanning of the entire surface of the image is completed, the values of all the voting boxes are examined, and the straight line corresponding to the voting box having a value larger than the predetermined value is selected as the straight line to be detected. Finally, if the logical product of each pixel of the straight line and the original image is taken, the line segment can be extracted from the image.
【0004】[0004]
【発明が解決しようとする課題】しかしながら、ハフ変
換による線分抽出では、厳密に直線と整合する図形でな
ければ直線として抽出できないという問題点があった。
図2は従来技術による線分抽出の問題点を表している。
この例のようにハフ変換では、図2(a)に示すよう
に、大局的に見て比較的にまっすぐな線図形であっても
少しでもわん曲があれば、図2(c)に示すように、端
点が正確に抽出されない、あるいは図2(b)に示すよ
うに、もともと単一の線分であったものが、図2(d)
に示すように、複数部分に分離されてしまうことがあ
る、などの問題点があった。さらには、パタン中に図形
がまばらに存在するようなケースでは、画像全面を走査
するハフ変換は処理量の面で無駄が多いという点も問題
であった。したがって、多少のわん曲があるような線図
形であっても、正確に端点を抽出でき、連結な図形を連
結なまま取り出すことのできる線分抽出の手段が必要と
されていた。However, the line segment extraction by the Hough transform has a problem that it cannot be extracted as a straight line unless it is a figure that exactly matches the straight line.
FIG. 2 illustrates the problem of line segment extraction according to the conventional technique.
In the Hough transform as in this example, as shown in FIG. 2 (a), if there is a slight bending even if the line figure is relatively straight as a whole, it is shown in FIG. 2 (c). Thus, the end points are not accurately extracted, or, as shown in FIG. 2B, what was originally a single line segment is
As shown in, there is a problem that it may be separated into a plurality of parts. Further, in the case where the patterns are scattered in the pattern, there is a problem in that 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 end points even in a line figure having some curvature and extracting connected figures in a connected state.
【0005】そこで、本発明の目的は、複数個の図形パ
タンの中から直線分図形を、その端点を正確に検出しつ
つ、かつ連結性を損なわずに高速抽出する線分抽出装置
を提供することである。例えば、図3(a)に示すよう
な大局的に見て比較的にまっすぐな線図形であれば少し
ぐらいわん曲があっても、図3(c)に示すように、端
点を正確に抽出でき、あるいは図3(b)に示すよう
に、もともと単一の線分であったものは、図3(d)に
示すように、単一の線分として抽出できる、すなわち、
フレキシブルな線分抽出を実現することである。Therefore, an object of the present invention is to provide a line segment extracting device for extracting straight line segments from a plurality of pattern patterns at high speed while accurately detecting the end points thereof and without impairing the connectivity. That is. For example, as shown in FIG. 3 (a), even if the line figure is relatively straight as seen from a global perspective, even if it is slightly curved, the end points are accurately extracted as shown in FIG. 3 (c). Alternatively, as shown in FIG. 3B, what is originally a single line segment can be extracted as a single line segment as shown in FIG. 3D, that is,
It is to realize flexible line segment extraction.
【0006】[0006]
【課題を解決するための手段】上述した課題を解決する
ため、本発明による画像処理装置は、入力画像を格納す
る画像記憶手段と、画像記憶手段から取り出した画像か
ら、同一連結成分からなる任意形状の図形を抽出するラ
ベリング手段と、ラベリング手段が抽出した各々の図形
を構成する画素集合の平均値および分散を計算する統計
量計算手段と、図形を最小自乗法で直線近似したときの
図形の両端点を検出する端点検出手段と、図形を構成す
る画素集合の座標の相関係数と画素数および濃度レベル
を計算する真直度評価手段と、図形の端点座標と真直度
により、線分図形を選び出す線分選択手段とを備える。In order to solve the above-mentioned problems, the image processing apparatus according to the present invention comprises an image storage means for storing an input image and an image which is extracted from the image storage means and which has the same connected component. A labeling means for extracting a figure of a shape, a statistic calculating means for calculating an average value and a variance of a pixel set constituting each figure extracted by the labeling means, and a figure when the figure is linearly approximated by the least square method. End point detection means for detecting both end points, straightness evaluation means for calculating the correlation coefficient of the coordinates of the pixel set forming the figure, the number of pixels and the density level, and the line segment figure by the end point coordinates and straightness of the figure And a line segment selecting means for selecting.
【0007】本発明による画像処理装置では、はじめに
パタン中の同一連結成分からなる任意形状の図形成分を
抽出する。次に、各図形を構成する画素集合の座標値の
相関係数および画素数の大きさあるいは画素の濃度レベ
ルの図形全体的な高さによって、その図形の真直度(ど
れほど線分らしいか)を見積もり、直線的な図形成分を
選んで出力する。また、図形を最小自乗法により線分近
似して、その両端点を求めるため、各図形の連結性を完
全に保ち、かつ端点の位置を正確に取り出す線分抽出が
可能となる。In the image processing apparatus according to the present invention, first, a graphic component of an arbitrary shape consisting of the same connected components in a pattern is extracted. Next, the straightness (how much it seems to be a line segment) of the figure is determined by the correlation coefficient of the coordinate value of the pixel set forming each figure and the size of the number of pixels or the overall height of the figure of the pixel density level. Estimate and select linear figure components and output. Also, since the figure is approximated to a line segment by the method of least squares and the end points thereof are obtained, it is possible to maintain the connectivity of each figure completely and to extract the line segment in which the positions of the end points are accurately extracted.
【0008】[0008]
【発明の実施の形態】以下、本発明の実施例に係る画像
処理装置について図面を参照して説明する。DETAILED DESCRIPTION OF THE INVENTION An image processing apparatus according to an embodiment of the present invention will be described below 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 means 11 for storing an input binary image, a labeling means 12 for extracting a graphic of an arbitrary shape from the input image, and a coordinate of a contour point of the extracted graphic are stored. The figure storage means 13 and the statistic amount calculation means 14 for calculating a statistic amount such as the average value and variance of the pixel set forming the figure from the coordinates of the contour points of the figure, and the figure and the contour point of the figure minimize the figure. An end point detecting means 15 for obtaining end point coordinates when the line segment is approximated by the square method, and a straightness evaluating means 16 for calculating a correlation coefficient of a pixel set forming a figure from statistics and evaluating straightness of the figure. , Endpoint detection means 15 and straightness evaluation means 1
It is composed of line segment selection means 17 which integrates the outputs of 6 and selects and outputs only the line segment. The image storage means 11 is composed of an image input means (scanner, camera, etc.) (not shown) and a storage means for storing 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, FIG. 1, FIG. 4, FIG. 5, FIG. 6 and FIG.
The operation of this embodiment will be described with reference to FIG. When the binary input image is stored in the image storage means 11, the labeling means 12 labels each figure existing in the image by contour tracing or the like. Labeling means 12
Is further information on the shape of each figure, for example, the coordinates (x 1 , y 1 ), (x 2 , y 2 ), ..., Of the contour points.
(X n , y n ) is stored in the graphic 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 , End point storage means 15 and 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 formula 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 detection means 15, the direction vector (σ x , σ xy ) or (σ xy , σ y ) of the approximate straight line 20 by the method of least squares as shown in FIG. 4 and the position vector (x i of each contour point coordinate). , Y i ), and the coordinates 2 of the contour points corresponding to the maximum value and the minimum value of the inner product are calculated as shown in FIG.
2 and 23 are obtained, and these are sent to the line segment selection means 17 as the end points when the line segment is approximated. In FIG. 5, 21
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, in the straightness evaluation means 16, the correlation coefficient σ xy 2 / σ x σ y of the coordinate value of the contour point is calculated using the variance and covariance.
Is calculated. Furthermore, depending on the correlation coefficient and the number of contour points,
The straightness of the figure nσ xy 2 / σ x σ y 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. 6 and 7, reference numerals 24 and 25 denote virtual straight lines that serve as a reference for measuring the level of linearity of the figure.
【0013】真直度評価手段16は、各々の図形につい
ての真直度を線分選択手段17へ送る。線分選択手段1
7では、図形端点座標および図形真直度を受け取り、以
下のような処理を行なって線分情報を出力する。すなわ
ち、各々の図形について、その真直度が所定値よりも大
きければ、その図形は線分であるとして、対応する端点
座標を線分情報として出力する。両端点の座標が与えら
れれば、線分は一意に決定される。一方、真直度が所定
値よりも大きくなければ、その図形は線分ではないとみ
なして端点座標を棄却する。結果として、複数個の図形
から、直線分図形が選択されて、線分として出力され
る。The straightness evaluation means 16 sends the straightness for each figure to the line segment selection means 17. Line segment selection means 1
At 7, the coordinates of the end points of the figure and the straightness of the figure are received, and the following processing is performed to output the line segment information. That is, if the straightness of each figure is larger than a predetermined value, it is determined that the figure is a line segment, and the corresponding end point coordinates are output as line segment information. If the coordinates of both end points are given, the 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 a 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 multi-valued image. The block diagram of this embodiment is
It is also represented as in FIG. An image storage means 11 for storing the input multi-valued image, a labeling means 12 for extracting a multi-valued graphic of an arbitrary shape from the input image,
The figure storage means 13 for storing the density levels and coordinate values of the pixels included in the extracted multivalued figure, and the statistic amount 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 The calculating means 14, the end point detecting means 15 for obtaining the end point coordinates when the figure is approximated to the line segment by the least square method from the statistic and the density level and the coordinate value of the pixels included in the figure, and the figure from the statistic A straightness evaluation means 16 for calculating the correlation coefficient of the coordinate values of the constituent pixel sets, and further evaluating the straightness of the figure based on the correlation coefficient and the density level of each pixel, the end point detection means 15 and the straightness evaluation. The output of the means 16 is integrated, and the line segment selecting means 17 is configured to select and output only the line segment.
【0015】本実施例の動作について説明する。画像記
憶手段11に多値の入力画像が格納されると、ラベリン
グ手段12は画像中に存在する各々の図形に、ラスタス
キャンなどによってラベルづけを行なう。ラベリング手
段12はさらに、各々の図形の形状および濃度レベルに
関する情報、例えば図形中の各々の画素の座標値および
画素値のセット(x1 ,y1 ,I1 ),(x2 ,y2 ,
I2 ),…,(xn ,yn ,In )を図形記憶手段13
に格納する。統計量計算手段14では、図形記憶手段1
3に格納された各画素の座標から、図形の重心座標
mx ,my および図形の分散と共分散σx ,σy ,σxy
を算出し、端点記憶手段15および真直度評価手段16
に送る。ここに重心とは画素の座標値の平均を意味し、
重心、分散および共分散は下記数2式のように、画素の
濃度レベルに応じた重みを考慮して計算する。The operation of this embodiment will be described. When the multivalued input image is stored in the image storage means 11, the labeling means 12 labels each figure existing in the image by raster scanning or the like. The labeling means 12 further includes information on the shape and density level of each figure, for example the coordinate value of each pixel in the figure and the set of pixel values (x 1 , y 1 , I 1 ), (x 2 , y 2 ,
I 2 ), ..., (x n , y n , I n ) are stored in the graphic storage means 13.
To be stored. In the statistic calculation means 14, the graphic storage means 1
From the coordinates of each pixel stored in 3, the center of gravity coordinates m x and m y of the figure and the variance and covariance of the figure σ x , σ y , σ xy
Is calculated and the end point storage means 15 and the straightness evaluation means 16 are calculated.
Send to Here, the center of gravity means the average of the coordinate values of 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 shown in the following Expression 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 method of least squares as shown in FIG. 4 and the position vector of the coordinates of each point in the figure. The inner product with (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 calculated as shown in FIG. Send to the selection means 17. On the other hand, the straightness evaluation means 16 uses a statistical function to calculate the correlation function n of the coordinate values of the pixel sets forming the figure.
σ xy 2 / σ x σ y is calculated, and using the density level of each pixel, the straightness (I 1 + I 2 + ... + I n ) of the figure is calculated.
・ Calculate σ xy 2 / σ x σ y The straightness takes a large value when the linearity of the graphic is high as shown in FIG. 6, and takes a small value when the linearity of the graphic is low as shown in FIG. The straightness for each figure is determined by the line segment selection means 17
Send to The line segment selection means 17 receives the coordinates of the figure end points and the straightness of the figure, and if the straightness of each figure is larger than a predetermined value, the end point detection means 15 determines that the figure is a line segment, The corresponding endpoint coordinates are output as line segment information. If the coordinates of both end points are given, the line segment is uniquely determined. On the other hand, if the straightness is smaller than the predetermined value, it is determined that the figure is not a line segment and the end point coordinates are rejected. As a result, straight lines are left from the plurality of figures and output.
【0017】[0017]
【発明の効果】以上説明したように、本発明による画像
処理装置は、画像中の個々の図形について直線分かどう
かの判定を下すための、ラベリング手段、端点検出手段
および真直度評価手段を備えたことにより、図形の連結
性を保ち、かつ端点を正確に検出して、線分図形を他の
図形から分離して抽出する機能が実現できる。また、端
点検出手段において、近似線分の方向ベクトルと図形中
の点の位置ベクトルの内積という、簡単に計算できる量
を評価値として使用することにより、高速な処理を実現
している。As described above, the image processing apparatus according to the present invention comprises the labeling means, the end point detecting means and the straightness evaluating means for determining whether each figure in the image is a straight line segment. As a result, it is possible to realize the function of maintaining the connectivity of the figures, accurately detecting the end points, and separating and extracting the line segment figure from other figures. Further, in the end point detection means, high-speed processing is realized by using an easily calculated amount, which is an inner product of the direction vector of the approximate line segment and the position vector of the point in the figure.
【図1】本発明の一実施例に係る画像処理装置の機能的
な構成を表したブロック図である。FIG. 1 is a block diagram showing a functional configuration of an image processing apparatus according to an embodiment of the present invention.
【図2】従来技術の問題点を示す図であり、(a)は大
局的に見て比較的にまっすぐであるが少しわん曲がある
線図形、(b)はもともと単一の線分であるが不規則な
わん曲が連続する線図形、(c)は(a)の線図形の端
点が正確に抽出されない状態、(d)は(b)の線図形
が複数部分に分離されてしまう状態を示す。2A and 2B are diagrams showing problems of the prior art, in which FIG. 2A is a line figure which is relatively straight as a whole and has a little bend, and FIG. 2B is originally a single line segment. There is a line figure with a continuous irregular curve, but (c) is a state where the end points of the line figure of (a) are not accurately extracted, and (d) the line figure of (b) is separated into multiple 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 as a whole, but has a slight bend, (b) is a line figure that is originally a single line segment but has continuous irregular bends, (c) ) Is a state in which the end points of the line figure in (a) are accurately extracted, and (d) is (b).
The state in which the line figure of can be extracted as a single line segment is shown.
【図4】図1に示した実施例における最小自乗法による
直線近似例を示す図である。FIG. 4 is a diagram showing an example of linear approximation by the method of least squares in the embodiment shown in FIG.
【図5】図1に示した実施例における図形の端点検出例
を示す図である。5 is a diagram showing an example of detecting an end point of a figure in the embodiment shown in FIG.
【図6】図1に示した実施例における真直度(線分らし
さ)の高い図形の例を示す図である。FIG. 6 is a diagram showing an example of a graphic with high straightness (line segment likeness) in the embodiment shown in FIG. 1;
【図7】図1に示した実施例における真直度(線分らし
さ)の低い図形の例を示す図である。FIG. 7 is a diagram showing an example of a graphic with low straightness (line segment likeness) in the embodiment shown in FIG.
11 画像記憶手段 12 ラベリング手段 13 図形記憶手段 14 統計量計算手段 15 端点検出手段 16 真直度評価手段 17 線分選択手段 11 Image Storage Means 12 Labeling Means 13 Graphic Storage Means 14 Statistics Calculation Means 15 End Point Detection Means 16 Straightness Evaluation Means 17 Line Segment Selection Means
Claims (3)
画像記憶手段から取り出した画像から、同一連結成分か
らなる任意形状の図形を抽出するラベリング手段と、該
ラベリング手段が抽出した各々の図形を構成する画素集
合の平均値および分散を計算する統計量計算手段と、前
記各図形を最小自乗法で直線近似したときの前記各図形
の両端点を検出する端点検出手段と、前記各図形を構成
する画素集合の座標の相関係数と画素数および濃度レベ
ルを計算する真直度評価手段と、前記各図形の端点座標
と真直度により、線分図形を選び出す線分選択手段とを
有することを特徴とする画像処理装置。1. An image storage means for storing an input image, a labeling means for extracting a graphic of an arbitrary shape composed of the same connected component from an image extracted from the image storage means, and each graphic extracted by the labeling means. A statistical amount calculating means for calculating the average value and variance of the pixel set constituting the, a endpoint detecting means for detecting both end points of each figure when the figures are linearly approximated by the least squares method, and each figure Straightness evaluation means for calculating the correlation coefficient of the coordinates of the set of pixels, the number of pixels, and the density level; and line segment selection means for selecting a line segment graphic according to the coordinates of the end points of each graphic and straightness. A characteristic image processing device.
画素集合の平均値および分散といった統計量を計算する
際に、画素の濃度レベルによる重みづけをして、統計量
を計算することを特徴とする請求項1記載の画像処理装
置。2. The statistic calculating means calculates the statistic by weighting the density level of the pixels when calculating the statistic such as the average value and the variance of the pixel set forming the figure. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
線の方向ベクトルを算出し、その方向ベクトルと図形を
構成する各々の点の位置ベクトルとの内積を評価値とし
て、その評価値の最大値と最小値を求め、それらに対応
する図形上の点を図形の両端点として出力することを特
徴とする請求項1記載の画像処理装置。3. The end point detecting means calculates a direction vector of the approximate straight line, and uses an inner product of the direction vector and the position vector of each point constituting the figure as an evaluation value, and the maximum value of the evaluation value. 2. The image processing apparatus according to claim 1, wherein minimum values are obtained and the points on the graphic corresponding to them are output as both end points of the graphic.
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 true JPH0997331A (en) | 1997-04-08 |
JP2770849B2 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) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1305008C (en) * | 2003-12-22 | 2007-03-14 | 中国科学院自动化研究所 | Automatic dividing method for cerebral ischemia focus area |
JP2014021042A (en) * | 2012-07-23 | 2014-02-03 | Fujifilm Corp | Straightness measuring apparatus and straightness measuring method |
CN112964173A (en) * | 2020-12-31 | 2021-06-15 | 四川和心亿科技有限公司 | Structural member quality detection method |
CN113724313A (en) * | 2021-09-01 | 2021-11-30 | 河北工业大学 | Depth image straight line segment identification and extraction method based on correlation analysis |
-
1995
- 1995-09-29 JP JP25330695A patent/JP2770849B2/en not_active Expired - Fee Related
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1305008C (en) * | 2003-12-22 | 2007-03-14 | 中国科学院自动化研究所 | Automatic dividing method for cerebral ischemia focus area |
JP2014021042A (en) * | 2012-07-23 | 2014-02-03 | Fujifilm Corp | Straightness measuring apparatus and straightness measuring method |
CN112964173A (en) * | 2020-12-31 | 2021-06-15 | 四川和心亿科技有限公司 | Structural member quality detection method |
CN113724313A (en) * | 2021-09-01 | 2021-11-30 | 河北工业大学 | Depth image straight line segment identification and extraction method based on correlation analysis |
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 |
---|---|
JP2770849B2 (en) | 1998-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2915894B2 (en) | Target tracking method and device | |
US6819782B1 (en) | Device and method for recognizing hand shape and position, and recording medium having program for carrying out the method recorded thereon | |
US7822264B2 (en) | Computer-vision system for classification and spatial localization of bounded 3D-objects | |
US5081689A (en) | Apparatus and method for extracting edges and lines | |
EP2430588B1 (en) | Object recognition method, object recognition apparatus, and autonomous mobile robot | |
JP4894741B2 (en) | Information processing apparatus, information processing method, program, and recording medium | |
US8320682B2 (en) | Evaluation of edge direction information | |
EP2339507B1 (en) | Head detection and localisation method | |
EP1693783A1 (en) | Fast method of object detection by statistical template matching | |
KR20020054223A (en) | An Apparatus and Method to Measuring Dimensions of 3D Object on a Moving Conveyor | |
US11468609B2 (en) | Methods and apparatus for generating point cloud histograms | |
US20020009230A1 (en) | Template matching using correlative auto-predicative search | |
JP2007334766A (en) | Abnormal region detection apparatus and abnormal region detection method | |
EP0959427A2 (en) | Method and apparatus for object recognition | |
CN108573471B (en) | Image processing apparatus, image processing method, and recording medium | |
US8135210B2 (en) | Image analysis relating to extracting three dimensional information from a two dimensional image | |
CN110832542A (en) | Recognition processing device, recognition processing method, and program | |
Chen et al. | Perfecting vectorized mechanical drawings | |
JP6659095B2 (en) | Image processing apparatus, image processing method, and program | |
US8164633B2 (en) | Calibration apparatus and method for imaging devices and computer program | |
JP2770849B2 (en) | Image processing device | |
EP1378861A1 (en) | Method and apparatus for image processing | |
JP6717769B2 (en) | Information processing device and program | |
RU2163394C2 (en) | Material entity identification method | |
Menard et al. | Adaptive stereo matching in correlation scale-space |
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 |