JPH06103928B2 - Image data encoding method - Google Patents

Image data encoding method

Info

Publication number
JPH06103928B2
JPH06103928B2 JP63281129A JP28112988A JPH06103928B2 JP H06103928 B2 JPH06103928 B2 JP H06103928B2 JP 63281129 A JP63281129 A JP 63281129A JP 28112988 A JP28112988 A JP 28112988A JP H06103928 B2 JPH06103928 B2 JP H06103928B2
Authority
JP
Japan
Prior art keywords
pixel value
image data
circuit
image
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP63281129A
Other languages
Japanese (ja)
Other versions
JPH02126772A (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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP63281129A priority Critical patent/JPH06103928B2/en
Priority to US07/431,828 priority patent/US5056154A/en
Publication of JPH02126772A publication Critical patent/JPH02126772A/en
Publication of JPH06103928B2 publication Critical patent/JPH06103928B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)

Description

【発明の詳細な説明】 <利用分野> この発明は、データ圧縮を目的とした画像データの符号
化方式に関する。
TECHNICAL FIELD The present invention relates to an image data encoding method for data compression.

<従来の技術> 文書,グラフおよび表等の白黒濃淡の画像から得られた
画像データを符号化する画像データの符号化方式として
は、入力画像データをある閾値で2値化して得られた2
値画像情報をMH(モデファイド・ハフマン)符号化やMR
(モデファイド・リード)符号化するものが多い。
<Prior Art> As an image data encoding method for encoding image data obtained from black and white grayscale images such as documents, graphs, and tables, 2 obtained by binarizing input image data with a certain threshold value is used.
Value image information is encoded by MH (Modified Huffman) and MR
(Modified Read) Many are encoded.

画像入力装置から取り込んだ入力画像データの2値化処
理としてはモード法がよく知られている。このモード法
は次のようにして2値化処理を行う。すなわち、上述の
よな白黒濃淡の対象画像における濃淡のヒストグラムが
第14図に示すように白と黒に対応して双峰的になること
がわかっている。そこで、その白と黒との双峰の谷間に
閾値を設定して画像データの2値化処置を行うのであ
る。このようにして、2値化処理を終えた画像に対して
はMR符号化あるいはMH符号化などの処理を行う。
The mode method is well known as a binarization process of input image data taken from an image input device. In this mode method, binarization processing is performed as follows. That is, it is known that the histogram of the light and shade in the black and white target image as described above becomes bimodal corresponding to white and black as shown in FIG. Therefore, a threshold value is set in the double-peaked valley of white and black to perform the binarization processing of the image data. In this way, MR coding or MH coding is performed on the image that has been binarized.

上記MH符号化は、出現頻度の高いラン長(連続して走査
線方向に続く白または黒の数)に対しては短いコードを
割り当て、出現頻度の低いラン長に対しては長いコード
を割り当てることによって各走査線毎に画像データの圧
縮を行うものである。すなわち、上記ラン長(RL)を RL=(64M)+(T) で表わし、上式の(64M)の項および(T)の項に各々
ハフマン符号を割り当てることでデータの圧縮を行う。
ここで、(64M)の項はメークアップ符号の項であり、
(T)の項はターミネーティング符号の項である。
In the MH encoding, short codes are assigned to run lengths with a high frequency of occurrence (the number of whites or blacks that continue in the scan line direction) and long codes are assigned to a run length with a low frequency of occurrence. By doing so, the image data is compressed for each scanning line. That is, the run length (RL) is represented by RL = (64M) + (T), and data is compressed by assigning Huffman codes to the terms (64M) and (T) in the above equation.
Where the (64M) term is the make-up code term,
The term (T) is the term of the terminating code.

