JP2569049B2 - How to modify characters - Google Patents

How to modify characters

Info

Publication number
JP2569049B2
JP2569049B2 JP62147929A JP14792987A JP2569049B2 JP 2569049 B2 JP2569049 B2 JP 2569049B2 JP 62147929 A JP62147929 A JP 62147929A JP 14792987 A JP14792987 A JP 14792987A JP 2569049 B2 JP2569049 B2 JP 2569049B2
Authority
JP
Japan
Prior art keywords
pixel
pixels
contour
character
flag
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 - Fee Related
Application number
JP62147929A
Other languages
Japanese (ja)
Other versions
JPS63313284A (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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP62147929A priority Critical patent/JP2569049B2/en
Publication of JPS63313284A publication Critical patent/JPS63313284A/en
Application granted granted Critical
Publication of JP2569049B2 publication Critical patent/JP2569049B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は文字の修正方法、特に画像入力装置などでコ
ンピュータ上に取込んだ文字の形状を修正する文字の修
正方法に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character correcting method, and more particularly to a character correcting method for correcting the shape of a character taken into a computer by an image input device or the like.

〔従来の技術〕[Conventional technology]

文字のフォントは多数の画素の集合として表現される
ラスターデータによって構成される。文字フォントの作
成方法としては、純粋にコンピュータだけを用いてオペ
レータが作成する方法と、紙などの原稿に描かれた実際
の文字を画像入力装置などでコンピュータ上にラスター
データとして取込む方法とがある。後者の方法では、画
像入力装置から得られるデジタルデータ(たとえば1画
素について256とおりの値が得られる)を2値データ、
すなわち画素有りまたは無しの状態で表現することにな
る。一般には、原稿に描かれた文字には濃度の不均一性
があり、2値データへの変換条件の設定によって変換結
果は著しく異なり、所望の文字形状が得られないことが
ある。通常は、輪郭線の一部が滑らかにならないという
結果になる。また、原稿に汚れがあると、この汚れが文
字の一部として認識され、変換後の文字に白抜けや黒点
汚れが発生することになる。
A character font is composed of raster data expressed as a set of many pixels. There are two methods for creating character fonts: a method in which an operator creates purely a computer using only a computer, and a method in which actual characters drawn on an original such as paper are captured as raster data on a computer using an image input device or the like. is there. In the latter method, digital data obtained from the image input device (for example, 256 values are obtained for one pixel) is converted into binary data,
That is, it is expressed with or without pixels. In general, characters drawn on a document have non-uniform density, and the conversion result is significantly different depending on the setting of conversion conditions for binary data, and a desired character shape may not be obtained. This usually results in some of the contours not being smooth. Also, if there is a stain on the original, the stain is recognized as a part of the character, and the converted character will have white spots or black spot stains.

このように、画像入力装置から文字を入力する方法で
は、文字を入力した後に文字の形状を修正する操作が必
要になる。そこで従来は、入力した文字をディスプレイ
装置に表示させ、オペレータがこの表示を見ながら対話
形式で修正入力を行うという方法を採っていた。
As described above, in the method of inputting a character from the image input device, an operation of correcting the shape of the character after inputting the character is required. Conventionally, therefore, a method has been adopted in which input characters are displayed on a display device, and an operator performs correction input interactively while watching the display.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかしながら、従来の文字の修正方法はオペレータの
手作業に負うものであり、修正箇所が多いと、多大な労
力と時間を費やすことになり、極めて効率が悪いものと
なっていた。
However, the conventional character correction method depends on the manual operation of the operator, and if there are many correction points, a great deal of labor and time is required, resulting in extremely inefficient operation.

そこで本発明は、画像入力装置などから入力した文字
の修正を、人手によらずに自動的に修正させることので
きる文字の修正方法を提供することを目的とする。
Accordingly, an object of the present invention is to provide a character correction method that can automatically correct characters input from an image input device or the like without manual intervention.

〔問題点を解決するための手段〕[Means for solving the problem]

本発明は、画像入力装置などから入力した文字を修正
する方法において、 多数の画素の集合として表現される文字のラスターデ
ータをXY座標系に入力する入力段階と、 一次元的に連続する画素からなる閉ループによって構
成される輪郭線を、入力したラスターデータから抽出す
る輪郭線抽出段階と、 輪郭線の構成要素となる各画素を閉ループに沿って一
画素ずつ追跡し、この輪郭線が滑らかになるように、所
定の画素の位置座標を修正する追跡修正段階と、 輪郭線によって囲まれた閉領域のうち、文字本体とな
る部分を画素で埋める中塗り段階と、 輪郭線を構成する画素および中塗り段階で埋められた
画素の位置座標に基づいて、修正後の文字のラスターデ
ータを出力する出力段階と、 を行うようにしたものである。
The present invention provides a method for correcting a character input from an image input device or the like, comprising: inputting raster data of a character expressed as a set of a large number of pixels to an XY coordinate system; A contour extraction step of extracting a contour formed by a closed loop from input raster data, and tracing each pixel that is a component of the contour one pixel at a time along the closed loop to smooth the contour. Thus, a tracking correction step of correcting the position coordinates of a predetermined pixel, a filling step of filling a portion serving as a character body in the closed area surrounded by the contour with pixels, a pixel forming the contour and And (c) outputting the corrected raster data of the character based on the position coordinates of the pixels filled in the painting step.

〔作 用〕(Operation)

本発明に係る文字の修正方法では、まず入力した文字
のラスターデータから輪郭線のみが抽出される。この輪
郭線は一次元的に連続する画素からなる閉ループを構成
する。続いて、この閉ループに沿って輪郭線を滑らかに
する作業が行われる。これによって輪郭線自身は滑らか
なものに修正される。この後、輪郭線の内側を画素で塗
りつぶすようにすれば、滑らかな輪郭線によって囲まれ
た文字が形成される。以上の手順はすべてコンピュータ
によって実施することができる手順であるので、人手に
よらない自動的修正が可能になる。
In the character correcting method according to the present invention, first, only the outline is extracted from the raster data of the input character. This contour forms a closed loop consisting of one-dimensionally continuous pixels. Subsequently, an operation of smoothing the contour along this closed loop is performed. As a result, the contour itself is corrected to a smooth one. Thereafter, if the inside of the outline is filled with pixels, a character surrounded by a smooth outline is formed. Since the above procedures are all procedures that can be performed by a computer, automatic correction can be performed without manual intervention.

〔実施例〕〔Example〕

以下、本発明を図示する実施例に基づいて説明する。
第1図は本発明に係る文字の修正方法の手順を示す流れ
図である。以下、カタカナの「ロ」という文字を例にと
って、この修正手順を説明することにする。
Hereinafter, the present invention will be described based on the illustrated embodiments.
FIG. 1 is a flowchart showing a procedure of a character correcting method according to the present invention. In the following, this correction procedure will be described with reference to the katakana character "B" as an example.

まず、ステップS1において、文字のラスターデータの
入力が行われる。これは画像入力装置などから、多数の
画素の集合として表現される文字のラスターデータをXY
座標系に入力する手順である。文字「ロ」は例えば、第
2図(a)に示すようなラスターデータとしてXY座標系
に入力される。なお、ここでは水平方向をX方向、垂直
方向をY方向にとってXY座標系を定義している。また、
ハッチングは多数の画素が密集していることを示すもの
とする。
First, in step S1, character raster data is input. This is an image input device that converts raster data of a character expressed as a set of many pixels into XY
This is the procedure for inputting into the coordinate system. The character “b” is input to the XY coordinate system as raster data as shown in FIG. 2A, for example. Here, an XY coordinate system is defined with the horizontal direction being the X direction and the vertical direction being the Y direction. Also,
Hatching indicates that a large number of pixels are dense.

次に、ステップS2において、輪郭線の抽出を行う。こ
こで抽出する輪郭線は、一次元的に連続する画素からな
る閉ループによって構成されるものであり、この例では
第2図(d)に示すように、外側の輪郭線1と内側の輪
郭線2との2つの輪郭線が抽出される。第3図は、外側
の輪郭線1の部分拡大図である。この第3図を見ればわ
かるように、輪郭線は画素が一次元的に、すなわち、線
状に並んだものであり、全体としては1つの閉ループを
形成している。このような輪郭線を抽出するには、たと
えば、次のようなアルゴリズムに基づく処理を行なえば
よい。まず、第2図(a)のようにして得られたラスタ
ーデータを、ちょうどテレビジョンの画像走査と同様に
X方向に順に走査し、始点画素と終点画素とを求める。
ここで始点画素とは、画素無しの状態から画素有りの状
態に変化したときの変化位置に存在する画素をいい、終
点画素とは、画素有りの状態から画素無しの状態に変化
したときの変化位置に存在する画素をいう。第2図
(a)の例では、画素x1が最初の始点画素として求ま
る。走査はそのまま図の矢印に沿って画素x2,x3と右へ
向かって続けられてゆき、画素x4を境にして画素有りの
状態から無しの状態に変化する。したがって、画素x4か
ら終点画素として求まる。続いて、この一列下の画素に
ついての走査が左から右へと行われ、終点画素x5と終点
画素x6とが求まる。このようにして求まった始点画素お
よび終点画素のみを抽出してプロットしてゆけば、第2
図(b)に示すように、部分輪郭線14,24,22,12が得ら
れる。次に、Y方向について同様に走査して、始点画素
と終点画素とを抽出してプロットすれば、第2図(c)
に示すように、部分輪郭線11,21,23,13が得られる。こ
のようにして得られた部分輪郭線を合成すれば、第2図
(d)に示すような外側輪郭線1と内側輪郭線2とを得
ることができる。
Next, in step S2, contour lines are extracted. The contour to be extracted here is formed by a closed loop made up of one-dimensionally continuous pixels. In this example, as shown in FIG. 2 (d), the outer contour 1 and the inner contour 2 are extracted. FIG. 3 is a partially enlarged view of the outer contour 1. As can be seen from FIG. 3, the contour line is one in which pixels are arranged one-dimensionally, that is, linearly, and forms one closed loop as a whole. In order to extract such a contour, for example, a process based on the following algorithm may be performed. First, the raster data obtained as shown in FIG. 2A is sequentially scanned in the X direction just like the image scanning of a television, and a start pixel and an end pixel are obtained.
Here, the start pixel is a pixel existing at a change position when the state changes from the state without the pixel to the state with the pixel, and the end point pixel is a change when the state changes from the state with the pixel to the state without the pixel. It refers to a pixel at a position. In the example of FIG. 2A, the pixel x1 is determined as the first start pixel. The scanning is continued to the right with the pixels x2 and x3 along the arrow in the figure, and changes from the state with pixels to the state without pixels at the pixel x4. Therefore, it is determined as the end point pixel from the pixel x4. Subsequently, the scanning of the pixels one row below is performed from left to right, and an end pixel x5 and an end pixel x6 are obtained. By extracting and plotting only the start pixel and the end pixel obtained in this way, the second pixel is obtained.
As shown in FIG. 7B, partial contours 14, 24, 22, 12 are obtained. Next, the same scanning is performed in the Y direction to extract and plot the starting pixel and the ending pixel, as shown in FIG.
As shown in (1), partial outlines 11, 21, 23, and 13 are obtained. By synthesizing the partial outlines obtained in this way, an outer outline 1 and an inner outline 2 as shown in FIG. 2D can be obtained.

次に、ステップS3において輪郭線の追跡修正を行う。
すなわち、ステップS2で抽出した各輪郭線について、そ
の構成要素となる各画素を閉ループに沿って一画素ずつ
追跡し、輪郭線が滑らかになるように、所定の画素の位
置座標を修正する作業を行うのである。これは、たとえ
ば、次のようなアルゴリスムに基づく処理を行なえばよ
い。まず、その輪郭線を構成する任意の一画素を出発点
にとり、時計回りあるいは反時計回りに、1つの画素か
ら次の画素へと追跡動作を行って、再び出発点に戻る処
理を行うのである。このとき、次の画素に移動するとき
に、移動方向をXY座標系における±X,±Yで表現したフ
ラグを立てるようにする。このフラグの立て方を第4図
の図表に示す。すなわち、移動前の画素の位置を原点と
し、次の画素がこの原点に対して上下左右の位置にある
場合には、フラグ0を立て、斜めの位置にある場合に
は、原点より右の移動を+X,左の移動を−X,上の移動を
+Y,下の移動を−Yで示すようにしたフラグを立てるよ
うにするのである。たとえば、左上の移動であれば、−
Xおよび+Yのフラグが立つことになる。そして、ある
フラグが立ってから、このフラグと逆符号のフラグが立
った場合に、両フラグに対応する画素区間の修正を行う
のである。この修正は輪郭線を滑らかにする方向に画素
を移動させることによって行われる。
Next, in step S3, the contour is tracked and corrected.
In other words, for each contour line extracted in step S2, each component pixel is tracked one pixel at a time along a closed loop, and the work of correcting the position coordinates of predetermined pixels so that the contour line is smoothed. Do it. For this, for example, processing based on the following algorithm may be performed. First, an arbitrary pixel constituting the contour is taken as a starting point, a tracking operation is performed from one pixel to the next pixel in a clockwise or counterclockwise direction, and processing for returning to the starting point is performed again. . At this time, when moving to the next pixel, a flag expressing the moving direction as ± X, ± Y in the XY coordinate system is set. How to set this flag is shown in the chart of FIG. That is, the position of the pixel before the movement is set as the origin, and the flag 0 is set when the next pixel is located at the upper, lower, left and right positions with respect to the origin, and when the next pixel is at an oblique position, the rightward movement from the origin is Is set as + X, left movement is indicated by -X, upward movement is indicated by + Y, and downward movement is indicated by -Y. For example, to move to the upper left,
The X and + Y flags are set. Then, when a flag with a sign opposite to this flag is set after a certain flag is set, the pixel section corresponding to both flags is corrected. This correction is made by moving the pixels in a direction to smooth the outline.

上述のアルゴリズムを、第5図に示す実例を参照しな
がらより詳しく説明する。いま、ステップS2で得られた
輪郭線が第5図のような20個の画素で構成されていたと
する。この20個の画素のうち1つが出発点として選ばれ
る。この例では、画素P0が出発点となっている。この出
発点となる画素はどの画素を選んでもかまわない。次に
この出発点画素P0に隣接する、すなわち、上下左右ある
いは斜めに繋がっている画素へ追跡作業を行う。前述の
ように画素は閉ループを形成するように連なっているた
め、各画素は2つの画素に隣接していることになる。た
とえば、画素P0は画素P1とP19との2つの画素に繋がっ
ている。追跡作業はこのどちらかの方向に行ってもよい
が、一度時計回りか反時計回りかに決定したら、以後の
追跡作業はこの決定した方向に進めてゆかねばならな
い。この例では、画素P0からP1へと追跡を開始し、結局
反時計回りに追跡を行ってゆくことになる。P0→P1の追
跡では、左下への移動が行われたため、第4図からフラ
グ−Xおよび−Yが立つことになる。また、P1→P2の追
跡では、真下への移動が行われたため、フラグ0が立つ
ことになる。結局、P0→P1→P2→P3という追跡によって
得られるフラグは、(−X,−Y)、(0)、(+X,−
Y)となる。ここでX方向のフラグに注目すると、−X
が立ったあと+Xが立っており、逆符号のフラグが生成
されたことになる。そこで、この時点でP0→P1→P2→P3
になる追跡区間に挟まれた画素P1およびP2の位置をP1′
およびP2′に修正して輪郭線を滑らかにするのである。
この画素の移動方向は、2番目に立ったフラグに基づい
て決定すればよい。たとえば、この例では逆符号のフラ
グは+Xであるから、Xの増加する方向、すなわち右方
向に移動させている。このようにして閉ループに沿っ
て、もとの出発点画素P0に戻るまで、反時計回りに追跡
および修正を行ってゆけば、画像入力時の条件によって
生じた輪郭線の凹凸を滑らかな線に修正することができ
る。
The above algorithm will be described in more detail with reference to the example shown in FIG. Now, it is assumed that the contour obtained in step S2 is composed of 20 pixels as shown in FIG. One of these 20 pixels is chosen as a starting point. In this example, the pixel P0 is the starting point. Any pixel can be selected as the starting point pixel. Next, a tracking operation is performed on a pixel adjacent to the starting point pixel P0, that is, a pixel connected vertically, horizontally, or diagonally. As described above, since the pixels are connected so as to form a closed loop, each pixel is adjacent to two pixels. For example, the pixel P0 is connected to two pixels P1 and P19. The tracking operation may be performed in either of these directions, but once it is determined to be clockwise or counterclockwise, the subsequent tracking operation must proceed in the determined direction. In this example, the tracking starts from the pixel P0 to the pixel P1, and eventually the tracking is performed counterclockwise. In the tracking from P0 to P1, since the movement to the lower left has been performed, the flags -X and -Y are set from FIG. Further, in the tracking from P1 to P2, the flag 0 is set because the movement is performed right below. Eventually, the flags obtained by tracking P0 → P1 → P2 → P3 are (−X, −Y), (0), (+ X, −
Y). Here, paying attention to the flag in the X direction, -X
Is set, and + X is set, indicating that a flag of the opposite sign has been generated. Therefore, at this point, P0 → P1 → P2 → P3
The position of the pixels P1 and P2 between the tracking sections
And P2 'to smooth the contour.
The moving direction of the pixel may be determined based on the flag that stands second. For example, in this example, since the flag of the opposite sign is + X, it is moved in the direction in which X increases, that is, in the right direction. In this way, if the tracking and correction are performed counterclockwise along the closed loop until returning to the original starting point pixel P0, the unevenness of the contour generated by the conditions at the time of image input becomes a smooth line. Can be modified.

なお、第5図では、説明の便宜上各画素をかなり拡大
した例を示しているが、実際には各画素は非常に微小な
ものであり、文字がそれ自身の本来の形状として有する
凹凸に比べて、ここで修正される画素並びの凹凸は非常
に小さいものである。したがって、この追跡修正作業に
よって、文字本来の形状までが変形を受けることはな
い。
FIG. 5 shows an example in which each pixel is considerably enlarged for convenience of explanation. However, in actuality, each pixel is very minute, and the character has an unevenness compared to the original shape of the character itself. Here, the unevenness of the pixel array corrected here is very small. Therefore, the original shape of the character is not deformed by the tracking correction operation.

次に、ステップS4において、輪郭線の中塗り作業を行
う。これは、ステップS3で修正を受けた輪郭線によって
囲まれた閉領域のうち、文字本体となる部分を画素で埋
める作業である。この実施例では、この中塗り作業にお
いて、まず、不要な輪郭線の削除を行っている。ここで
いう不要な輪郭線とは、文字に不要な白抜け、黒点汚れ
に対する輪郭線である。前述のように、このような白抜
け、黒点汚れは、画像入力時に混入してしまうものであ
り、ステップS3までの処理では除去できず、たとえば、
第6図(a)のように、文字の外側輪郭線1、内側輪郭
線2、とともに、白抜け輪郭線3、黒点汚れ輪郭線4が
生じてしまう。この不要な輪郭線を除去するために、各
輪郭線の囲う閉領域の面積を求め、この面積が所定の基
準値以下であった場合にその輪郭線を削除する作業を行
う。これは、一般に白抜けや黒点汚れがそれほど広い領
域に渡って生じるものではないという性質を利用したも
のである。第6図(a)の例では、輪郭線3,4の囲う閉
領域がともに所定の基準面積以下であるため削除され、
第6図(b)のように、輪郭線1,2のみが残ることにな
る。
Next, in step S4, an intermediate coating operation of the outline is performed. This is an operation of filling a portion serving as a character body in the closed region surrounded by the contour corrected in step S3 with pixels. In this embodiment, unnecessary contour lines are first deleted in this intermediate coating work. Unnecessary outlines here are outlines for unnecessary white spots and black spots on characters. As described above, such white spots and black spots are mixed during image input and cannot be removed by the processing up to step S3.
As shown in FIG. 6 (a), a white outline 3 and a black spot outline 4 are generated together with the outer outline 1 and the inner outline 2 of the character. In order to remove the unnecessary outlines, the area of the closed region surrounded by each outline is obtained, and when the area is equal to or smaller than a predetermined reference value, the operation of deleting the outline is performed. This utilizes the property that white spots and black spot stains are not generally generated over a very large area. In the example of FIG. 6A, the closed areas surrounded by the contour lines 3 and 4 are both deleted because they are smaller than a predetermined reference area.
As shown in FIG. 6B, only the contour lines 1 and 2 remain.

したがって実際の中塗り作業は、この2つの輪郭線1,
2についてのみ行われる。中塗りを行うためには、文字
本体となる部分、この例では第6図(d)でハッチング
を施した部分にのみ画素を埋める作業を行わねばならな
い。この作業は例えば、次のようなアルゴリズムで処理
することができる。すなわち、常に外側の輪郭線から内
側の輪郭線へと順次中塗り作業を進めるように、かつ、
各中塗り作業において、中塗りの対象となる輪郭線内閉
領域が画素無しの状態であればこの閉領域内すべてを画
素有りの状態にし、画素有りの状態であればこの閉領域
内すべてを画素無しの状態にする作業を行うのである。
たとえば、第6図(b)の例では、まず外側輪郭線1に
対しての中塗りが行われる。外側輪郭線1内の閉領域は
画素無しの状態であるから、第6図(c)に示すように
この閉領域内のすべての領域に画素が埋められる。続い
て内側輪郭線2に対しての中塗りが行われる。この時点
で、内側輪郭線2内の閉領域は画素有りの状態であるか
ら、第6図(d)に示すようにこの閉領域内のすべての
領域の画素が削除される。
Therefore, the actual middle coat operation is performed using these two contour lines 1,
Only done for 2. In order to perform the intermediate coating, it is necessary to perform an operation of filling pixels only in a portion serving as a character body, in this example, a hatched portion in FIG. 6D. This operation can be processed by the following algorithm, for example. That is, so that the intermediate coating work always proceeds sequentially from the outer contour to the inner contour, and
In each intermediate coating work, if the closed area within the contour line to be subjected to the intermediate coating is in a state without pixels, all of the closed area is set to a state with pixels. That is, the work of making the state without pixels is performed.
For example, in the example of FIG. 6B, first, the outer contour line 1 is coated with the middle coat. Since the closed area in the outer contour line 1 has no pixels, pixels are buried in all the areas in the closed area as shown in FIG. 6 (c). Subsequently, middle coating is performed on the inner contour line 2. At this point, since the closed area in the inner contour line 2 has pixels, the pixels in all the areas in the closed area are deleted as shown in FIG. 6 (d).

最後にステップS5において、このようにして修正され
た文字のラスターデータが出力される。すなわち、第6
図(d)に示すように、輪郭線1,2を構成する画素およ
び中塗りで埋められたハッチングで示す部分の画素の位
置データが出力されることになる。かくして、入力した
文字の形状の修正が可能になる。
Finally, in step S5, the raster data of the character thus corrected is output. That is, the sixth
As shown in FIG. 6D, the position data of the pixels constituting the contour lines 1 and 2 and the pixels of the portions indicated by hatching filled with the intermediate paint are output. Thus, the shape of the input character can be corrected.

以上、本発明を一実施例に基づいて説明したが、本発
明を実施するための個々のアルゴリズムは上述の実施例
に限定されるわけではなく、同一の結果を得ることので
きるアルゴリズムであれば、他のアルゴリズムを用いて
実施することも可能である。
As described above, the present invention has been described based on one embodiment. However, individual algorithms for implementing the present invention are not limited to the above-described embodiments, and any algorithm that can obtain the same result can be used. , Can be implemented using other algorithms.

〔発明の効果〕〔The invention's effect〕

以上のとおり本発明によれば、入力した文字から輪郭
線を抽出して、この輪郭線が滑らかになるように修正を
行ったのち、輪郭線内を中塗りするようにして文字の修
正を行うようにしたため、人手によらずに自動的に文字
と修正を行うことが可能になる。
As described above, according to the present invention, a contour line is extracted from an input character, the contour line is corrected so as to be smooth, and then the character is corrected such that the inside of the contour line is painted. With this configuration, it is possible to automatically perform the character and correction without manual operation.

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

第1図は本発明に係る文字の修正方法の手順を示す流れ
図、第2図は第1図に示す方法における輪郭線の抽出段
階の具体例を示す図、第3図は第2図に示す方法によっ
て抽出された輪郭線の部分拡大図、第4図は第1図に示
す方法における輪郭線の追跡修正段階で用いるフラグの
説明図、第5図は第1図に示す方法における輪郭線の追
跡段階の具体例を示す図、第6図は第1図に示す方法に
おける輪郭線の中塗り段階の具体例を示す図である。 1……外側輪郭線、2……内側輪郭線、3……白抜けの
輪郭線、4……黒点汚れの輪郭線、11〜14,21〜24……
部分輪郭線、S1〜S5……流れ図の各ステップ、P0〜P19
……輪郭線上の画素。
FIG. 1 is a flow chart showing the procedure of a method for correcting a character according to the present invention, FIG. 2 is a diagram showing a specific example of a contour extraction step in the method shown in FIG. 1, and FIG. 3 is shown in FIG. FIG. 4 is a partially enlarged view of the contour extracted by the method, FIG. 4 is an explanatory view of a flag used in the contour correction step of the contour in the method shown in FIG. 1, and FIG. 5 is a diagram of the contour in the method shown in FIG. FIG. 6 is a diagram showing a specific example of the tracking stage, and FIG. 6 is a diagram showing a specific example of the intermediate coating stage of the outline in the method shown in FIG. 1 ... Outer outline, 2 ... Inner outline, 3 ... Outline outline, 4 ... Outline of black spot stain, 11-14, 21-24 ...
Partial contours, S1 to S5 ... Each step in the flow chart, P0 to P19
... Pixels on the outline.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭61−238086(JP,A) 特開 昭62−57079(JP,A) 特開 昭61−245286(JP,A) 特開 昭56−82985(JP,A) 特開 昭60−214080(JP,A) 特開 昭57−111786(JP,A) ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-61-238086 (JP, A) JP-A-62-57079 (JP, A) JP-A-61-245286 (JP, A) 82985 (JP, A) JP-A-60-214080 (JP, A) JP-A-57-111786 (JP, A)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】多数の画素の集合として表現される文字の
ラスターデータをXY座標系に入力する入力段階と、 一次元的に連続する画素からなる閉ループによって構成
される輪郭線を、前記入力したラスターデータから抽出
する輪郭線抽出段階と、 前記輪郭線の構成要素となる各画素を閉ループに沿って
一画素ずつ追跡し、1つの画素から次の画素へ追跡動作
を行うときに、追跡動作の移動方向をXY座標系における
±X,±Yで表現したフラグを立て、第1のフラグが立っ
てからこの第1のフラグとは逆符号の第2のフラグが立
った場合に、前記第1のフラグを生じさせた画素から前
記第2のフラグを生じさせた画素の直前の画素までを、
輪郭線が滑らかになる方向に移動させて画素の位置座標
を修正する追跡修正段階と、 前記輪郭線によって囲まれた閉領域のうち、文字本体と
なる部分を画素で埋める中塗り段階と、 前記輪郭線を構成する画素および前記中塗り段階で埋め
られた画素の位置座標に基づいて、修正後の文字のラス
ターデータを出力する出力段階と、 を備えることを特徴とする文字の修正方法。
An input step of inputting raster data of a character represented as a set of a large number of pixels into an XY coordinate system, and an outline formed by a closed loop composed of one-dimensionally continuous pixels is input. A contour extraction step of extracting from the raster data, and tracking each pixel that is a component of the contour one by one along a closed loop, and performing a tracking operation from one pixel to the next pixel. A flag is set in which the moving direction is expressed by ± X and ± Y in the XY coordinate system. When the second flag having the opposite sign to the first flag is set after the first flag is set, the first flag is set. From the pixel that caused the flag to the pixel immediately before the pixel that caused the second flag,
A tracking correction step of correcting the position coordinates of the pixel by moving the contour in a direction in which the contour becomes smooth; and, in a closed area surrounded by the contour, an intermediate coating step of filling a portion serving as a character body with pixels, An output step of outputting raster data of the corrected character based on the position coordinates of the pixels constituting the contour line and the pixels filled in the intermediate coating step.
【請求項2】輪郭線抽出段階において、ラスターデータ
をX方向またはY方向に走査し、画素有りの状態から画
素無しの状態にあるいは画素無しの状態から画素有りの
状態に変化したときの変化位置に存在する画素を輪郭線
の構成要素となる画素として抽出することを特徴とする
特許請求の範囲第1項記載の文字の修正方法。
2. In a contour line extraction step, raster data is scanned in the X direction or the Y direction, and a change position when a state changes from a state with pixels to a state without pixels or from a state without pixels to a state with pixels is detected. 2. The character correcting method according to claim 1, wherein the pixels existing in the character string are extracted as pixels constituting the outline.
【請求項3】中塗り段階において、画素を埋める処理を
行う前に、各輪郭線が囲う閉領域の面積を求め、この面
積が所定の基準値以下であった場合にその輪郭線を削除
する作業を行うことを特徴とする特許請求の範囲第1項
乃至第2項のいずれかに記載の文字の修正方法。
3. In an intermediate coating stage, before performing a process of filling pixels, an area of a closed region surrounded by each contour line is determined, and when the area is smaller than a predetermined reference value, the contour line is deleted. 3. A method for correcting a character according to claim 1, wherein the method is performed.
【請求項4】中塗り段階において、外側の輪郭線から内
側の輪郭線へと順次中塗り作業を進めてゆき、かつ、各
中塗り作業において、中塗りの対象となる輪郭線内閉領
域が画素無しの状態であればこの閉領域内すべてを画素
有りの状態にし、画素有りの状態であればこの閉領域内
すべてを画素無しの状態にする作業を行うことを特徴と
する特許請求の範囲第1項乃至第3項のいずれかに記載
の文字の修正方法。
4. In the intermediate coating step, the intermediate coating operation is sequentially performed from the outer outline to the inner outline, and in each intermediate coating operation, the outline inside closed area to be subjected to the intermediate coating is removed. The method according to claim 1, characterized in that when there is no pixel, all of the inside of the closed area is in a state of having a pixel, and when there is a pixel, operation of making all of the inside of this closed area is in a state of no pixel. A method for correcting a character according to any one of Items 1 to 3.
JP62147929A 1987-06-16 1987-06-16 How to modify characters Expired - Fee Related JP2569049B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62147929A JP2569049B2 (en) 1987-06-16 1987-06-16 How to modify characters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62147929A JP2569049B2 (en) 1987-06-16 1987-06-16 How to modify characters

Publications (2)

Publication Number Publication Date
JPS63313284A JPS63313284A (en) 1988-12-21
JP2569049B2 true JP2569049B2 (en) 1997-01-08

Family

ID=15441265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62147929A Expired - Fee Related JP2569049B2 (en) 1987-06-16 1987-06-16 How to modify characters

Country Status (1)

Country Link
JP (1) JP2569049B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11158031B1 (en) 2021-05-24 2021-10-26 ReportsNow, Inc. Systems, methods, and devices for image processing

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5853392B2 (en) * 1979-12-10 1983-11-29 日本電信電話株式会社 Character pattern normalization processing device
JPS57111786A (en) * 1980-12-29 1982-07-12 Fujitsu Ltd Profile coordinate pickup system for figure
JPS60214080A (en) * 1984-04-10 1985-10-26 Sci House:Kk Processing method of bit matrix picture
JPS61238086A (en) * 1985-04-15 1986-10-23 株式会社 写研 Character processing system
JPS61245286A (en) * 1985-04-24 1986-10-31 Hitachi Ltd Method for correcting profile shape of picture
JPS6257079A (en) * 1985-09-06 1987-03-12 Nec Corp Smoothing device

Also Published As

Publication number Publication date
JPS63313284A (en) 1988-12-21

Similar Documents

Publication Publication Date Title
US6411742B1 (en) Merging images to form a panoramic image
JP2591984B2 (en) Pattern recognition device
EP0516047A2 (en) Method of and apparatus for processing multi-dimensional data
US5237624A (en) Reproduction of image pattern data
JP2569049B2 (en) How to modify characters
US6806878B2 (en) Graphic editing apparatus for adding or deleting curve to/from graphics by interactive processing
US5293471A (en) Graphics processing system for deleting one of overlapping line and graphics images
JP2918465B2 (en) Image processing method
JP2667430B2 (en) Image stitching device
JP2864577B2 (en) Pattern processing method
JPH04255080A (en) Image input device
JPS62170287A (en) Apparatus for forming stitch data of embroidering machine
JP2779522B2 (en) Polygon input method
JP3338484B2 (en) Outline font transformation device
JP2792102B2 (en) Character font drawing method
JPH06325176A (en) Image extracting device
JP2675043B2 (en) How to edit drawing data
JPH0676035A (en) Picture data processing system
JPH0778261A (en) Painting-out method for specified area of image
JPH0261062B2 (en)
JPH07129752A (en) Picture processor
JPH02116586A (en) Method for correcting distortion of pattern film having characters
JPH064665A (en) Method and device for extracting boundary
JP2001331766A (en) Preparing method of pattern recognition dictionary, computer-readable recording medium, pattern recognition dictionary preparing device and character recognition device
JPH08180087A (en) Distortion correcting method for graphic

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees