Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0670797B2 - Image run length calculation method - Google Patents
[go: Go Back, main page]

JPH0670797B2 - Image run length calculation method - Google Patents

Image run length calculation method

Info

Publication number
JPH0670797B2
JPH0670797B2 JP1308263A JP30826389A JPH0670797B2 JP H0670797 B2 JPH0670797 B2 JP H0670797B2 JP 1308263 A JP1308263 A JP 1308263A JP 30826389 A JP30826389 A JP 30826389A JP H0670797 B2 JPH0670797 B2 JP H0670797B2
Authority
JP
Japan
Prior art keywords
pixel
contour line
run length
contour
chain code
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
JP1308263A
Other languages
Japanese (ja)
Other versions
JPH03167681A (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.)
Kawasaki Motors Ltd
Original Assignee
Kawasaki Jukogyo KK
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 Kawasaki Jukogyo KK filed Critical Kawasaki Jukogyo KK
Priority to JP1308263A priority Critical patent/JPH0670797B2/en
Publication of JPH03167681A publication Critical patent/JPH03167681A/en
Publication of JPH0670797B2 publication Critical patent/JPH0670797B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、画像のランレングスの算出方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for calculating an image run length.

従来の技術 従来から、物体の2値画像に基づいて、その物体の面積
および重心などの特徴パラメータを算出する場合には、
画像メモリにストアされている画素ごとの論理「0」ま
たは論理「1」がX方向(TV画面ラスタ走査方向)に連
続する画素数すなわちランレングスを、ハードウエアま
たはソフトウエアによつて、Y方向(ラスタ走査方向に
直行する方向)に順次的に求めておき、このランレング
ス・データをSRIアルゴリズム(連結性解析)により処
理することによつて個体分離を行つている。
2. Description of the Related Art Conventionally, when a characteristic parameter such as an area and a center of gravity of an object is calculated based on a binary image of the object,
The number of pixels in which the logic "0" or logic "1" for each pixel stored in the image memory is continuous in the X direction (TV screen raster scanning direction), that is, the run length, is determined by hardware or software in the Y direction. Individual determination is performed by sequentially obtaining the data in the direction (perpendicular to the raster scanning direction) and processing this run length data by the SRI algorithm (connectivity analysis).

発明が解決すべき課題 このような先行技術においては、ハードウエアでランレ
ングスを求める場合には短時間で算出はできるが、専用
のハードウエアが必要となり、装置が高価になるという
欠点がある。また、ソフトウエアでランレングスを求め
る場合には、画像データの連結領域を2次元的に探索し
て求める結果、処理時間がかかるという問題がある。
Problems to be Solved by the Invention In such a prior art, when the run length is obtained by hardware, the calculation can be performed in a short time, but there is a drawback that dedicated hardware is required and the apparatus becomes expensive. Further, when the run length is obtained by software, there is a problem that it takes a long processing time as a result of two-dimensionally searching the connected area of the image data.

さらに、ランレングス・データをSRIアルゴリズム(連
結性解析)で処理する過程に関しては、物体の形状が複
雑になり、物体の個数が多くなるほどランレングス・デ
ータが増加し、この結果、連結性解析で比較処理すべき
データの数が指数関数的に飛躍的に増大するために、処
理時間がかかるという問題がある。
Furthermore, regarding the process of processing run length data with the SRI algorithm (connectivity analysis), the shape of the object becomes complicated, and the run length data increases as the number of objects increases. There is a problem that the processing time is long because the number of data to be compared increases exponentially.

本発明の目的は、画像のランレングスを、簡単な構成で
短時間で算出することができるようにした画像のランレ
ングスの算出方法を提供することである。
An object of the present invention is to provide a method for calculating an image run length, which enables an image run length to be calculated in a short time with a simple configuration.

課題を解決するための手段 本発明は、X−Y座標を有する多数の画素によつて表さ
れる2値画像の輪郭を予め定める一方向に追跡して、輪
郭線の閉じたループを求め、 この追跡時に、輪郭線を構成する各画素毎のチエーンコ
ードを求め、 このチエーンコードは、輪郭線を構成する各画素の右、
右斜め上、上、左斜め上、左、左斜め下、下および右斜
め下に隣接する合計8つの画素の方向(0〜7)から成
り、 輪郭を追跡する際に、輪郭線を構成する各画素へ至る直
前の隣接する画素の第1のチエーンコードdir1と、輪郭
線を構成する前記画素から次に移動する直後の隣接する
画素の第2チエーンコードdir2との組合せによつて、X
方向またはY方向のいずれか一方の方向(実施例ではX
方向)のランレングス上の少なくとも2つの役割である
開始点Sおよび終了点Eを決定する判定表(第2表)を
予め決定しておき、 X方向またはY方向のいずれか他方の方向(実施例では
Y方向)の各座標y毎に、ランレングスの前記各役割S,
Eと、前記いずれか一方の方向(実施例ではX方向)の
開始点Sの座標x1と終了点Eの座標x2とを対応させてラ
ンレングステーブル(第17図)を作成し、 ランレングスn、 n=x2−x1+1 を算出することを特徴とする画像のランレングスの算出
方法である。
Means for Solving the Problems The present invention traces a contour of a binary image represented by a large number of pixels having XY coordinates in a predetermined direction to obtain a closed loop of contour lines, At the time of this tracking, a chain code for each pixel forming the contour line is obtained, and this chain code is on the right of each pixel forming the contour line,
Consists of a total of eight pixel directions (0 to 7) that are adjacent to diagonally upper right, upper, diagonally upper left, left, diagonally lower left, lower, and diagonally right lower, and configure the contour line when tracing the contour. By combining the first chain code dir1 of the adjacent pixel immediately before reaching each pixel and the second chain code dir2 of the adjacent pixel immediately after moving from the pixel forming the contour line, X
Direction or Y direction (X in the embodiment
Direction), a determination table (Table 2) for determining the start point S and the end point E, which are at least two roles on the run length, is determined in advance, and either the X direction or the Y direction (the other direction) is executed. For each coordinate y in the example (Y direction), each of the roles S,
A run length table (FIG. 17) is created by associating E with the coordinate x1 of the start point S and the coordinate x2 of the end point E in one of the above directions (X direction in the embodiment). , N = x2-x1 + 1 is calculated, and the run length of the image is calculated.

