JPH1169165A - Character image coding method and system - Google Patents

Character image coding method and system

Info

Publication number
JPH1169165A
JPH1169165A JP9225358A JP22535897A JPH1169165A JP H1169165 A JPH1169165 A JP H1169165A JP 9225358 A JP9225358 A JP 9225358A JP 22535897 A JP22535897 A JP 22535897A JP H1169165 A JPH1169165 A JP H1169165A
Authority
JP
Japan
Prior art keywords
value
pixel
threshold
character image
pixel value
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
Application number
JP9225358A
Other languages
Japanese (ja)
Inventor
Kazumi Arakage
和美 荒蔭
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP9225358A priority Critical patent/JPH1169165A/en
Publication of JPH1169165A publication Critical patent/JPH1169165A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a character image coding method and its system where an input character image is coded to obtain a decoded image with high image quality. SOLUTION: A threshold level improper point detector 7 obtains a difference between a pixel and an adjacent pixel and selects a pixel value between the pixel and tone pixel value of the adjacent pixel with a small difference as a threshold level improper value and adds number of times where the pixel values are discriminated to be the threshold level improper value. A threshold level improper point detection section 7 applies the operation above to all pixels to detect the threshold level improper point information with respect to an input image. A threshold level revision section 8 compares the detected threshold level improper point information with a threshold level improper point of a pixel value close to the threshold level among the threshold level improper points decided with a threshold level decision section 4 within a prescribed range and a quantization threshold level is revised to the pixel value when the pixel value with a smaller threshold level improper point is in existence in the range.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は文字画像符号化方法
に係り、特に多値ランレングス符号化を用いて文字画像
を圧縮符号化する文字画像符号化方法及び装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character image encoding method, and more particularly, to a character image encoding method and apparatus for compressing and encoding a character image using multi-value run-length encoding.

【0002】[0002]

【従来の技術】図5は従来の画像符号化装置の一例のブ
ロック図を示す。同図において、入力端子1より入力さ
れた、例えば映画の字幕等の文字画像データは、フレー
ムメモリ2に供給されて記憶された後、読み出されて量
子化器3及び閾値決定部4にそれぞれ供給される。閾値
決定部4は、入力文字画像データに応じた量子化閾値を
決定し、その量子化閾値を量子化器3に供給する。
2. Description of the Related Art FIG. 5 is a block diagram showing an example of a conventional image coding apparatus. In FIG. 1, character image data such as subtitles of a movie, for example, input from an input terminal 1 is supplied to and stored in a frame memory 2 and then read out to a quantizer 3 and a threshold determination unit 4 respectively. Supplied. The threshold determining unit 4 determines a quantization threshold according to the input character image data, and supplies the quantization threshold to the quantizer 3.

【0003】これにより、量子化器3からは複数の階調
に量子化された文字画像データが取り出されて、ランレ
ングス符号化器5に供給され、ここでデータ要素と出現
回数の組み合わせに応じて可変長符号化する公知のラン
レングス符号化方式で符号化して圧縮され、ビットスト
リームとして出力端子6へ出力される。
[0003] Thus, character image data quantized to a plurality of gradations is taken out from the quantizer 3 and supplied to the run-length encoder 5, where it is determined according to the combination of the data element and the number of appearances. The data is encoded by a known run-length encoding method for variable-length encoding, compressed, and output to the output terminal 6 as a bit stream.

【0004】[0004]

【発明が解決しようとする課題】しかるに、上記の従来
の画像符号化装置では、文字画像データに対して固定的
な閾値を用いて量子化を行っているため、微妙に階調の
変化する部分の画素値と量子化閾値とが一致することが
あり、そのため、復号画像で階調に不自然な段差が発生
し易いという問題がある。
However, in the above-described conventional image coding apparatus, since the character image data is quantized using a fixed threshold value, a portion where the gradation changes delicately is used. Pixel value and the quantization threshold may coincide with each other, and therefore, there is a problem that an unnatural level difference is likely to occur in the gradation in the decoded image.

【0005】本発明は上記の点に鑑みなされたもので、
入力文字画像を高品質の復号画像が得られるように符号
化し得る文字画像符号化方法及び装置を提供することを
目的とする。
[0005] The present invention has been made in view of the above points,
It is an object of the present invention to provide a character image encoding method and apparatus capable of encoding an input character image so as to obtain a high-quality decoded image.

【0006】[0006]

