JPH05250468A - System for reducing binary picture data - Google Patents

System for reducing binary picture data

Info

Publication number
JPH05250468A
JPH05250468A JP4048306A JP4830692A JPH05250468A JP H05250468 A JPH05250468 A JP H05250468A JP 4048306 A JP4048306 A JP 4048306A JP 4830692 A JP4830692 A JP 4830692A JP H05250468 A JPH05250468 A JP H05250468A
Authority
JP
Japan
Prior art keywords
run length
image
reduced image
reduced
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
JP4048306A
Other languages
Japanese (ja)
Inventor
Hideo Aizawa
英夫 相沢
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP4048306A priority Critical patent/JPH05250468A/en
Publication of JPH05250468A publication Critical patent/JPH05250468A/en
Pending legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To suppress color collapse as much as possible without remarkably deforming the reduced picture. CONSTITUTION:When the remaining Ki being the minority cut down by the result of multiplication so as to make the run length Mi of scanning data 303 of the reduced picture integer moves more than -1 in the negative direction, the Mi is set to zero so that the deviation of the change point of the color between the original picture and the reduced picture can be suppressed within the range of one picture element. Thus, the deformation of the reduced picture can be prevented. In case where the remaining Ki does not exceed -1, the generation of color collapse can be prevented by deciding the run length Mi to value 1 even though the multiplication result is less than 1.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は2値画像データ縮小方
式に関し、特に2値画像を縮小または密画像から粗画像
に変換するための方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a binary image data reduction system, and more particularly to a system for reducing a binary image or converting a dense image into a coarse image.

【0002】[0002]

【従来の技術】電子ファイリング装置やファクシミリ装
置で扱う2値画像(以下、画像と称する)を縮小、また
は密画像から粗画像に変換(以下、合わせて縮小と称す
る)する方法としては、「間引き法」、「論理和演算
法」、「ランレングス変換法」などが知られている。
2. Description of the Related Art As a method of reducing a binary image (hereinafter referred to as an image) handled by an electronic filing apparatus or a facsimile apparatus or converting a dense image into a coarse image (hereinafter collectively referred to as reduction), "decimation" is performed. Known methods include “method”, “logical sum operation method”, “run length conversion method” and the like.

【0003】(1)間引き法は、画像の走査線(また
は、副走査線)の何画素か毎に1画素を削除して、画素
数を減らす方式である。この間引き法では、原画像の内
容にかかわらず、一部の画素が無視されるため、“黒つ
ぶれ”、“白つぶれ”が生じる。
(1) The thinning method is a method of reducing the number of pixels by deleting one pixel for every several pixels of a scanning line (or sub-scanning line) of an image. In this thinning-out method, some pixels are ignored regardless of the contents of the original image, so that "blackout" and "whiteout" occur.

【0004】(2)論理和演算法は、原画像が白地に黒
の情報を載せて構成されているものが多いことから、縮
小による“黒つぶれ”を無くすために用いられる方式で
ある。この方式では、間引き法のように画素を単に削除
するのではなく、複数画素から1画素に変換される部分
で、その複数画素の論理和(黒が1,白が0)を計算
し、その値を変換後の1画素の値とする。この論理和演
算法では、“黒つぶれ”がなくなる代わりに、“白つぶ
れ”が生じる。さらに、縮小された画像は、原画像より
も、黒っぽくなってしまう。 (3)ランレングス変換法は、縮小による“黒つぶ
れ”、“白つぶれ”を防ぐ事ができ、以下のような方法
で縮小する。
(2) The OR operation method is a method used to eliminate "black crushing" due to reduction, since the original image is often composed of black information on a white background. In this method, instead of simply deleting pixels as in the thinning-out method, a logical sum (black is 1 and white is 0) of the plurality of pixels is calculated in a portion converted from a plurality of pixels to one pixel, and The value is the value of one pixel after conversion. In this logical sum operation method, “white crushed” occurs instead of “black crushed”. Furthermore, the reduced image becomes darker than the original image. (3) The run-length conversion method can prevent "black crushing" and "white crushing" due to the reduction, and the reduction is performed by the following method.

【0005】すなわち、この方式は、原画像の領域では
なく、変換された領域で密度変換を行うものであり、原
画像をランレングス表現する。ランレングスは黒または
白が連続する長さに対応する。このランレングスに縮小
倍率を乗じて、縮小画像におけるランレングスを得る。
この場合、原画像のi番目のランのランレングスをL
i、縮小後(縮小倍率=r)のランレングスをMiとす
ると、Li、Miは共に整数であることが必要である。
ここで、実数aの小数点以下を切り捨てる式を、 int(a) … (1.1) 実数aとbとで大きい方の数を取り出す式を、
That is, according to this method, the density conversion is performed not in the area of the original image but in the converted area, and the original image is expressed in run length. The run length corresponds to a continuous length of black or white. This run length is multiplied by the reduction ratio to obtain the run length in the reduced image.
In this case, the run length of the i-th run of the original image is L
If i and the run length after reduction (reduction ratio = r) are Mi, then Li and Mi must both be integers.
Here, the expression for rounding down the fractional part of the real number a is int (a) (1.1) The expression for taking out the larger number of the real numbers a and b is

