JPS619778A - Segment extracting system - Google Patents

Segment extracting system

Info

Publication number
JPS619778A
JPS619778A JP59129123A JP12912384A JPS619778A JP S619778 A JPS619778 A JP S619778A JP 59129123 A JP59129123 A JP 59129123A JP 12912384 A JP12912384 A JP 12912384A JP S619778 A JPS619778 A JP S619778A
Authority
JP
Japan
Prior art keywords
line segment
extraction method
area
small
picture element
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
JP59129123A
Other languages
Japanese (ja)
Other versions
JPH0363108B2 (en
Inventor
Yutaka Kanayama
金山 裕
Shinichi Yuda
信一 油田
Koji Tsubouchi
孝司 坪内
Sadajiro Kajiwara
梶原 貞次郎
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.)
Sohgo Security Services Co Ltd
Original Assignee
Sohgo Security Services 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 Sohgo Security Services Co Ltd filed Critical Sohgo Security Services Co Ltd
Priority to JP59129123A priority Critical patent/JPS619778A/en
Publication of JPS619778A publication Critical patent/JPS619778A/en
Publication of JPH0363108B2 publication Critical patent/JPH0363108B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To improve the reliability of an extracted segment by applying the statistic processing not only to the information obtained from a thin area on a line but to the information obtained from a broad area to extract the segment to a differential picture image. CONSTITUTION:A memory is first provided to store each of the 0th-2nd order moments to each minor area, the maximum and minimum values of the (x) coordinates, the maximum and minimum values of the (y) coordinates and the maximum and minimum values of the sloping direction of a density slope. Then the picture elements are scanned from the highest line to the lowest line as well as from the left end to the right end with an original picture image. Thus the size and the direction of the density slope are obtained with each picture element. When the size of the density slope exceeds a certain threshold level, a specific minor area to which the corresponding picture element belongs is decided in response to a range of angle difference between the direction of the slope of said picture element and the direction of the slope of each picture element in a minor area to which the picture element right above or at the exactly left of the picture element.

Description

【発明の詳細な説明】 本発明はTV左カメラによシ入力された濃淡画像から対
象物体等の輪郭線の線分を抽出する線分抽出方式に関す
るものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a line segment extraction method for extracting line segments of the outline of a target object, etc. from a gray scale image inputted by a TV left camera.

従来の一般的な線分抽出方式は、原画像に対して原則と
して方向性のない微分的な処理を施し、得られた微分画
像に対しである閾値処理を施し、2値画像として輪郭線
の候補となる領域を抽出し、これに対して細線化の処理
を施すという手順によシ行われている。
In the conventional general line segment extraction method, the original image is subjected to differential processing with no directionality in principle, and the resulting differential image is subjected to a certain threshold processing to extract the outline of the contour line as a binary image. This is done by extracting a candidate area and applying thinning processing to it.

しかし、この方式は細線化のアルゴリズムがあいまいで
ある上、全体として局所的な処理の積み重ねで線分を抽
出するため雑音に弱い。また、最終的に得られる線分が
直線の一部であることが予め知られているときでもその
情報を用いることなく線分を抽出するので、得られた結
果を直線化するための処理が必要となって処理に時間が
かかるなどの欠点があった。
However, this method has an ambiguous line thinning algorithm, and is vulnerable to noise because line segments are extracted by accumulating local processing as a whole. Additionally, even if it is known in advance that the final line segment is part of a straight line, the line segment is extracted without using that information, so the processing to straighten the obtained result is easy. However, there were drawbacks such as the processing time required.

本発明は上記した従来の欠点を除去するために成された
ものであシ、雑音の影響を受けずに安定した線分の抽出
を行うことができるとともに、該抽出を複雑な処理を行
わずに少い処理量で短時間に行うことができる線分抽出
方式を提供することを目的とする。
The present invention has been made in order to eliminate the above-mentioned drawbacks of the conventional technology, and is capable of stably extracting line segments without being affected by noise, and without performing complicated processing. The purpose of this invention is to provide a line segment extraction method that can be performed in a short time with a small amount of processing.

以下、本発明の実施例を図面とともに説明する。Embodiments of the present invention will be described below with reference to the drawings.

