JP2856989B2 - Inner / outer loop identification method for region boundaries - Google Patents

Inner / outer loop identification method for region boundaries

Info

Publication number
JP2856989B2
JP2856989B2 JP4233499A JP23349992A JP2856989B2 JP 2856989 B2 JP2856989 B2 JP 2856989B2 JP 4233499 A JP4233499 A JP 4233499A JP 23349992 A JP23349992 A JP 23349992A JP 2856989 B2 JP2856989 B2 JP 2856989B2
Authority
JP
Japan
Prior art keywords
boundary
outer loop
loop
region
pixel
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 - Lifetime
Application number
JP4233499A
Other languages
Japanese (ja)
Other versions
JPH0683958A (en
Inventor
俊博 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP4233499A priority Critical patent/JP2856989B2/en
Publication of JPH0683958A publication Critical patent/JPH0683958A/en
Application granted granted Critical
Publication of JP2856989B2 publication Critical patent/JP2856989B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • 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 a method for identifying whether a boundary of a region on a digital image is an inner loop or an outer loop.

【0002】[0002]

【従来の技術】長尾真「画像認識論」の第67頁から第
68頁に述べられているように、領域境界をチェーンコ
ード で表現した場合、隣接境界点のチェーンコードの差分の
列{Ui+1/2}を Ui+1/2=ai+1−ai+8c ただし、i=1,2,...,mとする。cはUi+1/2
の絶対値が4以下となるように0,+1,−1のいずれ
かをとるようにする。とすれば、領域境界が閉ループで
あるときには となり、この値が+8のときは反時計回り、−8のとき
は時計回りであることが知られている。
2. Description of the Related Art As described on pages 67 to 68 of Makoto Nagao, "Image Recognition Theory", a region code is defined by a chain code. , The sequence {U i + 1/2 } of the chain code difference between adjacent boundary points is expressed as U i + 1/2 = a i + 1 −a i + 8c, where i = 1, 2,. . . , M. c is U i + 1/2
Is set to one of 0, +1, and -1 so that the absolute value of is equal to or less than 4. If the region boundary is a closed loop, It is known that when this value is +8, it is counterclockwise, and when this value is -8, it is known that it is clockwise.

【0003】このことに着目し、領域内部を左手に見る
ように領域境界の追跡を行なうとすれば、上記ΣU
i+1/2の値が+8のときは反時計方向であるから領域境
界を外側ループであると判定し、−8のときは時計回り
であるので内側ループであると判定する。従来、このよ
うな境界追跡の方法とループの回り方向に基づいて領域
境界の内/外ループの識別を行なう方法がもっとも一般
的な方法であった。
[0003] Focusing on this, if the area boundary is tracked so that the inside of the area is viewed on the left hand, the above-mentioned ΔU
When the value of i + 1/2 is +8, the region is determined to be an outer loop because the region is in a counterclockwise direction. When the value of i + 1/2 is −8, the region is determined to be an inner loop since the region is clockwise. Conventionally, the most common method is such a method of tracking a boundary and a method of identifying an inner / outer loop of an area boundary based on a direction around the loop.

【0004】また、特開平3−218567号公報(特
に同公報の図17,図18)に示されているように、対
象を2値画像に限定し、追跡のための最初の境界点に関
し、外側ループ検出用と内側ループ検出用のマスクパタ
ーンを予め設定しておき、それぞれのマスクパターンに
合致するもののみを外側、内側と順番に追跡するという
方法も知られている。
As shown in Japanese Patent Application Laid-Open No. 3-218567 (particularly, FIGS. 17 and 18 of the publication), the object is limited to a binary image, and the first boundary point for tracking is defined as follows. A method is also known in which mask patterns for outer loop detection and inner loop detection are set in advance, and only patterns that match the respective mask patterns are sequentially tracked to the outside and the inside.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、前記の
一つめの従来方法は、全ての点においてチェーンコード
の差分を求めるための演算が必要になるため、処理量が
多く高速処理が難しいという問題がある。また、前記の
二つめの従来方法は、外側ループ検出のために1回、内
側ループ検出のために1回、合計2回の画像走査が必要
になるため、高速処理が難しいうえに、予め得られてい
る境界に対する内/外ループ判定ができないという問題
がある。さらに第2の従来方法は、対象が2値画像に限
定され画像一般に適用できる方法ではない。
However, the first conventional method has a problem in that the calculation for obtaining the difference between the chain codes is required at all points, so that the processing amount is large and high-speed processing is difficult. is there. Further, the second conventional method requires two times of image scanning, one for the outer loop detection and one for the inner loop detection, so that high-speed processing is difficult. There is a problem that the inner / outer loop cannot be determined for the boundary. Further, the second conventional method is not a method applicable to general images because the object is limited to a binary image.

【0006】本発明は、上記の問題点を解決し、処理量
が少なく高速処理が容易であるとともに、処理対象が2
値画像に限定されずデジタル画像一般に適用可能な領域
境界の内/外ループ識別方法を提供しようとするもので
ある。
The present invention solves the above-mentioned problems, has a small amount of processing, facilitates high-speed processing, and has a processing target of 2
It is an object of the present invention to provide a method for identifying an inner / outer loop of an area boundary applicable to digital images in general without being limited to value images.

【0007】[0007]

【課題を解決するための手段】本発明は、デジタル画像
上の領域の境界中の特定の位置における画素(最上左画
素)に着目し、この画素における境界点とその近傍の境
界点との局所的な接続関係によって、境界が内側ループ
であるか外側ループであるかを判定することを骨子とす
るものである。
SUMMARY OF THE INVENTION The present invention is directed to a pixel (a top left image) at a specific position in a boundary of a region on a digital image.
Element) , the boundary point at this pixel and the boundary
The main point is to determine whether the boundary is an inner loop or an outer loop based on a local connection relationship with a boundary point.

