JP2009071649A - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

Publication number
JP2009071649A
JP2009071649A JP2007238888A JP2007238888A JP2009071649A JP 2009071649 A JP2009071649 A JP 2009071649A JP 2007238888 A JP2007238888 A JP 2007238888A JP 2007238888 A JP2007238888 A JP 2007238888A JP 2009071649 A JP2009071649 A JP 2009071649A
Authority
JP
Japan
Prior art keywords
diagram
image
color
image processing
luminance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007238888A
Other languages
Japanese (ja)
Other versions
JP4967947B2 (en
Inventor
Koji Kumagai
孝司 熊谷
Yoichiro Maki
陽一郎 牧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007238888A priority Critical patent/JP4967947B2/en
Publication of JP2009071649A publication Critical patent/JP2009071649A/en
Application granted granted Critical
Publication of JP4967947B2 publication Critical patent/JP4967947B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To suppress the generation of color unevenness when a diagram image in which a diagram is drawn is superposed on a specified image and output. <P>SOLUTION: The diagram is extracted from the diagram image, an RGB histogram is created for every diagram (step S100-S140), based on the created histogram, whether the diagram is single color or not is judged (step S150), when the diagram is judged to be single color, the representative color of the diagram is set based on the created RGB histogram of the diagram (step S160), the diagram is painted out with the representative color (step S170), the diagram painted out with the representative color is superposed on a photographic image and output (step S190, S200). Since the diagram is output after being painted out with the representative color and superposed on the photographic image, the generation of color unevenness in the diagram is suppressed. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理装置および画像処理方法およびプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program.

従来、この種の画像処理装置としては、ユーザが指定した写真などの画像上にユーザが手書きした文字や絵などの線図の画像を重ねて出力するものが提案されている(特に、特許文献1参照)。こうした画像処理装置では、ユーザが指定した画像を淡く印刷した背景画像とこの背景画像と同じ色域のサンプルパターンとを予め原稿に印刷しておき、ユーザが原稿の背景画像上に描いた線図をサンプルパターンの色域に基づいて抽出することにより、指定された画像上に抽出した線図を重ね合わせて出力している。
特開2006−287402号公報
Conventionally, as this type of image processing apparatus, an apparatus that outputs an image of a line drawing such as a character or a picture handwritten by a user on an image such as a photograph specified by the user has been proposed (particularly, Patent Documents). 1). In such an image processing apparatus, a background image obtained by lightly printing an image designated by a user and a sample pattern having the same color gamut as the background image are printed on a document in advance, and a line drawing drawn on the background image of the document by the user. Is extracted based on the color gamut of the sample pattern, and the extracted diagram is superimposed on the specified image and output.
JP 2006-287402 A

一般に、上述の画像処理装置では、ユーザは、サインペンなどを用いて原稿に線図を手書きするため、ペンのインクが滲んで線図に色むらが生じることがある。こうした色ムラのある線図をそのままユーザが指定した画像上に重ね合わせると、重ね合わせ後の画像にも色ムラが生じてユーザが画像品質の悪さを感じることがある。特に、線図に光沢および陰影を施す光沢陰影処理を行なう場合には、線図に色ムラがあるとユーザが画像品質の悪さをより強く感じてしまう。   In general, in the above-described image processing apparatus, a user manually draws a diagram on a document using a sign pen or the like, so that ink on the pen may blur and color irregularity may occur in the diagram. When such a line diagram with color unevenness is directly superimposed on an image designated by the user, color unevenness also occurs in the superimposed image, and the user may feel poor image quality. In particular, when performing glossy shading processing for applying gloss and shading to a diagram, if the diagram is uneven in color, the user will feel more strongly the poor image quality.

本発明の画像処理装置および画像処理方法およびプログラムは、線図が描かれた線図画像を指定された画像の上に重ね合わせて出力する際に線図に色ムラが生じるのを抑制することを主目的とする。   The image processing apparatus, the image processing method, and the program according to the present invention suppress the occurrence of color unevenness in a diagram when a diagram image on which a diagram is drawn is superimposed on a specified image and output. The main purpose.

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

本発明の画像処理装置は、
線図が描かれた線図画像を調整してなる調整用線図画像を指定された画像の上に重ね合わせて出力する画像処理装置であって、
前記線図画像に描かれた線図を抽出する線図抽出手段と、
前記抽出された線図に対して該線図の色の分布に基づいて該線図が単一色であるか否かを判定する単一色判定手段と、
該単一色判定手段により単一色と判定された線図に対して該線図の色の分布に基づいて代表色を設定する代表色設定手段と、
前記代表色が設定された線図を該設定された代表色で塗りつぶして前記調整用線図画像を作成する調整用線図画像作成手段と、
を備えることを要旨とする。
The image processing apparatus of the present invention
An image processing apparatus that outputs an adjustment diagram image obtained by adjusting a diagram image on which a diagram is drawn, overlaid on a specified image,
A diagram extracting means for extracting a diagram drawn in the diagram image;
Single color determination means for determining whether or not the diagram is a single color based on the color distribution of the diagram with respect to the extracted diagram;
Representative color setting means for setting a representative color based on the color distribution of the diagram for the diagram determined to be a single color by the single color determination means;
An adjustment diagram image creating means for creating the adjustment diagram image by painting the diagram in which the representative color is set with the set representative color;
It is a summary to provide.

この本発明の画像処理装置では、線図画像に描かれた線図を抽出し、抽出された線図に対して線図の色の分布に基づいて線図が単一色であるか否かを判定し、単一色と判定された線図に対して線図の色の分布に基づいて代表色を設定し、代表色が設定された線図を設定された代表色で塗りつぶして調整用線図画像を作成する。この結果、調整用線図画像の線図に色ムラが生じることを抑制することができ、調整用線図画像を指定された画像の上に重ね合わせて出力する際に出力する画像に色ムラが生じるのを抑制することができる。ここで、「線図」には、文字や絵など線で描かれた図が含まれる。   In the image processing apparatus of the present invention, a diagram drawn in a diagram image is extracted, and it is determined whether or not the diagram is a single color based on the color distribution of the diagram with respect to the extracted diagram. A representative color is set based on the color distribution of the diagram for the diagram determined to be a single color, and the diagram for which the representative color is set is filled with the set representative color. Create an image. As a result, it is possible to suppress the occurrence of color unevenness in the diagram of the adjustment diagram image, and color unevenness in the output image when the adjustment diagram image is superimposed on the specified image and output. Can be suppressed. Here, the “line diagram” includes a figure drawn with lines such as characters and pictures.