【課題を解決するための手段】上記の目的を達成するた
め、本発明の文字画像符号化方法は、入力文字画像デー
タの量子化閾値を決定すると共に、注目画素とその周辺
画素の画素値の差分値を予め定めた設定値と大小比較
し、その比較結果に応じて決定した量子化閾値を適応的
に変更し、この変更後の量子化閾値に基づいて入力文字
画像データを複数の階調に量子化した後、ランレングス
符号化して圧縮するようにしたものである。
In order to achieve the above object, a character image encoding method according to the present invention determines a quantization threshold value of input character image data and determines a pixel value of a pixel of interest and its surrounding pixels. The difference value is compared in magnitude with a predetermined set value, the quantization threshold determined according to the comparison result is adaptively changed, and the input character image data is converted into a plurality of gradations based on the changed quantization threshold. , And then run-length encoded and compressed.

【0007】また、本発明の文字画像符号化装置は、入
力文字画像データの量子化閾値を決定する閾値決定部
と、入力画像データにおいて注目画素とその周辺画素の
画素値の差分値を求め、その差分値を予め定めた設定値
と大小比較し、その比較結果に応じて決定した量子化閾
値を適応的に変更する閾値変更手段と、変更手段により
変更された量子化閾値に基づいて入力文字画像データを
複数の階調に量子化する量子化器と、量子化器から出力
されたデータをランレングス符号化して圧縮して出力す
る符号化器とよりなる構成としたものである。
The character image coding apparatus of the present invention further comprises: a threshold value determining unit for determining a quantization threshold value of input character image data; and a difference value between a pixel of interest and a peripheral pixel thereof in the input image data. Threshold value changing means for comparing the difference value with a predetermined set value, and adaptively changing a quantization threshold value determined according to the comparison result; and input characters based on the quantization threshold value changed by the change means. It has a configuration including a quantizer for quantizing image data into a plurality of gradations, and an encoder for performing run-length encoding, compressing and outputting data output from the quantizer.

【0008】本発明方法及び装置では、入力画像データ
において注目画素とその周辺画素の画素値の差分値を求
め、その差分値を予め定めた設定値と大小比較し、その
比較結果に応じて量子化閾値を適応的に変更するように
したため、差分値が設定値以下の階調の微妙に変化する
部分の画素値に量子化閾値が設定されにくくできる。
According to the method and apparatus of the present invention, a difference value between a pixel value of a pixel of interest and its surrounding pixels is obtained in input image data, the difference value is compared in magnitude with a predetermined set value, and a quantum value is determined according to the comparison result. Since the quantization threshold is adaptively changed, the quantization threshold can be hardly set to the pixel value of a portion where the difference value is slightly smaller than the set value and the gradation is slightly changed.

【0009】[0009]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面と共に説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0010】図1は本発明になる文字画像符号化装置の
一実施の形態のブロック図を示す。同図中、図5と同一
構成部分には同一符号を付してある。図1に示す実施の
形態は入力された文字画像データを4値に量子化した
後、ランレングス符号化する例であり、図5に示した従
来装置に、閾値不適正ポイント検出部7及び閾値変更部
8を付加した点に特徴がある。
FIG. 1 is a block diagram showing an embodiment of a character image encoding apparatus according to the present invention. 5, the same components as those in FIG. 5 are denoted by the same reference numerals. The embodiment shown in FIG. 1 is an example in which input character image data is quantized to quaternary values and then run-length encoded. The conventional apparatus shown in FIG. The feature is that a change unit 8 is added.

【0011】次に、この実施の形態の動作について説明
する。入力端子1を介して入力された、例えば映画の字
幕等の文字画像データは、フレームメモリ2に供給され
て記憶された後、読み出されて量子化器3、閾値決定部
4及び閾値不適正ポイント検出部7にそれぞれ供給され
る。閾値決定部4は、入力文字画像データに応じた量子
化閾値を決定し、その量子化閾値を量子化器3ではな
く、閾値変更器8に供給する。ここで、閾値決定部4に
より決定する量子化閾値は、入力画像の画素値の最大値
と最小値の間の範囲を4等分する点を値の小さな方から
それぞれ閾値a、閾値b、閾値cとする。
Next, the operation of this embodiment will be described. Character image data such as subtitles of a movie, which is input via the input terminal 1, is supplied to and stored in the frame memory 2, and is read out to be quantized 3, the threshold determination unit 4, and the threshold improper. Each is supplied to the point detection unit 7. The threshold determination unit 4 determines a quantization threshold according to the input character image data, and supplies the quantization threshold to the threshold changer 8 instead of the quantizer 3. Here, the quantization threshold value determined by the threshold value determination unit 4 is such that a point dividing the range between the maximum value and the minimum value of the pixel values of the input image into four equal to the threshold value a, the threshold value b, and the threshold value c.