【0008】ここで領域とは、デジタル画像中で同じ画
素値または同じラベルを持つ画素の連結成分を意味す
る。2値画像の黒画素連結成分は、その特殊な場合にあ
たる。このような境界の領域という言葉には、大きく分
けて二つの意味がある。一つは領域に含まれる画素を境
界とする場合であり、もう一つは画素境界に仮の点があ
ると見做し、これを境界とする場合である。本明細書で
は前者を採用するものとする。ただし、線幅が1である
場合には、一つの画素に複数の境界点が存在するものと
看做すこととし、実質的には後者と同じこととなる。
Here, the region means a connected component of pixels having the same pixel value or the same label in the digital image. The black pixel connected component of the binary image corresponds to the special case. The term "boundary region" has two main meanings. One is a case where a pixel included in the region is set as a boundary, and the other is a case where a temporary point is regarded as a pixel boundary and this is set as a boundary. In this specification, the former is adopted. However, when the line width is 1, it is assumed that a plurality of boundary points exist in one pixel, which is substantially the same as the latter.

【0009】[0009]

【作用】本発明では、領域境界中の最も上の行にある境
界画素のうち、最も左にある画素(最上左画素と呼ぶ)
に位置する境界点に着目する。この最上左画素の近傍の
様子は、外側ループの場合と内側ループの場合とで図2
の(a)と(b)のように示すことができる。
According to the present invention , the leftmost pixel (called the uppermost left pixel) among the boundary pixels in the uppermost row in the region boundary
Focus on the boundary point located at. The state near the top left pixel is shown in FIG. 2 for the outer loop and the inner loop.
(A) and (b).

【0010】何故ならば、(a)に示したような領域境
界が内側ループとなり得るためには少なくとも最上左画
素に対応する境界点よりも上に、同一境界に属する他の
境界点が存在しなければならないが、これは最上左画素
仮定に反するからである。そして、領域境界は必ず閉
じているものであり、内側ループとなり得ないならば、
この境界領域は必ず外側ループであると言える。(b)
に示した領域境界が内側ループであることも同様に説明
できる。
[0010] In order for the area boundary as shown in (a) to be an inner loop, another boundary point belonging to the same boundary exists at least above the boundary point corresponding to the uppermost left pixel. Must be done because this violates the assumption of the top left pixel. And if the region boundary is always closed and cannot be an inner loop,
It can be said that this boundary region is always an outer loop. (B)
It can be similarly explained that the region boundary shown in FIG.

【0011】すなわち、領域境界中の最上左画素の位置
にある境界点の局所的な接続関係または近傍の画素パタ
ーンから、図2の(a)または(b)のいずれの場合で
あるか、つまり領域境界が外側ループであるか内側ルー
プであるかを判断できるということである。そして、こ
れが本発明方法の原理である。
That is, from the local connection relation of the boundary point at the position of the uppermost left pixel in the region boundary or the pixel pattern in the vicinity, it is determined which of FIG. 2A or FIG. That is, it can be determined whether the region boundary is an outer loop or an inner loop. This is the principle of the method of the present invention.