こうした本発明の画像処理装置において、前記線図の色要素の輝度と画素数との関係を示すヒストグラムにおいて最頻値に対応する輝度値を含む所定輝度範囲内の画素数を2等分する輝度値および前記所定輝度範囲における平均輝度値,前記最頻値のいずれか一つの値を用いて前記代表色を設定する手段であるものとすることもできる。こうすれば、より適正に代表色を設定することができる。この場合において、前記単一色判定手段は、前記線図の色要素の輝度と画素数との関係を示すヒストグラムにおいて最頻値を含むと共に所定画素数以上の画素を含む領域の輝度の幅が所定輝度幅未満であるとき又は前記ヒストグラムにおいて前記最頻値を含むと共に前記所定画素数以上の画素を含む領域を正規分布で近似して標準偏差をσとしたときに2σの区間に対応する輝度の幅が前記所定輝度幅未満であるときに単一色であると判定する手段であるものとすることもできる。こうすれば、より適正に線図が単一色であるか否かを判定することができる。こうしたヒストグラムを用いて単一色であるか否かを判定する態様の本発明の画像処理装置において、前記設定された代表色で塗りつぶした線図に含まれる線に対して所定の厚みを持たせて所定の角度から光を照射したときに生じる光沢および陰影を施して前記調整用線図画像を作成する手段であるものとすることもできる。こうすれば、線図に含まれる線に対して光沢および陰影を施す場合でも、線図に色ムラが生じるのを抑えることができ、より高品質な画像を出力することができる。こうした線図に含まれる線に対して光沢および陰影を施す態様の本発明の画像処理装置において、前記線図画像は、前記指定された画像の色を所定色域内に減色してなる背景画像上に線図が描かれた画像であり、前記線図抽出手段は、前記線図画像の画素が前記所定色域の範囲外の色であることを要件として線図を抽出する手段であり、前記調整用線図画像作成手段は、前記線図画像の前記所定色域の範囲内の画素を透明なものとして前記調整用線図画像を作成する手段であるものとすることもできる。こうすれば、線図画像が指定された画像の色を所定色域内に減色してなる背景画像上に線図が描かれた画像であるときでも、適正に調整用画像を作成することができる。   In such an image processing apparatus of the present invention, in the histogram showing the relationship between the luminance of the color element of the diagram and the number of pixels, the luminance that bisects the number of pixels in the predetermined luminance range including the luminance value corresponding to the mode value The representative color may be set by using any one of a value, an average luminance value in the predetermined luminance range, and the mode value. In this way, the representative color can be set more appropriately. In this case, the single color determining means has a predetermined luminance width in a region including a mode value and a pixel including a predetermined number of pixels or more in a histogram indicating the relationship between the luminance of the color element of the diagram and the number of pixels. The luminance corresponding to the interval of 2σ when it is less than the luminance width or when the standard deviation is approximated by an area including the mode value and the pixels including the predetermined number of pixels or more by the normal distribution in the histogram. It may be a means for determining that the color is a single color when the width is less than the predetermined luminance width. In this way, it is possible to more appropriately determine whether or not the diagram is a single color. In the image processing apparatus of the present invention in which it is determined whether or not the color is a single color using such a histogram, a predetermined thickness is given to a line included in the diagram filled with the set representative color. It may be a means for creating the adjustment diagram image by applying gloss and shading that are generated when light is irradiated from a predetermined angle. In this way, even when gloss and shadow are applied to the lines included in the diagram, it is possible to suppress color unevenness in the diagram and to output a higher quality image. In the image processing apparatus of the present invention in which gloss and shadow are applied to the lines included in such a diagram, the diagram image is displayed on a background image formed by reducing the color of the designated image within a predetermined color gamut. The line drawing extraction means is a means for extracting a line drawing on the condition that pixels of the line drawing image are out of the predetermined color gamut. The adjustment diagram image creating means may be a means for creating the adjustment diagram image by making the pixels within the predetermined color gamut of the diagram image transparent. In this way, even when the diagram is drawn on the background image formed by reducing the color of the image in which the diagram image is designated within the predetermined color gamut, the adjustment image can be appropriately created. .

本発明の画像処理方法は、
線図が描かれた線図画像を調整してなる調整用線図画像を指定された画像の上に重ね合わせて出力する画像処理方法であって、
前記線図画像に描かれた線図を抽出し、
前記抽出された線図に対して該線図の色の分布に基づいて該線図が単一色であるか否かを判定し、
前記単一色と判定された線図に対して該線図の色の分布に基づいて代表色を設定し、
前記代表色が設定された線図を該設定された代表色で塗りつぶして前記調整用線図画像を作成する
ことを要旨とする。
The image processing method of the present invention includes:
An image processing method for superimposing and outputting an adjustment diagram image obtained by adjusting a diagram image on which a diagram is drawn on a specified image,
Extract the diagram drawn in the diagram image,
Determining whether the diagram is a single color based on the color distribution of the diagram for the extracted diagram;
A representative color is set based on the color distribution of the diagram for the diagram determined to be the single color,
The gist is to create the adjustment diagram image by painting the diagram set with the representative color with the set representative color.

この本発明の画像処理方法では、線図画像に描かれた線図を抽出し、抽出された線図に対して線図の色の分布に基づいて線図が単一色であるか否かを判定し、単一色と判定された線図に対して線図の色の分布に基づいて代表色を設定し、代表色が設定された線図を設定された代表色で塗りつぶして調整用線図画像を作成する。この結果、調整用線図画像の線図に色ムラが生じることを抑制することができ、調整用線図画像を指定された画像の上に重ね合わせて出力する際に線図に色ムラが生じるのを抑制することができる。   In the image processing method of the present invention, a diagram drawn in a diagram image is extracted, and it is determined whether or not the diagram is a single color based on the color distribution of the diagram for the extracted diagram. A representative color is set based on the color distribution of the diagram for the diagram determined to be a single color, and the diagram for which the representative color is set is filled with the set representative color. Create an image. As a result, it is possible to suppress the occurrence of color unevenness in the diagram of the adjustment diagram image, and when the adjustment diagram image is superimposed on the designated image and output, the color unevenness is present in the diagram. It can be suppressed from occurring.

本発明のプログラムは、上述した画像処理方法、すなわち、基本的には、線図が描かれた線図画像を調整してなる調整用線図画像を指定された画像の上に重ね合わせて出力する画像処理方法であって、前記線図画像に描かれた線図を抽出し、前記抽出された線図に対して該線図の色の分布に基づいて該線図が単一色であるか否かを判定し、前記単一色と判定された線図に対して該線図の色の分布に基づいて代表色を設定し、前記代表色が設定された線図を該設定された代表色で塗りつぶして前記調整用線図画像を作成する画像処理方法の各ステップを1以上のコンピュータに実行させるためのプログラムであることを要旨とする。   The program of the present invention outputs the above-described image processing method, that is, basically superimposing the adjustment diagram image formed by adjusting the diagram image on which the diagram is drawn on the designated image. An image processing method for extracting a diagram drawn in the diagram image, and whether the diagram is a single color based on a color distribution of the diagram with respect to the extracted diagram A representative color is set based on the color distribution of the diagram for the diagram determined to be the single color, and the diagram in which the representative color is set is set to the set representative color The gist of the present invention is that it is a program for causing one or more computers to execute each step of the image processing method for creating the adjustment diagram image by painting.

この本発明のプログラムでは、上述した画像処理方法の各ステップを1以上のコンピュータに実行させるから、本発明の画像処理方法が奏する効果、例えば、調整用線図画像を指定された画像の上に重ね合わせて出力する際に線図に色ムラが生じるのを抑制することができる効果などと同様の効果を奏する。   In the program of the present invention, each step of the image processing method described above is executed by one or more computers. Therefore, an effect exhibited by the image processing method of the present invention, for example, an adjustment diagram image on the designated image. There are the same effects as the effect of suppressing the occurrence of color unevenness in the diagram when overlapping and outputting.

次に、本発明を実施するための最良の形態を実施例を用いて説明する。   Next, the best mode for carrying out the present invention will be described using examples.

図1は、本発明の一実施例である画像処理装置が搭載されたマルチファンクションプリンタ10の構成の概略を示す構成図である。実施例のマルチファンクションプリンタ10は、図示するように、印刷ジョブに基づいて記録紙Sへの印刷を実行するプリンタユニット20と、ガラス台36に載置された書類を読み取るスキャナユニット30と、メモリカードスロット40に挿入されたメモリカード42との間でデータの入出力を行なうメモリカードコントローラ44と、各種情報を表示部52に表示したりユーザの指示をボタン群54の操作を介して入力したりする操作パネル50と、装置全体の制御を司るメインコントローラ60とを備えている。このマルチファンクションプリンタ10では、プリンタユニット20やスキャナユニット30,メモリカードコントローラ44,メインコントローラ60がバス12を介して互いに各種制御信号やデータのやり取りをすることができるよう構成されている。   FIG. 1 is a configuration diagram showing an outline of the configuration of a multifunction printer 10 equipped with an image processing apparatus according to an embodiment of the present invention. As shown in the figure, the multifunction printer 10 includes a printer unit 20 that performs printing on a recording sheet S based on a print job, a scanner unit 30 that reads a document placed on a glass table 36, and a memory. A memory card controller 44 for inputting / outputting data to / from the memory card 42 inserted in the card slot 40, various information is displayed on the display unit 52, and a user instruction is input through the operation of the button group 54. Operating panel 50 and a main controller 60 that controls the entire apparatus. The multifunction printer 10 is configured such that the printer unit 20, the scanner unit 30, the memory card controller 44, and the main controller 60 can exchange various control signals and data with each other via the bus 12.

プリンタユニット20は、プリンタASIC22とプリンタエンジン24とを備えている。プリンタASIC22は、プリンタエンジン24を制御する集積回路であり、メインコントローラ60から印刷指令を受けると、その印刷指令の対象となる画像データに基づいて記録紙Sに印刷するようプリンタエンジン24を制御する。また、プリンタエンジン24は、印刷ヘッドから記録紙Sへインクを吐出することにより印刷を行なう周知のインクジェット方式のカラープリンタ機構として構成されている。   The printer unit 20 includes a printer ASIC 22 and a printer engine 24. The printer ASIC 22 is an integrated circuit that controls the printer engine 24. When the printer ASIC 22 receives a print command from the main controller 60, the printer ASIC 22 controls the printer engine 24 to print on the recording paper S based on the image data targeted by the print command. . The printer engine 24 is configured as a well-known ink jet color printer mechanism that performs printing by ejecting ink from the print head onto the recording paper S.

スキャナユニット30は、スキャナASIC32とスキャナエンジン34とを備えている。スキャナASIC32は、スキャナエンジン34を制御する集積回路であり、メインコントローラ60からのスキャン指令を受けると、ガラス台36に載置された書類を画像データとして読み取るようスキャナエンジン34を制御する。また、スキャナエンジン34は、周知のイメージスキャナとして構成され、書類に向かって発光した後の反射光をレッド(R)、グリーン(G)、ブルー(B)の各色に分解してスキャンデータとする周知のカラーイメージセンサを備えている。   The scanner unit 30 includes a scanner ASIC 32 and a scanner engine 34. The scanner ASIC 32 is an integrated circuit that controls the scanner engine 34. Upon receiving a scan command from the main controller 60, the scanner ASIC 32 controls the scanner engine 34 to read a document placed on the glass table 36 as image data. The scanner engine 34 is configured as a well-known image scanner, and the reflected light after emitting light toward the document is separated into red (R), green (G), and blue (B) colors to obtain scan data. A known color image sensor is provided.

メモリカードコントローラ44は、操作パネル50の横に備えられているメモリカードスロット40に挿入されたメモリカード42との間でデータの入出力を行なうものである。このメモリカードコントローラ44は、メモリカードスロット40にメモリカード42が接続されているとき、メモリカード42に保存されているファイルを読み出してメインコントローラ60に送信したりメインコントローラ60からの命令を入力しその命令に基づいてメモリカード42にデータを書き込んだりする。   The memory card controller 44 inputs and outputs data to and from the memory card 42 inserted in the memory card slot 40 provided on the side of the operation panel 50. When the memory card 42 is connected to the memory card slot 40, the memory card controller 44 reads a file stored in the memory card 42 and transmits it to the main controller 60 or inputs a command from the main controller 60. Data is written to the memory card 42 based on the command.

メインコントローラ60は、CPU62を中心とするマイクロプロセッサとして構成されており、指定された画像上に線図が描かれた線図画像に基づく画像を重ね合わせて出力するための画像処理プログラム70などの各種処理プログラムや各種データ、各種テーブルなどを記憶したROM64と、一時的にスキャンデータや印刷データなどを記憶するRAM66と、電源を切ってもデータを保持可能なフラッシュメモリ68と、操作パネル50との通信を可能とする内部通信インタフェース69とを備えている。このメインコントローラ60は、プリンタユニット20やスキャナユニット30,メモリカードコントローラ44からの各種動作信号や各種検出信号を入力したり、操作パネル50のボタン群54の操作に応じて発生する操作信号を入力したりする。また、メモリカード42からファイルを読み出してメインコントローラ60へ出力する読出指令をメモリカードコントローラ44に出力したり、画像データの印刷を実行するようプリンタユニット20に印刷指令を出力したり、操作パネル50のボタン群54のスキャン指令に基づいてガラス台36に載置された書類を画像データとして読み取るようスキャナユニット30に読取指令を出力したり、操作パネル50に表示部52の制御指令を出力したりする。   The main controller 60 is configured as a microprocessor centered on the CPU 62, and includes an image processing program 70 for superimposing and outputting an image based on a diagram image in which a diagram is drawn on a designated image. ROM 64 storing various processing programs, various data, various tables, RAM 66 temporarily storing scan data, print data, etc., flash memory 68 capable of holding data even when the power is turned off, operation panel 50, And an internal communication interface 69 that enables the communication. The main controller 60 inputs various operation signals and various detection signals from the printer unit 20, the scanner unit 30, and the memory card controller 44, and inputs operation signals generated according to the operation of the button group 54 of the operation panel 50. To do. Also, a read command for reading a file from the memory card 42 and outputting it to the main controller 60 is output to the memory card controller 44, a print command is output to the printer unit 20 to execute printing of image data, and the operation panel 50 Based on the scan command of the button group 54, a read command is output to the scanner unit 30 so as to read a document placed on the glass table 36 as image data, or a control command for the display unit 52 is output to the operation panel 50. To do.

こうして構成されたマルチファンクションプリンタ10は、ガラス台36に載置された書類を画像データとして読み取って記録紙Sに印刷したり、メモリカードスロット40に接続されたメモリカード42に保存されている画像データを記録紙Sに印刷する。   The multi-function printer 10 thus configured reads a document placed on the glass table 36 as image data and prints it on the recording paper S, or an image stored in the memory card 42 connected to the memory card slot 40. Data is printed on the recording paper S.