本実施例においては、まず第1図に示した濃淡画像の原
画像に微分処理を施し、各画素点における微分値を符号
を含めて求め、各画素における濃度勾配の大きさく絶対
値)とその方向を求める。これを表わしたのが第2図で
あυ、矢印の矢の方向が濃度勾配の方向を表わし、矢印
の長さが濃度勾配の大きさを表わしている。次に、濃度
勾配の大きさがある閾値を越える領域を抽出し、第3図
の−Aの部分(斜線部分)を得る。次に、この部分Aを
、濃度勾配の方向の違いがある角度差の範囲を越えない
連結した領域を1つの小領域として、第4図のA1〜A
lt  のように分割する。そして、各小領域Al−A
t 7  の中で面積がある値よジ小さいもの、例えば
A1.A21As +A6 +・・・等は処理の対象か
ら外す。残った各小領域については、濃度勾配の大きさ
の0次、1次、2次のモーメントを求める。以下に各モ
ーメントの計算を示す。
In this example, first, the original image of the grayscale image shown in FIG. Find direction. This is illustrated in FIG. 2, where the direction of the arrow represents the direction of the concentration gradient, and the length of the arrow represents the magnitude of the concentration gradient. Next, a region where the concentration gradient exceeds a certain threshold is extracted to obtain the region -A (shaded region) in FIG. Next, consider this part A as one small region, which is a connected region that does not exceed the range of angular difference in which the direction of the concentration gradient differs, and A1 to A in FIG. 4.
Divide like lt. Then, each small area Al-A
t 7 whose area is smaller than a certain value, for example A1. A21As +A6 +..., etc. are excluded from processing. For each of the remaining small regions, the 0th, 1st, and 2nd moments of the concentration gradient are determined. The calculation of each moment is shown below.

0次モーメント ”oo□=置g装(X、y) l     A1 1次モーメント mto、i−ΣX・ga(X、y) mox、i =、F、y 俤ga (x + y)2次
モーメント m2o、i=X、x Φga(x+y)m□□、1=Σ
:X”y”ga(Xly)m02.i = 置’I” 
g a (X+ V )I ここで、Ai  i”を第1番目の小領域を示し、g 
a(x +y)U画素(X、y)における勾配の大きさ
を表わす。
0th moment "oo□=G device (X, y) l A1 1st moment mto, i-ΣX・ga (X, y) mox, i =, F, y 俤ga (x + y) 2nd moment m2o, i=X, x Φga(x+y)m□□, 1=Σ
:X”y”ga(Xly)m02. i = position 'I'
g a (X+ V )I Here, Ai i'' indicates the first small area, and g
a(x + y) represents the magnitude of the gradient at U pixel (X, y).

次に、これらの0次、1次および2次の各モーメントに
基づいて、各小領域の慣性等価だ円の長軸と短軸を下記
の式によ請求める。慣性等価だ円とは例えば第5図に示
したように、小領域AIに対しては破線で示しただ円領
域dのことである。
Next, based on these zero-order, first-order, and second-order moments, the long axis and short axis of the inertial equivalent ellipse of each small area can be calculated using the following formula. For example, as shown in FIG. 5, the inertial equivalent ellipse is a circular area d shown by a broken line with respect to the small area AI.

ただしM8.、 l Ml、iは である。However, M8. , l Ml, i is It is.

上記のようにして各小領域に対する慣性等価だ円の長軸
と短軸の長さを求めたが、その中で短軸の長さが小さく
、長軸の長さが大きい小領域は線分を表わすと判断し、
その線分の位置を計算する。
The lengths of the major and minor axes of the inertial equivalent ellipse for each small region were determined as described above, and the small regions where the short axis is small and the long axis is large are line segments. It is determined that it represents
Calculate the position of the line segment.

例えば、慣性等価だ円の長軸をその線分とみなすとき、
次の計算式で求められる重心のXt’l座標(XLf 
l yg+i )を中心とする傾きθ1、長さtlが線
分を表わす。ここで、 であシ、tiは前記した通シである。あるいは、線分を
表わすとみなす小領域のX、X座標の最大値、最小値を
線分の端点を表わす座標として用いることも可能である
For example, when considering the long axis of the inertial equivalent ellipse as its line segment,
Xt'l coordinates of the center of gravity (XLf
The slope θ1 centered at lyg+i ) and the length tl represent a line segment. Here, and ti are the above-mentioned values. Alternatively, it is also possible to use the maximum and minimum values of the X and X coordinates of a small area considered to represent a line segment as the coordinates representing the end point of the line segment.

以上のようにして、第1図に示す原画像から第6図に示
すような線分As 、ta 、tt +ta 、ts 
In the above manner, the line segments As, ta, tt +ta, ts as shown in FIG. 6 are obtained from the original image shown in FIG.
.

