[go: up one dir, main page]

JP2018142851A - Image processing apparatus and control method and program of image processing apparatus - Google Patents

Image processing apparatus and control method and program of image processing apparatus Download PDF

Info

Publication number
JP2018142851A
JP2018142851A JP2017035931A JP2017035931A JP2018142851A JP 2018142851 A JP2018142851 A JP 2018142851A JP 2017035931 A JP2017035931 A JP 2017035931A JP 2017035931 A JP2017035931 A JP 2017035931A JP 2018142851 A JP2018142851 A JP 2018142851A
Authority
JP
Japan
Prior art keywords
density
character
lightness
value
image processing
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
JP2017035931A
Other languages
Japanese (ja)
Inventor
知未 安田
Tomomi Yasuda
知未 安田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2017035931A priority Critical patent/JP2018142851A/en
Publication of JP2018142851A publication Critical patent/JP2018142851A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color, Gradation (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To adjust density difference of first and second objects to be drawn over, based on the size or the thickness of a line of the first object, when drawing a color image while converting into a grayscale image.SOLUTION: An image processing apparatus has extraction means for extracting a first object and a second object to be drawn on the first object from the print data of color image, determination means for determining the minimum value of density difference of the first and second objects extracted by the extraction means, based on the size of the second object, or the thickness of a line constituting the second object, and generation means for generating image data of plain color in which the density difference of the first and second objects is larger than the minimum value of density difference determined by the determination means.SELECTED DRAWING: Figure 8

Description

本発明は画像処理装置、及び画像処理装置の制御方法と画像処理システムに関し、特にカラー画像の印刷データをモノクロ画像の印刷データに変換する画像処理装置及び画像処理装置の制御方法、プログラムに関する。   The present invention relates to an image processing apparatus, an image processing apparatus control method, and an image processing system, and more particularly, to an image processing apparatus that converts color image print data into monochrome image print data, an image processing apparatus control method, and a program.

画像処理装置ではカラー画像の印刷データをモノクロプリンタで印刷する場合、または、モノクロモードで印刷する場合がある。この場合、カラー画像の印刷データは、該プリンタ内において所定の変換式に基づいてグレイスケールのデータに変換される。   In an image processing apparatus, color image print data may be printed by a monochrome printer or printed in a monochrome mode. In this case, the print data of the color image is converted into gray scale data based on a predetermined conversion formula in the printer.

カラー画像では、色のついた図形の上に色のついた文字が重ねて描画される場合がある。たとえば、表計算ソフトで色のついたセルに文字を入力した場合や、色のついた図形の内側に文字を入力した場合などである。これらの画像データをモノクロ印刷する際には、画像処理装置がカラー画像の印刷データをグレイスケール画像の印刷データに変換する。   In a color image, a colored character may be drawn on top of a colored graphic. For example, when a character is input into a colored cell by spreadsheet software, or when a character is input inside a colored figure. When performing monochrome printing of these image data, the image processing apparatus converts color image print data into gray scale image print data.

しかしながら、設定された文字色及び図形色、各色の濃度によっては、グレイスケールデータに変換をした際に背景となる図形の色と文字色が区別しにくくなってしまう場合がある。これは、グレイスケール変換後の図形の色と文字の色の濃度が接近してしまうためである。たとえば、カラー画像をグレイスケールに変換した後の画像が図16の1601のようになると、図形と文字のグレイ濃度が近く、ユーザが図形と文字を区別することが難しい。   However, depending on the set character color, graphic color, and density of each color, it may be difficult to distinguish the graphic color and the character color as the background when converted to grayscale data. This is because the density of the graphic color and the character color after gray scale conversion are close to each other. For example, if the image after the color image is converted to gray scale is as shown by 1601 in FIG. 16, the gray density of the graphic and the character is close, and it is difficult for the user to distinguish the graphic and the character.

特許文献1には、図形と文字が重なっている領域について、グレイスケールへ変換した後の図形のグレイ濃度と文字のグレイ濃度の差が所定の閾値未満の場合、当該差が所定値になるよう画像処理装置が補正することが記載されている。これにより図形と文字のグレイ濃度の差が所定の閾値と同じ値になり、ユーザが図形と文字を判別しやすくなる。   Japanese Patent Application Laid-Open No. 2004-151867 describes that, in a region where a graphic and a character overlap, if the difference between the gray density of the graphic after conversion to gray scale and the gray density of the character is less than a predetermined threshold, the difference becomes a predetermined value. It is described that the image processing apparatus performs correction. As a result, the gray density difference between the graphic and the character becomes the same value as the predetermined threshold value, and the user can easily distinguish the graphic and the character.

特開2002−262108号公報JP 2002-262108 A

特許文献1では、グレイスケール変換後に背景となる図形と当該図形に重ねて描画される文字や図形のオブジェクトを区別するために必要な濃度差は、背景に重ねて描画される文字や図形の大きさや線の太さによらず一定である。   In Patent Document 1, the density difference necessary for distinguishing between a graphic that becomes a background after grayscale conversion and a character or graphic object drawn on the graphic is the size of the character or graphic drawn on the background. It is constant regardless of the thickness of the sheath line.

しかし、一般的に、グレイスケール画像で人間が背景の図形と当該図形に重ねて描画された線や文字を区別するために必要なグレイ濃度の差は文字の大きさや線の太さによって異なる。図16の1601と1603は、どちらも同じ濃度のグレイで描かれた矩形の中に矩形のグレイよりも少し薄い濃度のグレイで「あ」という文字を描画した図である。文字サイズの小さな1601は矩形と文字の区別がわかりにくい。一方で、文字サイズの大きい1603は矩形と文字を区別することができる。これは、大きい文字が小さい文字と比較して太い線で描画されるためである。   However, in general, in a gray scale image, a difference in gray density necessary for a human to distinguish a background graphic and a line or character drawn on the graphic differs depending on the size of the character or the thickness of the line. 1601 and 1603 in FIG. 16 are drawings in which the letters “A” are drawn in grays having a slightly lower density than the rectangular grays in rectangles drawn in the same grays. The small character size 1601 makes it difficult to distinguish between a rectangle and a character. On the other hand, 1603 having a large character size can distinguish between a rectangle and a character. This is because a large character is drawn with a thicker line than a small character.

画像処理装置が、大きい文字サイズを基準に、背景となる図形と当該図形に重ねて描画される文字や線のオブジェクトを区別するために必要なグレイ濃度の差を決定する。すると、文字サイズの小さな文字や細い線で描かれた図形では、背景の図形のグレイ濃度と当該図形に重ねて描画される文字や図形のグレイ濃度の差が十分でなく、ユーザが背景と文字や図形を区別することができない。   The image processing apparatus determines a gray density difference necessary for distinguishing between a figure as a background and a character or line object drawn on the figure based on a large character size. As a result, in characters drawn with small characters and thin lines, the difference between the gray density of the background figure and the gray density of the letters and figures drawn on top of the figure is not sufficient. And cannot distinguish between figures.

一方で、小さい文字サイズを基準に背景と文字や図形を区別するために必要な濃度差を決定すると、大きな文字サイズの文字や太い線で描かれる図形についてグレイ濃度補正が不要な場合でも、文字や図形の濃度が補正されてしまう。   On the other hand, if the density difference necessary to distinguish the background from characters and figures is determined based on the small character size, even if gray density correction is not necessary for large characters and figures drawn with thick lines, the characters And the density of the figure will be corrected.

ここで、一度グレイ濃度を明度に置き換えて説明をする。グレイ濃度が濃いとは、明度が低いことを示しており、グレイ濃度が薄いとは、明度が高いことを示している。図17は明度が200のグレイの上に、同じ大きさの明度の異なる文字を描画した図である。それぞれの文字の明度は左から、195、190、180、170である。図17に描画されている文字は文字サイズが十分大きいため、濃度補正を行わなくてもユーザが背景の図形と文字を区別することができる。しかし、グレイ濃度の補正をするか否かを決める閾値が30に決められていると、上記の4つの文字はすべて同じ明度170のグレイで描画されてしまう。そのため、ユーザはこれら4つの文字がもともと異なる色の文字であったことを知ることができない。   Here, the gray density is once replaced with lightness for explanation. A high gray density indicates that the lightness is low, and a light gray density indicates that the lightness is high. FIG. 17 is a diagram in which characters having the same size but different brightness are drawn on a gray having a brightness of 200. FIG. The brightness of each character is 195, 190, 180, 170 from the left. Since the character drawn in FIG. 17 has a sufficiently large character size, the user can distinguish the background graphic from the character without density correction. However, if the threshold value for determining whether or not to correct the gray density is set to 30, the above four characters are all drawn in gray having the same lightness 170. Therefore, the user cannot know that these four characters were originally different color characters.

本発明は、カラー画像をグレイスケール画像に変換して描画する場合に、重ねて描画される第1と第2のオブジェクトの濃度差を第1のオブジェクトの大きさまたは線の太さに基づいて調整することを目的とする。   In the present invention, when a color image is converted into a grayscale image and drawn, the density difference between the first and second objects drawn in an overlapping manner is determined based on the size of the first object or the thickness of the line. The purpose is to adjust.

本発明に記載の画像処理装置は、カラー画像の印刷データに基づく単色の画像データを生成することのできる画像処理装置であって、前記カラー画像の印刷データから第1のオブジェクトと前記第1のオブジェクトに重ねて描画される第2のオブジェクトを抽出する抽出手段と、前記抽出手段により抽出された第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値を、前記第2のオブジェクトの大きさ、または、前記第2のオブジェクトを構成する線の太さに基づいて決定する決定手段と、前記第1のオブジェクトと前記第2のオブジェクトの濃度差が前記決定手段により決められた濃度差の最低値よりも大きい前記単色の画像データを生成する生成手段と、を有することを特徴とする。   The image processing apparatus according to the present invention is an image processing apparatus capable of generating single-color image data based on print data of a color image, wherein the first object and the first object are generated from the print data of the color image. Extraction means for extracting a second object drawn over the object, and the minimum value of the density difference between the first object and the second object extracted by the extraction means is the size of the second object. Or a determining means for determining based on a thickness of a line constituting the second object, and a density difference between the first object and the second object is a density difference determined by the determining means. Generating means for generating the single-color image data larger than the minimum value.

本発明は、カラー画像をグレイスケール画像に変換して描画する場合に、重ねて描画される第1と第2のオブジェクトの濃度差を第1のオブジェクトの大きさまたは線の太さに基づいて調整することができる。   In the present invention, when a color image is converted into a grayscale image and drawn, the density difference between the first and second objects drawn in an overlapping manner is determined based on the size of the first object or the thickness of the line. Can be adjusted.

本実施の形態におけるプリンタの機能構成を示すブロック図である。FIG. 2 is a block diagram illustrating a functional configuration of a printer in the present embodiment. 本実施の形態におけるプリントシステムの構成を示すブロック図である。1 is a block diagram showing a configuration of a print system in the present embodiment. 本実施の形態おけるモノクロプリント処理を示すフローチャートである。6 is a flowchart illustrating monochrome print processing according to the present embodiment. 図3に示すデータ処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the data processing shown in FIG. 図4に示す描画処理の詳細を示すフローチャートである。6 is a flowchart showing details of the drawing process shown in FIG. 4. 図4に示すグレイ変換処理の詳細を示すフローチャートである。5 is a flowchart showing details of gray conversion processing shown in FIG. 4. 本実施の形態におけるカラーグレイ変換LUTの一例を示す図である。It is a figure which shows an example of the color gray conversion LUT in this Embodiment. 図6に示す明度補正処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the brightness correction process shown in FIG. 最低明度差を取得する処理に用いる文字サイズ最低明度差LUTの一例を示す図である。It is a figure which shows an example of the character size minimum brightness difference LUT used for the process which acquires the minimum brightness difference. 文字と図形の明度を求める処理に用いるグレイ明度変換LUTの一例を示す図である。It is a figure which shows an example of the gray lightness conversion LUT used for the process which calculates | requires the brightness of a character and a figure. 図8に示す文字濃度(Gray)修正処理の詳細を示すフローチャートである。10 is a flowchart showing details of a character density (Gray) correction process shown in FIG. 8. 図11に示す文字濃度(Gray)修正処理において、図形の明度が文字の明度よりも高い場合の概念図である。FIG. 12 is a conceptual diagram when the brightness of a graphic is higher than the brightness of a character in the character density (Gray) correction process shown in FIG. 11. 図12に示す明度の補正を行う前後の文字と図形の明度のイメージ図である。It is an image figure of the brightness of the character and figure before and after performing the brightness correction shown in FIG. 図11に示す文字濃度(Gray)修正処理において、図形の明度が文字の明度より低い場合の概念図である。FIG. 12 is a conceptual diagram when the brightness of a graphic is lower than the brightness of a character in the character density (Gray) correction process shown in FIG. 11. 図14に示す明度の置き換え前後の文字と図形の明度のイメージ図である。It is an image figure of the brightness of the character and figure before and after replacement of the brightness shown in FIG. 本実施の形態における、異なる文字サイズの文字オブジェクトに対する明度差の置き換え処理を示す概念図である。It is a conceptual diagram which shows the replacement process of the brightness difference with respect to the character object of a different character size in this Embodiment. 本実施の形態における、あるグレイ濃度の図形に異なるグレイ濃度の文字が重畳して描画されている例を示す図である。It is a figure which shows the example in which the character of different gray density is drawn by superimposing on the figure of a certain gray density in this Embodiment.

(実施例)
以下、本発明を実施するための形態について図面を用いて説明する。
(Example)
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

<画像処理装置を含むプリントシステム構成>
本実施例では、画像処理装置として画像データをシートに印刷するプリンタを例に説明する。画像処理装置は上記の装置に限定されることなく、複数の機能を有する複合機等様々な装置を含むことは言うまでもない。
<Print system configuration including image processing apparatus>
In the present embodiment, a printer that prints image data on a sheet will be described as an example of the image processing apparatus. Needless to say, the image processing apparatus is not limited to the above-described apparatus, and includes various apparatuses such as a multifunction peripheral having a plurality of functions.

本実施例の画像処理装置はカラー画像の印刷データに基づくモノクロプリントを可能とするレーザビームプリンタやインクジェットプリンタである。当該プリンタはホストコンピュータと接続され、プリントシステムを構成する。以下、該プリントシステムの構成について図2を参照して説明する。   The image processing apparatus according to this embodiment is a laser beam printer or an ink jet printer that enables monochrome printing based on color image print data. The printer is connected to a host computer and constitutes a printing system. The configuration of the print system will be described below with reference to FIG.

はじめに、プリンタ214に接続されるホストコンピュータ200のハードウェア構成を説明する。   First, the hardware configuration of the host computer 200 connected to the printer 214 will be described.

図2において、ホストコンピュータ200はプログラムROM203に格納されたアプリケーションプログラムをCPU201が実行することで起動される。そして、CPU201はフォントデータが格納されるフォントROM204や各種データが格納されるデータROM205からデータを読み出して処理を実行する。RAM202は、CPU201の主記憶領域やワークエリアとして利用される。   In FIG. 2, the host computer 200 is activated when the CPU 201 executes an application program stored in a program ROM 203. Then, the CPU 201 reads out data from the font ROM 204 that stores font data and the data ROM 205 that stores various data, and executes processing. The RAM 202 is used as a main storage area or work area for the CPU 201.

ホストコンピュータ200はキーボード(KB)211やディスプレイ(CRT:Cathode Ray Tube)212といった入出力機器や、外部メモリ213等とのインターフェイスを備える。これらのデバイスはそれぞれキーボードコントローラ(KBC)207、ディスプレイコントローラ(CRTC)208、メモリコントローラ(MC)209等のデバイスコントローラを介して、システムバス206経由でCPU201に制御される。   The host computer 200 includes input / output devices such as a keyboard (KB) 211 and a display (CRT: Cathode Ray Tube) 212, and an interface with an external memory 213 and the like. These devices are controlled by the CPU 201 via the system bus 206 via device controllers such as a keyboard controller (KBC) 207, a display controller (CRTC) 208, and a memory controller (MC) 209, respectively.

さらに、ホストコンピュータ200は、プリントコントローラ(PRCT)210を介してプリンタ214とのデータの入出力を行う。   Further, the host computer 200 inputs / outputs data to / from the printer 214 via the print controller (PRCT) 210.

次に、プリンタ214のハードウェア構成を説明する。   Next, the hardware configuration of the printer 214 will be described.

プリンタ214は、プログラムROM217または外部メモリ226に記憶された制御プログラムをCPU215が実行することで、システムバス220に接続される各デバイスを制御する。   The printer 214 controls each device connected to the system bus 220 when the CPU 215 executes a control program stored in the program ROM 217 or the external memory 226.

また、CPU215は印刷部I/F(インターフェイス)222を介して接続される印刷部(プリンタエンジン)224に対して画像信号を出力する。また、プリンタ214はCPU215の主記憶領域や出力情報展開領域等として使用されるRAM216や、フォント情報を格納するフォントROM218、各種データ情報を格納するデータROM219を備える。   In addition, the CPU 215 outputs an image signal to a printing unit (printer engine) 224 connected via a printing unit I / F (interface) 222. The printer 214 includes a RAM 216 used as a main storage area and an output information expansion area of the CPU 215, a font ROM 218 that stores font information, and a data ROM 219 that stores various data information.

外部メモリ226はメモリコントローラ(MC)223を介して、フォントデータ、フォームデータ、エミュレーションプログラムなどをCPU215に供給する。操作部225はプリンタ214の動作環境を設定するためのスイッチやタッチパネル等の入力装置および、ディスプレイ等の表示装置で構成される。当該表示装置はRAM216に格納される設定データやユーザ情報を表示するために用いられ、入力装置はユーザによる操作を受け付けるために用いられる。   The external memory 226 supplies font data, form data, an emulation program, and the like to the CPU 215 via the memory controller (MC) 223. The operation unit 225 includes an input device such as a switch and a touch panel for setting the operating environment of the printer 214 and a display device such as a display. The display device is used to display setting data and user information stored in the RAM 216, and the input device is used to receive an operation by the user.

次に、図1を参照してプリンタ214の機能構成の概要を説明する。   Next, an outline of a functional configuration of the printer 214 will be described with reference to FIG.

まず、プリンタ214の機能構成は、入力された印刷データに基づきプリント用の画像データを生成するビデオコントローラ110と、該プリント用の画像データに基づき記録媒体上に可視像を形成するプリンタエンジン部109に大別される。   First, the functional configuration of the printer 214 includes a video controller 110 that generates image data for printing based on input print data, and a printer engine unit that forms a visible image on a recording medium based on the image data for printing. 109.

ビデオコントローラ110は、受信バッファ102、コマンド判別部103、コマンド解析部104、色調制御部105、コマンド実行部106、ページメモリ107で構成される。ビデオコントローラ110はCPU215により制御される。CPU215はROM217に格納されたプログラムを読み出してRAM216に展開し、実行することでビデオコントローラ110を制御する。   The video controller 110 includes a reception buffer 102, a command determination unit 103, a command analysis unit 104, a color tone control unit 105, a command execution unit 106, and a page memory 107. The video controller 110 is controlled by the CPU 215. The CPU 215 controls the video controller 110 by reading out a program stored in the ROM 217, developing it in the RAM 216, and executing it.

プリンタエンジン部109は、出力制御部108を介してビデオコントローラ110が生成した画像データを受信する。プリンタエンジン部109はCPU215により制御され、印刷部224の制御を行う。CPU215はROM217からプリンタエンジン部109の挙動が書かれたプログラムを呼び出しRAM216に展開して実行することでプリンタエンジン部109を制御する。   The printer engine unit 109 receives the image data generated by the video controller 110 via the output control unit 108. The printer engine unit 109 is controlled by the CPU 215 and controls the printing unit 224. The CPU 215 controls the printer engine unit 109 by calling a program in which the behavior of the printer engine unit 109 is written from the ROM 217 to the RAM 216 and executing it.

以下において、プリンタ214がホストコンピュータ200から印刷データを受信したときに行う処理を説明する。   Hereinafter, processing performed when the printer 214 receives print data from the host computer 200 will be described.

インターフェイス101は、ホストコンピュータ200から送られる印刷データを、入力部221を介して受信して、当該印刷データを受信バッファ102へ送る。印刷データとはシートに印刷する画像データを示すPDL(Page Description Language)データである。   The interface 101 receives print data sent from the host computer 200 via the input unit 221 and sends the print data to the reception buffer 102. The print data is PDL (Page Description Language) data indicating image data to be printed on a sheet.

受信バッファ102は、インターフェイス101から受信した印刷データをRAM216に格納する。受信バッファ102は、文字オブジェクトとして文字パターンそのものや、受信した印刷データに含まれる文字の文字コード等をRAM216に格納する。また、受信バッファ102は受信した印刷データが図形オブジェクトであれば、その形状を示す輪郭座標点や色等の図形属性をRAM216に格納する。   The reception buffer 102 stores the print data received from the interface 101 in the RAM 216. The reception buffer 102 stores the character pattern itself as a character object, the character code of the character included in the received print data, and the like in the RAM 216. If the received print data is a graphic object, the reception buffer 102 stores graphic attributes such as contour coordinate points and colors indicating the shape in the RAM 216.

コマンド判別部103は、受信バッファ102に格納された印刷データを読み出して、当該印刷データのPDLの種別を判別する。   The command determination unit 103 reads the print data stored in the reception buffer 102 and determines the PDL type of the print data.

その後、コマンド解析部104は、判別されたPDLの種別に応じて印刷データを解析する。プリンタ214はコマンド種ごとにコマンド解析部104を有する。本実施例は、その一つを例として示している。解析されたコマンドは、後段のコマンド実行部106が処理しやすい形式の中間データに変換される。   Thereafter, the command analysis unit 104 analyzes the print data according to the determined type of PDL. The printer 214 has a command analysis unit 104 for each command type. In the present embodiment, one of them is shown as an example. The analyzed command is converted into intermediate data in a format that can be easily processed by the command execution unit 106 in the subsequent stage.

コマンド実行部106は、中間データに変換されたコマンドを実行して、画素データの集合であるラスタデータを生成し、生成したラスタデータをページメモリ107に格納する。   The command execution unit 106 executes the command converted into the intermediate data, generates raster data that is a set of pixel data, and stores the generated raster data in the page memory 107.

コマンド解析部104において解析されるコマンドが色属性を有すると判断された場合、色調制御部105はコマンド解析部104が生成した中間データ上の色情報を変更する色調制御を実行する。色調制御部105が行う処理については、図6、図8、図11を用いて後述する。   When it is determined that the command analyzed by the command analysis unit 104 has a color attribute, the color tone control unit 105 executes color tone control that changes the color information on the intermediate data generated by the command analysis unit 104. Processing performed by the color tone control unit 105 will be described later with reference to FIGS. 6, 8, and 11.

出力制御部108は上記ラスタデータに基づいてビデオ信号を作成し、当該ビデオ信号をレーザ光のオン/オフを制御するレーザ駆動信号としてプリンタエンジン部109に送出する。プリンタエンジン部109は、出力制御部108から受け取ったビデオ信号をレーザ駆動信号として、感光ドラムに照射されるレーザ光を制御する。感光ドラムは予め負の電荷に帯電されており、レーザ光が照射された領域の負電荷が消失する。したがって、感光ドラム上でレーザ光の照射された領域と、レーザ光が照射されていない領域で電位差が生じ、潜像が形成される。潜像が形成された感光ドラム上に正電荷を有するトナーを付着させることで、感光ドラム上に可視像が形成される。   The output control unit 108 creates a video signal based on the raster data, and sends the video signal to the printer engine unit 109 as a laser drive signal for controlling on / off of the laser beam. The printer engine unit 109 controls the laser light applied to the photosensitive drum using the video signal received from the output control unit 108 as a laser drive signal. The photosensitive drum is charged in advance with a negative charge, and the negative charge in the region irradiated with the laser light disappears. Therefore, a potential difference is generated between the region irradiated with the laser beam on the photosensitive drum and the region not irradiated with the laser beam, and a latent image is formed. A visible image is formed on the photosensitive drum by attaching a positively charged toner to the photosensitive drum on which the latent image is formed.

なお、上述したように本実施例のプリンタ214はカラー画像の印刷データに基づくモノクロプリントが可能であればよい。従って、プリンタエンジン部109が備えるトナー色としては黒単色であっても良いし、複数色であっても良い。   As described above, the printer 214 according to the present embodiment only needs to be able to perform monochrome printing based on color image print data. Accordingly, the toner color included in the printer engine unit 109 may be a single black color or a plurality of colors.

<色処理概要>
以下、本実施例の適用されるプリンタ214が、色属性を有する印刷データ、例えばRGB形式のカラー画像の印刷データを処理する際に行う色処理を説明する。ここではプリンタ214がYMCKの4色の現像部を有するカラープリンタであるとする。プリンタ214は画像データの各画素の有するRGB形式の色情報をプリント用のYMCK形式に変換する。その後、プリンタ214はYMCKの各色1色(プレーン)で構成される画像データを生成する。従って、プリント用の画像データは、1ページ中の1画素につき、Yで構成される画像データ、Mで構成される画像データ、Cで構成される画像データ、Kで構成される画像データの4プレーン分の画像データを有する。そしてプリンタエンジン部109は、各色の現像剤(トナー)ごとにプリント処理を行う。
<Outline of color processing>
Hereinafter, color processing performed when the printer 214 to which the present embodiment is applied processes print data having color attributes, for example, print data of an RGB format color image will be described. Here, it is assumed that the printer 214 is a color printer having four color developing units for YMCK. The printer 214 converts the RGB color information of each pixel of the image data into a YMCK format for printing. Thereafter, the printer 214 generates image data composed of one YMCK color (plane). Therefore, the image data for printing is 4 pieces of image data composed of Y, image data composed of M, image data composed of C, and image data composed of K for each pixel in one page. It has image data for a plane. The printer engine unit 109 performs print processing for each color developer (toner).

一方、プリンタ214がモノクロ画像形成のみを可能とするモノクロプリンタであるとする。プリンタ214は黒色の現像部のみを有しており、プリンタ214はカラー画像データの各画素の有するRGB形式の色情報を所定の変換式に基づいてグレイスケールに変換する。黒色単色のトナーで形成されるグレイスケールの画像データは色の明暗を示す明度の情報で構成される。グレイスケールで表現されるデータは1ページに対して1プレーンの画像データで構成される。当該画像データの各画素は固有のグレイ濃度を表す濃度信号を有する。   On the other hand, it is assumed that the printer 214 is a monochrome printer that allows only monochrome image formation. The printer 214 has only a black developing unit, and the printer 214 converts RGB color information of each pixel of the color image data into a gray scale based on a predetermined conversion formula. Gray scale image data formed with black toner is composed of lightness information indicating the brightness of the color. Data expressed in gray scale is composed of one plane of image data for one page. Each pixel of the image data has a density signal representing a specific gray density.

なお、プリンタ214がカラープリンタであって、モノクロで印刷を行う設定がなされた場合、プリンタ214は上記モノクロプリンタと同様に、グレイスケール変換を伴う色処理を行う。   When the printer 214 is a color printer and is set to print in monochrome, the printer 214 performs color processing with gray scale conversion, as in the monochrome printer.

上記のように、カラー画像をモノクロ印刷する場合、ビデオコントローラ110は各画素の持つ濃度をプリンタエンジンにおける出力レベル(0〜255)に対応付けて、ビデオ信号として出力する。尚、モノクロプリンタは、カラープリンタと同様に多値記録を行う場合と、エンジン部がドットを打つか否かによる2値記録を行う場合とがある。プリンタ214は記録形式に応じて、グレイスケール形式の中間調データを多値画像または2値画像で出力する。   As described above, when monochrome printing a color image, the video controller 110 associates the density of each pixel with the output level (0 to 255) in the printer engine and outputs it as a video signal. Note that the monochrome printer performs multi-value recording as in the case of the color printer, and performs binary recording depending on whether the engine unit strikes dots. The printer 214 outputs grayscale halftone data as a multivalued image or a binary image according to the recording format.

ホストコンピュータ200から受信した多値の印刷データを2値画像として出力する場合、プリンタ214は受信した多値画像を2値画像に変換する処理を行う。プリンタ214は2値化処理として、各画素に対して所定の閾値を設け、画素濃度と閾値との比較によって出力値を2分するディザ処理方法等の公知の方法を用いるとする。   When outputting the multi-value print data received from the host computer 200 as a binary image, the printer 214 performs a process of converting the received multi-value image into a binary image. Assume that the printer 214 uses a known method such as a dithering method in which a predetermined threshold is provided for each pixel and the output value is divided into two by comparing the pixel density with the threshold as the binarization process.

ここで、本実施例にかかるプリンタ214がカラー画像をグレイスケール変換するときに行う文字濃度(Gray)修正処理について、模式図を用いて説明する。   Here, a character density (Gray) correction process performed when the printer 214 according to the present embodiment converts a color image into gray scale will be described with reference to a schematic diagram.

図16は、四角い図形オブジェトに「あ」という文字オブジェクトが重ねて描画されているカラー画像をグレイスケール変換した後の模式図である。1601と1603は文字の明度を調整する前を示しており、1602と1604は本実施例に記載の明度補正処理(S609)を実行した後の図である。   FIG. 16 is a schematic diagram after gray scale conversion is performed on a color image in which a character object “A” is drawn on a square graphic object. Reference numerals 1601 and 1603 indicate before the brightness of the character is adjusted, and 1602 and 1604 are views after executing the brightness correction process (S609) described in the present embodiment.

本実施例では、カラー画像の印刷データをグレイスケールの印刷データに変換した後、重ねて描画される図形オブジェクトと文字オブジェクトの描画の明度の差を色調制御部105が求める。図形オブジェクトと文字オブジェクトのグレイの明度の差が閾値よりも小さければ、図形と文字のグレイの明度差が閾値以上になるよう色調制御部105が文字の明度の補正を行う。一方で、図形と文字のグレイの明度差が閾値以上であれば、色調制御部105は文字の明度の補正を行わない。   In this embodiment, after the color image print data is converted to gray scale print data, the color tone control unit 105 obtains the difference in lightness between the drawing of the graphic object and the character object drawn in an overlapping manner. If the gray brightness difference between the graphic object and the character object is smaller than the threshold value, the color tone control unit 105 corrects the lightness of the character so that the gray brightness difference between the graphic object and the character is equal to or greater than the threshold value. On the other hand, if the lightness difference between the graphic and the character gray is equal to or greater than the threshold, the color tone control unit 105 does not correct the lightness of the character.

本実施例で色調制御部105は文字オブジェクトの大きさに基づいて上記の閾値を決定する。たとえば、図16(a)1601と(b)1603はどちらも明度が165の矩形の図形オブジェクトの上に明度が175の「あ」という文字オブジェクトを重ねて描画したものである。図16(a)の文字オブジェクトは10ポイントの文字サイズで描画されているため、図9に記載の文字サイズ明度差LUTより、最低でも図形と文字の明度差が20必要である。そこで色調制御部105は1601の図形と文字の明度差が20になるよう、文字の明度を高くする文字濃度(Gray)修正処理を実行する。文字濃度(Gray)修正処理を実行した後のグレイスケール画像が1602である。   In this embodiment, the color tone control unit 105 determines the threshold value based on the size of the character object. For example, FIGS. 16 (a) 1601 and (b) 1603 are both drawn by superimposing a character object “A” having a brightness of 175 on a rectangular graphic object having a brightness of 165. Since the character object in FIG. 16A is drawn with a character size of 10 points, the lightness difference between the figure and the character is at least 20 from the character size lightness difference LUT shown in FIG. Therefore, the color tone control unit 105 executes a character density (Gray) correction process for increasing the brightness of the character so that the brightness difference between the figure 1601 and the character is 20. A grayscale image 1602 after the character density (Gray) correction process is executed.

一方、図16の(b)の文字オブジェクトは100ポイントの文字サイズで描画されている。図9の文字サイズ明度差LUTより文字サイズが100ポイントのとき、背景の図形と文字を区別するために必要な最低明度差は5である。図16(b)の図形と文字の明度差は10あるので、色調制御部105は文字濃度(Gray)修正処理を行わない。したがって、印刷されるグレイスケール画像1604は1603と同じ画像である。   On the other hand, the character object in FIG. 16B is drawn with a character size of 100 points. When the character size is 100 points from the character size lightness difference LUT in FIG. 9, the minimum lightness difference necessary for distinguishing characters from the background graphic is 5. Since the brightness difference between the graphic and the character in FIG. 16B is 10, the color tone control unit 105 does not perform the character density (Gray) correction process. Therefore, the printed gray scale image 1604 is the same image as 1603.

本実施例におけるプリンタ214は、文字サイズによって文字のグレイ濃度の修正を行うか否かを決定する閾値を変更する。これによって、プリンタ214は文字サイズが小さい場合でも、図形と文字をユーザが区別しやすい画像を印刷することができる。また、文字サイズが大きい文字について、プリンタ214は上記の閾値を小さくする。これにより、カラー画像の状態で異なる色であった文字をグレイスケールに変換して印刷するときに、同じグレイ濃度で印刷がなされてしまうことを減らすことができる。   The printer 214 in this embodiment changes a threshold value for determining whether or not to correct the gray density of the character according to the character size. As a result, even when the character size is small, the printer 214 can print an image that allows the user to easily distinguish a graphic from a character. Further, the printer 214 decreases the above threshold value for characters having a large character size. This can reduce the occurrence of printing with the same gray density when characters having different colors in the color image state are converted to gray scale and printed.

<モノクロプリント処理>
上述したように本実施例のプリンタ214はホストコンピュータ200からカラー画像の印刷データを受信して、該カラー画像の印刷データに基づくモノクロ印刷を行うことができる。以下、本実施例におけるプリンタ214が実行するカラー画像の印刷データに基づくモノクロ印刷処理を説明する。
<Monochrome print processing>
As described above, the printer 214 of the present embodiment can receive color image print data from the host computer 200 and perform monochrome printing based on the color image print data. Hereinafter, a monochrome printing process based on color image print data executed by the printer 214 in this embodiment will be described.

図3は、ホストコンピュータ200からプリンタ214にカラー画像の印刷データが送られ、プリンタエンジン部109によって記録媒体に可視像が形成されるまでのモノクロプリント動作の一連の処理を示すフローチャートである。本フローチャートに記載の処理を実行するためのプログラムはROM217に記憶されており、CPU215が当該プログラムを実行することで処理が実現される。   FIG. 3 is a flowchart showing a series of processes of a monochrome print operation until color image print data is sent from the host computer 200 to the printer 214 and a visible image is formed on the recording medium by the printer engine unit 109. A program for executing the processing described in this flowchart is stored in the ROM 217, and the processing is realized by the CPU 215 executing the program.

先ず、ビデオコントローラ110は、入力部221を介してホストコンピュータ200からカラー画像の印刷データを受け取り、RAM216に格納する(S301)。そしてビデオコントローラ110は、図4を用いて後述するデータ処理を行う(S302)。   First, the video controller 110 receives color image print data from the host computer 200 via the input unit 221 and stores it in the RAM 216 (S301). Then, the video controller 110 performs data processing described later with reference to FIG. 4 (S302).

ビデオコントローラ110がS302に記載の処理を完了したのち、出力制御部108はS302で生成されたラスタ画像をプリンタエンジン部109に対するビデオ信号に変換して出力する(S303)。   After the video controller 110 completes the process described in S302, the output control unit 108 converts the raster image generated in S302 into a video signal for the printer engine unit 109 and outputs the video signal (S303).

プリンタエンジン部109は受け取ったビデオ信号に基づいて記録媒体上に可視像を形成する(S304)。その後、プリンタエンジン部109は可視像が形成された記録媒体を排紙する(S305)。   The printer engine unit 109 forms a visible image on the recording medium based on the received video signal (S304). Thereafter, the printer engine unit 109 discharges the recording medium on which the visible image is formed (S305).

ビデオコントローラ110は印刷終了命令をプリンタエンジン部109から受け取ったか否か、または印刷データが終了したか否かに基づいて印刷が終了したかを判断する(S306)。印刷が終了したと判断した場合、ビデオコントローラ110は印刷動作を終了する。印刷終了でなければ、ビデオコントローラ110はS301からS306の処理を繰り返す。   The video controller 110 determines whether printing has ended based on whether a print end command has been received from the printer engine unit 109 or whether the print data has ended (S306). If it is determined that printing has been completed, the video controller 110 ends the printing operation. If the printing is not finished, the video controller 110 repeats the processing from S301 to S306.

図4は、図3のS302でビデオコントローラ110が行うデータ処理の詳細を示すフローチャートである。   FIG. 4 is a flowchart showing details of data processing performed by the video controller 110 in S302 of FIG.

まず、コマンド解析部104は当該印刷データに含まれる文字描画コマンドの数を示す変数nを初期化する(S401)。変数nは、後述する描画処理(S408)において、コマンド解析部104が受信バッファ102から読み出したデータのうち、文字描画コマンドがいくつあったかを記録する変数である。変数nはRAM216に記憶されており、S401でコマンド解析部104が変数nを0にする。   First, the command analysis unit 104 initializes a variable n indicating the number of character drawing commands included in the print data (S401). The variable n is a variable for recording the number of character drawing commands among the data read from the reception buffer 102 by the command analysis unit 104 in the drawing process (S408) described later. The variable n is stored in the RAM 216, and the command analysis unit 104 sets the variable n to 0 in S401.

次に、コマンド解析部104は当該印刷データに含まれる図形描画コマンドの数を示す変数mを初期化する(S402)。変数mは、後述する描画処理(S408)において、コマンド解析部104が受信バッファ102から読み出したデータのうち、図形描画コマンドがいくつあったかを示す変数である。変数mはRAM216に記憶されており、S402では、コマンド解析部104が変数mを0にする。   Next, the command analysis unit 104 initializes a variable m indicating the number of graphic drawing commands included in the print data (S402). The variable m is a variable indicating how many graphics drawing commands are included in the data read from the reception buffer 102 by the command analysis unit 104 in the drawing process (S408) described later. The variable m is stored in the RAM 216, and the command analysis unit 104 sets the variable m to 0 in S402.

次に、コマンド判別部103は受信バッファ102に格納された印刷データからコマンドを読み出し、当該コマンドをコマンド解析部104に送る(S403)。S403でコマンド判別部103が読み出すコマンドとは、印刷データから図形オブジェクトや文字オブジェクトを抽出して描画することを指示するコマンドや、印刷設定や排紙方法を指示するためのコマンドである。   Next, the command determination unit 103 reads a command from the print data stored in the reception buffer 102, and sends the command to the command analysis unit 104 (S403). The command read by the command determination unit 103 in S403 is a command for instructing to draw a graphic object or a character object from print data and drawing, or a command for instructing a print setting or a paper discharge method.

コマンド判別部103は印刷データに含まれるすべてのコマンドの読み出しを終了したか否かを判断する(S404)。印刷データには、ページの始まりと終わりを示すコマンドが含まれている。コマンド判別部103は、受信バッファ102から読み出したコマンドがページの終わりを示すコマンドであれば、後述のS405に処理を進める。一方、印刷データの読み出しの途中である場合、コマンド解析部104は後述のS406の処理を実行する。   The command determination unit 103 determines whether reading of all commands included in the print data has been completed (S404). The print data includes commands indicating the start and end of the page. If the command read from the reception buffer 102 is a command indicating the end of the page, the command determination unit 103 advances the process to S405 described later. On the other hand, when the print data is being read, the command analysis unit 104 executes a process of S406 described later.

印刷データの読み出し途中である場合、コマンド解析部104は、コマンド判別部103から受け取ったコマンドがページメモリ107へ文字/図形等の展開処理を伴う描画コマンドであるか否かを判定する(S406)。   When the print data is being read, the command analysis unit 104 determines whether the command received from the command determination unit 103 is a drawing command accompanied by a character / graphic development process to the page memory 107 (S406). .

コマンド判別部103から受け取ったコマンドが描画コマンドでない場合、コマンド解析部104は、中間データを作成してから処理をS403に戻す(S407)。描画コマンドでないコマンドは、たとえば、排紙に関するコマンドや、片面印刷や両面印刷等の設定に関するコマンドである。一方、コマンド判別部103から受け取ったコマンドが描画コマンドである場合、コマンド解析部104は図5で後述する描画処理を行ってから処理をS403に戻す(S408)。S403〜S408を行うことで、印刷データに含まれる文字オブジェクトや図形オブジェクトを抽出することができる。   When the command received from the command determination unit 103 is not a drawing command, the command analysis unit 104 creates intermediate data and returns the process to S403 (S407). Commands that are not drawing commands are, for example, commands related to paper discharge and commands related to settings such as single-sided printing and double-sided printing. On the other hand, when the command received from the command determination unit 103 is a drawing command, the command analysis unit 104 performs the drawing process described later with reference to FIG. 5 and then returns the process to S403 (S408). By performing S403 to S408, it is possible to extract character objects and graphic objects included in the print data.

コマンド判別部103が1ページ分の印刷データに含まれるすべてのコマンドを読み出したと判定した場合、コマンド解析部104と色調制御部105は図6で後述するグレイ変換処理を行う(S405)。S405において、色調制御部105は、カラー画像の印刷データを単色の印刷データへ変換する。   When the command determination unit 103 determines that all the commands included in the print data for one page have been read, the command analysis unit 104 and the color tone control unit 105 perform gray conversion processing described later with reference to FIG. 6 (S405). In step S <b> 405, the color tone control unit 105 converts the color image print data into single color print data.

S405に記載のグレイ変換処理が完了した後、コマンド実行部106はコマンド解析部104が作成した中間データに基づいて、画素データの集合であるラスタデータの生成を行う。   After the gray conversion process described in S405 is completed, the command execution unit 106 generates raster data, which is a set of pixel data, based on the intermediate data created by the command analysis unit 104.

図5は、図4のS408でコマンド解析部104が実行する描画処理の詳細を示すフローチャートである。本フローチャートに記載の処理はROM217に記憶されたプログラムをCPU215が実行することで実現される。   FIG. 5 is a flowchart showing details of the drawing process executed by the command analysis unit 104 in S408 of FIG. The processing described in this flowchart is realized by the CPU 215 executing a program stored in the ROM 217.

コマンド解析部104は、コマンド判別部103から受け取った描画コマンドが文字オブジェクトの描画コマンドであるか否かを判断する(S501)。   The command analysis unit 104 determines whether or not the drawing command received from the command determination unit 103 is a character object drawing command (S501).

コマンド判別部103から受け取った描画コマンドが文字オブジェクトの描画コマンドである場合、コマンド解析部104はRAM216の文字色バッファに、当該文字の色を格納する(S502)。   When the drawing command received from the command determination unit 103 is a character object drawing command, the command analysis unit 104 stores the character color in the character color buffer of the RAM 216 (S502).

コマンド解析部104は、当該文字オブジェクトの文字サイズをRAM216の文字サイズバッファに格納する(S503)。次に、コマンド解析部104は、当該文字オブジェクトのテキストボックスの位置を文字位置バッファに格納する(S504)。テキストボックスの位置は、当該文字がページのどこに描画されるかを示す情報である。S504では、コマンド解析部104が、文字を表示するテキストボックスのたとえば左上の座標をRAM216に格納する。文字の色は、たとえばコマンドに含まれているRGBの信号値である。   The command analysis unit 104 stores the character size of the character object in the character size buffer of the RAM 216 (S503). Next, the command analysis unit 104 stores the position of the text box of the character object in the character position buffer (S504). The position of the text box is information indicating where the character is drawn on the page. In step S <b> 504, the command analysis unit 104 stores, for example, the upper left coordinates of the text box for displaying characters in the RAM 216. The character color is, for example, an RGB signal value included in the command.

そして、コマンド解析部104は、RAM216に記憶されている変数nの値を現在の値より一つ増やした値に更新する(S505)。その後、コマンド解析部104はコマンド判別部103から受け取ったコマンドに対応する中間データを生成する(S511)。   Then, the command analysis unit 104 updates the value of the variable n stored in the RAM 216 to a value increased by one from the current value (S505). Thereafter, the command analysis unit 104 generates intermediate data corresponding to the command received from the command determination unit 103 (S511).

S501においてコマンド判別部103から受け取った描画コマンドが文字描画コマンドでなかった場合、コマンド解析部104は、該描画コマンドが図形オブジェクトの描画コマンドであるか否かを判断する(S506)。   If the drawing command received from the command determination unit 103 in S501 is not a character drawing command, the command analysis unit 104 determines whether the drawing command is a drawing command for a graphic object (S506).

コマンド判別部103から受け取ったコマンドが図形オブジェクトの描画コマンドである場合、コマンド解析部104は、当該図形オブジェクトの色をRAM216の図形色バッファに格納する(S507)。その後、コマンド解析部104は当該図形オブジェクトの幅および大きさをRAM216の図形サイズバッファに格納する(S508)。そして、コマンド解析部104は当該図形オブジェクトの描画位置を図形位置バッファに格納する(S509)。   When the command received from the command determination unit 103 is a drawing command for a graphic object, the command analysis unit 104 stores the color of the graphic object in the graphic color buffer of the RAM 216 (S507). Thereafter, the command analysis unit 104 stores the width and size of the graphic object in the graphic size buffer of the RAM 216 (S508). Then, the command analysis unit 104 stores the drawing position of the graphic object in the graphic position buffer (S509).

そして、コマンド解析部104は、RAM216に記憶されている変数mの値を現在の値より一つ増やした値に更新する(S510)。その後、コマンド解析部104はコマンド判別部103から受け取ったコマンドに対応する中間データを生成する(S511)。   Then, the command analysis unit 104 updates the value of the variable m stored in the RAM 216 to a value that is increased by one from the current value (S510). Thereafter, the command analysis unit 104 generates intermediate data corresponding to the command received from the command determination unit 103 (S511).

一方、S506においてコマンド解析部104がコマンド判別部103から受け取ったコマンドが図形描画コマンドでなかった場合、コマンド解析部104は受信したコマンドに対応する中間データを生成する(S511)。S506で図形描画コマンドでないと判定されるコマンドとは、例えば、写真などの画像を描画するコマンドである。なお、S501とS506の処理はどちらが先に行われてもよく、また並行に処理されてもよい。   On the other hand, if the command received by the command analysis unit 104 from the command determination unit 103 in S506 is not a graphic drawing command, the command analysis unit 104 generates intermediate data corresponding to the received command (S511). The command determined not to be a graphic drawing command in S506 is a command for drawing an image such as a photograph, for example. Note that either the processing of S501 or S506 may be performed first or may be performed in parallel.

図6は、図4のステップS405に示すグレイ変換処理の詳細を示すフローチャートである。本フローチャートに記載の処理を実行するためのプログラムはROM217に格納されており、CPU215が当該プログラムを実行することで処理が実現される。   FIG. 6 is a flowchart showing details of the gray conversion process shown in step S405 of FIG. A program for executing the processing described in this flowchart is stored in the ROM 217, and the processing is realized by the CPU 215 executing the program.

コマンド解析部104は、中間データ化された各コマンド群の中に色情報を有する描画コマンドがあるか否かを判定する(S601)。色情報を含む描画コマンドがある場合、コマンド解析部104はS602の処理を実行する。一方、色情報を含む描画コマンドがない場合、コマンド解析部104は、グレイ変換処理(S405)を終了し、コマンド実行部106は図4のS409に示す処理を実行する。   The command analysis unit 104 determines whether there is a drawing command having color information in each command group converted to intermediate data (S601). When there is a drawing command including color information, the command analysis unit 104 executes the process of S602. On the other hand, when there is no drawing command including color information, the command analysis unit 104 ends the gray conversion process (S405), and the command execution unit 106 executes the process shown in S409 of FIG.

描画データのなかに色情報をもつ文字または図形の描画データがある場合、コマンド解析部104は、RAM216に格納されている印刷データ中の文字数を表す変数nの値を、文字の処理数の最終値としてRAM216に格納する(S602)。   When there is character or graphic drawing data having color information in the drawing data, the command analysis unit 104 sets the value of the variable n indicating the number of characters in the print data stored in the RAM 216 to the final number of characters processed. The value is stored in the RAM 216 (S602).

コマンド解析部104は、RAM216に格納されている印刷データ中の図形の数を示す変数mの値を図形の処理数の最終値としてRAM216に格納する(S603)。   The command analysis unit 104 stores the value of the variable m indicating the number of graphics in the print data stored in the RAM 216 in the RAM 216 as the final value of the processing number of graphics (S603).

次に、色調制御部105は、色情報(RGB)を濃度情報(Gray)に変換するカラーグレイ変換LUTを外部メモリ226より取得する(S604)。ここでカラーグレイ変換LUTは、図7に示すテーブルであり、入力値にRGBの各信号値、出力値に濃度情報(Gray)をもつルックアップテーブル(LUT)である。図7に示すカラーグレイ変換LUTは、Rが50、Gが50、Bが100のとき、Grayの濃度が56であることを示している。   Next, the color tone control unit 105 acquires a color gray conversion LUT for converting color information (RGB) into density information (Gray) from the external memory 226 (S604). Here, the color gray conversion LUT is a table shown in FIG. 7, and is a lookup table (LUT) having RGB signal values as input values and density information (Gray) as output values. The color gray conversion LUT shown in FIG. 7 indicates that the gray density is 56 when R is 50, G is 50, and B is 100.

カラーグレイ変換LUTは例えば、均等な色情報(RGB)に対してNTSC方式を用いて濃度情報(Gray)を演算したものを出力値としてもっておいてもよい。   For example, the color gray conversion LUT may have an output value obtained by calculating density information (Gray) using the NTSC method with respect to uniform color information (RGB).

そして、色調制御部105は、文字オブジェクトの処理数を示す変数iを初期化する(S605)。   Then, the color tone control unit 105 initializes a variable i indicating the number of processed character objects (S605).

色調制御部105は、カラーグレイ変換LUTを用いて、i番目の文字オブジェクトの色情報(RGB)から文字濃度(Gray)を算出する。そして、色調制御部105は算出した文字濃度(Gray)をRAM216の文字濃度バッファに格納する(S606)。S606において算出された文字濃度(Gray)は、後述の説明でGray_bf_txtと称して説明する。   The color tone control unit 105 calculates a character density (Gray) from the color information (RGB) of the i-th character object using the color gray conversion LUT. Then, the color tone control unit 105 stores the calculated character density (Gray) in the character density buffer of the RAM 216 (S606). The character density (Gray) calculated in S606 will be described as Gray_bf_txt in the following description.

次に、色調制御部105は、図形オブジェクトの処理数を示す変数jを初期化する(S607)。   Next, the color tone control unit 105 initializes a variable j indicating the number of graphic objects processed (S607).

色調制御部105は、RAM216の図形色バッファからj番目の図形オブジェクトの色情報(RGB)を読み出す。そして、色調制御部105は、読み出した色情報(RGB)を図形濃度(Gray)に変換する。色調制御部105は、得られた図形濃度(Gray)をRAM216の図形濃度バッファに格納する(S608)。算出された図形濃度(Gray)は、後述の説明でGray_bf_backと記載する。   The tone control unit 105 reads the color information (RGB) of the jth graphic object from the graphic color buffer of the RAM 216. Then, the color tone control unit 105 converts the read color information (RGB) into a graphic density (Gray). The color tone control unit 105 stores the obtained graphic density (Gray) in the graphic density buffer of the RAM 216 (S608). The calculated graphic density (Gray) is described as Gray_bf_back in the description below.

そして、色調制御部105は、図8を用いて後述する明度補正処理を実行する(S609)。色調制御部105は変数jが、S603でコマンド解析部104がRAM216に格納した図形の数を示すmの値と一致するかを判定する(S610)。変数jが印刷データに含まれる図形の数mと異なる場合、色調制御部105は変数jの値を一つ大きくして、処理をS608に戻す(S612)。   Then, the color tone control unit 105 executes brightness correction processing described later with reference to FIG. 8 (S609). The color tone control unit 105 determines whether the variable j matches the value of m indicating the number of graphics stored in the RAM 216 by the command analysis unit 104 in S603 (S610). If the variable j is different from the number m of figures included in the print data, the tone control unit 105 increases the value of the variable j by one and returns the process to S608 (S612).

変数jが印刷データに含まれる画像の数mと同一であれば、色調制御部105は変数iが印刷データに含まれる文字の数nと同一かを判定する(S611)。変数iの値が印刷データに含まれる文字数nと同一でなければ、色調制御部105は変数iの値を一つ大きくして、処理をS606に戻す(S613)。   If the variable j is the same as the number m of images included in the print data, the tone control unit 105 determines whether the variable i is the same as the number n of characters included in the print data (S611). If the value of the variable i is not the same as the number of characters n included in the print data, the color tone control unit 105 increases the value of the variable i by one and returns the process to S606 (S613).

変数iが印刷データに含まれる文字数nと同一の場合、色調制御部105は本フローチャートに記載のグレイ変換処理を終了し、コマンド実行部106が図4のS409に記載の処理を行う。   When the variable i is the same as the number n of characters included in the print data, the tone control unit 105 ends the gray conversion process described in this flowchart, and the command execution unit 106 performs the process described in S409 in FIG.

図8は、本実施形態の特徴である図6のS609において色調制御部105が実行する明度補正処理の詳細を示すフローチャートである。本フローチャートに記載の処理はCPU215がROM217等に記憶されているプログラムを実行することで実現される。   FIG. 8 is a flowchart showing details of the brightness correction processing executed by the color tone control unit 105 in S609 of FIG. 6 which is a feature of the present embodiment. The processing described in this flowchart is realized by the CPU 215 executing a program stored in the ROM 217 or the like.

色調制御部105は、i番目の文字とj番目の図形が重なっているかを判定する(S801)。S801では、図5の描画処理のS503とS504において取得した文字のサイズと位置、およびS508とS509において取得した図形のサイズと位置を比較し文字と図形が重なるか否かを判定する。文字の描画される領域が図形の描画される領域に全て覆われている場合、色調制御部105は文字と図形が重なると判定する。   The color tone control unit 105 determines whether the i-th character and the j-th figure overlap (S801). In S801, the size and position of the character acquired in S503 and S504 of the drawing process of FIG. 5 and the size and position of the graphic acquired in S508 and S509 are compared to determine whether the character and the graphic overlap. When the area where the character is drawn is entirely covered by the area where the graphic is drawn, the color tone control unit 105 determines that the character and the graphic overlap.

色調制御部105が、文字と図形が重ならないと判断した場合、色調制御部105は本フローチャートに記載の処理を終了し、図6のS610に処理を進める。   When the color tone control unit 105 determines that the character and the figure do not overlap, the color tone control unit 105 ends the processing described in this flowchart, and advances the processing to S610 in FIG.

色調制御部105が文字と図形が重なると判断した場合、色調制御部105は外部メモリ226から、図9に示す文字サイズ最低明度差LUTを取得する(S802)。   When the color tone control unit 105 determines that the character and the figure overlap, the color tone control unit 105 obtains the character size minimum brightness difference LUT shown in FIG. 9 from the external memory 226 (S802).

文字サイズ最低明度差LUTは予め外部メモリ226に格納されている一次元のテーブルである。インデックスxは、各行のデータを管理するための見出しとなる値である。文字サイズPt[x]は、文字オブジェクトのフォントサイズを示している。最低明度差(min_ΔL*[x])は、図形オブジェクトに文字サイズPt[x]の文字が重畳して描画される場合にユーザが図形と文字を区別するために必要な明度差の最低値である。   The character size minimum brightness difference LUT is a one-dimensional table stored in the external memory 226 in advance. The index x is a value serving as a headline for managing the data of each row. The character size Pt [x] indicates the font size of the character object. The minimum brightness difference (min_ΔL * [x]) is the minimum brightness difference necessary for the user to distinguish between a graphic and a character when a graphic object is drawn with a character size Pt [x] superimposed on it. is there.

図9に示す文字サイズ最低明度差LUTより、たとえば、文字サイズが10ptの文字であれば、背景にある図形と文字の明度差が20あれば文字と背景とをユーザが区別することができることがわかる。図9より文字サイズが小さいほど、最低明度差(min_ΔL*[x])が大きく、文字サイズが大きいほど、最低明度差(min_ΔL*[x])が小さくなる。これは、文字サイズが小さいほど文字の面積が小さいまたは、文字を構成する線が細いために、図形と文字の明度差が大きくならないとユーザが図形と文字を区別できないためである。一方で、文字サイズの大きい文字は、文字の面積が大きい、また文字を構成する線の線幅が太いため図形と文字の濃度差が小さくてもユーザが文字を区別できるためである。   From the character size minimum brightness difference LUT shown in FIG. 9, for example, if the character size is a character of 10 pt, the user can distinguish between the character and the background if there is a brightness difference between the figure in the background and the character. Recognize. From FIG. 9, the minimum lightness difference (min_ΔL * [x]) increases as the character size decreases, and the minimum lightness difference (min_ΔL * [x]) decreases as the character size increases. This is because the smaller the character size, the smaller the area of the character or the thinner the lines that make up the character, so that the user cannot distinguish the graphic from the character unless the brightness difference between the graphic and the character increases. On the other hand, a character having a large character size has a large character area, and the line width constituting the character is thick, so that the user can distinguish the character even if the density difference between the graphic and the character is small.

次に、色調制御部105はS802において取得した文字サイズ最低明度差LUTを用いて、i番目の文字の文字サイズにおいて必要な最低明度差(min_ΔL*[x])を求める(S803)。色調制御部105はS802で取得した最低明度差LUTを線形補間することでi番目の文字の文字サイズにおける最低明度差(min_ΔLUT*[x])を求める。   Next, the color tone control unit 105 obtains the minimum lightness difference (min_ΔL * [x]) necessary for the character size of the i-th character using the character size minimum lightness difference LUT acquired in S802 (S803). The color tone control unit 105 obtains the minimum brightness difference (min_ΔLUT * [x]) in the character size of the i-th character by linearly interpolating the minimum brightness difference LUT acquired in S802.

例えば文字サイズが5ptの場合、色調制御部105は入力文字サイズ(Ptinput)を5とする。色調制御部105はインデックス[x](0<x<N)をPt[x]<Ptinput<Pt[x+1]が成り立つように決定する。ここでは、Ptinputが5であるため、xは0、x+1は1である。   For example, when the character size is 5 pt, the color tone control unit 105 sets the input character size (Ptinput) to 5. The color tone control unit 105 determines the index [x] (0 <x <N) so that Pt [x] <Ptinput <Pt [x + 1] holds. Here, since Pprint is 5, x is 0 and x + 1 is 1.

図9より文字サイズPt[0]が1ポイントである場合、最低明度差min_ΔL*[0]は30である。また、文字サイズPt[1]が10ポイントである場合、そのときの最低明度差min_ΔL*[1]は20である。色調制御部105は、上記の値を下記の式(1)に代入して、i番目の文字の最低明度差min_ΔL*[x]を求める。Ptinputが5ポイントの場合、最低明度差は25.6となる。   As shown in FIG. 9, when the character size Pt [0] is 1 point, the minimum brightness difference min_ΔL * [0] is 30. When the character size Pt [1] is 10 points, the minimum brightness difference min_ΔL * [1] at that time is 20. The tone control unit 105 substitutes the above value into the following formula (1) to obtain the minimum brightness difference min_ΔL * [x] of the i-th character. When Ptput is 5 points, the minimum brightness difference is 25.6.

Figure 2018142851

S803において、色調制御部105がi番目の文字について、ユーザが図形と文字を区別するために必要な明度差(最低明度差)を文字サイズに基づいて決定する。最低明度差は、後に説明する文字濃度(Grey)修正処理を色調制御部105が実行するか否かの閾値として用いられる。
Figure 2018142851

In step S <b> 803, the color tone control unit 105 determines a brightness difference (minimum brightness difference) necessary for the user to distinguish a graphic from a character for the i-th character based on the character size. The minimum brightness difference is used as a threshold value for determining whether or not the color tone control unit 105 executes a character density (Grey) correction process described later.

次に、色調制御部105は外部メモリ226から、図10に示すグレイ明度変換LUTを取得する(S804)。グレイ明度変換LUTは、グレイ濃度を明度に変換するための明度変換テーブルである。インデックスyは各行のデータを管理するための見出しとなる値である。Gray(Gry[y])は、入力となるグレイスケール画像の濃度信号の値である。明度(L*[y])は、濃度信号(Gry[y])に対する出力となる明度を示している。   Next, the color tone control unit 105 acquires the gray lightness conversion LUT shown in FIG. 10 from the external memory 226 (S804). The gray lightness conversion LUT is a lightness conversion table for converting gray density to lightness. The index y is a value serving as a headline for managing the data of each row. Gray (Gry [y]) is the value of the density signal of the grayscale image to be input. The lightness (L * [y]) indicates the lightness that is output for the density signal (Gry [y]).

グレイ明度変換LUTは予め外部メモリ226に格納されているものとする。しかし、グレイ明度変換LUTは予め、複数の濃度信号(Gray)をもつ画像データをプリンタ214で印刷し、チャートを測色機で測色して取得した明度(L*)の値をグレイ明度変換LUTの明度(L*[y])としてもよい。   It is assumed that the gray lightness conversion LUT is stored in the external memory 226 in advance. However, the gray lightness conversion LUT prints image data having a plurality of density signals (Gray) with the printer 214 in advance, and converts the lightness (L *) value obtained by measuring the chart with a colorimeter to the gray lightness conversion. It is good also as the brightness (L * [y]) of LUT.

次に、色調制御部105はS804で取得したグレイ明度変換LUTを用いてi番目の文字の濃度を明度に変換する(S805)。色調制御部105は、S606で求めた文字濃度(Gray_bf_txt)から文字の明度(L*_txt)を求める。   Next, the color tone control unit 105 converts the density of the i-th character into lightness using the gray lightness conversion LUT acquired in S804 (S805). The color tone control unit 105 obtains the lightness (L * _txt) of the character from the character density (Gray_bf_txt) obtained in S606.

例えば、文字濃度Gray_bf_txtが30の場合、色調制御部105は入力グレイデータ(Gryinput)を30とする。色調制御部105は、インデックス(y)(0<y<M)をGry[y]<Gryinput<Gry[y+1]が成り立つように決定する。ここでは、Gryinputが30であるため、yは1、y+1は2である。図10より、濃度信号Gry[1]は17であり、そのときの明度L*[1]は22である。濃度信号Gry[2]は34であり、そのときの明度L*[2]は25である。色調制御部105はこれらの値を下記の式(2)に代入することでi番目の文字の明度を求める。Gryinputが30の場合、明度は24.3である。   For example, when the character density Gray_bf_txt is 30, the color tone control unit 105 sets the input gray data (Gryinput) to 30. The color tone control unit 105 determines the index (y) (0 <y <M) so that Gry [y] <Gryinput <Gry [y + 1] holds. Here, since Gryinput is 30, y is 1 and y + 1 is 2. From FIG. 10, the density signal Gry [1] is 17, and the lightness L * [1] at that time is 22. The density signal Gry [2] is 34, and the lightness L * [2] at that time is 25. The color tone control unit 105 obtains the brightness of the i-th character by substituting these values into the following equation (2). When Gryinput is 30, the brightness is 24.3.

Figure 2018142851

次に、色調制御部105はS804で取得したグレイ明度変換LUTを用いてj番目の図形の濃度を明度に変換する(S806)。色調制御部105は、S608で求めた図形濃度(Gray_bf_back)からj番目の図形の明度(L*_back)を求める。S806において色調制御部105が行う処理は、S805で行う処理と同様であるため、説明を省略する。
Figure 2018142851

Next, the color tone control unit 105 converts the density of the j-th figure into lightness using the gray lightness conversion LUT acquired in S804 (S806). The color tone control unit 105 obtains the brightness (L * _back) of the j-th figure from the figure density (Gray_bf_back) obtained in S608. Since the process performed by the color tone control unit 105 in S806 is the same as the process performed in S805, description thereof is omitted.

次に、色調制御部105はS805で求めた文字の明度(L*_txt)とS806で求めた図形の明度(L*_back)の差分の絶対値(ΔL*_abs)を下記式(3)により求める(S807)。   Next, the color tone control unit 105 calculates the absolute value (ΔL * _abs) of the difference between the character brightness (L * _txt) obtained in S805 and the figure brightness (L * _back) obtained in S806 by the following equation (3). Obtain (S807).

ΔL abs=│L txt−L back ・・・式(3)
次に、色調制御部105はS807で求めた文字と図形の明度差の絶対値(ΔL*_abs)が、S803において取得した最低明度差(min_ΔL*)未満であるか否かを判断する(S808)。
ΔL * abs = | L * txt− L * back Expression (3)
Next, the color tone control unit 105 determines whether or not the absolute value (ΔL * _abs) of the brightness difference between the character and the figure obtained in S807 is less than the minimum brightness difference (min_ΔL *) acquired in S803 (S808). ).