一方、上記MR符号化は、画像が垂直方向にも水平方向に
も相関をもっていることを利用して画像データの圧縮を
行うものである。すなわち、各走査線上の白から黒また
はその逆の変化をしている変化画素に対する現符号化走
査線における参照画素または上記現符号化走査線の直上
の参照走査線上の参照画素からの相対距離(画素線)を
符号化することでデータの圧縮を行うものである。しか
しながら、上述のようにして画像データを圧縮して得ら
れた2値画像データによる画像をディスプレィあるいは
プリンタ等の画像表示装置(あるいは画像出力装置)に
出力すると、第15図(a)に示すように、エッジの部分
にギザギザが生じるために非常に見ばえが悪い。そこ
で、最近は対象画像のエッジ部を白黒濃淡画像で表わす
ことが多い。
On the other hand, the MR encoding compresses the image data by utilizing the fact that the image has a correlation in both the vertical direction and the horizontal direction. That is, the relative distance from the reference pixel on the current encoding scan line or the reference pixel on the reference scanning line immediately above the current encoding scan line to the change pixel changing from white to black or vice versa on each scan line ( Data is compressed by encoding (pixel lines). However, when an image based on the binary image data obtained by compressing the image data as described above is output to an image display device (or image output device) such as a display or a printer, as shown in FIG. 15 (a). Moreover, it is very unsightly because the edges have jagged edges. Therefore, recently, the edge portion of the target image is often represented by a monochrome grayscale image.

すなわち、エッジの部分の白と黒との間に中間調の色を
入れることで白黒の急激な変化をなくし、第15図(b)
に示すように見た目にギザギザを感じさせないようにす
るアンチエリアシングの処理を行うのである。その際
に、2値画像データにアンチエリアシングの処理を施す
のは非常に多くの計算量を必要とする。そのため、画像
入力装置で読み取った多階調による画像データの画素値
を2値化することなく直接符号化して、対象画像を多階
調で表示する方法が提案されている。
That is, by inserting a halftone color between the white and black of the edge portion, the abrupt change of black and white is eliminated, and FIG.
The anti-aliasing process is performed so as not to make it look jagged as shown in. At that time, it takes a very large amount of calculation to perform the anti-aliasing process on the binary image data. Therefore, a method has been proposed in which the pixel value of the multi-gradation image data read by the image input device is directly encoded without being binarized to display the target image in multi-gradation.

<発明が解決しようとする課題> しかしながら、従来の読み取った画像データの画素値を
直接符号化する方法においては、画像入力装置から読み
取った画素値を直接使用するため、得られる画像は画像
入力装置の特性に大きく依存することになる。また原稿
の汚れ等にも影響されやすいという問題がある。
<Problems to be Solved by the Invention> However, in the conventional method of directly encoding the pixel value of the read image data, the pixel value read from the image input device is directly used, and the obtained image is an image obtained by the image input device. It will largely depend on the characteristics of. In addition, there is a problem that the document is easily affected by dirt and the like.

前者の問題は、主に画像のダイナミックレンジに関係し
た問題である。すなわち、例えば画像表示装置で0〜7
の8階調で表示する場合において、画像入力装置の読み
とった画素値の最小値が2であり最大値が5であれば4
階調の表現となり、残りの4レベルは無駄なものにな
る。さらに、画像表示装置に表示された画像も濃淡のは
っきりしない画像になってしまう。また、後者の問題
は、原稿の汚れが圧縮の際に長いラン長の発生を妨げる
ことになり、画像データの圧縮率の低下を招く。
The former problem is mainly related to the dynamic range of the image. That is, for example, in an image display device, 0-7
In the case of displaying with 8 gradations, if the minimum value of the pixel values read by the image input device is 2 and the maximum value is 5, it is 4
The gradation is expressed, and the remaining four levels are wasted. Further, the image displayed on the image display device also becomes an image with unclear shades. On the other hand, in the latter problem, the stain on the document prevents the generation of a long run length at the time of compression, resulting in a reduction in the compression rate of image data.

そこで、この発明の目的は、画像入力装置の特性や画像
の汚れ等に影響されず、高圧縮率で画像データを符号化
することができる画像データの符号化方式を提供するこ
とにある。
Therefore, an object of the present invention is to provide an image data encoding method capable of encoding image data at a high compression rate without being affected by the characteristics of the image input apparatus, image dirt, and the like.

<課題を解決するための手段> 上記目的を達成するため、この発明は、画像入力装置か
ら入力された文書,グラフ,表等の所定階調による白黒
濃淡の画像データを符号化回路によって符号化する画像
データの符号化方式において、入力画像データの画素値
による濃度ヒストグラムを求め、そのヒストグラムの白
と黒の対応する2つのピークにおける画素値を求めるピ
ーク検出回路と、上記ピーク検出回路によって求められ
た白のピークにおける画素値を、画像表示装置で表現可
能な階調における一端を表現する画素値に変換する一
方、黒のピークにおける画素値を、上記画像表示装置で
表現可能な階調における他端を表現する画素値に変換
し、さらに上記ピーク検出回路によって求められた白の
ピークにおける画素値と黒のピークにおける画素値との
間の画素値を、所定の手順によって画像表示装置で表現
可能な階調における上記一端と他端との間を表現する画
素値に変換して上記符号化回路に出力するダイナミック
レンジ変更回路を備えて、入力画像データの階調の偏り
を、前処理によって上記画像表示装置で表現可能な階調
の全範囲に分布させるように修正して、上記入力装置の
特性の影響を除去することを特徴としている。
<Means for Solving the Problems> In order to achieve the above object, the present invention encodes image data of a grayscale of a document, a graph, a table, etc., which is input from an image input device and has a predetermined gradation by a coding circuit. In the image data encoding method, the density histogram is obtained by the pixel value of the input image data, and the peak detection circuit for obtaining the pixel value at the two peaks corresponding to white and black of the histogram is obtained by the peak detection circuit. The pixel value at the white peak is converted into a pixel value that represents one end of the gradation that can be represented by the image display device, while the pixel value at the black peak is different from the gradation value that can be represented by the image display device. The pixel values at the white peak and the image at the black peak obtained by the peak detection circuit are converted into pixel values expressing the edges. A dynamic range in which a pixel value between a prime value and a pixel value between the one end and the other end of a gray scale that can be expressed by an image display device is converted by a predetermined procedure and output to the encoding circuit. A change circuit is provided, and the bias of the gradation of the input image data is corrected by preprocessing so as to be distributed over the entire range of gradation that can be expressed by the image display device, and the influence of the characteristics of the input device is removed. It is characterized by doing.

また、上記画像データの符号化方式は、設定された閾値
に基づいて、上記ダイナミックレンジ変更回路によって
変換された画素値を2値化すると共に、得られた2値画
像情報に従って異なる画素値を示す隣接画素の箇所をエ
ッジ部として検出するエッジ部検出回路と、上記2値画
像情報のうち、上記エッジ部検出回路によって検出され
たエッジ部における画素値を、上記ダイナミックレンジ
変更回路によって変換された画素値に置き換えて上記符
号化回路に出力するノイズ除去回路を備えて、画像入力
装置の特性の影響や原稿の汚れ等によるノイズを除去す
ることを特徴としている。
The image data encoding method binarizes the pixel value converted by the dynamic range changing circuit based on a set threshold value, and indicates a different pixel value according to the obtained binary image information. An edge portion detection circuit that detects a location of an adjacent pixel as an edge portion, and a pixel that is obtained by converting the pixel value in the edge portion detected by the edge portion detection circuit of the binary image information by the dynamic range change circuit. It is characterized in that a noise removing circuit that replaces the value and outputs the value to the encoding circuit is provided to remove noise due to the influence of the characteristics of the image input device and the stain on the original.

<作用> 画像入力装置から白黒濃淡画像の所定階調による画像デ
ータが入力されると、ピーク検出回路によって上記入力
画像データの画素値による濃度ヒストグラムが求められ
ると共に、そのヒストグラムの白と黒に対応する2つの
ピークにおける画素値が求められる。
<Operation> When image data of a predetermined grayscale of a grayscale image is input from the image input device, the peak detection circuit obtains a density histogram based on the pixel values of the input image data, and corresponds to white and black of the histogram. Pixel values at the two peaks are calculated.

そうすると、ダイナミックレンジ変更回路は、上記ピー
ク検出回路によって求められた白のピークにおける画素
値を画像表示装置で表現可能な階調における一端を表現
する画素値に変換する一方、黒のピークにおける画素値
を上記画像表示装置で表現可能な階調における他端を表
現する画素値に変換し、さらに上記ピーク検出回路によ
って求められた白のピークにおける画素値と黒のピーク
における画素値との間の画素値を所定の手順によって画
像表示装置で表示可能な階調における上記一端と他端と
の間を表現する画素値に変換して符号化回路に出力す
る。したがって、入力画像データの階調の偏りが上記画
像表示装置で表現可能な階調の全範囲に分布させるよう
に修正される。
Then, the dynamic range changing circuit converts the pixel value at the white peak obtained by the peak detecting circuit into a pixel value expressing one end of the grayscale that can be expressed by the image display device, while the pixel value at the black peak is converted. A pixel value between the pixel value at the white peak and the pixel value at the black peak obtained by the peak detection circuit. The value is converted into a pixel value that expresses between the one end and the other end in the gradation that can be displayed by the image display device by a predetermined procedure, and the pixel value is output to the encoding circuit. Therefore, the deviation of the gradation of the input image data is corrected so as to be distributed over the entire range of gradation that can be represented by the image display device.

その後に、上記ダイナミックレンジ変更回路から出力さ
れた画素情報が符号化回路によって符号化される。
After that, the pixel information output from the dynamic range changing circuit is encoded by the encoding circuit.

また、上記画像データの符号化方式は、上記ダイナミッ
クレンジ変更回路によって、入力画像データの画素値が
上記画像表示装置で表現可能な階調の全範囲に分布する
画素値に変換されると、エッジ部検出回路は、設定され
た閾値に基づいて上記変換された画素値を2値化し、得
られた2値画像情報に従って異なる画素値を示す隣接画
素の箇所をエッジ部として検出する。そして、ノイズ除
去回路によって、上記2値画像情報のうち上記エッジ部
の画素値が上記ダイナミックレンジ変更回路によって変
換された画素値に置き換えられ上記符号化回路に出力さ
れる。したがって、画像入力装置の特性の影響が除去さ
れると共に、原稿の汚れ等によるノイズが除去される。
Further, the image data encoding method is such that when the dynamic range changing circuit converts the pixel values of the input image data into pixel values distributed over the entire range of gradation that can be represented by the image display device, the edge The copy detection circuit binarizes the converted pixel value based on the set threshold value, and detects, as an edge portion, a portion of an adjacent pixel having a different pixel value according to the obtained binary image information. Then, the noise removing circuit replaces the pixel value of the edge portion in the binary image information with the pixel value converted by the dynamic range changing circuit and outputs the pixel value to the encoding circuit. Therefore, the influence of the characteristics of the image input device is removed, and the noise due to the stain on the original is removed.

その後に、エッジ部が多階調の画素値に置き換えられた
2値画像情報が符号化回路によって符号化される。
After that, the binary image information in which the edge portion is replaced with the multi-gradation pixel value is encoded by the encoding circuit.

<実施例> 以下、この発明を図示の実施例により詳細に説明する。<Example> Hereinafter, the present invention will be described in detail with reference to illustrated examples.

第1図はこの発明の画像データの高能率符号化方式に係
る画像データ符号化復号化装置のブロック図を示す。
FIG. 1 shows a block diagram of an image data coding / decoding apparatus according to a high efficiency coding system of image data of the present invention.

スキャナ等の画像入力装置1から原稿をNビット階調の
ディジタルデータとして取込み、その取り込んだNビッ
ト階調のディジタルデータをピーク検出回路2に入力す
る。ピーク検出回路2では以下の処理を行う。ここで、
黒を“0"白を“2N_1”で表すものとする。すなわち、第
2図に示すように画像の濃度(画素値)のヒストグラム
hi(hiは画像の画素値のある区間iにおける出現頻度)
を作成し、実験または経験に基づいて得られた閾値T
(0<T<2N_1)を用いて、上記ヒストグラムhiから
(1)式によって黒のピークにおける画素値PBと白のピ
ークにおける画素値PWを算出する。
The original is taken in as digital data of N-bit gradation from the image input device 1 such as a scanner, and the taken-in digital data of N-bit gradation is input to the peak detection circuit 2. The peak detection circuit 2 performs the following processing. here,
Black is represented by "0" and white is represented by "2 N_1 ". That is, as shown in FIG. 2, a histogram of the image density (pixel value)
hi (hi is the frequency of appearance of the pixel value of the image in section i)
And a threshold T obtained based on experiments or experience.
Using (0 <T <2 N — 1), the pixel value P B at the black peak and the pixel value P W at the white peak are calculated from the above histogram hi according to the equation (1).

次に、ダイナミックレンジ調節回路3で、上記算出され
たPBおよびPWに(2)式で表される処理を行い、第2図
に示すように画像出力装置11で表現可能な2M階調(N>
M)の値に変換する。
Next, the dynamic range adjusting circuit 3 performs the processing represented by the equation (2) on the calculated P B and P W , and the 2 M floor that can be represented by the image output device 11 as shown in FIG. Key (N>
Convert to the value of M).

ここで、 d′:画像入力装置1から取り込んだ画像データの量子
化幅 Qi′:区間iにおける各量子化値 d:2M階調の画像データに変換後の量子化幅 Qi:2M階調の画像データに変換後の各量子化値 以上の変換処理を行うことによって、画像入力装置1の
特性等の影響によって生じる画素の偏りを修正すること
が可能となる。
Here, d ': Quantization width of image data taken from the image input apparatus 1 Qi': Quantization value in section i d: Quantization width after conversion to image data of 2 M gradation Qi: 2 M floor By performing a conversion process of equal to or more than each quantized value after conversion into the tonal image data, it is possible to correct the pixel bias caused by the influence of the characteristics of the image input apparatus 1.

上述のような変換処理が行われた後のダイナミックレン
ジ調節回路3からの出力結果を用いて、閾値決定回路4
で、エッジ検出に必要な2値化の閾値THを(3)式によ
って決定する。
Using the output result from the dynamic range adjustment circuit 3 after the conversion processing as described above is performed, the threshold value determination circuit 4
Then, the threshold TH for binarization required for edge detection is determined by the equation (3).

TH=(PB+PW)/2 …(3) その際に、上記閾値THは文字,グラフおよび表等を画像
表示装置11等に表示する際の最小の線の太さ(すなわ
ち、最小表示幅)を表している。そこで、(3)式を用
いて閾値THを決定する変わりにユーザーが画面等によっ
て線の太さを確かめながら閾値THを決定するようにすれ
ば、簡単に閾値THを決定することができて便利である。
TH = (P B + P W ) / 2 (3) At that time, the threshold TH is the minimum line thickness (that is, the minimum display) when displaying characters, graphs, tables, etc. on the image display device 11 or the like. Width). Therefore, if the user decides the threshold value TH while checking the line thickness on the screen instead of using the equation (3), the threshold value TH can be easily determined, which is convenient. Is.