【0012】このような本発明の方法は、全ての点にお
いてチェーンコードの差分を求める必要があるような従
来方法に比べ、内/外ループ識別のための演算量が遥か
に少なくなり高速処理が可能である。また、処理対象が
2値画像上の領域境界に限定されることもない。
In the method of the present invention, the amount of calculation for inner / outer loop identification is much smaller than that of the conventional method in which it is necessary to obtain chain code differences at all points, and high-speed processing is achieved. It is possible. Further, the processing target is not limited to the area boundary on the binary image.

【0013】[0013]

【実施例】以下、本発明の実施例について図面により説
明する。なお、以下の説明においては、図2に関連して
説明したように、着目する領域境界中の特定位置とし
て、領域境界の最上左画素の位置を選ぶ。
Embodiments of the present invention will be described below with reference to the drawings. In the following description, as described with reference to FIG. 2, the position of the uppermost left pixel of the region boundary is selected as the specific position in the region boundary of interest.

【0014】図1は本発明を実施する処理系の一例を示
す。1は中央処理装置(CPU)、2はデジタル画像デ
ータを格納するイメージメモリ、3はCPU1のプログ
ラムを格納するプログラムメモリ、4は処理結果等のデ
ータを格納するデータメモリである。プログラムメモリ
3に格納されるプログラムには、イメージメモリ2内の
デジタル画像データに対し領域境界の抽出を行なうため
の境界抽出処理プログラム5と、これにより抽出された
領域境界の境界点情報6(データメモリ4内に格納され
る)に対し内/外ループ識別処理を行なう内/外ループ
識別プログラム7が含まれる。なお、内/外ループ識別
プログラム7は境界抽出処理プログラム5に一体的に組
み込まれる場合もある。以下に説明する処理は、該当プ
ログラムに従ってCPU1により実行される。
FIG. 1 shows an example of a processing system for implementing the present invention. 1 is a central processing unit (CPU), 2 is an image memory for storing digital image data, 3 is a program memory for storing a program of the CPU 1, and 4 is a data memory for storing data such as processing results. The programs stored in the program memory 3 include a boundary extraction processing program 5 for extracting an area boundary from digital image data in the image memory 2 and boundary point information 6 (data (Stored in the memory 4) for performing an inner / outer loop identification process. Note that the inner / outer loop identification program 7 may be integrated into the boundary extraction processing program 5 in some cases. The processing described below is executed by the CPU 1 according to the corresponding program.

【0015】次に一実施例における内/外ループ識別処
理について説明するが、内/外ループの識別条件につい
て、より具体的に説明する。
Next, the inner / outer loop identification processing in one embodiment will be described. The inner / outer loop identification conditions will be described more specifically.

【0016】座標系を図4に示すように定め、境界抽出
時の境界追跡は領域内部を左手に見るように、あるい
は、それと等価な形で行なわれるものとする。そして、
着目した境界をCとする。
The coordinate system is defined as shown in FIG. 4, and the boundary tracing at the time of boundary extraction is performed such that the inside of the region is viewed on the left hand or in an equivalent form. And
Let C be the boundary of interest.

【0017】Cの最上左画素の位置にCの境界点が何個
あるか調べる。Cが1画素幅の線分の場合には、Cの最
上左画素の位置にCの境界点が最大2個まで存在し得る
(図3参照)。この場合、Cを外側ループであると一意
に決定する。Cの最上左画素の位置にCの境界点が1個
しかない場合には、その境界点をpとし、以下の処理を
行なう。処理中で次の記号 x(p):pのx座標 y(p):pのy座標 prev:境界追跡方向においてpの一つ手前(後ろ)
の境界点 next:境界追跡方向においてpの一つ先(前方)の
境界点 x(prev):prevのx座標 y(prev):prevのy座標 x(next):nextのx座標 y(next):nextのy座標 を用いる。
It is checked how many boundary points of C exist at the position of the upper left pixel of C. When C is a line segment having a width of one pixel, up to two boundary points of C may exist at the position of the uppermost left pixel of C (see FIG. 3). In this case, C is uniquely determined to be the outer loop. When there is only one boundary point of C at the position of the top left pixel of C, the boundary point is set to p and the following processing is performed. During processing, the next symbol x (p): x coordinate of p y (p): y coordinate of p prev: one before (back) of p in the boundary tracking direction
Next: boundary point one point ahead (forward) of p in the boundary tracking direction x (prev): x coordinate of prev y (prev): y coordinate of prev x (next): x coordinate of next y (next) ): The y coordinate of next is used.

