JP2011223082A - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP2011223082A
JP2011223082A JP2010086759A JP2010086759A JP2011223082A JP 2011223082 A JP2011223082 A JP 2011223082A JP 2010086759 A JP2010086759 A JP 2010086759A JP 2010086759 A JP2010086759 A JP 2010086759A JP 2011223082 A JP2011223082 A JP 2011223082A
Authority
JP
Japan
Prior art keywords
mask
pixel
edge
pixels
processing apparatus
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.)
Granted
Application number
JP2010086759A
Other languages
Japanese (ja)
Other versions
JP5569107B2 (en
Inventor
Masatoshi Matsudaira
正年 松平
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2010086759A priority Critical patent/JP5569107B2/en
Publication of JP2011223082A publication Critical patent/JP2011223082A/en
Application granted granted Critical
Publication of JP5569107B2 publication Critical patent/JP5569107B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus and a program that smoothly perform a gradation-value transformation process adapted for an pixel edge status.SOLUTION: Pixels of input image data are binarized by storing, in storage means, a blue noise mask BL having an arrangement of random threshold values having no regularity and a Bayer mask BY having an arrangement of threshold values having such regularity that differences at predetermined intervals serve as predetermined gradation values, and using threshold values of the blue noise mask BL for non-edge pixels among the pixels of the input image data, while using threshold values of the Bayer mask BY for edge pixels among the pixels of the input image data. This can prevent a binarization-caused pattern from appearing in portions other than the edge portions, and can prevent the degree of discreteness of a binarization result from being deviated in the edge portions. One set of threshold values in either mask is switched to another: there is no difference in technique for binarization between both masks. Smooth binarization can be performed since masks are stored in the storage means.

Description

本発明は、多階調の画像データを入力して2値化処理する画像処理装置およびプログラ
ムに関する。
The present invention relates to an image processing apparatus and a program that input multi-tone image data and perform binarization processing.

従来より、この種の画像処理装置としては、多階調の画像データを入力して所定の階調
値に変換処理するものが提案されている(例えば、特許文献1参照)。この装置では、入
力された画像データを構成する各画素がエッジ領域に属するか非エッジ領域に属するかを
判定し、エッジ領域に対しては誤差拡散法を適用し非エッジ領域に対してはブルーノイズ
マスク法を適用して階調値を変換することにより、文字周辺のエッジ領域においてドット
が不自然に飛び散ったような変換結果となるのを防止して各領域に適した変換処理を実現
できるとしている。
Conventionally, as this type of image processing apparatus, an apparatus that inputs multi-gradation image data and converts it into a predetermined gradation value has been proposed (for example, see Patent Document 1). In this apparatus, it is determined whether each pixel constituting the input image data belongs to an edge region or a non-edge region, and an error diffusion method is applied to the edge region and blue is applied to the non-edge region. By converting the tone value by applying the noise mask method, conversion results suitable for each area can be realized by preventing the conversion result that dots are scattered unnaturally in the edge area around the character. It is said.

特開2008−227759号公報JP 2008-227759 A

ここで、誤差拡散法では階調値変換する際に生じる誤差を周囲の画素に分散させて反映
させる必要があるため、閾値と処理対象画素の階調値とを単に比較して階調値を変換する
ブルーノイズマスク法に比して処理時間が掛かるものとなる。このため、画像に含まれる
エッジ領域の程度によっては、誤差拡散法を用いる領域が増えて階調値の変換処理に要す
る時間が長くなってしまう。また、誤差拡散法とブルーノイズマスク法のように処理方法
の異なる2つの処理を切り替えるものとすることにより、装置の構成が複雑なものとなる
ことがある。
Here, in the error diffusion method, since it is necessary to reflect the error generated when converting the gradation value by dispersing it in surrounding pixels, the threshold value is simply compared with the gradation value of the pixel to be processed to obtain the gradation value. Compared with the blue noise mask method to be converted, processing time is required. For this reason, depending on the degree of the edge area included in the image, the area using the error diffusion method increases, and the time required for the gradation value conversion process becomes longer. In addition, by switching between two processes having different processing methods such as the error diffusion method and the blue noise mask method, the configuration of the apparatus may be complicated.

本発明の画像処理装置およびプログラムは、画素のエッジ状態に適した階調値の変換処
理をよりスムーズに行なうことを主目的とする。
The main object of the image processing apparatus and program according to the present invention is to more smoothly perform gradation value conversion processing suitable for the edge state of a pixel.

本発明の画像処理装置およびプログラムは、上述の主目的を達成するために以下の手段
を採った。
The image processing apparatus and program of the present invention employ the following means in order to achieve the main object described above.

本発明の画像処理装置は、
多階調の画像データを入力して2値化処理する画像処理装置であって、
規則性のないランダムな閾値がマトリックス状に配置された第1のマスクと、所定間隔
毎の差分が所定の階調値となるよう規則性をもった閾値がマトリックス状に配置された第
2のマスクとを記憶する記憶手段と、
前記入力された画像データの各画素がエッジ部分に相当するエッジ画素であるか否かを
判定するエッジ画素判定手段と、
前記エッジ画素と判定されない画素については前記第1のマスクの閾値を用いて2値化
し、前記エッジ画素と判定された画素については前記第2のマスクの閾値を用いて2値化
する2値化手段と
を備えることを要旨とする。
The image processing apparatus of the present invention
An image processing apparatus that inputs multi-gradation image data and performs binarization processing,
A first mask in which random thresholds having no regularity are arranged in a matrix and a second mask in which thresholds having regularity are arranged in a matrix so that a difference at a predetermined interval becomes a predetermined gradation value. Storage means for storing a mask;
Edge pixel determination means for determining whether each pixel of the input image data is an edge pixel corresponding to an edge portion;
Binarization is performed using the threshold value of the first mask for pixels that are not determined as edge pixels, and binarization is performed using the threshold value of the second mask for pixels that are determined as edge pixels. And a means.

この本発明の画像処理装置では、規則性のないランダムな閾値がマトリックス状に配置
された第1のマスクと、所定間隔毎の差分が所定の階調値となるよう規則性をもった閾値
がマトリックス状に配置された第2のマスクとを記憶しておき、入力された画像データの
画素のうちエッジ画素と判定されない画素については第1のマスクの閾値を用いて2値化
し、エッジ画素と判定された画素については第2のマスクの閾値を用いて2値化する。こ
れにより、エッジ部分以外の部分においては2値化結果に規則性が現れることがなく2値
化に起因した模様が現れるのを防止することができると共にエッジ部分においては2値化
結果に所定間隔毎の規則性が現れるからその離散度合いに偏りが生じるのを防止すること
ができる。また、第1のマスクと第2のマスクとはいずれも記憶手段に記憶されており、
閾値と単純に比較する2値化手法であるから、誤差拡散法などと併用する場合に比して、
スムーズに2値化することができる。この結果、画素のエッジ状態に適した階調値変換処
理をよりスムーズに行なうことができる。
In the image processing apparatus according to the present invention, a first mask in which random thresholds having no regularity are arranged in a matrix and a threshold having regularity so that a difference at a predetermined interval becomes a predetermined gradation value. A second mask arranged in a matrix is stored, and pixels that are not determined as edge pixels among the pixels of the input image data are binarized using the threshold value of the first mask, The determined pixel is binarized using the threshold value of the second mask. As a result, regularity does not appear in the binarization result in the part other than the edge part, and it is possible to prevent the pattern resulting from the binarization from appearing and in the edge part, the binarization result has a predetermined interval. Since the regularity of each appears, it is possible to prevent a deviation from occurring in the degree of discreteness. Further, both the first mask and the second mask are stored in the storage means,
Since it is a binarization method that is simply compared with the threshold value, compared with the case of using it together with the error diffusion method,
It can be binarized smoothly. As a result, the gradation value conversion process suitable for the edge state of the pixel can be performed more smoothly.

こうした本発明の画像処理装置において、前記第1のマスクは、前記第2のマスクより
もマトリックスのサイズが大きなマスクであり、前記2値化手段は、前記入力された画像
データが前記第1または前記第2のマスクよりもマトリックスのサイズが大きい場合には
、該第1または該第2のマスクを繰り返し用いて2値化する手段であるものとすることが
できる。こうすれば、エッジ部分以外の部分においてマトリックスサイズに基づくブロッ
ク状のパターンが現れるのを抑えることができる。また、この態様の本発明の画像処理装
置において、前記第2のマスクは、前記多階調の各階調値が1度ずつ配置されてなるマス
クであり、前記第1のマスクは、前記第2のマスクの整数倍のサイズのマトリックスに前
記多階調の各階調値が前記整数倍の数ずつ配置されてなるマスクであるものとすることも
できる。ここで、第1のマスクは、ブルーノイズマスクであり、第2のマスクは、ベイヤ
ー型のディザマスクであるものとすることもできる。
In such an image processing apparatus of the present invention, the first mask is a mask having a larger matrix size than the second mask, and the binarizing means is configured such that the input image data is the first or the second mask. When the size of the matrix is larger than that of the second mask, the matrix may be a means for binarization by repeatedly using the first or second mask. By doing so, it is possible to suppress the appearance of a block-like pattern based on the matrix size in a portion other than the edge portion. In the image processing apparatus according to the aspect of the present invention, the second mask is a mask in which the gradation values of the multi-gradation are arranged once, and the first mask is the second mask. It is also possible to use a mask in which each gradation value of the multi-gradation is arranged in a matrix having a size that is an integral multiple of the mask. Here, the first mask may be a blue noise mask, and the second mask may be a Bayer-type dither mask.

また、媒体に形成された画像を読み取る画像読取装置を介して前記画像データを入力す
る本発明の画像処理装置において、前記エッジ画素判定手段は、前記エッジ画素であるか
否かの判定対象となる画素に隣接する所定数の画素間の階調値変化に基づいて前記判定を
行なう手段であるものとすることもできる。ここで、このような画像読取装置を介して入
力された画像データにおいては、装置の読取特性によってはエッジ部分の画素における階
調値の変化が本来の急峻な変化よりも緩やかな変化となることがある。そのような緩やか
に変化する部分のエッジ画素に対して第1のマスクの閾値を用いると2値化結果が不自然
に離散したり集合したりしたものとなるが、第2のマスクの閾値を用いることによりその
ような傾向が現れるのを防止することができるから、本発明を適用する意義が高いものと
なる。この態様の本発明の画像処理装置において、前記エッジ画素判定手段は、前記エッ
ジ画素であるか否かの判定対象となる画素の階調値が黒またはグレーを示す場合に前記判
定を行なう手段であるものとすることもできる。黒やグレーなどのエッジ部分は他の色に
比べて濃淡がはっきりとしたものとなり人目につきやすい部分となるから、本発明を適用
する意義がより高いものとなる。
Further, in the image processing apparatus of the present invention in which the image data is input via an image reading apparatus that reads an image formed on a medium, the edge pixel determination unit is a determination target of whether or not it is the edge pixel. It may be a means for performing the determination based on a gradation value change between a predetermined number of pixels adjacent to the pixel. Here, in the image data input through such an image reading device, the change in the gradation value of the pixel at the edge portion is more gradual than the original steep change depending on the reading characteristics of the device. There is. If the threshold value of the first mask is used for the edge pixel of such a slowly changing portion, the binarization result becomes unnaturally dispersed or aggregated. Since it can prevent such a tendency from appearing, the significance of applying the present invention becomes high. In this aspect of the image processing apparatus of the present invention, the edge pixel determination means is a means for performing the determination when a gradation value of a pixel to be determined as to whether or not it is the edge pixel indicates black or gray. It can also be. Edge portions such as black and gray are clearer than other colors and are easily noticeable, so that the significance of applying the present invention is higher.

本発明のプログラムは、コンピューターを上述したいずれかの本発明の画像処理装置と
して機能させるためのものである。このプログラムは、コンピューターが読み取り可能な
記録媒体(例えばハードディスク、ROM、FD、CD、DVDなど)に記録されていて
もよいし、伝送媒体(インターネットやLANなどの通信網)を介してあるコンピュータ
ーから別のコンピューターへ配信されてもよいし、その他どのような形で授受されてもよ
い。このプログラムをコンピューターに実行させれば、上述した画像処理装置と同様の効
果を得ることができる。
The program of the present invention is for causing a computer to function as any of the above-described image processing apparatuses of the present invention. This program may be recorded on a computer-readable recording medium (for example, hard disk, ROM, FD, CD, DVD, etc.) or from a computer via a transmission medium (communication network such as the Internet or LAN). It may be distributed to another computer, or may be exchanged in any other form. If this program is executed by a computer, the same effects as those of the image processing apparatus described above can be obtained.

マルチファンクションプリンター10の構成の概略を示す構成図。1 is a configuration diagram showing an outline of the configuration of a multifunction printer 10. FIG. コピーモード時処理ルーチンの一例を示すフローチャート。7 is a flowchart illustrating an example of a copy mode processing routine. エッジ判定処理の一例を示すフローチャート。The flowchart which shows an example of an edge determination process. x方向の階調値Dの変化の一例を示す説明図。Explanatory drawing which shows an example of the change of the gradation value D of a x direction. 2値化処理の一例を示すフローチャート。The flowchart which shows an example of a binarization process. ブルーノイズマスクBLの一例を示す説明図。Explanatory drawing which shows an example of the blue noise mask BL. ベイヤー型マスクBYの一例を示す説明図。Explanatory drawing which shows an example of Bayer type mask BY. 画像データが2値化される様子を示す説明図。Explanatory drawing which shows a mode that image data is binarized. マスクの違いによる2値化結果の違いの様子を示す説明図。Explanatory drawing which shows the mode of the difference of the binarization result by the difference of a mask.

次に、本発明の実施の形態を図面に基づいて説明する。図1は本発明の画像処理装置の
一実施形態であるマルチファンクションプリンター10の構成の概略を示す構成図である
。本実施形態のマルチファンクションプリンター10は、図示するように、画像データに
基づいて用紙Sに印刷を実行するプリンターユニット20と、ガラス台36に載置された
原稿を読み取るスキャナーユニット30と、メモリーカードスロット40に挿入されたメ
モリーカード42との間でデータを格納したファイルの入出力を行なうメモリーカードコ
ントローラー44と、各種情報を表示部52に表示したりユーザーの指示をボタン群54
の操作を介して入力したりする操作パネル50と、装置全体の制御を司るメインコントロ
ーラー60とを備える。このマルチファンクションプリンター10では、プリンターユニ
ット20やスキャナーユニット30,メモリーカードコントローラー44,メインコント
ローラー60がバス12を介して互いに各種制御信号やデータのやり取りをすることがで
きるよう構成されている。
Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a configuration diagram showing an outline of a configuration of a multi-function printer 10 which is an embodiment of an image processing apparatus of the present invention. As shown in the figure, the multifunction printer 10 of the present embodiment includes a printer unit 20 that executes printing on a sheet S based on image data, a scanner unit 30 that reads a document placed on a glass table 36, and a memory card. A memory card controller 44 for inputting / outputting a file storing data to / from the memory card 42 inserted in the slot 40, a button group 54 for displaying various types of information on the display unit 52 and user instructions.
And an operation panel 50 for inputting via the above operation, and a main controller 60 for controlling the entire apparatus. The multifunction printer 10 is configured such that the printer unit 20, the scanner unit 30, the memory card controller 44, and the main controller 60 can exchange various control signals and data with each other via the bus 12.

プリンターユニット20は、プリンターASIC22とプリンター機構24とを備える
。プリンターASIC22は、プリンター機構24を制御する集積回路であり、メインコ
ントローラー60から印刷指令を受けると、その印刷指令の対象となる画像データに基づ
いて用紙Sに画像を印刷するようプリンター機構24を制御する。また、プリンター機構
24は、印刷ヘッドから用紙SへC(シアン),マゼンタ(M),イエロー(Y),ブラ
ック(B)の各色のインクを吐出することにより印刷を行なう周知のインクジェット方式
のカラープリンター機構として構成されている。
The printer unit 20 includes a printer ASIC 22 and a printer mechanism 24. The printer ASIC 22 is an integrated circuit that controls the printer mechanism 24. Upon receiving a print command from the main controller 60, the printer ASIC 22 controls the printer mechanism 24 to print an image on the paper S based on the image data that is the target of the print command. To do. The printer mechanism 24 is a well-known ink jet color that performs printing by ejecting C (cyan), magenta (M), yellow (Y), and black (B) ink from the print head to the paper S. It is configured as a printer mechanism.

スキャナーユニット30は、スキャナーASIC32とスキャナー機構34とを備える
。スキャナーASIC32は、スキャナー機構34を制御する集積回路であり、メインコ
ントローラー60からの読取指令を受けると、ガラス台36に載置された原稿を画像デー
タとして読み取るようスキャナー機構34を制御する。また、スキャナー機構34は、周
知のイメージスキャナーとして構成され、原稿に向かって発光した後の反射光をレッド(
R)、グリーン(G)、ブルー(B)の各色に分解して画像データとする周知のカラーイ
メージセンサーを備えている。なお、画像データ(RGBデータ)は、縦横のマトリック
ス状に画素が配置され、配置される画素の各値は濃淡に応じて値0〜255の256階調
(8ビット)で表されるものとする。
The scanner unit 30 includes a scanner ASIC 32 and a scanner mechanism 34. The scanner ASIC 32 is an integrated circuit that controls the scanner mechanism 34. When the scanner ASIC 32 receives a reading command from the main controller 60, the scanner ASIC 32 controls the scanner mechanism 34 to read a document placed on the glass table 36 as image data. The scanner mechanism 34 is configured as a well-known image scanner, and the reflected light after emitting light toward the document is red (
A well-known color image sensor is provided which is separated into each color of R), green (G), and blue (B) and used as image data. The image data (RGB data) has pixels arranged in a vertical and horizontal matrix, and each value of the arranged pixels is represented by 256 gradations (8 bits) of values 0 to 255 according to the shade. To do.

メモリーカードコントローラー44は、メモリーカードスロット40に挿入されたメモ
リーカード42との間でデータを格納したファイルの入出力を行なうものである。このメ
モリーカードコントローラー44は、メモリーカードスロット40にメモリーカード42
が接続されているとき、メモリーカード42に記憶されているファイルを読み出してメイ
ンコントローラー60に送信したりメインコントローラー60からの命令を入力しその命
令に基づいてメモリーカード42にファイルを記憶したりする。
The memory card controller 44 inputs / outputs a file storing data with the memory card 42 inserted into the memory card slot 40. The memory card controller 44 has a memory card 42 in the memory card slot 40.
Is connected, the file stored in the memory card 42 is read and transmitted to the main controller 60, or a command is input from the main controller 60 and the file is stored in the memory card 42 based on the command. .

メインコントローラー60は、CPU62を中心とするマイクロプロセッサーとして構
成されており、各種処理プログラムや各種データ、各種テーブルなどを記憶したROM6
4と、一時的にスキャンデータや印刷データなどを記憶するRAM66と、電源を切って
もデータを保持可能なフラッシュメモリー68と、操作パネル50との通信を可能とする
内部通信インターフェース(I/F)69とを備える。なお、ROM64には、ディザ法
による2値化処理で用いられるブルーノイズマスクBLとベイヤー型マスクBYとが記憶
されており、これらの詳細については後述する。このメインコントローラー60は、プリ
ンターユニット20やスキャナーユニット30,メモリーカードコントローラー44から
の各種動作信号や各種検出信号を入力したり、操作パネル50のボタン群54の操作に応
じて発生する操作信号を入力したりする。また、メモリーカード42からファイルを読み
出してメインコントローラー60へ出力する読出指令をメモリーカードコントローラー4
4に出力したり、画像データの印刷を実行するようプリンターユニット20に印刷指令を
出力したり、操作パネル50のボタン群54のスキャン指示に基づいてガラス台36に載
置された原稿を画像データとして読み取るようスキャナーユニット30に読取指令を出力
したり、操作パネル50に表示部52の制御指令を出力したりする。なお、操作パネル5
0のボタン群54の操作により各種モードを選択可能となっており、選択可能なモードと
しては、ガラス台36に載置された原稿をスキャンしてコピーするコピーモードやメモリ
ーカード42に記憶された画像データを用いて画像を印刷したり原稿をスキャンしデータ
化してメモリーカード42に保存したりするメモリーカードモードなどがある。
The main controller 60 is configured as a microprocessor centered on the CPU 62, and is a ROM 6 storing various processing programs, various data, various tables, and the like.
4, a RAM 66 that temporarily stores scan data, print data, and the like, a flash memory 68 that can retain data even when the power is turned off, and an internal communication interface (I / F) that enables communication with the operation panel 50. 69). Note that the ROM 64 stores a blue noise mask BL and a Bayer mask BY used in the binarization processing by the dither method, and details thereof will be described later. The main controller 60 inputs various operation signals and various detection signals from the printer unit 20, the scanner unit 30, and the memory card controller 44, and inputs operation signals generated according to the operation of the button group 54 of the operation panel 50. To do. Also, a read command for reading a file from the memory card 42 and outputting it to the main controller 60 is sent to the memory card controller 4.
4, a print command is output to the printer unit 20 to execute printing of image data, and a document placed on the glass table 36 is converted into image data based on a scan instruction of the button group 54 of the operation panel 50. As a result, a reading command is output to the scanner unit 30 or a control command for the display unit 52 is output to the operation panel 50. The operation panel 5
Various modes can be selected by operating the button group 54 of 0. As selectable modes, a copy mode for scanning and copying a document placed on the glass table 36 and a memory card 42 are stored. There is a memory card mode in which an image is printed using image data, a document is scanned, converted into data, and stored in the memory card 42.

