JP2006287449A - Image processor and image processing program - Google Patents

Image processor and image processing program Download PDF

Info

Publication number
JP2006287449A
JP2006287449A JP2005102720A JP2005102720A JP2006287449A JP 2006287449 A JP2006287449 A JP 2006287449A JP 2005102720 A JP2005102720 A JP 2005102720A JP 2005102720 A JP2005102720 A JP 2005102720A JP 2006287449 A JP2006287449 A JP 2006287449A
Authority
JP
Japan
Prior art keywords
threshold value
unit
pixel
pixels
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005102720A
Other languages
Japanese (ja)
Inventor
Toshiaki Mutsuo
敏明 六尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Mita Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Mita Corp filed Critical Kyocera Mita Corp
Priority to JP2005102720A priority Critical patent/JP2006287449A/en
Publication of JP2006287449A publication Critical patent/JP2006287449A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color Electrophotography (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To suppress the occurrence of worm texture at error diffusion processing by means of a simpler process in comparison with prior arts. <P>SOLUTION: When a quantization section 1153 applies binary processing to a target pixel, a pattern matching section 1160 detects whether or not a plurality of pixels arranged consecutively to a target pixel and whose binary processing is finished are consecutively arranged by white pixels or black pixels only, and when the pattern matching section 1160 detects the consecutive arrangement, a threshold value change section 1161 changes a threshold value stored in a threshold value storage section 1154 so that the possibility of the consecutive arrangement of the target pixel and the pixels consecutively arranged thereto in a relation of white pixels or black pixels is lowered, and the quantization section 1153 applies binary processing to the target pixel by using the threshold value after being changed by the threshold value change section 161. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、スキャナ、複合機等の画像処理装置に関し、特に、入力画像に対して誤差拡散処理を行う画像処理装置及び画像処理プログラムに関する。   The present invention relates to an image processing apparatus such as a scanner or a multifunction peripheral, and more particularly to an image processing apparatus and an image processing program for performing error diffusion processing on an input image.

従来から、フルカラーの画像入力信号を、2値記録しかできない等、階調表現数に制限のあるプリンタや複合機で出力させるに際し、見かけ上の解像度と階調表現の低下を抑制するために、誤差拡散法による処理を施してフルカラー画像信号をハーフトーン画像信号に変換する方法が広く行なわれている。この誤差拡散法とは、読取り画像の注目画素の濃度と表示濃度との差(2値化誤差)を、以降に2値化する画素の画像信号に対して分配して加算することにより、広い範囲で見た場合に、2値画像の平均階調を多値画像の階調に近付けようとするものである。   Conventionally, when outputting a full-color image input signal with a printer or multifunction device having a limited number of gradation representations, such as only binary recording, in order to suppress a decrease in apparent resolution and gradation representation, A method of converting a full color image signal into a halftone image signal by performing processing by an error diffusion method is widely performed. In this error diffusion method, the difference (binarization error) between the density of the pixel of interest of the read image and the display density (binarization error) is distributed and added to the image signal of the pixel to be binarized thereafter. When viewed in a range, the average gradation of the binary image is to be brought closer to the gradation of the multi-valued image.

この誤差拡散処理後の出力画像には、ワーム・テクスチャと呼ばれる規則的な縞模様が出現して画質が悪化する場合があるため、このワーム・テクスチャの発生防止を目的として、下記特許文献1に示す画像処理方法が提案されている。この画像処理方法は、濃度変化の少ない入力画像信号では、ドットの発生を局所的に均一させるための閾値マトリクスと重み係数マトリクスを使用することで、ドット発生の偏りをなくし低濃度域でのワーム・テクスチャの発生を防止するものである。
特開2003−274172号公報
In the output image after the error diffusion processing, a regular striped pattern called a worm texture may appear and the image quality may deteriorate. For the purpose of preventing the occurrence of the worm texture, Patent Document 1 below describes An illustrated image processing method has been proposed. This image processing method uses a threshold matrix and a weighting coefficient matrix to make dot generation locally uniform in an input image signal with little change in density, thereby eliminating dot bias and generating a worm in a low density region. -It prevents the occurrence of texture.
JP 2003-274172 A

しかしながら、特許文献1に記載の画像処理方法の場合、ワーム・テクスチャの発生を防止するには、上記のように、ドットの発生を局所的に均一させるための閾値マトリクスと重み係数マトリクスとを用いる必要があるため、複雑な処理を行わなければワーム・テクスチャの発生を防止することができない。   However, in the case of the image processing method described in Patent Document 1, in order to prevent the occurrence of worm texture, as described above, the threshold value matrix and the weighting coefficient matrix for making the dot generation locally uniform are used. Since it is necessary, generation of a worm texture cannot be prevented unless complicated processing is performed.

本発明は、前記の問題を解決するためになされたもので、従来技術と比較して簡単な処理で、誤差拡散処理時におけるワーム・テクスチャの発生を抑制可能にすることを目的とするものである。   The present invention has been made to solve the above-described problems, and it is an object of the present invention to make it possible to suppress the occurrence of worm textures during error diffusion processing with simple processing compared to the prior art. is there.

本発明の請求項1に記載の発明は、予め定められた閾値を用いた注目画素の2値化処理時に発生した誤差を、2値化処理前の周辺画素に拡散し、当該誤差が拡散された各画素を注目画素とした2値化処理を順次行っていく誤差拡散処理部を備えた画像処理装置において、
前記誤差拡散処理部は、前記閾値を記憶する閾値記憶部と、この閾値記憶部に記憶されている閾値を用いて注目画素に対する前記2値化処理を行う2値化処理部と、前記2値化処理部による注目画素の2値化処理時に、当該注目画素に連続して配置されている2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されているかを検出する繋がり検出部と、この繋がり検出部によって前記連続配置が検出された場合、前記閾値記憶部に記憶されている閾値を、前記注目画素と前記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性が低くなる値に変更する閾値変更部とを備え、
前記2値化処理部は、前記閾値変更部による変更後の閾値を用いて、注目画素の2値化処理を行うものである。
The invention according to claim 1 of the present invention diffuses an error generated during binarization processing of a target pixel using a predetermined threshold value to peripheral pixels before binarization processing, and the error is diffused. In an image processing apparatus including an error diffusion processing unit that sequentially performs binarization processing using each pixel as a target pixel,
The error diffusion processing unit includes a threshold value storage unit that stores the threshold value, a binarization processing unit that performs the binarization process on the pixel of interest using the threshold value stored in the threshold value storage unit, and the binary value At the time of binarization processing of a target pixel by the binarization processing unit, it is detected whether a plurality of binarized pixels that are continuously arranged on the target pixel are arranged continuously between white pixels or black pixels And when the continuous detection is detected by the connection detection unit, the threshold value stored in the threshold value storage unit is determined based on whether the target pixel and the continuously arranged pixel are white pixels or black pixels. A threshold value changing unit that changes to a value that reduces the possibility that pixels are continuously arranged;
The binarization processing unit performs binarization processing of the target pixel using the threshold value changed by the threshold value changing unit.

また、請求項6に記載の発明は、予め定められた閾値を用いた注目画素の2値化処理時に発生した誤差を、2値化処理前の周辺画素に拡散し、当該誤差が拡散された各画素を注目画素とした2値化処理を順次行っていく誤差拡散処理部を備えた画像処理装置として、情報処理装置を機能させる画像処理プログラムであって、
前記誤差拡散処理部は、前記閾値を記憶する閾値記憶部と、この閾値記憶部に記憶されている閾値を用いて注目画素に対する前記2値化処理を行う2値化処理部と、前記2値化処理部による注目画素の2値化処理時に、当該注目画素に連続して配置されている2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されているかを検出する繋がり検出部と、この繋がり検出部によって前記連続配置が検出された場合、前記閾値記憶部に記憶されている閾値を、前記注目画素と前記連続配置されている画素とは白画素同士又は黒画素同士で連続配置され難い値に変更する閾値変更部とを備え、
前記2値化処理部が、前記閾値変更部による変更後の閾値を用いて、注目画素の2値化処理を行うように、前記情報処理装置を機能させる画像処理プログラムである。
The invention according to claim 6 diffuses an error generated during binarization processing of a target pixel using a predetermined threshold value to peripheral pixels before binarization processing, and the error is diffused. An image processing program that causes an information processing device to function as an image processing device including an error diffusion processing unit that sequentially performs binarization processing using each pixel as a target pixel,
The error diffusion processing unit includes a threshold value storage unit that stores the threshold value, a binarization processing unit that performs the binarization process on the pixel of interest using the threshold value stored in the threshold value storage unit, and the binary value At the time of binarization processing of a target pixel by the binarization processing unit, it is detected whether a plurality of binarized pixels that are continuously arranged on the target pixel are arranged continuously between white pixels or black pixels When the continuous arrangement is detected by the connection detection unit and the connection detection unit, the threshold value stored in the threshold value storage unit is determined based on whether the target pixel and the continuously arranged pixel are white pixels or black pixels. A threshold value changing unit that changes to a value that is difficult to be continuously arranged between pixels,
The image processing program causes the information processing apparatus to function so that the binarization processing unit performs binarization processing of a pixel of interest using a threshold value changed by the threshold value changing unit.

これらの構成では、2値化処理部によって注目画素の2値化処理が行われる時に、繋がり検出部によって、当該注目画素に連続して配置されている2値化処理済みの複数の画素が白画素同士又は黒画素同士で連続配置されているかが検出され、当該連続配置が検出された場合には、閾値変更部が、閾値記憶部に記憶されている閾値を、前記注目画素と前記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性の低くなる値に変更し、このように閾値変更部が変更した後の閾値を用いて、上記2値化処理部が注目画素の2値化処理を行うことによって、当該2値化処理部による2値化処理後の画像データに、白画素同士又は黒画素同士が連続配置されて現れる事態を低減し、ワーム・テクスチャの発生を抑制する。   In these configurations, when the binarization processing unit performs binarization processing on the target pixel, the connection detection unit causes the plurality of binarized pixels that are arranged consecutively to the target pixel to be white. It is detected whether the pixels are arranged continuously or between the black pixels. When the continuous arrangement is detected, the threshold value changing unit sets the threshold value stored in the threshold value storage unit to the pixel of interest and the continuous arrangement. The binarization processing unit is changed to a value that is unlikely to be continuously arranged between white pixels or black pixels, and the threshold value changing unit changes in this way. Reduces the occurrence of white pixels or black pixels continuously appearing in the image data after the binarization processing by the binarization processing unit by performing the binarization processing of the target pixel. Suppresses the occurrence of texture.

また、請求項2に記載の発明は、請求項1に記載の画像処理装置であって、前記閾値変更部は、前記注目画素に連続して配置されている2値化処理済みの複数の画素が黒画素同士で連続配置されていると前記繋がり検出部によって検出された場合には、前記閾値記憶部に記憶されている閾値を、黒画素を示す値に近付けるものである。   The invention according to claim 2 is the image processing apparatus according to claim 1, wherein the threshold value changing unit is a plurality of binarized pixels that are arranged continuously to the target pixel. When the connection detection unit detects that the black pixels are continuously arranged between the black pixels, the threshold value stored in the threshold value storage unit is brought close to the value indicating the black pixel.

この構成によれば、前記注目画素に連続して配置されている2値化処理済みの複数の画素が黒画素同士で連続配置されている場合には、上記閾値を黒画素を示す値に近付けることによって、2値化処理部が当該閾値を用いて注目画素の2値化処理を行ったときに、当該注目画素が白画素に変換される可能性を高くしている。   According to this configuration, when a plurality of binarized pixels that are continuously arranged on the target pixel are arranged continuously with black pixels, the threshold value is brought close to a value indicating a black pixel. Thus, when the binarization processing unit performs the binarization process on the target pixel using the threshold value, the possibility that the target pixel is converted into a white pixel is increased.

また、請求項3に記載の発明は、請求項1又は請求項2に記載の画像処理装置であって、前記閾値変更部は、前記注目画素に連続して配置されている2値化処理済みの複数の画素が白画素同士で連続配置されていると前記繋がり検出部によって検出された場合には、前記閾値記憶部に記憶されている閾値を、白画素を示す値に近付けるものである。   The invention according to claim 3 is the image processing apparatus according to claim 1 or 2, wherein the threshold value changing unit has been binarized and arranged continuously to the target pixel. When the connection detection unit detects that the plurality of pixels are continuously arranged with white pixels, the threshold value stored in the threshold value storage unit is brought close to a value indicating a white pixel.

この構成によれば、前記注目画素に連続して配置されている2値化処理済みの複数の画素が白画素同士で連続配置されている場合には、上記閾値を白画素を示す値に近付けることによって、2値化処理部が当該閾値を用いて注目画素の2値化処理を行ったときに、当該注目画素が黒画素に変換される可能性を高くしている。   According to this configuration, when a plurality of binarized pixels that are continuously arranged with respect to the target pixel are continuously arranged with white pixels, the threshold value is brought close to a value indicating a white pixel. As a result, when the binarization processing unit performs the binarization process on the target pixel using the threshold value, the possibility that the target pixel is converted into a black pixel is increased.

また、請求項4に記載の発明は、請求項1乃至請求項3いずれかに記載の画像処理装置であって、前記注目画素が写真画像領域又は文字画像領域のいずれに属するかを判別する領域判別部を更に備え、
前記閾値変更部は、前記領域判別部によって前記注目画素が写真画像領域に属すると判別された場合にのみ、前記繋がり検出部によって前記連続配置が検出されると、前記閾値記憶部に記憶されている閾値の上記変更を行うものである。
According to a fourth aspect of the present invention, there is provided the image processing device according to any one of the first to third aspects, wherein an area for determining whether the target pixel belongs to a photographic image area or a character image area. Further comprising a discriminator;
The threshold value changing unit is stored in the threshold value storage unit when the continuous arrangement is detected by the connection detecting unit only when the pixel of interest is determined to belong to a photographic image region by the region determining unit. The above threshold value is changed.

この構成によれば、注目画素が写真画像領域に属する場合にのみ、閾値変更部が、繋がり検出部によって前記連続配置が検出されたときに前記閾値を変更するので、当該注目画素が、例えば文字画像領域に属すると想定される場合には、2値化処理後も元画像の状態が維持され、白画素同士又は黒画素同士の連続配置は断ち切られ難くなり、文字画像についての良好な階調再現と、写真画像についてのワーム・テクスチャを除去した階調再現とを両立させることができる。   According to this configuration, only when the target pixel belongs to the photographic image area, the threshold value changing unit changes the threshold value when the continuous detection is detected by the connection detection unit. When it is assumed that it belongs to the image area, the state of the original image is maintained even after the binarization process, and it is difficult to cut off the continuous arrangement of white pixels or black pixels. It is possible to achieve both reproduction and gradation reproduction from which a worm texture for a photographic image is removed.

また、請求項5記載の発明は、請求項1乃至請求項4いずれかに記載の画像処理装置であって、前記注目画素のエッジ度を求めるエッジ度算出手段を更に備え、
前記閾値変更部は、前記エッジ度算出手段により求められたエッジ度が予め設定されたエッジ度よりも高い場合には、前記繋がり検出部によって前記連続配置が検出された場合であっても、前記閾値記憶部に記憶されている閾値を変更しないものである。
The invention according to claim 5 is the image processing apparatus according to any one of claims 1 to 4, further comprising an edge degree calculating means for obtaining an edge degree of the target pixel,
In the case where the edge degree obtained by the edge degree calculating means is higher than a preset edge degree, the threshold value changing unit may be the case where the continuous arrangement is detected by the connection detecting unit. The threshold value stored in the threshold value storage unit is not changed.

この構成によれば、注目画素のエッジ度が高い場合には、閾値変更部は、繋がり検出部によって前記連続配置が検出されても前記閾値を変更せず、注目画素と前記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性を操作しない。これにより、注目画素のエッジ度が高い場合、すなわち、当該注目画素が文字画像を示すものであると想定される場合には、2値化処理後も元画像の状態が維持され、白画素同士又は黒画素同士の連続配置が断ち切られ難いので、文字画像についての良好な階調再現と、注目画像のエッジ度が高くなく写真領域と想定される画像についてのワーム・テクスチャを除去した階調再現とを両立させることができる。   According to this configuration, when the edge degree of the target pixel is high, the threshold value changing unit does not change the threshold value even if the continuous arrangement is detected by the connection detection unit, and is continuously arranged with the target pixel. It does not manipulate the possibility that pixels are continuously arranged between white pixels or black pixels. Thereby, when the edge degree of the target pixel is high, that is, when it is assumed that the target pixel indicates a character image, the state of the original image is maintained even after the binarization process, and the white pixels Or, since it is difficult to cut off the continuous arrangement of black pixels, good gradation reproduction for character images, and gradation reproduction that removes worms and textures for images that are assumed to be photographic areas where the edge of the target image is not high Can be made compatible.

請求項1及び請求項6に記載の発明によれば、2値化処理部によって注目画素の2値化処理が行われる時に、当該注目画素に連続して配置されている2値化処理済みの複数の画素が白画素同士又は黒画素同士で連続配置されているか否かに応じて、上記2値化処理に用いる閾値を変化させることによって、当該注目画素と上記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性が低くなるようにするので、従来の技術と比較して簡単な処理によって、2値化処理後の画像データに、白画素同士又は黒画素同士が連続配置されて現れる事態を低減し、ワーム・テクスチャの発生を抑制することができる。   According to the first and sixth aspects of the present invention, when the binarization processing unit performs binarization processing on the target pixel, the binarization processing that has been continuously arranged on the target pixel has been performed. By changing the threshold value used for the binarization processing according to whether or not a plurality of pixels are continuously arranged between white pixels or between black pixels, the pixel of interest and the pixels arranged continuously are changed. Since the possibility that the white pixels or the black pixels are continuously arranged is reduced, the white pixel or the black pixel is added to the binarized image data by a simple process as compared with the conventional technique. It is possible to reduce the situation where they appear in a continuous arrangement, and to suppress the occurrence of worm texture.

請求項2に記載の発明によれば、前記注目画素に連続して配置されている2値化処理済みの複数の画素が黒画素同士で連続配置されている場合には、上記閾値を黒画素を示す値に近付け、当該注目画素が2値化処理後に白画素に変換される可能性を高くするので、注目画素と当該注目画素に連続して配置されている2値化処理済みの複数の画素とが黒画素同士で連続して配置される事態が抑制され、ワーム・テクスチャの発生を抑制することができる。   According to a second aspect of the present invention, when a plurality of binarized pixels that are arranged continuously with the target pixel are arranged continuously with black pixels, the threshold value is set to black pixels. To increase the possibility that the target pixel will be converted to a white pixel after the binarization process, so that a plurality of binarized and processed pixels arranged consecutively to the target pixel and the target pixel are displayed. The situation where pixels are continuously arranged with black pixels is suppressed, and the occurrence of worm texture can be suppressed.

請求項3に記載の発明によれば、前記注目画素に連続して配置されている2値化処理済みの複数の画素が白画素同士で連続配置されている場合には、上記閾値を白画素を示す値に近付け、当該注目画素が2値化処理後に黒画素に変換される可能性を高くするので、注目画素と当該注目画素に連続して配置されている2値化処理済みの複数の画素とが白画素同士で連続して配置される事態が抑制され、ワーム・テクスチャの発生を抑制することができる。   According to a third aspect of the present invention, when a plurality of binarized pixels that are continuously arranged on the target pixel are continuously arranged between white pixels, the threshold value is set to a white pixel. To increase the possibility that the target pixel will be converted to a black pixel after the binarization process, so that a plurality of binarized and processed pixels arranged consecutively to the target pixel and the target pixel are displayed. The situation where pixels are continuously arranged with white pixels is suppressed, and the occurrence of worm texture can be suppressed.

請求項4に記載の発明によれば、2値化処理の対象となる注目画素が写真領域に属する場合にのみ、閾値変更部による閾値変更を行うので、例えば、注目画素が文字画像領域に属すると想定される場合には、2値化処理後も元画像の状態が維持され、白画素同士又は黒画素同士の連続配置は断ち切られ難くなり、文字画像についての良好な階調再現と、写真領域についてのワーム・テクスチャを除去した階調再現とを両立させることができる。   According to the fourth aspect of the present invention, the threshold value changing unit performs the threshold value change only when the target pixel to be binarized belongs to the photo area. For example, the target pixel belongs to the character image area. Is assumed, the state of the original image is maintained even after the binarization process, the continuous arrangement of white pixels or black pixels is difficult to cut off, and good tone reproduction for character images and photographs It is possible to achieve both gradation reproduction from which the worm texture for the region is removed.

請求項5に記載の発明によれば、2値化処理の対象となる注目画素のエッジ度が高い場合、すなわち、当該注目画素が文字画像を示すものであると想定される場合には、2値化処理後も元画像の状態が維持され、白画素同士又は黒画素同士の連続配置は断ち切られ難いので、文字画像についての良好な階調再現と、注目画像のエッジ度が高くなく写真領域と想定される画像についてのワーム・テクスチャを除去した階調再現とを両立させることができる。   According to the fifth aspect of the present invention, when the edge degree of the target pixel to be binarized is high, that is, when it is assumed that the target pixel indicates a character image, 2 The original image state is maintained even after the binarization process, and it is difficult to cut off the continuous arrangement of white pixels or black pixels. Therefore, it is possible to achieve both gradation reproduction from which the worm and texture are removed from the assumed image.

以下、本発明に係る画像処理装置の一例として、プリンタ機能を備えた複合機について図面を参照しながら説明する。図1は、本発明の一実施形態に係る画像処理装置の一例である複合機1の内部構成を概略的に示す断面図である。複合機1は、コピー機能、プリンタ機能、スキャナ機能及びファクシミリ機能等の機能を兼ね備えたものである。この複合機1は、本体部2と、本体部2の左方に配設されたスタックトレイ3と、本体部2の上部に配設された原稿読取部5と、原稿読取部5の上方に配設された原稿給送部6とを有している。   Hereinafter, as an example of an image processing apparatus according to the present invention, a multifunction machine having a printer function will be described with reference to the drawings. FIG. 1 is a cross-sectional view schematically showing an internal configuration of a multifunction machine 1 which is an example of an image processing apparatus according to an embodiment of the present invention. The multifunction device 1 has functions such as a copy function, a printer function, a scanner function, and a facsimile function. The multi-function device 1 includes a main body 2, a stack tray 3 disposed on the left side of the main body 2, a document reading unit 5 disposed on the top of the main body 2, and an upper side of the document reading unit 5. And a document feeding unit 6 disposed.

また、複合機1のフロント部には、操作部47が設けられている。この操作部47には、ユーザが印刷実行指示を入力するためのスタートキー471と、印刷部数等を入力するためのテンキー472と、各種複写動作の操作ガイド情報等を表示し、これら各種設定入力用にタッチパネル機能を有する液晶ディスプレイ等からなる表示部473と、表示部473で設定された設定内容等をリセットするリセットキー474と、実行中の印刷(画像形成)動作を停止させるためのストップキー475と、コピー機能、プリンタ機能、スキャナ機能及びファクシミリ機能を切り換えるための機能切換キー477が備えられている。   An operation unit 47 is provided at the front part of the multifunction machine 1. The operation unit 47 displays a start key 471 for a user to input a print execution instruction, a ten key 472 for inputting the number of copies to be printed, operation guide information for various copying operations, and the like. A display unit 473 formed of a liquid crystal display or the like having a touch panel function, a reset key 474 for resetting setting contents set in the display unit 473, and a stop key for stopping a printing (image forming) operation being executed 475 and a function switching key 477 for switching between a copy function, a printer function, a scanner function, and a facsimile function.

原稿読取部5は、CCD(Charge Coupled Device)センサ及び露光ランプ等からなるスキャナ部51と、ガラス等の透明部材により構成された原稿台52及び原稿読取スリット53とを備える。スキャナ部51は、図略の駆動部によって移動可能に構成され、原稿台52に載置された原稿を読み取るときは、原稿台52に対向する位置で原稿面に沿って移動され、原稿画像を走査しつつ取得した画像データを制御部10(図2)へ出力する。また、原稿給送部6により給送された原稿を読み取るときは、原稿読取スリット53と対向する位置に移動され、原稿読取スリット53を介して原稿給送部6による原稿の搬送動作と同期して原稿の画像を取得し、その画像データを制御部10へ出力する。   The document reading unit 5 includes a scanner unit 51 including a CCD (Charge Coupled Device) sensor and an exposure lamp, and a document table 52 and a document reading slit 53 made of a transparent member such as glass. The scanner unit 51 is configured to be movable by a drive unit (not shown). When reading a document placed on the document table 52, the scanner unit 51 is moved along the document surface at a position facing the document table 52, and the document image is scanned. The image data acquired while scanning is output to the control unit 10 (FIG. 2). Further, when reading a document fed by the document feeding unit 6, the document is moved to a position facing the document reading slit 53 and synchronized with the document feeding operation by the document feeding unit 6 via the document reading slit 53. The image of the original is acquired and the image data is output to the control unit 10.

原稿給送部6は、原稿を載置するための原稿載置部61と、画像読み取り済みの原稿を排出するための原稿排出部62と、原稿載置部61に載置された原稿を1枚ずつ繰り出して原稿読取スリット53に対向する位置へ搬送し、原稿排出部62へ排出するための給紙ローラ(図略)、搬送ローラ(図略)等からなる原稿搬送機構63を備える。原稿搬送機構63は、さらに原稿を表裏反転させて原稿読取スリット53と対向する位置へ再搬送する用紙反転機構(図略)を備え、原稿の両面の画像を原稿読取スリット53を介してスキャナ部51から読取可能にしている。   The document feeding unit 6 includes a document placing unit 61 for placing a document, a document discharge unit 62 for discharging a document whose image has been read, and a document placed on the document placing unit 61. A document transport mechanism 63 including a paper feed roller (not shown), a transport roller (not shown) and the like for feeding the paper one by one to a position facing the document reading slit 53 and discharging it to the document discharge section 62 is provided. The document conveyance mechanism 63 further includes a sheet reversing mechanism (not shown) that reverses the document and reversely conveys the document to a position facing the document reading slit 53, and scans both sides of the document through the document reading slit 53. 51 can be read.

また、原稿給送部6は、その前面側が上方に移動可能となるように本体部2に対して回動自在に設けられている。原稿給送部6の前面側を上方に移動させて原稿台52上面を開放することにより、原稿台52の上面に読み取り原稿、例えば見開き状態にされた書籍等を操作者が載置できるようになっている。   The document feeding unit 6 is provided so as to be rotatable with respect to the main body unit 2 so that the front side thereof can move upward. By moving the front side of the document feeder 6 upward to open the upper surface of the document table 52, the operator can place a read document, for example, a book in a spread state, on the upper surface of the document table 52. It has become.

本体部2は、複数の給紙カセット461と、給紙カセット461から記録紙を1枚ずつ繰り出して記録部40へ搬送する給紙ローラ462と、給紙カセット461から搬送されてきた記録紙に画像を形成する記録部40とを備える。   The main body 2 includes a plurality of paper feed cassettes 461, a paper feed roller 462 that feeds the recording paper from the paper feed cassette 461 one by one and transports it to the recording unit 40, and a recording paper transported from the paper feed cassette 461. And a recording unit 40 for forming an image.

記録部40は、感光体ドラム43の表面から残留電荷を除電する除電装置421と、除電後の感光体ドラム43の表面を帯電させる帯電装置422と、スキャナ部51で取得された画像データに基づいてレーザ光を出力して感光体ドラム43表面を露光し、当該感光体ドラム43の表面に静電潜像を形成する露光装置423と、上記静電潜像に基づいて感光体ドラム43上に、シアン(C)、マゼンタ(M)、イエロー(Y)及びブラック(K)の各色のトナー像を形成する現像装置44K,44Y,44M,44Cと、感光体ドラム43に形成された各色のトナー画像が転写されて重ね合わせされる転写ドラム49と、転写ドラム49上のトナー像を用紙に転写させる転写装置41と、トナー像が転写された用紙を加熱してトナー像を用紙に定着させる定着装置45とを備えている。なお、シアン、マゼンタ、イエロー及びブラックの各色に対するトナーの供給は、図略のトナー供給容器(トナーカートリッジ)から行われる。また、記録部40を通過した記録紙をスタックトレイ3又は排出トレイ48まで搬送する搬送ローラ463,464等が設けられている。   The recording unit 40 is based on a charge eliminating device 421 that removes residual charges from the surface of the photosensitive drum 43, a charging device 422 that charges the surface of the photosensitive drum 43 after charge removal, and image data acquired by the scanner unit 51. The laser beam is output to expose the surface of the photosensitive drum 43, and an exposure device 423 for forming an electrostatic latent image on the surface of the photosensitive drum 43, and on the photosensitive drum 43 based on the electrostatic latent image. , Cyan (C), magenta (M), yellow (Y), and black (K) toner images of respective colors formed on the photosensitive drum 43 and developing devices 44K, 44Y, 44M, and 44C that form toner images of the respective colors. The transfer drum 49 on which the image is transferred and superimposed, the transfer device 41 that transfers the toner image on the transfer drum 49 to the paper, and the paper on which the toner image has been transferred are heated to transfer the toner image to the paper And a fixing device 45 for fixing. Note that toner is supplied to each color of cyan, magenta, yellow, and black from a toner supply container (toner cartridge) (not shown). In addition, conveyance rollers 463 and 464 that convey the recording paper that has passed through the recording unit 40 to the stack tray 3 or the discharge tray 48 are provided.

記録紙の両面に画像を形成する場合は、記録部40で記録紙の一方の面に画像を形成した後、この記録紙を排出トレイ48側の搬送ローラ463にニップされた状態とする。この状態で搬送ローラ463を反転させて記録紙をスイッチバックさせ、記録紙を用紙搬送路Lに送って記録部40の上流域に再度搬送し、記録部40により他方の面に画像を形成した後、記録紙をスタックトレイ3又は排出トレイ48に排出する。   When forming images on both sides of the recording paper, the recording unit 40 forms an image on one side of the recording paper, and then the recording paper is nipped by the conveyance roller 463 on the discharge tray 48 side. In this state, the conveyance roller 463 is reversed to switch back the recording paper, and the recording paper is sent to the paper conveyance path L and conveyed again to the upstream area of the recording unit 40, and an image is formed on the other surface by the recording unit 40. Thereafter, the recording paper is discharged to the stack tray 3 or the discharge tray 48.

図2は、図1に示す複合機1の概略構成を示す機能ブロック図である。複合機1は、装置全体の動作制御を司る制御部10を備えており、この制御部10は、スキャナ部51等からなる原稿読取部5、原稿搬送機構63等からなる原稿給送部6、現像装置44等からなる記録部40、スタートキー471、テンキー472等の操作キーや表示部473等からなる操作部47、画像メモリ7、HDD8、ネットワークI/F部9及び画像処理部11が接続されている。   FIG. 2 is a functional block diagram showing a schematic configuration of the multifunction machine 1 shown in FIG. The multifunction machine 1 includes a control unit 10 that controls the operation of the entire apparatus. The control unit 10 includes a document reading unit 5 including a scanner unit 51 and the like, a document feeding unit 6 including a document transport mechanism 63, and the like. Connected to the recording unit 40 including the developing device 44, the operation keys such as the start key 471 and the numeric keypad 472, the operation unit 47 including the display unit 473, the image memory 7, the HDD 8, the network I / F unit 9, and the image processing unit 11. Has been.

画像メモリ7は、原稿読取部5によって読み取られた原稿(例えば網点原稿)の画像データ、あるいは、後述するネットワークI/F部9を介して図略の外部装置から送信されてきた画像データを一時的に記憶するメモリである。   The image memory 7 stores image data of a document (for example, a halftone document) read by the document reading unit 5 or image data transmitted from an external device (not shown) via a network I / F unit 9 described later. It is a memory that stores temporarily.

HDD(Hard Disk Drive)8は、原稿読取部5によって読み取られた原稿画像の画像データ及び外部装置から送信されてきた画像データ並びに当該画像データに設定されている出力形式等が記憶される記憶装置である。   An HDD (Hard Disk Drive) 8 is a storage device that stores image data of a document image read by the document reading unit 5, image data transmitted from an external device, an output format set in the image data, and the like. It is.

ネットワークI/F部9は、ネットワークインタフェース(例えば10/100Base-TX)等を用い、LANなどのネットワークを介して接続された外部装置との間における種々のデータの送受信を行うものである。   The network I / F unit 9 uses a network interface (for example, 10 / 100Base-TX) or the like to transmit and receive various data to and from an external device connected via a network such as a LAN.

画像処理部11は、原稿読取部5による原稿の読み取りによって得られた原稿画像(画像データ)に対する各種画像処理を行うものである。画像処理部11では、例えば原稿読取部5によって読み取られた原稿画像に対する画像データのA/D変換が行われ、当該A/D変換された画像データを用いて各種画像処理が行われる。画像処理部11は、シェーディング補正部111、入力γ補正部112、フィルタ処理部113、拡大・縮小処理部114及び誤差拡散処理部115を備えている。   The image processing unit 11 performs various image processes on a document image (image data) obtained by reading a document by the document reading unit 5. In the image processing unit 11, for example, A / D conversion of image data is performed on a document image read by the document reading unit 5, and various image processing is performed using the A / D converted image data. The image processing unit 11 includes a shading correction unit 111, an input γ correction unit 112, a filter processing unit 113, an enlargement / reduction processing unit 114, and an error diffusion processing unit 115.

シェーディング補正部111は、原稿読取部5によって読み取られた原稿画像のデータや、ネットワークI/F部9に入力された画像データに対して、より立体感を出すために陰影をつける処理を行うものである。入力γ補正部112は、画像データの入力濃度に対する出力濃度の関係を示す濃度変換曲線、すなわちガンマ曲線を用いて入出力の関係を変化させて画像の濃淡を修正する方法によって、モニタ等に表示される画像の明るさ、及び色の彩度等を調整する処理を行う。フィルタ処理部113は、画像データを構成する個々の画素に対し、周辺の画素との間で演算を行うことで画像に特殊効果を与える画像処理を行う。例えば、ぼかし、エッジの強調、雑音処理、モザイク処理、あるいはポスタリゼーションの画像処理のことである。拡大・縮小処理部114は、画像データの拡大及び縮小を行う処理を行う。   The shading correction unit 111 performs processing to add a shadow to the original image data read by the original reading unit 5 and the image data input to the network I / F unit 9 in order to provide a more stereoscopic effect. It is. The input γ correction unit 112 displays on a monitor or the like by using a density conversion curve indicating the relationship between the output density and the input density of the image data, that is, a method of correcting the shade of the image by changing the input / output relationship using the gamma curve. The process of adjusting the brightness of the image to be displayed and the color saturation is performed. The filter processing unit 113 performs image processing that gives a special effect to an image by performing calculation with respect to surrounding pixels for each pixel constituting the image data. For example, blurring, edge enhancement, noise processing, mosaic processing, or posterization image processing. The enlargement / reduction processing unit 114 performs processing for enlarging and reducing image data.

誤差拡散処理部115は、元の濃淡画像と出力画像との濃度の誤差が最小となるように、2値化した画素の誤差を隣接する周囲の画素に拡散しながら更に2値化処理を進めていく、いわゆる誤差拡散処理を行うものである。誤差拡散処理部115は、予め定められた閾値を用いて注目画素の2値化処理を行い、その2値化処理時に発生した誤差を、2値化処理前の周辺画素に拡散し、当該誤差が拡散された各画素を注目画素として次々に2値化処理を順次行っていくようになっている。なお、2値化処理とは、濃淡画像を、白及び黒だけで、中間色である灰色(グレー)の階調等のない2値(1bit)画像に変換する処理である。本発明では、この誤差拡散処理(2値化処理)の手法に特徴を有する。誤差拡散処理部115の構成及び処理についての詳細は後述する。この誤差拡散処理部115による誤差拡散処理後、必要に応じて地肌判定処理等の必要な画像処理が施されてから、記録部40等に画像データが出力される。   The error diffusion processing unit 115 further proceeds the binarization process while diffusing the binarized pixel error to adjacent neighboring pixels so that the density error between the original grayscale image and the output image is minimized. This is what is called error diffusion processing. The error diffusion processing unit 115 performs binarization processing on the pixel of interest using a predetermined threshold value, diffuses an error generated during the binarization processing to surrounding pixels before the binarization processing, and the error The binarization process is sequentially performed for each pixel in which is diffused as the target pixel. The binarization process is a process of converting a grayscale image into a binary (1 bit) image that includes only white and black and does not have a gray level of an intermediate color. The present invention is characterized by this error diffusion processing (binarization processing) technique. Details of the configuration and processing of the error diffusion processing unit 115 will be described later. After the error diffusion processing by the error diffusion processing unit 115, necessary image processing such as background determination processing is performed as necessary, and then image data is output to the recording unit 40 or the like.

制御部10は、複合機1の制御プログラムを記憶するROM(Read Only Memory)、一時的にデータを保管するRAM(Random Access Memory)、及び制御プログラム等を上記ROMから読み出して実行するマイクロ情報処理装置等からなり、操作部47において入力された指示情報や、本装置の各所に設けられた各種センサからの検出信号に応じて装置全体の制御を行う処理を実行する。   The control unit 10 includes a ROM (Read Only Memory) that stores a control program of the multifunction device 1, a RAM (Random Access Memory) that temporarily stores data, and a micro information processing that reads and executes a control program from the ROM. The apparatus is composed of a device or the like, and executes processing for controlling the entire device in accordance with instruction information input in the operation unit 47 and detection signals from various sensors provided in various places of the device.

次に、画像処理部11の誤差拡散処理部115の具体的構成について説明する。図3は、本発明に基づいて、フルカラー画像(256階調)信号を2値化(2階調)信号に処理する際に誤差拡散処理を行なう場合の回路構成例を示すブロック図である。画像入力部1151は、画像メモリから注目画素Xが保有している値を取り込み、当該注目画素Xの画素値(濃度値)を加算器1152に出力する。加算器1152は、入力された注目画素Xの画素値に、累積誤差算出部1158で算出された累積誤差を加算する補正を行うものである。   Next, a specific configuration of the error diffusion processing unit 115 of the image processing unit 11 will be described. FIG. 3 is a block diagram showing a circuit configuration example in the case of performing error diffusion processing when processing a full color image (256 gradations) signal into a binarized (2 gradations) signal based on the present invention. The image input unit 1151 takes in the value held by the pixel of interest X from the image memory, and outputs the pixel value (density value) of the pixel of interest X to the adder 1152. The adder 1152 performs correction to add the accumulated error calculated by the accumulated error calculation unit 1158 to the pixel value of the input target pixel X.

量子化部(2値化処理部)1153は、加算器1152から入力される上記補正後の画素値を2値化するために必要な、閾値を用いた判定を行うものである。量子化部1153は、加算器1152から入力されてくる補正後の画素値を、閾値記憶部1154に記憶されている閾値と比較して、白画素又は黒画素のいずれかを示す値に変換し、画像出力部1155に向けて出力する。   The quantization unit (binarization processing unit) 1153 performs a determination using a threshold necessary for binarizing the corrected pixel value input from the adder 1152. The quantization unit 1153 compares the corrected pixel value input from the adder 1152 with the threshold value stored in the threshold value storage unit 1154, and converts it to a value indicating either a white pixel or a black pixel. And output to the image output unit 1155.

減算器1156は、2値化前の元の画素値と、2値化後の画素値との誤差を算出するものであり、加算器1152から入力される補正後の画素値(2値化前の元の画素値)と、量子化部1153による2値化後の画素値との差を算出する。発生誤差記憶部1157は、減算器1156によって算出された誤差値を記憶する記憶部である。累積誤差算出部1158は、次に注目画素として量子化部1153による2値化処理の対象となる画素に対して、既に2値化済みの各周辺画素が発生させた誤差の累積を加算するために、当該2値化済みの各周辺画素が発生させた誤差を累積しておくものである。   The subtractor 1156 calculates an error between the original pixel value before binarization and the pixel value after binarization, and the corrected pixel value (before binarization) input from the adder 1152. And a pixel value after binarization by the quantization unit 1153 is calculated. The generated error storage unit 1157 is a storage unit that stores the error value calculated by the subtracter 1156. The accumulated error calculation unit 1158 adds the accumulation of errors generated by the respective binarized pixels already binarized to the pixel to be binarized by the quantization unit 1153 as the next pixel of interest. In addition, the error generated by each binarized peripheral pixel is accumulated.

また、出力画像記憶部1159は、量子化部1153によって2値化された各画素の判定結果を記憶しておく記憶部である。パターンマッチング部(繋がり検出部)1160は、量子化部1153による注目画素Xの2値化処理時に、上記出力画像記憶部1159に記憶されている各画素値に基づいて、当該注目画素Xに連続して配置されている既に2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されているかを検出するものである。   The output image storage unit 1159 is a storage unit that stores the determination result of each pixel binarized by the quantization unit 1153. The pattern matching unit (connection detection unit) 1160 is continuously connected to the target pixel X based on each pixel value stored in the output image storage unit 1159 during the binarization process of the target pixel X by the quantization unit 1153. In other words, it is detected whether a plurality of already binarized pixels that are arranged in this manner are arranged continuously between white pixels or between black pixels.

ここで、パターンマッチング部1160による上記連続配置検出処理を説明する。図4は画像メモリの画素配列を示す図であり、A,B,C,Dは周辺画素を、Xは2値化処理の対象となる注目画素である。例えば、当該図4に示すように、注目画素Xの2値化処理時には、(1)パターンマッチング部1160が、この注目画素Xよりも前に既に2値化処理が済んでいる周辺画素であって、注目画素Xに対して横に並んで配置されている2つの周辺画素A,Aが、白画素同士又は黒画素同士となって連続しているか否かを検出する。(2)同様に、パターンマッチング部1160は、注目画素Xよりも前に既に2値化処理が済んでいる周辺画素であって、注目画素Xに対して斜めに並んで配置されている2つの周辺画素B,Bが白画素同士又は黒画素同士で連続しているか否か、同じく斜めに並んで配置されている2つの周辺画素D,Dが白画素同士又は黒画素同士で連続しているか否か、(3)さらには、注目画素Xに対して縦に並んで配置されている2つの周辺画素C,Cが白画素同士又は黒画素同士で連続しているか否か、を検出する。そして、パターンマッチング部1160は、上記2つの周辺画素が白画素同士又は黒画素同士となって連続していることを検出した場合には、その旨を示す信号を閾値変更部1161に出力する。   Here, the continuous arrangement detection process by the pattern matching unit 1160 will be described. FIG. 4 is a diagram showing a pixel arrangement of the image memory, in which A, B, C, and D are peripheral pixels, and X is a pixel of interest to be subjected to binarization processing. For example, as shown in FIG. 4, during the binarization process of the target pixel X, (1) the pattern matching unit 1160 is a peripheral pixel that has already been binarized before the target pixel X. Thus, it is detected whether the two peripheral pixels A and A arranged side by side with respect to the target pixel X are continuous as white pixels or black pixels. (2) Similarly, the pattern matching unit 1160 is a peripheral pixel that has already undergone binarization processing before the target pixel X, and is arranged in two diagonally with respect to the target pixel X. Whether the peripheral pixels B and B are continuous between white pixels or black pixels, or whether two peripheral pixels D and D that are arranged in the same diagonal direction are continuous between white pixels or black pixels (3) Furthermore, it is detected whether two peripheral pixels C, C arranged vertically with respect to the target pixel X are continuous between white pixels or black pixels. If the pattern matching unit 1160 detects that the two peripheral pixels are continuous as white pixels or black pixels, the pattern matching unit 1160 outputs a signal indicating that to the threshold value changing unit 1161.

閾値変更部1161は、上記パターンマッチング部1160から、2つの周辺画素の白画素同士又は黒画素同士での連続配置を検出したことを示す信号を受け取った場合に、閾値記憶部1154に記憶されている閾値を、注目画素Xと上記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性が低くなる値に変更するものである。   When the threshold value changing unit 1161 receives a signal from the pattern matching unit 1160 indicating that a continuous arrangement of two neighboring pixels between white pixels or black pixels is detected, the threshold value changing unit 1161 is stored in the threshold value storage unit 1154. The threshold value is changed to a value that reduces the possibility that the target pixel X and the pixels that are continuously arranged are continuously arranged between white pixels or black pixels.

例えば、上記周辺画素A,A、周辺画素B,B、周辺画素C,C、周辺画素D,Dのいずれかが黒画素同士で連続している場合、閾値変更部1161は、閾値記憶部1154に記憶されている閾値を、黒画素を示す値に近付くように変更する。具体的には、黒画素が256階調の255、白画素が256階調の0である場合であって、上記閾値が128である場合、当該閾値を255に近付ける。例えば、それまでの閾値128を、160、192、又は224…のいずれかに変更する、というように、注目画素Xが黒画素に変換される可能性が低くなるように(白画素に変換される可能性が高くなるように)、閾値を変更する。変更する閾値の値は、任意に設定が可能である。   For example, when any one of the peripheral pixels A and A, the peripheral pixels B and B, the peripheral pixels C and C, and the peripheral pixels D and D is continuous between the black pixels, the threshold value changing unit 1161 includes the threshold value storage unit 1154. Is changed so as to approach a value indicating a black pixel. Specifically, when the black pixel has 256 gradation 255 and the white pixel has 256 gradation 0, and the threshold is 128, the threshold is brought close to 255. For example, the threshold value 128 is changed to any one of 160, 192, 224... So that the possibility that the target pixel X is converted to a black pixel is reduced (converted to a white pixel). Change the threshold). The threshold value to be changed can be arbitrarily set.

