JP2000322568A - Method for making image contour vector - Google Patents
Method for making image contour vectorInfo
- Publication number
- JP2000322568A JP2000322568A JP11133704A JP13370499A JP2000322568A JP 2000322568 A JP2000322568 A JP 2000322568A JP 11133704 A JP11133704 A JP 11133704A JP 13370499 A JP13370499 A JP 13370499A JP 2000322568 A JP2000322568 A JP 2000322568A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- distance
- threshold value
- image
- contour
- 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.)
- Pending
Links
- 239000013598 vector Substances 0.000 title claims abstract description 71
- 238000000034 method Methods 0.000 title claims description 30
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 2
- 101100094867 Mus musculus Scgb2b20 gene Proteins 0.000 description 2
- 239000013256 coordination polymer Substances 0.000 description 2
- 102100033040 Carbonic anhydrase 12 Human genes 0.000 description 1
- 101000867855 Homo sapiens Carbonic anhydrase 12 Proteins 0.000 description 1
- 101100280298 Homo sapiens FAM162A gene Proteins 0.000 description 1
- 102100023788 Protein FAM162A Human genes 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、写真やスキャナ等
から取り込んだ画像の輪郭ベクトル化方法に関する。[0001] 1. Field of the Invention [0002] The present invention relates to a method for converting an image taken from a photograph or a scanner into an outline vector.
【0002】[0002]
【従来の技術】図面や写真の画像を圧縮した電子情報と
して取得するのに、画像を構成する各画素の濃度の違い
を2値化し、この2値化画像から画像の輪郭(線のつな
がり)部分のうち直線部分を1つのベクトルとし、各ベ
クトルのつながりで輪郭情報を得る。つまり、画像情報
を輪郭ベクトル化することで圧縮した電子情報を得るこ
とができる。2. Description of the Related Art In order to obtain compressed electronic information of an image of a drawing or a photograph, a difference in the density of each pixel constituting the image is binarized, and an outline (connection of lines) of the image is obtained from the binarized image. The straight line portion of the portions is defined as one vector, and the outline information is obtained by connecting the vectors. That is, it is possible to obtain compressed electronic information by converting the image information into a contour vector.
【0003】この輪郭ベクトル化において、小さい曲率
をもつ曲線部分は1つのベクトルに纏めることで必要な
ベクトル数(情報量)を削減できる。すなわち、画像か
ら得られる輪郭データを間引いて近似した輪郭ベクトル
を作成することで、ベクトル情報量を圧縮している。[0003] In this contour vectorization, the required number of vectors (the amount of information) can be reduced by combining curved portions having a small curvature into one vector. That is, the vector information amount is compressed by creating an approximated outline vector by thinning out the outline data obtained from the image.
【0004】輪郭データから輪郭ベクトルを生成する方
法はラーマ法を用いている。ラーマ法の手順は以下の通
りである。A method of generating a contour vector from contour data uses the Rama method. The procedure of the Rama method is as follows.
【0005】(1)図5の(a)に示すように、ベクト
ル化する曲線の両端点を結ぶ直線を基準線とし、その基
準線と曲線上の点との距離が最大になる点を探す。同図
の場合、基準線APBから最も遠い曲線上の点は、点C
となる。(1) As shown in FIG. 5A, a straight line connecting both ends of a curve to be vectorized is used as a reference line, and a point at which the distance between the reference line and a point on the curve is maximized is searched for. . In this case, the point on the curve farthest from the reference line APB is the point C
Becomes
【0006】(2)最大距離CPが、決められたしきい
値よりも大きい場合、図5の(b)に示すように、基準
線APBを分割し、2つの基準線AC,CBとしてそれ
ぞれラーマ法を再帰的に行う。同図の場合、基準線AC
について曲線上の最遠点はDとなり、この点Dでさらに
基準線を分割していく。基準線CBは、しきい値内であ
る場合であり、分割はしない。(2) When the maximum distance CP is larger than a predetermined threshold value, the reference line APB is divided as shown in FIG. Perform the recursion. In the case of FIG.
, The farthest point on the curve is D, and the reference line is further divided at this point D. The reference line CB is a case where it is within the threshold value, and is not divided.
【0007】(3)すべてしきい値内に収まるまでラー
マ法を再帰的に行う。最終的には、図5の(c)に示す
ように、曲線を近似した輪郭ベクトルはAEDCBとな
る。(3) The Rama method is performed recursively until all the values fall within the threshold value. Finally, as shown in FIG. 5C, the contour vector approximating the curve becomes AEDCB.
【0008】[0008]
【発明が解決しようとする課題】写真やスキャナから取
り込んだ画像から輪郭を作成し、ラーマ法によって間引
かれた輪郭ベクトルは、以下のような原因により、最適
でない場合がある。A contour vector created from a photograph or an image taken from a scanner and thinned out by the Rama method may not be optimal due to the following reasons.
【0009】(1)輪郭線が「くの字」型(座標点数n
=3)の場合 例えば、図6の(a)に示すような曲線があり、それに
対してラーマ法によりベクトル化すると、最初に基準線
L1によりベクトルACEが生成され、次いで基準線L
2,L3によりベクトルABCDEを生成する場合があ
る。[0009] (1) The contour line has a “U” shape (the number of coordinate points n
= 3) For example, there is a curve as shown in FIG. 6A, and when vectorization is performed on the curve by the Rama method, a vector ACE is first generated by the reference line L1, and then the reference line L
2 and L3, a vector ABCDE may be generated.
【0010】しかし、BD間においては同図のように直
線BPDと点Cの距離CPがしきい値内になってしまう
場合がある。この場合、同図の(b)に示すように、点
Cを省略してベクトルABDEを生成したほうが適切な
ベクトル化になる。However, the distance CP between the straight line BPD and the point C may be within the threshold value between BDs as shown in FIG. In this case, it is more appropriate to generate the vector ABDE by omitting the point C, as shown in FIG.
【0011】(2)輪郭線が「Z字」型(座標点数n≧
4)の場合 Z字型の曲線に対してラーマ法によってベクトル化した
結果、図7の(a)に示すように、ベクトルABCDを
生成する場合がある。(2) The contour is of a "Z-shape" type (the number of coordinate points n ≧
Case 4) As a result of vectorizing a Z-shaped curve by the Rama method, a vector ABCD may be generated as shown in FIG. 7A.
【0012】しかし、同図の(b)に示すように、直線
ADと点BCとの距離がしきい値以内であることがあ
り、この場合は点B、Cを削除したほうがより適切なベ
クトル化になる。However, as shown in FIG. 2B, the distance between the straight line AD and the point BC may be within the threshold value. In this case, it is more appropriate to delete the points B and C. Become
【0013】本発明の目的は、くの字型やZ字型の輪郭
線に対して適性なベクトルを生成できる輪郭ベクトル化
方法を提供することにある。An object of the present invention is to provide a contour vectorizing method capable of generating an appropriate vector for a U-shaped or Z-shaped contour.
【0014】[0014]
【課題を解決するための手段】本発明は、前記課題を解
決するため、2値化画像から画像の輪郭線を複数のベク
トルのつながりで得る画像の輪郭ベクトル化方法におい
て、くの字型の輪郭線のベクトル化には、隣合うベクト
ルの両端点を結んだ基準線と中間点との距離がしきい値
より大きい場合には元のベクトルのままとし、しきい値
より小さいときは基準線と輪郭線の間の最遠点までの距
離を求め、この距離がしきい値より小さい場合には両端
点を結ぶベクトルとし、しきい値以上になるときは中間
点を最遠点に変更したベクトルとすることを特徴とす
る。SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention provides an image contour vectorization method for obtaining an image outline from a binary image by connecting a plurality of vectors. When the distance between the reference line connecting the end points of adjacent vectors and the intermediate point is larger than the threshold value, the original vector is used. The distance to the farthest point between the contour and the contour line was calculated.If this distance was smaller than the threshold value, a vector connecting both ends was used. It is characterized by a vector.
【0015】また、本発明は、前記課題を解決するた
め、2値化画像から画像の輪郭線を複数のベクトルのつ
ながりで得る画像の輪郭ベクトル化方法において、Z字
型の輪郭線のベクトル化には、隣合う4点以上のn点の
ベクトルの両端点を結んだ基準線と(n−2)個の中間
点との距離がしきい値より大きい場合には元のベクトル
のままとし、しきい値より小さいときは基準線と輪郭線
の間の最遠点までの距離を求め、この距離がしきい値よ
り小さい場合には両端点を結ぶベクトルとし、しきい値
以上になるときは最も近い中間点を最遠点に変更したベ
クトルとすることを特徴とする。Further, in order to solve the above-mentioned problems, the present invention provides an image contour vectorizing method for obtaining an image outline from a binarized image by connecting a plurality of vectors. In the case where the distance between a reference line connecting both end points of four or more n-point vectors adjacent to each other and (n-2) intermediate points is larger than a threshold value, the original vector is retained, When the distance is smaller than the threshold value, the distance to the farthest point between the reference line and the contour line is calculated. When the distance is smaller than the threshold value, a vector connecting both end points is obtained. It is characterized in that the closest intermediate point is a vector changed to the farthest point.
【0016】[0016]
【発明の実施の形態】(第1の実施形態)図1は、本発
明の実施形態を示す輪郭ベクトル化処理手順であり、輪
郭線が「くの字」型になる場合のベクトル化処理であ
る。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) FIG. 1 shows an outline vectorization processing procedure showing an embodiment of the present invention. is there.
【0017】まず、間引き後のベクトルに対して、ベク
トルの座標列から隣り合う3点A,B,Cをとり、端の
2点A,Cを結んだ基準線と中間点Bとの距離X1を調
べ(S1)、この距離X1がしきい値より大きいか否か
をチェックし(S2)、大きい場合には、元のままのベ
クトルABCとする(S3)。この処理は、例えば、図
2の(a)に示すような輪郭線の場合である。First, three points A, B, and C adjacent to each other are taken from the vector coordinate sequence with respect to the decimated vector, and a distance X between a reference line connecting the two end points A and C and the intermediate point B is obtained. 1 were examined (S1), the distance X 1 checks whether greater than the threshold value (S2), if larger, the vector ABC of intact (S3). This processing is, for example, a case of a contour as shown in FIG.
【0018】次に、距離X1がしきい値よりも小さい場
合、端点AC間の基準線と、同じ区間の曲線上の最遠点
Pとの距離X2を求め(S4)、この距離X2がしきい値
以内か否かをチェックし(S5)、しきい値以内であれ
ば、中間点Bをベクトルの座標列から削除したベクトル
ACとする(S6)。この処理は、例えば、図2の
(b)に示すような輪郭線の場合である。Next, when the distance X 1 is smaller than the threshold value, and the reference line between the endpoints AC, the distance X 2 between the farthest point P on the curve of the same section calculated (S4), the distance X It is checked whether or not 2 is within the threshold (S5), and if it is within the threshold, the intermediate point B is set as the vector AC deleted from the vector coordinate sequence (S6). This process is, for example, a case of a contour line as shown in FIG.
【0019】次に、最遠点Pとの距離X2がしきい値よ
りも大きい場合、3点A,B,Cのうち中間点Bを最遠
点に変更し(S7)、ベクトルAPCとする(S8)。
この処理は、例えば、図2の(c)に示すような輪郭線
の場合であり、ベクトルはAPCとすることで適正化す
る。Next, when the distance X 2 to the farthest point P is larger than the threshold value, the intermediate point B among the three points A, B and C is changed to the farthest point (S7), and the vector APC and (S8).
This process is, for example, a case of a contour line as shown in FIG. 2C, and the vector is optimized by using APC.
【0020】(第2の実施形態)図3は、本発明の実施
形態を示す輪郭ベクトル化処理手順であり、輪郭線が
「Z字」型になる場合のベクトル化処理である。(Second Embodiment) FIG. 3 shows an outline vectorization processing procedure according to an embodiment of the present invention, which is a vectorization processing in the case where the outline becomes a "Z-shape".
【0021】まず、間引き後のベクトルに対して、ベク
トルの座標列から隣り合うn点(A,B,C,Dとす
る)をとり、端の2点A,Dを結んだ基準線とn−2個
(2個)の中間点B,Cとの距離X1,X2を求め(S1
1)、これら距離X1、X2がしきい値より大きいか否か
をチェックし(S12)、大きい場合には、元のままの
ベクトルABCDとする(S13)。この処理は、例え
ば、図4の(a)に示すような輪郭線の場合である。First, with respect to the vector after the thinning, n adjacent points (referred to as A, B, C, and D) are taken from the vector coordinate sequence, and a reference line connecting the two end points A and D and n -The distances X 1 and X 2 to the two (two) intermediate points B and C are determined (S1
1) It is checked whether or not these distances X 1 and X 2 are larger than the threshold value (S12). If they are larger, the vector ABCD is used as it is (S13). This process is, for example, the case of a contour as shown in FIG.
【0022】次に、距離X1,X2の両方がしきい値より
も小さい場合、端点AD間の基準線と、同じ区間の曲線
上の最遠点Pとの距離X3を求め(S14)、この距離
X3がしきい値以内か否かをチェックし(S15)、し
きい値以内であれば、n−2個の中間点B,Cをベクト
ルの座標列から削除したベクトルADとする(S1
6)。この処理は、例えば、図4の(b)に示すような
輪郭線の場合である。Next, when both the distances X 1 and X 2 are smaller than the threshold value, the distance X 3 between the reference line between the end points AD and the farthest point P on the curve in the same section is obtained (S 14). ), the distance X 3 checks whether within a threshold (S15), if it is within the threshold, the vector AD deleting n-2 pieces of midpoint B, and C from the coordinate column vectors Yes (S1
6). This process is, for example, a case of a contour as shown in FIG.
【0023】次に、最遠点Pとの距離X3がしきい値よ
りも大きい場合、4点A,B,C,Dのうち、最遠点P
に近い中間点BまたはCを最遠点に変更し(S17)、
ベクトルABPDまたはAPCDとする(S18)。こ
の処理は、例えば、図4の(c)に示すような輪郭線の
場合であり、最遠点Pが中間点Cに近いため、ベクトル
はABPDとすることで適正化する。Next, when the distance X 3 to the farthest point P is larger than the threshold value, the farthest point P among the four points A, B, C and D
The intermediate point B or C close to is changed to the farthest point (S17),
The vector is set to ABPD or APCD (S18). This process is, for example, a case of a contour as shown in FIG. 4C, and since the farthest point P is close to the intermediate point C, the vector is optimized by setting it to ABPD.
【0024】なお、以上までの実施形態は、ラーマ法に
よるベクトルの間引きとの組み合わせで行うことで一層
の最適化を得ることができる。It should be noted that the above embodiments can be further optimized by performing in combination with vector thinning by the Rama method.
【0025】[0025]
【発明の効果】以上のとおり、本発明によれば、隣合う
ベクトルの両端点を結んだ基準線と中間点との距離がし
きい値より大きい場合には元のベクトルのままとし、し
きい値より小さいときは基準線と輪郭線の間の最遠点ま
での距離の大小からベクトルの間引きや最遠点に変更し
たベクトルとするようにしたため、くの字型やZ字型の
輪郭線に対して、しきい値に応じた最適な輪郭ベクトル
を得ることができる。As described above, according to the present invention, when the distance between a reference line connecting both end points of adjacent vectors and an intermediate point is larger than a threshold value, the original vector is kept, and When the value is smaller than the value, the vector is thinned or changed to the farthest point from the magnitude of the distance to the farthest point between the reference line and the contour line. , An optimum contour vector according to the threshold value can be obtained.
【図1】本発明の第1の実施形態を示す輪郭ベクトル化
処理手順。FIG. 1 is an outline vectorization processing procedure according to a first embodiment of the present invention.
【図2】第1の実施形態における「くの字」型ベクトル
の例。FIG. 2 is an example of a “U-shaped” vector according to the first embodiment.
【図3】本発明の第2の実施形態を示す輪郭ベクトル化
処理手順。FIG. 3 is an outline vectorization processing procedure according to a second embodiment of the present invention.
【図4】第2の実施形態における「Z字」型ベクトルの
例。FIG. 4 is an example of a “Z-shaped” vector according to the second embodiment.
【図5】ラーマ法による輪郭ベクトルの生成方法を説明
する図。FIG. 5 is a diagram for explaining a method of generating a contour vector by the Rama method.
【図6】ラーマ法による「くの字」型ベクトルでの処理
例。FIG. 6 is a processing example using a “L” character type vector by the Rama method.
【図7】ラーマ法による「Z字」型ベクトルでの処理
例。FIG. 7 is a processing example using a “Z-shaped” vector by the Rama method.
フロントページの続き Fターム(参考) 5B057 CA08 CA12 CA16 CB06 CB12 CB17 CC01 CH08 DA08 DB02 DB09 DC05 DC07 DC16 5L096 DA02 EA23 EA43 FA06 FA12 FA13 FA66 GA51 Continued on the front page F term (reference) 5B057 CA08 CA12 CA16 CB06 CB12 CB17 CC01 CH08 DA08 DB02 DB09 DC05 DC07 DC16 5L096 DA02 EA23 EA43 FA06 FA12 FA13 FA66 GA51
Claims (2)
クトルのつながりで得る画像の輪郭ベクトル化方法にお
いて、 くの字型の輪郭線のベクトル化には、隣合うベクトルの
両端点を結んだ基準線と中間点との距離がしきい値より
大きい場合には元のベクトルのままとし、しきい値より
小さいときは基準線と輪郭線の間の最遠点までの距離を
求め、この距離がしきい値より小さい場合には両端点を
結ぶベクトルとし、しきい値以上になるときは中間点を
最遠点に変更したベクトルとすることを特徴とする画像
の輪郭ベクトル化方法。In an image contour vectorization method for obtaining an image outline from a binary image by connecting a plurality of vectors, a vector shape of a V-shaped outline is obtained by calculating both end points of adjacent vectors. When the distance between the connected reference line and the intermediate point is larger than the threshold value, the original vector is maintained. When the distance is smaller than the threshold value, the distance to the farthest point between the reference line and the contour line is obtained. When the distance is smaller than the threshold value, a vector connecting both end points is used, and when the distance is equal to or larger than the threshold value, a vector obtained by changing the intermediate point to the farthest point is used.
クトルのつながりで得る画像の輪郭ベクトル化方法にお
いて、 Z字型の輪郭線のベクトル化には、隣合う4点以上のn
点のベクトルの両端点を結んだ基準線と(n−2)個の
中間点との距離がしきい値より大きい場合には元のベク
トルのままとし、しきい値より小さいときは基準線と輪
郭線の間の最遠点までの距離を求め、この距離がしきい
値より小さい場合には両端点を結ぶベクトルとし、しき
い値以上になるときは最も近い中間点を最遠点に変更し
たベクトルとすることを特徴とする画像の輪郭ベクトル
化方法。2. An image contour vectorization method for obtaining an image outline from a binarized image by connecting a plurality of vectors, wherein the vectorization of a Z-shaped outline includes n or more of four or more adjacent points.
If the distance between the reference line connecting both end points of the vector of points and the (n-2) intermediate points is larger than the threshold value, the original vector is maintained. Finds the distance to the furthest point between the contour lines.If this distance is smaller than the threshold value, it is a vector connecting both end points.If the distance is greater than the threshold value, the closest intermediate point is changed to the furthest point. A method for converting an image into an outline vector, characterized in that the vector is a converted vector.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11133704A JP2000322568A (en) | 1999-05-14 | 1999-05-14 | Method for making image contour vector |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11133704A JP2000322568A (en) | 1999-05-14 | 1999-05-14 | Method for making image contour vector |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2000322568A true JP2000322568A (en) | 2000-11-24 |
Family
ID=15110949
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11133704A Pending JP2000322568A (en) | 1999-05-14 | 1999-05-14 | Method for making image contour vector |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2000322568A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007133874A (en) * | 2005-11-11 | 2007-05-31 | General Electric Co <Ge> | Method and system for generating polygon boundary definition for image object |
| JP2008052701A (en) * | 2006-07-28 | 2008-03-06 | Sony Corp | Image processing method, image processing apparatus, and program |
-
1999
- 1999-05-14 JP JP11133704A patent/JP2000322568A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007133874A (en) * | 2005-11-11 | 2007-05-31 | General Electric Co <Ge> | Method and system for generating polygon boundary definition for image object |
| JP2008052701A (en) * | 2006-07-28 | 2008-03-06 | Sony Corp | Image processing method, image processing apparatus, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0549351B1 (en) | Image processing method and apparatus | |
| EP0996094A4 (en) | Image processing apparatus and image processing method, program providing medium, and data providing medium | |
| JPH09237338A (en) | Method and device for quickly smoothing contour | |
| JP2000322568A (en) | Method for making image contour vector | |
| JP3275816B2 (en) | Symbol string search method, symbol string search device, and recording medium recording symbol string search program | |
| JPS62196772A (en) | Image clipping method | |
| JPH05324921A (en) | Curve forming method and apparatus | |
| JPH06119448A (en) | Image processing method | |
| JP3066667B2 (en) | Outline character correction processing method | |
| JP3339239B2 (en) | Image data centering processing method | |
| JP2954778B2 (en) | Method for connecting line figure branch point of image input device | |
| JPH10240866A (en) | Character recognition device | |
| JP2817885B2 (en) | Vectorization method | |
| JP2882327B2 (en) | Line figure matching device | |
| JPH0640346B2 (en) | Connection method between unconnected end points of line figure vector | |
| JP2800544B2 (en) | Image data centering processing method | |
| JP2876023B2 (en) | How to segment skeleton points | |
| JP2544133B2 (en) | Grayscale image data compression method | |
| JP3284768B2 (en) | How to recognize circles and arcs | |
| Laboure et al. | Detection of dominant points on a digital closed curve | |
| JP2694761B2 (en) | Thinning method | |
| JPH08265574A (en) | Image processing device | |
| JPS60117381A (en) | Method and device for extracting contour | |
| JP2675381B2 (en) | Line figure conversion method | |
| JPH11154236A (en) | Connection processing method for core drawing of line figure |