【0006】 max(a,b) … (1.2) と定義すると、以下の式(2.1),(2.2)、
(2.3)から、縮小画像の整数化されたランレングス
Miが求められる。
Defining max (a, b) (1.2), the following equations (2.1), (2.2),
From (2.3), an integerized run length Mi of the reduced image is obtained.

【0007】 K0 =0 … (2.1) Mi=max(int(r×Li+Ki-1),1) … (2.2) Ki=r×Li+Ki-1−Mi … (2.3)K 0 = 0 (2.1) Mi = max (int (r × Li + K i-1 ), 1) (2.2) Ki = r × Li + K i-1 -Mi (2.3)

【0008】式(2.1)〜(2.3)において、i=
1,2,…,imax であり、imaxは原画像のランレン
グスの総数を示している。また、Kiは、縮小変換にお
いて縮小画像のランレングスを整数化(≧1)した事に
よる小数点以下の残余であり、原画像走査データのi番
目の色の変化点と、縮小画像走査データのi番目の色の
変化点とで、どれだけズレが生じたかを示すものであ
る。
In equations (2.1) to (2.3), i =
1, 2, ..., I max , and i max indicates the total number of run lengths of the original image. Further, Ki is the residue below the decimal point due to the run length of the reduced image being integerized (≧ 1) in the reduction conversion, and the change point of the i-th color of the original image scan data and the i of the reduced image scan data. The change point of the th color shows how much the deviation has occurred.

【0009】このランレングス変換法では、式(2.
2),(2.3)から分かるように、1つ前のランレン
グスの演算で生じた残余Ki-1を次のランレングス演算
時にその原画像のランレングスLiに加算し、これによ
って画像のズレKiがKi<rの範囲に収まるようにし
て、小数点以下の誤差が累積されることによる不都合を
防止している。
In this run length conversion method, the equation (2.
As can be seen from 2) and (2.3), the residual K i−1 generated in the previous run length calculation is added to the run length Li of the original image during the next run length calculation, thereby The deviation Ki is set within the range of Ki <r to prevent the inconvenience caused by the accumulation of errors after the decimal point.

【0010】また、式(2.2)においては縮小画像の
ランレングスMiをMi≧1になるようにしており、こ
れによって縮小画像における色の欠落やつぶれを防止す
ることができる。
Further, in the equation (2.2), the run length Mi of the reduced image is set to be Mi ≧ 1, so that it is possible to prevent color loss or crushing in the reduced image.

【0011】しかし、このランレングス変換法では、通
常の原画像ではランレングスLi=1が連続して発生す
ることは希であるので問題はないが、原画像でランレン
グスLi=1が連続して発生するような場合には、以下
のような問題が生じる。
In this run length conversion method, however, run length Li = 1 rarely occurs continuously in a normal original image, so there is no problem. However, run length Li = 1 continues in the original image. In such a case, the following problems occur.

【0012】すなわち、コンピュータ等で作った人工的
な画像では、白画素と黒画素が交互に発生することがし
ばしばある。この様な場合は、原画像でランレングスL
i=1が連続して発生する事になるので、Kiの値は負
方向に大きくなってしまう。この場合、対応する縮小画
像のランレングスは見かけ上拡大されてしまうことにな
り、これによって原画像と縮小画像間の色の変化点のズ
レ量が大きくなる。したがって、縮小画像は原画像から
大きく変形されてしまうことになる。
That is, in an artificial image created by a computer or the like, white pixels and black pixels often occur alternately. In such a case, run length L in the original image
Since i = 1 occurs continuously, the value of Ki increases in the negative direction. In this case, the run length of the corresponding reduced image is apparently enlarged, which increases the amount of deviation of the color change point between the original image and the reduced image. Therefore, the reduced image is largely deformed from the original image.

【0013】[0013]

【発明が解決しようとする課題】従来では、白画素と黒
画素が交互に発生するような原画像を縮小すると、縮小
画像は原画像から大きく変形されてしまう欠点があっ
た。
Conventionally, when the original image in which white pixels and black pixels are alternately generated is reduced, the reduced image is largely deformed from the original image.

【0014】この発明はこのような点に鑑みてなされた
もので、白画素と黒画素が交互に発生するような原画像
の縮小において、縮小画像が大きく変形されない範囲
で、しかも色のつぶれが最小限に止めることができる2
値画像データ縮小方式を提供することを目的とする。
The present invention has been made in view of the above point, and in reducing an original image in which white pixels and black pixels are alternately generated, a reduced image is not greatly deformed, and color collapse occurs. Can be kept to a minimum 2
An object is to provide a value image data reduction method.