文字と図形の明度差の絶対値(ΔL*_abs)が最低明度差(min_ΔL*)未満である場合、色調制御部105は後述するS809の処理を実行する。一方、文字と図形の明度差の絶対値(ΔL*_abs)が最低明度差(min_ΔL*)以上の場合、色調制御部105は本フローチャートに記載の処理を終了してから、図6のS610の処理を実行する。   When the absolute value (ΔL * _abs) of the brightness difference between the character and the figure is less than the minimum brightness difference (min_ΔL *), the color tone control unit 105 executes the process of S809 described later. On the other hand, if the absolute value (ΔL * _abs) of the lightness difference between the character and the figure is equal to or greater than the minimum lightness difference (min_ΔL *), the color tone control unit 105 ends the processing described in this flowchart and then proceeds to S610 in FIG. Execute the process.

次に、文字と図形の明度差の絶対値(ΔL*_abs)が最低明度差(min_ΔL*)未満である場合、色調制御部105は後述する文字濃度(Gray)修正処理を実行する(S809)。色調制御部105はS809の処理を終了させた後、本フローチャートに記載の処理を終了して、図6のS610の処理を実行する。   Next, when the absolute value (ΔL * _abs) of the lightness difference between the character and the figure is less than the minimum lightness difference (min_ΔL *), the color tone control unit 105 executes a character density (Gray) correction process described later (S809). . After the color tone control unit 105 ends the process of S809, the color tone control unit 105 ends the process described in this flowchart and executes the process of S610 of FIG.