また本発明は、輪郭を左手で画素が論理「1」または論
理「0」のいずれか一方の論理値(実施例では論理
「1」)をたどるように、追跡し、 輪郭線を構成する各画素のチエーンコードを、隣接する
画素の右を「0」、右斜め上を「1」、上を「2」、左
斜め上を「3」、左を「4」、左斜め下を「5」、下を
「6」および右斜め下を「7」とするとき、判定表を、 に定めることを特徴とする。
Further, according to the present invention, the contour is traced with the left hand so that the pixel follows a logical value of either logic "1" or logic "0" (logic "1" in the embodiment), and each contour is configured. The chain code of the pixel is "0" for the right of the adjacent pixel, "1" for the upper right diagonal, "2" for the upper diagonal, "3" for the upper left diagonal, "4" for the left diagonal, and "5" for the lower diagonal left. , "6" for the bottom and "7" for the diagonally lower right, It is characterized by setting in.

作用 本発明に従えば、X−Y平面における多数の画素によつ
て表される2値画像の論理「1」または論理「0」のい
ずれか一方の論理値(後述の実施例では論理「1」)を
左手に見るようにして一方向に、すなわち実施例では反
時計方向に、その輪郭をたどつて追跡し、輪郭線画像の
閉じたループの包含関係を調べるという1次元的な探索
処理に基づいて個体分離を行い、個体分離に要する処理
時間を短くする。
Operation According to the present invention, either the logical value of the logical "1" or the logical "0" of the binary image represented by a large number of pixels in the XY plane (the logical "1" in the embodiment described later is used. )) In the left hand, the contour is traced in one direction, that is, counterclockwise in the embodiment, and the inclusion relation of the closed loop of the contour line image is investigated. Based on the above, the individual separation is performed and the processing time required for the individual separation is shortened.

この追跡時には、輪郭線を構成する各画素毎のチエーン
コードを、後述の第8図に示されるように、周囲に隣接
する合計8つの画素の方向(0〜7)に対応して定め、
その輪郭を追跡する際に、輪郭線を構成する各画素へ至
る直前の隣接する画素(すなわち輪郭線を構成する各画
素へ入つてくる直前の隣接する画素)の第1のチエーン
コードdir1を求めるとともに、その輪郭線を構成する前
記画素から次に移動する直後の隣接する画素(すなわち
輪郭線を構成する前記画素から出てゆく隣接する画素)
の第2のチエーンコードdir2を求め、こうして第1およ
び第2のチエーンコードdir1,dir2の組合せによつて、
輪郭線を構成する前記画素が、開始点Sであるか、また
は終了点Eであるかの少なくとも2つの役割S,Eを決定
する判定表を、たとえば後述の第2表のように予め決定
しておき、この判定表に基づいて、ランレングステーブ
ルを、後述の第17図に示されるように作成し、このラン
レングステーブルに関しては、X方向またはY方向のい
ずれか他方の方向(後述の実施例ではY方向)の各座標
y毎に、ランレングスの前記各役割S,Eと、前記いずれ
か一方の方向(後述の実施例ではX方向)の開始点Sの
座標x1と終了点Eの座標x2とを対応させて作成し、これ
によつて、前記いずれか他方の方向(上述のように1つ
の実施例ではY方向)の各座標y毎のランレングスnを
算出する。
At the time of this tracking, a chain code for each pixel forming the contour line is determined in correspondence with the directions (0 to 7) of a total of eight pixels adjacent to the periphery, as shown in FIG.
When tracing the contour, the first chain code dir1 of the adjacent pixel immediately before reaching each pixel forming the contour (that is, the immediately adjacent pixel entering each pixel forming the contour) is obtained. Together with the adjacent pixel immediately after moving from the pixel forming the contour line (that is, the adjacent pixel emerging from the pixel forming the contour line)
To obtain the second chain code dir2 of, and thus by the combination of the first and second chain codes dir1, dir2,
A determination table for determining at least two roles S and E of whether the pixel forming the contour line is the start point S or the end point E is determined in advance, for example, as in Table 2 described later. Based on this judgment table, a run-length table is created as shown in FIG. 17 described later, and this run-length table has either the X direction or the Y direction (the later-described direction). For each coordinate y in the Y direction), each of the roles S and E of the run length and the coordinate x1 and the end point E of the start point S in either one of the directions (X direction in the embodiment described later) The coordinate x2 is created in correspondence with the coordinate x2, and the run length n is calculated for each coordinate y in the other direction (Y direction in one embodiment as described above).

このような方法は、1次元探索であり、ソフトウエアで
実現しても処理時間が非常に短くてすみ、かつ特別なハ
ードウエアが不要であり、構成が簡略化される。
Such a method is a one-dimensional search, the processing time is very short even if it is realized by software, and no special hardware is required, and the configuration is simplified.

実施例 第1図は本発明の一実施例の全体のステツプを示すフロ
ーチヤートであり、第2図はその演算処理を行う構成を
示すブロツク図である。画像メモリ1には、物体をたと
えば撮像して得られた画素毎の2値画像がストアされて
おり、マイクロコンピユータなどによつて実現される処
理回路2は、この画像メモリ1にストアされている内容
を演算して特徴パラメータを算出する。この特徴パラメ
ータの算出にあたり、第1図のステツプn1〜ステツプn3
では、輪郭線の追跡を行い、ステツプn4〜n7では、基本
特徴パラメータ、すなわちモーメント、面積、重心、姿
勢角、外接長方形の各算出を行うとともに、最遠点およ
び最近点の検出を行い、それらの重心からの方向の算出
を行う。ステツプn8では、派生特徴パラメータ、すなわ
ちモーメント比率、面積率、アスペクト比などを算出
し、また対象物の穴に関する集計量の算出を行い、さら
に総面積および総周囲長などの算出を行う。
Embodiment FIG. 1 is a flow chart showing the overall steps of an embodiment of the present invention, and FIG. 2 is a block diagram showing a configuration for performing the arithmetic processing. The image memory 1 stores a binary image for each pixel obtained by imaging an object, for example, and the processing circuit 2 realized by a microcomputer or the like is stored in the image memory 1. The contents are calculated to calculate the characteristic parameter. In calculating the characteristic parameters, steps n1 to n3 in FIG. 1 are calculated.
Then, the contour line is tracked, and in steps n4 to n7, the basic feature parameters, that is, the moment, the area, the center of gravity, the posture angle, and the circumscribed rectangle are calculated, and the farthest point and the closest point are detected. The direction from the center of gravity of is calculated. In step n8, the derived characteristic parameters, that is, the moment ratio, the area ratio, the aspect ratio, etc. are calculated, the total amount of holes of the object is calculated, and the total area and the total perimeter are calculated.

まず、第1番目に、輪郭線の追跡の方法について説明す
る。第3図は画像メモリ1にストアされている暗背景中
の明物体を表す2値画像を示す。この第3図において、
黒丸は、第4図(1)で示されるように、論理「0」の
画素を示し、白丸は第4図(2)で示されるように論理
「1」の画素を示す。この画像中の物体の輪郭線を、次
の手順(1)〜(5)で探索する。
First, a method of tracking contour lines will be described first. FIG. 3 shows a binary image stored in the image memory 1 and representing a bright object in a dark background. In this FIG.
Black circles indicate pixels of logic "0" as shown in FIG. 4 (1), and white circles indicate pixels of logic "1" as shown in FIG. 4 (2). The contour line of the object in this image is searched by the following steps (1) to (5).

(1)第3図に示される2値画像の左上から右下に向つ
て、すなわちX方向に左方から右方に、かつY方向に上
から下にこの順序で、各画素が論理「0」すなわち暗か
ら論理「1」すなわち明へ変化する点を探索する。
(1) From the upper left to the lower right of the binary image shown in FIG. 3, that is, from the left to the right in the X direction and from the upper to the lower in the Y direction, in this order, each pixel has a logical "0". , Or dark to logical "1" or bright.

(2)第3図の四角枠30で囲んだ点が、輪郭線上の候補
として検出され、未だ輪郭線が追跡されていなければ、
この点は、マーカと呼ばれる追跡済みの情報をもたず、
輪郭追跡の開始点として決定される。各画素毎には、上
述のように追跡済みであるかどうかを表す情報を併せて
ストアしておく。
(2) If the point surrounded by the square frame 30 in FIG. 3 is detected as a candidate on the contour line and the contour line has not been traced yet,
This point has no tracked information called markers,
Determined as the starting point for contour tracking. For each pixel, information indicating whether or not the tracking has been completed is also stored as described above.

(3)第5図に示すように、輪郭線上の現在の画素をQ
とし、この画素Qに移動してくる前の画素をPとしたと
き、画素Qから移動する画素の探索を、第5図に従つて
処理する。すなわち画素Qの8つの近傍点のうち、画素
P→画素Qの方向上の画素P3と、その方向の左右にある
4つの画素P1,P2;P5,P4とを、P1→P5の順に調べ、最初
に見付けた論理「1」の画素を選択する。画素Qが開始
点であるときには、画素P1を開始点の左隣りの画素に選
ぶ。もし、この画素P1に探索済みのマーカがついていれ
ば、この輪郭探索を打ち切る。
(3) As shown in FIG. 5, set the current pixel on the contour line to Q.
When the pixel before moving to the pixel Q is P, the search for the pixel moving from the pixel Q is processed according to FIG. That is, of the eight neighboring points of the pixel Q, the pixel P3 in the direction of the pixel P → pixel Q and the four pixels P1, P2; P5, P4 on the left and right of the direction are examined in the order of P1 → P5, The first found pixel of logic "1" is selected. When the pixel Q is the starting point, the pixel P1 is selected as the pixel to the left of the starting point. If the pixel P1 has a searched marker, the contour search is terminated.

(4)このようにして輪郭線を追跡し、元の開始点に戻
つた時点で、輪郭追跡を終了する。第6図はこの追跡結
果を示す。輪郭線の追跡は、左手で画素が論理「1」の
領域をたどる形で行われるので、物体の輪郭線の追跡
は、この実施例では、反時計まわりとなる。第6図にお
いて、輪郭線は参照符31で示す。
(4) The contour line is traced in this way, and when the contour line is returned to the original starting point, the contour tracing is ended. FIG. 6 shows the traced result. Since the contour line is traced in such a manner that the pixel traces the area of logic "1" with the left hand, the contour line of the object is counterclockwise in this embodiment. In FIG. 6, the contour line is indicated by reference numeral 31.

このような手順は、穴の輪郭線の追跡に関しても同様に
実施される。穴の輪郭線の追跡は、第7図に示されるよ
うに、時計まわりに行なわれ、その穴の輪郭線は参照符
32で示される。第6図および第7図における開始点は二
重丸で示される。
Such a procedure is similarly performed for tracking the outline of a hole. Tracking the outline of a hole is performed clockwise as shown in FIG.
Indicated by 32. The starting points in FIGS. 6 and 7 are indicated by double circles.

(5)このように輪郭線追跡が完了すると、輪郭線31,3
2上の画素に、マーカと呼ばれる追跡済みの情報が付け
られる。したがつて再び前述のステツプ(1)におい
て、輪郭線31,32上の候補点、たとえば第6図の破線枠3
3で示される点が検出されても、その候補点には追跡済
みの情報であるマーカがストアされているので、それ以
上の追跡は行われない。
(5) When the contour line tracking is completed in this way, the contour lines 31,3
The tracked information called a marker is attached to the pixel on 2 above. Therefore, again in the above step (1), the candidate points on the contour lines 31 and 32, for example, the broken line frame 3 in FIG.
Even if the point indicated by 3 is detected, no further tracking is performed because the marker, which is the tracked information, is stored in the candidate point.

この輪郭線は、第6図における2重丸で示される開始点
S1と、そこからの移動方向を第8図に示す0〜7の数字
で順次表したチエーンコードによつて記録されてストア
される。たとえば第6図の開始点S1から開始される輪郭
線31のチエーンコードは、「54565465…」となる。
This contour line is the starting point indicated by the double circle in FIG.
It is recorded and stored by a chain code in which S1 and the moving direction from S1 are sequentially represented by the numbers 0 to 7 shown in FIG. For example, the chain code of the contour line 31 starting from the starting point S1 in FIG. 6 is “54565465 ...”.

このような手順(1)〜(5)による輪郭線の追跡の利
点(a1)〜(a3)を、列挙すると、次のようになる。
The advantages (a1) to (a3) of contour line tracking by the procedures (1) to (5) are listed below.

(a1)輪郭線が物体を表す場合でも穴を表す場合でも、
共通である。
(A1) Whether the contour line represents an object or a hole,
It is common.

(a2)構造が簡単で、処理が高速である。(A2) Simple structure and fast processing.

(a3)輪郭線追跡では、画像情報を1次元的に(線状
に)使用するので、物体の大きさ(面積)がN倍になり
画素数が増大しても、追跡に要する時間は、Nの平方根
倍にしかならない。
(A3) In contour line tracking, since image information is used one-dimensionally (in a linear form), even if the size (area) of the object is N times larger and the number of pixels increases, the time required for tracking is It is only the square root of N.

輪郭線の開始点の検出に要する時間の短縮を図るため
に、本発明の一実施例では、ハードウエアによつて、開
始点の検出を行う。そのために第9図に示される大きさ
3×3画素分のいわばマスクオペレータを採用する。こ
のマスクオペレータの各画素A〜Iは、各画素の能動値
すなわち、論理「0」または論理「1」を表す。次の第
1式または第2式を満たすとき、画素Eに対応する画素
を輪郭線の開始点の候補とし、その画像メモリ上のX−
Y座標系の位置を記憶する。
In order to reduce the time required to detect the starting point of the contour line, in one embodiment of the present invention, the starting point is detected by hardware. Therefore, a so-called mask operator for the size of 3 × 3 pixels shown in FIG. 9 is adopted. Each pixel A to I of this mask operator represents an active value of each pixel, that is, a logic "0" or a logic "1". When the following Expression 1 or Expression 2 is satisfied, the pixel corresponding to the pixel E is set as the candidate of the starting point of the contour line, and X-
Store the position of the Y coordinate system.

・・・・E=1(真理値) …(1) A・B・C・・E=1(真理値) …(2) このハードウエアの構成による輪郭線の開始点の検出で
は、たとえば第10図に示される四角枠の点が開始点の候
補となる。各候補点について、上述の輪郭線追跡の手順
を行う。各画素について、マーカによつて2重追跡を回
避する構成としているので、実際に輪郭線の開始点とな
るのは、四角枠の各画素のうち、2重丸の候補点だけに
なる。この開始点は、物体外周の開始点S1と穴の輪郭線
の開始点S2とが存在する。
... E = 1 (truth value) (1) A, B, C, ... E = 1 (truth value) (2) In the detection of the start point of the contour line by this hardware configuration, for example, The points in the square frame shown in Fig. 10 are candidates for the starting point. For each candidate point, the procedure for contour line tracking described above is performed. Since double tracking is avoided for each pixel by using a marker, only the double circle candidate point of each pixel of the square frame actually becomes the starting point of the contour line. This starting point includes a starting point S1 on the outer circumference of the object and a starting point S2 on the outline of the hole.

このような構成では、輪郭線の追跡における開始点の検
出をハードウエアの構成によつて行うようにしたので、
次に延べるソフトウエアによるコンピユータプログラム
を実行して開始点を検出する2次元探索に比べて、検出
速度を著しく向上することができるという利点がある。
In such a configuration, since the detection of the starting point in tracing the contour line is performed by the hardware configuration,
Next, there is an advantage that the detection speed can be remarkably improved as compared with the two-dimensional search in which the computer program by the software to be executed is executed to detect the starting point.

輪郭線の開始点の検出のために、ハードウエアの構成に
代えて、ソフトウエアによつて開始点を検出する手順を
本発明の他の実施例として、述べる。この手順は、いわ
ば、間引き方法であつて、第11図に示される1画像のX
方向およびY方向に、予め定める間隔m(この実施例で
はたとえばm=4)毎に各画素の論理値を調べる。論理
値が調べられるべき画素は、第11図において四角枠で示
されている。X方向に、第11図の左方から右方に一定間
隔m毎の画素の論理値を調べ、その論理値が、論理
「0」から論理「1」に変化する区間が見つかれば、こ
の区間内で、論理「0」から論理「1」へ変化する点
を、1画素毎に調べる。たとえば画素34が論理「0」で
あり、その次の調べられた画素35が論理「1」であると
きには、X方向に矢符36に沿つて、1画素毎に論理値が
画素34の論理値「0」から論理値「1」になつたかどう
かを調べていく。この結果、2重丸で示す点37が、画素
34,35間で論理「0」から論理「1」に変化した最初の
点であり、この画素37を開始点の候補として検出する。
その後開始点37から、輪郭線を追跡する。このようなソ
フトウエアによつて、画素を一定間隔mで、いわば間引
いて、輪郭線の開始点を検出するので、検査する画像デ
ータの数が大幅に削減され、処理の高速化を図ることが
できる。
In order to detect the starting point of the contour line, a procedure of detecting the starting point by software instead of the hardware configuration will be described as another embodiment of the present invention. This procedure is, so to speak, a thinning-out method, that is, the X of one image shown in FIG.
The logical value of each pixel is checked at predetermined intervals m (for example, m = 4 in this embodiment) in the Y direction and the Y direction. Pixels whose logical values are to be examined are indicated by a box in FIG. In the X direction, the logical values of the pixels at constant intervals m are checked from the left to the right in FIG. 11, and if a section in which the logical value changes from logic “0” to logic “1” is found, this section Inside, the point where the logic “0” changes to the logic “1” is examined for each pixel. For example, when the pixel 34 is a logical "0" and the next examined pixel 35 is a logical "1", the logical value of each pixel is the logical value of the pixel 34 along the arrow 36 in the X direction. It is checked whether or not the logical value has changed from "0" to "1". As a result, the dot 37 indicated by the double circle is the pixel
This is the first point between logic 34 and 35 that changes from logic "0" to logic "1", and this pixel 37 is detected as a candidate for the start point.
Then, from the starting point 37, the contour line is traced. With such software, pixels are thinned out at regular intervals m, so to speak, to detect the start point of the contour line, so that the number of image data to be inspected is significantly reduced, and the processing speed can be increased. it can.

上述の輪郭線の追跡の手順の後に、第2番目に、次に述
べるように物体と穴の判別および包含関係の決定を行
う。輪郭線が検出された後、構成する画素のうちで、第
12図に示すように、最も上であつて、そのうち、最も左
にある点、すなわち第6図、第7図および第10図におけ
る点S1S2を探し、その真上の画素を調べることによつ
て、その輪郭線が物体を表すかまたは穴を表すかを判定
することができる。たとえば第6図において、輪郭線31
は、開始点S1の真上の画素38が論理「0」であるので、
物体の輪郭線31であるものと判断する。また第7図の開
始点S2は、その真上の画素39が論理「1」であるので、
輪郭線32は穴の輪郭線であるものと判別する。物体の輪
郭線31を0−LOOP(Object Loop)、後者をH−LOOP(H
ole Loop)と呼び、ループ番号を付けて管理する。
After the above-described procedure of tracing the contour line, secondly, the discrimination between the object and the hole and the determination of the inclusion relation are performed as described below. After the contour is detected, the
As shown in FIG. 12, by searching for the point at the top and the leftmost of the points, that is, point S1S2 in FIGS. 6, 7, and 10, and examining the pixel directly above it, , It can be determined whether the contour represents an object or a hole. For example, in FIG. 6, contour line 31
Since the pixel 38 immediately above the starting point S1 is a logic "0",
It is determined that it is the contour line 31 of the object. Further, the starting point S2 in FIG. 7 is that the pixel 39 immediately thereabove is the logic "1",
The contour line 32 is determined to be the contour line of the hole. The contour line 31 of the object is 0-LOOP (Object Loop), and the latter is H-LOOP (H
ole Loop), and manage by assigning a loop number.