tlo + tl2 r 415 Itlllが求めら
れる。
tlo + tl2 r 415 Itll is calculated.

ところで、前記のようにして求められた慣性等価だ円の
長袖と短軸の長さにお員て、短軸の長さがある値を越え
る小領域については2つ以上の線分を含む場合があると
想定される。この場合の一例を第7図に示すが、このよ
うな場合第4図に示したような小領域への分割を濃度勾
配の方向の角度差の範囲を狭くして再度行う。例えば、
この領域の慣性等価だ円の短軸方向を濃度勾配方向のし
きい値として再度領域の分割を行い、以下前記同様の処
理を行えば良い。ただし、この小領域への再分割以下の
処理は対象として−る画像の全領域について行う必要は
なく、短軸の長さがある値を越える小領域についてのみ
行えば良い。
By the way, in the long sleeve and short axis lengths of the inertia equivalent ellipse obtained as described above, if a small area where the short axis length exceeds a certain value contains two or more line segments, It is assumed that there is. An example of this case is shown in FIG. 7. In such a case, the division into small regions as shown in FIG. 4 is performed again by narrowing the range of the angular difference in the direction of the concentration gradient. for example,
The area may be divided again using the minor axis direction of the inertial equivalent ellipse in this area as a threshold value in the concentration gradient direction, and the same processing as described above may be performed thereafter. However, the processing subsequent to this re-division into small areas does not need to be performed on the entire area of the target image, and may be performed only on small areas where the short axis length exceeds a certain value.

以上、本実施例による線分抽出の手順を説明したが、以
上の処理は汎用コンピュータのプログラム又は専用の画
像処理装置によってきわめて能率よく実行することがで
きる。特に、原画像の濃度勾配を求めてから第6図に示
すような線分を求めるまでの処理は、原画像に対して一
回の走査にょシ実施することが可能である。よシ具体的
な処理手順について第8図を参照して以下説明する。ま
ず、各小領域に対する0次、1次、2次の各モーメント
、X座標の最大値と最小値、X座標の最大値と最小値、
濃度勾配の勾配方向の最大値と最小値等を記憶するメモ
リを用意する。次に、原画像について最下行から最下行
へ、また各行では左端から右端へと各画素を走査し、各
画素について濃度勾配の大きさと方向を求め、その大き
さがある閾値を越えた場合には当該画素の直上又は直属
にある画素が属する小領域における各画素の勾配の方向
と当該画素の勾配の方向との角度差の範囲に応じて、当
該画素がどの小領域に属するかを決定する。このように
濃度勾配を求めてその勾配の大きい部分を勾配の方向に
よって小領域に分割する処理を行うためには、当該画素
が属する行の直上の一省分の画素と当該画素が属する行
の既に走査が終った各画素について、これらの各画素が
帰属する小領域の番号を記憶させておけば良い。又、前
記した各処理においては、原画像全体について一回だけ
走査すれば良く、後は計算によりo次、1次、2次のモ
ーメントの値をすべて求めることができ、さらに前述し
たような計算にょシ線分の位置を求めることができる。
The procedure for line segment extraction according to this embodiment has been described above, but the above processing can be executed very efficiently by a general-purpose computer program or a dedicated image processing device. In particular, the processing from determining the density gradient of the original image to determining line segments as shown in FIG. 6 can be performed in one scan of the original image. The detailed processing procedure will be explained below with reference to FIG. First, the 0th, 1st, and 2nd moments for each small area, the maximum and minimum values of the X coordinate, the maximum and minimum values of the X coordinate,
A memory is prepared to store the maximum value, minimum value, etc. of the concentration gradient in the gradient direction. Next, each pixel of the original image is scanned from the bottom row to the bottom row, and in each row from the left end to the right end, the magnitude and direction of the density gradient are determined for each pixel, and if the magnitude exceeds a certain threshold, determines which subregion the pixel belongs to according to the range of the angular difference between the direction of the gradient of each pixel in the subregion to which the pixel directly above or under the pixel belongs and the direction of the gradient of the pixel. . In order to calculate the concentration gradient and divide the part with a large gradient into small regions according to the direction of the gradient, we need to calculate the pixel in one section immediately above the row to which the pixel belongs and the row in which the pixel belongs. For each pixel that has already been scanned, the number of the small area to which each pixel belongs may be stored. In addition, in each of the above-mentioned processes, it is only necessary to scan the entire original image once, and then all the values of the o-th, 1st-, and 2nd-order moments can be obtained by calculation, and furthermore, the above-mentioned calculations can be performed. The position of the line segment can be found.