次に、こうして構成された本実施形態のマルチファンクションプリンター10の動作、
特に、コピーモードが選択された際の動作について説明する。図2は、メインコントロー
ラー60により実行されるコピーモード時処理ルーチンの一例を示すフローチャートであ
る。このルーチンは、ユーザーによるボタン群54の操作によりコピーモードが選択され
てコピー開始指示がなされたときに実行される。
Next, the operation of the multifunction printer 10 of the present embodiment configured as described above,
In particular, the operation when the copy mode is selected will be described. FIG. 2 is a flowchart illustrating an example of a copy mode processing routine executed by the main controller 60. This routine is executed when the copy mode is selected by the user operating the button group 54 and a copy start instruction is given.

コピーモード時処理ルーチンが実行されると、メインコントローラー60のCPU62
は、まず、スキャナーユニット30に読取指令を出力することによりガラス台36に載置
された原稿を読み取って(スキャン処理して)RGB表色系の画像データを生成する(ス
テップS100)。次に、生成した画像データの画素毎に画像のエッジ部分に相当するエ
ッジ画素であるかエッジ部分に相当しない非エッジ画素であるかを判定するエッジ判定処
理を行なって(ステップS110)、各8ビットのRGB表色系の画像データを各8ビッ
トのCMYK表色系の画像データに色変換処理を行なう(ステップS120)。続いて、
ROM64に記憶されているブルーノイズマスクBLやベイヤー型マスクBYをRAM6
6に展開し、これらのマスクの閾値を用いて色変換処理後のCMYK各8ビットの画像デ
ータをそれぞれ各2ビットの2値化データに変換するディザ法による2値化処理を行なう
(ステップS130)。2値化処理を行なうと、2値化処理後の画像データをプリンター
機構24の印刷ヘッドがドットを形成する順に展開処理して印刷指令の対象となる画像デ
ータを生成し(ステップS140)、プリンターユニット20に印刷指令を出力すること
により展開処理後の画像データに基づく印刷処理を行なって(ステップS150)、本ル
ーチンを終了する。以下、ステップS110のエッジ判定処理とステップS130の2値
化処理の詳細について順に説明する。
When the processing routine in the copy mode is executed, the CPU 62 of the main controller 60
First, by outputting a reading command to the scanner unit 30, the original placed on the glass table 36 is read (scanned) to generate RGB color system image data (step S100). Next, edge determination processing is performed for determining whether each pixel of the generated image data is an edge pixel corresponding to the edge portion of the image or a non-edge pixel not corresponding to the edge portion (step S110). A color conversion process is performed on the 8-bit RGB color system image data into 8-bit CMYK color system image data (step S120). continue,
The blue noise mask BL and Bayer mask BY stored in the ROM 64 are stored in the RAM 6.
6 and using the threshold values of these masks, binarization processing is performed by a dither method in which CMYK 8-bit image data after color conversion processing is converted into 2-bit binary data, respectively (step S130). ). When the binarization process is performed, the image data after the binarization process is developed in the order in which the print head of the printer mechanism 24 forms dots to generate image data that is the target of the print command (step S140), and the printer By outputting a print command to the unit 20, a print process based on the image data after the expansion process is performed (step S150), and this routine is terminated. Hereinafter, details of the edge determination processing in step S110 and the binarization processing in step S130 will be described in order.