一方、輪郭線は、包含関係まで考慮すると、次のもの
(b1)〜(b4)が考えられる。
On the other hand, regarding the contour line, the following items (b1) to (b4) are considered when the inclusion relation is considered.

(b1)他の輪郭線に属さない物体の輪郭線(Master Obj
ect Loop、略称M−O−LOOP)。
(B1) Contour of an object that does not belong to other contours (Master Obj
ect Loop, abbreviated MO-LOOP).

(b2)上記輪郭線M−O−LOOPに属する穴の輪郭線(Ma
ster Hole Loop、略称M−H−LOOP)。
(B2) The contour line of the hole belonging to the contour line MO-LOOP (Ma
ster Hole Loop, abbreviation MH-LOOP).

(b3)上記輪郭線M−H−LOOPに属する物体の輪郭線
(Slave Object Loop、略称S−O−LOOP)。
(B3) A contour line (Slave Object Loop, abbreviated as S-O-LOOP) of an object belonging to the contour line MH-LOOP.

(b4)上記輪郭線S−O−LOOPに属する穴の輪郭線(Sl
ave Hole Loop、略称S−H−LOOP)。
(B4) Contour line of the hole belonging to the contour line S-O-LOOP (Sl
ave Hole Loop, abbreviated SH-LOOP).

第12図では、このような4つの輪郭線を示している。上
述の(b1)〜(b4)を、輪郭線、すなわちループの属性
と呼ぶことにする。この属性は、次の手順(6)〜
(8)によつて決定することができる。
FIG. 12 shows four such contour lines. The above (b1) to (b4) will be referred to as contour lines, that is, loop attributes. This attribute has the following procedure (6)-
It can be determined by (8).

(6)輪郭線に左上に存在するものから順にループ番号
を付ける。
(6) Loop numbers are assigned to the contour lines in order from the one located at the upper left.

(7)一番左上に存在する輪郭線の属性をM−O−LOOP
とする。
(7) The attribute of the contour line at the top left is MO-LOOP
And

(8)ループ番号の順に、第13図の輪郭線の開始点S3に
着目し、S3から左方に他の輪郭線を捜す。輪郭線が存在
すれば、ループ番号が現在着目している輪郭線のものよ
りも小さいはずであり、すでにその輪郭線の包含関係上
の属性が決定している。現在着目している輪郭線の種類
と左方の輪郭線の属性から第1表のように属性を決定す
る。
(8) Focusing on the starting point S3 of the contour line in FIG. 13 in the order of the loop number, search for another contour line to the left of S3. If there is a contour line, the loop number should be smaller than that of the contour line of interest at present, and the attribute of the contour line in relation to inclusion is already determined. The attribute is determined as shown in Table 1 from the type of contour line currently focused and the attribute of the left contour line.

ここで、*印の付いた属性は、左方の輪郭線が属する物
体に属するものとする。また、**印の付いた属性は、
左方の輪郭線に属するものとする。
Here, attributes marked with * belong to the object to which the left contour line belongs. The attributes marked with ** are
It shall belong to the left contour line.

次に第3番目に、本発明に従つてチエーンコードのラン
レングスデータへの変換手順を説明する。
Thirdly, the procedure for converting a chain code into run length data will be described according to the present invention.

本発明では、輪郭線追跡の手順は、従来からのランレン
グスの考え方を全く利用しないので、複雑な形状の物体
の検出が容易であり、輪郭線の情報から、ランレングス
に相当するデータを直ちに演算して求めることができ
る。たとえば第14図では、追跡した輪郭線上の点列を示
したものであり、図中、四角枠の部分がある水平方向、
すなわちX方向におけるランレングスに対応している。
参照符Sは輪郭線の開始点を示す。
In the present invention, the procedure of contour line tracking does not use the conventional idea of run length at all, so that it is easy to detect an object having a complicated shape, and from the information of the contour line, data corresponding to run length can be immediately obtained. It can be calculated and obtained. For example, FIG. 14 shows a sequence of points on the traced contour line. In the figure, in the horizontal direction where there is a rectangular frame,
That is, it corresponds to the run length in the X direction.
Reference mark S indicates the starting point of the contour line.

今、輪郭線上の任意の3点に着目し、第15図に示すよう
に、Pi-1,P1,Pi+1とする。点Pi-1から点P1へのチエー
ンコードをdir1とし、点P1からPi+1へのチエーンコード
をdir2とすると、dir1とdir2との関係から、第2表に示
すように、一意的に、点P1のランレングス上の役割(す
なわちrole)S,E,T,Xが決定される。
Now, paying attention to arbitrary three points on the contour line, as shown in FIG. 15, let P i−1 , P 1 and P i + 1 . Assuming that the chain code from the point P i-1 to the point P 1 is dir1 and the chain code from the point P 1 to P i + 1 is dir2, as shown in Table 2 from the relationship between dir1 and dir2, The run length roles S, E, T, and X of the point P 1 are uniquely determined.

第16図は、このようなランレングス上の役割の例を示
し、第16図(1)〜第16図(9)のチエーンコードdir
1,dir2とその役割を第3表に示す。
FIG. 16 shows an example of such a role on the run length, and the chain code dir of FIGS. 16 (1) to 16 (9).
Table 3 shows 1, dir2 and its role.

そこで次に、輪郭線を構成するすべての画素のX−Y座
標を求め、ループ番号(すなわちmarK)、およびランレ
ングス上の役割(すなわちrole)とともに、第17図に示
すテーブルを作成する。たとえば第14図において、Y座
標がyであるライン40上で、輪郭線上の点をR1,R2と
し、そのX座標がx1,x2としたとき、第17図において輪
郭点列情報に、Y座標に対応して、X座標と、その役割
S,Eがストアされる。markは閉ループを管理する情報、r
oleはランの開始終了、その他を表す情報である。
Then, next, the XY coordinates of all the pixels forming the contour line are obtained, and the table shown in FIG. 17 is created together with the loop number (that is, marK) and the role (that is, role) on the run length. For example, in FIG. 14, when the points on the contour line are R1 and R2 and the X coordinates are x1 and x2 on the line 40 where the Y coordinate is y, the contour point sequence information in FIG. Corresponding to, the X coordinate and its role
S and E are stored. mark is the information that manages the closed loop, r
ole is information indicating the start and end of the run, and the like.

この第17図のテーブルでは、輪郭点列情報を昇順に並
べ、すなわちX座標を小さい値から大きい値に順番に並
べ、後述の演算で利用しやすくする。
In the table of FIG. 17, the outline point sequence information is arranged in ascending order, that is, the X coordinate is arranged in order from a small value to a large value to make it easy to use in the calculation described later.