また、上記周辺画素A,A、周辺画素B,B、周辺画素C,C、周辺画素D,Dいずれかが白画素同士で連続している場合、閾値変更部1161は、閾値記憶部1154に記憶されている閾値を、白画素を示す値に近付くように変更する。具体的には、上記閾値が256階調における中間値の128である場合、当該閾値を0に近づける。例えば、それまでの閾値128を、96、64、又は32…のいずれかに変更する、というように、注目画素Xが白画素に変換される可能性が低くなるように(黒画素に変換される可能性が高くなるように)、閾値を変更する。   When any one of the peripheral pixels A and A, the peripheral pixels B and B, the peripheral pixels C and C, and the peripheral pixels D and D are continuous with each other, the threshold value changing unit 1161 stores the threshold value storage unit 1154 in the threshold value storage unit 1154. The stored threshold value is changed so as to approach a value indicating a white pixel. Specifically, when the threshold value is an intermediate value of 128 in 256 gradations, the threshold value is brought close to 0. For example, the threshold value 128 is changed to one of 96, 64, 32,... So that the possibility that the target pixel X is converted into a white pixel is reduced (converted into a black pixel). Change the threshold).

なお、パターンマッチング部1160によって、上記周辺画素A,A、周辺画素B,B、周辺画素C,C、周辺画素D,Dのいずれにも黒画素同士又は白画素同士の連続が検出されなかった場合は、閾値変更部1161は、上記閾値変更を行わない。   Note that the pattern matching unit 1160 did not detect the continuity of black pixels or white pixels in any of the peripheral pixels A and A, the peripheral pixels B and B, the peripheral pixels C and C, and the peripheral pixels D and D. In this case, the threshold value changing unit 1161 does not change the threshold value.