次に、図11〜図15を用いて、図8のS809における文字濃度(Gray)修正処理について説明する。   Next, the character density (Gray) correction process in S809 of FIG. 8 will be described with reference to FIGS.

はじめに、グレイ変換後の図形のグレイ明度が、文字のグレイ明度よりも大きい場合、すなわち図形が文字よりも薄いグレイで描画されている場合について図12と図13を用いて説明する。   First, the case where the gray brightness of the figure after gray conversion is larger than the gray brightness of the character, that is, the case where the figure is drawn in lighter gray than the character will be described with reference to FIGS.

図12は文字と図形の明度を模式的に表したものである。縦軸は明度(L*)を示している。lim_L*_maxは図10に示すグレイ明度変換LUTの明度L*[M]の最大値、lim_L*_minは図10に示すグレイ明度変換LUTの明度ΔL*[0]の最小値である。例えば、図10ではlim_L*_maxは70、lim_L*_minは20である。min_ΔL*はS803で求めた最低明度差min_ΔL*[x]、L*_txtは文字の明度、L*_backは図形の明度である。また、図中の白丸は図8のS809の文字濃度(Gray)修正処理後の文字の明度を示している。   FIG. 12 schematically shows the brightness of characters and figures. The vertical axis represents lightness (L *). lim_L * _max is the maximum value of the lightness L * [M] of the gray lightness conversion LUT shown in FIG. 10, and lim_L * _min is the minimum value of the lightness ΔL * [0] of the gray lightness conversion LUT shown in FIG. For example, in FIG. 10, lim_L * _max is 70 and lim_L * _min is 20. min_ΔL * is the minimum lightness difference min_ΔL * [x] obtained in S803, L * _txt is the lightness of the character, and L * _back is the lightness of the figure. Also, the white circles in the figure indicate the brightness of the character after the character density (Gray) correction process of S809 in FIG.