まず、エッジ判定処理について説明する。図3は、エッジ判定処理の一例を示すフロー
チャートである。このエッジ判定処理では、まず、インデックス値yを値1に設定すると
共に(ステップS200)、インデックス値xを値1に設定し(ステップS210)、設
定したインデックス値xyに相当する画素を処理対象画素に設定する(ステップS220
)。ここで、インデックス値xyは、画像データにおいてマトリックス状に配置された画
素の位置座標を示す値として用いられるものであり、画像データ中の最も左上の画素のイ
ンデックス値x,yをそれぞれ値1とし、右方向をx方向,下方向をy方向として、右端
の画素をインデックス値xmaxとし下端の画素をインデックス値ymaxとして定める
ものとした。次に、設定した処理対象画素のRGBの各階調値が白色を示す階調値を除い
てR=G=Bであるか否かを判定する(ステップS230)。この処理は、処理対象画素
の色が黒やグレーを示すか否かを判定する処理となる。このような判定を行なう理由の詳
細については後述するが、エッジ判定処理で判定されたエッジ画素と非エッジ画素とに対
しては2値化処理時において異なる処理が行なわれ、特に黒やグレーのエッジ画素に対し
て処理を切り替える効果が顕著となることによる。
First, the edge determination process will be described. FIG. 3 is a flowchart illustrating an example of the edge determination process. In this edge determination process, first, the index value y is set to a value 1 (step S200), the index value x is set to a value 1 (step S210), and pixels corresponding to the set index value xy are processed pixels. (Step S220
). Here, the index value xy is used as a value indicating the position coordinates of the pixels arranged in a matrix in the image data, and the index value x, y of the upper left pixel in the image data is set to 1 respectively. The right direction is the x direction, the lower direction is the y direction, the rightmost pixel is defined as the index value xmax, and the lowermost pixel is defined as the index value ymax. Next, it is determined whether or not R = G = B except for the gradation values indicating white as the RGB gradation values of the set processing target pixel (step S230). This process is a process for determining whether or not the color of the pixel to be processed indicates black or gray. Although the details of the reason for performing such determination will be described later, different processing is performed during binarization processing on edge pixels and non-edge pixels determined in the edge determination processing. This is because the effect of switching the processing for the edge pixel becomes significant.