このような閾値THの決定法を実現するために、ルックア
ップテーブル7を用いる。そして、第3図に示すよう
に、ルックアップテーブル7の内容を書き換えるのであ
る。すなわち、ユーザーがルックアップテーブル7に対
して任意の閾値THを設定する。そうすると、入力された
画素値Pが閾値TH未満であればそれに対応する2値化さ
れた画素値f(P)を“0"(黒)とし、画素値Pが閾値
TH以上であればそれに対応する2値化されたあ画素値f
(P)を“2N_1”(白)として出力するよに、ルックア
ップテーブル7の内容を書き換えるのである。そして、
このように書き換えられたルックアップテーブル7に基
づいて、閾値TH未満の画素値を黒とし、閾値TH以上の画
素値を白として画像表示装置11に出力する。そうして画
像表示装置11に表示される線の太さを確かめながら適当
なTHを決定するのである。このようにして決定された閾
値THはエッジ検出回路5に出力され、このエッジ検出回
路5で画像データを2値化する際の閾値として使用され
る。
The lookup table 7 is used to realize such a method of determining the threshold value TH. Then, as shown in FIG. 3, the contents of the lookup table 7 are rewritten. That is, the user sets an arbitrary threshold value TH in the lookup table 7. Then, if the input pixel value P is less than the threshold value TH, the corresponding binarized pixel value f (P) is set to “0” (black), and the pixel value P is set to the threshold value.
If it is more than TH, the corresponding binarized pixel value f
The contents of the lookup table 7 are rewritten so that (P) is output as "2 N_1 " (white). And
Based on the look-up table 7 thus rewritten, pixel values less than the threshold value TH are set to black, and pixel values above the threshold value TH are set to white and output to the image display device 11. Then, the appropriate TH is determined while checking the thickness of the line displayed on the image display device 11. The threshold value TH thus determined is output to the edge detection circuit 5 and used as a threshold value when the edge detection circuit 5 binarizes the image data.