量子化部1153による2値化処理は、上記閾値変更部1161によって変更された後の閾値に基づいて、注目画素Xの2値化処理を行う。   The binarization process by the quantization unit 1153 performs the binarization process for the pixel of interest X based on the threshold value changed by the threshold value change unit 1161.

このように構成された誤差拡散処理部115の動作について説明する。ラインメモリから画像入力部1151を介して入力された注目画素Xの画素値(濃度値)が、加算器1152に入力される。さらに加算器1152には、他の画素の誤差拡散処理の際に当該画素に累積された累積誤差が累積誤差算出部1158も入力される。加算器1152は、上記画素値と累積誤差とを加算する処理を行ない、量子化部1153に出力する。   The operation of the error diffusion processing unit 115 configured as described above will be described. The pixel value (density value) of the target pixel X input from the line memory via the image input unit 1151 is input to the adder 1152. Further, the accumulated error calculation unit 1158 also receives the accumulated error accumulated in the pixel during the error diffusion process of other pixels. The adder 1152 performs a process of adding the pixel value and the accumulated error, and outputs the result to the quantization unit 1153.

このとき、パターンマッチング部1160は、出力画像記憶部1159に記憶されている各画素値に基づいて、当該注目画素Xに連続して配置されている2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されているかを検出し、当該連続配置が検出された場合には、閾値変更部1161が、閾値記憶部1154に記憶されている閾値を、上述したように、注目画素Xと上記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性が低くなる値に変更する。閾値変更部1161は、上記連続配置が検出されない場合には、閾値記憶部1154に記憶されている閾値は変更しない。   At this time, based on each pixel value stored in the output image storage unit 1159, the pattern matching unit 1160 determines that a plurality of binarized pixels that are arranged continuously to the target pixel X are white. Whether the pixels are continuously arranged between the pixels or the black pixels is detected, and when the continuous arrangement is detected, the threshold value changing unit 1161 sets the threshold value stored in the threshold value storage unit 1154 as described above. The pixel of interest X and the continuously arranged pixels are changed to values that reduce the possibility that the white pixels or the black pixels are continuously arranged. The threshold value changing unit 1161 does not change the threshold value stored in the threshold value storage unit 1154 when the continuous arrangement is not detected.

