JPH07104908B2 - Image processing method - Google Patents
Image processing methodInfo
- Publication number
- JPH07104908B2 JPH07104908B2 JP59086596A JP8659684A JPH07104908B2 JP H07104908 B2 JPH07104908 B2 JP H07104908B2 JP 59086596 A JP59086596 A JP 59086596A JP 8659684 A JP8659684 A JP 8659684A JP H07104908 B2 JPH07104908 B2 JP H07104908B2
- Authority
- JP
- Japan
- Prior art keywords
- contour
- code
- point
- pattern
- image information
- 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
Links
Landscapes
- Character Discrimination (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】 [技術分野] 本発明は、画像情報の輪郭を処理してコード化する画像
処理方法に関するものである。Description: TECHNICAL FIELD The present invention relates to an image processing method for processing and coding an outline of image information.
[従来技術] 従来、画像情報の輪郭を処理してコード化する場合、各
輪郭点における輪郭線方向を第1図に示す1〜8の方向
コードにしたがって量子化したコードとして求める方法
をとっていた。[Prior Art] Conventionally, when the contour of image information is processed and coded, the contour line direction at each contour point is obtained as a quantized code according to the direction codes 1 to 8 shown in FIG. It was
しかし、この方法では、例えば第2図に示す様なパター
ンがあつた場合、図のS1を始点とし、時計回りに輪郭を
追跡した時に得られる方向コードは、第3図に示す様に
なり、本来連続的に変化する方向コードが、第3図のA,
Bの部分(第2図のa,bに対応)で示す様に、コード上不
連続になつてしまい、認識する際に不都合を生じる。However, in this method, when there is a pattern as shown in Fig. 2, for example, the direction code obtained when tracing the contour clockwise starting from S 1 in the diagram is as shown in Fig. 3. , The direction code which originally changes continuously is A, in FIG.
As indicated by the portion B (corresponding to a and b in FIG. 2), the code becomes discontinuous, which causes inconvenience in recognition.
さらに、上記の不連続性を防ぐ手段として、第1図の
( )で示す如く、方向コード「8」から「1」に変化
する場合等、方向コードが不連続に変化する場合には、
方向コードの値に8を加減算して連続性を保つ方法があ
る。この方法によれば、前記第2図のパターンの場合、
そのコードは第4図(a)に示す様に連続となる。Further, as a means for preventing the above discontinuity, when the direction code changes discontinuously, such as when the direction code "8" changes to "1", as shown by () in FIG.
There is a method of maintaining continuity by adding / subtracting 8 to / from the direction code value. According to this method, in the case of the pattern shown in FIG.
The code is continuous as shown in FIG.
しかし、この方法では、パターンの輪郭を1周して、輪
郭追跡の開始点に戻つて来た時に、第2図のS1に示す様
に、その開始点におけるコードが最初に求めたコードと
一致しない。However, in this method, when the contour of the pattern is rotated once and returned to the start point of contour tracing, the code at that start point is the code obtained at the beginning as shown in S 1 of FIG. It does not match.
言いかえると、開始点の前後でコードの値が不連続であ
る。このことは、同一パターンにおいても開始点の位置
により、得られるコード列が変化してしまうということ
になる。例えば、第2図で開始点をS2とし、やはり輪郭
を時計回りに追跡していつた時に得られる方向コードは
第4図(b)の様になり、(a)で示したものとはかな
り違つたものとなつている。このことは、元のパターン
が回転した場合等による開始点の変化が、その後の認識
を困難にするということを意味する。In other words, the code values are discontinuous before and after the starting point. This means that even in the same pattern, the obtained code string changes depending on the position of the starting point. For example, if the starting point is S 2 in FIG. 2 and the contour is traced clockwise, the direction code obtained when it is as shown in FIG. 4B is considerably different from that shown in FIG. It is different. This means that a change in the starting point due to the rotation of the original pattern or the like makes subsequent recognition difficult.
さらに、不連続であることを見い出して、コードに8を
加減算することは、かかる処理を複雑にする。Moreover, finding discontinuities and adding or subtracting 8 to the code complicates such processing.
[目的] 以上の点に鑑み、本発明は上記欠点を除去し画像情報の
輪郭を連続したデータとしてとらえ、画像情報の位置ず
れ、回転などに影響されない安定した画像情報の輪郭の
処理が可能な画像処理方法を提供すことにある。[Purpose] In view of the above points, the present invention eliminates the above-mentioned defects, captures the contours of image information as continuous data, and enables stable processing of contours of image information that is not affected by displacement or rotation of image information. An object is to provide an image processing method.
以下、図面を参照し、本願発明について詳細に説明す
る。本願でいう画像は文字、マーク、記号、絵等を示す
ものである。Hereinafter, the present invention will be described in detail with reference to the drawings. The image referred to in the present application indicates characters, marks, symbols, pictures and the like.
第5図は本願発明の適用が可能な画像処理装置の1例を
示す図である。なお、この様な構造に限る必要はない。
10はハンデイ型の画像処理装置本体で、11は光源、12は
読み取るべき原稿である。なお13は光学系で、光源11及
び原稿12上のパターンからの光を光電変換素子(例えば
面状CCD)14に導く。15は光電変換素子14から出力デー
タ処理及び/又は出力を行う処理部である。FIG. 5 is a diagram showing an example of an image processing apparatus to which the present invention can be applied. It is not necessary to limit to such a structure.
Reference numeral 10 is a handy type image processing apparatus main body, 11 is a light source, and 12 is a document to be read. An optical system 13 guides light from the light source 11 and the pattern on the original 12 to a photoelectric conversion element (for example, a planar CCD) 14. Reference numeral 15 is a processing unit that processes and / or outputs output data from the photoelectric conversion element 14.
次に前記処理部15について、詳細に説明する。第6−1
図は前記処理部15のブロツク図である。16は前処理回路
で入力パターンに対し、2値化、ノイズ除去等を行う。
次にCPU17及びメモリ18によつてパターンの特徴を抽出
する。特徴抽出については、第6−2図に示す流れとな
る。つまり、1次特徴抽出で該パターンの輪郭情報をコ
ード化する。そしてパターンあるいは抽出法によつては
そのコードをそのまま用いる。又、更に2次特徴抽出に
より前記コード列とは別の特徴を抽出してもよい。そし
て以上によつて得られた特徴について、メモリ18等の辞
書と照合したり、あるいは類似度や相関を計算し、該パ
ターンを判定する。又、更に上記特徴抽出を繰り返して
もよいし、他の特徴抽出を行い、その後パターンを決定
してもよい。Next, the processing unit 15 will be described in detail. No. 6-1
The figure is a block diagram of the processing unit 15. A preprocessing circuit 16 performs binarization, noise removal, etc. on the input pattern.
Next, the characteristics of the pattern are extracted by the CPU 17 and the memory 18. The flow of feature extraction is shown in FIG. 6-2. That is, the contour information of the pattern is coded by the primary feature extraction. The code is used as it is depending on the pattern or the extraction method. Further, a feature different from the code string may be extracted by secondary feature extraction. Then, the feature obtained as described above is collated with a dictionary such as the memory 18 or the similarity or correlation is calculated to determine the pattern. Further, the above feature extraction may be repeated, or another feature extraction may be performed and then the pattern may be determined.
次に本発明の特徴抽出について、更に詳細に説明する。
第7図は本発明適用の各輪郭点における方向コードを示
す。本実施例の場合、パターンの輪郭を時計回りに追跡
していつた時の各輪郭点における方向を表わすコードで
ある。なお追跡方向はこれに限る必要はない。Next, the feature extraction of the present invention will be described in more detail.
FIG. 7 shows direction codes at each contour point to which the present invention is applied. In the case of the present embodiment, it is a code that represents the direction at each contour point when tracing the contour of the pattern clockwise. The tracking direction is not limited to this.
ここで、ある輪郭点における方向コードは、1つ前の輪
郭点における輪郭線方向を0として決定する。すなわ
ち、パターンの輪郭を時計回りに追跡して行く時、ある
輪郭点Piにおける方向コードは、Piの輪郭線方向が、1
つ前の輪郭点Pi−1における輪郭線方向と一致していれ
ば0、またPi−1の輪郭線方向に比べ、右に45゜,90゜,
135゜,180゜回転していれば、各々1,2,3,4、逆に左に45
゜,90゜,135゜回転していれば各々−1,−2,−3と決め
る。例えば、第8図に示す様な輪郭点P1〜P11の場合、
各輪郭点に対する輪郭線方向は図の矢印で示される様に
なり、この場合方向コードは「0,0,1,0,−2,0,1,2,0」
と決まる。ここで、P1に対する方向コードは、その前の
輪郭点の輪郭線方向がわからなければ決まらないが、一
般に、パターンの輪郭を追跡していくと、必ず開始点に
戻つて来るので、その時開始点の方向コードも必ず求ま
る。Here, the direction code at a certain contour point is determined by setting the contour line direction at the previous contour point to 0. That is, when tracing the contour of the pattern clockwise, the direction code at a certain contour point P i is 1 when the contour line direction of P i is 1
0 if it matches the contour line direction at the previous contour point P i -1, and 45 °, 90 ° to the right as compared with the contour line direction of P i -1
If it is rotated by 135 ° and 180 °, it is 1,2,3,4 and 45 to the left.
If they are rotated by ゜, 90 ゜ and 135 ゜, they are determined as -1, -2 and -3 respectively. For example, in the case of contour points P 1 to P 11 as shown in FIG.
The contour line direction for each contour point is as shown by the arrow in the figure, and in this case the direction code is "0,0,1,0, −2,0,1,2,0".
Is decided. Here, the direction code for P 1 cannot be determined unless the contour line direction of the preceding contour point is known, but generally when tracing the contour of the pattern, it always returns to the start point, so start at that time. The direction code of the point is always found.
この方法により、第2図に示すパターンの方向コードを
求めると、第9図に示す様になる。図から明らかな様
に、この方法によれば、得られるコード列は連続にな
る。さらに、輪郭を一周した後でも、同じ輪郭点に対す
るコードは同じ値を持つ。すなわち輪郭点の個数を周期
とする周期性を持つ。これにより、得られるコード列を
周期関数として扱うことができる。この場合、輪郭追跡
の開始点が変わつても、その周期関数の位相がずれるだ
けである。例えば第2図のS2を開始点とした場合、第9
図のS2からコード列は始まるがそれを周期関数とみなせ
ば、その関数は横軸方向にずれるだけで、関数の形は不
変である。When the direction code of the pattern shown in FIG. 2 is obtained by this method, it becomes as shown in FIG. As is clear from the figure, according to this method, the obtained code string is continuous. Furthermore, the code for the same contour point has the same value even after the contour has been circled. That is, it has periodicity with the number of contour points as the period. As a result, the obtained code string can be treated as a periodic function. In this case, even if the starting point of contour tracing changes, the phase of the periodic function is only shifted. For example, if S 2 in FIG. 2 is used as the starting point,
The code sequence starts from S 2 in the figure, but if we regard it as a periodic function, the function will only shift along the horizontal axis, and the shape of the function will remain unchanged.
以上の性質により、本発明により得られるコード列は、
第3図、第4図に示すものより優れている。Due to the above properties, the code string obtained by the present invention is
It is superior to those shown in FIGS. 3 and 4.
次に、第10図に前記説明したコード列を求めるフローチ
ヤートを示す。ステツプ1において輪郭追跡の開始点を
決める。次にステツプ2において、次の第1輪郭点を求
める。ステツプ3で、開始点と第1輪郭点とで、輪郭接
線方向を求める。次にステツプ4で、第m番目の輪郭点
を求め(m=2,3,4……)、ステツプ5で第m−1番目
の輪郭点とで輪郭接線方向を求める。ステツプ6で輪郭
接線方向の差をコード化する。次にステツプ7で開始点
に戻つたかどうかを判断する。開始点に戻つていない場
合は、以上の動作を繰り返す。Next, FIG. 10 shows a flow chart for obtaining the code string described above. In step 1, the starting point of contour tracing is determined. Next, in step 2, the next first contour point is obtained. In step 3, the contour tangent direction is obtained from the start point and the first contour point. Next, in step 4, the m-th contour point is obtained (m = 2,3,4 ...), and in step 5, the contour tangent direction is obtained with the (m-1) th contour point. In step 6, the difference in the tangential direction of the contour is coded. Next, in step 7, it is judged whether or not the starting point has been returned to. If it has not returned to the starting point, the above operation is repeated.
さて、パターンの識別は、ここで得られたコード列よ
り、例えば輪郭の曲がり具合(真直ぐ、右曲がり、左曲
がり、急な右曲がり、急な左曲がり、……)を検出して
行なうことができる。例えば、第11図に対応する輪郭情
報を、第12図に示す様に得ることができる。ここで、
直、右、左、急右は各々真直ぐ、右曲り、左曲り、急な
右曲りを表す。By the way, the pattern can be identified by detecting, for example, the curved state of the contour (straight, right bend, left bend, sudden right bend, sudden left bend, ...) From the code string obtained here. it can. For example, the contour information corresponding to FIG. 11 can be obtained as shown in FIG. here,
Straight, right, left, and sharp right represent straight, right bend, left bend, and sharp right bend, respectively.
さらに、コード列を周期関数として扱えることから、そ
の関数に例えば離散フーリエ変換を施し、周波数軸上で
識別することもできる。Furthermore, since the code string can be treated as a periodic function, it is possible to perform a discrete Fourier transform on the function and identify it on the frequency axis.
このように、本発明による方法は、パターンの持つ輪郭
情報を安定に抽出することを可能とするもので、その後
に続くパターンの識別処理を容易にし、又逆にパターン
の認識処理を限定するものでもない。As described above, the method according to the present invention enables stable extraction of the contour information of a pattern, facilitates subsequent pattern identification processing, and conversely limits pattern recognition processing. not.
以上の説明では、方向コードを求める各輪郭点が互いに
隣接していたが、これを第13図のパターンのP1〜P28に
示す様に隣接した輪郭点を例えば2つ置きに標本化して
もよく、ある距離だけ離れた輪郭点に対し、方向コード
を求める方法を用いてもよい。この方法によれば、パタ
ーンの輪郭における細かな凹凸に影響されず、より安定
した輪郭の特徴を抽出することができる。In the above description, the contour points for which the direction code is obtained are adjacent to each other. However, as shown in P 1 to P 28 of the pattern of FIG. Alternatively, a method of obtaining a direction code may be used for contour points separated by a certain distance. According to this method, more stable contour features can be extracted without being affected by fine irregularities in the contour of the pattern.
又、上記説明では、方向コードとして8方向に量子化し
たものを用いたが、例えば、第14図に示す様に細分化し
てもよい。第13図に示した( )内の番号は第14図に示
す方向コードに従つて求められたもので、輪郭の曲がり
具合をより忠実に表現することができ、似かよつたカテ
ゴリーを含むパターン集合におけるパターン認識に適し
ている。In the above description, the direction code quantized in eight directions is used, but it may be subdivided as shown in FIG. 14, for example. The numbers in parentheses () shown in Fig. 13 are obtained according to the direction code shown in Fig. 14, and are able to more faithfully express the curved state of the contour, and a pattern set including similar categories. Suitable for pattern recognition in.
なお以上説明した方法を繰り返してもよく、又、組み合
わせてもよいことは言うまでもない。Needless to say, the methods described above may be repeated or combined.
本発明は、複数の機器から構成されるシステムに適用し
ても良いし、1つの機器から成る装置に適用しても良い
し、システム或いは装置にプログラムを供給することに
よって達成される場合にも適用できることは言うまでも
ない。The present invention may be applied to a system composed of a plurality of devices, may be applied to an apparatus composed of one device, or may be achieved by supplying a program to the system or the device. It goes without saying that it can be applied.
[効果] 以上詳述した様に、本発明によれば、画像情報の輪郭を
追跡していった時の、画像情報の輪郭追跡開始点を決定
し、前記画像情報のある輪郭点と前の輪郭点とで輪郭接
線方向を求め、前記接線方向を、先に求めた接線方向と
比較して得る方向差を導出してコード化し、前記方向差
コードの導出を輪郭点を追跡しながら開始点に戻るまで
繰り返し、開始点に戻った際に導出される方向差コード
を開始点のデータとすることにより、上記画像情報の輪
郭の特徴を安定に表現でき、また、画像情報の位置ず
れ、回転等に影響されない連続かつ周期的な方向コード
列を容易に得ることができ、上記画像情報の輪郭処理を
軽減することのできる画像処理方法を提供することが可
能となる。[Effect] As described in detail above, according to the present invention, the contour tracking start point of the image information when the contour of the image information is traced is determined, and the contour point with the image information and the previous contour point are determined. The contour tangent direction is obtained with the contour point, and the tangential direction is compared with the previously obtained tangential direction to derive and code a direction difference, and the derivation of the direction difference code is started by tracing the contour point. By repeatedly using the direction difference code derived when returning to the start point as the data of the start point, the contour feature of the image information can be stably expressed, and the position shift and rotation of the image information can be performed. It is possible to provide an image processing method that can easily obtain a continuous and periodic direction code string that is not affected by the above, and can reduce the contour processing of the image information.
第1図は、従来の方向コードを示す図、 第2図は、パターンの1例を示す図、 第3図、第4図は輪郭点と方向コードの関係を示す図、 第5図は、本発明の適用が可能な画像処理装置の1例を
示す図、 第6−1図は、処理部のブロツク図、 第6−2図は、パターンの特徴抽出の流れを示す図、 第7図は、本発明適用の各輪郭点における方向コードを
示す図、 第8図は、パターンの1例を示す図、 第9図は、輪郭点と方向コードの関係を示す図、 第10図は、コード列を求めるフローチヤート、 第11図は、パターンと輪郭情報を示す図、 第12図は、パターンのコード情報と輪郭情報を示す図、 第13図は、パターンの1例を示す図、 第14図は、細分化した方向コードを示す図。 17はCPU、15は処理部。FIG. 1 is a diagram showing a conventional direction code, FIG. 2 is a diagram showing an example of a pattern, FIGS. 3 and 4 are diagrams showing a relationship between contour points and a direction code, and FIG. FIG. 6-1 is a block diagram of a processing unit, FIG. 6-2 is a diagram showing a flow of pattern feature extraction, and FIG. 7 is a diagram showing an example of an image processing apparatus to which the present invention can be applied. FIG. 8 is a diagram showing a direction code at each contour point to which the present invention is applied. FIG. 8 is a diagram showing an example of a pattern. FIG. 9 is a diagram showing a relationship between contour points and a direction code. FIG. 11 is a diagram showing pattern and contour information, FIG. 12 is diagram showing pattern code information and contour information, and FIG. 13 is a diagram showing an example of pattern. Figure 14 shows the subdivided direction code. 17 is a CPU and 15 is a processing unit.
Claims (1)
向を求め、 前記接線方向を、先に求めた接線方向と比較して得る方
向差を導出してコード化し、 前記方向差コードの導出を輪郭点を追跡しながら開始点
に戻るまで繰り返し、開始点に戻った際に導出される方
向差コードを開始点のデータとすることを特徴とする画
像処理方法。1. A contour tracing start point of image information is determined, a contour tangential direction is obtained from a contour point having the image information and a previous contour point, and the tangential direction is compared with the previously obtained tangential direction. Derivation of the obtained direction difference and coding, the derivation of the direction difference code is repeated until it returns to the starting point while tracing the contour points, and the direction difference code derived when returning to the starting point is used as the data of the starting point. An image processing method comprising:
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59086596A JPH07104908B2 (en) | 1984-04-27 | 1984-04-27 | Image processing method |
DE19853515159 DE3515159A1 (en) | 1984-04-27 | 1985-04-26 | IMAGE PROCESSING DEVICE |
GB08510712A GB2161006B (en) | 1984-04-27 | 1985-04-26 | Character recognition apparatus |
US07/157,147 US4833721A (en) | 1984-04-27 | 1988-02-11 | Image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59086596A JPH07104908B2 (en) | 1984-04-27 | 1984-04-27 | Image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS60230278A JPS60230278A (en) | 1985-11-15 |
JPH07104908B2 true JPH07104908B2 (en) | 1995-11-13 |
Family
ID=13891380
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP59086596A Expired - Lifetime JPH07104908B2 (en) | 1984-04-27 | 1984-04-27 | Image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH07104908B2 (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS57104371A (en) * | 1980-12-19 | 1982-06-29 | Matsushita Electric Ind Co Ltd | Profile code converter |
JPS5872934A (en) * | 1981-10-27 | 1983-05-02 | Olympus Optical Co Ltd | Light source device for endoscope |
-
1984
- 1984-04-27 JP JP59086596A patent/JPH07104908B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPS60230278A (en) | 1985-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2557510B2 (en) | Personal authentication device | |
US5038382A (en) | Multi-scale recognizer for hand drawn strokes | |
GB2161006A (en) | Character recognition apparatus | |
US5023918A (en) | Cross-product filter | |
US5357602A (en) | Apparatus for transforming a two-level image into contour vectors by decomposing composite figures into "unitary" (open) and closed-loop figures, especially suitable for minimizing memory use while maintaining system processing speed | |
JPH07104908B2 (en) | Image processing method | |
JPS6170674A (en) | Image processor | |
JP2512800B2 (en) | Linear approximation method of line figure input device | |
JP2959054B2 (en) | Line type discrimination method in pattern recognition device | |
JP3111750B2 (en) | Variable-length code decoding method | |
JPS61156487A (en) | Picture processing device | |
JPH0410113B2 (en) | ||
RU2054197C1 (en) | Method for encoding papillary pattern in finger- prints | |
JP3080102B2 (en) | Data processing method and device | |
JP2885476B2 (en) | Image processing method and apparatus | |
JP2702786B2 (en) | Fingerprint collation device | |
JPS5835674A (en) | Extracting method for feature of online hand-written character | |
JPH0792833B2 (en) | Line figure input method and device | |
JP2941322B2 (en) | Drawing processing equipment | |
JPH0291785A (en) | Character recognizing device | |
JPS59128662A (en) | Raster vector converter | |
JPS61198381A (en) | Stroke distance calculation method | |
JPH081660B2 (en) | Online handwritten figure recognition device | |
JPS5922178A (en) | Pattern recognition device | |
JPH0410115B2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EXPY | Cancellation because of completion of term |