【0018】まず、8連結の場合について考える(ただ
し、孤立点の場合は外側ループであると判定する)。こ
こではpが最上左画素の位置にあるとしているので、図
5に示すpの近傍の3×3画素の領域内において、a,
b,c,dの位置にはpに接続した境界点が存在するこ
とはあり得ず、pに接続した境界点が存在し得る位置は
e,f,g,hのいずれかである。すなわち、pの近傍
における境界点の接続状況は、境界追跡の順で、つまり
prev→p→nextで表わすと、 {e,f,g,h}→p→{e,f,g,h} に限定される。そして、境界Cが外側ループの場合と内
側ループである場合の接続状況は表1のように表わされ
る。
First, consider the case of 8-connection (however, in the case of an isolated point, the outer loop is determined). Here, since it is assumed that p is located at the position of the upper left pixel, in the 3 × 3 pixel area near p shown in FIG.
A boundary point connected to p cannot exist at the position of b, c, and d, and a position where a boundary point connected to p can exist is any of e, f, g, and h. That is, the connection status of the boundary points in the vicinity of p is expressed in the order of boundary tracking, that is, by prev → p → next, {e, f, g, h} → p → {e, f, g, h} Is limited to Table 1 shows the connection status when the boundary C is the outer loop and the inner loop.

【0019】[0019]

【表1】 [Table 1]

【0020】表1において、左欄はpに接続するpre
vとnextの位置を示し、右欄は内/外ループの別を
示す。ただし右欄のXは、左欄に示された接続の組み合
わせが有り得ないことを意味する。表1から内側ループ
となり得るのは f→p→e、f→p→h の二通りに限られることが分かる。
In Table 1, the left column shows pre connected to p.
The positions of v and next are shown, and the right column shows the inner / outer loop. However, X in the right column means that the combination of connections shown in the left column is not possible. From Table 1, it can be seen that the inner loop can be limited to only f → p → e and f → p → h.

【0021】先に定めた記号を用いるならば、 「x(prev)=x(p)−1 かつ y(pre
v)=y(p)+1かつx(next)=x(p)+1
であるとともに、y(next)=y(p)またはy
(next)=y(p)+1である。」というのが内側
ループである条件である。ここで、cとpとの接続は考
えなくともよいので、さらに簡単に、 「x(prev)=x(p)−1 かつ y(pre
v)=y(p)+1かつ x(next)=x(p)+
1 を満たすときのみ内側ループであり、それ以外のと
きは外側ループである。」としてもよい。あるいは、 「pの近傍が図5の(a)、(b)のいずれかのマスク
パターンに合致すれば内側ループであり、そうでなけれ
ば外側ループである。」としてもよい。
If the symbols defined above are used, "x (prev) = x (p) -1 and y (pre
v) = y (p) +1 and x (next) = x (p) +1
And y (next) = y (p) or y
(Next) = y (p) +1. Is the condition for the inner loop. Here, since it is not necessary to consider the connection between c and p, it is easier to write “x (prev) = x (p) −1 and y (pre
v) = y (p) +1 and x (next) = x (p) +
It is an inner loop only when 1 is satisfied, otherwise it is an outer loop. ". Alternatively, "if the vicinity of p matches one of the mask patterns shown in FIGS. 5A and 5B, it is an inner loop; otherwise, it is an outer loop."

【0022】次に<4連結の場合について同様の条件を
考える(孤立点の場合は外側ループと判定する)。4連
結であることと、pが最上左画素の位置にあるという仮
定より、図5において、pに接続している境界点の存在
し得る位置はe,gのいずれかである。
Next, the same condition is considered for the case of <4 connection (in the case of an isolated point, the outer loop is determined). Due to the four-connection and the assumption that p is at the position of the upper left pixel, in FIG. 5, the position where the boundary point connected to p can exist is either e or g.

【0023】すなわち、pの近傍における境界点の接続
状況は、 {e,g}→p→{e,g} に限定される。外側ループの場合と内側ループの場合の
接続状況を表2に示す。
That is, the connection status of the boundary point near p is limited to {e, g} → p → {e, g}. Table 2 shows the connection status of the outer loop and the inner loop.

【0024】[0024]

【表2】 [Table 2]