【0012】また、フレームメモリ2の出力文字画像デ
ータは、同時に閾値不適正ポイント検出部7にも供給さ
れる。閾値不適正ポイント検出器7は、座標(x,y)
の注目画素と、この注目画素に対して上下左右に隣接す
る座標(x,y−1)、(x,y+1)、(x−1,
y)及び(x+1,y)の4つの隣接画素との間の差分
値を求め、その差分値が小さな隣接画素の画素値と注目
画素との間の画素値を閾値不適格値とし、その画素値が
閾値不適格値と判断された回数を加算する。ここでは、
座標(x,y−1)、(x,y+1)、(x−1,y)
及び(x+1,y)の隣接画素と注目画素との間の差分
値が「10」以下のとき、その間の画素値を閾値不適格
画素として検出する。また、閾値不適格画素と判断され
た回数を、その画素値の閾値不適正ポイントと呼ぶこと
にする。
The output character image data of the frame memory 2 is also supplied to the threshold improper point detection unit 7 at the same time. The threshold improper point detector 7 calculates the coordinates (x, y)
And the coordinates (x, y−1), (x, y + 1), (x−1,
y) and a difference value between four adjacent pixels (x + 1, y) are determined, and a pixel value between the pixel value of the adjacent pixel having a small difference value and the pixel of interest is set as a threshold ineligible value, and The number of times that the value is determined to be the threshold ineligible value is added. here,
Coordinates (x, y-1), (x, y + 1), (x-1, y)
When the difference value between the pixel of interest and the pixel of interest (x + 1, y) and the pixel of interest is equal to or less than “10”, the pixel value between them is detected as a threshold-eligible pixel. Also, the number of times a pixel is determined to be a threshold inappropriate pixel is referred to as a threshold inappropriate point of the pixel value.

【0013】次に、座標(x,y)の注目画素と、この
注目画素に対して上下左右に隣接する座標(x,y−
1)、(x,y+1)、(x−1,y)及び(x+1,
y)の4つの隣接画素と、更にその外側に隣接する画素
(x,y−2)、(x,y+2)、(x−2,y)、
(x+2,y)との差分値を観測し、その値が「10」
以下の時には、それら2つの画素値間の画素値に閾値不
適正ポイントを加算する。更に、差分値が「10」以上
になる画素が出現するまで、上下、左右方向へそれぞれ
範囲を広げて観測する。閾値不適正ポイント検出部7
は、以上の動作を全画素に対して行い、入力画像に対す
る閾値不適正ポイント情報を検出する。
Next, a pixel of interest at coordinates (x, y) and coordinates (x, y-
1), (x, y + 1), (x-1, y) and (x + 1,
y), and four adjacent pixels (x, y−2), (x, y + 2), (x−2, y),
A difference value from (x + 2, y) is observed, and the value is “10”.
In the following cases, the threshold inappropriate point is added to the pixel value between the two pixel values. Further, observation is performed by extending the range in the vertical and horizontal directions until a pixel having a difference value of “10” or more appears. Threshold improper point detection unit 7
Performs the above operation on all pixels, and detects threshold improper point information on the input image.

【0014】検出された閾値不適正ポイント情報は、閾
値変更部8に与えられる。閾値変更部8は、閾値決定部
4で決定された閾値aの閾値不適正ポイントと、閾値a
に近い画素値の閾値不適正ポイントを所定の範囲で比較
する。ここでは、閾値aからプラス方向、マイナス方向
それぞれ10レベルの範囲で比較することとする。比較
を行った結果、閾値aの閾値不適正ポイントより小さい
値の閾値不適正ポイントを持つ画素値が範囲内に存在し
た場合、閾値aをその画素値に変更し、閾値a’とす
る。これを閾値b、閾値cについても行う。変更された
閾値a’、閾値b’、閾値c’及び入力された文字画像
データは量子化器3に入力される。
The detected threshold improper point information is given to the threshold changing unit 8. The threshold value changing unit 8 includes a threshold value inappropriate point of the threshold value a determined by the threshold value determining unit 4 and a threshold value a.
Are compared within a predetermined range. Here, it is assumed that the comparison is performed in a range of 10 levels from the threshold value a in each of the plus direction and the minus direction. As a result of the comparison, when a pixel value having a threshold inappropriate point smaller than the threshold inappropriate point of the threshold a exists in the range, the threshold a is changed to the pixel value and set as the threshold a ′. This is also performed for the thresholds b and c. The changed threshold value a ′, threshold value b ′, threshold value c ′ and the input character image data are input to the quantizer 3.

【0015】量子化器3は閾値a’以下の画素をコー
ド”00”、閾値a’より大きく、かつ、閾値b’以下
の画素をコード”01”、閾値b’より大きく、かつ、
閾値c’以下の画素をコード”10”、閾値c’より大
きな画素をコード”11”で表し、4値に量子化を行
う。4値に量子化された文字画像データは、ランレング
ス符号化器5に供給され、ここでランレングス符号化さ
れた後出力端子6へ出力される。
The quantizer 3 codes pixels below the threshold value a 'with a code "00", pixels larger than the threshold value a' and below the threshold value b 'with a code "01", larger than the threshold value b', and
Pixels equal to or smaller than the threshold value c 'are represented by a code "10", and pixels larger than the threshold value c' are represented by a code "11". The quaternary quantized character image data is supplied to a run-length encoder 5, where it is run-length encoded and then output to an output terminal 6.