ステップS230でR=G=Bであると判定したときには、次式(1),(2)に基づ
いて処理対象画素のx方向に隣接する2つの画素の階調値Dの差分Δxと処理対象画素の
y方向に隣接する2つの画素の階調値Dの差分Δyとをそれぞれ算出する(ステップS2
40)。なお、いまR=G=Bの場合を考えているから、階調値DはR,G,Bのいずれ
の階調値を用いてもよい。また、処理対象画素が端部の画素に該当し隣接する画素が存在
しない場合には、階調値Dは値0として算出するものとする。次に、算出した差分Δxと
Δyとを用いて次式(3)に基づいてエッジ勾配aを算出し(ステップS250)、算出
したエッジ勾配aが所定の閾値arefを超えるか否かを判定する(ステップS260)
。エッジ勾配aが所定の閾値arefを超えると判定したときには処理対象画素はエッジ
画素であると判定しエッジ判定結果をインデックス値xyに関連付けてRAM66に登録
する(ステップS270)。一方、ステップS260でエッジ勾配aが所定の閾値are
fを超えないと判定したとき、あるいは、上述したステップS230でR=G=Bではな
いと判定したときには、処理対象画素は非エッジ画素であると判定しエッジ判定結果をイ
ンデックス値xyに関連付けてRAM66に登録する(ステップS280)。なお、所定
の閾値arefとしては、例えば、全256階調値に対して差分Δx,Δyのいずれか一
方でも値200を超える場合に処理対象画素がエッジ画素と判定される程度の値に設定す
るものとした。ここで、x方向における階調値Dの変化の一例を図4に示す。図4(a)
は、階調値Dの変化がそれほど大きくなく差分Δxが値200を超えない場合を示してお
り、処理対象画素は非エッジ画素と判定される。一方、図4(b),(c)では、階調値
Dが値0から値255まで大きく変化する場合を示しており、差分Δxが値200を超え
た変化となるために処理対象画素はエッジ画素と判定される。このように処理対象画素に
隣接する2つの画素の階調値Dの差分を用いて処理対象画素がエッジ画素であるか否かを
判定するのである。なお、本実施形態のようにスキャン処理して生成されたRGBデータ
においては、スキャナーユニット30の読取特性などにより、スキャン処理対象の画像に
おけるエッジ部分の画素が本来は階調値0と階調値255とが隣接する場合であっても緩
やかなエッジとなることがある。具体的には、図4(b)に示すような1画素間(ここで
は処理対象画素の左隣の画素から処理対象画素までの間)で急激に立ち上がるようなエッ
ジとはならず、図4(c)に示すような2以上の複数の画素間(ここでは処理対象画素の
左隣の画素から処理対象画図の右隣の画素までの2画素間)に亘って比較的緩やかに立ち
上がるようなエッジとなる。
When it is determined in step S230 that R = G = B, the difference Δx between the gradation values D of two pixels adjacent in the x direction of the processing target pixel and the processing target based on the following expressions (1) and (2) The difference Δy between the gradation values D of two pixels adjacent to each other in the y direction of the pixel is calculated (step S2).
40). Since the case of R = G = B is considered now, the gradation value D may be any gradation value of R, G, B. Further, when the pixel to be processed corresponds to the pixel at the end and there is no adjacent pixel, the gradation value D is calculated as a value 0. Next, an edge gradient a is calculated based on the following equation (3) using the calculated differences Δx and Δy (step S250), and it is determined whether or not the calculated edge gradient a exceeds a predetermined threshold value aref. (Step S260)
. When it is determined that the edge gradient a exceeds the predetermined threshold value aref, it is determined that the processing target pixel is an edge pixel, and the edge determination result is associated with the index value xy and registered in the RAM 66 (step S270). On the other hand, in step S260, the edge gradient a is a predetermined threshold value are.
When it is determined that f is not exceeded, or when it is determined that R = G = B is not satisfied in step S230 described above, it is determined that the processing target pixel is a non-edge pixel, and the edge determination result is associated with the index value xy. Registration is made in the RAM 66 (step S280). For example, the predetermined threshold value aref is set to a value such that the processing target pixel is determined to be an edge pixel when any of the differences Δx and Δy exceeds 200 for all 256 gradation values. It was supposed to be. Here, an example of the change of the gradation value D in the x direction is shown in FIG. FIG. 4 (a)
Indicates a case where the change in the gradation value D is not so large and the difference Δx does not exceed the value 200, and the processing target pixel is determined as a non-edge pixel. On the other hand, FIGS. 4B and 4C show a case where the gradation value D changes greatly from the value 0 to the value 255, and the difference Δx changes beyond the value 200. It is determined as an edge pixel. In this way, it is determined whether or not the processing target pixel is an edge pixel by using the difference between the gradation values D of two pixels adjacent to the processing target pixel. In the RGB data generated by the scan processing as in the present embodiment, the pixels at the edge portion in the image to be scanned are originally set to the gradation value 0 and the gradation value due to the reading characteristics of the scanner unit 30 and the like. Even when 255 is adjacent, a gentle edge may occur. Specifically, the edge does not suddenly rise between the pixels as shown in FIG. 4B (in this case, from the pixel adjacent to the left of the pixel to be processed to the pixel to be processed). As shown in (c), it rises relatively gently between a plurality of two or more pixels (here, two pixels from the pixel adjacent to the left of the processing target pixel to the pixel adjacent to the right of the processing target image). Become an edge.

Δx=D(x-1,y)-D(x+1,y) (1)
Δy=D(x,y-1)-D(x,Y+1) (2)
a=√(Δx^2+Δy^2) (3)
Δx = D (x-1, y) -D (x + 1, y) (1)
Δy = D (x, y-1) -D (x, Y + 1) (2)
a = √ (Δx ^ 2 + Δy ^ 2) (3)