図13は文字濃度(Gray)修正処理前後のグレイスケール画像を示している。1301、1303、1305、1307は文字濃度(Gray)修正処理前のグレイスケール画像であり、1302、1304、1306、1308は文字濃度(Gray)修正処理後のグレイスケール画像である。また図13(A)〜(D)はそれぞれ、図12の(A)〜(D)に対応している。   FIG. 13 shows grayscale images before and after the character density (Gray) correction process. Reference numerals 1301, 1303, 1305, and 1307 denote gray scale images before the character density (Gray) correction process, and reference numerals 1302, 1304, 1306, and 1308 denote gray scale images after the character density (Gray) correction process. FIGS. 13A to 13D correspond to FIGS. 12A to 12D, respectively.

図12(A)は図形より文字の明度が低く、図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値がlim_L*_min以上の場合を示している。この場合、色調制御部105は文字の明度(L*_txt)を図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値(図中の白丸)に補正する。図12(A)では、色調制御部105は文字の明度を下げる処理を実行する。すなわち、図13(A)の1301および1302に示すように、文字の濃度が濃くなるよう文字のグレイ濃度が調整される。   FIG. 12A shows a case where the lightness of the character is lower than that of the graphic, and the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is not less than lim_L * _min. In this case, the color tone control unit 105 corrects the lightness (L * _txt) of the character to a value (white circle in the drawing) obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic. In FIG. 12A, the color tone control unit 105 executes a process for reducing the brightness of the character. That is, as shown by 1301 and 1302 in FIG. 13A, the gray density of the character is adjusted so that the character density is high.