【0015】[0015]

【課題を解決するための手段および作用】この発明は、
原画像のランレングスに縮小倍率を乗じその乗算結果の
少数部を切り捨てることにより整数値を有する縮小画像
のランレングスを求め、その少数部を次の縮小画像のラ
ンレングス演算時に原画像のランレングスに加算するこ
とにより原画像のランレングスを縮小画像のランレング
スに順次変換する2値画像データ縮小方式において、前
記乗算結果の整数部が零の際には原画像の1画素が縮小
画像の1画素に変換されるように前記縮小画像のランレ
ングスの値を1画素に決定する手段と、前記縮小画像の
ランレングスの値を1画素に決定することによって生じ
た負の少数部の値を調べ、負の少数部の値が負方向に所
定値を越える際にはその原画像の1画素が縮小画像に変
換されないように前記縮小画像のランレングスを零に決
定する手段とを具備することを特徴とする。
Means and Actions for Solving the Problems
The run length of the original image is multiplied by the reduction ratio, and the decimal part of the multiplication result is discarded to obtain the run length of the reduced image having an integer value, and the run length of the original image is calculated when calculating the run length of the next reduced image. In the binary image data reduction method in which the run length of the original image is sequentially converted into the run length of the reduced image by adding to, 1 pixel of the original image is 1 pixel of the reduced image when the integer part of the multiplication result is zero. A means for determining the run length value of the reduced image to be one pixel so that the reduced image is converted into a pixel; and a negative decimal part value generated by determining the run length value of the reduced image to be one pixel. , A means for determining the run length of the reduced image to be zero so that one pixel of the original image is not converted into a reduced image when the value of the negative decimal part exceeds a predetermined value in the negative direction. Characterized in that it.

【0016】この2値画像データ縮小方式においては、
乗算結果の少数部が負方向に所定値を越えるとその縮小
画像のランレングスが零に決定されるため、原画像と縮
小画像間の色の変化点のズレ量は一定範囲内におさめら
れる。このため、縮小画像の変形を防止できる。また、
乗算結果の少数部が負方向に所定値を越えない状態で
は、乗算結果が1未満であっても縮小画像のランレング
スが1画素に決定されることにより、色のつぶれの発生
を防止できる。したがって、白画素と黒画素が交互に発
生するような原画像の縮小処理を行う場合でも、縮小画
像が大きく変形されない範囲で、色のつぶれを最小限に
とどめることが可能となる。
In this binary image data reduction system,
When the minority part of the multiplication result exceeds a predetermined value in the negative direction, the run length of the reduced image is determined to be zero, so that the amount of deviation of the color change point between the original image and the reduced image is kept within a certain range. Therefore, the deformation of the reduced image can be prevented. Also,
In a state where the minority part of the multiplication result does not exceed the predetermined value in the negative direction, the run length of the reduced image is determined to be 1 pixel even if the multiplication result is less than 1, and thus it is possible to prevent the occurrence of color collapse. Therefore, even when the reduction process of the original image in which white pixels and black pixels are alternately generated is performed, it is possible to minimize the color collapse in a range in which the reduced image is not significantly deformed.

【0017】[0017]

【実施例】以下、図面を参照してこの発明の実施例を説
明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0018】まず、この発明の一実施例に係わる2値画
像データ縮小方式の原理を説明する。この縮小方式の大
まかな流れは、前述のランレングス変換法と同じである
が、この発明の方式では、ランレングス変換法における
画像のズレを示す残余Kiが、{−1<Ki<r}の範
囲内になるように改善されている。この範囲{−1<K
i<r}に入らない画素は、物理的に変換できない画素
として色のつぶれを許している。
First, the principle of the binary image data reduction method according to the embodiment of the present invention will be described. The general flow of this reduction method is the same as that of the run-length conversion method described above, but in the method of the present invention, the residual Ki indicating the image shift in the run-length conversion method is {−1 <Ki <r}. It has been improved to be within the range. This range {-1 <K
Pixels that do not fall within i <r} allow color collapse as pixels that cannot be physically converted.

【0019】すなわち、ランレングス変換法では、原画
像のランレングス(Li)に縮小倍率(r)を乗じその
乗算結果の少数部(残余Ki)を切り捨てることにより
整数値を有する縮小画像のランレングス(Mi)を求
め、その少数部(残余Ki)を次の縮小画像のランレン
グス演算時に原画像のランレングスに加算することによ
り、残余Kiを、{Ki<r}の範囲に収めている。し
かし、このランレングス変換法においては、縮小画像の
ランレングス(Mi)が必ず{Mi≧1}となるよう
に、残余Kiが{Ki<0}となることを常に容認して
いる。
That is, in the run-length conversion method, the run-length (Li) of the original image is multiplied by the reduction ratio (r) and the decimal part (residual Ki) of the multiplication result is cut off to reduce the run-length of the reduced image having an integer value. (Mi) is obtained, and the minority part (residual Ki) is added to the run length of the original image during the run length calculation of the next reduced image, whereby the residual Ki is contained within the range of {Ki <r}. However, in this run length conversion method, it is always accepted that the residual Ki is {Ki <0} so that the run length (Mi) of the reduced image is always {Mi ≧ 1}.