こうしてエッジ画素であるか非エッジ画素であるかを判定してその結果を登録すると、
インデックス値xを値1だけインクリメントして(ステップS290)、インクリメント
したインデックス値xが最大値xmaxを超えるか否かを判定する(ステップS300)
。最大値xmaxを超えないと判定したときには、ステップS220に戻り処理を繰り返
す。一方、ステップS310で最大値xmaxを超えると判定したときには、インデック
ス値yを値1だけインクリメントして(ステップS310)、インクリメントしたインデ
ックス値yが最大値ymaxを超えるか否かを判定する(ステップS320)。最大値y
maxを超えないと判定したときには、ステップS210に戻り処理を繰り返し、最大値
ymaxを超えると判定したときにはすべての画素のエッジ判定が終了したと判断して、
本処理を終了する。
In this way, determining whether it is an edge pixel or a non-edge pixel and registering the result,
The index value x is incremented by 1 (step S290), and it is determined whether or not the incremented index value x exceeds the maximum value xmax (step S300).
. When it is determined that the maximum value xmax is not exceeded, the process returns to step S220 and is repeated. On the other hand, when it is determined in step S310 that the maximum value xmax is exceeded, the index value y is incremented by 1 (step S310), and it is determined whether or not the incremented index value y exceeds the maximum value ymax (step S320). ). Maximum value y
When it is determined that the value does not exceed max, the process returns to step S210 and the process is repeated. When it is determined that the value exceeds the maximum value ymax, it is determined that the edge determination for all the pixels is completed,
This process ends.

次に2値化処理について説明する。図5は、2値化処理の一例を示すフローチャートで
ある。この2値化処理では、まず、インデックス値yを値1に設定すると共に(ステップ
S400)、インデックス値xを値1に設定し(ステップS410)、設定したインデッ
クス値xyに相当する画素を処理対象画素に設定する(ステップS420)。このインデ
ックス値xyは、色変換処理後のCMYK表色系の画像データにおける画素の位置座標を
示す値として用いられ、図3のエッジ判定処理におけるインデックス値xyと同様に設定
されるものである。次に、図3のエッジ判定処理においてRAM66に登録したエッジ判
定結果から処理対象画素がエッジ画素であるか否かを判定する(ステップS430)。処
理対象画素が非エッジ画素即ちエッジ画素ではないと判定したときには、ブルーノイズマ
スクBLから処理対象画素のインデックス値xyに対応する位置の閾値を抽出し(ステッ
プS440)、抽出した閾値と処理対象画素の階調値との大小を比較して2値化する(ス
テップS460)。このブルーノイズマスクBLの一例を図6に示す。図示するように、
x方向に128画素分の閾値が配置されると共にy方向に64画素分の閾値が配置されて
いる。このブルーノイズマスクBLには、0〜255の全256階調の各階調値がそれぞ
れ32回ずつランダムに出現しており、いわゆるブルーノイズ特性を有するマスクとして
構成されている。なお、ステップS440で抽出されるブルーノイズマスクBLの閾値と
しては、x方向については処理対象画素のインデックス値xをブルーノイズマスクBLの
x方向の画素数(閾値数)である値128で除した余りの数値の位置であって、y方向に
ついてはインデックス値yをブルーノイズマスクBLのy方向の画素数(閾値数)である
値64で除した余りの数値の位置に該当する閾値が抽出されることになる。
Next, the binarization process will be described. FIG. 5 is a flowchart illustrating an example of the binarization process. In this binarization process, first, the index value y is set to a value 1 (step S400), the index value x is set to a value 1 (step S410), and a pixel corresponding to the set index value xy is processed. A pixel is set (step S420). This index value xy is used as a value indicating the position coordinates of the pixel in the image data of the CMYK color system after the color conversion process, and is set similarly to the index value xy in the edge determination process of FIG. Next, it is determined from the edge determination result registered in the RAM 66 in the edge determination process of FIG. 3 whether the processing target pixel is an edge pixel (step S430). When it is determined that the processing target pixel is not a non-edge pixel, that is, an edge pixel, a threshold value at a position corresponding to the index value xy of the processing target pixel is extracted from the blue noise mask BL (step S440), and the extracted threshold value and the processing target pixel are extracted. The gray level value is compared with a binary value and binarized (step S460). An example of the blue noise mask BL is shown in FIG. As shown,
A threshold value for 128 pixels is arranged in the x direction, and a threshold value for 64 pixels is arranged in the y direction. In this blue noise mask BL, each gradation value of all 256 gradations from 0 to 255 appears at random 32 times, and is configured as a mask having so-called blue noise characteristics. As the threshold value of the blue noise mask BL extracted in step S440, the index value x of the processing target pixel in the x direction is divided by a value 128 that is the number of pixels in the x direction (threshold number) of the blue noise mask BL. The threshold value corresponding to the position of the remainder numerical value is extracted in the y direction by dividing the index value y by the value 64 which is the number of pixels (threshold number) in the y direction of the blue noise mask BL. Will be.

一方、ステップS430で処理対象画素がエッジ画素であると判定したときには、ベイ
ヤー型マスクBYから処理対象画素のインデックス値xyに対応する位置の閾値を抽出し
(ステップS450)、ステップS460で抽出した閾値と処理対象画素の階調値との大
小を比較して2値化する。このベイヤー型マスクBYの一例を図7に示す。図示するよう
に、x方向,y方向にそれぞれ16画素分の閾値が配置されている。このため、全256
階調の各階調値がそれぞれ1度ずつ出現することになる。また、このベイヤー型マスクで
は、x方向においては、例えば最も上段の閾値が値0,128,32,160,8,13
6,・・・となっており、値0と値128との差分が全256階調の中央値である値12
8となり、値32と値160との差分や値8と値136との差分も同様に値128となる
よう閾値が配置されている。なお最上段以外の閾値も同様に、所定間隔毎に差分が値12
8となるよう閾値が配置されている。一方、y方向においては、例えば最も左端の列の閾
値が値0,192,48,240,・・・となっており、所定間隔毎に差分が値192と
なるよう閾値が配置されている。また、左端から2列目の閾値が値128,64,176
,112,・・・となっており、所定間隔毎に差分が64となるよう閾値が配置されてい
る。このような差分が値192となる列と差分が値64となる列とが交互に配置されてい
る。なお、値192と値64との平均値は、全256階調値の中央値である値128とで
ある。このように、ベイヤー型マスクBYでは、所定間隔毎の差分が所定値(値128や
値196,値64)となるよう規則性をもって閾値が配置されている。なお、ステップS
440で抽出されるベイヤー型マスクBYの閾値としては、x,y方向において処理対象
画素のインデックス値x,yをそれぞれベイヤー型マスクBYのx,y方向の画素数(閾
値数)である値16で除した余りの数値の位置に該当する閾値が抽出されることになる。
On the other hand, when it is determined in step S430 that the processing target pixel is an edge pixel, a threshold value at a position corresponding to the index value xy of the processing target pixel is extracted from the Bayer mask BY (step S450), and the threshold value extracted in step S460 is extracted. And the gradation value of the pixel to be processed are compared and binarized. An example of this Bayer type mask BY is shown in FIG. As shown in the figure, thresholds for 16 pixels are arranged in the x and y directions, respectively. Therefore, all 256
Each gradation value of the gradation appears once each. In the Bayer mask, in the x direction, for example, the uppermost threshold value has values 0, 128, 32, 160, 8, 13
6 and so on, and the difference between the value 0 and the value 128 is a value 12 that is the median value of all 256 gradations.
The threshold is arranged so that the difference between the value 32 and the value 160 and the difference between the value 8 and the value 136 are also the value 128. Similarly, the threshold values other than the uppermost level are also set to a difference of 12 at every predetermined interval.
The threshold value is arranged to be 8. On the other hand, in the y direction, for example, the threshold values of the leftmost column are values 0, 192, 48, 240,..., And the threshold values are arranged so that the difference becomes the value 192 at every predetermined interval. The threshold values in the second column from the left end are values 128, 64, and 176.
, 112,..., And the thresholds are arranged so that the difference becomes 64 at every predetermined interval. Such a column in which the difference is a value 192 and a column in which the difference is a value 64 are alternately arranged. The average value of the value 192 and the value 64 is a value 128 that is the median value of all 256 gradation values. As described above, in the Bayer mask BY, the thresholds are arranged with regularity so that the difference at each predetermined interval becomes a predetermined value (value 128, value 196, value 64). Step S
As the threshold value of the Bayer mask BY extracted at 440, the index value x and y of the pixel to be processed in the x and y directions is the value 16 that is the number of pixels (threshold number) in the x and y directions of the Bayer mask BY, respectively. The threshold value corresponding to the position of the remaining numerical value divided by is extracted.