上記エッジ検出回路5における2値化処理は(4)式の
変換式によって行われる。
The binarization processing in the edge detection circuit 5 is performed by the conversion equation (4).

ここで、x:変換前の画素値 y:変換後の画素値 ノイズ除去回路6は、このよにして得られた2値画像デ
ータに基づいて、第4図に示すように隣接画素が異なる
画素値を示す画素の箇所をエッジ部分として検出する。
そして、このエッジ部分の近傍の画素の画素値を、“0"
および“2N_1”という2値化された画素値から2値化す
る前のダイナミックレンジ調節回路3より出力される2N
階調の画素値に置き換える。
Here, x: pixel value before conversion y: pixel value after conversion The noise removing circuit 6 is based on the binary image data obtained in this way, as shown in FIG. The location of the pixel indicating the value is detected as the edge portion.
Then, the pixel value of the pixel in the vicinity of this edge part is set to "0".
And 2 N output from the dynamic range adjustment circuit 3 before binarization from the binarized pixel value of "2 N_1 "
Replace with the pixel value of gradation.

このように、ノイズ除去回路6は2値画像データの変化
部のみをエッジ部とし検出するので、エッジ検出回路5
において閾値TH以上の画素値であって“2N_1”(白)と
変換されてしまった汚れの箇所の画素値の影響が除去さ
れて画像のエッジ部のみが検出されるのである。すなわ
ち、上述のような前処理を行うことで、原稿の汚れ等に
あまり影響されない原画像データで作成できるのであ
る。
In this way, since the noise removing circuit 6 detects only the changed portion of the binary image data as the edge portion, the edge detecting circuit 5
In, the influence of the pixel value of the dirty portion that has been converted into “2 N — 1” (white) with the pixel value equal to or greater than the threshold value TH is removed, and only the edge portion of the image is detected. That is, by performing the above-described preprocessing, it is possible to create original image data that is not significantly affected by stains on the original.

上記ピーク検出回路2,ダイナミックレンジ調節回路3,閾
値決定回路4,エッジ検出回路5およびノイズ除去回路6
によって画像データ符号化復号化装置の前処理回路12を
構成している。
The peak detection circuit 2, the dynamic range adjustment circuit 3, the threshold value determination circuit 4, the edge detection circuit 5, and the noise removal circuit 6
This constitutes the preprocessing circuit 12 of the image data encoding / decoding device.