【0020】この実施例では、コンピュータ等で作った
人工的な画像を大きな変形なしで縮小するために、残余
Kiが{Ki<0}となることを常に容認するのではな
く、残余Kiの値を調べ、残余Kiの値が、{Ki≦−
1}となった場合には、原画像の1画素が縮小画像に変
換されないように、縮小画像のランレングス(Mi)を
零に決定している。
In this embodiment, in order to reduce an artificial image made by a computer or the like without a large deformation, it is not always accepted that the residual Ki becomes {Ki <0}, but the value of the residual Ki is And the value of the residual Ki is {Ki ≦ −
1}, the run length (Mi) of the reduced image is set to zero so that one pixel of the original image is not converted into the reduced image.

【0021】縮小画像のランレングスMiは、原画像の
走査データのランレングスLi(i=1〜imax、imax
は原画像のランレングス総数)を、i=1〜imaxにつ
いて下式(5.1)〜(5.5)で繰り返し演算するこ
とによって求められる。
The run length Mi of the reduced image is the run length Li (i = 1 to i max , i max of the scan data of the original image.
Is calculated by iteratively calculating the run length total number of the original image by the following equations (5.1) to (5.5) for i = 1 to i max .

【0022】 K0 =0 … (5.1) Mi´=max(int(r×Li+Ki-1),1) … (5.2) Ki´=r×Li+Ki-1−Mi´ … (5.3) M i =Mi´ (−1 < Ki´)、または =0 (Ki´≦ −1 ) … (5.4) Ki =Ki´ (−1 < Ki´)、または =Ki´+1 (Ki´≦ −1 ) … (5.5) 式(5.1)〜(5.5)の演算内容は次の通りであ
る。
K 0 = 0 (5.1) Mi ′ = max (int (r × Li + K i−1 ), 1) (5.2) Ki ′ = r × Li + K i−1 −Mi ′ (5) .3) M i = Mi ′ (−1 <Ki ′), or = 0 (Ki ′ ≦ −1) ... (5.4) Ki = Ki ′ (−1 <Ki ′), or = Ki ′ + 1 ( Ki ′ ≦ −1) (5.5) The calculation contents of equations (5.1) to (5.5) are as follows.

【0023】縮小画像のズレの初期値である初期残余K
0は、零である(5.1)。ズレの大きさを考慮しない
縮小ランレングスMi´を求める(5.2)。縮小ラン
レングスの値をMi´とした時のズレKi´を求める
(5.3)。
Initial residual K which is the initial value of the shift of the reduced image
0 is zero (5.1). A reduced run length Mi ′ that does not consider the size of the deviation is obtained (5.2). A shift Ki 'is calculated when the reduced run length value is Mi' (5.3).

【0024】Ki´が{−1<Ki´}の範囲にある時
(縮小画像において、画素の走査方向へのズレが、1画
素の大きさよりも小さい時)には、もとめる縮小ランレ
ングスMiはMi´に等しくする(5.4)。また、そ
の時のズレKiもKi´に等しくする(5.5)。
When Ki ′ is in the range of {−1 <Ki ′} (when the pixel shift in the scanning direction is smaller than the size of one pixel in the reduced image), the reduced run length Mi to be obtained is It is equal to Mi '(5.4). Further, the deviation Ki at that time is also made equal to Ki '(5.5).

【0025】Ki´が{Ki´≦−1}の範囲にある時
(縮小画像において、画素の走査方向へのズレが、1画
素の大きさ以上の時)には、縮小画像の変形(縮小画像
が走査方向にズレる)が著しいと判断して、Mi=0と
して、そのランレングスデータを無いものとする(5.
4)。また、そのとき、Mi=0としたことから、縮小
画像のズレも解消されるので、Ki=Ki´+1とする
(5.5)。図1には、以上の2値画像データ縮小方式
によって画像処理を行う画像処理装置が示されている。
When Ki 'is in the range of {Ki'≤-1} (when the pixel shift in the scanning direction is more than one pixel in the reduced image), the reduced image is deformed (reduced). It is determined that the image is significantly deviated in the scanning direction, and Mi = 0 is set, and the run length data is absent (5.
4). Further, at that time, since Mi = 0, the shift of the reduced image is also eliminated, and thus Ki = Ki ′ + 1 is set (5.5). FIG. 1 shows an image processing apparatus that performs image processing by the binary image data reduction method described above.