以上のように本発明においては、微分画像に対して、線
上の細い領域から得た情報たけではなく広い領域から得
た情報に統計的な処理を施すことによp線分を抽出する
ため、局所的な雑音の影醤を受けず、抽出された線分の
信頼性が高くなる。
As described above, in the present invention, p line segments are extracted by statistically processing not only information obtained from a thin region on the line but also information obtained from a wide region on the differential image. The reliability of extracted line segments is increased without being influenced by local noise.

又、画像のある領域のモーメントを求める等の方法によ
シ直接的に線分の方程式が求められるため、複雑な処理
を必要とせずに単一な処理にょシ短時間で実現できる。
Furthermore, since the equation of the line segment can be directly determined by a method such as determining the moment of a certain area of the image, it can be realized in a short time with a single process without requiring complicated processing.

さらに、ある領域を追跡しながら処理を行う方式と異り
、画像全体を少数回走査することによシ線分の方程式を
求めることができ、計算量が軽減され、その上画像処理
のためのハードウェアも容易に実現シきる。
Furthermore, unlike methods that perform processing while tracking a certain area, the equation of the line segment can be found by scanning the entire image a few times, reducing the amount of calculations and Hardware can also be easily realized.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図〜第8図は本発明に関するものであシ、第1図は
原画像を示す図、第2図は原画像の級度勾配の方向と大
きを示す図、第3図は濃度勾配の大きさがある閾値を越
えた領域を示す図、第4図は第3図に示された領域を分
割化して小領域を形成したことを示−r図、第5図は第
4図の一部を拡大しかつ慣性等価だ円を示した図、第6
図は抽出された線分を示す図、第7図は2つの線分を含
む小領域を示す図、第8図は走査中の画面を示す図であ
る。 A・・・濃度勾配の大きな領域、A1〜AI?・・・小
領域。 第1図    第2因 第3図    第4、図
Figures 1 to 8 relate to the present invention; Figure 1 shows the original image, Figure 2 shows the direction and magnitude of the grade gradient of the original image, and Figure 3 shows the density gradient. Figure 4 is a diagram showing a region where the size of Part 6 enlarged diagram showing the inertial equivalent ellipse
The figure shows extracted line segments, FIG. 7 shows a small area including two line segments, and FIG. 8 shows a screen during scanning. A...A region with a large concentration gradient, A1 to AI? ...Small area. Figure 1 Figure 2 Cause 3 Figure 4 Figure 4

Claims (6)