【0025】表2に見られるように、内側ループとなり
得るのは g→p→e の一通りに限られる。
As can be seen from Table 2, an inner loop can be limited to one of g → p → e.

【0026】先に定めた記号を用いるならば、 「x(prev)=x(p) かつy(prev)=y
(p)+1 かつx(next)=x(p)+1 かつ
y(next)=y(p)を満たすときのみ内側ルー
プであり、それ以外は外側ループである。」という条件
であると言える。cやhとpとの接続は考えなくともよ
いので、さらに簡単に、 「x(prev)=x(p) かつy(prev)=y
(p)+1 かつx(next)=x(p)+1 を満
たすときのみ内側ループであり、これ以外は外側ループ
である。」としてもよい。あるいは 「pの近傍が図6(c)のマスクパターンと合致すれば
内側ループでありそれ以外は外側ループである。」とし
てもよい。
If the symbols defined above are used, "x (prev) = x (p) and y (prev) = y
The loop is an inner loop only when (p) +1 and x (next) = x (p) +1 and y (next) = y (p), and the other loop is an outer loop. It can be said that this is the condition. Since it is not necessary to consider the connection between c and h and p, it is easier to write “x (prev) = x (p) and y (prev) = y
It is an inner loop only when (p) +1 and x (next) = x (p) +1 are satisfied, and the other loops are outer loops. ". Alternatively, "if the vicinity of p coincides with the mask pattern of FIG. 6C, the loop is an inner loop, and the rest is an outer loop."

【0027】以上のような方法で、着目した領域境界の
最上左画素の位置にある境界点の局所的接続状況または
近傍画素パターンに基づき、内/外ループの識別を行な
う。図7は、この識別処理をフローチャート化して示し
ている。初めに、最上左画素にある境界点の個数nを求
める(ステップ100)。これは一般的には、境界点座
標値の比較により求めることができる。そして、nが1
であるか否かを調べ(ステップ105)、n≠1(n=
2)であれば外側ループであると判定し(ステップ11
0)、処理を終わる。
With the above-described method, the inner / outer loop is identified based on the local connection state of the boundary point at the position of the uppermost left pixel of the focused area boundary or the neighboring pixel pattern. FIG. 7 is a flowchart showing the identification process. First, the number n of boundary points at the upper left pixel is obtained (step 100). This can be generally determined by comparing the boundary point coordinate values. And n is 1
Is checked (step 105), and n1051 (n = 1)
If 2), it is determined that the loop is an outer loop (step 11).
0), the process ends.

【0028】n=1の場合には、その境界点をpとし
(ステップ115)、その局所的な接続状況または近傍
の画素パターンに関する前記条件を調べ(ステップ12
0,125)、内側ループの条件が成立しないときは外
側ループであると判定し(ステップ110)、内側ルー
プの条件が成立したときは内側ループであると判定し
(ステップ130)、処理を終わる。
If n = 1, the boundary point is set to p (step 115), and the condition regarding the local connection state or the neighboring pixel pattern is checked (step 12).
0, 125), if the condition of the inner loop is not satisfied, it is determined that the loop is an outer loop (step 110), and if the condition of the inner loop is satisfied, it is determined that the loop is an inner loop (step 130), and the process ends. .

【0029】一般的には、以上説明した方法によって、
与えられた一つの領域境界の内/外ループ識別をするこ
とができる。しかし、与えられた画像中の全ての領域境
界に関して同様の識別を行なう場合には、境界抽出処理
の方法を工夫することによって、最上左画素にある境界
点を求める処理(図7のステップ100に対応)を、さ
らに簡略化することができる。
Generally, by the method described above,
Inner / outer loop identification of a given area boundary can be performed. However, when the same identification is performed for all the region boundaries in a given image, the method of obtaining the boundary point at the uppermost left pixel (step 100 in FIG. 7) is devised by devising the method of the boundary extraction processing. Response) can be further simplified.

【0030】そのようにした処理アルゴリズムの例を図
9にフローチャートとして示す。この処理の内容の説明
に先立ち、境界(点列)抽出処理について説明する。
FIG. 9 is a flowchart showing an example of such a processing algorithm. Prior to the description of the contents of this processing, the boundary (point sequence) extraction processing will be described.