第14図におけるY座標yのライン40上のランレングスn
は、次の第3式のとおりとなる。
Run length n on line 40 of Y coordinate y in FIG.
Is as in the following third formula.

n=x2−x1+1 …(3) こうしてランレングスnを簡単に求めることができる。
第16図(4)、第16図(7)および第16図(8)のよう
に、役割Tであるとき、X方向(第16図の左右方向)の
画素は単一個であり、したがつてランレングスnは1で
ある。第17図のテーブルを、以下の説明では、ランレン
グステーブル(略称RLT)と呼ぶことにする。
n = x2-x1 + 1 (3) In this way, the run length n can be easily obtained.
As shown in FIGS. 16 (4), 16 (7) and 16 (8), when the role is T, there is a single pixel in the X direction (left and right direction in FIG. 16). As a result, the run length n is 1. The table of FIG. 17 will be referred to as a run length table (abbreviated as RLT) in the following description.

このランレングステーブルを用いることによつて、たと
えば第18図に示されるようにY座標yであるライン41上
で、第17図の輪郭点列情報としては、4つの点42〜45の
X座標がストアされ、その役割S,Eもまたストアされ、
こうして物体の輪郭線46のランレングスna,nbを容易に
算出することができる。
By using this run length table, for example, on the line 41 having the Y coordinate y as shown in FIG. 18, the contour point sequence information of FIG. 17 has the X coordinates of the four points 42 to 45. Is stored, and its roles S and E are also stored,
In this way, the run lengths na and nb of the contour line 46 of the object can be easily calculated.

また、たとえば第19図に示されるように、物体の輪郭線
47と穴の輪郭線48,49が存在し、このときY座標のライ
ン50では、第17図の輪郭点列情報として、点51〜56をス
トアし、これらの点51〜56の役割S,Eをストアし、この
ようにして、ランレングスnc,nd,neを算出することがで
きる。
Also, for example, as shown in FIG. 19, the contour line of the object
47 and hole outlines 48, 49 exist, and at this time, in the Y-coordinate line 50, points 51 to 56 are stored as the outline point sequence information in FIG. 17, and the roles S and 51 of these points 51 to 56 are stored. E can be stored and the run length nc, nd, ne can be calculated in this way.

本発明では、このように第18図および第19図に示される
比較的複雑な画像において、ランレングスを簡便に求め
ることができるという優れた利点がある。
The present invention has an excellent advantage that the run length can be easily obtained in the relatively complicated images shown in FIGS. 18 and 19.

第4番目に、ランレングステーブルを用いて、特徴パラ
メータである重心および姿勢角を算出する手順を述べ
る。
Fourth, the procedure for calculating the center of gravity and the posture angle that are the characteristic parameters using the run length table will be described.

一般に、物体の面積、重心を求める場合、論理値が
「1」の画素を数えればよいが、画像情報を2次元的
(面状)に調べなければならない。また、姿勢角を求め
るには、さらにX座標Y座標の自乗の演算を含む慣性モ
ーメントを算出する必要があり、この演算に要する時間
は大きくなる。
Generally, in order to obtain the area and the center of gravity of an object, it is sufficient to count the pixels having a logical value of "1", but the image information must be examined two-dimensionally (planarly). Further, in order to obtain the attitude angle, it is necessary to further calculate the moment of inertia including the calculation of the square of the X coordinate and the Y coordinate, and the time required for this calculation becomes long.

たとえば、第20図の物体の面積を求めるには、各Y座標
毎に値1の画素の数すなわちラインSi(図中破線部で示
すランレングス)を算出し、物体を構成するすべてのSi
の総和をとればよいが、2値画像をすべて調べることに
なる。
For example, in order to obtain the area of the object shown in FIG. 20, the number of pixels with a value of 1 for each Y coordinate, that is, the line Si (run length shown by the broken line in the figure) is calculated, and all the Si constituting the object are calculated.
However, all binary images will be examined.

しかし、前述のランレングステーブルを用いると、Siの
両端点のX座標がただちにわかるので、 によつて、面積を容易に求めることができる。
However, using the run length table described above, the X coordinates of the two end points of Si can be immediately known. Therefore, the area can be easily obtained.

同様に、上記物体の原点まわりのモーメント類は、上記
niを用いると次式で表すことができるので、これらも、
ランレングステーブルの情報から求められることにな
る。
Similarly, the moments around the origin of the object are
Since ni can be expressed by the following equation, these also
It will be obtained from the information in the run length table.

Y軸についての1次モーメント(幾何モーメント)は、 Y軸についての2次モーメント(慣性モーメント)は、 X軸についての1次幾何モーメントは、 X軸についての2次モーメント(慣性モーメント)、 慣性乗積モーメントは、 ただし、 を簡略化したものである。The first moment (geometric moment) about the Y-axis is The second moment (moment of inertia) about the Y-axis is The first geometrical moment about the X axis is Second moment (moment of inertia) about X axis, The product moment of inertia is However, Is a simplified version of.

第6式〜第10式の演算をすると、第20図の重心G(gx,g
y)と姿勢角θは、次のように算出できる。
When the equations 6 to 10 are calculated, the center of gravity G (gx, g
y) and the attitude angle θ can be calculated as follows.

gx=(第8式の値)/面積 …(11) gy=(第9式の値)/面積 …(12) θ=−(90−θ1)A≧0 B<0 …(13) θ=−θ1 A≧0 B≧0 …(14) θ= θ1 A<0 B≧0 …(15) θ=90−θ1 A<0 B<0 …(16) ただし、 A=(第10式の値)−(第8式の値)×(第6式の値)
/面積 …(18) B={(第9式の値)−(第7式の値)}×(1−1/面
積) …(19) tan2・θ1=2A/B …(20) とする。
gx = (value of formula 8) / area ... (11) gy = (value of formula 9) / area ... (12) θ = − (90−θ1) A ≧ 0 B <0 ... (13) θ = −θ1 A ≧ 0 B ≧ 0 (14) θ = θ1 A <0 B ≧ 0 (15) θ = 90−θ1 A <0 B <0 (16) where A = (value of expression 10 )-(Value of expression 8) x (value of expression 6)
/ Area ... (18) B = {(value of the ninth equation)-(value of the seventh equation)} × (1-1 / area) ... (19) tan2.theta.1 = 2A / B ... (20) .

面積は、前述の第5式から求められる。The area is obtained from the above-mentioned fifth formula.