【0016】次に、ランレングス符号化の例について図
2と共に説明する。同じ値が1個から3個連続すると
き、図2(a)に21及び22で示すように、連続する
画素の数を2ビットで表し、その後にその画素の値を2
ビットで表す。次に、同じ値が4個から15個連続する
ときは、図2(b)に23で示すように、2ビットの”
0”を配置した後、連続する画素数を示す4ビットの領
域24、画素の値を示す2ビットの領域25を順次に配
置する。
Next, an example of run-length encoding will be described with reference to FIG. When one to three consecutive values are the same, the number of consecutive pixels is represented by 2 bits as indicated by reference numerals 21 and 22 in FIG.
Expressed in bits. Next, when the same value continues from four to fifteen, as shown at 23 in FIG.
After arranging 0 ", a 4-bit area 24 indicating the number of consecutive pixels and a 2-bit area 25 indicating the pixel value are sequentially arranged.

【0017】また、同じ値が16個から63個連続する
ときは、図2(c)に示すように、4ビットの”0”の
領域26に続けて、連続する画素数を示す6ビットの領
域27と、画素の値を示す2ビットの領域28を順次に
配置する。同様に、同じ値が64個から255個連続す
るときは、図2(d)に示すように、6ビットの”0”
の領域29に続けて、連続する画素数を示す8ビットの
領域30と、画素の値を示す2ビットの領域31を順次
に配置する。同様に、同じ値が256個からその画素ラ
インの最後まで連続するときは、図2(e)に示すよう
に、14ビットの”0”の領域32に続けて、その画素
の値を示す2ビットの領域33を配置する。
When the same value continues from 16 to 63, as shown in FIG. 2C, a 6-bit area 26 indicating the number of consecutive pixels follows the 4-bit "0" area 26. An area 27 and a 2-bit area 28 indicating a pixel value are sequentially arranged. Similarly, when the same value continues from 64 to 255, as shown in FIG.
Following the area 29, an 8-bit area 30 indicating the number of consecutive pixels and a 2-bit area 31 indicating the pixel value are sequentially arranged. Similarly, when the same value continues from 256 pixels to the end of the pixel line, as shown in FIG. 2E, a 14-bit "0" area 32 is followed by 2 indicating the value of the pixel. The bit area 33 is arranged.

【0018】次に、上記の実施の形態を具体的な例を用
いて説明する。図1において、閾値決定部4に入力され
た文字画像データの画素値の最大値を「255」、最小
値を「0」とする。閾値決定部4は、最大値と最小値の
間を4等分する画素値、すなわち「64」、「128」
及び「192」を閾値a、閾値b及び閾値cとそれぞれ
決定する。同時に、閾値不適正ポイント検出部7は、入
力された文字画像データについて、注目画素とその隣接
画素との差分値を観測する。ここでは、注目画素とその
上下、左右方向の隣接画素との差分値を観測し、注目画
素に対する閾値不適正ポイントを検出する。また、差分
値を観測する範囲は、閾値不適正画素が検出されなくな
るまでとする。
Next, the above embodiment will be described using a specific example. In FIG. 1, the maximum pixel value of the character image data input to the threshold determination unit 4 is “255”, and the minimum value is “0”. The threshold value determining unit 4 divides the pixel value between the maximum value and the minimum value into four equal values, that is, “64”, “128”
And “192” are determined as a threshold a, a threshold b, and a threshold c, respectively. At the same time, the threshold improper point detection unit 7 observes the difference value between the target pixel and its adjacent pixel in the input character image data. Here, the difference value between the target pixel and its adjacent pixels in the vertical and horizontal directions is observed, and a threshold inappropriate point for the target pixel is detected. In addition, the range in which the difference value is observed is set until no inappropriate threshold pixel is detected.

【0019】図3は座標(x,y)の注目画素と、その
周辺画素の画素値を示す。同図に示すように、注目画素
の画素値は「194」であり、また、座標(x,y−
1)の隣接画素の画素値は「235」であるから、それ
らの差分値は「41」であり、また、座標(x,y+
1)の隣接画素の画素値は「18」であるので注目画素
との差分値は「176」であり、これらはいずれも「1
0」よりも大であるので、閾値不適正画素値は検出され
ない。
FIG. 3 shows the pixel of interest at the coordinates (x, y) and the pixel values of its surrounding pixels. As shown in the figure, the pixel value of the target pixel is “194”, and the coordinates (x, y−
Since the pixel value of the adjacent pixel of 1) is “235”, their difference value is “41” and the coordinates (x, y +
Since the pixel value of the adjacent pixel of 1) is “18”, the difference value from the pixel of interest is “176”, and these are all “1”.
Since it is larger than “0”, the threshold inappropriate pixel value is not detected.