【0031】境界抽出処理の方法は、追跡型アルゴリズ
ムと走査型アルゴリズムに大別できる。追跡型アルゴリ
ズムは、画像を走査しながら、まだ追跡されていない境
界画素を見つけ出し、検出したならば、その境界上の境
界点を抽出してマークを付けた後、再び先の検出位置か
ら画像の走査を続ける、という方法である。このアルゴ
リズムの特徴は、メモリ上において、境界点情報が、最
上左画素の境界点を先頭に、追跡された順序に並ぶとい
うことである。
The method of the boundary extraction processing can be roughly classified into a tracking type algorithm and a scanning type algorithm. The tracking-type algorithm scans the image, finds a boundary pixel that has not been tracked yet, and if detected, extracts and marks a boundary point on the boundary, and then returns the image from the previous detection position again. This is a method of continuing scanning. The feature of this algorithm is that the boundary point information is arranged in the tracked order on the memory, starting from the boundary point of the upper left pixel.

【0032】もう一つの境界抽出方法である走査型アル
ゴリズムは、画像を走査しながら境界点があれば近傍と
の接続情報とともにそれを抽出し、後で(または同時
に)、接続情報に基づいて境界点を接続するという方法
である。その特徴は、メモリ上に、境界点情報が走査順
に並んでいるが、一つの境界の中では最上左画素の境界
点が最も先頭に記録されるということである。
The scanning type algorithm, which is another boundary extraction method, extracts the boundary point if there is a boundary point while scanning the image together with the connection information with the neighbors, and later (or simultaneously) extracts the boundary point based on the connection information. It is a method of connecting points. The feature is that the boundary point information is arranged in the memory in the scanning order, but the boundary point of the uppermost left pixel is recorded at the top of one boundary.

【0033】ここで、最上左画素の位置に複数の境界点
が存在し得ることを考慮し、上記の2種類の境界抽出処
理に次の制限を加える。すなわち、8連結の場合には図
8の(a)に示すようなパターンがあったとき、4連結
の場合には図8の(b)に示すようなパターンがあっと
きに、太い矢印で示された境界に関する境界点を、細い
矢印で示された境界に関する境界点より先に抽出する。
Here, considering that there may be a plurality of boundary points at the position of the uppermost left pixel, the following restrictions are applied to the above two types of boundary extraction processing. That is, when there is a pattern as shown in FIG. 8A in the case of 8-connection, and when there is a pattern as shown in FIG. Boundary points related to the performed boundary are extracted before the boundary points related to the boundary indicated by the thin arrow.

【0034】このような制限を付加することにより、追
跡型アルゴリズムであっても走査型アルゴリズムであっ
ても、最上左画素にある境界点のうちで最も重要な一つ
がメモリ上で最も先頭に近いところに記録されることに
なる。追跡型アルゴリズムであれば、さらに、最上左画
素の境界点のうちで最も重要なものが、その境界の追跡
開始対象となる。
By adding such a restriction, the most important one of the boundary points at the upper left pixel is closest to the head in the memory regardless of the tracking algorithm or the scanning algorithm. It will be recorded there. In the case of the tracking type algorithm, the most important one of the boundary points of the uppermost left pixel is a tracking start target of the boundary.

【0035】したがって、かかる制限を前提とするなら
ば、着目する最上左画素の位置に複数の境界点が存在し
得る場合にも、最上左画素の境界点の選定のための格別
の処理を行なう必要がなく、図9に示したような処理の
アルゴリズムを構築することが可能である。以下、図9
に示した処理を説明するが、境界点情報は既に抽出され
ているものとする。
Therefore, assuming this restriction, special processing for selecting the boundary point of the uppermost left pixel is performed even when there are a plurality of boundary points at the position of the uppermost left pixel of interest. It is not necessary, and it is possible to construct the processing algorithm as shown in FIG. Hereinafter, FIG.
Will be described, but it is assumed that the boundary point information has already been extracted.

【0036】まず、全ての境界点のラベルを0にセット
する(ステップ200)。つぎに、抽出された順に、つ
まりメモリ上で先頭のものから順に、ラベルが0の境界
点を取り出す(ステップ205)。ラベルが0の境界点
がなくなったときは(ステップ210)、処理を終了す
る。
First, the labels of all the boundary points are set to 0 (step 200). Next, the boundary points with the label 0 are extracted in the order of extraction, that is, in order from the top one in the memory (step 205). When there are no more boundary points with a label of 0 (step 210), the process ends.