量子化部1153は、閾値記憶部1154に記憶されている上記閾値と比較して2値化を行なう。例えば閾値を256階調の中間値である128階調に設定している場合、補正画素値が128よりも大きければ黒(1)と判定し、128よりも小さければ白(0)と判定する。かかる判定結果は、画像出力部1155に向けて出力される。   The quantization unit 1153 performs binarization in comparison with the threshold value stored in the threshold value storage unit 1154. For example, when the threshold value is set to 128 gradations, which is an intermediate value of 256 gradations, black (1) is determined if the correction pixel value is greater than 128, and white (0) is determined if the correction pixel value is smaller than 128. . The determination result is output toward the image output unit 1155.

上記判定結果は、減算器1156にも入力される。一方、加算器1152から出力される補正後の画素値も減算器1156に入力される。減算器1156は、これらの値を減算処理して2値化誤差を算出する。具体的には、黒(1)を256階調の255と、白(0)を256階調の0と扱うものとし、量子化部1153で黒(1)と判定された場合にあっては、加算器1152から出力される補正後の画素値から255を減算したものが、白(0)と判定された場合にあっては上記補正後の画素値がそのまま減算値とされ、かかる値が2値化誤差(注目画素Xの発生誤差)とされる。このようにして算出された注目画素Xの2値化誤差に基づいて、累積誤差算出部1158が、当該注目画素からみた各周辺画素に配分すべき配分量を算出し、未だ2値化処理を行っていない注目画素に対して加算する累積誤差を算出して記憶しておく。なお、上記量子化部1153の判定結果は、出力画像記憶部1159にも入力される。   The determination result is also input to the subtracter 1156. On the other hand, the corrected pixel value output from the adder 1152 is also input to the subtractor 1156. A subtracter 1156 subtracts these values to calculate a binarization error. Specifically, when black (1) is handled as 256 gradation 255 and white (0) is treated as 256 gradation 0, and the quantization unit 1153 determines black (1), If the value obtained by subtracting 255 from the corrected pixel value output from the adder 1152 is determined to be white (0), the corrected pixel value is directly used as the subtraction value. A binarization error (generation error of the target pixel X) is assumed. Based on the binarization error of the pixel of interest X calculated in this way, the cumulative error calculation unit 1158 calculates the distribution amount to be distributed to each peripheral pixel viewed from the pixel of interest, and the binarization process is still performed. A cumulative error to be added to a target pixel that has not been performed is calculated and stored. The determination result of the quantization unit 1153 is also input to the output image storage unit 1159.