次に、こうして構成された実施例のマルチファンクションプリンタ10の動作、特に、
メモリカード42に保存されている写真画像上にユーザが手書きした文字や絵などの線図を重ねた画像を記録紙Sに印刷する重ね合わせ印刷を行う際の動作について説明する。図2は、メインコントローラ60のCPU62により実行される重ね合わせ印刷処理ルーチンの一例を表わすフローチャートである。本ルーチンは、メモリカードスロット44に図3に例示するユーザが指定した写真画像72が保存されたメモリカード42が挿入され、スキャナユニット30のガラス台36に写真画像72上に重ねる線図が書き込まれた手書きシート80が載置された状態で、ユーザが図示しない操作パネル50の重ね合わせ印刷実行ボタンを押下したときに実行される。図4は、ユーザにより線図が書き込まれた手書きシート80の一例を示す説明図である。手書きシート80には、図2に例示した写真画像72の色域を特定色域に減色した背景画像が印刷された自由描画領域82と、背景画像に用いられる色を表示する背景色域テーブル84とが配置されている。自由描画領域82には、ユーザによりサインペンで「Hello!」の文字が線図として描かれている。実施例では、各文字にサインペンのインクによる滲みが生じているものとして説明を行う。
Next, the operation of the multifunction printer 10 of the embodiment configured in this way, in particular,
An operation when performing superposition printing in which an image in which a diagram such as a character or a picture handwritten by a user is superimposed on a photographic image stored in the memory card 42 is printed on the recording paper S will be described. FIG. 2 is a flowchart showing an example of the overlay printing processing routine executed by the CPU 62 of the main controller 60. In this routine, the memory card 42 in which the photographic image 72 specified by the user illustrated in FIG. 3 is stored in the memory card slot 44 is inserted, and a diagram to be superimposed on the photographic image 72 is written on the glass base 36 of the scanner unit 30. This is executed when the user presses the overlay printing execution button on the operation panel 50 (not shown) in a state where the handwritten sheet 80 is placed. FIG. 4 is an explanatory diagram showing an example of a handwritten sheet 80 on which a diagram is written by the user. In the handwritten sheet 80, a free drawing area 82 in which a background image obtained by reducing the color gamut of the photographic image 72 illustrated in FIG. 2 to a specific color gamut is printed, and a background color gamut table 84 that displays colors used for the background image. And are arranged. In the free drawing area 82, the characters “Hello!” Are drawn as a diagram by the user with a sign pen. In the embodiment, a description will be given on the assumption that each character has bleeding due to the ink of the sign pen.

重ね合わせ印刷処理ルーチンが実行されると、メインコントローラ60のCPU62は、
スキャナユニット30のガラス台36に載置された手書きシート80を読み取るようスキャナユニット30に読取指令を送信してスキャンユニット30からのスキャンデータをRAM66に一時的に保存すると共にメモリカード42から写真画像72のデータを読み込んでRAM66に一時的に保存する処理を実行する(ステップS100)。続いて、RAM66に保存されているスキャンデータから手書きシート80内に位置決めされて配置された自由描画領域82の画像を線図画像86として抽出する(ステップS110)。抽出した線図画像86の一例を図5に示す。
When the overlay printing processing routine is executed, the CPU 62 of the main controller 60
A reading command is transmitted to the scanner unit 30 so as to read the handwritten sheet 80 placed on the glass stand 36 of the scanner unit 30, and the scan data from the scan unit 30 is temporarily stored in the RAM 66 and also a photographic image from the memory card 42. A process of reading 72 data and temporarily storing it in the RAM 66 is executed (step S100). Subsequently, an image of the free drawing area 82 positioned and arranged in the handwritten sheet 80 is extracted from the scan data stored in the RAM 66 as a diagram image 86 (step S110). An example of the extracted diagram image 86 is shown in FIG.

線図画像86を抽出すると、続いて、背景色域テーブル84に表示されている背景画像に用いられている色に基づいて線図画像において「Hello!」の文字の背景となる画素を「透明」にすると共に「Hello!」の文字に対応する画素を「不透明」にする背景透明化処理を実行し(ステップS120)、背景透明化処理を実行した後の線図画像でαチャネルが「不透明」に設定されている画素について、連続して配置されている画素群を一つの線図であるものとして、線図を抽出する(ステップS130)。背景透明化処理は、具体的には、線図画像86の各画素のデータに画素を透明にすることが可能なαチャネルを補助データとしてもたせ、線図画像86の各画素のR(レッド)G(グリーン)B(ブルー)のデータと背景色域テーブル84のRGBのデータとを比較して、線図画像86を構成する画素の色が背景色域テーブル84に表示されている色に含まれているときにはその画素を文字の背景となる画素と判断してαチャネルを「透明」に設定し、画素の色が背景色域テーブル84に表示されている色と異なるときにはその画素を文字に対応する画素と判断してαチャネルを「不透明」に設定することにより行なう。図6は、背景透明化処理がなされた後の線図画像86aの一例と抽出された線図の一例とを示す説明図である。図6では、背景透明化処理でαチャネルが「透明」に設定されている画素を図の地色と同じ色で表わし、αチャネルが「不透明」に設定されている画素をグレーで表わしている。図示するように、線図画像86aでは、「H」「e」「l」「o」の各文字は同一文字内で線が連続しているが他の文字とは線が離れているため各々一つの線図88a〜88eとして抽出されるが、「!」は文字内で線が離れているため二つの線図88f,88gとして抽出されることになる。   When the diagram image 86 is extracted, pixels that are the background of the characters “Hello!” In the diagram image based on the colors used in the background image displayed in the background color gamut table 84 are subsequently “transparent”. ”And background transparency processing for making pixels corresponding to the characters“ Hello! ”“ Opaque ”(step S120), and the α channel is“ opaque ”in the diagram image after the background transparency processing is performed. For the pixels set to “”, a diagram is extracted assuming that a group of continuously arranged pixels is one diagram (step S130). Specifically, in the background transparency process, the data of each pixel of the diagram image 86 is provided with an α channel capable of making the pixel transparent as auxiliary data, and R (red) of each pixel of the diagram image 86 The G (green) B (blue) data and the RGB data in the background color gamut table 84 are compared, and the colors of the pixels constituting the diagram image 86 are included in the colors displayed in the background color gamut table 84. If the color of the pixel is different from the color displayed in the background color gamut table 84, the alpha channel is set to "transparent". This is done by determining the corresponding pixel and setting the α channel to “opaque”. FIG. 6 is an explanatory diagram showing an example of the diagram image 86a after the background transparency processing and an example of the extracted diagram. In FIG. 6, pixels for which the α channel is set to “transparent” in the background transparency processing are represented by the same color as the background color in the figure, and pixels for which the α channel is set to “opaque” are represented by gray. . As shown in the figure, in the diagram image 86a, the characters “H”, “e”, “l”, and “o” are continuous in the same character but are separated from other characters. Although extracted as one diagram 88a to 88e, “!” Is extracted as two diagrams 88f and 88g because the lines are separated in the character.