【0037】ラベルが0の境界点を取り出せたならば、
この境界点は必ずある領域境界の最上左画素の境界点
(のうちで最も重要なもの)であるので、これをpとす
る(ステップ215)。そして、前記のような内/外ル
ープ判定条件に基づき、pの近傍での境界点の接続状況
あるいは、p近傍での画素パターンから、境界が外側ル
ープであるか内側ループであるか判定する(ステップ2
20〜235)。そしてこの境界に属する全ての境界の
ラベルを1にセットし(ステップ240)、ステップ2
05から処理を繰り返す。ステップ210で処理の終了
が判定された時点で、画像中の全境界について内/外ル
ープの別が確定する。
If the boundary point where the label is 0 can be extracted,
Since this boundary point is always the boundary point of the uppermost left pixel of a certain region boundary (the most important one), it is set to p (step 215). Then, based on the inner / outer loop determination condition as described above, it is determined whether the boundary is an outer loop or an inner loop from the connection state of the boundary point near p or the pixel pattern near p ( Step 2
20-235). Then, the labels of all the boundaries belonging to this boundary are set to 1 (Step 240), and Step 2
The process is repeated from 05. When the end of the processing is determined in step 210, the distinction of the inner / outer loop is determined for all the boundaries in the image.

【0038】なお、境界抽出に追跡型アルゴリズムを用
いるならば、境界抽出処理と同時に内/外ループ識別を
行なうことも可能である。何故ならば、追跡開始対象と
なる境界点は、その境界において最上左画素にある境界
点(のうち最も重要なもの)であるからである。すなわ
ち、追跡開始対象が見つかった時点で、その内/外ルー
プ識別を行なった上で、その境界に属する境界点にマー
クを付けながら境界を追跡するという処理を行なえばよ
いということである。
If a tracking type algorithm is used for boundary extraction, it is possible to perform inner / outer loop discrimination simultaneously with the boundary extraction processing. This is because the boundary point to be the tracking start target is the boundary point at the uppermost left pixel (the most important one) at the boundary. In other words, when the tracking start target is found, it is only necessary to perform the processing of identifying the inner / outer loop and then tracking the boundary while marking the boundary points belonging to the boundary.

【0039】[0039]

【発明の効果】以上の詳細な説明から明らかな如く、本
発明によれば、2値画像に限定されないデジタル画像一
般を対象とし、領域境界の最上左画素に位置する境界点
に注目して、これとその近傍の境界点との接続関係によ
り内/外側ループを判別することにより、少ない処理量
で高速に領域境界の内/外ループ識別を行なうことがで
きるようになる
As is apparent from the above detailed description, according to the present invention, a boundary point located at the upper leftmost pixel of an area boundary is intended for digital images in general, not limited to binary images.
And the connection between this and the nearby boundary points.
By determining the inner / outer loop, it becomes possible to perform the inner / outer loop identification of the region boundary at a high speed with a small amount of processing.

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

【図1】本発明を実施する処理系の一例の構成を示す。FIG. 1 shows a configuration of an example of a processing system for implementing the present invention.

【図2】(a)領域境界の最上左画素近傍の様子を外側
ループの場合について示す。 (b)領域境界の最上左画素近傍の様子を内側ループの
場合について示す。
FIG. 2A shows a state near an upper left pixel of an area boundary in the case of an outer loop. (B) The state near the top left pixel of the area boundary is shown for the case of the inner loop.

【図3】最上左画素の位置に同一境界の二つの境界点が
ある例を示す。
FIG. 3 shows an example in which there are two boundary points at the same boundary at the position of the upper left pixel.

【図4】座標系を示す。FIG. 4 shows a coordinate system.

【図5】最上左画素位置の境界点の近傍の位置を示す。FIG. 5 shows a position near a boundary point of an uppermost left pixel position.

【図6】(a)8連結の場合のマスクパターンを示す。 (b)8連結の場合のマスクパターンを示す。 (c)4連結の場合のマスクパターンを示す。FIG. 6A shows a mask pattern in the case of 8-connection. (B) shows a mask pattern in the case of 8-connection. (C) shows a mask pattern in the case of four connections.

【図7】一つの境界の内/外ループ識別の処理アルゴリ
ズムを示す。
FIG. 7 shows a processing algorithm for inner / outer loop identification of one boundary.

【図8】(a)8連結の場合のマスクパターンを示す。 (b)4連結の場合のマスクパターンを示す。FIG. 8A shows a mask pattern in the case of 8-connection. (B) shows a mask pattern in the case of four connections.

【図9】画像中の全ての領域境界の内/外ループ識別を
行なう処理のアルゴリズムを示す。
FIG. 9 shows an algorithm of processing for performing inner / outer loop discrimination of all area boundaries in an image.

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