図12(B)は図形より文字の明度が低く、図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値がlim_L*_min未満の場合である。図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_max以下であれば、色調制御部105は文字の明度(L*_txt)を図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値に補正する。すなわち図13(B)の1303、1304に示すように、文字の濃度が薄くなるよう文字のグレイ濃度が調整される。   FIG. 12B shows a case where the lightness of the character is lower than that of the graphic, and the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is less than lim_L * _min. If the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is equal to or smaller than lim_L * _max, the color tone control unit 105 converts the lightness (L * _txt) of the character into the lightness (L * _back) of the graphic. ) Plus a minimum brightness difference (min_ΔL *). That is, as shown at 1303 and 1304 in FIG. 13B, the gray density of the character is adjusted so that the character density becomes light.

図12(C)(D)は図形より文字の方の明度が低く、図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値がlim_L*_minよりも小さい場合である。さらに図12(C)(D)は、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_maxよりも大きくなってしまう場合である。この時、色調制御部105は、lim_L*_maxと図形の明度の差の絶対値と、lim_L*_minと図形の明度の差の絶対値を比較する。lim_L*_maxと図形の明度の差の絶対値がlim_L*_minと図形の明度の差の絶対値以上であれば、色調制御部105は文字の明度をlim_L*_maxに補正する。すなわち、図13(C)のように文字色がグレイ変換LUTの明度(L*[y])の最大値に補正され、文字のグレイ濃度が薄くなるよう調整される。lim_L*_maxと図形の明度の差の絶対値がlim_L*_minと図形の明度の差の絶対値未満の場合、色調制御部105は文字の明度をlim_L*_minに補正する。すなわち、図13(D)のように文字色がグレイ変換LUTの明度(L*[y])の最小値に補正され、文字の濃度が濃くなるよう調整される。   FIGS. 12C and 12D show the case where the lightness of the character is lower than that of the graphic, and the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is smaller than lim_L * _min. Further, FIGS. 12C and 12D show a case where the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the figure is larger than lim_L * _max. At this time, the color tone control unit 105 compares the absolute value of the difference between lim_L * _max and the brightness of the graphic, and the absolute value of the difference between lim_L * _min and the brightness of the graphic. If the absolute value of the difference between lim_L * _max and the brightness of the graphic is equal to or greater than the absolute value of the difference between lim_L * _min and the brightness of the graphic, the tone control unit 105 corrects the brightness of the character to lim_L * _max. That is, as shown in FIG. 13C, the character color is corrected to the maximum value of the lightness (L * [y]) of the gray conversion LUT, and the gray density of the character is adjusted to be light. When the absolute value of the difference between lim_L * _max and the brightness of the figure is less than the absolute value of the difference between lim_L * _min and the brightness of the figure, the tone control unit 105 corrects the brightness of the character to lim_L * _min. That is, as shown in FIG. 13D, the character color is corrected to the minimum value of the lightness (L * [y]) of the gray conversion LUT and adjusted so that the character density is high.