こうして2値化を行なうと、インデックス値xを値1だけインクリメントして(ステッ
プS470)、インクリメントしたインデックス値xが最大値xmaxを超えるか否かを
判定する(ステップS480)。最大値xmaxを超えないと判定したときには、ステッ
プS420に戻り処理を繰り返す。一方、ステップS480で最大値xmaxを超えると
判定したときには、インデックス値yを値1だけインクリメントして(ステップS490
)、インクリメントしたインデックス値yが最大値ymaxを超えるか否かを判定する(
ステップS500)。最大値ymaxを超えないと判定したときには、ステップS410
に戻り処理を繰り返し、最大値ymaxを超えると判定したときにはすべての画素のエッ
ジ判定が終了したと判断して、本処理を終了する。
When binarization is performed in this way, the index value x is incremented by 1 (step S470), and it is determined whether or not the incremented index value x exceeds the maximum value xmax (step S480). If it is determined that the maximum value xmax is not exceeded, the process returns to step S420 and the process is repeated. On the other hand, if it is determined in step S480 that the maximum value xmax is exceeded, the index value y is incremented by 1 (step S490).
), It is determined whether or not the incremented index value y exceeds the maximum value ymax (
Step S500). If it is determined that the maximum value ymax is not exceeded, step S410 is performed.
The process is repeated, and when it is determined that the maximum value ymax is exceeded, it is determined that the edge determination of all the pixels has been completed, and this process ends.

ここで、画像データを2値化する際の様子について説明する。図8は、画像データが2
値化される様子を示す説明図である。なお、図8では、画像データやブルーノイズマスク
BL,ベイヤー型マスクBYは、一部分のみを拡大して示した。図示するように、エッジ
画素と判定されている画素(図中太線枠内の画素)以外の非エッジ画素については、ブル
ーノイズマスクBLから画素の位置(インデックス値xy)に対応する閾値が用いられる
(図中点線の矢印で示す)。一方、エッジ画素と判定されている画素については、ベイヤ
ー型マスクBYから画素の位置に対応する閾値が用いられる(図中実線の矢印で示す)。
ここで、上述したように、ブルーノイズマスクBLは、ベイヤー型マスクBYに比して大
きなマトリックスに規則性のないランダムな閾値が配置されており、一方、ベイヤー型マ
スクBYは、ブルーノイズマスクBLに比して小さなサイズのマトリックスに所定間隔毎
の差分が所定値となるよう規則性をもった閾値が配置されている。このため、例えば、画
像全体にベイヤー型マスクBYを用いた場合には、小さなマトリックスサイズに起因した
ブロックパターンが目立つものとなり2値化後の画像に擬似的な輪郭が生じたものとなっ
てしまう。一方、画像全体にブルーノイズマスクを用いると、マトリックスサイズが大き
いためにブロックパターンが生じるのを抑制することができる。ただし、文字や線画の周
辺部分などのように、ほぼ同値の階調値を有するエッジ画素が連続する部分であっても規
則性のないランダムな閾値により、2値化結果に不自然に離散したり集合したりする部分
が生じてしまう。そこで、エッジ画素に対しては、ベイヤー型マスクBYの閾値を用いる
ことで、規則性をもった2値化結果とするのである。ここで、図9は、マスクの違いによ
る2値化結果の違いの様子を示す説明図である。図9(1)が階調値Dが値190の画素
に対する違いを示し、図9(2)が階調値Dが値120の画素に対する違いを示す。なお
、2値化結果として、閾値が階調値Dより小さくなる画素を濃い色で図示し、閾値が階調
値Dより大きくなる画素を白色で図示するものとした。図示するように、いずれの場合も
ベイヤー型マスクを適用した方がブルーノイズマスクBLを適用したものに比べて規則的
なものとなっていることがわかる。なお、本実施形態における2値化処理は、ブルーノイ
ズマスクBLとベイヤー型マスクBYとのうちいずれのマスクの閾値を用いるかを切り替
えるものであり、2値化の手法自体が異なるものではないから煩雑な処理となることはな
い。また、これらのブルーノイズマスクBLとベイヤー型マスクBYとは、いずれもRO
M64に記憶され2値化処理時にRAM66に展開して閾値を抽出するものであるから、
誤差拡散法などのように2値化の誤差を周囲の画素に拡散させながら2値化するものに比
してスムーズに処理することができる。なお、上述した図3のエッジ判定処理において、
黒やグレーの画素を対象としてエッジ画素であるか否かを判定したのは、黒やグレーのエ
ッジ部分は他の色と比して濃淡がはっきりとしたものとなり、人目につきやすい部分とな
るから、そのような部分において不自然なドットが形成されるのを防止するためである。
Here, how the image data is binarized will be described. FIG. 8 shows that the image data is 2
It is explanatory drawing which shows a mode that it is digitized. In FIG. 8, only a part of the image data, the blue noise mask BL, and the Bayer mask BY is shown in an enlarged manner. As shown in the figure, for the non-edge pixels other than the pixels determined to be edge pixels (pixels within the bold line frame in the figure), a threshold value corresponding to the pixel position (index value xy) is used from the blue noise mask BL. (Indicated by dotted arrows in the figure). On the other hand, for pixels determined to be edge pixels, a threshold value corresponding to the pixel position from the Bayer mask BY is used (indicated by a solid arrow in the figure).
Here, as described above, in the blue noise mask BL, random thresholds having no regularity are arranged in a large matrix as compared with the Bayer type mask BY, while the Bayer type mask BY is the blue noise mask BL. A threshold having regularity is arranged in a matrix having a smaller size compared to the above so that a difference at a predetermined interval becomes a predetermined value. For this reason, for example, when the Bayer mask BY is used for the entire image, the block pattern due to the small matrix size becomes conspicuous and a pseudo contour is generated in the binarized image. . On the other hand, when a blue noise mask is used for the entire image, it is possible to suppress the occurrence of a block pattern due to the large matrix size. However, even in a portion where edge pixels having substantially the same gradation value, such as a peripheral portion of a character or a line drawing, are continuous, the binarization result is unnaturally dispersed due to a random threshold having no regularity. The part which gathers or gathers arises. Therefore, for the edge pixel, the threshold value of the Bayer mask BY is used to obtain a binarized result having regularity. Here, FIG. 9 is an explanatory diagram showing the difference in the binarization result due to the difference in mask. FIG. 9A shows the difference with respect to the pixel whose gradation value D is the value 190, and FIG. 9B shows the difference with respect to the pixel whose gradation value D is the value 120. Note that, as a binarization result, pixels whose threshold value is smaller than the gradation value D are illustrated in a dark color, and pixels whose threshold value is larger than the gradation value D are illustrated in white. As shown in the figure, it can be seen that in either case, the application of the Bayer mask is more regular than the application of the blue noise mask BL. Note that the binarization processing in the present embodiment switches which mask threshold value is used between the blue noise mask BL and the Bayer mask BY, and the binarization method itself is not different. There is no complicated process. These blue noise mask BL and Bayer mask BY are both RO.
Since it is stored in M64 and developed in the RAM 66 during binarization processing, a threshold value is extracted.
Compared to the case of binarizing while diffusing the binarization error to surrounding pixels, such as the error diffusion method, it can be processed smoothly. In the edge determination process of FIG. 3 described above,
The reason for determining whether or not the pixel is an edge pixel for black or gray pixels is that the edge portion of black or gray is clearer than other colors, making it easier to see. This is to prevent the formation of unnatural dots in such a portion.

ここで、本実施形態の構成要素と本発明の構成要素との対応関係を明らかにする。本実
施形態のブルーノイズマスクBLとベイヤー型マスクBYとを記憶するROM64とRA
M66とが本発明の「記憶手段」に相当し、図2のコピーモード時処理ルーチンにおける
ステップS110の処理(図3のエッジ判定処理)を実行するメインコントローラー60
が「エッジ画素判定手段」に相当し、図2のコピーモード時処理ルーチンにおけるステッ
プS130の処理(図5の2値化処理)を実行するメインコントローラー60が「2値化
手段」に相当する。
Here, the correspondence between the components of the present embodiment and the components of the present invention will be clarified. ROM 64 and RA for storing the blue noise mask BL and the Bayer mask BY of the present embodiment
M66 corresponds to the “storage means” of the present invention, and the main controller 60 that executes the processing of step S110 (edge determination processing of FIG. 3) in the copy mode processing routine of FIG.
Corresponds to “edge pixel determination means”, and the main controller 60 that executes the processing of step S130 (binarization processing of FIG. 5) in the copy mode time processing routine of FIG. 2 corresponds to “binarization means”.