1 CPU 2 イメージメモリ 3 プログラムメモリ 4 データメモリ 5 境界抽出処理プログラム 6 境界点情報 7 内/外ループ識別プログラム p 着目領域境界の最上左画素の境界点 Reference Signs List 1 CPU 2 Image memory 3 Program memory 4 Data memory 5 Boundary extraction processing program 6 Boundary point information 7 Inner / outer loop discriminating program

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 デジタル画像上の同じ画素値または同じ
ラベルを持つ画素の連結成分である領域の境界(以下、
領域境界という)が内側ループであるか外側ループであ
るかを識別する方法であって、 前記領域境界中の最上左画素に位置する境界点に注目
し、前記境界点とその近傍の境界点との局所的な接続関
係により、当該領域境界が内側ループであるか外側ルー
プであるかを識別することを特徴とする領域境界の内外
ループ識別方法。
1. A boundary of an area which is a connected component of pixels having the same pixel value or the same label on a digital image (hereinafter referred to as a boundary).
(Referred to as a region boundary) is an inner loop or an outer loop. The method according to claim 1, wherein a boundary point located at an upper left pixel in the region boundary is focused on. Characterized in that whether the area boundary is an inner loop or an outer loop is identified by the local connection relation of (1) and (2).
JP4233499A 1992-09-01 1992-09-01 Inner / outer loop identification method for region boundaries Expired - Lifetime JP2856989B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4233499A JP2856989B2 (en) 1992-09-01 1992-09-01 Inner / outer loop identification method for region boundaries

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4233499A JP2856989B2 (en) 1992-09-01 1992-09-01 Inner / outer loop identification method for region boundaries

Publications (2)

Publication Number Publication Date
JPH0683958A JPH0683958A (en) 1994-03-25
JP2856989B2 true JP2856989B2 (en) 1999-02-10

Family

ID=16955985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4233499A Expired - Lifetime JP2856989B2 (en) 1992-09-01 1992-09-01 Inner / outer loop identification method for region boundaries

Country Status (1)

Country Link
JP (1) JP2856989B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5362621B2 (en) 2010-03-02 2013-12-11 日立オートモティブシステムズ株式会社 Starter

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH026107A (en) * 1988-06-27 1990-01-10 Agency Of Ind Science & Technol Heating and curing process of fiber reinforced plastic by microwave

Also Published As

Publication number Publication date
JPH0683958A (en) 1994-03-25

Similar Documents

Publication Publication Date Title
JP4323328B2 (en) System and method for identifying and extracting character string from captured image data
US4408342A (en) Method for recognizing a machine encoded character
JP6268023B2 (en) Character recognition device and character cutout method thereof
JPH0778818B2 (en) Binary image processing method for decoding self-clocking symbol shape code
US6834121B2 (en) Apparatus for rough classification of words, method for rough classification of words, and record medium recording a control program thereof
EP0045803A1 (en) System and method for processing horizontal line characteristics in an image
EP1758048A2 (en) Character recognition apparatus and character recognition method
KR100383858B1 (en) Character extracting method and device
JP2856989B2 (en) Inner / outer loop identification method for region boundaries
JP2864735B2 (en) Object identification method and apparatus, and image processing method and apparatus for object identification
US7508986B2 (en) Document recognition device, document recognition method and program, and storage medium
JP3177138B2 (en) Extraction method of drawing closed area
JP2002133424A (en) Detecting method of inclination angle and boundary of document
KR20070022607A (en) Character recognition apparatus and character recognition method
JP3090070B2 (en) Form identification method and device
JP3957471B2 (en) Separating string unit
JP4282467B2 (en) Image area separation method
JPH11175662A (en) Method and device for recognizing pattern and recording medium recording program for allowing computer to execute the pattern recognizing method
JP2993533B2 (en) Information processing device and character recognition device
JP4209511B2 (en) Character recognition method, character recognition device, and computer-readable recording medium recording a program for causing a computer to execute the character recognition method
JP2002366900A (en) Optical character reader
JP2716291B2 (en) Paper information input device
JP2522511B2 (en) Image contour tracking unit
JP4136913B2 (en) Form recognition device and form recognition method
JP2646642B2 (en) Image inside / outside area judgment system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071127

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20081127

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20081127

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091127

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101127

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20111127

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20111127

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20121127

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121127

Year of fee payment: 14