続いて、線図88a〜88gのうち一つを注目線図として、注目線図のRGBのヒストグラムを作成して(ステップS140)、作成したヒストグラムを用いて注目線図が単一色であるか否かを判定する(ステップS150)。図7は、文字「H」に対応する線図88aについて生成したヒストグラムの一例を示す説明図であり、図中、実線,破線、一点鎖線は、それぞれRGBの各ヒストグラムを示している。単一色であるか否かの判定は、RGBの各データについて、横軸を輝度,縦軸を輝度毎の画素数とするヒストグラムを生成し、各RGBのデータ毎にヒストグラムの最頻値に対応する最頻輝度値Rmo,Gmo,Bmoを含み全体の画素数のうち所定割合以上(例えば、90%以上)の画素が含まれる輝度幅WR,WB,WGを導出し、導出した輝度幅WR,WG,WBの各々が文字が単一色であると判断可能な輝度の幅としての閾値WRth,WGth,WBth以内であるときに単一色であると判定するものとした。ここで、閾値WRth,WGth,WBthは、数種類の紙に数種類のペンを用いて複数の単一色で文字を描いたときのRGBの各データを実験などにより求めておき、求めたRGBの各データについて横軸を輝度,縦軸を輝度毎の画素数とするヒストグラムを生成し、生成したヒストグラムにおいて最頻値を中心として全体の画素数のうち所定割合以上の画素が含まれる輝度の幅の平均値を閾値WRth,WGth,WBthとROM64に保存しておき、こうしてROM64に保存された値をも用いるものとした。   Subsequently, an RGB histogram of the attention diagram is created using one of the diagrams 88a to 88g as the attention diagram (step S140), and whether or not the attention diagram is a single color using the created histogram. Is determined (step S150). FIG. 7 is an explanatory diagram showing an example of a histogram generated for the diagram 88a corresponding to the letter “H”. In the diagram, solid lines, broken lines, and alternate long and short dash lines indicate RGB histograms, respectively. To determine whether the color is a single color, for each RGB data, generate a histogram with the horizontal axis representing luminance and the vertical axis representing the number of pixels for each luminance, and corresponding to the mode value of the histogram for each RGB data Deriving luminance widths WR, WB, WG including the most frequent luminance values Rmo, Gmo, Bmo and including a predetermined ratio or more (for example, 90% or more) of the total number of pixels, and deriving luminance widths WR, Each of WG and WB is determined to be a single color when it is within thresholds WRth, WGth, and WBth as luminance widths that can be determined that the character is a single color. Here, the threshold values WRth, WGth, and WBth are obtained by experimentation or the like for each RGB data when characters are drawn in a plurality of single colors using several types of pens on several types of paper. A histogram with the horizontal axis representing the luminance and the vertical axis representing the number of pixels for each luminance, and the average of the width of the luminance including the predetermined number or more of the total number of pixels centered on the mode value in the generated histogram The values are stored in the threshold values WRth, WGth, WBth and the ROM 64, and thus the values stored in the ROM 64 are also used.

注目線図が単一色であるときには(ステップS150)、生成したヒストグラムに基づいて注目線図に高い頻度で含まれる色を代表色として設定する(ステップS160)。ここでは、RGBの各データ毎にヒストグラムを用いて輝度の代表輝度値Ra,Ga,Baを設定して、設定した代表輝度値Ra,Ga,BaをRGBデータとする色を代表色として設定するものとした。図8は、Rのデータについて代表輝度値Raを設定する様子の一例を示す説明図である。実施例では、ヒストグラムの輝度幅WRの範囲内に含まれる画素の総数を導出し、導出した画素の総数をヒストグラムの左右で2等分する縦軸に平行な直線fと横軸との交点を代表輝度値Raとして設定するものとした。GBの各データについても、Rのデータと同様に、ヒストグラムの輝度幅WB,WGの範囲内に含まれる画素の総数を導出し、導出した画素の総数をヒストグラムの左右で2等分する縦軸に平行な直線と横軸との交点を代表輝度値Ga,Baとして設定するものとした。このように代表輝度値Ra,Ga,Baを設定することにより、最頻輝度値Rmo,Gmo,Bmoが輝度幅WR,WG,WBの中心から大きく外れた位置にある場合でも適正に代表色を設定することができる。   When the attention line is a single color (step S150), a color frequently included in the attention line is set as a representative color based on the generated histogram (step S160). Here, representative luminance values Ra, Ga, Ba of luminance are set for each RGB data using a histogram, and a color having the set representative luminance values Ra, Ga, Ba as RGB data is set as a representative color. It was supposed to be. FIG. 8 is an explanatory diagram showing an example of how the representative luminance value Ra is set for the R data. In the embodiment, the total number of pixels included in the range of the brightness width WR of the histogram is derived, and the intersection of the horizontal axis and the straight line f parallel to the vertical axis that bisects the total number of derived pixels on the left and right of the histogram. The representative luminance value Ra is set. Similarly to the R data, for each GB data, the vertical axis for deriving the total number of pixels included in the range of the luminance widths WB and WG of the histogram and dividing the total number of derived pixels into two at the left and right of the histogram The intersection of the straight line parallel to the horizontal axis and the horizontal axis is set as the representative luminance values Ga and Ba. By setting the representative luminance values Ra, Ga, and Ba in this way, even when the mode luminance values Rmo, Gmo, and Bmo are at positions far from the centers of the luminance widths WR, WG, and WB, the representative colors can be appropriately displayed. Can be set.

こうして注目線図の代表色を設定したら、注目線図を構成する全ての画素のRGBのデータを代表色のRGBのデータに変換する色変換処理を行なう(ステップS170)。こうした処理により、注目線図を設定した代表色で塗りつぶされた色ムラのない線図にすることができる。   When the representative color of the attention diagram is set in this way, a color conversion process is performed to convert RGB data of all pixels constituting the attention diagram into RGB data of the representative color (step S170). By such processing, it is possible to obtain a diagram without color unevenness filled with the representative color for which the attention diagram is set.

一方、注目線図が単一色でないときには(ステップS150)、注目線図が多色であるため代表色を設定して一色で塗りつぶし処理を行なうのは適切ではないと判断して、ステップS160,S170の処理を行なわず次の処理を実行する。こうすれば、注目線図が多色であるときには、そのままの色で維持することができる。   On the other hand, when the attention line diagram is not a single color (step S150), it is determined that it is not appropriate to set the representative color and perform the painting process with one color because the attention line diagram is multicolored, and steps S160 and S170. The following processing is executed without performing the above processing. In this way, when the attention diagram is multicolored, it can be maintained as it is.

こうして注目線図についての処理が終了したら、ステップS130の処理で抽出した全ての線図についてステップS140からステップS170の処理を繰り返して(ステップS180)、図9に例示する調整用画像90を作成する。なお、図9では、αチャネルが「透明」に設定されている画素を図の地色と同じ色で表わし、αチャネルが「不透明」に設定されている画素をグレーで表わしている。こうして調整用画像90が得られたら、調整用画像90をRAM66に保存されている写真画像72上に重ね合わせて図10に例示する印刷用画像92を生成し(ステップS190)、生成した印刷用画像92の印刷を実行するようプリンタユニット20に印刷実行指示を出力して(ステップS200)、本ルーチンを終了する。印刷実行指示が入力されたプリンタユニット20は、記録紙Sに印刷用画像92の印刷を実行する。線図88a〜88gを代表色で塗りつぶした調整用画像90を用いて印刷画像92を生成するから、品質の良い画像で印刷することができる。   When the processing for the attention diagram is completed in this way, the processing from step S140 to step S170 is repeated for all the diagrams extracted in step S130 (step S180), and the adjustment image 90 illustrated in FIG. 9 is created. . In FIG. 9, a pixel in which the α channel is set to “transparent” is represented by the same color as the background color in the drawing, and a pixel in which the α channel is set to “opaque” is represented in gray. When the adjustment image 90 is obtained in this manner, the adjustment image 90 is superimposed on the photographic image 72 stored in the RAM 66 to generate the print image 92 illustrated in FIG. 10 (step S190), and the generated print image A print execution instruction is output to the printer unit 20 to execute printing of the image 92 (step S200), and this routine is terminated. The printer unit 20 to which the print execution instruction is input executes the printing of the print image 92 on the recording paper S. Since the print image 92 is generated using the adjustment image 90 in which the diagrams 88a to 88g are filled with the representative colors, it is possible to print with a good quality image.