【特許請求の範囲】[Claims] (1)濃淡画像の濃度勾配の大きさがある閾値を越える
領域を濃度勾配の方向の範囲と連結性とに従って複数個
の連結した小領域に分割し、この各小領域について各々
0次、1次および2次のモーメントを求めることによっ
て各小領域が各々線分に近いか否かを判断するとともに
この線分の位置を計算することを特徴とする線分抽出方
式。
(1) Divide the area in which the density gradient of the grayscale image exceeds a certain threshold into a plurality of connected small areas according to the range and connectivity of the density gradient direction, and for each small area, A line segment extraction method characterized by determining whether each small region is close to a line segment by determining second-order and second-order moments, and calculating the position of this line segment.
(2)前記した0次、1次および2次のモーメントが濃
度勾配の大きさによる重み付けを行ったものであること
を特徴とする特許請求の範囲第1項記載の線分抽出方式
(2) The line segment extraction method according to claim 1, wherein the 0th, 1st, and 2nd moments are weighted according to the magnitude of the concentration gradient.
(3)前記濃度勾配がある閾値を越えるか否かの判断と
、濃度勾配の方向の範囲の選択とを、濃淡画像上の各画
素点における2方向の微分値の符号と、この微分値とあ
る定められた閾値との大小関係とを用いて行うことを特
徴とする特許請求の範囲第1項又は第2項記載の線分抽
出方式。
(3) The judgment as to whether the density gradient exceeds a certain threshold value and the selection of the range of the direction of the density gradient are made based on the sign of the differential value in two directions at each pixel point on the grayscale image and this differential value. 3. The line segment extraction method according to claim 1 or 2, wherein the line segment extraction method is performed using a magnitude relationship with a certain predetermined threshold value.
(4)前記濃度勾配の大きさと方向の検出と、この大き
さが閾値を越えるか否かの判断と、濃度勾配の方向の範
囲と連結性に従った小領域への分割と、各小領域におけ
る0次、1次および2次のモーメントの計算とを、濃淡
画像に対する1回の走査で行うことを特徴とする特許請
求の範囲第1項〜第3項のいずれかに記載の線分抽出方
式。
(4) Detecting the magnitude and direction of the concentration gradient, determining whether the magnitude exceeds a threshold, dividing into small regions according to the range and connectivity of the concentration gradient direction, and each small region The line segment extraction according to any one of claims 1 to 3, wherein the calculation of the 0th, 1st, and 2nd moments in is performed in one scan of a grayscale image. method.
(5)前記各小領域について0次、1次および2次のモ
ーメントと濃淡画像上に設定したXY座標の値の最大値
と最小値を求め、各小領域が線分に近いと判断した場合
、前記最大値と最小値を用いて線分の位置を求めること
を特徴とする特許請求の範囲第1項〜第4項のいずれか
に記載の線分抽出方式。
(5) When determining the maximum and minimum values of the 0th, 1st, and 2nd moments and the XY coordinate values set on the grayscale image for each of the small regions, and determining that each small region is close to a line segment. , the line segment extraction method according to any one of claims 1 to 4, characterized in that the position of the line segment is determined using the maximum value and the minimum value.
(6)前記濃度勾配の方向の範囲による領域の分割を特
定の方向に近いか否かの判断によって行ない、濃度勾配
が、その特定の方向に近い連結した小領域のみについて
各々が線分に近いか否かを判断することにより、上記特
定の方向と直交する方向の線分のみを抽出することを特
徴とする特許請求の範囲第1項〜第5項のいずれかに記
載の線分抽出方式。
(6) Divide the region according to the range of the direction of the concentration gradient by determining whether or not it is close to a specific direction, and only the connected small regions whose concentration gradient is close to the specific direction are each close to a line segment. The line segment extraction method according to any one of claims 1 to 5, wherein only line segments in a direction perpendicular to the specific direction are extracted by determining whether or not .
JP59129123A 1984-06-25 1984-06-25 Segment extracting system Granted JPS619778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59129123A JPS619778A (en) 1984-06-25 1984-06-25 Segment extracting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59129123A JPS619778A (en) 1984-06-25 1984-06-25 Segment extracting system

Publications (2)

Publication Number Publication Date
JPS619778A true JPS619778A (en) 1986-01-17
JPH0363108B2 JPH0363108B2 (en) 1991-09-30

Family

ID=15001645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59129123A Granted JPS619778A (en) 1984-06-25 1984-06-25 Segment extracting system

Country Status (1)

Country Link
JP (1) JPS619778A (en)

Also Published As

Publication number Publication date
JPH0363108B2 (en) 1991-09-30

Similar Documents

Publication Publication Date Title
US6801653B1 (en) Information processing apparatus and method as well as medium
US20070140526A1 (en) Image processing method
EP4009275B1 (en) Golf ball top-view detection method and system, and storage medium
Mikhail et al. Detection and sub-pixel location of photogrammetric targets in digital images
WO2021052283A1 (en) Method for processing three-dimensional point cloud data and computing device
CN113111929A (en) Template matching method and device, computer equipment and storage medium
CN112270697A (en) Satellite sequence image moving target detection method combined with super-resolution reconstruction
US5887083A (en) Method of processing image information based on object model
US20230230265A1 (en) Method and apparatus for patch gan-based depth completion in autonomous vehicles
CN110414525B (en) Character recognition method and device
CN112949656B (en) Underwater terrain matching positioning method, device and computer storage medium
JPH0634233B2 (en) Hierarchical structural template matching method
JP3074292B2 (en) Template matching processing method
JPH0363108B2 (en)
JP3447751B2 (en) Pattern recognition method
JPH08161474A (en) Method for correcting registration between images by different kinds of sensors
CN119963629B (en) Methods, apparatus, equipment, and computer storage media for calculating the principal orientation of raster maps
CN118692004A (en) A method and system for improving the accuracy of identifying safety risk targets in distribution network operations
CN121366196A (en) Grid map main direction calculation method and device and computer storage medium
JP3080097B2 (en) Parallel line figure extraction method
JPH08194773A (en) Image processing method and image processing apparatus
JPH053627B2 (en)
JPS60246490A (en) Pattern recognizing system
JP2977259B2 (en) Skew detection method
JP2638147B2 (en) Magnetic head gap position recognition method