次に、グレイ変換後の図形のグレイ明度が、文字のグレイ明度よりも小さい場合、すなわち図形が文字よりも濃いグレイで描画されている場合について図14と図15を用いて説明する。   Next, the case where the gray brightness of the graphic after gray conversion is smaller than the gray brightness of the character, that is, the case where the graphic is drawn in a darker gray than the character will be described with reference to FIGS.

図14は文字と図形の明度を模式的に表したものである。各符号は図12と同様であるため説明を省略する。   FIG. 14 schematically shows the brightness of characters and figures. Since the respective symbols are the same as those in FIG.

図15は文字濃度(Gray)修正処理前後のグレイスケール画像を示している。1501、1503、1505、1507は文字濃度(Gray)修正処理前のグレイスケール画像であり、1502、1504、1506、1508は文字濃度(Gray)修正処理後のグレイスケール画像である。また図14(A)〜(D)はそれぞれ、図15の(A)〜(D)に対応している。   FIG. 15 shows grayscale images before and after the character density (Gray) correction process. 1501, 1503, 1505, and 1507 are gray scale images before the character density (Gray) correction process, and 1502, 1504, 1506, and 1508 are gray scale images after the character density (Gray) correction process. 14A to 14D correspond to FIGS. 15A to 15D, respectively.

図14(A)は、文字の明度が図形の明度よりも高く、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_max以下の場合である。色調制御部105は文字の明度(L*_txt)を図形の明度(L*_back)と最低明度差(min_ΔL*)を加えた値に補正する。すなわち、色調制御部105は図15(A)に示すように、文字の濃度が薄くなるよう文字濃度を補正する。   FIG. 14A shows a case where the lightness of the character is higher than the lightness of the graphic, and the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is less than or equal to lim_L * _max. The color tone control unit 105 corrects the lightness (L * _txt) of the character to a value obtained by adding the lightness (L * _back) of the graphic and the minimum lightness difference (min_ΔL *). That is, as shown in FIG. 15A, the color tone control unit 105 corrects the character density so as to reduce the character density.

図14(B)は、文字の明度が図形の明度よりも高く、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_maxよりも大きい場合である。このとき、図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値がlim_L*_min以上であれば、文字の明度(L*_txt)が図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値に補正される。すなわち、色調制御部105は図15(B)に示すように、文字の濃度を濃くする補正を行う。   FIG. 14B shows a case where the brightness of the character is higher than the brightness of the figure, and the value obtained by adding the minimum brightness difference (min_ΔL *) to the brightness of the figure (L * _back) is larger than lim_L * _max. At this time, if the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is equal to or larger than lim_L * _min, the lightness (L * _txt) of the character is calculated from the lightness (L * _back) of the graphic. The value is corrected by subtracting the minimum brightness difference (min_ΔL *). That is, as shown in FIG. 15B, the color tone control unit 105 performs correction to increase the character density.

図14(C)(D)は図形より文字の明度が高く、図形の明度(L*_back)から最低明度差(min_ΔL*)を差し引いた値がlim_L*_minよりも小さい場合である。さらに図14(C)(D)は、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_maxを超えてしまう場合である。この時、色調制御部105は、lim_L*_maxと図形の明度の差の絶対値と、lim_L*_minと図形の明度の差の絶対値を比較する。lim_L*_maxと図形の明度の差の絶対値がlim_L*_minと図形の明度(L*_back)の差の絶対値以上であれば、色調制御部105は文字の明度をlim_L*_maxに補正する。すなわち、色調制御部105は図15(C)のように文字色をグレイ変換LUTの明度(L*[y])の最大値に補正して、文字のグレイ濃度を薄くする。lim_L*_maxと図形の明度の差の絶対値がlim_L*_minと図形の明度の差の絶対値未満であれば、色調制御部105は文字の明度(L*_txt)をlim_L*_minに補正する。すなわち、色調制御部105は図15(D)のように文字色をグレイ変換LUTの明度(L*[y])の最小値に補正して、文字の濃度を濃くする。   FIGS. 14C and 14D show the case where the lightness of the character is higher than that of the graphic, and the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is smaller than lim_L * _min. Further, FIGS. 14C and 14D show a case where the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic exceeds lim_L * _max. At this time, the color tone control unit 105 compares the absolute value of the difference between lim_L * _max and the brightness of the graphic, and the absolute value of the difference between lim_L * _min and the brightness of the graphic. If the absolute value of the difference between lim_L * _max and the brightness of the figure is equal to or greater than the absolute value of the difference between lim_L * _min and the brightness of the figure (L * _back), the tone control unit 105 corrects the brightness of the character to lim_L * _max. . That is, the color tone control unit 105 corrects the character color to the maximum value of the lightness (L * [y]) of the gray conversion LUT as shown in FIG. 15C to reduce the gray density of the character. If the absolute value of the difference between lim_L * _max and the brightness of the figure is less than the absolute value of the difference between lim_L * _min and the brightness of the figure, the tone control unit 105 corrects the brightness (L * _txt) of the character to lim_L * _min. . That is, the color tone control unit 105 corrects the character color to the minimum value of the lightness (L * [y]) of the gray conversion LUT as shown in FIG. 15D to increase the character density.

図11のフローチャートを利用し、図8のS809に記載の文字濃度(Gray)修正処理の詳細を説明する。本フローチャートに記載の処理を実行するためのプログラムはROM217に記憶されており、CPU215が当該プログラムを読み出して実行することで本フローチャートに記載の処理が実現される。   Details of the character density (Gray) correction processing described in S809 of FIG. 8 will be described using the flowchart of FIG. A program for executing the processing described in this flowchart is stored in the ROM 217, and the processing described in this flowchart is realized by the CPU 215 reading and executing the program.

まず、色調制御部105は図8のS804で取得したグレイ明度変換LUTを参照し、インデックスが0の明度の値を明度の下限値(lim_L*_min)に設定する。また、色調制御部105はグレイ明度変換LUTのインデックスが最も大きい明度の値を明度の上限値(lim_L*_max)に設定する(S1101)。例えば、色調制御部105は図10のグレイ明度変換LUTを参照して、明度の下限値(lim_L*_min)を20、明度の上限値(lim_L*_max)を70に設定する。   First, the color tone control unit 105 refers to the gray lightness conversion LUT acquired in step S804 in FIG. 8, and sets the lightness value with an index of 0 as the lightness lower limit (lim_L * _min). Further, the color tone control unit 105 sets the lightness value with the largest index of the gray lightness conversion LUT as the lightness upper limit value (lim_L * _max) (S1101). For example, the color tone control unit 105 sets the lightness lower limit (lim_L * _min) to 20 and the lightness upper limit (lim_L * _max) to 70 with reference to the gray lightness conversion LUT of FIG.

次に、色調制御部105は図8のS806において求めた図形の明度(L*_back)が図8のS805において求めた文字の明度(L*_txt)以上であるか否かを判断する(S1102)。図形の明度(L*_back)が文字の明度(L*_txt)以上である場合、色調制御部105は後述するS1103の処理を実行する。   Next, the color tone control unit 105 determines whether or not the lightness (L * _back) of the graphic obtained in S806 of FIG. 8 is equal to or higher than the lightness (L * _txt) of the character obtained in S805 of FIG. 8 (S1102). ). When the lightness (L * _back) of the figure is equal to or higher than the lightness (L * _txt) of the character, the color tone control unit 105 executes the process of S1103 described later.

一方、図形の明度(L*_back)が文字の明度(L*_txt)未満である場合、色調制御部105は後述するS1108の処理を実行する。   On the other hand, when the lightness (L * _back) of the figure is less than the lightness (L * _txt) of the character, the color tone control unit 105 executes the process of S1108 described later.

文字の明度(L*_txt)が図形の明度(L*_back)未満である場合、色調制御部105は図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値が明度の下限値(lim_L*_min)以上であるかを判断する(S1103)。ここで図形の明度(L*_back)は、図8のS806で色調制御部105が求めたものである。また、最低明度差(min_ΔL*)は図8のS803で色調制御部105が求めたものである。   When the lightness (L * _txt) of the character is less than the lightness (L * _back) of the graphic, the tone control unit 105 subtracts the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic. It is determined whether it is equal to or greater than the lower limit value (lim_L * _min) (S1103). Here, the brightness (L * _back) of the figure is obtained by the color tone control unit 105 in S806 of FIG. Further, the minimum lightness difference (min_ΔL *) is obtained by the color tone control unit 105 in S803 of FIG.

図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値がlim_L*_min以上の場合、色調制御部105は文字の明度(L*_txt)を図形の明度から最低明度差を引いた値に補正する(S1114)。S1114の処理は、図12(A)、図13(A)に対応する処理である。   When the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is equal to or larger than lim_L * _min, the color tone control unit 105 calculates the lightness (L * _txt) of the character from the lightness of the graphic. The value is corrected to the subtracted value (S1114). The process of S1114 is a process corresponding to FIG. 12 (A) and FIG. 13 (A).

図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値がlim_L*_min未満である場合、色調制御部105は以下の処理を行う。色調制御部105は図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_ΔL*_max以下であるか否かを判断する(S1104)。   When the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the figure is less than lim_L * _min, the color tone control unit 105 performs the following processing. The color tone control unit 105 determines whether or not the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is equal to or smaller than lim_ΔL * _max (S1104).