ここで、本実施例の構成要素と本発明の構成要素との対応関係を明らかにする。本実施例のマルチファンクションプリンタ10が本発明の画像処理装置に相当し、CPU62が線図抽出手段や単一色判定手段,代表色設定手段,調整用線図画像作成手段に相当する。また、ROM64に記憶された画像処理プログラム70が本発明のプログラムに相当する。なお、本実施例では、マルチファンクションプリンタ10の動作を説明することにより本発明の画像処理方法の一例も明らかにしている。   Here, the correspondence between the components of the present embodiment and the components of the present invention will be clarified. The multifunction printer 10 of this embodiment corresponds to the image processing apparatus of the present invention, and the CPU 62 corresponds to a diagram extracting unit, a single color determining unit, a representative color setting unit, and an adjustment diagram image creating unit. Further, the image processing program 70 stored in the ROM 64 corresponds to the program of the present invention. In this embodiment, an example of the image processing method of the present invention is also clarified by describing the operation of the multifunction printer 10.

以上説明した実施例のマルチファンクションプリンタ10によれば、抽出された線図画像86の線図88a〜88gを線図毎に代表色で塗りつぶしたものを調整用線図画像90とするから、調整用線図画像90を写真画像72上に重ね合わせて出力する際に線図に色ムラが生じるのを抑制することができる。また、各線図のRGBのデータと画素数との関係を示すヒストグラムにおいて、輝度幅WR,WB,WG内に含まれる画素の総数を導出して、導出した画素の総数をヒストグラムの左右で2等分する縦軸に平行な直線と横軸との交点としての代表輝度値Ra,Ga,BaをRGBデータとする色を注目線図の代表色として設定するから、より適正に代表色を設定することができる。さらに、各RGBのデータ毎にヒストグラムの最頻値に対応する最頻輝度値Rmo,Gmo,Bmoを含むと共に全体の画素数のうち所定割合以上の画素が含まれる輝度幅WR,WB,WGを用いて各線図が単一色であるか否かを判定するから、より適正に各線図が単一色であるか否かを判定することができる。   According to the multifunction printer 10 of the embodiment described above, the adjustment diagram image 90 is obtained by filling the diagram 88a to 88g of the extracted diagram image 86 with a representative color for each diagram. When the diagram image 90 is superimposed on the photographic image 72 and output, it is possible to suppress color unevenness in the diagram. Further, in the histogram showing the relationship between the RGB data and the number of pixels in each diagram, the total number of pixels included in the luminance widths WR, WB, WG is derived, and the total number of derived pixels is equal to 2 on the left and right sides of the histogram. Since the colors having the representative luminance values Ra, Ga, and Ba as the intersections of the straight line parallel to the vertical axis to be divided and the RGB data are set as the representative colors of the attention line diagram, the representative colors are set more appropriately. be able to. Further, the luminance widths WR, WB, WG including the mode luminance values Rmo, Gmo, Bmo corresponding to the mode value of the histogram for each RGB data and including pixels of a predetermined ratio or more in the total number of pixels. Since it is used to determine whether each diagram is a single color, it is possible to more appropriately determine whether each diagram is a single color.

実施例のマルチファンクションプリンタ10では、ステップS160の処理でヒストグラムのRGBの各データについて輝度幅WR,WB,WG内に含まれる画素数を2等分する輝度値としての代表輝度値Ra,Ga,BaをRGBデータとする色を線図の代表色として設定するものとしたが、線図の色分布に基づいて代表色を設定するものであれば如何なる方法で代表色を設定してもよく、例えば、輝度幅WR,WB,WGにおける輝度の平均値をRGBデータとする色やヒストグラムの最頻値に対応する最頻輝度値Rmo,Gmo,BmoをRGBデータとする色を代表色として設定してもよい。   In the multi-function printer 10 of the embodiment, the representative luminance values Ra, Ga, and the like as luminance values that divide the number of pixels included in the luminance widths WR, WB, and WG into two for each of the RGB data of the histogram in the process of step S160. The color having Ba as RGB data is set as the representative color of the diagram. However, the representative color may be set by any method as long as the representative color is set based on the color distribution of the diagram. For example, a color having an average luminance value in the luminance widths WR, WB, and WG as RGB data and a color having the mode luminance values Rmo, Gmo, and Bmo corresponding to the mode value in the histogram as RGB data are set as representative colors. May be.

実施例のマルチファンクションプリンタ10では、ステップS150の処理で、RGBのデータ毎にヒストグラムの最頻値に対応する最頻輝度値Rmo,Gmo,Bmoを含むと共に全体の画素数のうち所定割合以上の画素が含まれる輝度幅WR,WB,WGが閾値WRth,WGth,WBth以内であるときに単一色であると判定するものとしたが、線図の色分布に基づいて線図が単一色であるか否かを判定するものであれば如何なる方法で判定してもよく、例えば、各ヒストグラムにおいて輝度幅WR,WB,WGに対応する領域を正規分布で近似して標準偏差をσとしたときに2σの区間に対応する輝度幅が閾値WRth,WGth,WBth以内であるときに単一色であると判定するものとしてもよい。   In the multi-function printer 10 according to the embodiment, in the process of step S150, each RGB data includes the mode luminance values Rmo, Gmo, and Bmo corresponding to the mode value of the histogram for each of the RGB data, and more than a predetermined ratio of the total number of pixels. Although it is determined that a single color is obtained when the luminance widths WR, WB, WG including the pixels are within the threshold values WRth, WGth, WBth, the diagram is a single color based on the color distribution of the diagram Can be determined by any method, for example, when the regions corresponding to the luminance widths WR, WB, WG in each histogram are approximated by a normal distribution and the standard deviation is σ. It may be determined that the color is a single color when the luminance width corresponding to the section of 2σ is within the threshold values WRth, WGth, and WBth.

実施例のマルチファンクションプリンタ10において、ステップS170の処理とステップS180の処理との間で注目線図に光沢陰影処理を行なうものとしてもよい。光沢陰影処理は、注目線図を所定平面に配置し、所定平面に垂直な方向について注目線図に所定の厚みを持たせると共に注目線図の斜め上方に光源が配置された状況でユーザが所定平面に垂直な方向の無限遠から注目線図を見たと仮定して、注目線図に含まれる線に輝度変化を設けて注目線図を立体的に見せる処理である。光沢陰影処理は、周知の処理であるため詳細な説明は省略する。図11は写真画像70上に光沢陰影処理を施した調整用画像を重ね合わせた印刷用画像192の一例を示す説明図である。こうして注目線図を代表色で塗りつぶした後に光沢陰影処理を行なうことにより、より高品質な画像を生成することができる。   In the multi-function printer 10 of the embodiment, the glossy shading process may be performed on the attention line diagram between the process of step S170 and the process of step S180. The glossy shading process is performed by a user in a situation where the attention line is arranged on a predetermined plane, the attention line is given a predetermined thickness in a direction perpendicular to the predetermined plane, and the light source is arranged obliquely above the attention line. Assuming that the attention line diagram is viewed from infinity in the direction perpendicular to the plane, this is a process for providing a change in luminance to the lines included in the attention line figure so that the attention line diagram can be viewed in three dimensions. The glossy shading process is a well-known process and will not be described in detail. FIG. 11 is an explanatory diagram illustrating an example of a printing image 192 in which an adjustment image that has been subjected to glossy shading processing is superimposed on a photographic image 70. In this way, a glossy shading process is performed after the attention line diagram is painted with the representative color, whereby a higher quality image can be generated.

