+

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

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

Info

Publication number
JP2004236157A
JP2004236157A JP2003024273A JP2003024273A JP2004236157A JP 2004236157 A JP2004236157 A JP 2004236157A JP 2003024273 A JP2003024273 A JP 2003024273A JP 2003024273 A JP2003024273 A JP 2003024273A JP 2004236157 A JP2004236157 A JP 2004236157A
Authority
JP
Japan
Prior art keywords
color
pixel
conversion
image
distance
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
JP2003024273A
Other languages
Japanese (ja)
Other versions
JP3838981B2 (en
Inventor
Koichiro Hirao
浩一郎 平尾
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.)
NEC Platforms Ltd
Original Assignee
NEC AccessTechnica Ltd
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 NEC AccessTechnica Ltd filed Critical NEC AccessTechnica Ltd
Priority to JP2003024273A priority Critical patent/JP3838981B2/en
Publication of JP2004236157A publication Critical patent/JP2004236157A/en
Application granted granted Critical
Publication of JP3838981B2 publication Critical patent/JP3838981B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To achieve high-speed color determination/monochrome binary conversion without the need for a memory. <P>SOLUTION: The image processing device comprises a color space conversion section 101 that converts a color image into color space, a color area table 103 that includes a space coordinate as the center of color and a first distance r of space showing the range of a color area by each color, a color determination section 102 that calculates a second distance L between the space coordinates of the image data after color space conversion and a space coordinate of the color area table for each color by each pixel and that determines color, where the second distance L becomes minimum, as the color of a pixel when a color area whose second distance L becomes equal to or less than the first distance r (L≤r) exists, a conversion density value table 104 that includes density data after converting the color area corresponding to pixel color, and a conversion section 105 that converts an image into a monochrome image by each pixel based on the density data of the conversion density value table. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置、画像処理方法及び画像処理プログラムに係わり、特にカラー画像をモノクロ画像に変換する画像処理装置、画像処理方法及び画像処理プログラムに関する。
【0002】
【従来の技術】
複写機、プリンタ、スキャナ、ファクシミリ等の画像処理装置においては、原稿から読み取った、又は受信したカラー画像からモノクロ画像への変換することが求められる場合がある。
【0003】
従来、カラー画像のモノクロ2値画像への変換において、各画素の輝度成分だけを用いた場合、例えば、赤と青のような同じような輝度値をもつ色が隣接していると、2値画像へと変換した結果、2色の領域の違いが不明瞭になり情報が失われてしまう。また、黄色等の輝度値の高い色においては、変換時に白とみなされて変換後には情報が消失していることがあった。さらに、輝度成分だけではなく、色成分等を用いたとしても、やはり変換後に同じような濃度で表現される色が複数存在するため、上記のような領域が不明瞭となるケースが発生してしまう。
【0004】
図3にモノクロ2値変換の例を示す。図3(a)は原画像であり、これを、例えば輝度成分でモノクログレー化して2値化した場合、図3(b)のような画像となる。赤い矩形の中の黒文字が周りの赤色と判別が困難となっており、また、黄色い矩形分のデータが消えてしまう現象が発生する。
【0005】
この問題に対し、様々な解決案が提案されている。例えば、特許文献1には、カラー画像に含まれる複数の色を判別し、カラー画像に含まれる各画素について、色情報に基づいて変換後の濃度を決定し、カラーが層の各画素の色成分を、決定した濃度に変換することの記載がある(図3等)。
【0006】
また、特許文献2の図1等、特許文献3の第1図等、特許文献4の図1等、特許文献5の図2等には、異なる色でも輝度値に置きかえてモノクロ変換すると区別がつかなくなるのを防止するために、色領域を判別し、階調差を付与する画像処理装置の記載がある。
【0007】
【特許文献1】
特開2001−352454
【特許文献2】
特開2002−10090
【特許文献3】
特開昭62−088071
【特許文献4】
特開平10−155085
【特許文献5】
特開平11−339034
【0008】
【発明が解決しようとする課題】
しかし上記各特許文献に記載された技術は、その領域判定処理においてある一定のメモリを必要としコストが高く、また処理にある程度の時間を必要とする。
【0009】
【課題を解決するための手段】
本発明の画像処理装置は、カラー画像の各画素について、画素の色を判定する色判定手段と、
前記画素の色に対応する濃度データを備えた変換濃度値テーブルと、
前記変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段と、を備えたものである。
【0010】
また本発明の画像処理装置は、カラー画像を色空間へ変換する手段と、
色の中心となる空間座標と色領域の範囲を表す空間の第1の距離とを色ごとに備えた色領域テーブルと、
色空間変換後の画像データの空間座標と前記色領域テーブルの空間座標との間の第2の距離を画素ごとに各色について求め、前記第2の距離が前記第1の距離以下となる色領域が存在する場合に前記第2の距離が最小となる色を画素の色と判定する色判定手段と、
前記画素の色に対応する色領域の変換後の濃度データを備えた変換濃度値テーブルと、
前記変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段と、を備えたものである。
【0011】
本発明の画像処理方法は、カラー画像をモノクロ画像に変換する画像処理方法において、カラー画像の各画素について、画素の色を判定し、前記画素の色に対応する濃度データを備えた変換濃度値テーブルを用いて、画素ごとにモノクロ画像に変換することを特徴とするものである。
【0012】
また本発明の画像処理方法は、カラー画像を色空間へ変換するステップと、
色の中心となる空間座標と色領域の範囲を表す空間の第1の距離とを色ごとに備えた色領域テーブルを用いて、色空間変換後の画像データの空間座標と前記色領域テーブルの空間座標との間の第2の距離を画素ごとに各色について求め、前記第2の距離が前記第1の距離以下となる色領域が存在する場合に前記第2の距離が最小となる色を画素の色と判定するステップと、
前記画素の色に対応する色領域の変換後の濃度データを備えた変換濃度値テーブルを用いて、該濃度データに基づいて画素ごとにモノクロ画像に変換するステップと、を備えたものである。
【0013】
本発明の画像処理プログラムは、カラー画像の各画素について、画素の色を判定する色判定手段と、前記画素の色に対応する濃度データを備えた変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段として、コンピュータを機能させるためのものである。
【0014】
また本発明の画像処理プログラムは、カラー画像を色空間へ変換する手段と、
色の中心となる空間座標と色領域の範囲を表す空間の第1の距離とを色ごとに備えた色領域テーブルと、色空間変換後の画像データの空間座標との間の第2の距離を画素ごとに各色について求め、前記第2の距離が前記第1の距離以下となる色領域が存在する場合に前記第2の距離が最小となる色を画素の色と判定する色判定手段と、
前記画素の色に対応する色領域の変換後の濃度データを備えた変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段として、コンピュータを機能させるためのものである。
【0015】
本発明はカラー画像のモノクロ2値画像への変換に関して、メモリを必要としない簡単な領域判別を行い、判別した結果に基づき、本来原稿が持っている輝度値には関係なく任意に特定の色を特定の濃度(多値)に割り当て、画像全体に対して2値化処理を行い、各色の判別が可能となるようなモノクロ2値画像を生成するものである。
【0016】
【発明の実施の形態】
以下、本発明の実施の形態について図面を用いて詳細に説明する。
【0017】
まず、本発明の画像処理装置の一実施形態の構成を図1を用いて説明する。
【0018】
図1を参照すると、本実施形態の画像処理装置は、画像を取りこむ画像入力部100と、入力された画像の色空間変換を行う色空間変換部101、変換された色空間上で色判定を行い、その結果に従ってモノクログレーデータに変換する色判定変換部106、変換されたモノクログレーデータを2値化する2値化部107から構成される。
【0019】
また、色判定変換部106は、色の判定を行う色判定部102、色判定に標準サンプルとして使用する各色領域のデータを持つ色領域テーブル103、色判定結果に応じて特定のモノクログレーデータに変換し出力する変換部105、各色領域に対する変換後の濃度値を格納しておく変換濃度値テーブル104から構成される。
【0020】
(動作の説明)
次に上記画像処理装置の動作に関して説明する。
【0021】
画像入力部100にはカラーイメージスキャナやデジタルカメラ等の静止画像入力機器から、又は、画像データが蓄積されたメモリ等から、デジタルカラー画像データが入力される。
【0022】
この入力されたカラー画像は色空間変換部101において、RGBからL*、a*、b*又は、L、u、vといった輝度成分と色相成分を持つ色空間(CIE1976 L*a*b* 色空間、CIE 1976 L*u*v* 色空間)へと変換される(CIE:Suppl.No.2 to CIE Publ. No.15, Colorimetry (E−1・3・1)1971,(1976))。ここで、色空間変換後の色空間は上記のL*、a*、b*のような均等色空間が歪みが少なく、その後の処理の制度が高くなるが、YCbCrやYuvといった色空間を使用しても、若干の歪みは発生するが本実施形態に与える影響はほとんどないため問題ないといえる。
【0023】
また、色空間変換部101では、従来のモノクログレーデータ変換も同時に行う。この変換処理は、RGBのG成分をモノクログレーデータとする変換や、Lab空間等の輝度成分をモノクログレーデータとする変換や、(αR+βG+γB)÷(α+β+γ)の演算での変換など、一般的なモノクログレー変換が行われる。色空間変換後の対象画素データP及びモノクログレー変換後の対象画素データPは、両方ともに色判定変換部106へ出力される。
【0024】
色判定変換部106では、色判定及びモノクログレーデータへの変換が行われる。図2は色判定変換部106の処理を示すフローチャートである。
【0025】
以下、図1、図2を使用して説明する。色空間変換後の対象画素データPは色判定部102に入力され色の判定が行われる。ここでは、図2のステップS1〜S4、及びS6の処理が行われる。
【0026】
まず、ステップS1において、変換対象画素を中心として、水平方向に数画素分の平均値PAVEが計算される。これは、各画素毎に算出される。平均対象の画素数は、入力画像の解像度や、出力画像の画質設定などにより異なるが、600dpiの画像の場合は2〜5程度が使用可能なレベルだと思われる。この平均化により、隣接画素間の色の判定誤差を平均化しない場合に比べて小さくすることができる。また、この平均化は水平方向のみのため、ハードウエアで実現した場合、余分なメモリが必要とならない。
【0027】
次にステップS2において、ステップS1で算出した平均値PAVEと、色領域テーブル103(C_Table)内の各色領域との距離Lenが求められる。ここでiは色領域テーブル内の各色領域のインデックスとする。色領域テーブル103には、各色領域の中心となる空間座標(x,y,z)とその色領域の範囲を表す空間の半径rが用意されている。したがって距離Lenは平均化後の画素の色の空間座標(x,y,z)と色領域の中心座標(x,y,z)との距離として算出される。ここで距離は通常ユークリッド距離で求められるが、パスカル距離でも大きな問題はない。ハードウエアで実現する場合は、パスカル距離の方が簡単に実装可能である。この場合、色領域テーブル103の値が変わってくる。平均化後の画素の色の空間座標(x,y,z)と色領域の中心座標(x,y,z)との距離を、ユークリッド距離で求めると、{(x−x+(y−y+(z−z1/2となり、パスカル距離で求めると、(x−x)+(y−y)+(z−z)となる。
【0028】
ステップS3では各色領域毎に求めた距離Lenに対し、対象画素データPAVEがその色領域に含まれているか判定する。ここで判定用の閾値として、前記色領域テーブル103に設定された半径rをそれぞれ使用して判定を行う。これは、各色領域毎に領域の範囲が異なるため、各色領域に最適な閾値を用いるためである。このステップS3の判定において、Len≦rとなる色領域が1つでも存在する場合には、次にステップS4の処理へと進み、Len≦rとなる色領域が存在しない場合は、次にステップS6へと進む。
【0029】
ステップS4ではLen≦rとなったLenの中で最小の距離を求め、その色領域のインデックスを対象画素の色IDとし変換部105へ出力する。ステップS6では変換対象の色でないことを示す識別値が色IDとされ出力される。ここで、変換対象の色でないことを示す場合、色IDとして出力しなくてもよく、そのときは別途フラグとして変換部105へと通知する。
【0030】
変換部105では最終的なモノクログレーデータPへの変換が行われ、図2のステップS5、ステップS7の処理が行われる。
【0031】
色判定部102において対象画素データPAVEがある特定の色領域の色だと判定された場合、ステップS5では、その色IDに対応する濃度値を変換濃度値テーブル104(D_Table)から読み出し、この濃度値を対象画素のモノクログレーデータPとする処理が行われる。ここで、変換濃度値テーブル104には、対応する色領域の変換後の濃度値D、対応する色領域を濃度値Dに変換するかどうかを選択するフラグTFlagが用意されている。すなわち、TFlag=1の場合、変換後のモノクログレーデータPは、P=Dとなる、TFlag=0の場合、この色領域の濃度値の置き換えが行われず、色空間変換部101で変換されたモノクログレーデータPが用いられることになる。すなわち、P=Pとなる。これは、逆に濃度値変換をしない色領域を指定するといった場合に使用可能である。したがって、色領域毎に変換する/しないを切替えることが可能となる。
【0032】
色判定部102において特定の色領域のデータではない、つまり変換対象のデータではないと判定された場合、ステップS7では対象画素のモノクログレーデータPとして、色空間変換部101で変換されたモノクログレーデータPが用いられる。
【0033】
モノクログレーデータPに変換された対象画素は、2値化部107で2値化される。ここで、2値化方式としては、単純2値化やディザ、誤差拡散方式など一般的な方式が用いられる。
【0034】
図3に本実施形態の画像処理装置による処理結果及び、一般的なモノクロ2値変換の処理結果の例を示す。図3(a)に示す原画像に対して、一般的なモノクロ2値変換の処理結果を示す図3(b)は、黒文字と赤の背景の区別がつかなくなっており、また黄色の背景が消えてしまっている。それに対し、本実施形態の処理結果を示す図3(c)では、赤の濃度値として図3(b)より小さい濃度値を与えることにより、文字と背景が判別可能となる。また、黄色に対しては、ある程度の濃度値を与えることにより、黄色の背景が出力さるようになる。また水色領域に対しては何も変換を行わず、図3(b)と同じ濃度で出力されており、つまり、変換が必要がない領域はそのまま出力することができる。結果として図3(c)の画像は原画像の情報を色情報以外は損なうことなく、適切な濃度情報に置き換え、良好にモノクロ2値変換ができる。
【0035】
以上が上記画像処理装置の動作例であるが、色空間変換部101、色判定変換部106では、水平方向の移動平均算出以外は、隣接画素との相関がなく、各画素毎に処理が可能である。また、水平移動平均でも数画素レベルであるため、本実施形態による処理は特定のメモリを持たずラスターで処理が可能である。そのため高速に処理が行うことができる。さらに、数ラインのラインメモリの追加により、垂直方向の移動平均を行い、色判定の精度を向上させることも可能である。
【0036】
なお、色領域テーブル103のデータ数は、実装時の資源の容量や、最終的な画質のレベル設定により自由に構成できるが、概ね16色か24色、多くても32色程度で十分であると思われる。また、本実施形態では、ビジネス文書等の少ない色数で構成される文書に関して良好な結果を得ることができ、そのため、一般的なモノクロ2値変換と切替える構成を持つことにより、写真画像のような画像に対しては本実施形態の処理を行わないモノクロ2値変換を行うことで使い分けが可能となる。この場合、あらかじめ写真画像かビジネス画像かが既知であり、そのことを示すフラグ等を持っているときは、自動判別が可能であるが、写真画像かどうかを検出する処理を入れる場合は、メモリが必要となるためコストの増加となる。
【0037】
本実施形態の色判定は、ある対象サンプルがあるとき、各標準サンプルに対して距離を求め、対象サンプルを距離が最小となる標準サンプルのメンバーとみなすパターン認識技術を応用している。本実施形態では、各画素毎に色判定を行っているため、今まで領域判定で必要とされてきた、例えば、1ページ分のメモリが必要としない。その結果、ラスターで処理が可能となり、高速処理を行うことができる。
【0038】
また、色領域テーブルにおいて対象色を限定しているため、指定色のみを変換することができる。これは、カラー全色やページ内の全色に対して、意図的に濃度値を操作しても2値データではすべての判別がつくような表現はできないため、小さいテーブルを用いて、ある程度判別が必要とされるような色に対してのみ行うことで、本発明を構成する資源を小さくできる。例えば、グラフ等のオフィス文書の場合は、色数が少ないため、その基本となる色を判別できれば十分である。
【0039】
さらに、本来原稿が持っている輝度値には関係なく、指定した色を指定した濃度で表現できる。これは、モノクロ2値に変換した時点で色の持つ情報は、濃度の変化という情報に変換され、本来の輝度値で表す必要性がなくなるため、色指定と濃度指定の方法により、情報が損なわれずにモノクロ2値変換が可能である。また、極端に言えば、指定した色のみを出力したり、指定した色だけを消すこともでき、利用者の好みに応じて変換することが可能である。
【0040】
本実施形態では、デジタル画像処理装置を説明したが、デジタル画像処理としてソフトウエアで実現することも可能である。また、本実施形態は、カラースキャナを搭載したモノクロファクシミリ、モノクロコピー等にも応用することが可能である。
【0041】
図4は、図1に示した各部のように機能させ、図2に示したようなフローを実施させるためのプログラムを実行するコンピュータのブロック図を示す。
【0042】
スキャナ等から入力された画像情報はIO部120を介してDRAM等のメモリ123又はMO、ハードディスク等のディスク装置124等の記憶手段に記憶される。CPU126は前述した図1の各部として機能させ、図2のフローを記述したプログラム(ここではディスク装置124にプログラムが保存されている。)に基づいて、処理を行う。キーボード121はデータを入力する入力手段、CRT122は画像処理された画像を表示する表示手段となる。125はデータバス等のバスを示す。
【0043】
【発明の効果】
以上説明したように、本発明によれば、一般のモノクログレー変換では判別が困難となるような色を意図的にある濃度値に置き換える処理を高速で行うことができる。これにより、プレゼンテーションの文書やグラフといった比較的少ない色数ので表されるようなビジネス文書対して良好なモノクロ2値画像を得ることができる。
【図面の簡単な説明】
【図1】本発明の画像処理装置の一実施形態の構成を示すブロック図である。
【図2】色判定変換部106の処理を示すフローチャートである。
【図3】本実施形態の画像処理装置による処理結果及び、一般的なモノクロ2値変換の処理結果の例を示す図である。
【図4】図1に示した各部のように機能させ、図2に示したようなフローを実施させるためのプログラムを実行するコンピュータのブロック図である。
【符号の説明】
100 画像入力部
101 色空間変換部
102 色判定部
103 色領域テーブル
104 変換濃度値テーブル
105 変換部
106 色判定変換部
107 2値化部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus, an image processing method, and an image processing program, and particularly to an image processing apparatus, an image processing method, and an image processing program for converting a color image into a monochrome image.
[0002]
[Prior art]
2. Description of the Related Art In an image processing apparatus such as a copying machine, a printer, a scanner, and a facsimile, it is sometimes required to convert a color image read or received from a document into a monochrome image.
[0003]
Conventionally, when a color image is converted into a monochrome binary image using only the luminance component of each pixel, for example, if two colors having similar luminance values such as red and blue are adjacent to each other, the binary As a result of the conversion into an image, the difference between the two color regions becomes unclear and information is lost. Further, a color having a high luminance value such as yellow may be regarded as white at the time of conversion, and information may be lost after the conversion. Furthermore, even if a color component or the like is used in addition to the luminance component, there are a plurality of colors that are expressed with the same density after the conversion, so that the above-described region may become unclear. I will.
[0004]
FIG. 3 shows an example of monochrome binary conversion. FIG. 3A shows an original image. If the original image is binarized by monochrome graying using, for example, a luminance component, an image as shown in FIG. 3B is obtained. It is difficult to distinguish black characters in a red rectangle from surrounding red characters, and a phenomenon occurs in which data for a yellow rectangle disappears.
[0005]
Various solutions have been proposed for this problem. For example, Patent Document 1 discloses that a plurality of colors included in a color image are determined, a density after conversion is determined for each pixel included in the color image based on color information, and the color is the color of each pixel in a layer. There is a description of converting the components to the determined concentrations (FIG. 3 and the like).
[0006]
Further, in FIG. 1 of Patent Document 2 and the like, FIG. 1 of Patent Document 3 and the like, FIG. 1 of Patent Document 4 and the like of FIG. There is a description of an image processing apparatus that determines a color area and gives a gradation difference in order to prevent sticking.
[0007]
[Patent Document 1]
JP 2001-352454 A
[Patent Document 2]
JP 2002-10090
[Patent Document 3]
JP-A-62-088071
[Patent Document 4]
JP-A-10-155085
[Patent Document 5]
JP-A-11-339034
[0008]
[Problems to be solved by the invention]
However, the techniques described in the above patent documents require a certain memory in the area determination processing, are expensive, and require a certain amount of time for the processing.
[0009]
[Means for Solving the Problems]
The image processing device according to the present invention, for each pixel of the color image, a color determination unit that determines the color of the pixel,
A conversion density value table including density data corresponding to the color of the pixel,
Conversion means for converting each pixel into a monochrome image based on the density data in the conversion density value table.
[0010]
Further, the image processing apparatus of the present invention, means for converting a color image to a color space,
A color area table including, for each color, a space coordinate serving as a center of the color and a first distance of a space representing a range of the color area;
A second distance between the spatial coordinates of the image data after color space conversion and the spatial coordinates of the color area table is obtained for each color for each pixel, and a color area where the second distance is equal to or less than the first distance A color determination unit that determines a color in which the second distance is the minimum when the pixel is present as a pixel color;
A conversion density value table including density data after conversion of a color area corresponding to the color of the pixel,
Conversion means for converting each pixel into a monochrome image based on the density data in the conversion density value table.
[0011]
An image processing method of the present invention is an image processing method for converting a color image into a monochrome image, wherein for each pixel of the color image, the color of the pixel is determined, and the converted density value includes density data corresponding to the color of the pixel. It is characterized in that a monochrome image is converted for each pixel using a table.
[0012]
Further, the image processing method of the present invention, the step of converting a color image to a color space,
Using a color area table including, for each color, space coordinates that are the center of the color and a first distance of the space that represents the range of the color area, the spatial coordinates of the image data after color space conversion and the color area table A second distance from the space coordinates is obtained for each color for each pixel, and when there is a color region in which the second distance is equal to or less than the first distance, a color in which the second distance is minimum is determined. Determining the color of the pixel;
Converting a monochrome image for each pixel based on the density data using a converted density value table including density data after conversion of a color area corresponding to the color of the pixel.
[0013]
The image processing program according to the present invention comprises: a color determination unit that determines a color of a pixel for each pixel of a color image; and a pixel determination unit for each pixel based on density data of a conversion density value table including density data corresponding to the color of the pixel. This is for causing a computer to function as a conversion means for converting the image into a monochrome image.
[0014]
Further, the image processing program according to the present invention includes means for converting a color image into a color space,
A second distance between a color area table provided for each color and a space coordinate serving as a center of the color and a first distance of a space representing a range of the color area, and a space coordinate of the image data after the color space conversion. Color determination means for each color for each pixel, and when there is a color region in which the second distance is equal to or less than the first distance, a color determining unit that determines a color in which the second distance is the minimum as a pixel color. ,
This is for causing a computer to function as conversion means for converting each pixel into a monochrome image based on density data in a conversion density value table including density data after conversion of a color area corresponding to the color of the pixel.
[0015]
The present invention performs a simple area determination that does not require a memory for the conversion of a color image into a monochrome binary image, and arbitrarily determines a specific color based on the determination result irrespective of the luminance value that the original document originally has. Is assigned to a specific density (multi-valued), a binarization process is performed on the entire image, and a monochrome binary image that can be distinguished for each color is generated.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0017]
First, the configuration of an embodiment of the image processing apparatus of the present invention will be described with reference to FIG.
[0018]
Referring to FIG. 1, an image processing apparatus according to the present embodiment includes an image input unit 100 that captures an image, a color space conversion unit 101 that performs color space conversion of an input image, and performs color determination on the converted color space. The conversion unit 106 includes a color determination conversion unit 106 that converts the converted monochrome gray data into binary data according to the result, and a binarization unit 107 that binarizes the converted monochrome gray data.
[0019]
The color determination conversion unit 106 performs a color determination, a color region table 103 having data of each color region used as a standard sample for the color determination, and a specific monochrome gray data according to the color determination result. The conversion unit 105 converts and outputs the converted density values. The converted density value table 104 stores the converted density values for each color area.
[0020]
(Description of operation)
Next, the operation of the image processing apparatus will be described.
[0021]
Digital color image data is input to the image input unit 100 from a still image input device such as a color image scanner or a digital camera, or from a memory or the like in which image data is stored.
[0022]
The input color image is converted into a color space (CIE1976 L * a * b * color) having a luminance component and a hue component such as L *, a *, b * or L, u, v from RGB in a color space conversion unit 101. Space, CIE 1976 L * u * v * color space) (CIE: Suppl. No. 2 to CIE Publ. No. 15, Colorimetry (E-1.3.1) 1971, (1976)) . Here, as for the color space after the color space conversion, the uniform color space such as L *, a *, and b * described above has less distortion and the accuracy of subsequent processing is high, but a color space such as YCbCr or Yuv is used. Even though a slight distortion occurs, there is almost no effect on the present embodiment, so it can be said that there is no problem.
[0023]
The color space conversion unit 101 also performs conventional monochrome gray data conversion at the same time. This conversion processing includes general conversion such as conversion of RGB G components into monochrome gray data, conversion of luminance components such as Lab space into monochrome gray data, and conversion by calculation of (αR + βG + γB) ÷ (α + β + γ). Monochrome gray conversion is performed. Target pixel data P G after the target pixel data P and the monochrome gray conversion after the color space conversion is output to both the color judgment conversion unit 106.
[0024]
The color determination conversion unit 106 performs color determination and conversion into monochrome gray data. FIG. 2 is a flowchart showing the processing of the color determination conversion unit 106.
[0025]
Hereinafter, description will be made with reference to FIGS. The target pixel data P after the color space conversion is input to the color determination unit 102, and the color determination is performed. Here, the processes of steps S1 to S4 and S6 of FIG. 2 are performed.
[0026]
First, in step S1, an average value P AVE of several pixels is calculated in the horizontal direction around the pixel to be converted. This is calculated for each pixel. The number of pixels to be averaged varies depending on the resolution of the input image, the image quality setting of the output image, and the like. In the case of an image of 600 dpi, about 2 to 5 are considered to be usable levels. This averaging makes it possible to reduce the color determination error between adjacent pixels as compared to a case where averaging is not performed. In addition, since this averaging is performed only in the horizontal direction, no extra memory is required when implemented by hardware.
[0027]
In step S2, the average value P AVE calculated in step S1, the distance Len i of each color region of the color region table 103 in (C_Table) is obtained. Here, i is an index of each color area in the color area table. The color area table 103, the spatial coordinate for the center of each color region (x i, y i, z i) and the radius r i of the space representing the range of the color region are prepared. Therefore distance Len i is calculated as the distance between the spatial coordinates of the color of the pixel after averaging (x, y, z) and center coordinates of the color area (x i, y i, z i). Here, the distance is usually determined by the Euclidean distance, but there is no major problem with the Pascal distance. When implemented in hardware, Pascal distance can be easily implemented. In this case, the value of the color area table 103 changes. Color space coordinates of the pixel after averaging (x, y, z) and center coordinates of the color area (x i, y i, z i) the distance between, the determined Euclidean distance, {(x-x i ) 2 + (y−y i ) 2 + (z−z i ) 2 1 / 1/2 , and when it is calculated by the Pascal distance, (x−x i ) + (y−y i ) + (z−z i ) It becomes.
[0028]
To distance Len i determined in step S3 in each color area to determine whether the target pixel data P AVE is included in the color area. Here, as a threshold for determining makes the determination using the radius r i which is set in the color area table 103, respectively. This is because an optimal threshold value is used for each color region because the range of the region differs for each color region. In the determination of step S3, when the color region to be Len i ≦ r i exists even one, then proceeds to step S4, if the Len i ≦ r i become the color region is not present Then, the process proceeds to step S6.
[0029]
Determining the minimum distance in step S4 Len i r i and became Len i, and outputs it to the converter 105 and the color ID of the target pixel the index of the color area. In step S6, an identification value indicating that the color is not a conversion target color is output as a color ID. Here, when it is indicated that the color is not the color to be converted, it is not necessary to output the color ID, and in that case, the color is notified to the conversion unit 105 as a separate flag.
[0030]
The conversion of the conversion unit 105 to the final monochrome gray data P M in place, step S5 in FIG. 2, the process of step S7 is performed.
[0031]
When the color determination unit 102 determines that the target pixel data P AVE is a color of a specific color area, in step S5, a density value corresponding to the color ID is read from the conversion density value table 104 (D_Table). processing is performed to the monochrome gray data P M of the target pixel density values. Here, the conversion density value table 104, the density value D i after conversion corresponding color region corresponding flag tflag i to the color region selects whether to convert the density value D i are prepared. That is, in the case of tflag i = 1, monochrome gray data P M after conversion becomes P M = D i, if the tflag i = 0, is not performed replacing the density value of the color region, the color space conversion unit so that the converted monochrome gray data P G at 101, is used. In other words, the P M = P G. This can be used, for example, when specifying a color area for which density value conversion is not to be performed. Therefore, it is possible to switch between conversion and non-conversion for each color area.
[0032]
Not data of a specific color region in the color determination section 102, that is, when it is determined not to be data to be converted, as a monochrome gray data P M of the pixel of interest in step S7, the converted monochrome color space conversion unit 101 gray data P G is used.
[0033]
Target pixel is converted into monochrome gray data P M is binarized by binarization unit 107. Here, as the binarization method, a general method such as simple binarization, dither, and error diffusion method is used.
[0034]
FIG. 3 shows an example of a processing result by the image processing apparatus of the present embodiment and a processing result of general monochrome binary conversion. FIG. 3B, which shows the result of a general monochrome binary conversion process on the original image shown in FIG. 3A, is indistinguishable between a black character and a red background. It has disappeared. On the other hand, in FIG. 3C showing the processing result of the present embodiment, by giving a density value smaller than that of FIG. 3B as the red density value, the character and the background can be distinguished. By giving a certain density value to yellow, a yellow background is output. No conversion is performed on the light blue region, and the image is output at the same density as that in FIG. 3B. That is, an area that does not require conversion can be output as it is. As a result, in the image of FIG. 3C, the monochrome image can be satisfactorily converted by replacing the original image information with appropriate density information without losing the information other than the color information.
[0035]
The above is an example of the operation of the image processing apparatus. The color space conversion unit 101 and the color determination conversion unit 106 have no correlation with adjacent pixels except for the calculation of the moving average in the horizontal direction, and can perform processing for each pixel. It is. Also, since the horizontal moving average is at a level of several pixels, the processing according to the present embodiment can be performed in a raster without a specific memory. Therefore, processing can be performed at high speed. Furthermore, by adding a line memory of several lines, it is possible to perform moving average in the vertical direction and improve the accuracy of color determination.
[0036]
The number of data in the color area table 103 can be freely configured by the resource capacity at the time of mounting and the final image quality level setting. However, about 16 or 24 colors, and at most about 32 colors are sufficient. I think that the. Further, in the present embodiment, a good result can be obtained for a document composed of a small number of colors, such as a business document, and therefore, by switching to a general monochrome binary conversion, a configuration similar to a photographic image can be obtained. By performing monochrome binary conversion without performing the processing according to the present embodiment, a suitable image can be used properly. In this case, if a photograph image or a business image is known in advance, and if a flag or the like indicating that is known, automatic discrimination is possible. Is required, which increases the cost.
[0037]
In the color determination of the present embodiment, when there is a certain target sample, a distance is calculated for each standard sample, and a pattern recognition technique that regards the target sample as a member of the standard sample having the minimum distance is applied. In the present embodiment, since the color judgment is performed for each pixel, the memory required for the area judgment, for example, one page of memory is not required until now. As a result, processing can be performed in raster, and high-speed processing can be performed.
[0038]
Further, since the target color is limited in the color area table, only the designated color can be converted. This is because it is not possible to express all the colors or all the colors in the page even if the density value is intentionally manipulated, so that the binary data cannot be used to make all the determinations. Is performed only for the color for which the color is required, the resources constituting the present invention can be reduced. For example, in the case of an office document such as a graph, since the number of colors is small, it is sufficient to be able to determine the basic color.
[0039]
Furthermore, a specified color can be represented by a specified density regardless of the luminance value that the original originally has. This is because the information of the color at the time of conversion into the monochrome binary is converted into information of the change in density, and there is no need to represent the change with the original luminance value. Therefore, the information is damaged by the method of specifying the color and the density. Without this, monochrome binary conversion is possible. In an extreme case, it is possible to output only the designated color or to erase only the designated color, and it is possible to perform conversion according to the user's preference.
[0040]
In the present embodiment, the digital image processing apparatus has been described, but the digital image processing can be realized by software. Further, the present embodiment can be applied to a monochrome facsimile equipped with a color scanner, a monochrome copy, and the like.
[0041]
FIG. 4 is a block diagram of a computer that functions as the respective units illustrated in FIG. 1 and executes a program for executing the flow illustrated in FIG. 2.
[0042]
Image information input from a scanner or the like is stored in a memory 123 such as a DRAM or a storage unit such as a disk device 124 such as an MO or a hard disk via the IO unit 120. The CPU 126 functions as each unit in FIG. 1 described above, and performs processing based on a program (here, the program is stored in the disk device 124) describing the flow in FIG. The keyboard 121 serves as an input unit for inputting data, and the CRT 122 serves as a display unit for displaying an image processed. Reference numeral 125 denotes a bus such as a data bus.
[0043]
【The invention's effect】
As described above, according to the present invention, it is possible to perform a process of intentionally replacing a color that is difficult to determine in general monochrome gray conversion with a certain density value. As a result, a good monochrome binary image can be obtained for business documents represented by a relatively small number of colors, such as presentation documents and graphs.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an embodiment of an image processing apparatus according to the present invention.
FIG. 2 is a flowchart illustrating processing of a color determination conversion unit 106.
FIG. 3 is a diagram illustrating an example of a processing result by the image processing apparatus according to the embodiment and a processing result of general monochrome binary conversion.
4 is a block diagram of a computer that functions as each unit shown in FIG. 1 and executes a program for executing a flow as shown in FIG. 2;
[Explanation of symbols]
Reference Signs List 100 Image input unit 101 Color space conversion unit 102 Color judgment unit 103 Color area table 104 Conversion density value table 105 Conversion unit 106 Color judgment conversion unit 107 Binarization unit

Claims (8)

カラー画像の各画素について、画素の色を判定する色判定手段と、
前記画素の色に対応する濃度データを備えた変換濃度値テーブルと、
前記変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段と、を備えた画像処理装置。
For each pixel of the color image, color determination means for determining the color of the pixel,
A conversion density value table including density data corresponding to the color of the pixel,
A conversion unit for converting each pixel into a monochrome image based on the density data of the conversion density value table.
カラー画像を色空間へ変換する手段と、
色の中心となる空間座標と色領域の範囲を表す空間の第1の距離とを色ごとに備えた色領域テーブルと、
色空間変換後の画像データの空間座標と前記色領域テーブルの空間座標との間の第2の距離を画素ごとに各色について求め、前記第2の距離が前記第1の距離以下となる色領域が存在する場合に前記第2の距離が最小となる色を画素の色と判定する色判定手段と、
前記画素の色に対応する色領域の変換後の濃度データを備えた変換濃度値テーブルと、
前記変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段と、を備えた画像処理装置。
Means for converting a color image to a color space;
A color area table including, for each color, a space coordinate serving as a center of the color and a first distance of a space representing a range of the color area;
A second distance between the spatial coordinates of the image data after color space conversion and the spatial coordinates of the color area table is obtained for each color for each pixel, and a color area where the second distance is equal to or less than the first distance A color determination unit that determines a color in which the second distance is the minimum when the pixel is present as a pixel color;
A conversion density value table including density data after conversion of a color area corresponding to the color of the pixel,
A conversion unit for converting each pixel into a monochrome image based on the density data of the conversion density value table.
請求項2記載の画像処理装置において、色空間変換後の画像データは複数画素の平均値である画像処理装置。3. The image processing apparatus according to claim 2, wherein the image data after color space conversion is an average value of a plurality of pixels. 請求項2記載の画像処理装置において、前記変換濃度値テーブルは色領域の濃度変換の有無を示すデータを含んでいる画像処理装置。3. The image processing apparatus according to claim 2, wherein the converted density value table includes data indicating whether or not density conversion of a color area has been performed. カラー画像をモノクロ画像に変換する画像処理方法において、カラー画像の各画素について、画素の色を判定し、前記画素の色に対応する濃度データを備えた変換濃度値テーブルを用いて、画素ごとにモノクロ画像に変換することを特徴とする画像処理方法。In an image processing method for converting a color image into a monochrome image, for each pixel of the color image, the color of the pixel is determined, and a converted density value table including density data corresponding to the color of the pixel is used. An image processing method for converting a monochrome image. カラー画像を色空間へ変換するステップと、
色の中心となる空間座標と色領域の範囲を表す空間の第1の距離とを色ごとに備えた色領域テーブルを用いて、色空間変換後の画像データの空間座標と前記色領域テーブルの空間座標との間の第2の距離を画素ごとに各色について求め、前記第2の距離が前記第1の距離以下となる色領域が存在する場合に前記第2の距離が最小となる色を画素の色と判定するステップと、
前記画素の色に対応する色領域の変換後の濃度データを備えた変換濃度値テーブルを用いて、該濃度データに基づいて画素ごとにモノクロ画像に変換するステップと、を備えた画像処理方法。
Converting a color image to a color space;
Using a color area table including, for each color, space coordinates that are the center of the color and a first distance of the space that represents the range of the color area, the spatial coordinates of the image data after color space conversion and the color area table A second distance from the space coordinates is obtained for each color for each pixel, and when there is a color region in which the second distance is equal to or less than the first distance, a color in which the second distance is minimum is determined. Determining the color of the pixel;
Converting a monochrome image for each pixel based on the density data using a converted density value table including density data after conversion of a color region corresponding to the color of the pixel.
カラー画像の各画素について、画素の色を判定する色判定手段と、前記画素の色に対応する濃度データを備えた変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段として、コンピュータを機能させるための画像処理プログラム。Color determination means for determining the color of each pixel of a color image; and conversion means for converting each pixel into a monochrome image based on density data in a conversion density value table having density data corresponding to the color of the pixel. As an image processing program for causing a computer to function. カラー画像を色空間へ変換する手段と、
色の中心となる空間座標と色領域の範囲を表す空間の第1の距離とを色ごとに備えた色領域テーブルと、色空間変換後の画像データの空間座標との間の第2の距離を画素ごとに各色について求め、前記第2の距離が前記第1の距離以下となる色領域が存在する場合に前記第2の距離が最小となる色を画素の色と判定する色判定手段と、
前記画素の色に対応する色領域の変換後の濃度データを備えた変換濃度値テーブルの濃度データに基づいて画素ごとにモノクロ画像に変換する変換手段として、コンピュータを、機能させるための画像処理プログラム。
Means for converting a color image to a color space;
A second distance between a color area table provided for each color and a space coordinate serving as a center of the color and a first distance of a space representing a range of the color area, and a space coordinate of the image data after the color space conversion. Color determination means for each color for each pixel, and when there is a color region in which the second distance is equal to or less than the first distance, a color determining unit that determines a color in which the second distance is the minimum as a pixel color. ,
An image processing program for causing a computer to function as a conversion unit that converts a pixel into a monochrome image based on density data of a conversion density value table including density data after conversion of a color region corresponding to the color of the pixel; .
JP2003024273A 2003-01-31 2003-01-31 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP3838981B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003024273A JP3838981B2 (en) 2003-01-31 2003-01-31 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003024273A JP3838981B2 (en) 2003-01-31 2003-01-31 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2004236157A true JP2004236157A (en) 2004-08-19
JP3838981B2 JP3838981B2 (en) 2006-10-25

Family

ID=32952845

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003024273A Expired - Fee Related JP3838981B2 (en) 2003-01-31 2003-01-31 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP3838981B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008258677A (en) * 2007-03-30 2008-10-23 Brother Ind Ltd Image processing program and image processing apparatus
KR101024783B1 (en) 2008-12-30 2011-03-24 포항공과대학교 산학협력단 Recording medium recording method of color conversion of image and color conversion method of image
KR101074184B1 (en) 2009-12-29 2011-10-14 포항공과대학교 산학협력단 Method for transforming color images to grayscale and recorded medium having program performing the same
JP2017038242A (en) * 2015-08-11 2017-02-16 キヤノン株式会社 Printer
CN113836705A (en) * 2021-09-06 2021-12-24 网易(杭州)网络有限公司 Method, device, storage medium and electronic device for processing illumination data

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008258677A (en) * 2007-03-30 2008-10-23 Brother Ind Ltd Image processing program and image processing apparatus
US8717629B2 (en) 2007-03-30 2014-05-06 Brother Kogyo Kabushiki Kaisha Image-processing device
KR101024783B1 (en) 2008-12-30 2011-03-24 포항공과대학교 산학협력단 Recording medium recording method of color conversion of image and color conversion method of image
KR101074184B1 (en) 2009-12-29 2011-10-14 포항공과대학교 산학협력단 Method for transforming color images to grayscale and recorded medium having program performing the same
JP2017038242A (en) * 2015-08-11 2017-02-16 キヤノン株式会社 Printer
CN113836705A (en) * 2021-09-06 2021-12-24 网易(杭州)网络有限公司 Method, device, storage medium and electronic device for processing illumination data

Also Published As

Publication number Publication date
JP3838981B2 (en) 2006-10-25

Similar Documents

Publication Publication Date Title
US7227990B2 (en) Color image processing device and color image processing method
US7667711B2 (en) Image processing system, a method thereof, and a recording medium thereof
JP2008005317A (en) Image processing apparatus and method, and computer program and recording medium
JPH02253765A (en) Image processing device
JPH09186877A (en) Image processing device
US6125200A (en) Removing non-text information from a color image
JPH1166301A (en) Color image classification method and apparatus and recording medium recording this method
JP4442651B2 (en) Image processing apparatus and program
JP5151708B2 (en) Image processing apparatus and image processing program
JP3838981B2 (en) Image processing apparatus, image processing method, and image processing program
US6661921B2 (en) Image process apparatus, image process method and storage medium
US8363263B2 (en) Image processing apparatus and image processing method
JP4438834B2 (en) Image color determination apparatus, image color determination method, and program
JP2008092541A (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
US7805000B2 (en) Image processing for binarization of image data
JPS6359272A (en) Picture processor
JPH05244413A (en) Picture processor
JP6293466B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2001352453A (en) Image playback device
JP3227152B2 (en) Color image processing apparatus and color image processing method
JP5122507B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP4653215B2 (en) Code recognition method and apparatus, electronic apparatus, program, and storage medium
JP4165599B2 (en) Image processing device
JP2005303584A (en) Image processing apparatus and image processing method
JPH10215382A (en) Color image processing equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040507

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040521

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060127

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060328

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060508

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060602

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060602

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20060602

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20060710

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: 20060725

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060801

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090811

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100811

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110811

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110811

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120811

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130811

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载