【0020】これに対し、座標(x−1,y)の隣接画
素の画素値は「192」であるから、注目画素との差分
値が「2」であるので、その間の画素値「192」、
「193」を閾値不適正画素値として、「192」と
「193」に閾値不適正ポイントを加算する。また、座
標(x−1,y)の隣接画素の画素値は「192」、座
標(x−2,y)の隣接画素の画素値は「188」であ
るので、それらの差分値が「4」なので、同様に画素値
「188」、「189」、「190」及び「191」の
閾値不適正ポイントを加算する。更に、座標(x−3,
y)の画素の画素値「151」であるので、座標(x−
2,y)の隣接画素との差分値が「37」であり、「1
0」より大であるので閾値不適正画素値は検出されず、
よって、注目画素の左方向への差分値の観測はここまで
とする。
On the other hand, since the pixel value of the adjacent pixel at the coordinates (x-1, y) is "192", the difference value from the pixel of interest is "2", and the pixel value between them is "192". ,
The threshold inappropriate point is added to “192” and “193” with “193” as the threshold inappropriate pixel value. Since the pixel value of the adjacent pixel at the coordinates (x-1, y) is "192" and the pixel value of the adjacent pixel at the coordinates (x-2, y) is "188", their difference value is "4". , The threshold value inappropriate points of the pixel values “188”, “189”, “190”, and “191” are similarly added. Further, the coordinates (x−3,
Since the pixel value of the pixel y) is “151”, the coordinates (x−
The difference value between the adjacent pixel of (2, y) is “37” and “1”
0 ”, the threshold inappropriate pixel value is not detected.
Therefore, the observation of the difference value of the pixel of interest in the left direction ends here.

【0021】次に、注目画素と画素値が「187」であ
る座標(x+1,y)の隣接画素との差分値は「7」で
あるので、その間の画素値「187」、「188」、
「189」、「190」、「191」、「192」及び
「193」の閾値不適正ポイントを加算する。更に、座
標(x+1,y)の隣接画素と画素値が「172」であ
る座標(x+2,y)の画素との差分値は「15」であ
るので、閾値不適正画素は検出されない。以上のように
して得られた図3の場合の閾値不適正ポイントを表1に
示す。
Next, since the difference value between the pixel of interest and the adjacent pixel at the coordinate (x + 1, y) whose pixel value is "187" is "7", the pixel values "187", "188",
The threshold inappropriate points of “189”, “190”, “191”, “192”, and “193” are added. Further, since the difference value between the adjacent pixel at the coordinate (x + 1, y) and the pixel at the coordinate (x + 2, y) whose pixel value is “172” is “15”, the threshold inappropriate pixel is not detected. Table 1 shows the threshold inappropriate points in the case of FIG. 3 obtained as described above.

【0022】[0022]

【表1】 この作業を全画素に対して行い、全画素に対してそれぞ
れ閾値不適正ポイントを検出する。
[Table 1] This operation is performed for all pixels, and a threshold inappropriate point is detected for each pixel.

【0023】閾値変更部8は、閾値不適正ポイント検出
部7により検出された上記の閾値不適正ポイントを受け
て閾値を変更する。ここでは、注目画素における閾値c
を例にとって説明する。また、閾値不適正ポイントを比
較する範囲を、閾値cからプラス方向、マイナス方向共
に5レベルの範囲で比較を行うものとする。すなわち、
閾値cは前記したように「192」であるので、画素値
「187」から「197」までの範囲の閾値を比較し
て、閾値不適正ポイントが最も小さい画素値を閾値c’
とする。
The threshold changing unit 8 changes the threshold in response to the threshold improper point detected by the threshold improper point detecting unit 7. Here, the threshold c at the pixel of interest
Will be described as an example. In addition, the range for comparing the threshold improper point is to be compared in the range of 5 levels in both the plus direction and the minus direction from the threshold value c. That is,
Since the threshold value c is “192” as described above, the threshold values in the range from the pixel values “187” to “197” are compared, and the pixel value having the smallest threshold inappropriate point is determined as the threshold value c ′.
And

【0024】表1から、この範囲で最も閾値不適正ポイ
ントが低く、かつ、閾値cに近い画素値は「194」で
あるので、座標(x,y)の注目画素における閾値cを
「192」から「194」に変更する。これを閾値c
(x,y)とする。同様にして、閾値a(x,y)及び
閾値b(x,y)を求める。
From Table 1, since the threshold value inappropriate point is the lowest in this range and the pixel value close to the threshold value c is "194", the threshold value c of the target pixel at the coordinates (x, y) is set to "192". To “194”. This is called threshold c
(X, y). Similarly, a threshold value a (x, y) and a threshold value b (x, y) are obtained.

【0025】次に、量子化器3はこれらの量子化閾値a
(x,y)、b(x,y)及びc(x,y)を用いて、
フレームメモリ2から読み出した文字画像データの量子
化を行う。表2に量子化テーブルを示す。
Next, the quantizer 3 calculates these quantization thresholds a
Using (x, y), b (x, y) and c (x, y),
The character image data read from the frame memory 2 is quantized. Table 2 shows the quantization table.

【0026】[0026]

【表2】 注目画素の画素値は「194」であり、また閾値c
(x,y)が「194」であるので、表2からわかるよ
うに、コード”10”で表される。また、座標(x−
1,y)の注目画素の左側の隣接画素の画素値は「19
2」、座標(x+1,y)の注目画素の右側の隣接画素
の画素値は「187」であり、いずれも表2の量子化テ
ーブルを参照して量子化器3はコード”10”を出力す
る。他の画素についても同様にして量子化テーブルを参
照することにより、量子化器3は図4に示した値のコー
ドを出力する。
[Table 2] The pixel value of the target pixel is “194” and the threshold value c
Since (x, y) is “194”, it is represented by the code “10” as can be seen from Table 2. The coordinates (x−
The pixel value of the adjacent pixel on the left of the target pixel of (1, y) is “19”.
2 ", the pixel value of the adjacent pixel on the right side of the pixel of interest at the coordinates (x + 1, y) is" 187 ", and the quantizer 3 outputs the code" 10 "with reference to the quantization table of Table 2. I do. The quantizer 3 outputs the code of the value shown in FIG. 4 by referring to the quantization table for other pixels in the same manner.

【0027】従来は、閾値不適正ポイントによる量子化
閾値の変更を行わないと、閾値cは「192」であるた
め、注目画素はコード”11”に量子化され、左右に隣
接する画素と量子化後の値が違ってしまい、復号画像に
不自然な段差を生じる。これに対し、この実施の形態で
は、図4から分かるように、座標(x,y)の注目画素
の左右に隣接する画素は、注目画素と同じコード”1
0”に量子化されるため、復号文字画像に不自然な段差
が生じない。
Conventionally, if the quantization threshold value is not changed by the threshold improper point, the threshold value c is "192". Therefore, the target pixel is quantized to code "11", and the left and right adjacent pixels are quantized. The values after the conversion are different, and an unnatural level difference occurs in the decoded image. On the other hand, in this embodiment, as can be seen from FIG. 4, pixels adjacent to the left and right of the target pixel at the coordinates (x, y) have the same code “1” as the target pixel.
Since it is quantized to 0 ", an unnatural level difference does not occur in the decoded character image.

【0028】このように、この実施の形態では、閾値不
適正ポイントを検出し、その閾値不適正ポイントによっ
て量子化閾値を変更するようにしたため、階調が微妙に
変化する部分の画素値に閾値が設定されにくくなり、復
号画像の階調に不自然な段差が生じない。
As described above, in this embodiment, the threshold value inappropriate point is detected, and the quantization threshold is changed according to the threshold value inappropriate point. Is hardly set, and an unnatural level difference does not occur in the gradation of the decoded image.

【0029】[0029]

【発明の効果】以上説明したように、本発明によれば、
本発明方法及び装置では、入力画像データにおいて注目
画素とその周辺画素の画素値の差分値を求め、その差分
値を予め定めた設定値と大小比較し、その比較結果に応
じて量子化閾値を適応的に変更することで、差分値が設
定値以下の階調の微妙に変化する部分の画素値に量子化
閾値が設定されにくくしたため、復号画像の階調に不自
然な段差が生じにくくでき、高品質の復号文字画像を得
ることができる。
As described above, according to the present invention,
According to the method and apparatus of the present invention, a difference value between a pixel value of a target pixel and its surrounding pixels in input image data is obtained, the difference value is compared with a predetermined setting value, and a quantization threshold is set according to the comparison result. By adaptively changing, it is difficult to set a quantization threshold value for a pixel value of a portion where a difference value is slightly smaller than a set value and a gradation is slightly changed, so that an unnatural level difference is hardly generated in a decoded image gradation. Thus, a high-quality decoded character image can be obtained.

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

【図1】本発明の一実施の形態のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】ランレングス符号化の一例の説明図である。FIG. 2 is an explanatory diagram of an example of run-length encoding.

【図3】文字画像の画素値の一例を示す図である。FIG. 3 is a diagram illustrating an example of a pixel value of a character image.

【図4】図3の文字画像の量子化後のデータの一例を示
す図である。
FIG. 4 is a diagram illustrating an example of quantized data of the character image in FIG. 3;

【図5】従来の一例のブロック図である。FIG. 5 is a block diagram of an example of the related art.

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

1 文字画像データ入力端子 2 フレームメモリ 3 量子化器 4 閾値決定部 5 ランレングス符号化器 6 符号化データ出力端子 7 閾値不適正ポイント検出部(閾値変更手段) 8 閾値変更部(閾値変更手段) DESCRIPTION OF SYMBOLS 1 Character image data input terminal 2 Frame memory 3 Quantizer 4 Threshold decision unit 5 Run-length encoder 6 Encoded data output terminal 7 Threshold improper point detection unit (threshold changing means) 8 Threshold changing unit (threshold changing means)

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 入力文字画像データの量子化閾値を決定
すると共に、注目画素とその周辺画素の画素値の差分値
を予め定めた設定値と大小比較し、その比較結果に応じ
て前記決定した量子化閾値を適応的に変更し、この変更
後の量子化閾値に基づいて前記入力文字画像データを複
数の階調に量子化した後、ランレングス符号化して圧縮
することを特徴とする文字画像符号化方法。
1. A quantization threshold value of input character image data is determined, a difference value between a pixel value of a target pixel and a pixel value of a peripheral pixel is compared with a predetermined setting value, and the determined value is determined according to a comparison result. A character image characterized by adaptively changing a quantization threshold, quantizing the input character image data into a plurality of gradations based on the changed quantization threshold, and then performing run-length encoding and compression. Encoding method.
【請求項2】 入力文字画像データの量子化閾値を決定
すると共に、注目画素とその周辺画素の画素値の差分値
を予め定めた設定値と大小比較し、前記設定値よりも前
記差分値が小であるときは比較した2つの画素値の間の
画素値を不適格値とし、その画素値が不適格値として判
断された回数を加算し、画面全体における不適格値判断
回数を検出し、前記量子化閾値を、予め設定した範囲内
で検出した前記不適格値判断回数が最も少ない画素値に
対応する値に変更し、この変更後の量子化閾値に基づい
て前記入力文字画像データを複数の階調に量子化した
後、ランレングス符号化して圧縮することを特徴とする
文字画像符号化方法。
2. A method for determining a quantization threshold value of input character image data, comparing a difference value between a pixel value of a target pixel and a pixel value of a peripheral pixel thereof with a predetermined set value, and determining that the difference value is larger than the set value. When the pixel value is small, the pixel value between the compared two pixel values is regarded as an ineligible value, the number of times that the pixel value is determined as an ineligible value is added, and the number of ineligible value judgments on the entire screen is detected. The quantization threshold is changed to a value corresponding to a pixel value having the smallest number of times of inappropriate value detection detected within a preset range, and a plurality of the input character image data are set based on the changed quantization threshold. A character image encoding method characterized in that the image is quantized to the grayscale of, and then run-length encoded and compressed.
【請求項3】 入力文字画像データの量子化閾値を決定
する閾値決定部と、 前記入力画像データにおいて注目画素とその周辺画素の
画素値の差分値を求め、その差分値を予め定めた設定値
と大小比較し、その比較結果に応じて前記決定した量子
化閾値を適応的に変更する閾値変更手段と、 前記変更手段により変更された量子化閾値に基づいて前
記入力文字画像データを複数の階調に量子化する量子化
器と、 前記量子化器から出力されたデータをランレングス符号
化して圧縮して出力する符号化器とを有することを特徴
とする文字画像符号化装置。
3. A threshold value determining unit for determining a quantization threshold value of input character image data, a difference value between a pixel value of a target pixel and a pixel value of a peripheral pixel in the input image data, and the difference value is set to a predetermined value. Threshold changing means for adaptively changing the determined quantization threshold in accordance with the comparison result; and a plurality of floors for the input character image data based on the quantization threshold changed by the changing means. A character image encoding device, comprising: a quantizer for quantizing in a key; and an encoder for performing run-length encoding, compressing and outputting data output from the quantizer.
【請求項4】 前記閾値変更手段は、前記入力画像デー
タにおいて注目画素とその周辺画素の画素値の差分値を
求め、その差分値を予め定めた設定値と大小比較し、前
記設定値よりも前記差分値が小であるときは比較した2
つの画素値の間の画素値を不適格値とし、その画素値が
不適格値として判断された回数を加算し、画面全体にお
ける不適格値判断回数を検出する検出部と、 前記閾値決定部により決定された量子化閾値を、前記検
出部で予め設定した範囲内で検出した前記不適格値判断
回数が最も少ない画素値に対応する値に変更する閾値変
更部とよりなることを特徴とする請求項3記載の文字画
像符号化装置。
4. The threshold value changing means calculates a difference value between a pixel value of a target pixel and a pixel value of a peripheral pixel in the input image data, compares the difference value with a predetermined set value, and compares the difference value with a predetermined set value. When the difference value is small, it is compared by 2
A pixel value between two pixel values is regarded as an unqualified value, the number of times that the pixel value is determined as an unqualified value is added, and a detection unit that detects the number of unqualified value determinations on the entire screen, and the threshold value determining unit And a threshold changing unit that changes the determined quantization threshold to a value corresponding to a pixel value having the least number of times of the inappropriate value determination detected within a range set in advance by the detection unit. Item 3. The character image encoding device according to Item 3.
【請求項5】 前記検出部は、前記注目画素殿間で前記
差分値を求める周辺画素の範囲を、前記不適格値と判断
される画素値が検出されなくなる周辺画素までとし、前
記閾値決定部は2m(mは自然数)値に量子化する場
合、最大画素値と最小画素値との間の範囲をm等分する
(m−1)個の画素値を量子化閾値として決定すること
を特徴とする請求項4記載の文字画像符号化装置。
5. The threshold determining unit, wherein the detecting unit sets a range of peripheral pixels for which the difference value is obtained between the target pixels to peripheral pixels from which a pixel value determined to be an inappropriate value is not detected. When quantizing to a 2 m (m is a natural number) value, (m−1) pixel values that divide the range between the maximum pixel value and the minimum pixel value into m equal parts are determined as quantization threshold values. The character image encoding device according to claim 4, wherein
JP9225358A 1997-08-21 1997-08-21 Character image coding method and system Pending JPH1169165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9225358A JPH1169165A (en) 1997-08-21 1997-08-21 Character image coding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9225358A JPH1169165A (en) 1997-08-21 1997-08-21 Character image coding method and system

Publications (1)

Publication Number Publication Date
JPH1169165A true JPH1169165A (en) 1999-03-09

Family

ID=16828096

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9225358A Pending JPH1169165A (en) 1997-08-21 1997-08-21 Character image coding method and system

Country Status (1)

Country Link
JP (1) JPH1169165A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011108089A1 (en) * 2010-03-03 2011-09-09 三菱電機株式会社 Data compression device, data compression method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011108089A1 (en) * 2010-03-03 2011-09-09 三菱電機株式会社 Data compression device, data compression method, and program
CN102783037A (en) * 2010-03-03 2012-11-14 三菱电机株式会社 Data compression device, data compression method, and program
KR101318574B1 (en) * 2010-03-03 2013-10-16 미쓰비시덴키 가부시키가이샤 Data compression device, data compression method, and computer readable recording medium
US8638243B2 (en) 2010-03-03 2014-01-28 Mitsubishi Electric Corporation Data compression device, data compression method, and medium
CN102783037B (en) * 2010-03-03 2015-05-13 三菱电机株式会社 Data compression device, data compression method

Similar Documents

Publication Publication Date Title
US6310980B1 (en) Encoding apparatus and method and storage medium
US7613345B2 (en) Image coding apparatus and image decoding apparatus and their control methods, and computer program and computer-readable storage medium
JP2800633B2 (en) Image coding device
JP3017380B2 (en) Data compression method and apparatus, and data decompression method and apparatus
US7689048B2 (en) Image encoding apparatus, method, and computer-readable storage medium for encoding a pixel value
US5369439A (en) Orthogonal transform encoder using DC component to control quantization step size
US8213727B2 (en) Image encoding apparatus and image decoding apparatus, and control method thereof
US6529553B2 (en) HVQ compression for image boundaries
KR100742798B1 (en) Image-data processing apparatus
JP2005323326A (en) Image encoding apparatus, image decoding apparatus, control method thereof, computer program and computer-readable storage medium
EP0969670A1 (en) Unequal compression of MSBs and LSBs using Hierarchical Vector Quantization (HVQ)
US6606039B2 (en) Huffman encoder, Huffman encoding method and recording medium having program for Huffman encoding process recorded thereon
EP0969412B1 (en) Vector data compression
JPH1169165A (en) Character image coding method and system
JP4462360B2 (en) Image compression apparatus and image expansion apparatus
JPH1127514A (en) Information encoding method and information decoding method
JP3375080B2 (en) Image compression method
JP3375079B2 (en) Image compression device
JP3375078B2 (en) Image compression device
JP2005167552A (en) Coding equipment, coding method, and program thereof
JP3356337B2 (en) Image processing apparatus and image processing method
JP2002374533A (en) Image coder, image decoder and method therefor
JP3376831B2 (en) Image compression method
EP1170956A2 (en) Method and system for compressing motion image information
JPH02108372A (en) Compression device for picture data