第5番目に、派生特徴パラメータの算出を、前述のよう
にして算出した物体および穴に関する基本特徴パラメー
タに基づいて、算出する。基本特徴パラメータは、面
積、重心、周囲長、慣性モーメント、姿勢角、長軸長、
短軸長、最遠点、最近点などで、派生特徴パラメータ
は、物体のモーメント比率、面積比率、アスペクト比な
どの比率計算や物体の穴に関する総面積、総周囲長など
の集計計算などである。
Fifth, the derived feature parameter is calculated based on the basic feature parameter relating to the object and the hole calculated as described above. Basic feature parameters are area, center of gravity, perimeter, moment of inertia, attitude angle, major axis length,
Derived feature parameters such as minor axis length, farthest point, nearest point, etc., such as ratio calculation of moment ratio, area ratio, aspect ratio, etc. of objects, total calculation of object hole area, total perimeter, etc. .

上述の実施例では輪郭線の追跡は、左手で画素が論理
「1」の領域をたどるように、すなわち図示の実施例で
は反時計方向にたどるように行われたけれども、本発明
の他の実施例として、右手で画素が論理「1」の領域を
たどるように、すなわち時計方向にたどるように輪郭線
の追跡が行われてもよく、このとき第2表の判定表で
は、開始点をEとし、終了点をSとして読み換えること
によつて、第2表をそのまま用いることができる。さら
にまた他の実施例として、左手または右手で画素が論理
「0」の領域をたどるように輪郭線の追跡を行うように
してもよい。
Although in the above-described embodiment the contour tracing was done so that the pixel follows the area of the logical "1" with the left hand, i.e., counterclockwise in the illustrated embodiment, other implementations of the invention. As an example, the contour line may be traced so that the pixel traces the region of logic "1" with the right hand, that is, the trace in the clockwise direction. At this time, in the judgment table of Table 2, the start point is set to E. By replacing the end point with S, the second table can be used as it is. As yet another example, the contour line may be traced so that the pixel traces the area of logic "0" with the left hand or the right hand.

発明の効果 本発明によれば、輪郭線を1次元のデータ列であるチエ
ーンコードとして扱い、個体分離に要する処理時間を短
くすることができる。
EFFECTS OF THE INVENTION According to the present invention, a contour line is treated as a chain code which is a one-dimensional data string, and the processing time required for individual separation can be shortened.

さらに本発明によれば、チエーンコードは、輪郭線を構
成する各画素の右、右斜め上、上、左斜め上、左、左斜
め下、下および右斜め下に隣接する合計8つの画素の方
向を、第8図に示されるように「0」〜「7」にそれぞ
れ定めて、判定表を予め決定しておき、これによつて輪
郭を追跡する際にランレングステーブルを作成し、その
後は、このランレングステーブルに基づいて、X方向ま
たはY方向のいずれか他方の方向(たとえばY方向)の
各座標y毎にランレングスnを演算して算出することが
でき、短時間でランレングスを算出することが可能とな
る。
Further, according to the present invention, the chain code includes a total of eight pixels adjacent to the right, right diagonally upper, upper, left diagonally upper, left, left diagonally lower, lower and diagonally right lower of each pixel forming the contour line. The direction is set to "0" to "7" as shown in FIG. 8, and the determination table is determined in advance, whereby a run length table is created when tracing the contour, and thereafter. Can be calculated by calculating the run length n for each coordinate y in either the X direction or the Y direction (for example, the Y direction) based on this run length table, and the run length can be calculated in a short time. Can be calculated.

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

第1図は本発明の一実施例の手順を示すフローチヤー
ト、第2図は本実施例の一実施例の構成を示すブロツク
図、第3図は輪郭線追跡を行う暗背景中の明物体を示す
一画像の図、第4図は画素の論理値を示す図、第5図は
探索する画素を示す図、第6図は物体の追跡結果を示す
図、第7図は穴の追跡結果を示す図、第8図はチエーン
コードの原理を示す図、第9図はハードウエアの構成に
よつて開始点を検出するために用いられるオペレータの
図、第10図はハードウエアの構成による候補点の検出を
示す2値画像を示す図、第11図はソフトウエアによつて
開始点を検出するときにおける候補点の検出を示す図、
第12図は輪郭線の属性を示す図、第13図は輪郭線の開始
点S3に関して説明を行うための図、第14図は輪郭線上の
点列を説明する図、第15図は輪郭線上の3つの点とチエ
ーンコードとを示す図、第16図は各点の役割を説明する
ための図、第17図は本発明に従う輪郭点列テーブルを示
す図、第18図は輪郭点列情報を説明するための図、第19
図は他の輪郭点列情報を説明するための図、第20図は物
体の面積の算出の手順を示す図である。 1……画像メモリ、2……処理回路、S1,S2……開始点
FIG. 1 is a flow chart showing the procedure of one embodiment of the present invention, FIG. 2 is a block diagram showing the construction of one embodiment of the present invention, and FIG. 3 is a bright object in the dark background for contour line tracing. FIG. 4 is a diagram showing a logical value of a pixel, FIG. 5 is a diagram showing a pixel to be searched, FIG. 6 is a diagram showing a tracking result of an object, and FIG. 7 is a tracking result of a hole. , FIG. 8 is a diagram showing the principle of the chain code, FIG. 9 is a diagram of an operator used to detect the starting point by the hardware configuration, and FIG. 10 is a candidate by the hardware configuration. The figure which shows the binary image which shows the detection of the point, Figure 11 the figure which shows the detection of the candidate point when detecting the starting point with the software,
FIG. 12 is a diagram showing the attributes of the contour line, FIG. 13 is a diagram for explaining the starting point S3 of the contour line, FIG. 14 is a diagram for explaining the point sequence on the contour line, and FIG. 15 is the contour line. Showing the three points and the chain code, FIG. 16 is a view for explaining the role of each point, FIG. 17 is a view showing a contour point sequence table according to the present invention, and FIG. 18 is a contour point sequence information. Figure 19 to explain the
The figure is a diagram for explaining other contour point sequence information, and FIG. 20 is a diagram showing a procedure for calculating the area of an object. 1 ... Image memory, 2 ... Processing circuit, S1, S2 ... Starting point