以上詳述した本実施形態のマルチファンクションプリンター10によれば、規則性のな
いランダムな閾値が配置されたブルーノイズマスクBLと所定間隔毎の差分が所定の階調
値となるよう規則性をもった閾値が配置されたベイヤー型マスクBYとを予め記憶してお
き、入力された画像データの画素がエッジ部分に相当するエッジ画素であるかエッジ部分
に相当しない非エッジ画素であるかを判定し、各画素のうち非エッジ画素についてはブル
ーノイズマスクBLの閾値を用い、エッジ画素についてはベイヤー型マスクBYの閾値を
用いて2値化するから、エッジ部分以外の部分においては2値化結果に規則性が現れるこ
とがなく2値化に起因した模様が現れるのを防止することができると共にエッジ部分にお
いては2値化結果に所定間隔毎の規則性が現れてその離散度合いに偏りが生じるのを防止
することができる。また、ブルーノイズマスクBLとベイヤー型マスクBYとはいずれも
予めROM64に記憶されているものであり、誤差拡散法などと併用する場合に比して、
スムーズに2値化することができる。この結果、画素のエッジ状態に適した階調値変換処
理をよりスムーズに行なうことができる。
According to the multi-function printer 10 of the present embodiment described in detail above, the blue noise mask BL in which random thresholds having no regularity are arranged and regularity so that the difference at every predetermined interval becomes a predetermined gradation value. A Bayer mask BY with a predetermined threshold value stored in advance, and it is determined whether the pixel of the input image data is an edge pixel corresponding to the edge portion or a non-edge pixel not corresponding to the edge portion. Since each pixel is binarized using the threshold value of the blue noise mask BL for the non-edge pixel and the threshold value of the Bayer mask BY for the edge pixel, the binarization result is obtained in the portion other than the edge portion. It is possible to prevent a pattern resulting from binarization from appearing without regularity, and at the edge portion, binarization results are displayed at predetermined intervals. It is possible to prevent the deviation in the discrete degree occurs regularity appears. In addition, both the blue noise mask BL and the Bayer mask BY are stored in advance in the ROM 64, and compared with a case where the error diffusion method is used together,
It can be binarized smoothly. As a result, the gradation value conversion process suitable for the edge state of the pixel can be performed more smoothly.

なお、本発明は上述した実施態様に何ら限定されることはなく、本発明の技術的範囲に
属する限り種々の態様で実施し得ることはいうまでもない。
In addition, this invention is not limited to the embodiment mentioned above at all, and it cannot be overemphasized that it can implement with a various aspect, as long as it belongs to the technical scope of this invention.

上述した実施形態では、非エッジ画素についてはブルーノイズマスクBLの閾値を用い
てエッジ画素についてはベイヤー型マスクBYの閾値を用いるものとしたが、ブルーノイ
ズマスクBLとベイヤー型マスクBYとに限定されるものではなく、非エッジ画素につい
ては規則性のないランダムな閾値が配置されたマスクの閾値を用いエッジ画素については
所定間隔毎の差分が所定値となるよう規則性をもった閾値が配置されたマスクの閾値を用
いるものであれば、どのようなマスクを用いるものとしてもよい。また、ブルーノイズマ
スクBLがベイヤー型マスクBYよりもマトリックスサイズが大きいものとしたが、これ
に限られず、同じ大きさのマスクを用いるものとしてもよい。ただし、ブロックパターン
を発生させないことを目的とするため、本実施形態のように、ブルーノイズマスクBLが
比較的大きなマトリックスであることが好ましい。さらに、ブルーノイズマスクBLやベ
イヤー型マスクBYのマトリックスサイズは一例であり、全階調値の倍数に基づくサイズ
であればどのようなサイズであってもよい。特に、ブルーノイズマスクBLとしては、全
階調値が値255の場合には、128画素×128画素のサイズとしたり、256画素×
256画素のサイズとしたりしてもよい。
In the above-described embodiment, the threshold value of the blue noise mask BL is used for non-edge pixels and the threshold value of the Bayer mask BY is used for edge pixels. However, the present invention is limited to the blue noise mask BL and the Bayer mask BY. Not a non-edge pixel, a threshold value of a mask in which a random threshold value having no regularity is arranged is used, and a threshold value having a regularity is arranged for an edge pixel so that a difference at a predetermined interval becomes a predetermined value. Any mask may be used as long as the mask threshold is used. The blue noise mask BL has a larger matrix size than the Bayer mask BY, but the present invention is not limited to this, and a mask having the same size may be used. However, in order to prevent the generation of block patterns, it is preferable that the blue noise mask BL is a relatively large matrix as in the present embodiment. Furthermore, the matrix size of the blue noise mask BL and the Bayer mask BY is an example, and any size may be used as long as it is a size based on a multiple of all gradation values. In particular, as the blue noise mask BL, when all gradation values are 255, the size is 128 pixels × 128 pixels or 256 pixels ×
The size may be 256 pixels.

上述した実施形態では、画素の階調値が白色画素を示す階調値を除いてR=G=Bとな
る画素即ち黒またはグレーを示す画素についてエッジ画素であるか否かを判定するものと
したが、これに限られず、画素の色に拘わらずすべての画素についてエッジ画素であるか
否かを判定するものとしてもよい。
In the above-described embodiment, it is determined whether or not a pixel in which R = G = B, that is, a pixel indicating black or gray is an edge pixel except for a gradation value indicating a white pixel. However, the present invention is not limited to this, and it may be determined whether all pixels are edge pixels regardless of the color of the pixels.

上述した実施形態では、処理対象画素に隣接する画素の階調値Dの差分から算出したエ
ッジ勾配aに基づいてエッジ画素であるか否かを判定するものとしたが、単に階調値Dの
差分に基づいて判定するものとしてもよい。あるいは隣接する画素間の階調値Dの差分に
基づくものに限られず、Sobelフィルターなどの他の1次微分系のフィルターやLaplacian
フィルターなどの2次微分系のフィルターなどを用いて処理対象画素を中心とした上下左
右の4近傍や斜めを含む8近傍の画素の階調値Dに対してフィルター係数を乗じた演算結
果に基づいて判定を行なうものなどとしてもよい。
In the above-described embodiment, it is determined whether or not the pixel is an edge pixel based on the edge gradient a calculated from the difference between the gradation values D of the pixels adjacent to the processing target pixel. It is good also as what determines based on a difference. Or, it is not limited to the one based on the difference of the gradation value D between adjacent pixels, but other first-order differential filter such as Sobel filter or Laplacian
Based on a calculation result obtained by multiplying the gradation value D of pixels in the vicinity of the upper, lower, left, and right 4 centering around the pixel to be processed by using a second-order differential filter such as a filter, or the 8 neighboring pixels including the diagonal, by a filter coefficient. It is good also as what performs a determination.

10 マルチファンクションプリンター、12 バス、20 プリンターユニット、2
2 プリンターASIC、24 プリンター機構、30 スキャナーユニット、32 ス
キャナーASIC、34 スキャナー機構、36 ガラス台、40 メモリーカードスロ
ット、42 メモリーカード、44 メモリーカードコントローラー、50 操作パネル
、52 表示部、54 ボタン群、60 メインコントローラー、62 CPU、64
ROM、66 RAM、68 フラッシュメモリー、69 内部通信インターフェース(
I/F)、BL ブルーノイズマスク、BY ベイヤー型マスク、S 用紙。
10 Multifunction printer, 12 buses, 20 printer units, 2
2 Printer ASIC, 24 Printer mechanism, 30 Scanner unit, 32 Scanner ASIC, 34 Scanner mechanism, 36 Glass stand, 40 Memory card slot, 42 Memory card, 44 Memory card controller, 50 Operation panel, 52 Display unit, 54 Button group, 60 main controller, 62 CPU, 64
ROM, 66 RAM, 68 Flash memory, 69 Internal communication interface (
I / F), BL blue noise mask, BY Bayer type mask, S paper.

Claims (7)