図形の明度(L*_back)と最低明度差(min_ΔL*)の合計値がlim_ΔL*_maxより大きい場合、色調制御部105は後述するS1105の処理を実行する。   When the total value of the lightness (L * _back) and the minimum lightness difference (min_ΔL *) of the figure is larger than lim_ΔL * _max, the color tone control unit 105 executes processing of S1105 described later.

一方、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_ΔL*_max以下の場合、色調制御部105は以下の処理を実行する。色調制御部105は、文字の明度(L*_txt)を図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値に補正する(S1112)。S1112の処理は図12(B)、図13(B)に対応する。   On the other hand, when the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is equal to or smaller than lim_ΔL * _max, the color tone control unit 105 executes the following processing. The color tone control unit 105 corrects the lightness (L * _txt) of the character to a value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic (S1112). The process of S1112 corresponds to FIGS. 12B and 13B.

次に、S1104において、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_maxよりも大きい場合、色調制御部105は以下の処理を実行する。   Next, when the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is larger than lim_L * _max in S1104, the color tone control unit 105 executes the following processing.

色調制御部105は、明度の上限値(lim_L*_max)から図形の明度(L*_back)を引いた値の絶対値(tmp_max)をもとめる。また、色調制御部105は図形の明度(L*_back)から明度の下限値(lim_L*_min)を引いた値の絶対値(tmp_min)を求める。そして、色調制御部105はtmp_maxとtmp_minの値を比較し、tmp_maxがtmp_min以上であるかを判定する(S1105)。   The color tone control unit 105 obtains an absolute value (tmp_max) of a value obtained by subtracting the brightness (L * _back) of the figure from the upper limit value (lim_L * _max) of the brightness. Further, the color tone control unit 105 obtains an absolute value (tmp_min) of a value obtained by subtracting the lower limit value (lim_L * _min) of the brightness from the brightness (L * _back) of the figure. Then, the color tone control unit 105 compares the values of tmp_max and tmp_min, and determines whether tmp_max is greater than or equal to tmp_min (S1105).

tmp_maxがtmp_min以上であるの場合、色調制御部105は、文字の明度(L*_txt)をlim_L*_maxに補正する(S1106)。S1106の処理は図12(C)、図13(C)に対応する。   When tmp_max is equal to or greater than tmp_min, the color tone control unit 105 corrects the lightness (L * _txt) of the character to lim_L * _max (S1106). The process of S1106 corresponds to FIGS. 12C and 13C.

tmp_maxがtmp_min未満であるの場合、色調制御部105は、文字の明度(L*_txt)をlim_L*_minに補正をする(S1113)。S1113の処理は図12(D)、図13(D)に対応する。   When tmp_max is less than tmp_min, the color tone control unit 105 corrects the lightness (L * _txt) of the character to lim_L * _min (S1113). The process of S1113 corresponds to FIGS. 12D and 13D.

S1106、S1112、S1113、S1114のいずれかの処理を実行したのち、色調制御部105は、補正された文字の明度をグレイ濃度に変換する(S1107)。S1107で、色調制御部105は、図10に示すグレイ明度変換LUTを用いて線形補間を行い、文字の明度をグレイ濃度に変換する。そして、色調制御部105は文字のグレイ濃度をRAM216の文字濃度バッファに記憶する。   After executing any one of S1106, S1112, S1113, and S1114, the tone control unit 105 converts the lightness of the corrected character into a gray density (S1107). In step S1107, the color tone control unit 105 performs linear interpolation using the gray lightness conversion LUT illustrated in FIG. 10, and converts the lightness of the character into a gray density. The tone control unit 105 stores the gray density of the character in the character density buffer of the RAM 216.

S1102において図形の明度(L*_back)が文字の明度(L*_txt)未満であった時の処理を以下に述べる。色調制御部105は、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_max以下かを判断する(S1108)。図形の明度に最低明度差を加えた値がlim_ΔL*_max以下の場合、色調制御部105は、以下の処理を実行する。色調制御部105は、文字の明度(L*_txt)を図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値に補正する(S1110)。S1110の処理は図14(A)、図15(A)に対応する。   The processing when the brightness of the figure (L * _back) is less than the brightness of the character (L * _txt) in S1102 will be described below. The color tone control unit 105 determines whether the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is equal to or smaller than lim_L * _max (S1108). When the value obtained by adding the minimum brightness difference to the brightness of the graphic is equal to or smaller than lim_ΔL * _max, the color tone control unit 105 executes the following processing. The color tone control unit 105 corrects the lightness (L * _txt) of the character to a value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic (S1110). The process of S1110 corresponds to FIGS. 14A and 15A.

一方、図形の明度(L*_back)に最低明度差(min_ΔL*)を加えた値がlim_L*_maxよりも大きい場合、色調制御部105は、ステップS1109の処理を実行する。色調制御部105は、図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値がlim_L*_min以上であるかを判定する(S1109)。   On the other hand, when the value obtained by adding the minimum lightness difference (min_ΔL *) to the lightness (L * _back) of the graphic is larger than lim_L * _max, the color tone control unit 105 executes the process of step S1109. The color tone control unit 105 determines whether the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic is equal to or larger than lim_L * _min (S1109).

図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値が、lim_L*_min以上である場合、色調制御部105は以下の処理を実行する。色調制御部105は文字の明度(L*_txt)を図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値に補正する(S1111)。S1111に記載の処理は図14(D)、図15(D)に対応する。   When the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the figure is equal to or larger than lim_L * _min, the color tone control unit 105 executes the following processing. The color tone control unit 105 corrects the lightness (L * _txt) of the character to a value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the graphic (S1111). The processing described in S1111 corresponds to FIGS. 14D and 15D.

S1109において、図形の明度(L*_back)から最低明度差(min_ΔL*)を引いた値がlim_L*_min未満である場合、色調制御部105はS1105以下の処理を実行する。S1105以下の処理は図14(C)(D)、図15(C)(D)に対応する。以降の処理は図形の明度(L*_back)が文字の明度(L*_txt)よりも高い場合と同様であるため説明を省略する。   In S1109, when the value obtained by subtracting the minimum lightness difference (min_ΔL *) from the lightness (L * _back) of the figure is less than lim_L * _min, the color tone control unit 105 executes the processing from S1105 onward. The processes after S1105 correspond to FIGS. 14C, 14D, and 15C, 15D. The subsequent processing is the same as the case where the lightness (L * _back) of the graphic is higher than the lightness (L * _txt) of the character, and thus the description thereof is omitted.

図11のS1101で、色調制御部105は明度の最大値(L*_max)と明度の最小値(L*_min)をグレイ明度変換LUTに基づいて設定した。S1101において、色調制御部105はグレイ明度変換LUTを参照することなく、予め決められた明度の最大値lim_L*_maxと明度の最小値lim_L*_minを用いることとしてもよい。   In S1101 of FIG. 11, the color tone control unit 105 sets the maximum value of lightness (L * _max) and the minimum value of lightness (L * _min) based on the gray lightness conversion LUT. In step S1101, the color tone control unit 105 may use a predetermined maximum brightness value lim_L * _max and minimum brightness value lim_L * _min without referring to the gray brightness conversion LUT.

説明したように本実施形態によれば、重ねて描画される文字と図形について、文字サイズに応じて最低明度差を決定し、文字と図形の明度差がそれ以上になるよう文字の濃度を調整することができる。すなわち、重ねて描画される単色の図形と文字について、文字サイズに応じて図形と文字の最低濃度差を決定し、文字と図形の濃度差が決定した最低濃度差以上になるよう文字の濃度を調整する。これにより、どのような文字サイズであってもユーザが背景と文字とが判別でき、かつカラー画像の状態で異なる色であらわされていた文字と文字の色が同じグレイであらわされてしまうのを抑制することができる。   As described above, according to the present embodiment, the minimum brightness difference is determined according to the character size for characters and graphics drawn in an overlapping manner, and the character density is adjusted so that the brightness difference between the characters and the figure is more than that. can do. That is, for single-color graphics and characters drawn in layers, the minimum density difference between the graphics and characters is determined according to the character size, and the character density is set so that the density difference between the characters and graphics is equal to or greater than the determined minimum density difference. adjust. As a result, the user can distinguish the background and the character regardless of the character size, and the color of the character and the character represented by different colors in the color image state are represented by the same gray. Can be suppressed.

また、本実施例では、文字を描画する色の明度L*_txtと図形を描画する色の明度L*_backを最低明度差min_ΔL*だけ離すことができる。また、図形の明度L*_backから最低明度差min_ΔL*だけ離れた明度が、プリンタ214の描画できる明度の色でない場合、色調制御部105は図形の明度と文字の明度が最大限離れるように文字の明度を決定する。これにより、図形と文字の明度差が十分に取れない場合でも、図形と文字の明度差をできる限り大きくして、ユーザが図形と文字の区別しやすいようプリンタ214は文字の濃度を調整する。   In the present embodiment, the lightness L * _txt of the color for drawing a character and the lightness L * _back of the color for drawing a graphic can be separated by a minimum lightness difference min_ΔL *. In addition, when the brightness that is separated from the brightness L * _back of the figure by the minimum brightness difference min_ΔL * is not a brightness color that can be drawn by the printer 214, the color control unit 105 causes the text brightness and the text brightness to be separated as much as possible. Determine the brightness. As a result, even if the brightness difference between the graphic and the character cannot be taken sufficiently, the brightness difference between the graphic and the character is increased as much as possible, and the printer 214 adjusts the density of the character so that the user can easily distinguish between the graphic and the character.

本実施例では、グレイ濃度を明度に変換してから、文字オブジェクトと図形オブジェクトの明度の差が最低明度差以上あるかを判定し、色調制御部105が文字オブジェクトの明度を調整することとした。グレイ濃度を明度に変換することなく、文字オブジェクトと図形オブジェクトの濃度差が所定の濃度差以上あるかを判定し、文字オブジェクトの濃度を調整することとしてもよい。   In this embodiment, after the gray density is converted to lightness, it is determined whether the lightness difference between the character object and the graphic object is equal to or greater than the minimum lightness difference, and the color tone control unit 105 adjusts the lightness of the character object. . Instead of converting the gray density into lightness, it may be determined whether the density difference between the character object and the graphic object is equal to or greater than a predetermined density difference, and the density of the character object may be adjusted.

(その他の実施例)
なお、本実施例では、図形オブジェクトを背景として、文字オブジェクトが当該図形オブジェクトに重ねて描画される場合を例に説明した。図形オブジェクトを背景として、線のみで構成される線画画像の図形オブジェクトが重ねて描画される場合に本発明を適応することとしてもよい。本実施例において、文字オブジェクトについて書かれた処理を、プリンタ214が線画画像の図形オブジェクトに対して実行することで、背景となる図形に重ねて描画される線画画像と、背景の図形の濃度差を補正することができる。この場合、プリンタ214のROM219または外部メモリ226は、線画画像の図形オブジェクトを構成する線の線幅と最低明度差(min_ΔL*)を管理するテーブルを記憶する。当該テーブルは、本実施例の図9に示す文字サイズ明度差LUTに対応するテーブルである。当該テーブルは、図形オブジェクトを構成する線の線幅が細い場合ほど、最低明度差が大きく、線幅が太くなることに従って、最低明度差が小さくなるよう設定されたテーブルである。
(Other examples)
In the present embodiment, the case has been described as an example in which a character object is drawn on the graphic object with the graphic object as the background. The present invention may be applied to a case where a graphic object of a line drawing image including only lines is drawn with a graphic object as a background. In this embodiment, when the printer 214 executes the processing written for the character object on the graphic object of the line drawing image, the density difference between the line drawing image drawn on the background graphic and the background graphic is increased. Can be corrected. In this case, the ROM 219 or the external memory 226 of the printer 214 stores a table for managing the line width and the minimum brightness difference (min_ΔL *) of the lines constituting the graphic object of the line drawing image. This table is a table corresponding to the character size brightness difference LUT shown in FIG. 9 of the present embodiment. This table is set such that the minimum brightness difference becomes smaller and the minimum brightness difference becomes smaller as the line width of the line constituting the graphic object becomes smaller and the line width becomes thicker.

背景となる図形オブジェクトと線画画像の図形オブジェクトが重ねて描画される際に、色調制御部105は上記のテーブルに基づいて、線画画像を構成する線の太さに基づく、最低明度差(min_ΔL*)を求める。この処理は、本実施例の図8のS803に対応する処理である。他の処理は、本実施例において、文字オブジェクトを線画画像の図形オブジェクトと読み替えた場合と同様であるため説明を省略する。このようにすることで、背景となる図形オブジェクトに重ねて描画される線画画像を構成する線幅に応じて、背景と線の明度差を補正するか否かを決める閾値を変化させることができる。線画画像を構成する線が細い場合、背景と線の明度差を大きくすることで、ユーザが背景と線画画像を区別することができる。一方で、太い線で描画される線画画像は、背景に対して異なる色で描画される複数の線画画像が同じグレイ濃度で描画されてしまうことを抑制することができる。   When the graphic object serving as the background and the graphic object of the line drawing image are drawn to overlap, the color tone control unit 105, based on the above table, determines the minimum lightness difference (min_ΔL *) based on the thickness of the line constituting the line drawing image. ) This processing is processing corresponding to S803 in FIG. 8 of the present embodiment. Other processes are the same as those in the case where the character object is replaced with the graphic object of the line drawing image in the present embodiment, and thus the description thereof is omitted. By doing this, it is possible to change the threshold value for determining whether or not to correct the lightness difference between the background and the line, according to the line width constituting the line drawing image drawn on the graphic object serving as the background. . When the line constituting the line drawing image is thin, the user can distinguish the background from the line drawing image by increasing the brightness difference between the background and the line. On the other hand, a line drawing image drawn with a thick line can suppress a plurality of line drawing images drawn with different colors with respect to the background from being drawn with the same gray density.

本実施例では、背景となる図形と文字の濃度差が最低明度差に満たない場合、文字の濃度を調整する場合を説明した。背景となる図形の濃度を調整するとしてもよい。また、背景となる図形と文字の両方の濃度を調整し、図形と文字の明度差が最低明度差以上となるよう調整してもよい。   In the present embodiment, the case where the density of the character is adjusted when the density difference between the background graphic and the character is less than the minimum brightness difference has been described. The density of the figure as the background may be adjusted. Further, the density of both the figure and the character as the background may be adjusted so that the brightness difference between the figure and the character is equal to or greater than the minimum brightness difference.

以上、本発明をその好適な実施例に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。また、上述の実施形態の一部を適宜組み合わせてもよい。   Although the present invention has been described in detail based on the preferred examples thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included. Moreover, you may combine suitably a part of above-mentioned embodiment.

そして、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施例の機能を実現するソフトウェア(プログラム)をネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム又は装置のコンピュータ(又はCPUやMPU等)がプログラムコードを読み出して実行する処理である。この場合、そのプログラム、及び該プログラムを記憶した記憶媒体は本発明を構成することになる。   And this invention is implement | achieved also by performing the following processes. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program code. It is a process to be executed. In this case, the program and the storage medium storing the program constitute the present invention.

Claims (14)

カラー画像の印刷データに基づく単色の画像データを生成することのできる画像処理装置であって、
前記カラー画像の印刷データから第1のオブジェクトと前記第1のオブジェクトに重ねて描画される第2のオブジェクトを抽出する抽出手段と、
前記抽出手段により抽出された第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値を、前記第2のオブジェクトの大きさ、または、前記第2のオブジェクトを構成する線の太さに基づいて決定する決定手段と、
前記第1のオブジェクトと前記第2のオブジェクトの濃度差が前記決定手段により決められた濃度差の最低値よりも大きい前記単色の画像データを生成する生成手段と、を有することを特徴とする画像処理装置。
An image processing apparatus capable of generating monochrome image data based on print data of a color image,
Extracting means for extracting a first object and a second object drawn on the first object from the color image print data;
Based on the minimum value of the density difference between the first object and the second object extracted by the extracting means, based on the size of the second object or the thickness of the line constituting the second object. A determination means to determine
Generating means for generating the monochrome image data in which the density difference between the first object and the second object is larger than the minimum value of the density difference determined by the determining means. Processing equipment.
前記画像処理装置は、
前記抽出手段により抽出された前記第1のオブジェクトと前記第2のオブジェクトを単色のオブジェクトに変換する変換手段をさらに有し、
前記決定手段は、前記変換手段により変換された前記第1のオブジェクトと前記第2のオブジェクトの大きさまたは、前記第2のオブジェクトを構成する線の太さに基づいて前記第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値を決定することを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus includes:
Conversion means for converting the first object and the second object extracted by the extraction means into a single-color object;
The determination unit is configured to determine the first object and the second object based on the size of the first object and the second object converted by the conversion unit or the thickness of a line constituting the second object. The image processing apparatus according to claim 1, wherein the minimum value of the density difference of the second object is determined.
前記第1のオブジェクトは図形オブジェクトであり、前記第2のオブジェクトは文字オブジェクトであり、
前記決定手段は前記第2のオブジェクトの大きさが大きくなるのに従って、前記第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値をより小さな値に決定し、
前記第2のオブジェクトの大きさが小さくなるのに従って、前記第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値をより大きな値に決定すること特徴とする請求項1または2に記載の画像処理装置。
The first object is a graphic object, and the second object is a character object;
The determining means determines the minimum value of the density difference between the first object and the second object to a smaller value as the size of the second object increases.
The minimum value of the density difference between the first object and the second object is determined to be a larger value as the size of the second object becomes smaller. Image processing device.
前記生成手段は、前記第1のオブジェクトと前記第2のオブジェクトの濃度差が前記決定手段により決定される濃度差の最低値よりも小さい場合、前記第1のオブジェクトと前記第2のオブジェクトの少なくとも一方の濃度を調整した前記単色の画像データを生成し、前記第1のオブジェクトと前記第2のオブジェクトの濃度差が前記決定手段により決められた濃度差の最低値よりも大きい場合、前記第1のオブジェクトおよび前記第2のオブジェクトの濃度差を調整することなく前記単色の画像データを生成することを特徴とする請求項1乃至3のいずれか一項に記載の画像処理装置。   When the density difference between the first object and the second object is smaller than the minimum value of the density difference determined by the determination means, the generation means is at least one of the first object and the second object. When the monochrome image data with one density adjusted is generated, and the density difference between the first object and the second object is larger than the minimum value of the density difference determined by the determination means, the first 4. The image processing apparatus according to claim 1, wherein the monochrome image data is generated without adjusting a density difference between the second object and the second object. 5. 前記画像処理装置は、前記第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値と前記第2のオブジェクトの大きさまたは、前記第2のオブジェクトを構成する線の太さとを対応付けるテーブルを記憶する記憶手段をさらに有し、
前記決定手段は、前記記憶手段に記憶された前記テーブルに基づいて、前記第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値を決めることを特徴とする請求項1乃至4のいずれか一項に記載の画像処理装置。
The image processing apparatus includes a table that associates a minimum value of a density difference between the first object and the second object and a size of the second object or a thickness of a line constituting the second object. A storage means for storing;
5. The determination unit according to claim 1, wherein the determination unit determines a minimum value of a density difference between the first object and the second object based on the table stored in the storage unit. The image processing apparatus according to one item.
前記画像処理装置は、カラーの前記第1のオブジェクトとカラーの前記第2のオブジェクトをグレイスケールに変換するグレイ変換手段と、
前記グレイ変換手段によりグレイスケールに変換された前記第1のオブジェクトと前記第2のオブジェクトの濃度を明度に変換する明度変換手段と、をさらに有し、
前記決定手段は、前記第2のオブジェクトの大きさ、または、前記第2のオブジェクトを構成する線の太さに基づいて前記第1のオブジェクトと前記第2のオブジェクトの明度差の最低値を決定し、
前記生成手段は、前記グレイ変換手段によりグレイスケールに変換された前記第1のオブジェクトと前記第2のオブジェクトの明度差が前記決定手段により決定される明度差の最低値よりも大きな前記単色の画像データを生成することを特徴とする請求項1乃至5のいずれか一項に記載の画像処理装置。
The image processing apparatus includes: a gray conversion unit that converts the first object of color and the second object of color into gray scale;
Brightness conversion means for converting the density of the first object and the second object converted to gray scale by the gray conversion means into lightness;
The determining means determines a minimum value of a brightness difference between the first object and the second object based on a size of the second object or a thickness of a line constituting the second object. And
The generation unit includes the monochrome image in which the brightness difference between the first object and the second object converted to gray scale by the gray conversion unit is larger than the minimum value of the brightness difference determined by the determination unit. The image processing apparatus according to claim 1, wherein data is generated.
前記明度変換手段は単色の濃度と単色の明度を対応づける明度変換テーブルに基づいて前記第1のオブジェクトと前記第2のオブジェクトの濃度を明度に変換することを特徴とする請求項6に記載の画像処理装置。   The lightness conversion unit converts the density of the first object and the second object into lightness based on a lightness conversion table that associates the density of a single color with the lightness of a single color. Image processing device. 前記生成手段は、前記第2のオブジェクトの濃度を前記第1のオブジェクトの濃度から前記決定手段により決定される濃度差の最低値を引いた値に調整することを特徴とする請求項1乃至7のいずれか一項に記載の画像処理装置。   The said generation means adjusts the density | concentration of a said 2nd object to the value which deducted the minimum value of the density difference determined by the said determination means from the density | concentration of the said 1st object. The image processing apparatus according to any one of the above. 前記生成手段は、前記第1のオブジェクトから前記決定手段により決定される濃度差の最低値を引いた値が予め決められた第1の値よりも小さい場合、前記第2のオブジェクトの濃度を前記第1のオブジェクトの濃度に前記濃度差の最小値を加えた値に調整することを特徴とする請求項8に記載の画像処理装置。   When the value obtained by subtracting the minimum value of the density difference determined by the determining unit from the first object is smaller than a predetermined first value, the generating unit determines the density of the second object. The image processing apparatus according to claim 8, wherein the image processing apparatus is adjusted to a value obtained by adding the minimum value of the density difference to the density of the first object. 前記生成手段は、前記第1のオブジェクトから前記決定手段により決定された濃度差の最小値を引いた値が前記第1の値よりも小さい場合であり、さらに、前記第1のオブジェクトの濃度に決定された前記濃度差の最小値を加えた値が予め決められた第2の値を超える場合、前記第2のオブジェクトの濃度を、前記第1の値と前記第2の値のうち前記第1のオブジェクトの濃度と遠い値に調整することを特徴とする請求項9に記載の画像処理装置。   The generation means is a case where a value obtained by subtracting a minimum value of the density difference determined by the determination means from the first object is smaller than the first value, and further, the density of the first object is When the value obtained by adding the determined minimum value of the density difference exceeds a predetermined second value, the density of the second object is set to the first value among the first value and the second value. The image processing apparatus according to claim 9, wherein the density is adjusted to a value far from the density of one object. 前記第1のオブジェクトがシートに描画される位置と前記第1のオブジェクトのサイズの情報および前記第2のオブジェクトが前記シートに描画される位置と前記第2のオブジェクトのサイズの情報に基づいて、前記第1のオブジェクトと前記第2のオブジェクトが重ねて描画されるか否かを判定する判定手段をさらに有することを特徴とする請求項1乃至10のいずれか一項に記載の画像処理装置。   Based on information on the position where the first object is drawn on the sheet and the size of the first object, and information on the position where the second object is drawn on the sheet and the size of the second object, The image processing apparatus according to claim 1, further comprising a determination unit that determines whether or not the first object and the second object are drawn in an overlapping manner. 前記第2のオブジェクトは線で構成される図形オブジェクトであることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the second object is a graphic object composed of lines. カラー画像の印刷データに基づく単色の画像データを生成することのできる画像処理装置の制御方法であって、
カラー画像の印刷データから第1のオブジェクトと前記第1のオブジェクトに重ねて描画される第2のオブジェクトを抽出する抽出ステップと、
前記抽出ステップにおいて抽出された前記第2のオブジェクトの大きさ、または、前記第2のオブジェクトを構成する線の太さに基づいて、前記第1のオブジェクトと前記第2のオブジェクトの濃度差の最低値を決定する決定ステップと、
前記カラー画像の印刷データに基づいて、前記第1のオブジェクトと前記第2のオブジェクトの濃度差が前記決定ステップにおいて決定された濃度差の最低値よりも大きな単色の画像データを生成する生成ステップと、を有する画像処理装置の制御方法。
A control method for an image processing apparatus capable of generating single-color image data based on print data of a color image,
An extraction step of extracting a first object and a second object drawn on the first object from print data of a color image;
The lowest density difference between the first object and the second object based on the size of the second object extracted in the extraction step or the thickness of the line constituting the second object. A decision step for determining a value;
A generation step of generating monochrome image data in which a density difference between the first object and the second object is larger than a minimum value of the density difference determined in the determination step based on the print data of the color image; And a method for controlling the image processing apparatus.
請求項13に記載の画像処理装置の制御方法をコンピュータが実行するためのプログラム。   A program for causing a computer to execute the control method of the image processing apparatus according to claim 13.
JP2017035931A 2017-02-28 2017-02-28 Image processing apparatus and control method and program of image processing apparatus Pending JP2018142851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017035931A JP2018142851A (en) 2017-02-28 2017-02-28 Image processing apparatus and control method and program of image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017035931A JP2018142851A (en) 2017-02-28 2017-02-28 Image processing apparatus and control method and program of image processing apparatus

Publications (1)

Publication Number Publication Date
JP2018142851A true JP2018142851A (en) 2018-09-13

Family

ID=63528275

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017035931A Pending JP2018142851A (en) 2017-02-28 2017-02-28 Image processing apparatus and control method and program of image processing apparatus

Country Status (1)

Country Link
JP (1) JP2018142851A (en)

Similar Documents

Publication Publication Date Title
JP4872860B2 (en) Image processing apparatus and image processing method
JP5700014B2 (en) Printing system, printing control program, and recording medium
US10706340B2 (en) Image processing apparatus and method for controlling the same with character attribute indicating that pixel is pixel of a character
JP6671188B2 (en) Image forming apparatus, method, and program
JP4779987B2 (en) Image processing apparatus and image processing method
JP2015171098A (en) Image processing apparatus, image processing method and program
JP5863001B2 (en) Image processing apparatus, image forming apparatus, and program
US11151430B2 (en) Image forming apparatus capable of executing line width adjustment process, method of controlling same, and storage medium
JP2015015589A (en) Image processing device, image processing method, and program
JP2018142851A (en) Image processing apparatus and control method and program of image processing apparatus
US11671548B2 (en) Image processing apparatus, method, and product for converting color data of objects into gray data based on positions of objects for improved discriminability
JP7077451B2 (en) Image forming apparatus and control method of image forming apparatus, and program
JP2015075834A (en) Image processing apparatus, image processing method, and program
JP7123737B2 (en) Image processing device, image processing method and program
JP6985943B2 (en) Image processing device and its control method and program
JP2007221227A (en) Trapping processing support apparatus, printer, method of deciding trapping extension region, and computer program
JP7005796B2 (en) Image forming device, its control method, and program
JP6051526B2 (en) Image processing system, image forming apparatus, image processing program, and image processing method
JP7297603B2 (en) Image processing device, image processing method, and program
US10798267B2 (en) Image processing to set output pixel values subject to edge or thin line correction
JP2019176337A (en) Image processing apparatus, control method of the image processing apparatus, and program
JP2025162722A (en) Printers and Programs
JP2024162429A (en) Image processing device, image processing method, and program
JP2025162724A (en) Printers and Programs
JP2007081886A (en) Drawing processor