【0026】この画像処理装置は、CPU101(また
はDSP:Digital Signal Prossesor)、DMAコ
ントローラ(DMAC)102、プログラムメモリ(P
ROG MEMO)103、上位インターフェース(C
MD I/F)104、画像データメモリ(IMG R
AM)105、および画像データ用インターフェース
(IMG I/F)106から構成されている。
The image processing apparatus includes a CPU 101 (or DSP: Digital Signal Prossesor), a DMA controller (DMAC) 102, a program memory (P).
ROG MEMO) 103, upper interface (C
MD I / F) 104, image data memory (IMGR)
AM) 105 and image data interface (IMG I / F) 106.

【0027】CPU101は、装置全体の制御と、画像
の縮小処理を行う。DMAコントローラ(DMAC)1
02は、CPU101により制御され、画像データ用イ
ンターフェース(IMG I/F)106から画像デー
タを入力し、それを画像データメモリ(IMG RA
M)105に書き込んだり、逆に、画像データメモリ
(IMG RAM)105から読み込んだデータを画像
データ用インターフェース(IMG I/F)106に
出力する。
The CPU 101 controls the entire apparatus and performs image reduction processing. DMA controller (DMAC) 1
02 is controlled by the CPU 101, inputs image data from the image data interface (IMG I / F) 106, and stores it in the image data memory (IMG RA).
M) 105, or conversely, the data read from the image data memory (IMG RAM) 105 is output to the image data interface (IMG I / F) 106.

【0028】プログラムメモリ(PROG MEMO)
103には、CPU101による画像処理動作を制御す
るためのプログラムが格納されている。上位インターフ
ェース(CMD I/F)104は、この画像処理装置
が実行すべき処理の指示を上位装置から入力したり、実
行結果などを上位装置へ出力する。画像データメモリ
(IMG RAM)105には、画像データを格納す
る。画像データ用インターフェース(IMG I/F)
106は、この画像処理装置に接続されるプリンタ、ス
キャナ、メモリ、ディスプレイ、ファクシミリ等の外部
装置との間で画像データを入出力する。次に、図2のフ
ローチャートを参照して、CPU101による2値画像
の縮小演算を説明する。
Program memory (PROG MEMO)
A program for controlling the image processing operation by the CPU 101 is stored in 103. The host interface (CMD I / F) 104 inputs an instruction of processing to be executed by the image processing apparatus from the host apparatus, and outputs the execution result and the like to the host apparatus. Image data is stored in the image data memory (IMG RAM) 105. Image data interface (IMG I / F)
Reference numeral 106 inputs / outputs image data to / from external devices such as a printer, a scanner, a memory, a display, and a facsimile connected to the image processing apparatus. Next, a binary image reduction calculation by the CPU 101 will be described with reference to the flowchart in FIG.

【0029】まず、CPU101は、演算パラメータと
してのLiに原画像の走査データのランレングスを入
れ、また、縮小画像のズレの初期値として、K0=0と
する(ステップS1)。次いで、CPU101は、ラン
レングスの番号を示す変数iに初期値1を入れ(ステッ
プS2)、そして、変数iが原画像のランレングスの総
数値imaxを越えたら計算終了し、それ以外ではステッ
プS4〜S8で縮小ランレングスMiの計算処理が続け
られるように、条件分岐を実行する(ステップS3)。
i≦imaxの場合には、CPU101は、縮小画像のズ
レの大きさを無視した時の縮小画像ランレングスMi´
と、そのときのズレKi´を、
First, the CPU 101 puts the run length of the scanning data of the original image into Li as a calculation parameter, and sets K0 = 0 as the initial value of the shift of the reduced image (step S1). Next, the CPU 101 puts an initial value 1 into the variable i indicating the run length number (step S2), and when the variable i exceeds the total run length value i max of the original image, the calculation ends, otherwise the step A conditional branch is executed so that the calculation process of the reduced run length Mi is continued in S4 to S8 (step S3).
When i ≦ i max , the CPU 101 reduces the reduced image run length Mi ′ when the size of the shift of the reduced image is ignored.
And the deviation Ki 'at that time,

【0030】 Mi´=max(int(r×Li+Ki-1),1) … (5.2) Ki´=r×Li+Ki-1−Mi´ … (5.3)の式 から演算して求める(ステップS4)。Mi ′ = max (int (r × Li + K i−1 ), 1) (5.2) Ki ′ = r × Li + K i−1 −Mi ′ (5.3) Obtained (step S4).

【0031】ここで、max(int(r×Li+K
i-1),1)の演算は、原画像のランレングスLiに縮
小倍率rを乗じ、その乗算結果に前ラインのランレング
ス演算での残余値Ki-1を加算したものについて、その
少数部を切り捨てることにより得られる整数値を値1と
比較し、いずれか大きい方の値を、縮小画像のズレの大
きさを無視した時の縮小画像ランレングスMi´として
決定する演算であり、この演算によって、整数値が零の
際には原画像の1画素が縮小画像の1画素に変換される
ようになる。
Here, max (int (r × Li + K
i-1 ), 1) is obtained by multiplying the run length Li of the original image by the reduction ratio r and adding the residual value K i-1 in the run length calculation of the previous line to the multiplication result. This is an operation for comparing the integer value obtained by truncating the part with the value 1, and determining which one is larger as the reduced image run length Mi ′ when the size of the shift of the reduced image is ignored. By the calculation, when the integer value is zero, one pixel of the original image is converted into one pixel of the reduced image.

【0032】次いで、CPU101は、ステップS4で
求めたズレKi´が−1以下か否かを判断する(ステッ
プS5)。ズレKi´が−1以下でない場合には、Ki
´の絶対値が小さいので、ステップS4で得たMi´,
Ki´が、そのままMi,Kiの値として決定される
(ステップS6)。一方、ズレKi´が−1以下の場合
には、Ki´の絶対値が大きいので、Mi=0とすると
共に、これにより解消されたズレ量を補正するために、
Ki=Ki´−1とする(ステップS7)。この後、C
PU101は、ランレングスの番号iを+1増分しなが
ら(ステップS8)、ステップS3〜S7を繰り返す。
図3には、このような縮小方式によって得られる縮小画
像の一例が示されている。
Next, the CPU 101 determines whether the deviation Ki 'obtained in step S4 is -1 or less (step S5). If the deviation Ki 'is not less than -1, Ki
Since the absolute value of ′ is small, Mi ′ obtained in step S4,
Ki 'is directly determined as the values of Mi and Ki (step S6). On the other hand, when the deviation Ki ′ is −1 or less, the absolute value of Ki ′ is large, so Mi = 0 is set, and in order to correct the deviation amount eliminated by this,
Ki = Ki'-1 is set (step S7). After this, C
The PU 101 repeats steps S3 to S7 while incrementing the run length number i by 1 (step S8).
FIG. 3 shows an example of a reduced image obtained by such a reduction method.

【0033】ここでは、原画像の走査データ301を3
/4の縮小倍率で縮小して、縮小画像の走査データ30
3に変換した場合が例示されている。走査データ30
1,303において、“0”は白、“1”は黒を示して
いる。
Here, the scan data 301 of the original image is set to 3
Scan data 30 of the reduced image reduced by a reduction ratio of / 4
The case of conversion into 3 is illustrated. Scan data 30
In 1, 303, “0” indicates white and “1” indicates black.

【0034】原画像の走査データ301の第1のランレ
ングスL1はL1=3であり、これに対応する縮小画像
のランレングスM1は、int(r×Li+Ki-1)の
式に値を代入すると、{(3/4)×3+0=9/4=
2+1/4}となることから、M1=2、またK1はK
1=1/4となる。
The first run length L1 of the scan data 301 of the original image is L1 = 3, and the corresponding run length M1 of the reduced image is obtained by substituting a value into the expression int (r × Li + K i-1 ). Then, {(3/4) × 3 + 0 = 9/4 =
2 + 1/4}, so M1 = 2 and K1 is K
1 = 1/4.

【0035】同様にして、ランレングスL2=1に対応
する縮小画像のランレングスM2は、{(3/4)×1
+1/4=1}であることから、M2=1、K2=0/
4=0となる。
Similarly, the run length M2 of the reduced image corresponding to the run length L2 = 1 is {(3/4) × 1.
+ 1/4 = 1}, so M2 = 1 and K2 = 0 /
4 = 0.

【0036】また、ランレングスL3=4に対応する縮
小画像のランレングスM3は、{(3/4)×4+0=
3}から、M3=3、K3=0/4=0となり、ランレ
ングスL4=1に対応する縮小画像のランレングスM4
は、{(3/4)×1+0=0+(3/4)=1−(1
/4)}から、M4=1、K4=−1/4となり、。ラ
ンレングスL5=1に対応する縮小画像のランレングス
M5は、{(3/4)×1−(1/4)=0+(2/
4)=1−(2/4)}から、M5=1、K5=−2/
4となり、さらに、ランレングスL6=1に対応する縮
小画像のランレングスM6は、{(3/4)×1−(2
/4)=0+(1/4)=1−(3/4)}から、M6
=1、K6=−3/4となる。
Further, the run length M3 of the reduced image corresponding to the run length L3 = 4 is {(3/4) × 4 + 0 =
3}, M3 = 3, K3 = 0/4 = 0, and the reduced image run length M4 corresponding to the run length L4 = 1.
Is {(3/4) × 1 + 0 = 0 + (3/4) = 1− (1
/ 4)}, M4 = 1, K4 = -1 / 4, and so on. The run length M5 of the reduced image corresponding to the run length L5 = 1 is {(3/4) × 1- (1/4) = 0 + (2 /
4) = 1- (2/4)}, M5 = 1, K5 = -2 /
4, and the run length M6 of the reduced image corresponding to the run length L6 = 1 is {(3/4) × 1- (2
/ 4) = 0 + (1/4) = 1- (3/4)}, M6
= 1 and K6 = -3 / 4.