実施例のマルチファンクションプリンタ10では、手書きシート80の自由描画領域82に写真画像72の色域を特定色域に減色した背景画像が予め印刷されているものとしたが、自由描画領域82内にこうした背景画像が印刷されていないものとしてもよい。この場合、ステップS120の処理では、手書きシート80の地色と同じ色の画素についてαチャネルを「透明」にする処理を行なうのが望ましい。また、線図がキャラクターの顔など線の内部に図形が描かれた絵や吹き出しである場合は、線で囲まれた領域全体を一つの線図とみなしてαチャネルを「不透明」に設定するものとしてもよい。この場合、ステップS150の処理で単一色でないと判定されて、代表色による塗りつぶしは行なわれないことになる。   In the multi-function printer 10 of the embodiment, a background image in which the color gamut of the photographic image 72 is reduced to a specific color gamut is printed in advance in the free drawing area 82 of the handwritten sheet 80. Such a background image may not be printed. In this case, in the process of step S120, it is desirable to perform the process of making the α channel “transparent” for the pixels of the same color as the ground color of the handwritten sheet 80. Also, if the diagram is a picture or speech bubble with a figure drawn inside the line, such as the character's face, the entire area surrounded by the line is considered as one diagram and the α channel is set to “opaque” It may be a thing. In this case, it is determined in step S150 that the color is not a single color, and the fill with the representative color is not performed.

実施例では、本発明の画像処理装置をマルチファンクションプリンタに適用した場合を例示したが、線図が描かれた線図画像を調整した調整用線図画像を指定された画像の上に重ね合わせて出力するものであれば如何なるものに適用しても構わない。   In the embodiment, the case where the image processing apparatus of the present invention is applied to a multi-function printer is exemplified. However, an adjustment diagram image obtained by adjusting a diagram image on which a diagram is drawn is superimposed on a specified image. It can be applied to any output as long as it is output.

以上、本発明を実施するための最良の形態について実施例を用いて説明したが、本発明はこうした実施例に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において、種々なる形態で実施し得ることは勿論である。   The best mode for carrying out the present invention has been described with reference to the embodiments. However, the present invention is not limited to these embodiments, and various modifications can be made without departing from the gist of the present invention. Of course, it can be implemented in the form.

本発明は、画像処理装置の製造業等に利用可能である。   The present invention can be used in the manufacturing industry of image processing apparatuses.

マルチファンクションプリンタ10の構成の概略を示す構成図。1 is a configuration diagram showing an outline of the configuration of a multifunction printer 10. FIG. 重ね合わせ印刷処理ルーチンの一例を表わすフローチャート。7 is a flowchart illustrating an example of an overlay printing processing routine. メモリカード42に保存された写真画像72の一例を示す説明図。FIG. 4 is an explanatory diagram showing an example of a photographic image 72 stored in the memory card 42. ユーザにより線図が書き込まれた手書きシート80の一例を示す説明図。Explanatory drawing which shows an example of the handwritten sheet 80 in which the diagram was written by the user. 抽出した線図画像86の一例を示す説明図。Explanatory drawing which shows an example of the extracted diagram image 86. FIG. 背景透明化処理を行なった後の線図画像86aの一例を示す説明図。Explanatory drawing which shows an example of the diagram image 86a after performing background transparency processing. 線図について生成したヒストグラムの一例を示す説明図。Explanatory drawing which shows an example of the histogram produced | generated about the diagram. 代表輝度値Raを設定する様子の一例を示す説明図。Explanatory drawing which shows an example of a mode that representative luminance value Ra is set. 調整用画像90の一例を示す説明図。Explanatory drawing which shows an example of the image 90 for adjustment. 印刷画像92の一例を示す説明図。FIG. 6 is an explanatory diagram illustrating an example of a print image 92. 印刷画像192の一例を示す説明図。3 is an explanatory diagram illustrating an example of a print image 192. FIG.

符号の説明Explanation of symbols

10 マルチファンクションプリンタ、12 バス、20 プリンタユニット、22 プリンタASIC、24 プリンタエンジン、30 スキャナユニット、32 スキャナASIC、34 スキャナエンジン、40 メモリカードスロット、42 メモリカード、44 メモリカードコントローラ、50 操作パネル、52 表示部、54 ボタン群、60 メインコントローラ、62 CPU、64 ROM、66 RAM、68 フラッシュメモリ、69 内部通信I/F、70 画像処理プログラム、72 写真画像、80 手書きシート、82 自由描画領域、84 背景色域テーブル、86,86a 線図画像、88a,88b,88c,88d,88e,88f,88g 線図、90 調整用画像、92,192 印刷用画像、S 記録紙。   10 Multifunction Printer, 12 Bus, 20 Printer Unit, 22 Printer ASIC, 24 Printer Engine, 30 Scanner Unit, 32 Scanner ASIC, 34 Scanner Engine, 40 Memory Card Slot, 42 Memory Card, 44 Memory Card Controller, 50 Operation Panel, 52 display unit, 54 button group, 60 main controller, 62 CPU, 64 ROM, 66 RAM, 68 flash memory, 69 internal communication I / F, 70 image processing program, 72 photographic image, 80 handwritten sheet, 82 free drawing area, 84 Background color gamut table, 86, 86a diagram image, 88a, 88b, 88c, 88d, 88e, 88f, 88g diagram, 90 adjustment image, 92, 192 print image, S recording paper.

Claims (7)