このよにして得られた上記画像データの画素値は符号化
回路8に入力されて高い圧縮率で符号化される。そし
て、得られた符号データは記録再生装置9に書き込ま
れ、表示の際には復号化回路10で復号化して画像表示装
置11に表示されるのである。
The pixel value of the image data thus obtained is input to the encoding circuit 8 and encoded at a high compression rate. Then, the obtained coded data is written in the recording / reproducing device 9, and when being displayed, it is decoded by the decoding circuit 10 and displayed on the image display device 11.

以下、上述の画像データの高能率符号化方式による符号
化の一例を具体的に示す。
Hereinafter, an example of encoding the above-described image data by the high-efficiency encoding method will be specifically described.

スキャナ1から例えばビット数N=4(すなわち24=16
階調)で白黒濃淡画像が読み込まれる。その際の原稿の
一例を第5図(a)に示し、その原稿をスキャナ1から
取り込んだ8×8の画素からなる画素データの一例を第
5図(b)に示す。ここで、実験または経験に基づいて
得られた閾値TをT=7とする。
From the scanner 1, for example, the number of bits N = 4 (that is, 2 4 = 16
A grayscale image is read in grayscale. An example of the original at that time is shown in FIG. 5 (a), and an example of the pixel data consisting of 8 × 8 pixels obtained from the scanner 1 is shown in FIG. 5 (b). Here, the threshold value T obtained based on the experiment or the experience is set to T = 7.

第6図はスキャナ1から取り込んだ入力画像データの画
素値のヒストグラムである。このヒストグラムから上記
(1)式によって白のピークにおける画素値PWと黒のピ
ークにおける画素値PBをピーク検出回路2によって求め
る。
FIG. 6 is a histogram of pixel values of the input image data read from the scanner 1. From this histogram, the pixel value P W at the white peak and the pixel value P B at the black peak are calculated by the peak detection circuit 2 according to the equation (1).

PB=3 PW=12 次に、このPBおよびPW結果をダイナミックレンジ調節回
路3に入力して上記(2)式による処理を行って、画像
入力装置1に取り込まれた画素値を画像表示装置11で表
現可能なM=2(すなわち、22=4階調)で表現する。
すなわち、上記(2)式によって、変換前および変換後
の量子化幅と量子化値とが次のように求められる。
P B = 3 P W = 12 Next, the P B and P W results are input to the dynamic range adjustment circuit 3 and the processing according to the above equation (2) is performed, and the pixel value captured in the image input device 1 is calculated. It is expressed by M = 2 (that is, 2 2 = 4 gradations) that can be expressed by the image display device 11.
That is, the quantization width and the quantization value before and after the conversion are obtained by the above equation (2) as follows.

d′=(12−3−1)/(4−1)=2.7 Q0′=3、Q1′=6、Q2′=8、Q3′=11 d=(16−1)/(4−1)=5.0 Q0=0、Q1=5、Q2=10、Q3=15 従って、スキャナ1から読み込まれた画素値Pは次式に
よって第7図(a)に示すように画素値P′に変換され
るのである。
d '= (12-3-1) / ( 4-1) = 2.7 Q 0' = 3, Q 1 '= 6, Q 2' = 8, Q 3 '= 11 d = (16-1) / ( 4-1) = 5.0 Q 0 = 0, Q 1 = 5, Q 2 = 10, Q 3 = 15 Therefore, the pixel value P read from the scanner 1 is as shown in FIG. It is converted into the pixel value P '.

P≦4 →P′=Q0=0 5≦P≦7 →P′=Q1=5 8≦P≦10 →P′=Q2=10 11≦P →P′=Q3=15 ここで、Pの区分の境界値は上述のようにして求められ
たQ0′,Q1′,Q2′,Q3′に基づいて算出(例えばQi
とQi1′との平均)される。このように変換されて得ら
れた画像データを第7図(b)に示す。
P ≦ 4 → P ′ = Q 0 = 0 5 ≦ P ≦ 7 → P ′ = Q 1 = 5 8 ≦ P ≦ 10 → P ′ = Q 2 = 10 11 ≦ P → P ′ = Q 3 = 15 where , P are calculated based on Q 0 ′, Q 1 ′, Q 2 ′ and Q 3 ′ obtained as described above (eg Q i ′).
And Q i1 ′). The image data obtained by the above conversion is shown in FIG. 7 (b).

こうすることによって、前処理回路12によって処理を実
行する前は2≦P≦13であった画素値の範囲は、前処
理を施すことによって0≦P′≦15の範囲となり画素
値の分布の範囲を広げてダイナミックレンジを大きく取
ることができるのである。
By doing so, the range of pixel values that was 2 ≦ ∀P ≦ 13 before the processing by the preprocessing circuit 12 is changed to 0 ≦ ∀P ′ ≦ 15 by performing the preprocessing. It is possible to widen the range of distribution and obtain a large dynamic range.

次に、閾値決定回路4によって、白のピークにおける画
素値PW=12と黒のピークにおける画素値PB=3を使って
閾値THを求める。
Next, the threshold value determination circuit 4 obtains the threshold value TH using the pixel value P W = 12 at the white peak and the pixel value P B = 3 at the black peak.

閾値THは上式によって求める以外に、閾値決定回路4に
付加されているルックアップテーブル7を使って求める
ことも可能である。すなわち、ルックアップテーブル7
へ入力された画素値が閾値TH未満であればルックアップ
テーブル7の出力は“0"(すなわち、黒表示)となり、
それ以外の画素値の入力に際してはルックアップテーブ
ル7の出力は“15"(白表示)となる。そして、上述の
ように動作するルックアップテーブル7によって、閾値
THを線の太さとして画像表示装置11に表示し、その表示
された線の太さを見ながら適当な閾値THを設定するので
ある。
The threshold value TH can be calculated using the look-up table 7 attached to the threshold value determining circuit 4 instead of the above expression. That is, the lookup table 7
If the pixel value input to is less than the threshold value TH, the output of the lookup table 7 is “0” (that is, black display),
When inputting other pixel values, the look-up table 7 outputs "15" (white display). Then, by using the lookup table 7 that operates as described above, the threshold
TH is displayed on the image display device 11 as the line thickness, and an appropriate threshold value TH is set while observing the displayed line thickness.