多階調の画像データを入力して2値化処理する画像処理装置であって、
規則性のないランダムな閾値がマトリックス状に配置された第1のマスクと、所定間隔
毎の差分が所定の階調値となるよう規則性をもった閾値がマトリックス状に配置された第
2のマスクとを記憶する記憶手段と、
前記入力された画像データの各画素がエッジ部分に相当するエッジ画素であるか否かを
判定するエッジ画素判定手段と、
前記エッジ画素と判定されない画素については前記第1のマスクの閾値を用いて2値化
し、前記エッジ画素と判定された画素については前記第2のマスクの閾値を用いて2値化
する2値化手段と
を備える画像処理装置。
An image processing apparatus that inputs multi-gradation image data and performs binarization processing,
A first mask in which random thresholds having no regularity are arranged in a matrix and a second mask in which thresholds having regularity are arranged in a matrix so that a difference at a predetermined interval becomes a predetermined gradation value. Storage means for storing a mask;
Edge pixel determination means for determining whether each pixel of the input image data is an edge pixel corresponding to an edge portion;
Binarization is performed using the threshold value of the first mask for pixels that are not determined as edge pixels, and binarization is performed using the threshold value of the second mask for pixels that are determined as edge pixels. An image processing apparatus comprising: means.
請求項1記載の画像処理装置であって、
前記第1のマスクは、前記第2のマスクよりもマトリックスのサイズが大きなマスクで
あり、
前記2値化手段は、前記入力された画像データが前記第1または前記第2のマスクより
もマトリックスのサイズが大きい場合には、該第1または該第2のマスクを繰り返し用い
て2値化する手段である
画像処理装置。
The image processing apparatus according to claim 1,
The first mask is a mask having a larger matrix size than the second mask;
The binarization means binarizes the input image data when the size of the matrix is larger than the first or second mask by repeatedly using the first or second mask. An image processing apparatus.
請求項2記載の画像処理装置であって、
前記第2のマスクは、前記多階調の各階調値が1度ずつ配置されてなるマスクであり、
前記第1のマスクは、前記第2のマスクの整数倍のサイズのマトリックスに前記多階調
の各階調値が前記整数倍の数ずつ配置されてなるマスクである
画像処理装置。
The image processing apparatus according to claim 2,
The second mask is a mask in which each gradation value of the multi-gradation is arranged once.
The image processing apparatus according to claim 1, wherein the first mask is a mask in which each gradation value of the multi-gradation is arranged in a matrix having a size that is an integral multiple of the second mask.
請求項3記載の画像処理装置であって、
前記第1のマスクは、ブルーノイズマスクであり、
前記第2のマスクは、ベイヤー型のディザマスクである
画像処理装置。
The image processing apparatus according to claim 3,
The first mask is a blue noise mask;
The image processing apparatus, wherein the second mask is a Bayer-type dither mask.
媒体に形成された画像を読み取る画像読取装置を介して前記画像データを入力する請求
項1ないし4いずれか1項に記載の画像処理装置であって、
前記エッジ画素判定手段は、前記エッジ画素であるか否かの判定対象となる画素に隣接
する所定数の画素間の階調値変化に基づいて前記判定を行なう手段である
画像処理装置。
The image processing apparatus according to any one of claims 1 to 4, wherein the image data is input via an image reading apparatus that reads an image formed on a medium.
The image processing apparatus according to claim 1, wherein the edge pixel determination unit is a unit that performs the determination based on a gradation value change between a predetermined number of pixels adjacent to a pixel that is a determination target of whether or not the pixel is the edge pixel.
前記エッジ画素判定手段は、前記エッジ画素であるか否かの判定対象となる画素の階調
値が黒またはグレーを示す場合に前記判定を行なう手段である請求項5記載の画像処理装
置。
The image processing apparatus according to claim 5, wherein the edge pixel determination unit is a unit that performs the determination when a gradation value of a pixel that is a determination target of whether or not the pixel is the edge pixel indicates black or gray.
コンピューターを、請求項1ないし6いずれか1項に記載の画像処理装置として機能さ
せるためのプログラム。
A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 6.
JP2010086759A 2010-04-05 2010-04-05 Image processing apparatus and program Expired - Fee Related JP5569107B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010086759A JP5569107B2 (en) 2010-04-05 2010-04-05 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010086759A JP5569107B2 (en) 2010-04-05 2010-04-05 Image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2011223082A true JP2011223082A (en) 2011-11-04
JP5569107B2 JP5569107B2 (en) 2014-08-13

Family

ID=45039543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010086759A Expired - Fee Related JP5569107B2 (en) 2010-04-05 2010-04-05 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP5569107B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016092760A (en) * 2014-11-11 2016-05-23 コニカミノルタ株式会社 Apparatus and method for image processing

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63100873A (en) * 1986-10-17 1988-05-02 Oki Electric Ind Co Ltd Method and apparatus for binarization
JPH07123267A (en) * 1993-10-25 1995-05-12 Canon Inc Color image forming device
JPH1056569A (en) * 1996-08-07 1998-02-24 Riso Kagaku Corp Image processing method and device therefor
JPH11175713A (en) * 1997-12-12 1999-07-02 Canon Inc Threshold generator and its method, and image processor and its method
JP2002044445A (en) * 2000-07-21 2002-02-08 Fuji Xerox Co Ltd Image processor and image processing method, and method for generating threshold matrix for generating halftone image
JP2003250043A (en) * 2002-02-26 2003-09-05 Ricoh Co Ltd Image forming device
JP2007151089A (en) * 2005-11-01 2007-06-14 Ricoh Co Ltd Dither matrix, image processing method, record, program, image processor, image forming apparatus, and image forming system
JP2007312013A (en) * 2006-05-17 2007-11-29 Fuji Xerox Co Ltd Image processing apparatus, image forming apparatus, and image processing method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63100873A (en) * 1986-10-17 1988-05-02 Oki Electric Ind Co Ltd Method and apparatus for binarization
JPH07123267A (en) * 1993-10-25 1995-05-12 Canon Inc Color image forming device
JPH1056569A (en) * 1996-08-07 1998-02-24 Riso Kagaku Corp Image processing method and device therefor
JPH11175713A (en) * 1997-12-12 1999-07-02 Canon Inc Threshold generator and its method, and image processor and its method
JP2002044445A (en) * 2000-07-21 2002-02-08 Fuji Xerox Co Ltd Image processor and image processing method, and method for generating threshold matrix for generating halftone image
JP2003250043A (en) * 2002-02-26 2003-09-05 Ricoh Co Ltd Image forming device
JP2007151089A (en) * 2005-11-01 2007-06-14 Ricoh Co Ltd Dither matrix, image processing method, record, program, image processor, image forming apparatus, and image forming system
JP2007312013A (en) * 2006-05-17 2007-11-29 Fuji Xerox Co Ltd Image processing apparatus, image forming apparatus, and image processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016092760A (en) * 2014-11-11 2016-05-23 コニカミノルタ株式会社 Apparatus and method for image processing

Also Published As

Publication number Publication date
JP5569107B2 (en) 2014-08-13

Similar Documents

Publication Publication Date Title
JP4926568B2 (en) Image processing apparatus, image processing method, and image processing program
JPH11220632A (en) Picture processor and picture processing method and medium for recording picture processing control program
JP2008005317A (en) Image processor and image processing method, and computer program and recording medium
JP2009100228A (en) Image processing apparatus and control method therefor
JP2006025139A (en) Image processor, image processing method and program
JP4381360B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
KR102072887B1 (en) Image processing apparatus, image processing method, and storage medium
JP6127877B2 (en) Image processing apparatus and computer program
JP4402090B2 (en) Image forming apparatus, image forming method, program, and recording medium
JP2018056873A (en) Image processing device and computer program
JP5932683B2 (en) System to maintain image quality in economy printing mode
JP2006352633A (en) Image processing method and its program
JP4900175B2 (en) Image processing apparatus and method, and program
JP2010028314A (en) Image processing apparatus, method, and program
JP5151708B2 (en) Image processing apparatus and image processing program
CN110099192B (en) Image forming apparatus, control method thereof, and storage medium storing control program thereof
JP5569107B2 (en) Image processing apparatus and program
JP2007088741A (en) Image processing apparatus and image processing method
JP2005252710A (en) Image processing apparatus, image processing method, and image processing program
JP2005252911A (en) Image processing method and image processor
JP2006109482A (en) Image processing method, image processing apparatus and image processing program
JP2005191890A (en) Image processing device, image processing method, image processing program, recording medium stored with image processing program and image forming apparatus with image processor
JP2013135396A (en) Image processor and image processing method
JP2001052157A (en) Device and method for processing image
JP2012165192A (en) Printer and printing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130307

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140225

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140425

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140527

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140609

R150 Certificate of patent or registration of utility model

Ref document number: 5569107

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees