JPH05303633A - Processor for thinning binary picture - Google Patents
Processor for thinning binary pictureInfo
- Publication number
- JPH05303633A JPH05303633A JP4131582A JP13158292A JPH05303633A JP H05303633 A JPH05303633 A JP H05303633A JP 4131582 A JP4131582 A JP 4131582A JP 13158292 A JP13158292 A JP 13158292A JP H05303633 A JPH05303633 A JP H05303633A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- binary image
- thinning
- processing
- target area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
(57)【要約】
【目的】文字などの細線を含む2値画像や網点写真の2
値画像を間引き処理する場合に、細線の画像部分が欠落
したり、モアレ縞が発生したりすることの少ない2値画
像の間引き処理装置を提供する。
【構成】2値化処理部12は画像入力部11より入力し
た濃淡画像信号に2値化処理を行って2値画像を生成す
る。処理対象領域確認部16は2値画像上に間引き割合
に応じた処理対象領域を画像全体にわたり順次設定す
る。間引き処理部14は処理対象領域内の白黒各画素の
個数の大小関係と中送りフラグとから処理対象領域内を
代表する画素の種類を決定すると共に、決定された画素
の種類と処理対象領域内に含まれる各画素の画素データ
とからつぎの中送りフラグを決定する。
(57) [Summary] [Purpose] 2 of binary images and halftone pictures including fine lines such as characters.
Provided is a binary image thinning-out processing device in which thin line image portions are not missing or moire fringes are less likely to occur when thinning out a value image. A binarization processing unit 12 binarizes a grayscale image signal input from an image input unit 11 to generate a binary image. The processing target area confirmation unit 16 sequentially sets the processing target area on the binary image according to the thinning rate over the entire image. The thinning-out processing unit 14 determines the type of pixel that represents the inside of the processing target area based on the size relationship between the numbers of black and white pixels within the processing target area and the middle feed flag, and also determines the type of the determined pixel and the inside of the processing target area. The next middle-feed flag is determined from the pixel data of each pixel included in.
Description
【0001】[0001]
【産業上の利用分野】この発明は、イメージスキャナ,
ファクシミリ,複写機などに実施される画像処理技術に
関連し、殊にこの発明は、入力画像を2値化処理した得
られた2値画像に間引き処理を施して、入力した2値画
像より低解像度の2値画像を生成する2値画像の間引き
処理装置に関する。This invention relates to an image scanner,
The present invention relates to an image processing technique implemented in a facsimile machine, a copying machine, and the like. In particular, the present invention performs a thinning process on a binary image obtained by binarizing an input image to obtain a lower image than an input binary image. The present invention relates to a binary image thinning-out processing device that generates a binary image of resolution.
【0002】[0002]
【従来の技術】例えば従来のイメージスキャナは、撮像
素子としてCCDが用いられた画像入力部と、画像入力
部より入力したアナログ量の画像信号をディジタル信号
に変換した後2値化処理して2値画像を生成する2値化
処理部と、2値化処理部により得られた2値画像に間引
き処理を施して低解像度の2値画像を生成する間引き処
理部とを有しており、間引き処理後の2値画像をマイク
ロコンピュータのプリンタやCRTなどの表示装置へ出
力するものである。2. Description of the Related Art For example, a conventional image scanner uses an image input section in which a CCD is used as an image pickup element, and an analog amount image signal input from the image input section is converted into a digital signal and then binarized. It has a binarization processing unit that generates a value image and a thinning processing unit that performs a thinning process on the binary image obtained by the binarization processing unit to generate a low-resolution binary image. The processed binary image is output to a display device such as a printer or a CRT of a microcomputer.
【0003】図40〜図42は、従来より実施されてい
る間引き処理の原理を示す。同図中、1は間引き処理前
の2値画像であり、2は間引き処理後の低解像度の2値
画像であって、矩形状の各枡目はそれぞれ2値画像1,
2を構成する画素3,4を示している。40 to 42 show the principle of the thinning process which has been conventionally carried out. In the figure, 1 is a binary image before thinning processing, 2 is a low-resolution binary image after thinning processing, and each rectangular mesh is a binary image 1, 2.
Pixels 3 and 4 forming 2 are shown.
【0004】例えば400dpiの2値画像1を100
dpiの2値画像2に間引き処理する場合は、図40に
示すように、2値画像1の(4×n)(ただしn=0,
1,2,……)に相当する行であって(4×m−1)
(ただしm=1,2,……)に相当する列に位置する各
画素3Aの画素データ(「1」または「0」)を、4行
×4列の画像領域5内の2値画像を代表する画素データ
として抽出し、これを間引き処理後の2値画像2の画素
データとする。For example, a binary image 1 of 400 dpi is 100
When the thinning process is performed on the binary image 2 of dpi, as shown in FIG. 40, (4 × n) of the binary image 1 (where n = 0,
1,2, ...), which is (4 × m-1)
The pixel data (“1” or “0”) of each pixel 3A located in the column corresponding to (where m = 1, 2, ...) Is converted into a binary image in the image region 5 of 4 rows × 4 columns. It is extracted as representative pixel data, and this is used as the pixel data of the binary image 2 after the thinning process.
【0005】また400dpiの2値画像1を200d
piの2値画像2に間引き処理する場合は、図41に示
すように、2値画像1の(2×n)に相当する行であっ
て(2×m−1)に相当する列に位置する各画素3Aの
画素データを、2行×2列の画像領域5内の2値画像を
代表する画素データとして抽出し、これを間引き処理後
の2値画像2の画素データとする。In addition, a binary image 1 of 400 dpi is converted to 200 d
When the thinning process is performed on the binary image 2 of pi, as shown in FIG. 41, the row corresponding to (2 × n) of the binary image 1 is located in the column corresponding to (2 × m−1). The pixel data of each pixel 3A to be extracted is extracted as the pixel data representing the binary image in the image area 5 of 2 rows × 2 columns, and this is set as the pixel data of the binary image 2 after the thinning process.
【0006】さらに400dpiの2値画像1を300
dpiの2値画像2に間引き処理する場合は、図42に
示すように、2値画像1の(2×n),(2×n+
1),(2×n+2)に相当する行および列に位置する
各画素3A〜3Iの画素データを、4行×4列の画像領
域5内の2値画像を構成する各画素データとして抽出
し、これらを3行×3列に間引き処理した2値画像2の
画素データとする。Further, a binary image 1 of 400 dpi is set to 300
When performing the thinning processing on the binary image 2 of dpi, as shown in FIG. 42, (2 × n) and (2 × n +) of the binary image 1 are obtained.
1), pixel data of pixels 3A to 3I located in rows and columns corresponding to (2 × n + 2) are extracted as pixel data forming a binary image in the image region 5 of 4 rows × 4 columns. , And the pixel data of the binary image 2 thinned out into 3 rows × 3 columns.
【0007】[0007]
【発明が解決しようとする課題】上記の間引き処理によ
れば、画素データの抽出対象とする2値画像1の各画素
が間引きの割合に応じて決められる画像領域5内の決ま
った位置の画素であるため、2値画像1が文字などの細
線である場合に、間引き処理後の2値画像2より細線が
欠落したり、途切れたりする虞がある。また網点写真の
2値画像1に間引き処理を施した場合、間引き処理の周
期性が原因して間引き処理後の2値画像2にモアレ縞が
発生するなどの問題がある。According to the above-described thinning processing, each pixel of the binary image 1 from which pixel data is to be extracted is a pixel at a predetermined position in the image area 5 determined according to the thinning ratio. Therefore, when the binary image 1 is a thin line such as a character, there is a possibility that the thin line may be missing or discontinued from the thinned binary image 2. Further, when the thinning process is performed on the binary image 1 of the halftone dot photograph, there is a problem that moire fringes occur in the binary image 2 after the thinning process due to the periodicity of the thinning process.
【0008】この発明は、上記問題に着目してなされた
もので、文字などの細線を含む2値画像や網点写真の2
値画像を間引き処理する場合に、細線の欠落および途切
れやモアレ縞の発生をおさえた2値画像の間引き処理装
置を提供することを目的とする。The present invention has been made in view of the above problems, and it has been proposed that a binary image including a fine line such as a character or a halftone dot photograph be displayed.
An object of the present invention is to provide a thinning-out processing device for a binary image in which thin lines are omitted and discontinuity and moire fringes are generated when thinning out a value image.
【0009】[0009]
【課題を解決するための手段】請求項1にかかる発明
は、入力画像を2値化処理して得られた2値画像に間引
き処理を施して、入力した2値画像より低解像度の2値
画像を生成する2値画像の間引き処理装置であって、前
記2値画像上に間引きの割合に応じて処理対象領域を画
像全体にわたって順次設定する処理対象領域設定手段
と、前記処理対象領域の設定位置毎に処理対象領域内の
黒画素の個数と白画素の個数との大小関係と、処理済の
処理対象領域の設定位置で得られた画素指定情報とから
処理対象領域内の2値画像を代表する画素の種類を決定
して2値画像の各画素データを生成する代表画素決定手
段と、前記代表画素決定手段により決定された画素の種
類と、処理対象領域内の2値画像を構成する各画素の画
素データとからつぎの処理対象領域の設定位置に対する
画素指定情報を決定して代表画素決定手段へ出力する指
定情報決定手段と、前記代表画素決定手段より画素デー
タを入力して間引き処理後の2値画像を生成する2値画
像生成手段とを備えたものである。According to a first aspect of the present invention, a binary image obtained by binarizing an input image is subjected to a thinning process to obtain a binary image having a lower resolution than the input binary image. A binary image thinning-out processing device for generating an image, wherein processing target area setting means sequentially sets a processing target area over the entire image according to a thinning rate on the binary image, and setting of the processing target area. A binary image in the processing target area is obtained from the size relationship between the number of black pixels and the number of white pixels in the processing target area for each position and the pixel designation information obtained at the set position of the processed processing target area. A representative pixel determination unit that determines a type of a representative pixel and generates each pixel data of a binary image, a type of the pixel determined by the representative pixel determination unit, and a binary image in a processing target region are configured. From the pixel data of each pixel, Designation information determining means for determining pixel designation information for the setting position of the processing target area and outputting it to the representative pixel determining means, and pixel data from the representative pixel determining means to generate a binary image after thinning processing 2 And a value image generating means.
【0010】請求項2にかかる発明は、請求項1に記載
された2値画像の間引き処理装置であって、前記処理対
象領域設定手段は、2値画像上に間引きの割合に応じて
画像の走査方向と直交する方向に沿う処理対象領域を画
像全体にわたって順次設定するようにしたものである。According to a second aspect of the present invention, there is provided the binary image thinning-out processing device according to the first aspect, wherein the processing target area setting means sets the image on the binary image in accordance with the thinning rate. The processing target area along the direction orthogonal to the scanning direction is sequentially set over the entire image.
【0011】請求項3にかかる発明は、請求項1に記載
された2値画像の間引き処理装置であって、前記指定情
報決定手段は、前記代表画素決定手段により決定された
画素の種類と、処理対象領域内の2値画像を構成する各
画素の画素データと、処理済の処理対象領域の設定位置
で得られた画素指定情報とからつぎの処理対象領域の設
定位置に対する画素指定情報を決定して代表画素決定手
段へ出力するようにしたものである。According to a third aspect of the invention, there is provided the binary image thinning-out processing apparatus according to the first aspect, wherein the designation information determining means is the type of pixel determined by the representative pixel determining means. The pixel designation information for the next set position of the processing target area is determined from the pixel data of each pixel forming the binary image in the processing target area and the pixel designation information obtained at the set position of the processed processing target area. And output to the representative pixel determining means.
【0012】請求項4にかかる発明は、入力画像を2値
化処理して得られた2値画像に間引き処理を施して、入
力した2値画像より低解像度の2値画像を生成する2値
画像の間引き処理装置であって、前記間引き処理後の2
値画像を構成する各画素につき対象画素の画素データと
その前後の画素の画素データとから画素の種類の大小関
係を判定する画素数判定手段と、前記画素数判定手段に
よる判定結果から対象画素の画素データを補正して2値
画像を生成する2値画像生成手段とを備えたものであ
る。According to a fourth aspect of the present invention, a binary image is obtained by performing a thinning process on a binary image obtained by binarizing the input image to generate a binary image having a lower resolution than the input binary image. An image thinning processing device, comprising:
For each pixel forming the value image, a pixel number determination unit that determines the magnitude relationship of the pixel types from the pixel data of the target pixel and the pixel data of the pixels before and after it, and the pixel number of the target pixel from the determination result by the pixel number determination unit And a binary image generating means for correcting the pixel data to generate a binary image.
【0013】請求項5にかかる発明は、請求項1〜4の
いずれかに記載された2値画像の間引き処理装置をイメ
ージスキャナに実施したものである。According to a fifth aspect of the present invention, the binary image thinning processing device according to any one of the first to fourth aspects is applied to an image scanner.
【0014】[0014]
【作用】2値画像上に設定された処理対象領域内の白黒
各画素の個数の大小関係と画素指定情報とから処理対象
領域内を代表する画素の種類を決定する。また請求項1
または請求項2の発明では、決定された画素の種類と処
理対象領域内の各画素データとからつぎの画素指定情報
を決定し、請求項3の発明では、決定された画素の種類
と処理対象領域内の各画素データと処理済の画素指定情
報とからつぎの画素指定情報を決定するようにしたの
で、文字などの細線を含む2値画像や網点写真の2値画
像を間引き処理する場合に細線の欠落および途切れやモ
アレ縞の発生がおさえられる。The type of pixel representing the inside of the processing target area is determined based on the magnitude relation between the numbers of black and white pixels within the processing target area set on the binary image and the pixel designation information. Claim 1
Alternatively, in the invention of claim 2, the following pixel designation information is determined from the determined pixel type and each pixel data in the processing target region, and in the invention of claim 3, the determined pixel type and processing target are determined. Since the next pixel designation information is determined from each pixel data in the area and the processed pixel designation information, when thinning a binary image including thin lines such as characters or a binary image of a halftone dot photograph. On the other hand, the loss of fine lines and the occurrence of discontinuity and moire fringes are suppressed.
【0015】また請求項2の間引き処理装置では、画像
の走査方向と直交する方向に沿う処理対象領域を画像全
体にわたって順次設定するので、文字などの細線を含む
2値画像や網点写真の2値画像を間引き処理する場合に
縦方向の細線の欠落および途切れや縦方向のモアレ縞の
発生が防止される。Further, in the thinning processing apparatus according to the second aspect, since the processing target area along the direction orthogonal to the scanning direction of the image is sequentially set over the entire image, a binary image including a thin line such as a character or a halftone photograph can be displayed. When the value image is thinned out, it is possible to prevent the thin lines in the vertical direction from being lost and discontinuous and the moire fringes in the vertical direction from being generated.
【0016】請求項4の間引き処理装置では、間引き処
理後の2値画像を構成する各画素につき対象画素の画素
データとその前後の画素の画素データより画素の種類の
大小関係を判定し、その判定結果から対象画素の画素デ
ータを補正して2値画像を生成するので、横方向の細線
の欠落および途切れや横方向のモアレ縞の発生が防止さ
れる。According to a fourth aspect of the present invention, in the thinning-out processing apparatus, for each pixel constituting the binary image after the thinning-out process, the size relation of the kind of the pixel is judged from the pixel data of the target pixel and the pixel data of the pixels before and after it, and Since the binary data is generated by correcting the pixel data of the target pixel based on the determination result, it is possible to prevent the horizontal fine lines from being missing and discontinuous and the horizontal moire fringes from being generated.
【0017】請求項5の発明では、請求項1〜4の間引
き処理装置をイメージスキャナに実施したので、細線の
欠落および途切れやモアレ縞の発生が少ない圧縮画像が
得られる。According to the fifth aspect of the present invention, since the thinning processing apparatus according to the first to fourth aspects is implemented in the image scanner, it is possible to obtain a compressed image in which fine lines are not missing, discontinuity, and moire fringes are small.
【0018】[0018]
【実施例】図1は、この発明が実施されたイメージスキ
ャナ10の回路構成例を示す。図示例のイメージスキャ
ナ10は画像入力部11,2値化処理部12,2値画像
メモリ13,間引き処理部14,設定入力部15,処理
対象領域確認部16を含んでおり、前記間引き処理部1
4の出力がRS−232Cなどの通信手段17を介して
表示装置18に接続されている。1 shows an example of the circuit configuration of an image scanner 10 in which the present invention is implemented. The image scanner 10 of the illustrated example includes an image input unit 11, a binarization processing unit 12, a binary image memory 13, a thinning processing unit 14, a setting input unit 15, and a processing target area confirmation unit 16, and the thinning processing unit. 1
The output of No. 4 is connected to the display device 18 via the communication means 17 such as RS-232C.
【0019】前記画像入力部11は撮像素子としてCC
Dが用いられたCCDセンサなどであって、対象物の濃
淡情報を取り込んでアナログ量の濃淡画像信号を生成す
る。2値化処理部12は画像入力部11より濃淡画像信
号を入力し、このアナログ量の濃淡画像信号を例えば8
ビットのディジタル信号に変換した後、このディジタル
信号を所定の2値化しきい値で2値化処理して2値画像
を生成する。この2値画像を構成する画素は白画素を表
す「1」の画素データと、黒画素を表す「0」の画素デ
ータより成るもので、この2値画像は画素単位で2値画
像メモリ13に格納される。The image input unit 11 uses CC as an image pickup device.
D is a CCD sensor or the like, which captures the grayscale information of the object and generates a grayscale image signal of an analog amount. The binarization processing unit 12 inputs the grayscale image signal from the image input unit 11, and outputs the grayscale image signal of this analog amount to, for example, 8
After being converted into a bit digital signal, the digital signal is binarized by a predetermined binarization threshold value to generate a binary image. Pixels forming this binary image are composed of pixel data of "1" which represents a white pixel and pixel data of "0" which represents a black pixel. The binary image is stored in the binary image memory 13 in pixel units. Is stored.
【0020】前記設定入力部15は間引き割合に応じた
処理対象領域を2値画像上に設定するのに必要な情報を
入力するためのもので、この設定入力部15は処理対象
領域確認部16とともに処理対象領域設定部19を構成
する。前記処理対象領域確認部16は2値画像メモリ1
3より読み出された2値画像上の所定の位置に処理対象
領域を画像全体にわたり順次設定するためのもので、前
記2値画像メモリ13より読み出された2値画像の各画
素データが処理対象領域内に含まれる画素の画素データ
であるか否かを確認して出力する。The setting input section 15 is for inputting information necessary for setting the processing target area according to the thinning ratio on the binary image. The setting input section 15 is the processing target area confirming section 16 Together with this, the processing target area setting unit 19 is configured. The processing target area confirmation unit 16 is a binary image memory 1
3 for sequentially setting the processing target area at a predetermined position on the binary image read out from the whole image, and processing each pixel data of the binary image read out from the binary image memory 13 It is confirmed whether or not the pixel data is the pixel data of the pixels included in the target area, and the data is output.
【0021】前記間引き処理部14は、前記処理対象領
域確認部16より2値画像の各画素データを入力して間
引き処理を行い、入力した2値画像より低解像度の2値
画像を生成する。この間引き処理後の2値画像は通信手
段17を介して表示装置18へ伝送される。表示装置1
8はマイクロコンピュータのディスプレイやプリンタで
あって、間引き処理後の2値画像を表示または印字す
る。The thinning processing section 14 inputs each pixel data of the binary image from the processing target area confirming section 16 and performs thinning processing to generate a binary image having a lower resolution than the input binary image. The binary image after the thinning process is transmitted to the display device 18 via the communication unit 17. Display device 1
Reference numeral 8 denotes a display or printer of a microcomputer, which displays or prints a binary image after the thinning process.
【0022】図2〜図4は、前記間引き処理部14によ
る間引き処理の原理を示す。これらの図において、21
は間引き処理前の2値画像であり、22は間引き処理後
の低解像度の2値画像であって、矩形状の各枡目はそれ
ぞれ2値画像21,22を構成する画素23,24を示
す。2 to 4 show the principle of the thinning processing by the thinning processing unit 14. In these figures, 21
Is a binary image before thinning processing, 22 is a low-resolution binary image after thinning processing, and each rectangular mesh represents pixels 23 and 24 that form binary images 21 and 22, respectively. ..
【0023】例えば400dpiの2値画像21を10
0dpiの2値画像22に間引き処理する場合は、図2
に示すように、2値画像21の(4×n)(ただしn=
0,1,2,……)に相当する行について、4画素分の
大きさであって画像の走査方向に沿う横長の処理対象領
域25を画像全体にわたって第1画素目から4画素おき
に順次設定し、設定位置毎に処理対象領域25内の2値
画像を代表する画素の種類、すなわち白画素であるのか
黒画素であるのかを決定し、白画素であれば「1」の画
素データを、黒画素であれば「0」の画素データを、破
線で囲む画像領域26(縦4画素×横4画素)内の2値
画像の間引きデータとして、これを間引き処理後の2値
画像22の1画素分の画素データに設定する。For example, the binary image 21 of 400 dpi is converted into 10
When thinning processing is performed on the binary image 22 of 0 dpi,
(4 × n) of the binary image 21 (where n =
0, 1, 2, ...), and a horizontally long processing target area 25 having a size of 4 pixels and extending in the scanning direction of the image is sequentially arranged every 4 pixels from the first pixel over the entire image. The pixel type representing the binary image in the processing target area 25 is determined for each set position, that is, whether the pixel is a white pixel or a black pixel, and if it is a white pixel, pixel data of "1" is set. If it is a black pixel, the pixel data of “0” is used as thinned-out data of the binary image in the image area 26 (4 vertical pixels × 4 horizontal pixels) surrounded by the broken line, and this is used as the thinned-out binary image 22 of the binary image 22. Set to pixel data for one pixel.
【0024】また400dpiの2値画像21を200
dpiの2値画像22に間引き処理する場合は、図3に
示すように、2値画像21の(2×n)に相当する行に
ついて、2画素分の大きさであって画像の走査方向に沿
う横長の処理対象領域25を画像全体にわたって第1画
素目から2画素おきに順次設定し、設定位置毎に処理対
象領域25内の2値画像を代表する画素の種類を決定
し、白画素であれば「1」の画素データを、黒画素であ
れば「0」の画素データを、破線で囲む画像領域26
(縦2画素×横2画素)内の2値画像の間引きデータと
して、これを間引き処理後の2値画像22の1画素分の
画素データに設定する。In addition, the binary image 21 of 400 dpi is set to 200
When performing the thinning processing on the binary image 22 of dpi, as shown in FIG. 3, the row corresponding to (2 × n) of the binary image 21 has a size of two pixels and is in the scanning direction of the image. Along the entire image, the horizontally long processing target area 25 is sequentially set every two pixels from the first pixel, and the type of pixel representing the binary image in the processing target area 25 is determined for each set position. If there is a pixel data of “1” if there is a black pixel, pixel data of “0” if it is a black pixel, the image area 26 surrounded by a broken line
As the thinned-out data of the binary image in (vertical 2 pixels × horizontal 2 pixels), this is set as the pixel data for one pixel of the binary image 22 after the thinning processing.
【0025】さらに400dpiの2値画像21を30
0dpiの2値画像22に間引き処理する場合は、図4
に示すように、2値画像21の(2×n),(2×n+
1),(2×n+2)に相当する行について、2画素分
の大きさであって画像の走査方向に沿う横長の処理対象
領域25を画像全体にわたって第3画素目から4画素お
きに順次設定し、(2×n)列目および(2×n+1)
列目の各画素についてはそのまま2値画像21の画素デ
ータを抽出し、(2×n+2)列目および(2×n+
3)列目の各画素については処理対象領域25内の2値
画像を代表する画素の種類を決定し、それらを破線で示
す画像領域26(縦4画素×横4画素)内の2値画像の
間引きデータとして、間引き処理後の2値画像22の縦
3画素×横3画素分の画素データに設定する。Furthermore, the binary image 21 of 400 dpi is set to 30.
When performing the thinning-out process on the binary image 22 of 0 dpi,
, The binary image 21 has (2 × n), (2 × n +
1), for a row corresponding to (2 × n + 2), a horizontally long processing target area 25 having a size of 2 pixels and extending in the scanning direction of the image is sequentially set every 4 pixels from the 3rd pixel over the entire image. , (2 × n) th column and (2 × n + 1)
For each pixel in the column, the pixel data of the binary image 21 is extracted as it is, and the (2 × n + 2) -th column and the (2 × n +)-th column are extracted.
3) For each pixel in the column, the type of pixel that represents the binary image in the processing target area 25 is determined, and the binary image in the image area 26 (4 vertical pixels x 4 horizontal pixels) is shown by a broken line. The thinning data is set to pixel data of vertical 3 pixels × horizontal 3 pixels of the binary image 22 after the thinning processing.
【0026】図5および図6は、第1実施例にかかる前
記処理対象領域確認部16および間引き処理部14によ
る処理の手順をステップ1(図中「ST1」で示す)〜
ステップ20で示す。まずステップ1の初期設定では画
素指定情報としての申送りフラグFを「無効」(F=−
1)に設定し、白画素の計数値NW と黒画素の計数値N
B とをゼロにクリアする。FIG. 5 and FIG. 6 show the procedure of the processing by the processing target area confirmation unit 16 and the thinning processing unit 14 according to the first embodiment from step 1 (indicated by “ST1” in the drawings) to
This is shown in step 20. First, in the initial setting of step 1, the sending flag F as the pixel designation information is "invalid" (F =-
1), the count value N W of white pixels and the count value N of black pixels N
Clear B and zero to zero.
【0027】つぎのステップ2では水平同期クロックに
より処理対象領域の設定行か否かを、続くステップ3で
は画素クロックにより処理対象領域内の画素データか否
かを、それぞれ判定しており、いずれの判定も「YE
S」のとき、入力された画素データが白画素であれば白
画素の計数値NW を、黒画素であれば黒画素の計数値N
B を、それぞれインクリメントする(ステップ4)。な
おステップ2が「NO」であればステップ19へ、ステ
ップ3が「NO」であればステップ18へ、それぞれ進
む。In the next step 2, it is judged whether or not the processing target area is set by the horizontal synchronizing clock, and in the subsequent step 3, it is judged by the pixel clock whether or not the pixel data is within the processing target area. "YE
S ”, if the input pixel data is a white pixel, the count value N W of the white pixel is calculated. If the input pixel data is a black pixel, the count value N W of the black pixel is calculated.
B is incremented respectively (step 4). If step 2 is "NO", the process proceeds to step 19, and if step 3 is "NO", the process proceeds to step 18.
【0028】つぎのステップ5では処理対象領域内の全
ての画素についての計数処理が完了したか否かを判定し
ており、その判定が「NO」であれば、つぎに入力され
た画素データについての計数処理を行い(ステップ
4)、「YES」であれば、つぎのステップ6で白画素
の計数値NW と黒画素の計数値NB とが一致するか否か
を、続くステップ7で白画素の計数値NW が黒画素の計
数値NB より大きいか否かを、それぞれ判定する。In the next step 5, it is judged whether or not the counting process has been completed for all the pixels in the processing target area. If the judgment is "NO", the pixel data inputted next is judged. Is performed (step 4), and if “YES”, it is determined in the next step 6 whether or not the count value N W of white pixels and the count value N B of black pixels match. It is determined whether or not the count value N W of white pixels is larger than the count value N B of black pixels.
【0029】もし計数値NW ,NB が一致していれば、
ステップ6の判定が「YES」となってステップ8へ進
み、前回の処理対象領域の設定位置で決定された申送り
フラグFが「1」であるか否かを判定する。もし申送り
フラグFが「1」にセットされていれば、ステップ8の
判定が「YES」となり、処理対象領域内の2値画像を
代表する画素データとして白画素を表す画素データ
「1」を設定する(ステップ9)。If the count values N W and N B match,
When the determination in step 6 is "YES", the process proceeds to step 8, and it is determined whether or not the application flag F determined at the previous setting position of the processing target area is "1". If the submission flag F is set to "1", the determination in step 8 is "YES", and the pixel data "1" representing a white pixel is set as the pixel data representing the binary image in the processing target area. Set (step 9).
【0030】もし申送りフラグFが「0」にセットされ
ていれば、ステップ8の判定が「NO」となってステッ
プ10へ進み、処理対象領域内の2値画像を代表する画
素データとして黒画素を表す画素データ「0」を設定す
る。If the submission flag F is set to "0", the determination at step 8 becomes "NO" and the process proceeds to step 10 where black is used as pixel data representing the binary image in the processing target area. Pixel data "0" representing a pixel is set.
【0031】前記ステップ6において、白画素の計数値
NW と黒画素の計数値NB とが不一致と判定され、しか
もステップ7で白画素の計数値NW が黒画素の計数値N
B より大きいと判定されたときは、ステップ7からステ
ップ9へ進み、処理対象領域内の2値画像を代表する画
素データとして白画素を表す画素データ「1」を設定す
る。もしステップ7で白画素の計数値NW が黒画素の計
数値NB より小さいと判定されたときは、ステップ7か
らステップ10へ進み、処理対象領域内の2値画像を代
表する画素データとして黒画素を表す画素データ「0」
を設定する。[0031] In step 6, the count value N B count value N W and black pixels of a white pixel is determined to mismatch, yet the count value of the white pixel in Step 7 N W count of black pixels N
If it is determined that the value is larger than B , the process proceeds from step 7 to step 9, and pixel data "1" representing a white pixel is set as pixel data representing the binary image in the processing target area. If it is determined in step 7 that the count value N W of the white pixels is smaller than the count value N B of the black pixels, the process proceeds from step 7 to step 10 and sets the binary image in the processing target area as pixel data representing the binary image. Pixel data "0" representing a black pixel
To set.
【0032】つぎの図6に示すステップ11では、設定
された画素データが黒画素を表す画素データ「0」であ
るか否かを判定しており、その判定が「YES」であれ
ば、つぎにステップ12で処理対象領域内に白画素が存
在していたか否かを計数値NW の値により判定する。も
しステップ12の「NW =0」の判定が「NO」であれ
ば、ステップ13へ進んで申送りフラグFとして「1」
をセットする。もしステップ12の判定が「YES」で
あれば、ステップ16へ進んで申送りフラグFを「−
1」に設定する。In step 11 shown in FIG. 6, it is judged whether or not the set pixel data is pixel data "0" representing a black pixel. If the judgment is "YES", then In step 12, it is determined whether or not white pixels exist in the processing target area based on the count value N W. If the determination of “N W = 0” in step 12 is “NO”, the process proceeds to step 13 and the flag F is “1”.
Set. If the determination in step 12 is "YES", the process proceeds to step 16 and the submission flag F is set to "-.
Set to 1 ”.
【0033】前記ステップ11において、設定された画
素データが白画素を表す画素データ「1」であると判定
されたときは、ステップ11からステップ14へ進み、
処理対象領域内に黒画素が存在していたか否かを計数値
NB の値により判定する。もしステップ14の「NB =
0」の判定が「NO」であれば、ステップ15へ進んで
申送りフラグFとして「0」をセットし、もしステップ
14の判定が「YES」であれば、ステップ16へ進ん
で申送りフラグFとして「−1」をセットする。When it is determined in step 11 that the set pixel data is the pixel data "1" representing the white pixel, the process proceeds from step 11 to step 14,
Whether the black pixel exists in the processing target area is determined by the value of the count value N B. If step 14 "N B =
If the determination of "0" is "NO", the process proceeds to step 15 and "0" is set as the delivery flag F. If the determination of step 14 is "YES", the process proceeds to step 16 and the delivery flag. Set "-1" as F.
【0034】つぎにステップ17で計数値TW ,TB を
クリアした後、つぎのステップ18で2値画像の1行分
についての処理が完了したか否かを判定する。この判定
が「NO」であれば、ステップ3へ戻って同様の手順が
実行され、その判定が「YES」であれば、つぎのステ
ップ19で申送りフラグFを「−1」に再設定した後、
つぎのステップ20で全ての行についての処理が完了し
たか否かを判定する。もしステップ20の判定が「N
O」であれば、ステップ3へ戻って同様の手順を実行す
る。このような手順を繰り返し実行することにより、全
ての行についての処理が完了すると、ステップ20の判
定が「YES」となり、2値画像の間引き処理を完了す
る。Next, after the count values T W and T B are cleared in step 17, it is determined in step 18 whether or not the processing for one row of the binary image is completed. If this judgment is "NO", the procedure returns to step 3 and the same procedure is executed. If the judgment is "YES", the flag F is reset to "-1" in the next step 19. rear,
In the next step 20, it is determined whether or not the processing has been completed for all the rows. If the determination in step 20 is "N
If “O”, the process returns to step 3 and the same procedure is executed. When the processing for all the rows is completed by repeatedly executing such a procedure, the determination in step 20 becomes “YES”, and the thinning processing of the binary image is completed.
【0035】図7〜図9は、横方向の細線の欠落防止例
を示しており、これらの図には従来例による間引き処理
の処理結果と、上記第1実施例による間引き処理の処理
結果とが併せて示してある。FIGS. 7 to 9 show examples of preventing thin lines in the horizontal direction from being lost. These figures show the processing results of the thinning processing according to the conventional example and the processing results of the thinning processing according to the first embodiment. Are also shown.
【0036】図7は、400dpiの2値画像を100
dpiの2値画像に間引き処理したときの処理結果の比
較例である。同図中、23は間引き処理前の2値画像の
構成画素を、27は従来例による間引き処理後の2値画
像の構成画素を、24はこの第1実施例による間引き処
理後の2値画像の各構成画素を、それぞれ示す。また2
5A〜25F(図中、太線枠で示す)は処理対象領域の
設定位置を示す。なお白丸は白画素を表す画素データ
を、黒丸は黒画素を表す画素データを、それぞれ意味し
ており、黒画素が細線などの画像部分を構成する。FIG. 7 shows a 100 dpi binary image of 400 dpi.
It is a comparative example of the processing result when the thinning processing is performed on the binary image of dpi. In the figure, 23 is a constituent pixel of a binary image before thinning processing, 27 is a constituent pixel of a binary image after thinning processing according to the conventional example, and 24 is a binary image after thinning processing according to the first embodiment. Each of the constituent pixels is shown. Again 2
5A to 25F (indicated by a thick line frame in the figure) indicate the setting position of the processing target area. White circles mean pixel data representing white pixels, and black circles mean pixel data representing black pixels, and the black pixels form an image portion such as a thin line.
【0037】同図において、1番目の処理対象領域の設
定位置25Aでは、2番目と3番目の各画素が黒画素で
ある。これを従来の間引き処理によると、間引き処理後
の画素は白画素となるのに対し、この第1実施例の間引
き処理によると、白画素の計数値NW と黒画素の計数値
NB とが一致し(図5のステップ6が「YES」)、し
かも申送りフラグFは「−1」であるから(ステップ8
が「NO」)、間引き処理後の画素は黒画素となる(ス
テップ10)。この場合に間引き処理後の画素は黒画素
であって(ステップ11が「YES」)、しかも処理対
象領域25A内に白画素が存在するから(ステップ12
が「YES」)、申送りフラグFとして「1」がセット
される(ステップ13)。In the figure, at the setting position 25A of the first processing target area, the second and third pixels are black pixels. According to the conventional thinning processing, the pixels after the thinning processing become white pixels, whereas according to the thinning processing of the first embodiment, the count value N W of white pixels and the count value N B of black pixels are Match (“YES” in step 6 of FIG. 5) and the flag F is “−1” (step 8).
Is “NO”), the pixel after the thinning process becomes a black pixel (step 10). In this case, the pixels after the thinning processing are black pixels (“YES” in step 11), and there are white pixels in the processing target area 25A (step 12).
Is "YES"), and the submission flag F is set to "1" (step 13).
【0038】2番目の処理対象領域の設定位置25Bで
は、2番目の画素のみが黒画素であるが、これを従来の
間引き処理によると、間引き処理後の画素は白画素とな
るのに対し、第1実施例の間引き処理によると、白画素
の計数値NW が黒画素の計数値NB より大きいため(ス
テップ7が「YES」)、間引き処理後の画素は白画素
となる(ステップ9)。この場合に間引き処理後の画素
は白画素であって(ステップ11が「NO」)、しかも
処理対象領域25B内に黒画素が存在するから(ステッ
プ14が「YES」)、申送りフラグFとして「0」が
セットされる(ステップ15)。At the set position 25B of the second processing target area, only the second pixel is a black pixel, but according to the conventional thinning processing, the pixel after the thinning processing becomes a white pixel, whereas According to the thinning-out process of the first embodiment, the count value N W of white pixels is larger than the count value N B of black pixels (“YES” in step 7), so the pixels after the thinning-out process become white pixels (step 9). ). In this case, the pixel after the thinning process is a white pixel (“NO” in step 11) and there is a black pixel in the processing target area 25B (“YES” in step 14). "0" is set (step 15).
【0039】3番目の処理対象領域の設定位置25Cで
は、1番目と2番目の各画素が黒画素であるが、これを
従来の間引き処理によると、間引き処理後の画素は白画
素となるのに対し、第1実施例の間引き処理によると、
白画素の計数値NW と黒画素の計数値NB とが一致し
(ステップ6が「YES」)、しかも申送りフラグFは
「0」であるから(ステップ8が「NO」)、間引き処
理後の画素は黒画素となる(ステップ10)。この場合
に間引き処理後の画素は黒画素であって(ステップ11
が「YES」)、しかも処理対象領域25C内に白画素
が存在するから(ステップ12が「YES」)、申送り
フラグFとして「1」がセットされる(ステップ1
3)。At the set position 25C of the third processing target area, the first and second pixels are black pixels, but according to the conventional thinning processing, the pixels after the thinning processing become white pixels. On the other hand, according to the thinning process of the first embodiment,
Since the count value N W of white pixels and the count value N B of black pixels match (step 6 is “YES”) and the flag F is “0” (step 8 is “NO”), thinning is performed. The processed pixel becomes a black pixel (step 10). In this case, the pixel after the thinning process is a black pixel (step 11
Is "YES"), and since white pixels exist in the processing target area 25C ("YES" in step 12), "1" is set as the report flag F (step 1).
3).
【0040】4番目以降の処理対象領域の設定位置25
D〜25Fについても同様の処理が行われ、その結果、
従来例による間引き処理では、以下の処理結果が白画
素,白画素,白画素となるのに対し、この第1実施例に
よる間引き処理では、白画素,黒画素,白画素となる。Setting position 25 of the fourth and subsequent processing target areas
Similar processing is performed for D to 25F, and as a result,
In the thinning processing according to the conventional example, the following processing results are white pixels, white pixels, and white pixels, whereas in the thinning processing according to the first embodiment, white pixels, black pixels, and white pixels are obtained.
【0041】図8は400dpiの2値画像を200d
piの2値画像に間引きしたときの処理結果の比較例
を、また図9は400dpiの2値画像を300dpi
の2値画像に間引きしたときの処理結果の比較例を、そ
れぞれ示す。いずれの場合も図7と同様であり、ここで
は従来例による間引き処理の処理結果とこの第1実施例
による間引き処理の処理結果とを図示するにとどめ、そ
の詳細な説明は省略する。FIG. 8 shows a binary image of 400 dpi for 200d.
FIG. 9 shows a comparison example of processing results when thinning out a binary image of pi, and FIG. 9 shows a binary image of 400 dpi at 300 dpi.
Comparative examples of the processing results when thinning out the binary image are shown below. In any case, the processing is the same as that in FIG. 7, and here, the processing result of the thinning processing according to the conventional example and the processing result of the thinning processing according to the first embodiment are illustrated, and the detailed description thereof is omitted.
【0042】図10〜図12は、横方向のモアレ縞の発
生防止例を示しており、これらの図には従来例による間
引き処理の処理結果と、この第1実施例による間引き処
理の処理結果とが併せて示してある。FIGS. 10 to 12 show examples of preventing the occurrence of moire fringes in the lateral direction. In these figures, the processing result of the thinning processing according to the conventional example and the processing result of the thinning processing according to the first embodiment are shown. Are also shown together.
【0043】図10は400dpiの2値画像を100
dpiの2値画像に間引きしたときの処理結果の比較例
を、図11は400dpiの2値画像を200dpiの
2値画像に間引きしたときの処理結果の比較例を、また
図12は400dpiの2値画像を300dpiの2値
画像に間引きしたときの処理結果の比較例を、それぞれ
示す。従来例による間引き処理の処理結果では、周期的
に黒画素ないしは黒画素群が現れてモアレ縞が発生して
いるが、この第1実施例による間引き処理結果では、黒
画素ないしは黒画素群の発生に周期性がなく、モアレ縞
は発生していない。なお図10〜図12の各場合につい
ても、図7と同様であり、その説明は省略する。FIG. 10 shows 100 binary images of 400 dpi.
FIG. 11 shows a comparison example of processing results when thinning out a binary image of dpi, FIG. 11 shows a comparison example of processing results when thinning a binary image of 400 dpi into a binary image of 200 dpi, and FIG. Comparative examples of the processing results when the value image is thinned out to a binary image of 300 dpi are shown. In the processing result of the thinning processing according to the conventional example, black pixels or black pixel groups periodically appear and moire fringes are generated. However, in the thinning processing result according to the first embodiment, the generation of black pixels or black pixel groups occurs. There is no periodicity, and moire fringes do not occur. Note that each of the cases of FIGS. 10 to 12 is similar to that of FIG. 7, and the description thereof is omitted.
【0044】図13は、図5および図6の処理手順を実
施するための図2の原理に基づく間引き処理部14の回
路構成例を示す。図示例の間引き処理部14は、白画素
カウンタ30,1/2演算器31,比較器32,申送り
フラグ決定部33,申送りフラグバッファ34,論理回
路35,セレクタ36,出力部37をその構成として含
む。以下に、各構成の機能を具体的に説明するが、この
間引き処理部14の一連の動作については図5および図
6の処理手順に準ずるものであり、その説明を省略す
る。FIG. 13 shows a circuit configuration example of the thinning processing section 14 based on the principle of FIG. 2 for carrying out the processing procedure of FIGS. 5 and 6. The thinning processing unit 14 in the illustrated example includes a white pixel counter 30, a 1/2 arithmetic unit 31, a comparator 32, a request flag determination unit 33, a request flag buffer 34, a logic circuit 35, a selector 36, and an output unit 37. Including as a configuration. The functions of the respective components will be specifically described below, but the series of operations of the thinning processing unit 14 conforms to the processing procedure of FIGS. 5 and 6, and the description thereof will be omitted.
【0045】白画素カウンタ30は処理対象領域確認部
16より処理対象領域内に含まれる各画素の画素データ
を入力して処理対象領域内の白画素数を計数する。The white pixel counter 30 inputs the pixel data of each pixel included in the processing target area from the processing target area confirmation unit 16 and counts the number of white pixels in the processing target area.
【0046】前記処理対象領域確認部16には水平同期
クロックおよび画素クロックと、対象領域内の画素数
(この例では4画素)とが与えられ、水平同期クロック
の計数値により2値画像メモリ13より入力された画素
データが処理対象領域の設定行に位置する画素の画素デ
ータであるか否かを判断し、また画素クロックの計数値
により処理対象領域内の画素の画素データであるか否か
を判断する。The processing target area confirmation unit 16 is provided with a horizontal synchronizing clock and a pixel clock, and the number of pixels in the target area (4 pixels in this example), and the binary image memory 13 is obtained by the count value of the horizontal synchronizing clock. It is determined whether the input pixel data is the pixel data of the pixel located in the set row of the processing target area, and whether it is the pixel data of the pixel in the processing target area based on the count value of the pixel clock. To judge.
【0047】前記白画素カウンタ30には画素クロック
と処理対象領域内の画素数とが与えられ、その画素数
(この例では4画素)に相当する数の画素クロックを入
力したとき、計数値TW が出力されると共にリセットさ
れる。A pixel clock and the number of pixels in the processing target area are given to the white pixel counter 30, and when the number of pixel clocks corresponding to the number of pixels (4 pixels in this example) is input, the count value T W is output and reset.
【0048】1/2演算器31は処理対象領域内の画素
数を2で割って基準値S(この例ではS=2)を算出す
る。比較器32は白画素カウンタ30の計数値NW と前
記基準値Sとの大小を比較し、NW >S(この例ではN
W =3または4のとき)であれば第1出力Out1が、
NW =S(この例ではNW =2のとき)であれば第2出
力Out2が、NW <S(この例ではNW =1または0
のとき)であれば第3出力Out3が、それぞれ「1」
となる。The 1/2 calculator 31 divides the number of pixels in the processing target area by 2 to calculate the reference value S (S = 2 in this example). The comparator 32 compares the count value N W of the white pixel counter 30 and the reference value S with each other, and N W > S (N in this example is N
If W = 3 or 4), the first output Out1 is
If N W = S (when N W = 2 in this example), the second output Out2 is N W <S (N W = 1 or 0 in this example).
In case of), the third output Out3 is "1".
Becomes
【0049】申送りフラグ決定部33は、白画素カウン
タ30の計数値NW と出力部37の間引き出力OUTと
を入力して申送りフラグFを「1」「0」「−1」のい
ずれかに決定する。すなわち間引き出力OUTの画素デ
ータが黒画素を表す画素データ「0」でありかつ計数値
NW がNW ≧1であるときは申送りフラグFを「1」に
決定する。また間引き出力OUTの画素データが白画素
を表す画素データ「1」でありかつ計数値NW がNW ≦
3であるときは申送りフラグFを「0」に決定する。さ
らに間引き出力OUTの画素データが黒画素を表す画素
データ「0」でありかつ計数値NW がNW =0である
か、または間引き出力OUTの画素データが白画素を表
す画素データ「1」でありかつ計数値NW がNW =4で
あるときは申送りフラグFを「−1」に決定する。The request flag determination unit 33 inputs the count value N W of the white pixel counter 30 and the thinned output OUT of the output unit 37, and sets the request flag F to "1""0""-1". Decide That is, when the pixel data of the thinned-out output OUT is pixel data “0” representing a black pixel and the count value N W is N W ≧ 1, the flag F is set to “1”. Further, the pixel data of the thinned-out output OUT is pixel data “1” representing a white pixel, and the count value N W is N W ≦
When it is 3, the flag F is set to "0". Further, the pixel data of the thinned-out output OUT is pixel data “0” representing a black pixel and the count value N W is N W = 0, or the pixel data of the thinned-out output OUT is pixel data “1” representing a white pixel. And the count value N W is N W = 4, the submission flag F is determined to be “−1”.
【0050】申送りフラグバッファ34は、前記申送り
フラグ決定部33により決定された申送りフラグFを一
時記憶するためのもので、その記憶動作が行われたと
き、申送りフラグ決定部33の内容がリセットされる。The delivery flag buffer 34 is for temporarily storing the delivery flag F determined by the delivery flag determination unit 33. When the storage operation is performed, the delivery flag determination unit 33 stores the delivery flag F. Contents are reset.
【0051】論理回路35は、前記申送りフラグバッフ
ァ34に記憶された申送りフラグFが「1」のときは
「1」の論理出力F′を、「0」または「−1」のとき
は「0」の論理出力F′を、それぞれセレクタ36へ出
力する。セレクタ36は、前記比較器32より第2出力
Out2がクロックとして与えられると、前記論理回路
35からの論理出力F′を出力部37へ出力する。The logic circuit 35 outputs a logical output F'of "1" when the delivery flag F stored in the delivery flag buffer 34 is "1", and when it is "0" or "-1". The logical output F ′ of “0” is output to each selector 36. When the second output Out2 is given as a clock from the comparator 32, the selector 36 outputs the logic output F ′ from the logic circuit 35 to the output section 37.
【0052】前記出力部37には前記比較器32より第
1〜第3の各出力Out1〜Out3が、セレクタ36
より論理出力F′が、それぞれ与えられ、第1出力Ou
t1または第3出力Out3が「1」のときは間引き出
力Outとして「1」を、第2出力Out2が「1」の
ときは間引き出力Outとして論理出力F′の値を、そ
れぞれ出力する。The output section 37 receives the first to third outputs Out1 to Out3 from the comparator 32 and the selector 36.
Logic output F'is given respectively, and the first output Ou
When t1 or the third output Out3 is "1", "1" is output as the thinned output Out, and when the second output Out2 is "1", the value of the logical output F'is output as the thinned output Out.
【0053】なお図3および図4の原理に基づく間引き
処理部14についても同様の回路構成のものが用いられ
るが、図4の原理に基づく間引き処理部14について
は、2値画像の(2×n)列目および(2×n+1)列
目の各画素の画素データを処理対象領域確認部16より
出力部37へ送出する回路構成が必要となる。Note that the thinning processing unit 14 based on the principle of FIGS. 3 and 4 has the same circuit configuration, but the thinning processing unit 14 based on the principle of FIG. It is necessary to have a circuit configuration in which the pixel data of each pixel in the (n) th column and the (2 × n + 1) th column is sent from the processing target region confirmation section 16 to the output section 37.
【0054】図14〜図16は、この発明の第2実施例
にかかるイメージスキャナの間引き処理の原理を示す。
この第2実施例は、縦方向の細線の欠落および途切れと
縦方向のモアレ縞の発生とを防止するためのもので、全
体の回路構成は図1に示す第1実施例と同様であり、図
示を省略する。14 to 16 show the principle of the thinning process of the image scanner according to the second embodiment of the present invention.
The second embodiment is intended to prevent the vertical fine lines from being missing and discontinuous and the vertical moire fringes to occur, and the overall circuit configuration is the same as that of the first embodiment shown in FIG. Illustration is omitted.
【0055】これらの図において、21は間引き処理前
の2値画像であり、22は間引き処理後の低解像度の2
値画像であって、矩形状の各枡目はそれぞれ2値画像2
1,22を構成する画素23,24を示す。In these figures, 21 is a binary image before thinning processing, and 22 is a low-resolution binary image after thinning processing.
Each of the rectangular cells is a binary image 2
Pixels 23 and 24 forming 1 and 22 are shown.
【0056】例えば400dpiの2値画像21を10
0dpiの2値画像22に間引き処理する場合は、図1
4に示すように、2値画像21の(4×n)(ただしn
=0,1,2,……)に相当する列について、4画素分
の大きさであって画像の走査方向と直交する方向に沿う
縦長の処理対象領域25を画像全体にわたって順次設定
し、設定位置毎に処理対象領域25内の2値画像を代表
する画素の種類、すなわち白画素であるのか黒画素であ
るのかを決定し、白画素であれば「1」の画素データ
を、黒画素であれば「0」の画素データを、破線で囲む
画像領域26(縦4画素×横4画素)内の2値画像の間
引きデータとして、これを間引き処理後の2値画像22
の1画素分の画素データに設定する。For example, the binary image 21 of 400 dpi is converted into 10
When performing the thinning processing on the binary image 22 of 0 dpi,
As shown in FIG. 4, (4 × n) of the binary image 21 (where n
= 0, 1, 2, ...), a vertically long processing target area 25 having a size of 4 pixels and extending in a direction orthogonal to the scanning direction of the image is sequentially set over the entire image and set. For each position, the type of pixel that represents the binary image in the processing target area 25, that is, whether it is a white pixel or a black pixel, is determined, and if it is a white pixel, the pixel data of "1" is changed to a black pixel. If so, the pixel data of “0” is used as thinned-out data of the binary image in the image area 26 (4 vertical pixels × 4 horizontal pixels) enclosed by the broken line, and this is used as the binary image 22 after the thinning processing.
Is set to the pixel data for one pixel.
【0057】また400dpiの2値画像21を200
dpiの2値画像22に間引き処理する場合は、図15
に示すように、2値画像21の(2×n)に相当する列
について、2画素分の大きさであって画像の走査方向と
直交する方向に沿う縦長の処理対象領域25を画像全体
にわたって順次設定し、設定位置毎に処理対象領域25
内の2値画像を代表する画素の種類を決定し、白画素で
あれば「1」の画素データを、黒画素であれば「0」の
画素データを、破線で囲む画像領域26(縦2画素×横
2画素)内の2値画像の間引きデータとして、これを間
引き処理後の2値画像22の1画素分の画素データに設
定する。In addition, the binary image 21 of 400 dpi is set to 200
In the case of performing the thinning processing on the binary image 22 of dpi, FIG.
As shown in FIG. 5, for a column corresponding to (2 × n) of the binary image 21, a vertically long processing target area 25 having a size of 2 pixels and extending in a direction orthogonal to the scanning direction of the image is provided over the entire image. The regions to be processed 25 are sequentially set, and the processing target area 25
The type of pixel that represents the binary image in the inside is determined. If the pixel is a white pixel, the pixel data of “1”, and if the pixel is a black pixel, the pixel data of “0” is surrounded by a broken line. Pixel data for one pixel of the binary image 22 after the thinning process is set as thinned data of the binary image in (pixel × horizontal two pixels).
【0058】さらに400dpiの2値画像21を30
0dpiの2値画像22に間引き処理する場合は、図1
6に示すように、2値画像21の(2×n),(2×n
+1),(2×n+2)に相当する列について、2画素
分の大きさであって画像の走査方向と直交する方向に沿
う縦長の処理対象領域を設定し、(2×n)行目および
(2×n+1)行目の各画素についてはそのまま2値画
像21の画素データを抽出し、(2×n+2)行目およ
び(2×n+3)行目の各画素については処理対象領域
25内の2値画像を代表する画素の種類を決定し、それ
らを破線で示す画像領域26(縦4画素×横4画素)内
の2値画像の間引きデータとして、間引き処理後の2値
画像22の縦3画素×横3画素分の画素データに設定す
る。Furthermore, the binary image 21 of 400 dpi is set to 30.
When performing the thinning processing on the binary image 22 of 0 dpi,
As shown in FIG. 6, (2 × n) and (2 × n) of the binary image 21.
For columns corresponding to (+1) and (2 × n + 2), a vertically long processing target area having a size of 2 pixels and extending in the direction orthogonal to the scanning direction of the image is set, and the (2 × n) th row and For each pixel in the (2 × n + 1) th row, the pixel data of the binary image 21 is extracted as it is, and for each pixel in the (2 × n + 2) th row and the (2 × n + 3) th row, in the processing target area 25. The types of pixels that represent the binary image are determined, and as the thinned-out data of the binary image in the image area 26 (4 pixels in the vertical direction × 4 pixels in the horizontal direction) indicated by a broken line, the vertical direction of the binary image 22 after the thinning process The pixel data for 3 pixels × 3 pixels in the horizontal direction is set.
【0059】図17〜図19は、この第2実施例におけ
る処理対象領域確認部16および間引き処理部14によ
る処理の手順をステップ1〜ステップ22で示す。まず
ステップ1の初期設定では申送りフラグFを「−1」に
設定し、白画素の計数値NW と黒画素の計数値NB とを
ゼロにクリアする。17 to 19 show steps 1 to 22 of the processing procedure by the processing target area confirmation unit 16 and the thinning processing unit 14 in the second embodiment. First, in the initial setting of step 1, the flag F is set to "-1" and the count value N W of white pixels and the count value N B of black pixels are cleared to zero.
【0060】つぎのステップ2では画素クロックにより
処理対象領域の設定列か否かを、続くステップ3では水
平同期クロックにより処理対象領域内の画素データか否
かを、それぞれ判定しており、いずれの判定も「YE
S」のとき、入力された画素データが白画素を表す画素
データ「1」であるか否かを判定する。もしその判定が
「YES」であれば、白画素の計数値NW を、黒画素で
あれば黒画素の計数値NB を、それぞれインクリメント
して、その計数値を所定のメモリの対応する列に相当す
る記憶領域に記憶させる(ステップ5,6)。なおステ
ップ2が「NO」であればステップ22へ、ステップ3
が「NO」であればステップ21へ、それぞれ進む。In the next step 2, it is judged whether or not it is the set column of the processing target area by the pixel clock, and in the following step 3, it is judged by the horizontal synchronization clock whether or not it is the pixel data in the processing target area. The judgment is also "YE
When "S", it is determined whether the input pixel data is pixel data "1" representing a white pixel. If the determination is “YES”, the count value N W of white pixels is incremented, and if it is a black pixel, the count value N B of black pixels is incremented, and the count value is assigned to the corresponding column of the predetermined memory. It is stored in the storage area corresponding to (steps 5 and 6). If step 2 is “NO”, go to step 22 and step 3
If is “NO”, the process proceeds to step 21.
【0061】つぎのステップ7では、入力された画素デ
ータが処理対象領域内の最後尾の画素についてのもので
あるか否かを判定しており、その判定が「NO」であれ
ば、つぎに画素についての処理へ移行し、ステップ7の
判定が「YES」であれば、ステップ8で該当する列の
記憶領域に記憶されている白画素の計数値NW と黒画素
の計数値NB とが一致するか否かを、続くステップ9で
白画素の計数値NW が黒画素の計数値NB より大きいか
否かを、それぞれ判定する。In the next step 7, it is judged whether or not the input pixel data is for the last pixel in the processing target area. If the judgment is "NO", then If the determination in step 7 is “YES”, the process proceeds to the pixel processing, and the count value N W of white pixels and the count value N B of black pixels stored in the storage area of the corresponding column in step 8 And whether the white pixel count value N W is greater than the black pixel count value N B is determined in subsequent step 9.
【0062】もし計数値NW ,NB が一致していれば、
ステップ8の判定が「YES」となってステップ10へ
進み、同じ列における前回の処理対象領域の設定位置で
決定された申送りフラグFが「1」であるか否かを判定
する。この申送りフラグFも処理対象領域の設定列毎に
所定のメモリに記憶されており、もし申送りフラグFが
「1」にセットされていれば、ステップ10の判定が
「YES」となり、処理対象領域内の2値画像を代表す
る画素データとして白画素を表す画素データ「1」を設
定する(ステップ11)。If the count values N W and N B match,
When the determination in step 8 is "YES", the process proceeds to step 10, and it is determined whether or not the delivery flag F determined at the previous setting position of the processing target area in the same column is "1". The request flag F is also stored in a predetermined memory for each set column of the processing target area. If the request flag F is set to "1", the determination in step 10 is "YES", and the process Pixel data "1" representing a white pixel is set as pixel data representing a binary image in the target area (step 11).
【0063】もし申送りフラグFが「0」にセットされ
ていれば、ステップ10の判定が「NO」となってステ
ップ12へ進み、処理対象領域内の2値画像を代表する
画素データとして黒画素を表す画素データ「0」を設定
する。If the sending flag F is set to "0", the determination in step 10 becomes "NO" and the process proceeds to step 12, where black is used as pixel data representing the binary image in the processing target area. Pixel data "0" representing a pixel is set.
【0064】前記ステップ8において、白画素の計数値
NW と黒画素の計数値NB とが不一致と判定され、しか
もステップ9で白画素の計数値NW が黒画素の計数値N
B より大きいと判定されたときは、ステップ11へ進ん
で処理対象領域内の2値画像を代表する画素データとし
て白画素を表す画素データ「1」を設定する。もしステ
ップ9で白画素の計数値NW が黒画素の計数値NB より
小さいと判定されたときは、ステップ12へ進んで処理
対象領域内の2値画像を代表する画素データとして黒画
素を表す画素データ「0」を設定する。[0064] In step 8, the count value N B count value N W and black pixels of a white pixel is determined to mismatch, yet the count value of the white pixel in Step 9 N W count of black pixels N
If it is determined that it is larger than B , the process proceeds to step 11 and pixel data "1" representing a white pixel is set as pixel data representing the binary image in the processing target area. If it is determined in step 9 that the count value N W of white pixels is smaller than the count value N B of black pixels, the process proceeds to step 12 and black pixels are selected as pixel data representing the binary image in the processing target area. The pixel data “0” to be represented is set.
【0065】つぎのステップ13では、処理対象領域の
設定位置が列の最終位置か否かを判定しており、その判
定が「YES」であれば、ステップ19へ進み、申送り
フラグFとして「−1」を設定する。In the next step 13, it is judged whether or not the set position of the processing target area is the final position of the row. If the judgment is "YES", the process proceeds to step 19 and the flag F is set to " -1 "is set.
【0066】もしステップ13の判定が「NO」であれ
ば、ステップ14へ進み、設定された画素データが黒画
素を表す画素データ「0」であるか否かを判定する。も
しその判定が「YES」であれば、つぎにステップ15
で処理対象領域内に白画素が存在していたか否かを計数
値NW の値により判定する。もしステップ15の「NW
=0」の判定が「NO」であれば、ステップ16へ進ん
で申送りフラグFとして「1」をセットする。もしステ
ップ12の判定が「YES」であれば、ステップ19へ
進んで申送りフラグFとして「−1」をセットする。If the determination in step 13 is "NO", the process proceeds to step 14 and it is determined whether the set pixel data is pixel data "0" representing a black pixel. If the determination is "YES", then step 15
Then, it is determined by the value of the count value N W whether or not a white pixel exists in the processing target area. If step 15 “N W
If the determination of "= 0" is "NO", the process proceeds to step 16 and "1" is set as the submission flag F. If the determination in step 12 is "YES", the process proceeds to step 19 and "-1" is set as the submission flag F.
【0067】前記ステップ14において、設定された画
素データが白画素を表す画素データ「1」であると判定
されたときは、ステップ14からステップ17へ進み、
処理対象領域内に黒画素が存在していたか否かを計数値
NB の値により判定する。もしステップ17の「NB =
0」の判定が「NO」であれば、ステップ18へ進んで
申送りフラグFとして「0」をセットし、もしステップ
17の判定が「YES」であれば、ステップ19へ進ん
で申送りフラグFとして「−1」をセットする。When it is determined in step 14 that the set pixel data is the pixel data "1" representing the white pixel, the process proceeds from step 14 to step 17,
Whether the black pixel exists in the processing target area is determined by the value of the count value N B. If step 17 "N B =
If the determination of "0" is "NO", the process proceeds to step 18 and "0" is set as the reporting flag F. If the determination of step 17 is "YES", the process proceeds to step 19 and the reporting flag. Set "-1" as F.
【0068】つぎにステップ20で計数値TW ,TB を
クリアした後、つぎのステップ21で2値画像の1行分
についての処理が完了したか否かを判定する。この判定
が「NO」であれば、ステップ3へ戻って同様の手順が
実行され、その判定が「YES」であれば、つぎのステ
ップ22で全ての行についての処理が完了したか否かを
判定する。もしステップ22の判定が「NO」であれ
ば、ステップ2へ戻って同様の手順を実行する。このよ
うな手順を繰り返し実行することにより、全ての行につ
いての処理が完了すると、ステップ22の判定が「YE
S」となり、2値画像の間引き処理を完了する。Next, after the count values T W and T B are cleared in step 20, it is determined in step 21 whether or not the processing for one line of the binary image is completed. If this determination is "NO", the same procedure is executed by returning to step 3, and if the determination is "YES", it is determined in the next step 22 whether or not the processing has been completed for all rows. judge. If the determination in step 22 is "NO", the process returns to step 2 and the same procedure is executed. When the processing for all the rows is completed by repeatedly executing such a procedure, the determination in step 22 is “YE
S ”, and the thinning processing of the binary image is completed.
【0069】なお、この第2実施例による間引き処理の
処理結果を示す図、すなわち第1実施例における図7〜
図12に相当する図については、第1実施例と同様であ
り、ここでは図示および説明を省略する。It is to be noted that the figures showing the processing results of the thinning-out processing according to the second embodiment, that is, FIGS.
The diagram corresponding to FIG. 12 is similar to that of the first embodiment, and therefore, illustration and description thereof are omitted here.
【0070】図20は、図17〜図19の処理手順を実
施するための図14の原理に基づく間引き処理部14の
回路構成例を示す。図示例の間引き処理部14は、図1
3の第1実施例のものと同様の構成として白画素カウン
タ30,1/2演算器31,比較器32,申送りフラグ
決定部33,申送りフラグバッファ34,論理回路3
5,セレクタ36,出力部37を含む他、計数値メモリ
38と申送りフラグメモリ39とが設けてある。FIG. 20 shows a circuit configuration example of the thinning processing section 14 based on the principle of FIG. 14 for carrying out the processing procedure of FIGS. The thinning processing unit 14 shown in FIG.
3, a white pixel counter 30, a 1/2 arithmetic unit 31, a comparator 32, an application flag determination unit 33, an application flag buffer 34, and a logic circuit 3.
5, a selector 36, an output unit 37, a count value memory 38, and an application flag memory 39 are provided.
【0071】前記計数値メモリ38は、処理対象領域の
設定列毎に白画素カウンタ30の計数値NW を記憶する
領域を有するものであって、白画素カウンタ30は、入
力された画素データが白画素を表す画素データ「1」で
あるとき、処理対象領域の設定列に対応する記憶領域に
記憶された計数値NW に1加算し、その加算結果により
計数値メモリ38の記憶内容(計数値NW )を更新す
る。The count value memory 38 has an area for storing the count value N W of the white pixel counter 30 for each set column of the processing target area. The white pixel counter 30 stores the input pixel data. When the pixel data is “1” representing a white pixel, 1 is added to the count value N W stored in the storage area corresponding to the set column of the processing target area, and the storage result of the count value memory 38 (total The numerical value N W ) is updated.
【0072】また申送りフラグメモリ39も、処理対象
領域の設定列毎に申送りフラグFを記憶する領域を有す
るものであって、処理対象領域の設定列に対応する申送
りフラグFが申送りフラグメモリ39の対応する記憶領
域より読み出されて申送りフラグバッファ34にセット
される。なお他の構成については、第1実施例と同様で
あり、ここでは同じ説明を繰り返さない。The submission flag memory 39 also has an area for storing the submission flag F for each set column of the processing target area, and the submission flag F corresponding to the set column of the processing target area is submitted. The flag is read from the corresponding storage area of the flag memory 39 and set in the delivery flag buffer 34. The rest of the configuration is similar to that of the first embodiment, and the same description will not be repeated here.
【0073】図21および図22は、この発明の第3実
施例にかかるイメージスキャナの間引き処理手順を示す
が、この第3実施例の全体の回路構成は図1の第1実施
例のものと同様であり、ここでは図示を省略する。21 and 22 show the thinning-out processing procedure of the image scanner according to the third embodiment of the present invention. The entire circuit configuration of the third embodiment is the same as that of the first embodiment of FIG. The same is true, and illustration is omitted here.
【0074】同図において、ステップ1〜ステップ10
は、処理対象領域内の2値画像を代表する画素データを
設定するための手順であり、第1実施例の図6に示す手
順(ステップ1〜10)と同様である。In the figure, step 1 to step 10
Is a procedure for setting pixel data representing a binary image in the processing target area, and is similar to the procedure (steps 1 to 10) shown in FIG. 6 of the first embodiment.
【0075】つぎの図22のステップ11では、設定さ
れた画素データが黒画素を表す画素データ「0」である
か否かを判定しており、その判定が「YES」であれ
ば、つぎにステップ12で処理対象領域内に白画素が存
在していたか否かを計数値NWの値により判定する。も
しステップ12の「NW =0」の判定が「NO」であれ
ば、ステップ14へ進んで申送りフラグFとして「1」
をセットする。Next, in step 11 of FIG. 22, it is judged whether or not the set pixel data is pixel data "0" representing a black pixel. If the judgment is "YES", then In step 12, it is determined whether or not there are white pixels in the processing target area based on the count value N W. If the determination of “N W = 0” in step 12 is “NO”, the process proceeds to step 14 and the flag F is “1”.
Set.
【0076】もしステップ12の判定が「YES」であ
れば、ステップ13へ進み、申送りフラグFが「1」か
否かを判定する。その判定が「YES」であれば、ステ
ップ14へ進み、申送りフラグFとして「1」をセット
する。もしステップ13の判定が「NO」であれば、ス
テップ18へ進み、申送りフラグFとして「−1」をセ
ットする。If the determination in step 12 is "YES", the process proceeds to step 13 and it is determined whether the delivery flag F is "1". If the determination is "YES", the process proceeds to step 14 and "1" is set as the submission flag F. If the determination in step 13 is "NO", the process proceeds to step 18 and "-1" is set as the report flag F.
【0077】前記ステップ11において、設定された画
素データが白画素を表す画素データ「1」であると判定
されたときは、ステップ11からステップ15へ進み、
処理対象領域内に黒画素が存在していたか否かを計数値
NB の値により判定する。もしステップ15の「NB =
0」の判定が「NO」であれば、ステップ17へ進んで
申送りフラグFとして「0」をセットする。When it is determined in step 11 that the set pixel data is the pixel data "1" representing the white pixel, the process proceeds from step 11 to step 15,
Whether the black pixel exists in the processing target area is determined by the value of the count value N B. If step 15 "N B =
If the determination of "0" is "NO", the process proceeds to step 17 and "0" is set as the submission flag F.
【0078】もしステップ15の判定が「YES」であ
れば、つぎにステップ16で申送りフラグFが「0」か
否かを判定する。その判定が「YES」であれば、ステ
ップ17へ進み、申送りフラグFとして「0」をセット
し、もしステップ16の判定が「NO」であれば、ステ
ップ18へ進み、申送りフラグFとして「−1」をセッ
トする。If the determination at step 15 is "YES", then at step 16, it is determined whether the application flag F is "0". If the determination is “YES”, the process proceeds to step 17, and “0” is set as the report flag F. If the determination in step 16 is “NO”, the process proceeds to step 18 and the report flag F is set. Set to "-1".
【0079】以下のステップ19〜ステップ22は、図
6におけるステップ17〜ステップ20と対応してお
り、ここでは説明を省略する。The following Steps 19 to 22 correspond to Steps 17 to 20 in FIG. 6 and will not be described here.
【0080】図23〜図25は、横方向の細線の欠落防
止例を示しており、これらの図には従来例による間引き
処理の処理結果と、上記第3実施例による間引き処理の
処理結果とが併せて示してある。FIGS. 23 to 25 show examples of preventing thin lines in the horizontal direction from being lost. These figures show the processing results of the thinning processing according to the conventional example and the processing results of the thinning processing according to the third embodiment. Are also shown.
【0081】図23は、400dpiの2値画像を10
0dpiの2値画像に間引き処理したときの処理結果の
比較例である。同図中、23は間引き処理前の2値画像
の構成画素を、27は従来例による間引き処理後の2値
画像の構成画素を、24はこの第2実施例による間引き
処理後の2値画像の各構成画素を、それぞれ示す。また
25A〜25F(図中、太線枠で示す)は処理対象領域
の設定位置を示す。なお白丸は白画素を表す画素データ
を、黒丸は黒画素を表す画素データを、それぞれ意味し
ており、黒画素が細線などの画像部分を構成する。FIG. 23 shows a 10-bit binary image of 400 dpi.
It is a comparative example of the processing result when the thinning processing is performed on the binary image of 0 dpi. In the figure, 23 is a constituent pixel of a binary image before thinning processing, 27 is a constituent pixel of a binary image after thinning processing according to the conventional example, and 24 is a binary image after thinning processing according to the second embodiment. Each of the constituent pixels is shown. Further, 25A to 25F (indicated by a thick line frame in the figure) indicate the setting position of the processing target area. White circles mean pixel data representing white pixels, and black circles mean pixel data representing black pixels, and the black pixels form an image portion such as a thin line.
【0082】同図において、1番目の処理対象領域の設
定位置25Aでは、2番目と3番目の各画素が黒画素で
ある。これを従来の間引き処理によると、間引き処理後
の画素は白画素となるのに対し、この第3実施例の間引
き処理によると、白画素の計数値NW と黒画素の計数値
NB とが一致し(図21のステップ6が「YES」)、
しかも申送りフラグFは「−1」であるから(ステップ
8が「NO」)、間引き処理後の画素は黒画素となる
(ステップ10)。この場合に間引き処理後の画素は黒
画素であって(ステップ11が「YES」)、しかも処
理対象領域25A内に白画素が存在するから(ステップ
12が「NO」)、申送りフラグFとして「1」がセッ
トされる(ステップ14)。In the figure, at the setting position 25A of the first processing target area, the second and third pixels are black pixels. According to the conventional thinning processing, the pixels after the thinning processing become white pixels, whereas according to the thinning processing of the third embodiment, the count value N W of white pixels and the count value N B of black pixels are Match (“YES” in step 6 of FIG. 21),
Moreover, since the sending flag F is "-1"("NO" in step 8), the pixels after the thinning process become black pixels (step 10). In this case, the pixels after the thinning-out process are black pixels (“YES” in step 11) and there are white pixels in the processing target area 25A (“NO” in step 12). "1" is set (step 14).
【0083】2番目の処理対象領域の設定位置25Bで
は、2番目の画素のみが黒画素であるが、これを従来の
間引き処理によると、間引き処理後の画素は白画素とな
るのに対し、この第3実施例の間引き処理によると、白
画素の計数値NW が黒画素の計数値NB より大きいため
(ステップ7が「YES」)、間引き処理後の画素は白
画素となる(ステップ9)。この場合に間引き処理後の
画素は白画素であって(ステップ11が「NO」)、し
かも処理対象領域25B内に黒画素が存在するから(ス
テップ14が「NO」)、申送りフラグFとして「0」
がセットされる(ステップ17)。At the set position 25B of the second processing target area, only the second pixel is a black pixel, but according to the conventional thinning processing, the pixel after the thinning processing becomes a white pixel, whereas According to the thinning-out process of the third embodiment, the count value N W of white pixels is larger than the count value N B of black pixels (step 7 is “YES”), so the pixels after the thinning-out process become white pixels (step 9). In this case, the pixel after the thinning process is a white pixel (“NO” in step 11) and there are black pixels in the processing target area 25B (“NO” in step 14). "0"
Are set (step 17).
【0084】もし仮に2番目の処理対象領域設定位置2
5Bにおいて、処理対象領域内が全て黒画素であると仮
定すると、白画素の計数値NW が黒画素の計数値NB よ
り小さいため(ステップ7が「NO」)、間引き処理後
の画素は黒画素となる(ステップ10)。この場合に間
引き処理後の画素は黒画素であって(ステップ11が
「YES」)、しかも処理対象領域25B内に白画素が
存在せず(ステップ12が「YES」)、申送りフラグ
Fが「1」であるから(ステップ13が「YES」)、
申送りフラグFとして「1」がセットされる(ステップ
14)。この場合、もし申送りフラグFが「0」であれ
ば(ステップ13が「NO」)、申送りフラグFとして
「−1」がセットされる(ステップ18)。If the second processing target area setting position 2
5B, assuming that all the processing target areas are black pixels, the count value N W of the white pixels is smaller than the count value N B of the black pixels (step 7 is “NO”), and thus the pixels after the thinning processing are It becomes a black pixel (step 10). In this case, the pixel after the thinning process is a black pixel (“YES” in step 11), there is no white pixel in the processing target area 25B (“YES” in step 12), and the flag F is set. Since it is "1" (step 13 is "YES"),
"1" is set as the report flag F (step 14). In this case, if the report flag F is "0" (step 13 is "NO"), "-1" is set as the report flag F (step 18).
【0085】またもし仮に処理対象領域内が全て白画素
であると仮定すると、白画素の計数値NW が黒画素の計
数値NB より大きいため(ステップ7が「YES」)、
間引き処理後の画素は白画素となる(ステップ9)。こ
の場合に間引き処理後の画素は白画素であって(ステッ
プ11が「NO」)、しかも処理対象領域25B内に黒
画素が存在せず(ステップ15が「YES」)、申送り
フラグFが「1」であるから(ステップ16が「N
O」)、申送りフラグFとして「−1」がセットされる
(ステップ18)。この場合、もし申送りフラグFが
「0」であれば(ステップ16が「YES」)、申送り
フラグFとして「0」がセットされる(ステップ1
7)。If it is assumed that the processing target area is entirely white pixels, the count value N W of white pixels is larger than the count value N B of black pixels (step 7 is “YES”).
The pixels after the thinning process become white pixels (step 9). In this case, the pixel after the thinning process is a white pixel (“NO” in step 11), there is no black pixel in the processing target area 25B (“YES” in step 15), and the application flag F is set. Since it is "1" (step 16 is "N"
O "), and" -1 "is set as the report flag F (step 18). In this case, if the delivery flag F is "0" (step 16 is "YES"), "0" is set as the delivery flag F (step 1).
7).
【0086】3番目以降の処理対象領域の設定位置25
C〜25Fについても同様の処理が行われ、その結果、
従来例による間引き処理では、以下の処理結果が白画
素,白画素,白画素,白画素となるのに対し、この第3
実施例による間引き処理では、黒画素,白画素,黒画
素,白画素となる。Setting position 25 of the third and subsequent processing target areas
Similar processing is performed for C to 25F, and as a result,
In the thinning processing according to the conventional example, the following processing results are white pixels, white pixels, white pixels, and white pixels.
In the thinning processing according to the embodiment, black pixels, white pixels, black pixels, and white pixels are obtained.
【0087】図24は400dpiの2値画像を200
dpiの2値画像に間引きしたときの処理結果の比較例
を、また図25は400dpiの2値画像を300dp
iの2値画像に間引きしたときの処理結果の比較例を、
それぞれ示す。いずれの場合も図23と同様であり、こ
こでは従来例による間引き処理の処理結果とこの第3実
施例による間引き処理の処理結果とを図示するにとど
め、その詳細な説明は省略する。FIG. 24 shows 200 binary images of 400 dpi.
FIG. 25 shows a comparative example of processing results when thinning out a binary image of dpi of 300 dpi, and FIG.
An example of comparison of processing results when thinning out a binary image of i
Shown respectively. In any case, the processing is the same as that in FIG. 23, and here, the processing result of the thinning processing according to the conventional example and the processing result of the thinning processing according to the third embodiment are illustrated, and the detailed description thereof will be omitted.
【0088】図26〜図28は、横方向のモアレ縞の発
生防止例を示しており、これらの図には従来例による間
引き処理の処理結果と、第3実施例による間引き処理の
処理結果とが併せて示してある。26 to 28 show examples of preventing the generation of moire fringes in the lateral direction. These figures show the processing result of the thinning processing according to the conventional example and the processing result of the thinning processing according to the third embodiment. Are also shown.
【0089】図26は400dpiの2値画像を100
dpiの2値画像に間引きしたときの処理結果の比較例
を、図27は400dpiの2値画像を200dpiの
2値画像に間引きしたときの処理結果の比較例を、また
図28は400dpiの2値画像を300dpiの2値
画像に間引きしたときの処理結果の比較例を、それぞれ
示す。従来例による間引き処理の処理結果では、周期的
に黒画素ないしは黒画素群が現れてモアレ縞が発生して
いるが、この第3実施例による間引き処理結果では、黒
画素ないしは黒画素群の発生に周期性がなく、モアレ縞
は発生していない。なお図26〜図28の各場合につい
ても、図23と同様であり、その説明は省略する。FIG. 26 shows 100 binary images of 400 dpi.
27 shows a comparative example of processing results when thinning out a binary image of dpi, FIG. 27 shows a comparative example of processing results when thinning a binary image of 400 dpi into a binary image of 200 dpi, and FIG. Comparative examples of the processing results when the value image is thinned out to a binary image of 300 dpi are shown. In the processing result of the thinning processing according to the conventional example, black pixels or black pixel groups appear periodically and moire fringes are generated. However, in the thinning processing result according to the third embodiment, black pixels or black pixel groups are generated. There is no periodicity, and moire fringes do not occur. Note that each of the cases of FIGS. 26 to 28 is similar to that of FIG. 23, and the description thereof is omitted.
【0090】図29は、図22および図23の処理手順
を実施するための図2の原理に基づく間引き処理部14
の回路構成例を示す。図示例の間引き処理部14は、図
13に示した第1実施例のものと同様の構成、すなわち
白画素カウンタ30,1/2演算器31,比較器32,
申送りフラグ決定部33,申送りフラグバッファ34,
論理回路35,セレクタ36,出力部37を含んでい
る。FIG. 29 is a thinning-out processing unit 14 based on the principle of FIG. 2 for carrying out the processing procedure of FIGS. 22 and 23.
An example of the circuit configuration of is shown. The thinning-out processing unit 14 in the illustrated example has the same configuration as that of the first embodiment shown in FIG. 13, that is, a white pixel counter 30, a 1/2 calculator 31, a comparator 32,
Request flag determination unit 33, request flag buffer 34,
It includes a logic circuit 35, a selector 36, and an output section 37.
【0091】この第3実施例では、申送りフラグ決定部
33が出力部37が出力する間引き出力OUTと、白画
素カウンタ30の計数値NW と、申送りフラグバッファ
34に保持された前回の申送りフラグFとを入力して、
これらから申送りフラグFを決定している点で第1実施
例と相違する。なお他の構成については、第1実施例と
同様であり、ここでは同じ説明を繰り返さない。In the third embodiment, the application flag determining unit 33 outputs the thinned-out output OUT from the output unit 37, the count value N W of the white pixel counter 30, and the previous application flag held in the application flag buffer 34. Enter the flag F and
This is different from the first embodiment in that the report flag F is determined from these. The rest of the configuration is similar to that of the first embodiment, and the same description will not be repeated here.
【0092】図30は、この発明の第4実施例にかかる
イメージスキャナ10の回路構成例を示す。図示例のイ
メージスキャナ10は画像入力部11,2値化処理部1
2,2値画像メモリ13,間引き処理部50,設定入力
部51,多数決補正部52を含んでおり、前記多数決補
正部52の出力がRS−232Cなどの通信手段17を
介して表示装置18に接続されている。FIG. 30 shows a circuit configuration example of the image scanner 10 according to the fourth embodiment of the present invention. The image scanner 10 of the illustrated example includes an image input unit 11 and a binarization processing unit 1.
It includes a binary image memory 13, a thinning-out processing unit 50, a setting input unit 51, and a majority voting correction unit 52, and the output of the majority voting correction unit 52 is sent to a display device 18 via a communication means 17 such as RS-232C. It is connected.
【0093】前記画像入力部11,2値化処理部12お
よび,2値画像メモリ13は図1の第1実施例のものと
同様であり、説明を省略する。間引き処理部50は、図
40〜図42に示す従来の間引き原理に基づいて間引き
処理を実行するものであり、設定入力部51より入力さ
れた間引き割合に関わる情報に基づいて例えば400d
piの2値画像を100dpiに、400dpiの2値
画像を200dpiに、400dpiの2値画像を30
0dpiに、それぞれ間引いた低解像度の2値画像を生
成する。The image input section 11, the binarization processing section 12 and the binary image memory 13 are the same as those in the first embodiment of FIG. 1 and their explanations are omitted. The thinning-out processing unit 50 executes the thinning-out process based on the conventional thinning-out principle shown in FIGS. 40 to 42, and for example 400d based on the information related to the thinning-out ratio input from the setting input unit 51.
The binary image of pi is 100 dpi, the binary image of 400 dpi is 200 dpi, and the binary image of 400 dpi is 30 dpi.
A low-resolution binary image thinned out at 0 dpi is generated.
【0094】多数決補正部52は、図32に示すよう
に、前記間引き処理後の2値画像を構成する各画素につ
き、対象画素41の画素データ(図示例では白画素を表
す画素データ「1」)とその前後の画素42,43の各
画素データ(図示例では画素42は黒画素を表す画素デ
ータ「0」、画素43は白画素を表す画素データ
「1」)とから白画素数と黒画素数との大小関係を判定
し、その判定結果から対象画素41の画素データを補正
して2値画像を生成するものである。As shown in FIG. 32, the majority decision correcting unit 52, for each pixel forming the binary image after the thinning processing, pixel data of the target pixel 41 (pixel data "1" representing a white pixel in the illustrated example). ) And the pixel data of each of the pixels 42 and 43 before and after that (in the illustrated example, the pixel data "0" represents the black pixel for the pixel 42 and the pixel data "1" represents the white pixel for the pixel 43). The magnitude relationship with the number of pixels is determined, and the pixel data of the target pixel 41 is corrected from the determination result to generate a binary image.
【0095】この多数決補正部52で補正処理された2
値画像は通信手段17を介して表示装置18へ伝送され
る。表示装置18はマイクロコンピュータのディスプレ
イやプリンタであって、前記2値画像を表示または印字
する。2 corrected by the majority corrector 52
The value image is transmitted to the display device 18 via the communication means 17. The display device 18 is a display or printer of a microcomputer, and displays or prints the binary image.
【0096】図31は、前記多数決補正部52による処
理の手順をステップ1〜ステップ7で示す。まずステッ
プ1では、間引き処理後の2値画像を入力し、対象画素
が各水平ラインの1番目の画素であるか否かを判定す
る。いま対象画素が最初の画素である場合、ステップ1
の判定は「YES」であるから、ステップ2へ進み、そ
の対象画素の画素データを多数決補正後の画素データと
してそのまま出力させる。FIG. 31 shows the procedure of processing by the majority decision correction section 52 in steps 1 to 7. First, in step 1, the binary image after the thinning process is input, and it is determined whether or not the target pixel is the first pixel of each horizontal line. If the target pixel is now the first pixel, step 1
Is YES, the process proceeds to step 2, and the pixel data of the target pixel is output as it is as the pixel data after the majority correction.
【0097】つぎに対象画素が2番目の画素であると
き、ステップ1の判定は「NO」であるから、ステップ
3へ進み、その対象画素の画素データと前後の画素の画
素データとを計数対象として白画素の個数を計数する。Next, when the target pixel is the second pixel, the determination in step 1 is "NO", so the process proceeds to step 3 and the pixel data of the target pixel and the pixel data of the preceding and following pixels are counted. The number of white pixels is counted as.
【0098】つぎのステップ4ではその計数値nW が2
以上か否かを判定しており、その判定が「YES」であ
れば、対象画素の画素データを白画素を表す画素データ
「1」に設定する(ステップ5)。もしステップ4の判
定が「NO」であれば、対象画像の画素データを黒画素
を表す画素データ「0」に設定する(ステップ6)。In the next step 4, the count value n W is 2
It is determined whether or not the above is true. If the determination is "YES", the pixel data of the target pixel is set to the pixel data "1" representing the white pixel (step 5). If the determination in step 4 is "NO", the pixel data of the target image is set to pixel data "0" representing a black pixel (step 6).
【0099】つぎのステップ7は全画素を対象とした処
理が完了したか否かを判定しており、その判定が「N
O」であればステップ1へ戻り、つぎの対象画素につ
き、同様の計数処理と多数決判定とを行う。同様の手順
を2値画像を構成するすべての画素につき実行し、ステ
ップ7の判定が「YES」になったとき、多数決補正処
理を完了する。In the next step 7, it is judged whether or not the processing for all the pixels is completed, and the judgment is "N".
If it is "O", the process returns to step 1 and the same counting process and majority decision are performed for the next target pixel. The same procedure is executed for all the pixels forming the binary image, and when the determination in step 7 is “YES”, the majority correction process is completed.
【0100】図33〜図35は、横方向の細線の途切れ
防止例を示しており、これらの図には従来例による間引
き処理の処理結果と、上記多数決補正を行う第4実施例
による間引き処理の処理結果とが併せて示してある。FIGS. 33 to 35 show examples of preventing the interruption of thin lines in the horizontal direction. These figures show the processing results of the thinning processing according to the conventional example and the thinning processing according to the fourth embodiment for performing the majority correction. The processing result of is also shown.
【0101】図33は、400dpiの2値画像を10
0dpiの2値画像に間引き処理したときの処理結果で
ある。同図中、23は間引き処理前の2値画像の構成画
素を、27は多数決補正を行わない従来例による間引き
処理後の2値画像の構成画素を、24は多数決補正を行
う第4実施例による間引き処理後の2値画像の各構成画
素を、それぞれ示す。In FIG. 33, a binary image of 400 dpi is converted into 10
It is a processing result when a thinning process is performed on a binary image of 0 dpi. In the figure, 23 is a constituent pixel of a binary image before thinning processing, 27 is a constituent pixel of a binary image after thinning processing according to a conventional example that does not perform majority correction, and 24 is a fourth embodiment that performs majority correction. Each of the constituent pixels of the binary image after the thinning processing by is shown.
【0102】また白丸は白画素を表す画素データを、黒
丸は黒画素を表す画素データを、それぞれ示しており、
従来例による間引き処理後の2値画像では途切れ部分T
が生じているのに対し、第4実施例による間引き処理後
の2値画像にはそのような途切れ部分は存在しない。White circles represent pixel data representing white pixels, and black circles represent pixel data representing black pixels.
In the binary image after the thinning processing according to the conventional example, the discontinuous portion T
On the other hand, such a discontinuity does not exist in the binary image after the thinning processing according to the fourth embodiment.
【0103】同図において、間引き処理前の2値画像の
(4n+1)番目(ただしn=0,1,2,……)の画
素の画素データを抽出して間引き処理後の画素データ
(従来例による間引き処理結果に相当する)としてい
る。従って1番目の画素は白画素であるから、間引き処
理後の画素は白画素であり、5番目の画素は黒画素であ
るから、間引き処理後の画素は黒画素であり、以下同様
に、黒画素、白画素、黒画素、黒画素と続いている。In the figure, the pixel data of the (4n + 1) th (where n = 0, 1, 2, ...) Pixel data of the binary image before thinning processing is extracted to obtain pixel data after thinning processing (conventional example). It corresponds to the thinning processing result by). Therefore, since the first pixel is a white pixel, the pixel after the thinning process is a white pixel, the fifth pixel is a black pixel, the pixel after the thinning process is a black pixel, and so on. Pixels, white pixels, black pixels, black pixels follow.
【0104】この間引き処理後の最初の画素は、白画素
であるから、多数決補正後の画素はそのまま白画素とな
る。つぎの画素を多数決補正の対象画素とすると、対象
画素は黒画素であり、直前の画素(1番目)の画素は白
画素であり、直後の画素(3番目)の画素は黒画素であ
るから、白画素数は2より小さくなって、多数決補正後
の画素は黒画素となる。以下の対象画素についても同様
の原理から、多数決補正後の画素としてすべて黒画素に
設定されることになる。Since the first pixel after the thinning-out process is a white pixel, the pixel after the majority correction is a white pixel as it is. If the next pixel is the target pixel for majority correction, the target pixel is a black pixel, the immediately preceding pixel (first) is a white pixel, and the immediately following pixel (third) is a black pixel. The number of white pixels becomes smaller than 2, and the pixels after the majority correction become black pixels. From the same principle, the following target pixels are all set to black pixels after the majority correction.
【0105】図34は400dpiの2値画像を200
dpiの2値画像に間引きしたときの処理結果を、また
図35は400dpiの2値画像を300dpiの2値
画像に間引きしたときの処理結果を、それぞれ示す。い
ずれの場合も図33と同様であり、ここでは詳細な説明
は省略する。FIG. 34 shows a 200-value binary image of 400 dpi.
FIG. 35 shows the processing result when the binary image of dpi is thinned, and FIG. 35 shows the processing result when the binary image of 400 dpi is thinned to the binary image of 300 dpi. In any case, it is similar to that of FIG. 33, and detailed description thereof is omitted here.
【0106】図36〜図38は、横方向のモアレ縞の発
生防止例を示しており、これらの図には従来例による間
引き処理による処理結果と、この第4実施例による間引
き処理(多数決補正を行う間引き処理)による処理結果
とが併せて示してある。FIGS. 36 to 38 show an example of preventing the generation of moire fringes in the lateral direction. In these figures, the processing results of the thinning processing according to the conventional example and the thinning processing according to the fourth embodiment (majority decision correction) are shown. And the processing result of the thinning processing).
【0107】図36は400dpiの2値画像を100
dpiの2値画像に間引きしたときの処理結果を、図3
7は400dpiの2値画像を200dpiの2値画像
に間引きしたときの処理結果を、また図38は400d
piの2値画像を300dpiの2値画像に間引きした
ときの処理結果を、それぞれ示すもので、従来例による
間引き処理の処理結果では、周期的に黒画素ないしは黒
画素群が現れてモアレ縞が発生しているが、第3実施例
による間引き処理結果では、黒画素ないしは黒画素群の
発生に周期性がなく、モアレ縞は発生していない。FIG. 36 shows 100 binary images of 400 dpi.
FIG. 3 shows the processing result when thinning out a binary image of dpi.
7 shows the processing result when a binary image of 400 dpi is thinned out to a binary image of 200 dpi, and FIG.
The processing results when a binary image of pi is thinned into a binary image of 300 dpi are shown respectively. In the processing result of the thinning processing according to the conventional example, black pixels or a group of black pixels periodically appear and moire fringes are generated. In the thinning-out processing result according to the third embodiment, the black pixels or the black pixel groups have no periodicity, and moire fringes do not occur.
【0108】図39は、図31の処理手順を実施するた
めの多数決補正部52の回路構成例を示す。図示例の多
数決補正部52は、白画素カウンタ53と比較器54と
2値画像生成部55とから成るもので、前記2値画像生
成部55は、画素判別部56,2個の反転回路57,5
9,2個のオア回路58,62,2個のゲート回路6
0,61を含んでいる。FIG. 39 shows a circuit configuration example of the majority correction unit 52 for carrying out the processing procedure of FIG. The majority correction unit 52 in the illustrated example includes a white pixel counter 53, a comparator 54, and a binary image generation unit 55. The binary image generation unit 55 includes a pixel determination unit 56 and two inversion circuits 57. , 5
9, 2 OR circuits 58, 62, 2 gate circuits 6
Including 0,61.
【0109】白画素カウンタ53には画素クロックと水
平同期クロックと計数対象画素数(この場合3)とが与
えられ、この白画素カウンタ53は、間引き処理部50
より間引き処理後の2値画像を入力して、各対象画素の
画素データとその前後の画素の各画素データとから白画
素数を計数する。The white pixel counter 53 is supplied with the pixel clock, the horizontal synchronizing clock, and the number of pixels to be counted (3 in this case).
The binary image after the thinning process is input, and the number of white pixels is counted from the pixel data of each target pixel and each pixel data of the pixels before and after it.
【0110】比較器54は白画素カウンタ53の計数値
nW と多数決判定の基準値「2」との大小を比較し、n
W ≧2であれば第1出力Out1が、nW <2であれば
第2出力Out2が、それぞれ「1」となる。The comparator 54 compares the count value n W of the white pixel counter 53 with the reference value “2” of the majority decision, and n
If W ≧ 2, the first output Out1 is “1”, and if n W <2, the second output Out2 is “1”.
【0111】比較器54の第1出力Out1はオア回路
58の一方の入力として与えられ、第2出力Out2は
反転回路57を経てオア回路58の他方の入力として与
えられ、このオア回路58の出力は一方のゲート回路6
1へ与えられる。The first output Out1 of the comparator 54 is given as one input of the OR circuit 58, the second output Out2 is given as the other input of the OR circuit 58 via the inverting circuit 57, and the output of this OR circuit 58 is given. Is one gate circuit 6
Given to 1.
【0112】画素判別部56は、間引き処理後の2値画
像を入力し、対象画素が各水平ラインの1番目の画素に
当たる場合は判別出力として「1」を出力する。この判
別出力は反転回路59に与えられ、その反転出力が前記
ゲート回路61を開閉する。The pixel discriminating unit 56 inputs the binary image after the thinning process, and outputs "1" as the discrimination output when the target pixel corresponds to the first pixel of each horizontal line. This discrimination output is given to the inverting circuit 59, and the inverting output opens and closes the gate circuit 61.
【0113】他方のゲート回路60には間引き処理部5
0より間引き処理後の2値画像が入力されており、この
ゲート回路60は前記画素判別部56の判別出力により
開閉される。このゲート回路60は各水平ラインの1番
目の画素についての画素データのみをそのまま通過さ
せ、前記ゲート回路61は各水平ラインの1番目の画素
以外の画素についての多数決補正後の画素データを通過
させるもので、これら画素データはオア回路62で合成
されて多数決補正後の画素データとして出力される。The other gate circuit 60 includes a thinning processing unit 5
The binary image after the thinning process is input from 0, and the gate circuit 60 is opened / closed by the discrimination output of the pixel discrimination unit 56. The gate circuit 60 allows only the pixel data of the first pixel of each horizontal line to pass as it is, and the gate circuit 61 allows the pixel data after the majority correction for the pixels other than the first pixel of each horizontal line to pass. The pixel data are combined by the OR circuit 62 and output as pixel data after the majority correction.
【0114】なお上記の各実施例は、この発明をイメー
ジスキャナに実施した例を示すが、この発明はイメージ
スキャナに限らず、ファクシミリや複写機にも実施でき
ることは勿論である。Although each of the above-described embodiments shows an example in which the present invention is applied to an image scanner, the present invention is not limited to the image scanner and can be applied to a facsimile or a copying machine.
【0115】[0115]
【発明の効果】この発明は上記のように、2値画像上に
設定された処理対象領域内の白黒各画素の個数の大小関
係と画素指定情報とから処理対象領域内を代表する画素
の種類を決定し、請求項1の発明では、決定された画素
の種類と処理対象領域内に含まれる各画素の画素データ
とから画素指定情報を決定し、請求項3の発明では、決
定された画素の種類と処理対象領域内に含まれる各画素
の画素データと処理済の画素指定情報とから画素指定情
報を決定するようにしたから、文字などの細線を含む2
値画像や網点写真の2値画像を間引き処理する場合に細
線の画像部分の欠落および途切れやモアレ縞の発生を防
止できる。As described above, according to the present invention, the type of pixel representing the inside of the processing target area is determined based on the size relationship between the number of black and white pixels in the processing target area set on the binary image and the pixel designation information. In the invention of claim 1, the pixel designation information is determined from the determined type of pixel and the pixel data of each pixel included in the processing target region. In the invention of claim 3, the pixel designation information is determined. Since the pixel designation information is determined from the type of the pixel and the pixel data of each pixel included in the processing target area and the processed pixel designation information, a thin line such as a character is included.
When thinning out a binary image such as a value image or a halftone dot photograph, it is possible to prevent the image portion of the thin line from being missing, discontinuity, and moire fringes.
【0116】また請求項2の間引き処理装置では、画像
の走査方向と直交する方向に沿う処理対象領域を画像全
体にわたって順次設定するから、文字などの細線を含む
2値画像や網点写真の2値画像を間引き処理する場合
に、縦方向の細線の欠落および途切れや横方向のモアレ
縞の発生を防止できる。In the thinning processing apparatus according to the second aspect, since the processing target area along the direction orthogonal to the scanning direction of the image is sequentially set over the entire image, the binary image including the thin line such as a character or the halftone photograph is displayed. When thinning out the value image, it is possible to prevent the occurrence of fine lines in the vertical direction and breaks and the generation of moire fringes in the horizontal direction.
【0117】さらに請求項4の間引き処理装置では、間
引き処理後の2値画像を構成する各画素につき対象画素
の画素データとその前後の画素の画素データとから画素
の種類の大小関係を判定し、その判定結果から対象画素
の画素データを補正して2値画像を生成するから、同様
に細線の欠落および途切れやモアレ縞の発生を防止でき
る。Further, in the thinning-out processing device according to the fourth aspect, for each pixel forming the binary image after the thinning-out process, the size relation of the kind of pixel is judged from the pixel data of the target pixel and the pixel data of the pixels before and after it. Since the pixel data of the target pixel is corrected based on the determination result to generate a binary image, it is possible to similarly prevent the thin line from being missing, discontinuity, and moire fringes.
【0118】さらにまた請求項5の発明では、上記の間
引き処理装置をイメージスキャナに実施したから、細線
の欠落および途切れやモアレ縞の発生が少ない圧縮画像
が得られるという、顕著な効果を奏する。Further, according to the invention of claim 5, since the thinning processing device is implemented in the image scanner, there is a remarkable effect that a compressed image in which thin lines are not missing, discontinuity and moire fringes are few can be obtained.
【図1】この発明が実施されたイメージスキャナの回路
構成を示すブロック図である。FIG. 1 is a block diagram showing a circuit configuration of an image scanner embodying the present invention.
【図2】間引き処理部による間引き処理の原理を示す説
明図である。FIG. 2 is an explanatory diagram showing a principle of thinning processing by a thinning processing unit.
【図3】間引き処理部による間引き処理の原理を示す説
明図である。FIG. 3 is an explanatory diagram showing a principle of thinning processing by a thinning processing unit.
【図4】間引き処理部による間引き処理の原理を示す説
明図である。FIG. 4 is an explanatory diagram showing the principle of thinning processing by a thinning processing unit.
【図5】第1実施例における処理対象領域確認部および
間引き処理部による処理の手順を示すフローチャートで
ある。FIG. 5 is a flowchart showing a procedure of processing by a processing target area confirmation unit and a thinning processing unit in the first embodiment.
【図6】第1実施例における処理対象領域確認部および
間引き処理部による処理の手順を示すフローチャートで
ある。FIG. 6 is a flowchart showing a procedure of processing by a processing target area confirmation unit and a thinning processing unit in the first embodiment.
【図7】第1実施例による細線の欠落防止例を示す説明
図である。FIG. 7 is an explanatory diagram showing an example of preventing loss of thin lines according to the first embodiment.
【図8】第1実施例による細線の欠落防止例を示す説明
図である。FIG. 8 is an explanatory diagram showing an example of preventing thin line loss according to the first embodiment.
【図9】第1実施例による細線の欠落防止例を示す説明
図である。FIG. 9 is an explanatory diagram showing an example of preventing loss of fine lines according to the first embodiment.
【図10】第1実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 10 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the first embodiment.
【図11】第1実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 11 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the first embodiment.
【図12】第1実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 12 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the first embodiment.
【図13】第1実施例における間引き処理部の回路構成
例を示すブロック図である。FIG. 13 is a block diagram showing a circuit configuration example of a thinning-out processing unit in the first embodiment.
【図14】この発明の第2実施例についての間引き処理
の原理を示す説明図である。FIG. 14 is an explanatory diagram showing the principle of thinning processing according to the second embodiment of the present invention.
【図15】この発明の第2実施例についての間引き処理
の原理を示す説明図である。FIG. 15 is an explanatory diagram showing the principle of thinning processing according to the second embodiment of the present invention.
【図16】この発明の第2実施例についての間引き処理
の原理を示す説明図である。FIG. 16 is an explanatory diagram showing the principle of thinning processing according to the second embodiment of the present invention.
【図17】第2実施例における処理対象領域確認部およ
び間引き処理部による処理の手順を示すフローチャート
である。FIG. 17 is a flowchart showing a procedure of processing by a processing target area confirmation unit and a thinning processing unit in the second embodiment.
【図18】第2実施例における処理対象領域確認部およ
び間引き処理部による処理の手順を示すフローチャート
である。FIG. 18 is a flowchart showing a procedure of processing by a processing target area confirmation unit and a thinning processing unit in the second embodiment.
【図19】第2実施例における処理対象領域確認部およ
び間引き処理部による処理の手順を示すフローチャート
である。FIG. 19 is a flowchart showing a procedure of processing by a processing target area confirmation unit and a thinning processing unit in the second embodiment.
【図20】第2実施例における間引き処理部の回路構成
例を示すブロック図である。FIG. 20 is a block diagram showing a circuit configuration example of a thinning-out processing unit in the second embodiment.
【図21】この発明の第3実施例における間引き処理手
順を示すフローチャートである。FIG. 21 is a flowchart showing a thinning-out processing procedure in the third embodiment of the present invention.
【図22】この発明の第3実施例における間引き処理手
順を示すフローチャートである。FIG. 22 is a flowchart showing a thinning-out processing procedure in the third embodiment of the present invention.
【図23】第3実施例による細線の欠落防止例を示す説
明図である。FIG. 23 is an explanatory diagram showing an example of preventing thin line loss according to the third embodiment.
【図24】第3実施例による細線の欠落防止例を示す説
明図である。FIG. 24 is an explanatory diagram showing an example of preventing thin line loss according to the third embodiment.
【図25】第3実施例による細線の欠落防止例を示す説
明図である。FIG. 25 is an explanatory diagram showing an example of preventing thin line loss according to the third embodiment.
【図26】第3実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 26 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the third embodiment.
【図27】第3実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 27 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the third embodiment.
【図28】第3実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 28 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the third embodiment.
【図29】第3実施例における間引き処理部の回路構成
例を示すブロック図である。FIG. 29 is a block diagram showing a circuit configuration example of a thinning-out processing unit in the third embodiment.
【図30】この発明の第4実施例にかかるイメージスキ
ャナの回路構成を示すブロック図である。FIG. 30 is a block diagram showing a circuit configuration of an image scanner according to a fourth embodiment of the present invention.
【図31】第4実施例における多数決補正処理の処理手
順を示すフローチャートである。FIG. 31 is a flowchart showing a processing procedure of majority voting correction processing in the fourth embodiment.
【図32】第4実施例における多数決補正の原理を示す
説明図である。FIG. 32 is an explanatory diagram showing the principle of majority voting correction in the fourth embodiment.
【図33】第4実施例における細線の欠落防止例を示す
説明図である。FIG. 33 is an explanatory diagram showing an example of preventing thin line loss in the fourth embodiment.
【図34】第4実施例における細線の欠落防止例を示す
説明図である。FIG. 34 is an explanatory diagram showing an example of preventing thin line loss in the fourth embodiment.
【図35】第4実施例における細線の欠落防止例を示す
説明図である。FIG. 35 is an explanatory diagram showing an example of preventing thin line loss in the fourth embodiment.
【図36】第4実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 36 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the fourth embodiment.
【図37】第4実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 37 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the fourth embodiment.
【図38】第4実施例によるモアレ縞の発生防止例を示
す説明図である。FIG. 38 is an explanatory diagram showing an example of preventing the generation of moire fringes according to the fourth embodiment.
【図39】第4実施例における多数決補正部の回路構成
例を示すブロック図である。FIG. 39 is a block diagram illustrating a circuit configuration example of a majority decision correction unit in the fourth embodiment.
【図40】従来の間引き処理の原理を示す説明図であ
る。FIG. 40 is an explanatory diagram showing the principle of conventional thinning processing.
【図41】従来の間引き処理の原理を示す説明図であ
る。FIG. 41 is an explanatory diagram showing the principle of conventional thinning processing.
【図42】従来の間引き処理の原理を示す説明図であ
る。FIG. 42 is an explanatory diagram showing the principle of conventional thinning processing.
10 イメージスキャナ 11 画像入力部 12 2値化処理部 14,50 間引き処理部 16 処理対象領域確認部 19 処理対象領域設定部 52 多数決補正部 53 白画素カウンタ 54 比較器 55 2値画像生成部 Reference Signs List 10 image scanner 11 image input unit 12 binarization processing unit 14, 50 thinning processing unit 16 processing target area confirmation unit 19 processing target area setting unit 52 majority decision correction unit 53 white pixel counter 54 comparator 55 binary image generation unit
Claims (5)
画像に間引き処理を施して、入力した2値画像より低解
像度の2値画像を生成する2値画像の間引き処理装置で
あって、 前記2値画像上に間引きの割合に応じて処理対象領域を
画像全体にわたって順次設定する処理対象領域設定手段
と、 前記処理対象領域の設定位置毎に処理対象領域内の黒画
素の個数と白画素の個数との大小関係と、処理済の処理
対象領域の設定位置で得られた画素指定情報とから処理
対象領域内の2値画像を代表する画素の種類を決定して
2値画像の各画素データを生成する代表画素決定手段
と、 前記代表画素決定手段により決定された画素の種類と、
処理対象領域内の2値画像を構成する各画素の画素デー
タとからつぎの処理対象領域の設定位置に対する画素指
定情報を決定して代表画素決定手段へ出力する指定情報
決定手段と、 前記代表画素決定手段より画素データを入力して間引き
処理後の2値画像を生成する2値画像生成手段とを備え
て成る2値画像の間引き処理装置。1. A binary image thinning processing device for thinning a binary image obtained by binarizing an input image to generate a binary image having a lower resolution than the input binary image. And a processing target area setting unit that sequentially sets the processing target area over the entire image according to the thinning ratio on the binary image, and the number of black pixels in the processing target area for each setting position of the processing target area. And the number of white pixels and the pixel designation information obtained at the set position of the processed region to be processed, the type of pixel representing the binary image in the processed region is determined to determine the binary image. Representative pixel determining means for generating each pixel data of, and the type of pixel determined by the representative pixel determining means,
Designation information determining means for determining pixel designation information for the next set position of the processing target area from pixel data of each pixel forming a binary image in the processing target area and outputting the pixel designation information to the representative pixel determining means; A binary image thinning processing device, comprising: a binary image generating means for inputting pixel data from the determining means to generate a binary image after thinning processing.
上に間引きの割合に応じて画像の走査方向と直交する方
向に沿う処理対象領域を画像全体にわたって順次設定す
るようにした請求項1に記載された2値画像の間引き処
理装置。2. The processing target area setting means sequentially sets the processing target area along the direction orthogonal to the scanning direction of the image over the entire image according to the thinning rate on the binary image. The binary image thinning processing device described in 1.
決定手段により決定された画素の種類と、処理対象領域
内の2値画像を構成する各画素の画素データと、処理済
の処理対象領域の設定位置で得られた画素指定情報とか
らつぎの処理対象領域の設定位置に対する画素指定情報
を決定して代表画素決定手段へ出力するようにした請求
項1に記載された2値画像の間引き処理装置。3. The designation information determining means, the type of pixel determined by the representative pixel determining means, the pixel data of each pixel forming a binary image in the processing target area, and the processed processing target area. The binary image thinning-out according to claim 1, wherein the pixel designation information for the next set position of the processing target area is determined from the pixel designation information obtained at Processing equipment.
画像に間引き処理を施して、入力した2値画像より低解
像度の2値画像を生成する2値画像の間引き処理装置で
あって、 前記間引き処理後の2値画像を構成する各画素につき対
象画素の画素データとその前後の画素の画素データとか
ら画素の種類の大小関係を判定する画素数判定手段と、 前記画素数判定手段による判定結果から対象画素の画素
データを補正して2値画像を生成する2値画像生成手段
とを備えて成る2値画像の間引き処理装置。4. A binary image thinning processing device for thinning a binary image obtained by binarizing an input image to generate a binary image having a lower resolution than the input binary image. A pixel number determining unit that determines a magnitude relationship between pixel types from pixel data of a target pixel and pixel data of pixels before and after the pixel of the binary image after the thinning processing; A binary image thinning processing device comprising: a binary image generating unit that corrects pixel data of a target pixel from a determination result of the determining unit to generate a binary image.
ジスキャナに実施されたものである請求項1〜4のいず
れかに記載された2値画像の間引き処理装置。5. The binary image thinning processing device according to claim 1, wherein the binary image thinning processing device is implemented in an image scanner.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4131582A JPH05303633A (en) | 1992-04-24 | 1992-04-24 | Processor for thinning binary picture |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4131582A JPH05303633A (en) | 1992-04-24 | 1992-04-24 | Processor for thinning binary picture |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05303633A true JPH05303633A (en) | 1993-11-16 |
Family
ID=15061429
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4131582A Pending JPH05303633A (en) | 1992-04-24 | 1992-04-24 | Processor for thinning binary picture |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05303633A (en) |
-
1992
- 1992-04-24 JP JP4131582A patent/JPH05303633A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3636332B2 (en) | Image processing method and image processing apparatus | |
| JPH1084475A (en) | Image area determination method and image processing apparatus | |
| EP0208355B1 (en) | Method of enlarging/reducing dithered images | |
| JPH0470057A (en) | Halftone processing circuit | |
| JPH06276392A (en) | Picture processing unit | |
| JPH07334672A (en) | Picture processor | |
| JP3539552B2 (en) | Image processing device | |
| JP3783815B2 (en) | Image processing device | |
| JP3045555B2 (en) | Binarization processing method for multi-tone image information | |
| EP1377027B1 (en) | Image processing circuit and image processing method that prevent problems occurring in image reduction | |
| JP3183787B2 (en) | Halftone area determination device | |
| JP2608404B2 (en) | Image processing device | |
| KR940010475B1 (en) | Resolution degree changing method for fax | |
| JP3474431B2 (en) | Image processing method | |
| JP3223376B2 (en) | Image region identification apparatus and method | |
| JPH11146203A (en) | Image processing apparatus and storage medium storing program related to the apparatus | |
| JPH05207273A (en) | Picture reduction method | |
| JPH07123246A (en) | Binary image reduction device | |
| JPH06205201A (en) | Binary picture magnification/reduction device | |
| JP3359361B2 (en) | Enlargement printing device | |
| JP2005094796A (en) | Image processing method and image processing apparatus | |
| JPH0721362A (en) | High contrast processor | |
| JPH05145747A (en) | Image processor | |
| JPH05250468A (en) | Binary image data reduction method | |
| JPS62266974A (en) | Picture output device |