こうして、閾値THが設定されると、エッジ検出回路5に
よって、第8図に示すように閾値TH以下の画素値は“0"
それ以外の画素値は“15"としてダイナミックレンジ調
節回路3の出力画素値(P′)を変換して2値画像デー
タの画素値(P″)を作成する。
In this way, when the threshold TH is set, the edge detection circuit 5 causes the pixel value below the threshold TH to be "0" as shown in FIG.
Other pixel values are set to "15" and the output pixel value (P ') of the dynamic range adjusting circuit 3 is converted to create the pixel value (P ") of the binary image data.

P″=0(P′≦TH) P″=15(P′>TH) エッジ検出回路6は、こうして2値化された画素値から
成る2値画像データをまず水平方向に1ラインずつ調べ
て、第9図に示すように隣接する2つの画素が異なる値
(“0"と“15"または“15"と“0")を示す部分のみをエ
ッジ部として検出する。
P ″ = 0 (P ′ ≦ TH) P ″ = 15 (P ′> TH) The edge detection circuit 6 first checks the binary image data consisting of the binarized pixel values line by line in the horizontal direction. As shown in FIG. 9, only adjacent portions where two adjacent pixels have different values (“0” and “15” or “15” and “0”) are detected as edge portions.

次に、ノイズ除去回路6は、第10図に示すように上記2
値画像データのうちエッジ検出回路5で検出されたエッ
ジ部分のみをダイナミックレンジ調節回路3の出力値
(すなわち、4階調で表現された画像データ)に置き換
える。その場合、エッジ部以外は2値画像の値のままに
しておく。さらに、こうして得られた画像データをエッ
ジ検出回路5で今度は垂直方向に1ラインずづ調べて同
様の処理を行う(第11図および第12図)。
Next, as shown in FIG.
Of the value image data, only the edge portion detected by the edge detection circuit 5 is replaced with the output value of the dynamic range adjustment circuit 3 (that is, image data represented by 4 gradations). In that case, the values of the binary image are left as they are except the edge portion. Further, the image data thus obtained is examined by the edge detection circuit 5 one line at a time in the vertical direction, and the same processing is performed (FIGS. 11 and 12).

このようにして得られた画像情報のエッジ部分には白黒
濃淡の画像情報を保持しているので、第13図に示すよう
に画像表示装置11に表示された画像のエッジ部において
はギザギザが目立たず、平坦な部分(白地の部分や黒字
の部分)における画素値は2値化されているためグラニ
ュラー雑音が除去されている。第13図において、*の部
分21は第12図の画像データの画素値“0"に対応した黒の
部分であり、×の部分22はエッジ部であって第12図の画
像データの画素値“5"または“10"に対応した中間調の
部分であり、ぞの他の部分23は第12図の画像データの画
素値“15"に対応した白の部分を表している。
Since the edge portion of the image information thus obtained holds the image information of black and white shading, as shown in FIG. 13, the edge portion of the image displayed on the image display device 11 is jagged. However, since the pixel value in the flat portion (white background portion or black character portion) is binarized, granular noise is removed. In FIG. 13, the * portion 21 is the black portion corresponding to the pixel value “0” of the image data of FIG. 12, and the × portion 22 is the edge portion, which is the pixel value of the image data of FIG. It is a halftone part corresponding to "5" or "10", and the other part 23 represents the white part corresponding to the pixel value "15" of the image data of FIG.

したがって、このような画像情報に対して符号化回路8
によってMR符号化あるいはMH符号化等を行う際には、画
質を劣化させることなく高い圧縮率が得られるのであ
る。
Therefore, the encoding circuit 8 processes such image information.
With MR coding or MH coding, a high compression rate can be obtained without degrading image quality.

上述のように、この発明の画像データの符号化方式によ
れば、画像入力装置1の特性等による入力画像データの
階調の偏りを、画像表示装置11で表現可能な階調の全範
囲に分布するように修正するので、画像入力装置1の特
性の影響を除去することができる。また、この発明の画
像データの符号化方式によれば、設定された閾値に基づ
いて2値化された2値画像データのエッジ部を、ダイナ
ミックレンジ調節回路3から出力される多階調による画
素値に置き換えるので、原稿の汚れ等によるノイズを除
去して高圧縮率で符号化することができる。
As described above, according to the image data encoding method of the present invention, the deviation of the gradation of the input image data due to the characteristics of the image input apparatus 1 is within the entire range of gradations that can be represented by the image display device 11. Since the distribution is corrected so that it is distributed, the influence of the characteristics of the image input apparatus 1 can be removed. Further, according to the image data encoding method of the present invention, the edge portion of the binary image data binarized based on the set threshold value is used for the pixel with multi-gradation output from the dynamic range adjustment circuit 3. Since the value is replaced with the value, it is possible to remove noise due to stains on the original and perform encoding at a high compression rate.

本実施例においては、入力画像データの階調が16階調で
あり、画像表示装置で表現する階調が4段階であるが、
この発明はこれに限定されることはないことは言うまで
もない。
In this embodiment, the gradation of the input image data is 16 gradations and the gradation expressed by the image display device is 4 gradations.
It goes without saying that the present invention is not limited to this.

<発明の効果> 以上より明らかなように、この発明の画像データの符号
化方式には、ピーク検出回路およひダイナミックレンジ
変更回路を設けて、入力画像データの画素値による濃度
ヒストグラムの白のピークにおける画素値によって画像
表示装置で表現可能な階調における一端が表現できる一
方、黒のピークにおける画素値によって画像表示装置で
表現可能な階調におこえる他端が表現できるように、入
力画像データの画素値を変換するようにしたので、上記
画像入力装置の特性による入力画像データの階調の偏り
を上記画像表示装置で表現可能な階調の全範囲に分布す
るように修正することができ、したがって、上記画像入
力装置の特性の影響を除去することができる。
<Effects of the Invention> As is clear from the above, the image data encoding system of the present invention is provided with a peak detection circuit and a dynamic range changing circuit, and the white histogram of the density histogram depending on the pixel value of the input image data is provided. The pixel value at the peak can represent one end of the gradation that can be represented by the image display device, while the pixel value at the black peak can represent the other end that can represent the gradation that can be represented by the image display device. Since the pixel value of the data is converted, it is possible to correct the deviation of the gradation of the input image data due to the characteristics of the image input device so that it is distributed over the entire range of gradation that can be represented by the image display device. Therefore, it is possible to eliminate the influence of the characteristics of the image input device.

また、上記画像データの符号化方式は、エッジ部検出回
路およびノイズ除去回路を備えて、上記ダイナミックレ
ンジ変更回路によって変換された画素値を2値化した2
値画像情報に従って、異なる画素値を示す隣接画素の箇
所をエッジ部として検出し、上記2値画像情報の上記エ
ッジ部の画素値を上記ダイナミックレンジ変更回路によ
って変換された画素値に置き換えるようにしたので、上
記画像入力装置の特性の影響を除去すると共に、原稿の
汚れ等によるノイズを除去することができる。
The image data encoding method includes an edge detection circuit and a noise removal circuit, and binarizes the pixel values converted by the dynamic range changing circuit into two values.
According to the value image information, a portion of an adjacent pixel showing a different pixel value is detected as an edge portion, and the pixel value of the edge portion of the binary image information is replaced with the pixel value converted by the dynamic range changing circuit. Therefore, it is possible to remove the influence of the characteristics of the image input device and also to remove the noise due to the dirt of the document.

【図面の簡単な説明】 第1図はこの発明に係る画像データ符号化復号化装置の
ブロック図、第2図はダイナミックレンジ変更の説明
図、第3図はルックアップテーブルの書き換えの説明
図、第4図は画像のエッジ部の説明、第5図(a)は読
み取り原稿の一例を示す図、第5図(b)は第5図
(a)の原稿をスキャナから読み取った画像データの一
例を示す図、第6図は第5図(b)の画素値のヒストグ
ラムを示す図、第7図(a)は第5図(b)の画素値の
ダイナミックレンジ変更の説明図、第7図(b)は第7
図(a)に示すようにダイナミックレンジ変更した画像
データを示す図、第8図は第7図(b)の画像データを
2値化した画像データを示す図、第9図は第8図から求
めた水平方向のエッジ部を示す図、第10図は第8図の水
平方向のエッジ部の画素値を第7図(a)の画素値に変
換した画像データを示す図、第11図は第8図から求めた
垂直方向のエッジ部を示す図、第12図は第10図の垂直方
向のエッジ部の画素値を第7図(a)の画素値に変換し
た画像データを示す図、第13図は前処理回路によって前
処理した後の画像を示す図、第14図は白黒濃淡像の濃度
ヒストグラムの一例を示す図、第15図(a)は2値画像
の一例を示す図、第15図(b)は第15図(a)にアンチ
エリアシングを施した画像の説明図である。 1……画像入力装置、2……ピーク検出回路、 3……ダイナミックレンジ調節回路、 4……閾値決定回路、5……エッジ検出回路、 6……ノイズ除去回路、 7……ルックアップテーブル、8……符号化回路、 9……記録再生装置、10……復号化回路、 11……画像表示装置、12……前処理回路。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an image data encoding / decoding device according to the present invention, FIG. 2 is an explanatory diagram of changing a dynamic range, and FIG. 3 is an explanatory diagram of rewriting a look-up table. FIG. 4 is a diagram for explaining the edge portion of the image, FIG. 5 (a) is a diagram showing an example of a read document, and FIG. 5 (b) is an example of image data obtained by reading the document of FIG. 5 (a) with a scanner. FIG. 6, FIG. 6 is a diagram showing a histogram of pixel values in FIG. 5 (b), FIG. 7 (a) is an explanatory diagram of dynamic range change of pixel values in FIG. 5 (b), and FIG. (B) is the 7th
FIG. 8 is a diagram showing image data whose dynamic range is changed as shown in FIG. 8A, FIG. 8 is a diagram showing image data obtained by binarizing the image data of FIG. 7B, and FIG. 9 is from FIG. FIG. 10 is a diagram showing the obtained edge portion in the horizontal direction, FIG. 10 is a diagram showing image data obtained by converting the pixel value of the edge portion in the horizontal direction in FIG. 8 into the pixel value in FIG. 7 (a), and FIG. FIG. 12 is a diagram showing a vertical edge portion obtained from FIG. 8, FIG. 12 is a diagram showing image data obtained by converting the pixel value of the vertical edge portion of FIG. 10 into the pixel value of FIG. 7 (a), FIG. 13 is a diagram showing an image after pre-processing by a pre-processing circuit, FIG. 14 is a diagram showing an example of a density histogram of a monochrome gray-scale image, FIG. 15 (a) is a diagram showing an example of a binary image, FIG. 15 (b) is an explanatory diagram of an image obtained by applying anti-aliasing to FIG. 15 (a). 1 ... Image input device, 2 ... Peak detection circuit, 3 ... Dynamic range adjustment circuit, 4 ... Threshold value determination circuit, 5 ... Edge detection circuit, 6 ... Noise removal circuit, 7 ... Look-up table, 8 ... Encoding circuit, 9 ... Recording / reproducing device, 10 ... Decoding circuit, 11 ... Image display device, 12 ... Preprocessing circuit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】画像入力装置から入力された文書,グラ
フ,表等の所定階調による白黒濃淡の画像データを符号
化回路によって符号化する画像データの符号化方式にお
いて、 入力画像データの画素値による濃度ヒストグラムを求
め、そのヒストグラムの白と黒に対応する2つのピーク
における画素値を求めるピーク検出回路と、 上記ピーク検出回路によって求められた白のピークにお
ける画素値を、画像表示装置で表現可能な階調における
一端を表現する画素値に変換する一方、黒のピークにお
ける画素値を、上記画像表示装置で表現可能な階調にお
ける他端を表現する画素値に変換し、さらに上記ピーク
検出回路によって求められた白のピークにおける画素値
と黒のピークにおける画素値との間の画素値を、所定の
手順によって画像表示装置で表現可能な階調における上
記一端と他端との間を表現する画素値に変換して上記符
号化回路に出力するダイナミックレンジ変更回路を備え
て、 入力画像データの階調の偏りを、前処理によって上記画
像表示装置で表現可能な階調の全範囲に分布させるよう
に修正して、上記入力装置の特性の影響を除去すること
を特徴とする画像データの符号化方式。
1. A pixel value of input image data in a coding method of image data, wherein a coding circuit encodes black and white image data of a predetermined gradation of a document, a graph, a table, etc., inputted from an image input device. A peak detection circuit for obtaining the density histogram by the above, and the pixel values for the two peaks corresponding to white and black in the histogram, and the pixel value for the white peak obtained by the peak detection circuit can be expressed by the image display device. A pixel value representing one end of a gray level, a pixel value at a black peak is converted to a pixel value representing the other end of a gray level that can be represented by the image display device, and the peak detection circuit The pixel value between the pixel value at the white peak and the pixel value at the black peak obtained by The dynamic range changing circuit that converts the pixel value between the one end and the other end of the gradation that can be expressed by the above and outputs the pixel value to the encoding circuit is provided. A coding method for image data, characterized by modifying by processing so as to be distributed over the entire range of gradation that can be expressed by the image display device, and removing the influence of the characteristics of the input device.
【請求項2】上記特許請求の範囲第1項に記載の画像デ
ータの符号化方式において、 設定された閾値に基づいて、上記ダイナミックレンジ変
更回路によって変換された画素値を2値化すると共に、
得られた2値画像情報に従って異なる画素値を示す隣接
画素の箇所をエッジ部として検出するエッジ部検出回路
と、 上記2値画像情報のうち、上記エッジ部検出回路によっ
て検出されたエッジ部における画素値を、上記ダイナミ
ックレンジ変更回路によって変換された画素値に置き換
えて上記符号化回路に出力するノイズ除去回路を備え
て、 画像入力装置の特性の影響を除去すると共に原稿の汚れ
等によるノイズを除去することを特徴とする画像データ
の符号化方式。
2. The image data encoding method according to claim 1, wherein the pixel value converted by the dynamic range changing circuit is binarized based on a set threshold value,
An edge part detection circuit for detecting, as an edge part, a position of an adjacent pixel showing a different pixel value according to the obtained binary image information, and a pixel in the edge part detected by the edge part detection circuit in the binary image information. A noise removing circuit that replaces the value with the pixel value converted by the dynamic range changing circuit and outputs the pixel value to the encoding circuit is provided to remove the influence of the characteristics of the image input apparatus and the noise due to the stain on the original. An image data encoding method characterized by:
JP63281129A 1988-11-07 1988-11-07 Image data encoding method Expired - Lifetime JPH06103928B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP63281129A JPH06103928B2 (en) 1988-11-07 1988-11-07 Image data encoding method
US07/431,828 US5056154A (en) 1988-11-07 1989-11-06 Text image data compression system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63281129A JPH06103928B2 (en) 1988-11-07 1988-11-07 Image data encoding method

Publications (2)

Publication Number Publication Date
JPH02126772A JPH02126772A (en) 1990-05-15
JPH06103928B2 true JPH06103928B2 (en) 1994-12-14

Family

ID=17634770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63281129A Expired - Lifetime JPH06103928B2 (en) 1988-11-07 1988-11-07 Image data encoding method

Country Status (1)

Country Link
JP (1) JPH06103928B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584148B2 (en) 2001-11-16 2009-09-01 Seiko Epson Corporation Apparatus and method for processing a check, and a computer-readable recording medium storing a check processing control program
JP4412720B2 (en) 2004-06-24 2010-02-10 キヤノン株式会社 Video processing method and apparatus

Also Published As

Publication number Publication date
JPH02126772A (en) 1990-05-15

Similar Documents

Publication Publication Date Title
JPS61267791A (en) Method and apparatus for threshold processing of graphic image using histogram analysis
JPH0563996A (en) Image processor
JPH0640660B2 (en) Apparatus for performing binary bit data compression representing pixels of a dithered image in a digital image processing process.
US5442459A (en) Process for encoding a half tone image considering similarity between blocks
JP4443784B2 (en) Image encoding / decoding method, image encoding apparatus, and image decoding apparatus
EP1006714A2 (en) Method of processing mixed raster content planes
JPH06103928B2 (en) Image data encoding method
JPH04238462A (en) Picture processor
JP3117331B2 (en) Image data processing device
JPS63305672A (en) Block encoding system for multi-valued image
JP2972500B2 (en) Resolution adaptive control device
JP2617986B2 (en) Image processing method
JP3279831B2 (en) Coding method and decoding method for binary pseudo gradation image
JP2857906B2 (en) Halftone binarization processor
KR930007980B1 (en) Middle tone picture display method
JPH0918877A (en) Fractal image compression device
JP3259989B2 (en) Binary and multi-valued mixed coded image data restoration method and apparatus
JP3046945B2 (en) Image data processing method
JP2677989B2 (en) Pseudo halftone processor
JP3036244B2 (en) Image signal processing device
JP2860039B2 (en) Pseudo halftone image reduction device
JPH0818781A (en) Binarizing device and equipment using the device
JP5434799B2 (en) Image coding apparatus, image coding method, and image coding program
KR930005131B1 (en) Histogram equalization for picture tone
JPS60236582A (en) Picture signal quantizing system