このように、誤差拡散処理部115によって誤差拡散処理を行うと、図5(a)に示すように、誤差拡散処理部115からは、黒画素又は白画素の連続配置を要因とするワーム・テクスチャが軽減された画像が出力される。ちなみに、図5(b)は、閾値変更部1161による上記閾値変更を行わず、ワーム・テクスチャが発生している画像を示す図である。なお、閾値変更部1161による上記閾値変更により、注目画素Xと、これに連続して配置される周辺画素とが同じ画素同士で連続して配置されることを完全に断ち切るように上記閾値を変更しても良く(この場合、例えば、上記閾値を黒画素を示す255、白画素を示す0のいずれかに変更して、注目画素Xが上記周辺画素とは異なる画素に変換されるようにする)、本発明に係る画像処理は、そのような閾値変更を排除するものではないが、同じ画素同士での連続性を完全に断ち切らず、同じ画素同士が連続配置される可能性が低くなる値に変更するようにしておけば、元画像と2値化処理後の画像との同一性をある程度保った誤差拡散処理を行うことができる。   As described above, when the error diffusion processing is performed by the error diffusion processing unit 115, as shown in FIG. 5A, the error diffusion processing unit 115 receives a worm texture caused by the continuous arrangement of black pixels or white pixels. An image with reduced is output. Incidentally, FIG. 5B is a diagram illustrating an image in which a worm / texture is generated without performing the threshold value change by the threshold value changing unit 1161. Note that the threshold value is changed by the threshold value changing unit 1161 so that the pixel of interest X and neighboring pixels continuously arranged therewith are completely separated from the same pixel. (In this case, for example, the threshold value is changed to either 255 indicating a black pixel or 0 indicating a white pixel so that the pixel of interest X is converted to a pixel different from the peripheral pixels. ), The image processing according to the present invention does not exclude such a threshold change, but does not completely cut off the continuity between the same pixels, and the value that reduces the possibility that the same pixels are continuously arranged. If the change is made to, error diffusion processing can be performed while maintaining the same degree of identity between the original image and the binarized image.

[他の好ましい実施形態]
なお、本発明は上記実施の形態の構成に限られず種々の変形が可能である。
[Other preferred embodiments]
The present invention is not limited to the configuration of the above embodiment, and various modifications can be made.

(A)上記実施形態では、パターンマッチング部1160によって、注目画素Xに連続して配置されている2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されていると検出された場合に、閾値変更部1161による上記閾値変更を行うものとしているが、制御部10又は画像処理部11が、注目画素Xが写真画像領域又は文字画像領域のいずれに属するかを判別する領域判別部を更に備えるものとし、閾値変更部1161は、領域判別部によって注目画素Xが文字画像領域に属すると判別された場合には、パターンマッチング部1160によって上記連続配置が検出された場合であっても、閾値記憶部1154に記憶されている閾値を変更しないようにしてもよい。   (A) In the above embodiment, when the pattern matching unit 1160 continuously arranges a plurality of binarized pixels that are continuously arranged on the target pixel X between white pixels or black pixels. When it is detected, the threshold value changing unit 1161 performs the threshold value change. However, the control unit 10 or the image processing unit 11 determines whether the target pixel X belongs to a photographic image region or a character image region. It is assumed that an area discriminating unit is further provided, and the threshold value changing unit 1161 is a case where the pattern matching unit 1160 detects the continuous arrangement when the pixel discriminating pixel X is discriminated to belong to the character image area. Even if it exists, you may make it not change the threshold value memorize | stored in the threshold value memory | storage part 1154. FIG.

例えば、(1)上記領域判別部として、注目画素Xのエッジ度を求めるエッジ度算出部を備え、閾値変更部1161は、エッジ度算出部により求められたエッジ度が予め設定されたエッジ度よりも高い場合には、パターンマッチング部1160によって上記連続配置が検出された場合であっても、閾値記憶部1154に記憶されている閾値を変更しないようにしてもよい。このエッジ度算出方法は、注目画素Xの画素値とその周辺の画素の画素値とから算出されるあらゆる形態を含み得る。   For example, (1) the region determination unit includes an edge degree calculation unit that obtains the edge degree of the pixel of interest X, and the threshold value changing unit 1161 uses the edge degree obtained by the edge degree calculation unit based on a preset edge degree. If it is higher, the threshold value stored in the threshold value storage unit 1154 may not be changed even when the pattern matching unit 1160 detects the continuous arrangement. This edge degree calculation method can include all forms calculated from the pixel value of the pixel of interest X and the pixel values of surrounding pixels.

(2)また、上記領域判別部として、注目画素Xの濃度値に基づいて、注目画素Xが中間濃度領域(中間階調領域)に属するか否かを判別する中間濃度領域判別部を備え、これにより注目画素Xが中間濃度領域に属すると判別された場合(当該注目画素Xが写真領域に属すると想定される場合等)にのみ、閾値変更部1161による上記閾値変更を行うようにしてもよい。このようにすれば、黒画素又は白画素の連続性が必要な文字エッジについては、上記閾値変更によって、黒画素又は白画素の連続性が断ち切られないようにして、良好な画像変換を行うことができる。   (2) Further, as the region determination unit, an intermediate density region determination unit that determines whether the target pixel X belongs to the intermediate density region (intermediate gradation region) based on the density value of the target pixel X, Thus, only when it is determined that the pixel of interest X belongs to the intermediate density region (when it is assumed that the pixel of interest X belongs to the photographic region, etc.), the threshold value changing unit 1161 may change the threshold value. Good. In this way, for character edges that require continuity of black pixels or white pixels, good image conversion is performed by preventing the continuity of black pixels or white pixels from being cut off by changing the threshold value. Can do.

(B)なお、上記実施形態に示した、制御部10の領域判別部(エッジ度算出部、中間濃度領域判別部)、さらに、画像処理部11のシェーディング補正部111、入力γ補正部112、フィルタ処理部113、拡大・縮小処理部114及び誤差拡散処理部115等は、これら各部が個別に回路等で構成されていてもよいし、又は制御回路がHDD8等に記憶されている画像処理プログラムに従って、上記各部として機能するものとしてもよい。   (B) It should be noted that the region discriminating unit (edge degree calculating unit, intermediate density region discriminating unit) of the control unit 10, the shading correction unit 111, the input γ correction unit 112 of the image processing unit 11, shown in the above embodiment, The filter processing unit 113, the enlargement / reduction processing unit 114, the error diffusion processing unit 115, etc. may be configured such that each of these units is individually configured with a circuit or the like, or the control circuit is stored in the HDD 8 or the like According to the above, it is possible to function as each of the above parts.

(C)また、上記実施形態では、本発明に係る画像処理装置の一例として、複合機を示したが、本発明に係る画像処理装置は複合機に限定されるものではなく、他の画像形成装置や、情報処理装置等、他の装置であってもよい。   (C) In the above-described embodiment, the multifunction peripheral is shown as an example of the image processing apparatus according to the present invention. However, the image processing apparatus according to the present invention is not limited to the multifunction peripheral, and other image formation is performed. Another device such as a device or an information processing device may be used.

本発明の画像処理装置の一実施形態にかかる複合機の機械的構成を主に示す側面概略図である。1 is a schematic side view mainly showing a mechanical configuration of a multifunction peripheral according to an embodiment of an image processing apparatus of the present invention. 図1に示す複合機の電気的構成を示すブロック図である。FIG. 2 is a block diagram illustrating an electrical configuration of the multifunction machine illustrated in FIG. 1. 図2に示した誤差拡散処理部の具体的構成の一実施形態を示すブロック図である。FIG. 3 is a block diagram illustrating an embodiment of a specific configuration of an error diffusion processing unit illustrated in FIG. 2. 画像メモリの画素配列を示す図であり、A,B,C,Dは周辺画素を、Xは2値化処理の対象となる注目画素である。It is a figure which shows the pixel arrangement | sequence of an image memory, A, B, C, D is a surrounding pixel, X is an attention pixel used as the object of a binarization process. (a)は、誤差拡散処理部から出力された、ワーム・テクスチャが軽減された画像の一例を示す図、(b)は、閾値変更部による閾値変更が行われず、ワーム・テクスチャが発生している画像を示す図である。(A) is a diagram showing an example of an image output from the error diffusion processing unit with a reduced worm texture, and (b) is a case where the threshold value is not changed by the threshold value changing unit and a worm texture is generated. FIG.

符号の説明Explanation of symbols

1 複合機
11 画像処理部
115 誤差拡散処理部
1151 画像入力部
1152 加算器
1153 量子化部
1154 閾値記憶部
1155 画像出力部
1156 減算器
1157 発生誤差記憶部
1158 累積誤差算出部
1159 出力画像記憶部
1160 パターンマッチング部
1161 閾値変更部
1 MFP 11 Image Processing Unit 115 Error Diffusion Processing Unit 1151 Image Input Unit 1152 Adder 1153 Quantization Unit 1154 Threshold Storage Unit 1155 Image Output Unit 1156 Subtractor 1157 Generated Error Storage Unit 1158 Cumulative Error Calculation Unit 1159 Output Image Storage Unit 1160 Pattern matching unit 1161 Threshold value changing unit

Claims (6)