【0037】この後、ランレングスL7=1に対応する
縮小画像のランレングスM7を求める演算を行うと、
{(3/4)×1−(3/4)=0=1−1}であるか
ら、もし、M7=1とすると、K7=−4/4となって
しまうので、ここでは、M7=0とし、K7=−(4/
4)+1=0とする。
After that, when the calculation for obtaining the run length M7 of the reduced image corresponding to the run length L7 = 1 is performed,
Since {(3/4) × 1- (3/4) = 0 = 1-1}, if M7 = 1, then K7 = -4 / 4, so here, M7 = 0, K7 =-(4 /
4) + 1 = 0.

【0038】これにより、原画像の走査データ301に
おけるランレングスL7については変換されず、これに
よって原画像の走査データ301における色の変化点と
縮小画像の走査データ303における色の変化点との間
のズレは1画素以内で収められる。
As a result, the run length L7 in the scan data 301 of the original image is not converted, and as a result, between the color change point in the scan data 301 of the original image and the color change point in the scan data 303 of the reduced image. The deviation can be accommodated within 1 pixel.

【0039】以上のように、この実施例においては、縮
小画像の走査データ303のランレングスMiを整数化
するために乗算結果から切り捨てられた少数部である残
余Kiが負方向に−1以上になるとその縮小画像のラン
レングスMiが零に決定されるため、原画像と縮小画像
間の色の変化点のズレ量は1画素の範囲内におさめられ
る。このため、縮小画像の変形を防止できる。また、残
余Kiが−1を越えない状態では、乗算結果が1未満で
あっても縮小画像のランレングスMiが値1に決定され
ることにより、色のつぶれの発生を防止できる。
As described above, in this embodiment, the residual Ki, which is the fractional part truncated from the multiplication result in order to convert the run length Mi of the scan data 303 of the reduced image into an integer, becomes -1 or more in the negative direction. Then, the run length Mi of the reduced image is determined to be zero, so that the amount of deviation of the color change point between the original image and the reduced image is kept within the range of 1 pixel. Therefore, the deformation of the reduced image can be prevented. Further, when the residual Ki does not exceed -1, even if the multiplication result is less than 1, the run length Mi of the reduced image is set to the value 1, so that it is possible to prevent color collapse.

【0040】したがって、白画素と黒画素が交互に発生
するような原画像の縮小処理を行う場合でも、縮小画像
が大きく変形されない範囲で、色のつぶれを最小限にと
どめることが可能となる。
Therefore, even when the reduction processing of the original image in which white pixels and black pixels are alternately generated is performed, it is possible to minimize the color crushing within a range in which the reduced image is not largely deformed.

【0041】なお、ここでは主走査データ(水平方向)
についてのみ説明したが、この処理の後、副走査データ
(垂直方向)についても同様の処理を行えば、縦横任意
の縮小ができる。
Here, main scanning data (horizontal direction)
However, if the same process is performed on the sub-scanning data (vertical direction) after this process, any vertical and horizontal reduction can be performed.

【0042】[0042]

【発明の効果】以上のように、この発明によれば、白画
素と黒画素が交互に発生するような原画像の縮小を、縮
小画像が大きく変形されない範囲で、しかも色のつぶれ
が最小限になるように行うことが可能となる。
As described above, according to the present invention, reduction of an original image in which white pixels and black pixels are alternately generated can be performed within a range in which the reduced image is not largely deformed, and color collapse is minimized. It becomes possible to do so.

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

【図1】この発明の一実施例に係わる2値画像データ縮
小方式を実現するためのシステム構成を示す図。
FIG. 1 is a diagram showing a system configuration for realizing a binary image data reduction method according to an embodiment of the present invention.

【図2】同実施例の画像縮小動作を説明するためのフロ
ーチャート。
FIG. 2 is a flowchart for explaining an image reduction operation of the embodiment.

【図3】同実施例の画像縮小方式で変換された縮小画像
の一例を示す図。
FIG. 3 is a diagram showing an example of a reduced image converted by the image reducing method of the embodiment.

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

101…CPU、102…DMAコントローラ、103
…プログラムメモリ、104…上位インターフェース、
105…画像データメモリ、106…画像データ用イン
ターフェース、301…原画像の走査データ、303…
縮小画像の走査データ、Li…原画像のランレングス、
Mi…縮小画像のランレングス、Ki…原画像と縮小画
像のズレ量を示す残余値。
101 ... CPU, 102 ... DMA controller, 103
… Program memory, 104… Upper interface,
105 ... Image data memory, 106 ... Image data interface, 301 ... Original image scan data, 303 ...
Scanned data of reduced image, Li ... Run length of original image,
Mi ... Run length of reduced image, Ki ... Residual value indicating amount of deviation between original image and reduced image.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 原画像のランレングスに縮小倍率を乗じ
その乗算結果の少数部を切り捨てることにより整数値を
有する縮小画像のランレングスを求め、その少数部を次
の縮小画像のランレングス演算時に原画像のランレング
スに加算することにより原画像のランレングスを縮小画
像のランレングスに順次変換する2値画像データ縮小方
式において、 前記乗算結果の整数部が零の際には原画像の1画素が縮
小画像の1画素に変換されるように前記縮小画像のラン
レングスの値を1画素に決定する手段と、 前記縮小画像のランレングスの値を1画素に決定するこ
とによって生じた負の少数部の値を調べ、負の少数部の
値が負方向に所定値を越える際にはその原画像の1画素
が縮小画像に変換されないように前記縮小画像のランレ
ングスを零に決定する手段とを具備することを特徴とす
る2値画像データ縮小方式。
1. A run length of a reduced image having an integer value is obtained by multiplying a run length of an original image by a reduction scale factor and truncating a decimal part of the multiplication result, and the run length of the next reduced image is calculated by calculating the run length of the reduced image. In the binary image data reduction method in which the run length of the original image is sequentially converted to the run length of the reduced image by adding to the run length of the original image, one pixel of the original image is obtained when the integer part of the multiplication result is zero. Means for determining the run length value of the reduced image to be one pixel so that is converted into one pixel of the reduced image, and a negative decimal number generated by determining the run length value of the reduced image to be one pixel. The value of the part is examined, and when the value of the negative decimal part exceeds a predetermined value in the negative direction, the run length of the reduced image is set to zero so that one pixel of the original image is not converted into the reduced image. Binary image data reduction method characterized by comprising the that means.
JP4048306A 1992-03-05 1992-03-05 System for reducing binary picture data Pending JPH05250468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4048306A JPH05250468A (en) 1992-03-05 1992-03-05 System for reducing binary picture data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4048306A JPH05250468A (en) 1992-03-05 1992-03-05 System for reducing binary picture data

Publications (1)

Publication Number Publication Date
JPH05250468A true JPH05250468A (en) 1993-09-28

Family

ID=12799741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4048306A Pending JPH05250468A (en) 1992-03-05 1992-03-05 System for reducing binary picture data

Country Status (1)

Country Link
JP (1) JPH05250468A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1517268A1 (en) * 2003-09-19 2005-03-23 Ricoh Company, Ltd. Downscaling of run-length encoded binary images
WO2021006160A1 (en) * 2019-07-11 2021-01-14 株式会社ソニー・インタラクティブエンタテインメント Image processing device, image processing method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1517268A1 (en) * 2003-09-19 2005-03-23 Ricoh Company, Ltd. Downscaling of run-length encoded binary images
US7508992B2 (en) 2003-09-19 2009-03-24 Ricoh Company, Ltd. Image-processing apparatus for compressing binary-format image data
WO2021006160A1 (en) * 2019-07-11 2021-01-14 株式会社ソニー・インタラクティブエンタテインメント Image processing device, image processing method, and program
JPWO2021006160A1 (en) * 2019-07-11 2021-11-25 株式会社ソニー・インタラクティブエンタテインメント Image processing equipment, image processing methods, and programs
US11861770B2 (en) 2019-07-11 2024-01-02 Sony Interactive Entertainment Inc. Image processing apparatus, image processing method, and program for changing image data from an initial display range to a target display range

Similar Documents

Publication Publication Date Title
US4791678A (en) Image processing system
US4607340A (en) Line smoothing circuit for graphic display units
EP0208355B1 (en) Method of enlarging/reducing dithered images
EP2111032B1 (en) Image processing apparatus and method thereof
US6741759B2 (en) Method and apparatus for interpolation
WO2001006456A1 (en) Image processing device, image processing method, image-processing program recorded medium
JPH09307789A (en) Image processing unit
JPH05250468A (en) System for reducing binary picture data
JP2789560B2 (en) Image data scaling processor
JP2002232654A (en) Device and method for image processing and computer readable recording medium with program for making computer perform the method recorded thereon
JPH0965114A (en) Variable power controller for image processor
JP2003316331A (en) Display device
JP2829931B2 (en) Image processing device
EP0362590A1 (en) Facsmile system
JP2829930B2 (en) Image processing device
US5949923A (en) Image reader
JPS6316944B2 (en)
JPH05219360A (en) Picture processor
JPH05303633A (en) Processor for thinning binary picture
JPH04169977A (en) Picture data processor
JPH05183735A (en) Method and device for picture conversion
JPS63113770A (en) Image processing system
JPH06261206A (en) Image processor
JP2002051214A (en) Device and method for processing image and storage medium
JPH0962835A (en) Picture conversion method and device therefor