───────────────────────────────────────────────────── フロントページの続き (72)発明者 平松 新 兵庫県明石市川崎町1番1号 川崎重工業 株式会社明石工場内 (72)発明者 小倉 一樹 兵庫県明石市川崎町1番1号 川崎重工業 株式会社明石工場内 (72)発明者 中村 洋一 兵庫県明石市川崎町1番1号 川崎重工業 株式会社明石工場内 (56)参考文献 特開 昭59−55583(JP,A) 特開 平1−277976(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Shin Hiramatsu 1-1 Kawasaki-cho, Akashi-shi, Hyogo Prefecture Kawasaki Heavy Industries Ltd. Akashi Plant Co., Ltd. (72) Kazuki Ogura 1-1, Kawasaki-cho, Akashi-shi, Hyogo Kawasaki Heavy Industries Akashi Plant Co., Ltd. (72) Inventor Yoichi Nakamura 1-1 Kawasaki-cho, Akashi-shi, Hyogo Kawasaki Heavy Industries Ltd. Akashi Plant Co., Ltd. (56) Reference JP-A-59-55583 (JP, A) JP-A-1- 277976 (JP, A)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】X−Y座標を有する多数の画素によつて表
される2値画像の輪郭を予め定める一方向に追跡して、
輪郭線の閉じたループを求め、 この追跡時に、輪郭線を構成する各画素毎のチエーンコ
ードを求め、 このチエーンコードは、輪郭線を構成する各画素の右、
右斜め上、上、左斜め上、左、左斜め下、下および右斜
め下に隣接する合計8つの画素の方向(0〜7)から成
り、 輪郭を追跡する際に、輪郭線を構成する各画素へ至る直
前の隣接する画素の第1のチエーンコードdir1と、輪郭
線を構成する前記画素から次に移動する直後の隣接する
画素の第2チエーンコードdir2との組合せによつて、X
方向またはY方向のいずれか一方の方向のランレングス
上の少なくとも2つの役割である開始点Sおよび終了点
Eを決定する判定表を予め決定しておき、 X方向またはY方向のいずれか他方の方向の各座標y毎
に、ランレングスの前記各役割S,Eと、前記いずれか一
方の方向の開始点Sの座標x1と終了点Eの座標x2とを対
応させてランレングステーブルを作成し、 ランレングスn、 n=x2−x1+1 を算出することを特徴とする画像のランレングスの算出
方法。
1. A contour of a binary image represented by a large number of pixels having XY coordinates is traced in one predetermined direction,
The closed loop of the contour line is obtained, and at the time of this tracking, the chain code for each pixel forming the contour line is obtained. This chain code is the right of each pixel forming the contour line,
Consists of a total of eight pixel directions (0 to 7) that are adjacent to diagonally upper right, upper, diagonally upper left, left, diagonally lower left, lower, and diagonally right lower, and configure the contour line when tracing the contour. By combining the first chain code dir1 of the adjacent pixel immediately before reaching each pixel and the second chain code dir2 of the adjacent pixel immediately after moving from the pixel forming the contour line, X
The determination table for determining the start point S and the end point E that are at least two roles on the run length in either the direction Y or the direction Y is determined in advance, and the determination table for either the direction X or the direction Y is determined. For each coordinate y in the direction, a run length table is created by associating each of the roles S and E of the run length with the coordinate x1 of the start point S and the coordinate x2 of the end point E in one of the directions. , Run length n, n = x2-x1 + 1 is calculated.
【請求項2】輪郭を、左手で画素が論理「1」または論
理「0」のいずれか一方の論理値をたどるように、追跡
し、 輪郭線を構成する各画素のチエーンコードを、隣接する
画素の右を「0」、右斜め上を「1」、上を「2」、左
斜め上を「3」、左を「4」、左斜め下を「5」、下を
「6」および右斜め下を「7」とするとき、判定表を、 に定めることを特徴とする請求項1記載の画像のランレ
ングスの算出方法。
2. The contour is traced so that the pixel follows the logical value of either logic "1" or logic "0" with the left hand, and the chain code of each pixel forming the contour is adjacent. "0" to the right of the pixel, "1" to the upper right, "2" to the upper, "3" to the upper left, "4" to the left, "5" to the lower left, "6" to the lower, and so on. When setting the diagonally lower right to "7", the judgment table The run length calculation method of an image according to claim 1, wherein the run length is calculated.
JP1308263A 1989-11-28 1989-11-28 Image run length calculation method Expired - Lifetime JPH0670797B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1308263A JPH0670797B2 (en) 1989-11-28 1989-11-28 Image run length calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1308263A JPH0670797B2 (en) 1989-11-28 1989-11-28 Image run length calculation method

Publications (2)

Publication Number Publication Date
JPH03167681A JPH03167681A (en) 1991-07-19
JPH0670797B2 true JPH0670797B2 (en) 1994-09-07

Family

ID=17978907

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1308263A Expired - Lifetime JPH0670797B2 (en) 1989-11-28 1989-11-28 Image run length calculation method

Country Status (1)

Country Link
JP (1) JPH0670797B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2715599B1 (en) * 1994-01-28 1996-03-01 Thomson Csf Method for controlling a robot in three-dimensional space and robot moving in such a space.
US8079656B2 (en) * 2006-12-22 2011-12-20 Palo Alto Research Center Incorporated Method for decimation of images

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5955583A (en) * 1982-09-22 1984-03-30 Fujitsu Ltd Contour pattern recognizing system
JPH01277976A (en) * 1988-04-28 1989-11-08 Meidensha Corp Image processor

Also Published As

Publication number Publication date
JPH03167681A (en) 1991-07-19

Similar Documents

Publication Publication Date Title
US6674904B1 (en) Contour tracing and boundary detection for object identification in a digital image
WO2009128505A1 (en) Image inspection apparatus
JP2002202838A (en) Image processing device
CN108986152A (en) A kind of foreign matter detecting method and device based on difference image
JP2003030653A (en) Image processing method, apparatus, and bonding apparatus
CN119445005A (en) A point cloud image fusion method based on vision
CN120070804A (en) Multi-shape tunnel three-dimensional modeling method and system based on laser point cloud
JPH0670797B2 (en) Image run length calculation method
JP4221534B2 (en) Feature extraction method for binary image
CN116843766B (en) A calibration method, apparatus and system for line structured light devices
JPH08161508A (en) Pattern detection method
JPH076777B2 (en) Pattern contour detection method and length measuring apparatus using this method
JPH0512442A (en) Line image tracking method
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP2000207557A (en) Position displacement measurement method
JPH06160047A (en) Pattern matching method
JPH0713997B2 (en) Wafer alignment angle detection device
JP2006185038A (en) Four- or n-dimensional labeling apparatus, and four- or n-dimensional spatial filter apparatus
JP2611020B2 (en) Object recognition method
JP4258340B2 (en) Pantograph detection device
JPH08171627A (en) Calibration pattern centroid detection method
JP2648882B2 (en) Contour straight line detection method
JP3031011B2 (en) Calculation method of area, center of gravity, and principal axis of inertia using chain code
JP2522277B2 (en) Image recognition device
JP3747595B2 (en) Arc position estimation method

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20080907

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20090907

Year of fee payment: 15

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

Free format text: PAYMENT UNTIL: 20100907

Year of fee payment: 16

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

Free format text: PAYMENT UNTIL: 20100907

Year of fee payment: 16