予め定められた閾値を用いた注目画素の2値化処理時に発生した誤差を、2値化処理前の周辺画素に拡散し、当該誤差が拡散された各画素を注目画素とした2値化処理を順次行っていく誤差拡散処理部を備えた画像処理装置において、
前記誤差拡散処理部は、前記閾値を記憶する閾値記憶部と、この閾値記憶部に記憶されている閾値を用いて注目画素に対する前記2値化処理を行う2値化処理部と、前記2値化処理部による注目画素の2値化処理時に、当該注目画素に連続して配置されている2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されているかを検出する繋がり検出部と、この繋がり検出部によって前記連続配置が検出された場合、前記閾値記憶部に記憶されている閾値を、前記注目画素と前記連続配置されている画素とが白画素同士又は黒画素同士で連続配置される可能性が低くなる値に変更する閾値変更部とを備え、
前記2値化処理部は、前記閾値変更部による変更後の閾値を用いて、注目画素の2値化処理を行う画像処理装置。
An error generated during binarization processing of a pixel of interest using a predetermined threshold value is diffused to surrounding pixels before the binarization processing, and binarization processing using each pixel in which the error is diffused as the pixel of interest In an image processing apparatus equipped with an error diffusion processing unit that sequentially performs
The error diffusion processing unit includes a threshold value storage unit that stores the threshold value, a binarization processing unit that performs the binarization process on the pixel of interest using the threshold value stored in the threshold value storage unit, and the binary value At the time of binarization processing of a target pixel by the binarization processing unit, it is detected whether a plurality of binarized pixels that are continuously arranged on the target pixel are arranged continuously between white pixels or black pixels And when the continuous detection is detected by the connection detection unit, the threshold value stored in the threshold value storage unit is determined based on whether the target pixel and the continuously arranged pixel are white pixels or black pixels. A threshold value changing unit that changes to a value that reduces the possibility that pixels are continuously arranged;
The binarization processing unit is an image processing apparatus that performs binarization processing of a pixel of interest using a threshold value changed by the threshold value changing unit.
前記閾値変更部は、前記注目画素に連続して配置されている2値化処理済みの複数の画素が黒画素同士で連続配置されていると前記繋がり検出部によって検出された場合には、前記閾値記憶部に記憶されている閾値を、黒画素を示す値に近付ける請求項1に記載の画像処理装置。   The threshold value changing unit, when the connection detection unit detects that the plurality of binarized pixels that are continuously arranged in the target pixel are arranged in black pixels, The image processing apparatus according to claim 1, wherein the threshold value stored in the threshold value storage unit is brought close to a value indicating a black pixel. 前記閾値変更部は、前記注目画素に連続して配置されている2値化処理済みの複数の画素が白画素同士で連続配置されていると前記繋がり検出部によって検出された場合には、前記閾値記憶部に記憶されている閾値を、白画素を示す値に近付ける請求項1又は請求項2に記載の画像処理装置。   The threshold value changing unit, when the connection detection unit detects that a plurality of binarized pixels that are continuously arranged in the target pixel are arranged in white pixels, The image processing apparatus according to claim 1, wherein the threshold value stored in the threshold value storage unit is close to a value indicating a white pixel. 前記注目画素が写真画像領域又は文字画像領域のいずれに属するかを判別する領域判別部を更に備え、
前記閾値変更部は、前記領域判別部によって前記注目画素が写真画像領域に属すると判別された場合にのみ、前記繋がり検出部によって前記連続配置が検出されると、前記閾値記憶部に記憶されている閾値の上記変更を行う請求項1乃至請求項3のいずれかに記載の画像処理装置。
An area discriminating unit for discriminating whether the pixel of interest belongs to a photographic image area or a character image area;
The threshold value changing unit is stored in the threshold value storage unit when the continuous arrangement is detected by the connection detecting unit only when the pixel of interest is determined to belong to a photographic image region by the region determining unit. The image processing apparatus according to claim 1, wherein the threshold value is changed.
前記注目画素のエッジ度を求めるエッジ度算出手段を更に備え、
前記閾値変更部は、前記エッジ度算出手段により求められたエッジ度が予め設定されたエッジ度よりも高い場合には、前記繋がり検出部によって前記連続配置が検出された場合であっても、前記閾値記憶部に記憶されている閾値を変更しない請求項1乃至請求項4のいずれかに記載の画像処理装置。
An edge degree calculating means for obtaining an edge degree of the target pixel;
In the case where the edge degree obtained by the edge degree calculating means is higher than a preset edge degree, the threshold value changing unit may be the case where the continuous arrangement is detected by the connection detecting unit. The image processing apparatus according to claim 1, wherein the threshold value stored in the threshold value storage unit is not changed.
予め定められた閾値を用いた注目画素の2値化処理時に発生した誤差を、2値化処理前の周辺画素に拡散し、当該誤差が拡散された各画素を注目画素とした2値化処理を順次行っていく誤差拡散処理部を備えた画像処理装置として、情報処理装置を機能させる画像処理プログラムであって、
前記誤差拡散処理部は、前記閾値を記憶する閾値記憶部と、この閾値記憶部に記憶されている閾値を用いて注目画素に対する前記2値化処理を行う2値化処理部と、前記2値化処理部による注目画素の2値化処理時に、当該注目画素に連続して配置されている2値化処理済みの複数の画素が、白画素同士又は黒画素同士で連続配置されているかを検出する繋がり検出部と、この繋がり検出部によって前記連続配置が検出された場合、前記閾値記憶部に記憶されている閾値を、前記注目画素と前記連続配置されている画素とは白画素同士又は黒画素同士で連続配置され難い値に変更する閾値変更部とを備え、
前記2値化処理部が、前記閾値変更部による変更後の閾値を用いて、注目画素の2値化処理を行うように、前記情報処理装置を機能させる画像処理プログラム。
An error generated during binarization processing of a pixel of interest using a predetermined threshold value is diffused to surrounding pixels before the binarization processing, and binarization processing using each pixel in which the error is diffused as the pixel of interest An image processing program for causing an information processing device to function as an image processing device including an error diffusion processing unit that sequentially performs processing,
The error diffusion processing unit includes a threshold value storage unit that stores the threshold value, a binarization processing unit that performs the binarization process on the pixel of interest using the threshold value stored in the threshold value storage unit, and the binary value At the time of binarization processing of a target pixel by the binarization processing unit, it is detected whether a plurality of binarized pixels that are continuously arranged on the target pixel are arranged continuously between white pixels or black pixels When the continuous arrangement is detected by the connection detection unit and the connection detection unit, the threshold value stored in the threshold value storage unit is determined based on whether the target pixel and the continuously arranged pixel are white pixels or black pixels. A threshold value changing unit that changes to a value that is difficult to be continuously arranged between pixels,
An image processing program for causing the information processing apparatus to function so that the binarization processing unit performs binarization processing on a pixel of interest using a threshold value changed by the threshold value changing unit.
JP2005102720A 2005-03-31 2005-03-31 Image processor and image processing program Pending JP2006287449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005102720A JP2006287449A (en) 2005-03-31 2005-03-31 Image processor and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005102720A JP2006287449A (en) 2005-03-31 2005-03-31 Image processor and image processing program

Publications (1)

Publication Number Publication Date
JP2006287449A true JP2006287449A (en) 2006-10-19

Family

ID=37408903

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005102720A Pending JP2006287449A (en) 2005-03-31 2005-03-31 Image processor and image processing program

Country Status (1)

Country Link
JP (1) JP2006287449A (en)

Similar Documents

Publication Publication Date Title
JP5265479B2 (en) Image reading apparatus and image forming apparatus
JP2002218235A (en) Image processor and image formation device
JP4934015B2 (en) Image processing apparatus and image reading apparatus
JP2002271616A (en) Image processing unit and imaging device
JP2002281313A (en) Image processor and image forming apparatus having the same
JP2011091595A (en) Image processor, image processing method and image forming apparatus
JP5103074B2 (en) Image processing apparatus and image forming apparatus
JP4158345B2 (en) Image processing apparatus, image forming apparatus, and image processing method
JP4053536B2 (en) Image processing device
JP2004214812A (en) Image processing apparatus
JP4871211B2 (en) Image processing apparatus and image forming apparatus
JP4849144B2 (en) Image reading apparatus and streak noise correction method
JP4146458B2 (en) Image processing apparatus and image processing program
JP2006287449A (en) Image processor and image processing program
JP2008294700A (en) Image processor, and image processing program
JP2011259008A (en) Image reading device, image processing device, image reading method and program
JP4814838B2 (en) Image processing apparatus and image forming apparatus
JP4871210B2 (en) Image processing apparatus and image forming apparatus
JP2008301266A (en) Image processing device and image forming apparatus
JP4856607B2 (en) Image forming apparatus, image processing apparatus, and image processing program
JP2006287595A (en) Image processor and image processing program
JP4814837B2 (en) Image processing apparatus and image forming apparatus
JP4027277B2 (en) Image processing device
JP5851371B2 (en) Image forming apparatus and image reading method
JP2010087826A (en) Image processing device, image reader, image forming apparatus, image processing method, program and recording medium therefor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080115

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080520