線図が描かれた線図画像を調整してなる調整用線図画像を指定された画像の上に重ね合わせて出力する画像処理装置であって、
前記線図画像に描かれた線図を抽出する線図抽出手段と、
前記抽出された線図に対して該線図の色の分布に基づいて該線図が単一色であるか否かを判定する単一色判定手段と、
該単一色判定手段により単一色と判定された線図に対して該線図の色の分布に基づいて代表色を設定する代表色設定手段と、
前記代表色が設定された線図を該設定された代表色で塗りつぶして前記調整用線図画像を作成する調整用線図画像作成手段と、
を備える画像処理装置。
An image processing apparatus that outputs an adjustment diagram image obtained by adjusting a diagram image on which a diagram is drawn, overlaid on a specified image,
A diagram extracting means for extracting a diagram drawn in the diagram image;
Single color determination means for determining whether or not the diagram is a single color based on the color distribution of the diagram with respect to the extracted diagram;
Representative color setting means for setting a representative color based on the color distribution of the diagram for the diagram determined to be a single color by the single color determination means;
An adjustment diagram image creating means for creating the adjustment diagram image by painting the diagram in which the representative color is set with the set representative color;
An image processing apparatus comprising:
前記代表色設定手段は、前記線図の色要素の輝度と画素数との関係を示すヒストグラムにおいて最頻値に対応する輝度値を含む所定輝度範囲内の画素数を2等分する輝度値および前記所定輝度範囲における平均輝度値,前記最頻値のいずれか一つの値を用いて前記代表色を設定する手段である請求項1記載の画像処理装置。   The representative color setting means includes a luminance value that bisects the number of pixels within a predetermined luminance range including a luminance value corresponding to a mode value in a histogram indicating a relationship between the luminance of the color element of the diagram and the number of pixels. The image processing apparatus according to claim 1, wherein the representative color is set using one of an average luminance value and a mode value in the predetermined luminance range. 前記単一色判定手段は、前記線図の色要素の輝度と画素数との関係を示すヒストグラムにおいて最頻値を含むと共に所定画素数以上の画素を含む領域の輝度の幅が所定輝度幅未満であるとき又は前記ヒストグラムにおいて前記最頻値を含むと共に前記所定画素数以上の画素を含む領域を正規分布で近似して標準偏差をσとしたときに2σの区間に対応する輝度の幅が前記所定輝度幅未満であるときに単一色であると判定する手段である請求項2記載の画像処理装置。   The single color determination means includes a mode indicating a relationship between the luminance of the color element of the diagram and the number of pixels, and includes a mode value and a luminance width of an area including a predetermined number of pixels or more is less than the predetermined luminance width. When the area including the mode value and the pixel including the predetermined number of pixels or more in the histogram is approximated by a normal distribution and the standard deviation is σ, the luminance width corresponding to the section of 2σ is the predetermined width. The image processing apparatus according to claim 2, wherein the image processing apparatus is a unit that determines that the color is a single color when the luminance is less than the luminance width. 前記調整用線図画像作成手段は、前記設定された代表色で塗りつぶした線図に含まれる線に対して所定の厚みを持たせて所定の角度から光を照射したときに生じる光沢および陰影を施して前記調整用線図画像を作成する手段である請求項3記載の画像処理装置。   The adjustment diagram image creating means has a gloss and a shadow generated when light is irradiated from a predetermined angle with a predetermined thickness with respect to a line included in the diagram filled with the set representative color. The image processing apparatus according to claim 3, wherein the image processing apparatus is a means for generating the adjustment diagram image. 請求項4記載の画像処理装置であって、
前記線図画像は、前記指定された画像の色を所定色域内に減色してなる背景画像上に線図が描かれた画像であり、
前記線図抽出手段は、前記線図画像の画素が前記所定色域の範囲外の色であることを要件として線図を抽出する手段であり、
前記調整用線図画像作成手段は、前記線図画像の前記所定色域の範囲内の画素を透明なものとして前記調整用線図画像を作成する手段である
画像処理装置。
The image processing apparatus according to claim 4,
The diagram image is an image in which a diagram is drawn on a background image formed by reducing the color of the designated image within a predetermined color gamut,
The diagram extracting means is means for extracting a diagram on the condition that pixels of the diagram image are out of the predetermined color gamut.
The adjustment diagram image creating means is an image processing apparatus that creates the adjustment diagram image by making the pixels within the predetermined color gamut of the diagram image transparent.
線図が描かれた線図画像を調整してなる調整用線図画像を指定された画像の上に重ね合わせて出力する画像処理方法であって、
前記線図画像に描かれた線図を抽出し、
前記抽出された線図に対して該線図の色の分布に基づいて該線図が単一色であるか否かを判定し、
前記単一色と判定された線図に対して該線図の色の分布に基づいて代表色を設定し、
前記代表色が設定された線図を該設定された代表色で塗りつぶして前記調整用線図画像を作成する
画像処理方法。
An image processing method for superimposing and outputting an adjustment diagram image obtained by adjusting a diagram image on which a diagram is drawn on a specified image,
Extract the diagram drawn in the diagram image,
Determining whether the diagram is a single color based on the color distribution of the diagram for the extracted diagram;
A representative color is set based on the color distribution of the diagram for the diagram determined to be the single color,
An image processing method for creating the adjustment diagram image by painting the diagram set with the representative color with the set representative color.
請求項6記載の画像処理方法の各ステップを1以上のコンピュータに実行させるためのプログラム。   A program for causing one or more computers to execute each step of the image processing method according to claim 6.
JP2007238888A 2007-09-14 2007-09-14 Image processing apparatus, image processing method, and program Expired - Fee Related JP4967947B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007238888A JP4967947B2 (en) 2007-09-14 2007-09-14 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007238888A JP4967947B2 (en) 2007-09-14 2007-09-14 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2009071649A true JP2009071649A (en) 2009-04-02
JP4967947B2 JP4967947B2 (en) 2012-07-04

Family

ID=40607440

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007238888A Expired - Fee Related JP4967947B2 (en) 2007-09-14 2007-09-14 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP4967947B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260452A (en) * 2004-03-10 2005-09-22 Fuji Xerox Co Ltd Image processing apparatus
JP2007071997A (en) * 2005-09-05 2007-03-22 Seiko Epson Corp Shadow character output device, shadow character output control method, and program thereof
JP2007124617A (en) * 2005-09-30 2007-05-17 Canon Inc Image combining apparatus and control method for the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260452A (en) * 2004-03-10 2005-09-22 Fuji Xerox Co Ltd Image processing apparatus
JP2007071997A (en) * 2005-09-05 2007-03-22 Seiko Epson Corp Shadow character output device, shadow character output control method, and program thereof
JP2007124617A (en) * 2005-09-30 2007-05-17 Canon Inc Image combining apparatus and control method for the same

Also Published As

Publication number Publication date
JP4967947B2 (en) 2012-07-04

Similar Documents

Publication Publication Date Title
US7842871B2 (en) Sheet music creation method and image processing system
US8363260B2 (en) Image processing apparatus and image processing method
JP2005310068A (en) Method for correcting white of eye, and device for executing the method
US20100020351A1 (en) Image processing apparatus, image processing method, and computer readable medium
US9338310B2 (en) Image processing apparatus and computer-readable medium for determining pixel value of a target area and converting the pixel value to a specified value of a target image data
US20090028426A1 (en) Coloring picture, coloring picture generating apparatus, and coloring picture generating method
US20090244570A1 (en) Face image-output control device, method of controlling output of face image, program for controlling output of face image, and printing device
US8743422B2 (en) Image processing apparatus, image processing method, image processing program and printing device
JP4967947B2 (en) Image processing apparatus, image processing method, and program
JP4904987B2 (en) Printing method, printing apparatus, and printing program
JP4941157B2 (en) Coloring production apparatus, coloring production method and program thereof
US20120300266A1 (en) Sheet music creation method and image processing apparatus
US8472072B2 (en) Method for improving printing quality and related printing system
JP2005252710A (en) Image processing apparatus, image processing method, and image processing program
JP6627703B2 (en) Print data creation program, print data creation device, printing device, print data creation method
JP2005115768A (en) Image processing method, apparatus, and system, and image forming apparatus, and image processing system
US10805483B2 (en) Image processing apparatus which performs an image process based upon acquired image data and method for controlling image processing apparatus
US20230308593A1 (en) Non-transitory computer readable recording medium recording program and information processing apparatus
JP2009081631A (en) Image processing apparatus, method and program
JP2009060644A (en) Printing method, printer, and printing program
JP2015106755A (en) Print control device, printer and print control program
JP5807346B2 (en) Print control apparatus, print control method, and print control program
US20090316210A1 (en) Image forming apparatus, image forming method and computer readable medium
JP2006159648A (en) Recording system, image processor, inkjet recorder and image processing method
JP2010052287A (en) Image forming apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100913

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120213

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120306

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120319

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150413

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees