JP2004120382A - Apparatus, method and program for subtractive color processing - Google Patents
Apparatus, method and program for subtractive color processing Download PDFInfo
- Publication number
- JP2004120382A JP2004120382A JP2002281281A JP2002281281A JP2004120382A JP 2004120382 A JP2004120382 A JP 2004120382A JP 2002281281 A JP2002281281 A JP 2002281281A JP 2002281281 A JP2002281281 A JP 2002281281A JP 2004120382 A JP2004120382 A JP 2004120382A
- Authority
- JP
- Japan
- Prior art keywords
- color
- face
- image
- palette
- reduction processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Color Image Communication Systems (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、減色処理対象画像の各画素の色を所定のカラーパレットに含まれる色に置き換えることにより、元画像よりも色数の少ない画像に変換する減色処理装置、減色処理方法及び減色処理プログラムに関する。
【0002】
【従来の技術】
近年、デジタルカメラ等で撮影したデジタルデータの画像を携帯電話機やパーソナルコンピュータなどを使用して画像配信サーバに転送したり、画像配信業者が配信用の各種画像データを用意した画像配信サーバを運用し、これらの画像配信サーバに蓄積された画像を携帯電話機や携帯情報端末(PDA)などの携帯端末に配信する画像配信システムが実用化されている。
【0003】
この種の画像配信システムでは、携帯端末のメモリ容量や表示能力に強い制約があり、しかも携帯端末の種類によってメモリ容量や表示能力が異なるため、画像配信サーバから携帯端末に画像を配信する際には、配信先携帯端末のメモリ容量や表示能力に応じて、画像の画像数及び色数を削減してデータ量を削減する処理が行われる。例えば、画素数を130×130画素、90×90画素といった所定の画素数に削減する画像縮小処理(間引処理)を行った後、さらに画像に含まれる色数を256色、128色、16色といった所定の色数に削減する減色処理を行うようにしている。
【0004】
従来この種の減色処理方法として、固定型限定色表示法(固定パレット減色法)と適応型限定色表示法(自由パレット減色法)とが知られている。
【0005】
固定型限定色表示法は、表示装置で再現可能な色から均等に選ばれた所定数の代表色からなる1つのカラーパレットを使用し、減色処理対象画像の各画素の色をそのカラーパレットに含まれる最も近い色に置き換える減色処理方法である。この方法は、カラーパレットを減色処理対象画像ごとに作成する必要がないため、高速に減色処理を行うことができるが、顔の画像や紅葉の画像などのように画像中の色に偏りがある場合、カラーパレットに含まれる色のうち一部の色しか使用されず、残りの色は全く使われないという無駄が生じる場合がある。たとえば、256色の代表色からなるカラーパレットを使用しているにもかかわらず、50色しか使われないといったことが生じる。このような場合、減色処理後のカラー画像表現は低品質なものとなる。
【0006】
適応型限定色表示法は、減色処理対象画像の色情報に基づいて、その減色処理対象画像を表現するのに適した所定数の代表色からなるカラーパレットを作成し、減色処理対象画像の各画素の色をそのカラーパレットに含まれる最も近い色に置き換える減色処理方法である。この方法は、カラーパレットを減色処理対象画像ごとに作成する必要があるため、固定型限定色表示法と比較して処理速度は遅いが、減色処理対象画像ごとに適したカラーパレットを使用するため、高品質なカラー画像表現が可能である。なお、適応型限定色表示法を利用した技術としては、減色処理する際に、減色処理対象画像を構成する各画素の色に関する統計情報に基づいてカラーパレットを作成するものがある(特許文献1参照。)。
【0007】
【特許文献1】
特開2001−309190号公報
【0008】
【発明が解決しようとする課題】
上述した適応型限定色表示法では、ヒストグラムなどを用いた統計的処理によって減色処理対象画像における各色の出現頻度を求め、減色処理対象画像ごとに出現頻度のより高い色を優先して所定数の代表色を選ぶことによってカラーパレットを作成している。
【0009】
このため、たとえば紅葉や緑の野山などを背景にして人物が小さく写っているような画像の場合、人物の顔が特に主要な被写体であるにもかかわらず、人物の顔に含まれる色よりも背景に含まれる色の出現頻度が圧倒的に高くなるため、人物の顔に含まれる色よりも背景に含まれる色を多く含むカラーパレットが作成されることになる。このカラーパレットを使用して減色処理を行った場合、背景部分の画像に関しては多数の色でなめらかに表現されるため画像品質の劣化の度合いは小さいが、肝心の人物の顔に関しては背景の色味がかった少数の色で表現されるため、画像品質の劣化の度合いが大きくなる。特に、大きな減色処理を行う場合は人物の顔の肌色などの重要な色がカラーパレットから削除されてしまい、元画像に対して色が大きく変化してしまうおそれがある。たとえば紅葉を背景にして人物が小さく写っているような画像の場合、減色処理を行った結果、人物の顔色が赤みがかった色になってしまう。
【0010】
本発明は、上記事情に鑑みてなされたもので、その目的は、減色処理を行う際に減色処理対象画像における重要色である人物の顔の色がカラーパレットから削除されてしまうことを防止でき、画像品質の劣化を極力抑えて減色処理することが可能な減色処理装置、減色処理方法及び減色処理プログラムを提供することにある。
【0011】
【課題を解決するための手段】
上記目的を達成するために、本発明に係る減色処理装置は、所定数の代表色を有するカラーパレットを作成するカラーパレット作成手段と、前記カラーパレットを用いて減色処理対象画像の各画素の色を前記カラーパレットに含まれる色のいずれかに置き換える色置換処理手段と、前記減色処理対象画像から被写体の顔画像領域を抽出し、前記顔画像領域内に含まれる色に関する顔色情報を生成する顔色情報生成手段と、を備え、前記カラーパレット作成手段は、前記顔色情報に基づいて決定された代表色を含むカラーパレットを作成することを特徴とする。
【0012】
上記のように構成した本発明の減色処理装置では、まず、減色処理対象画像から人物の顔画像領域を抽出し、顔画像領域内に含まれる色に関する顔色情報を生成する。次に、当該顔色情報に基づいて決定された代表色を含む所定数の代表色からなるカラーパレットが作成され、減色処理対象画像の各画素の色を当該作成されたカラーパレットに含まれる色に置き換える色置換処理が行われる。したがって、減色処理を実施するに際し、顔色情報に基づいてカラーパレットの代表色を決定するため、減色処理対象画像の重要色である人物の顔色が、カラーパレットから安易に削除されてしまうのを防止し、減色により人物の顔色が大きく変化してしまうことを回避でき、画像品質の劣化を極力抑えた減色処理を行うことが可能となる。
【0013】
また、本発明に係る減色処理装置は、前記顔色情報生成手段は、前記顔画像領域内に含まれる色の平均値を算出する顔色平均値算出手段と、前記顔色平均値近傍の各色に対してそれぞれ重み係数を設定する重み付け処理手段と、を有し、前記カラーパレット作成手段は、前記減色処理対象画像の色情報に対し前記重み付け処理手段によって設定された重み係数を用いて統計的処理を施した結果に基づいて決定された代表色を含むカラーパレットを作成することを特徴とする。
【0014】
上記のように構成した本発明の減色処理装置では、まず、減色処理対象画像から人物の顔画像領域を抽出すると共に顔色平均値を算出し、当該顔色平均値近傍の各色に重み係数を設定する。次に、減色処理対象画像の色情報に対し重み付け処理手段によって設定された重み係数を用いて統計的処理を施した結果に基づいて決定された代表色を含むカラーパレットを作成する。したがって、減色処理を実施するに際し、顔色平均値近傍の色に重み係数を設定しておくことにより、減色処理対象画像の重要色である人物の顔色が、出現頻度に基づいてカラーパレットから安易に削除されてしまうのを防止し、減色により人物の顔色が大きく変化してしまうことを回避でき、画像品質の劣化を極力抑えた減色処理を行うことが可能となる。
【0015】
また、本発明に係る減色処理装置は、前記重み付け処理手段は、前記減色処理対象画像全体に対する前記顔画像領域の占める割合に応じて、前記顔色平均値近傍の各色に対してそれぞれ重み係数を設定することを特徴とする。したがって、顔画像領域の占める面積が小さい場合は、顔色以外の色がカラーパレットの代表色に設定されやすくなる。
【0016】
また、本発明に係る減色処理装置は、前記重み付け処理手段は、前記顔色平均値からの距離に応じて、前記顔色平均値近傍の各色に対してそれぞれ重み係数を設定することを特徴とする。したがって、顔色平均値に近い色に対して設定される重み係数が高くなるため、顔色平均値により近い色がカラーパレットの代表色に設定されやすくなる。
【0017】
また、本発明に係る減色処理方法は、減色処理対象画像から被写体の顔画像領域を抽出し、当該顔画像領域内に含まれる色に関する顔色情報を生成する顔色情報生成ステップと、前記顔色情報に基づいて決定された代表色を含むカラーパレットを作成するカラーパレット作成ステップと、前記カラーパレット作成ステップで作成されたカラーパレットを用いて、前記減色処理対象画像の各画素の色を前記カラーパレットに含まれる色のいずれかに置き換える色置換処理ステップと、を具備することを特徴とする。
【0018】
したがって、減色処理を実施するに際し、顔色情報に基づいてカラーパレットの代表色を決定するため、減色処理対象画像の重要色である人物の顔色が、カラーパレットから安易に削除されてしまうのを防止し、減色により人物の顔色が大きく変化してしまうことを回避でき、画像品質の劣化を極力抑えた減色処理を行うことが可能となる。
【0019】
また、本発明に係る減色処理方法は、前記顔色情報生成ステップは、前記顔画像領域内に含まれる色の平均値を算出する顔色平均値算出ステップと、前記顔色平均値近傍の各色に対してそれぞれ重み係数を設定する重み付け処理ステップと、を含み、前記カラーパレット作成ステップは、前記減色処理対象画像の色情報に対し前記重み付け処理ステップで設定された重み係数を用いて統計的処理を施すことによって、前記減色処理対象画像における各色の出現頻度を求める出現頻度算出ステップと、前記出現頻度算出ステップで求めた結果に基づいて、出現頻度のより高い色をカラーパレットの代表色に選定する代表色選定ステップと、を含むことを特徴とする。
【0020】
したがって、減色処理を実施するに際し、顔色平均値近傍の色に重み係数を設定しておくことにより、減色処理対象画像の重要色である人物の顔色が、出現頻度に基づいてカラーパレットから安易に削除されてしまうのを防止し、減色により人物の顔色が大きく変化してしまうことを回避でき、画像品質の劣化を極力抑えた減色処理を行うことが可能となる。
【0021】
さらに、本発明に係る減色処理プログラムは、請求項1ないし4のいずれかに記載の減色処理装置における各手段による機能をコンピュータにより実現するためのものである。
【0022】
したがって、減色処理を実施するに際し、顔色情報に基づいてカラーパレットの代表色を決定するため、減色処理対象画像の重要色である人物の顔色が、カラーパレットから安易に削除されてしまうのを防止し、減色により人物の顔色が大きく変化してしまうことを回避でき、画像品質の劣化を極力抑えた減色処理をコンピュータにより実現することが可能となる。
【0023】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態を説明する。なお、本実施の形態の説明では、本発明に係る減色処理装置及び減色処理方法について詳述するが、本発明に係る減色処理プログラムについては、減色処理装置に含まれる各手段の機能を実現するためのプログラムであることから、当該プログラムに関する説明は以下の説明に含まれる。
図1は本発明の実施の形態に係る減色処理装置を用いた画像配信システムの構成例を示すブロック図である。
【0024】
この実施の形態の画像配信システム1は、パーソナルコンピュータ(配信元端末装置、以下、PCと記す)10と、携帯端末としての携帯電話機(配信先端末装置)20と、画像配信サーバ(画像変換配信装置)30とをインターネットなどの通信ネットワークを介して相互接続してなり、デジタルカメラ2で撮影した画像などのデジタルデータの画像をPC10を使用して画像配信サーバ30に転送し、画像配信サーバ30に蓄積された画像を携帯電話機20に配信するように構成されている。
【0025】
PC10には、携帯電話機20に配信する画像を画像配信サーバ30に転送するためのアプリケーションプログラム(以下、画像配信アプリと記す)がインストールされている。画像配信業者などのPC10のユーザは、画像配信アプリを使用することにより、デジタルカメラ2からPC10に取り込んだ画像や画像処理用ソフトウエアを使用して作成した画像など、多数の画像の中から配信希望する画像を選択する。PC10は、画像配信アプリを使用して配信する画像が選択され、転送指示がなされると、選択された画像を画像配信サーバ30に転送する。
【0026】
携帯電話機20は、図示しない基地局を介して他の携帯電話機やインターネット上のサーバなどと交信するための通信部21と、文字や画像などを表示する表示部22と、ダイヤルボタンなど各種操作子を含む操作部23と、この携帯電話機20の通信速度や表示部22の表示能力(画素数、表現可能な色数)などの情報を記憶した端末情報記憶部24とを備えて構成されている。携帯電話機20は、他の携帯電話機やインターネット上のサーバなどと交信する際、端末情報記憶部24から端末情報を読み出し交信先に通知する。
【0027】
画像配信サーバ30は、PC10から受け取った画像(元画像)を記憶する配信前画像記憶部31と、配信前画像記憶部31から読み出した画像に対し、顔抽出処理を施し顔色平均値を算出した後、顔画像に含まれる色に重み付けする顔色情報処理部35と、携帯電話機20から受け取った端末情報を記憶する端末情報記憶部32と、配信前画像記憶部31から読み出した画像に対し、端末情報記憶部32から読み出した端末情報に基づいて画素数削減処理及び減色処理を施した後、圧縮処理を施して配信用画像を生成する配信画像生成部33と、配信画像生成部33にて生成された配信用画像を携帯電話機20に転送する転送部34とを備えている。
【0028】
次に、図2を参照して顔色情報処理部35について説明する。図2は、本実施の形態における顔色情報処理部の構成例を示すブロック図である。
顔色情報処理部35は、同図に示すように、配信前画像記憶部31から読み出した画像から人物の顔画像領域を抽出する顔抽出処理部(顔抽出手段)61と、顔抽出処理部61によって抽出された顔画像領域の顔色平均値を算出する顔色平均値算出処理部(顔色平均値算出手段)62と、顔色平均値算出処理部62の算出結果を基に各色に重み係数を設定する重み付け処理部(重み付け処理手段)63とを備えて構成される。前記顔色平均値算出処理部62と重み付け処理部63とにより、顔色情報を生成する顔色情報生成手段が構成される。
【0029】
顔抽出処理部61は、配信前画像記憶部31から読み出した画像から人物の顔画像領域を抽出する。顔画像領域の抽出方法としては、例えば本出願人による特開平9−101579号公報「顔領域抽出方法及び複写条件決定方法」において開示された技術を適用することができる。この技術は、撮影した画像の各画素の色相が肌色の範囲に含まれるか否かを判定して肌色領域と非肌色領域とに分割すると共に、画像中のエッジを検出して画像中の各個所をエッジ部分又は非エッジ部分に分類する。そして、肌色領域内に位置し非エッジ部分に分類された画素からなり、かつエッジ部分と判定された画素で囲まれた領域を顔候補領域として抽出し、抽出した顔候補領域が人物の顔に相当する領域かを判定し、この判定結果に基づき顔画像領域として抽出するものである。
【0030】
顔色平均値算出処理部62は、顔抽出処理部61によって抽出された顔画像領域内に含まれる色をRGBやLab等の色空間に表現した際の平均値(以下、顔色平均値と記す)を算出する。なお、顔色平均値を算出するために用いる色空間としては、RGBを用いると処理が簡単であるが、演算精度を高めるにはLabを用いるのが好ましい。
【0031】
重み付け処理部63は、顔色平均値近傍の色、すなわち色空間における顔色平均値との距離が近い色にそれぞれ重み係数を設定する。例えば、ある色の重み係数を3と設定することによって、その色の見掛けの出現頻度を実際の出現頻度の3倍と数える。このため、実際の出現頻度の低い色であっても、重み係数を大きくすることによって見掛けの出現頻度を高くすることができ、出現頻度の低い顔色が統計的処理によって安易にカラーパレットから削除されてしまうのを防ぐことができる。なお、重み付け処理部63は、顔色平均値算出処理部62で算出された顔色平均値により近い色、すなわち色空間における顔色平均値との距離がより近い色ほど重み係数を大きくする。また、重み付け処理部63は、画像領域全体に対する顔画像領域の面積比が小さいほど重み係数を小さくし、面積比が大きいほど重み係数を大きくする。この結果、顔画像領域の占める面積が小さい場合は、顔色以外の色がカラーパレットの代表色に設定されやすくなる。さらに、重み付け処理部63は、顔色平均値近傍の色及び当該色にそれぞれ設定した重み係数の情報である重み付け情報を顔色情報として減色処理部42内の顔色情報記憶部51に通知する。
【0032】
次に、図3を参照して配信画像生成部33について説明する。図3は、本実施の形態における配信画像生成部の構成例を示すブロック図である。
配信画像生成部33は、同図に示すように、画素数を削減する画素数削減処理部41と、減色を行う減色処理部42と、可逆または不可逆のデータ圧縮を行う圧縮処理部43と、出力する画像のデータ容量が所定値以下であるかを判定するデータ容量判定部44とを備えて構成される。
【0033】
画素数削減処理部41は、配信前画像記憶部31から読み出した画像(元画像)の画素数を130×130画素、90×90画素といった所定の画素数に削減する画像縮小処理(間引き処理)を行う。その際、端末情報記憶部33から読み出した端末情報に含まれる画素数に応じて、削減後の画素数(目標値)が決定される。
【0034】
減色処理部42は、画素数削減処理部41で処理した後の画像の各画素の色を画像ごとに作成したカラーパレットに含まれる色の中で最も近い色に置き換えることにより、画像に含まれる色数を256色、128色、16色といった所定の色数に削減する減色処理を行う。
【0035】
圧縮処理部43は、減色処理部42で処理した後の画像(減色画像)に対し、GIF、PNGなどの公知の圧縮方式を用いて圧縮処理を施す。データ容量判定部44は、データ圧縮後の画像のデータ容量が配信先までの通信経路や配信先の携帯端末において処理可能で、伝送及び表示ができるデータ容量以下であるかを判定する。ここで圧縮処理された後の画像はデータ容量判定部44でデータ容量が判定された後、転送部34を介して携帯電話機20に転送される。
【0036】
転送可能なデータ容量は携帯電話機の種類や通信キャリア会社によって異なるため、データ容量超過によって転送不能または受信拒否となるおそれがある。データ容量判定部44においてデータ容量超過であると判定された場合、画像データは再び減色処理部42において更なる減色処理が行われ、圧縮処理部43で再圧縮する処理がなされる。
【0037】
減色処理部42は、図4に示すように、顔色の重み付け情報を記憶する顔色情報記憶部51と、カラーパレットの作成処理を行うカラーパレット作成部(カラーパレット作成手段)52と、カラーパレットにより元画像における各画素の色の置換を行う色置換処理部(色置換処理手段)53とを備えて構成される。
【0038】
顔色情報記憶部51には、顔色情報処理部35内の重み付け処理部63から通知された顔色の重み付け情報が記憶される。カラーパレット作成部52は、画素数削減処理部41から与えられた減色処理対象画像の色情報に対し顔色情報記憶部51から読み出した顔色の重み付け情報を用いて統計的処理を施した結果に基づいて決定された代表色を含むカラーパレットを作成する。
【0039】
色置換処理部53は、画素数削減処理部41から与えられた減色処理対象画像の各画素の色を、カラーパレット作成部52にて作成されたカラーパレットに含まれる最も近い色に置き換えることにより、減色処理対象画像をカラーパレットに含まれる色からなる減色画像に変換する。この減色画像が圧縮処理部43で圧縮された後、携帯電話機20に転送される。
【0040】
図5はカラーパレット作成部52の動作手順を示している。カラーパレット作成部52は、まず、画素数削減処理部41から与えられた減色処理対象画像を構成している各画素の色を調べる(ステップS1)。つぎに、顔色情報記憶部51から顔色の重み付け情報を読み出す(ステップS3)。そして、ステップS1で調べた各画素の色情報に対しステップS3で読み出した重み付け情報を用いてヒストグラムによる統計的処理を施し、減色処理対象画像における各色の出現頻度を求める(ステップS5)。この場合、顔色に重み付けを行った出現頻度となる。代表色には出現頻度のより高い色、すなわち顔色平均値近傍の色を優先して選定する(ステップS7)。このようにして、重要色である顔色を優先的に含む代表色からなるカラーパレット(自由パレット)が作成される(ステップS9)。
【0041】
上記のように、カラーパレット作成部52にて、減色処理対象画像の色情報に対し顔色の重み付け情報を用いて統計的処理を施した結果に基づいて、顔色を優先的に含む所定数の代表色からなるカラーパレットを作成することにより、減色処理対象画像の重要色である顔色が出現頻度に基づいてカラーパレットから安易に削除されてしまうのを防止できる。
【0042】
そして、カラーパレット作成部52にて作成したカラーパレットを使用し、色置換処理部53にて、減色処理対象画像の各画素の色をカラーパレットに含まれる色に置き換えることにより、重要色である人物の顔色を欠落させずに減色処理を行うことができる。
【0043】
したがって、配信しようとする画像が例えば、紅葉や緑の野山などを背景にして人物が小さく写っているような画像の場合、人物の顔色平均値近傍の色に重み付けすることによって、重要色である顔色がカラーパレットから安易に削除されてしまうのを防止して、人物の顔色が減色処理後も極力損なわれないようにすることができる。紅葉を背景にして人物が小さく写っているような画像の場合、減色処理の結果、従来の減色処理方法では人物の顔色が赤みがかった色になってしまうという問題があったが、この実施の形態で説明した本発明の減色処理方法によればこのような問題は解消される。
【0044】
上記減色処理部42の機能は、本発明にかかる減色処理方法によって減色処理を実施するためのプログラムを汎用のサーバコンピュータにインストールして動作させることにより実現できる。すなわち、減色処理対象画像の色情報に対し顔色の重み付け情報を用いて統計的処理を施した結果に基づいて、顔色を優先的に含む所定数の代表色からなるカラーパレットを作成するステップと、減色処理対象画像の各画素の色をカラーパレットに含まれる色に置き換えるステップとを含むプログラムをサーバコンピュータにインストールし実行することにより、減色処理部42の機能を備えたサーバコンピュータを実現できる。
【0045】
このプログラムは、図5の動作フローに示したように、顔色の重み付け情報を考慮しつつ減色処理対象画像を構成している各画素の色を調べ、ヒストグラムなどを用いた統計的処理によって減色処理対象画像における各色の出現頻度を求めるステップと、代表色として出現頻度のより高い色を優先して選択するステップとを有していることが望ましい。
【0046】
なお、減色処理対象画像中に人物の顔が含まれていない場合は、顔抽出処理、顔色平均値算出処理及び重み付け処理を行わず、通常の統計的処理を行い、減色処理対象画像を構成している各画素の色の出現頻度のより高い色を優先してカラーパレットの代表色を選定する。減色処理対象画像中に人物の顔が含まれていない場合の減色処理装置の動作(減色処理方法)は、従来の減色処理装置(減色処理方法)と同様なので説明を省略する。
【0047】
また、圧縮処理部43で圧縮処理した後の減色画像を減色処理部42で更に減色処理する必要がある場合、その減色画像の各画素の色をカラーパレット作成部52にて作成したカラーパレットに含まれる色に置き換える際、顔色平均値算出処理部62によって算出された顔色平均値により近い色、すなわち色空間における顔色平均値との距離がより近い色ほど重み係数を大きくして色の置き換えを行うことが望ましい。顔色平均値との距離がより近い色ほど重み係数を大きくすることにより、ヒストグラムなどを用いた統計処理により安易に人物の顔色が削除されてしまうのを防止できる。
【0048】
また、上記の実施の形態では、自由パレット減色法によるカラーパレットを用いた減色処理の例を説明したが、前記のように一度減色した後に更に減色処理を行う場合などでは、固定パレット減色法によるカラーパレットを用いた減色処理においてもカラーパレットの色数を減少する際に、上述した本実施の形態の構成及び手順を適用して同様な作用効果を得ることができる。
【0049】
以上説明したように、本実施の形態における減色処理装置及び減色処理方法によれば、減色処理対象画像の色情報に対し顔色の重み付け情報を用いて統計的処理を施した結果に基づいて所定数の代表色からなるカラーパレットを作成し、減色処理対象画像の各画素の色をカラーパレットに含まれる色に置き換えることによって減色処理対象画像を元画像より色数の少ない画像に変換する減色処理を実施するに際して、顔色平均値近傍の色に重み係数を設定することによって、重要色である顔色が出現頻度に基づいてカラーパレットから安易に削除されてしまうのを防止することができ、画像品質の劣化を極力抑えた減色処理を行うことができる。
【0050】
【発明の効果】
以上説明したように本発明によれば、減色処理を行う際に減色処理対象画像の重要色である人物の顔色がカラーパレットから削除されてしまうことを防止でき、画像品質の劣化を極力抑えて減色処理することが可能となる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係る減色処理装置を用いた画像配信システムの構成例を示すブロック図である。
【図2】本実施の形態における顔色情報処理部の構成例を示すブロック図である。
【図3】本実施の形態における配信画像生成部の構成例を示すブロック図である。
【図4】本実施の形態における減色処理部の構成例を示すブロック図である。
【図5】本実施の形態におけるカラーパレット作成部の動作手順を示すフローチャートである。
【符号の説明】
1 画像配信システム
2 デジタルカメラ
10 パーソナルコンピュータ(PC)(配信元端末装置)
20 携帯電話機(配信先端末装置)
30 画像配信サーバ(画像変換配信装置)
22 表示部
24 端末情報記憶部
31 配信前画像記憶部
32 端末情報記憶部
33 配信画像生成部
34 転送部
35 顔色情報処理部
41 画素数削減処理部
42 減色処理部(減色処理装置)
43 圧縮処理部
51 顔色情報記憶部
52 カラーパレット作成部
53 色置換処理部
61 顔抽出処理部
62 顔色平均値算出処理部
63 重み付け処理部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a color reduction processing apparatus, a color reduction processing method, and a color reduction processing program for converting each pixel color of a color reduction processing target image into an image having a smaller number of colors than an original image by replacing the color of each pixel with a color included in a predetermined color palette. About.
[0002]
[Prior art]
In recent years, images of digital data taken with a digital camera or the like are transferred to an image distribution server using a mobile phone or a personal computer, or an image distribution server in which an image distributor prepares various image data for distribution has been operated. An image distribution system that distributes images stored in these image distribution servers to mobile terminals such as mobile phones and personal digital assistants (PDAs) has been put into practical use.
[0003]
In this type of image distribution system, there are strong restrictions on the memory capacity and display capability of the mobile terminal, and the memory capacity and display capability differ depending on the type of mobile terminal, so when distributing images from the image distribution server to the mobile terminal According to the memory capacity and display capability of the distribution-destination portable terminal, processing is performed to reduce the data amount by reducing the number of images and the number of colors. For example, after performing image reduction processing (thinning processing) that reduces the number of pixels to a predetermined number of pixels such as 130 × 130 pixels and 90 × 90 pixels, the number of colors included in the image is further increased to 256 colors, 128 colors, 16 Color reduction processing for reducing the number of colors such as colors to a predetermined number is performed.
[0004]
Conventionally, as this kind of color reduction processing method, a fixed type limited color display method (fixed palette color reduction method) and an adaptive type limited color display method (free palette color reduction method) are known.
[0005]
The fixed limited color display method uses one color palette consisting of a predetermined number of representative colors that are uniformly selected from colors that can be reproduced by a display device, and uses the color palette for the color of each pixel of the color reduction target image. This is a color reduction processing method that replaces the closest color included. This method does not need to create a color palette for each color reduction target image, so it can perform color reduction processing at high speed, but there is a bias in the colors in the image, such as a face image or autumnal image. In some cases, only some of the colors included in the color palette are used, and the remaining colors are not used at all. For example, only 50 colors may be used even though a color palette composed of 256 representative colors is used. In such a case, the color image representation after the color reduction processing is of low quality.
[0006]
The adaptive limited color display method creates a color palette composed of a predetermined number of representative colors suitable for expressing the color reduction processing target image based on the color information of the color reduction processing target image. This is a color reduction processing method in which the color of a pixel is replaced with the closest color included in the color palette. This method needs to create a color palette for each color reduction target image, so the processing speed is slower than the fixed limited color display method, but it uses a color palette suitable for each color reduction target image. High-quality color image representation is possible. As a technique using the adaptive limited color display method, there is a technique of creating a color palette based on statistical information regarding the color of each pixel constituting a color reduction processing target image when performing color reduction processing (Patent Document 1). reference.).
[0007]
[Patent Document 1]
JP 2001-309190 A
[0008]
[Problems to be solved by the invention]
In the adaptive limited color display method described above, the appearance frequency of each color in the color reduction processing target image is obtained by statistical processing using a histogram or the like, and a predetermined number of colors are given priority for each color reduction processing target image. A color palette is created by selecting representative colors.
[0009]
For this reason, for example, in the case of an image in which a person appears small against a background of autumn leaves or a green field, the person's face is the main subject, but the color contained in the person's face Since the appearance frequency of the colors included in the background is overwhelmingly high, a color palette including more colors included in the background than the colors included in the person's face is created. When color reduction processing is performed using this color palette, the image of the background part is expressed smoothly in many colors, so the degree of image quality degradation is small, but the background color is important for human faces. Since it is expressed by a small number of tasteful colors, the degree of degradation of image quality increases. In particular, when a large color reduction process is performed, important colors such as the skin color of a person's face may be deleted from the color palette, and the color may change significantly with respect to the original image. For example, in the case of an image in which a person is shown small with autumn leaves in the background, the face color of the person becomes a reddish color as a result of the color reduction processing.
[0010]
The present invention has been made in view of the above circumstances, and an object of the present invention is to prevent the color of a person's face, which is an important color in a color reduction target image, from being deleted from the color palette when performing color reduction processing. Another object of the present invention is to provide a color reduction processing apparatus, a color reduction processing method, and a color reduction processing program capable of performing color reduction processing while suppressing deterioration in image quality as much as possible.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, a color reduction processing apparatus according to the present invention includes a color palette creation means for creating a color palette having a predetermined number of representative colors, and the color of each pixel of the color reduction target image using the color palette. A color replacement processing unit that replaces any one of the colors included in the color palette, and a facial color that extracts a facial image area of the subject from the color-reduction processing target image and generates facial color information related to the colors included in the facial image area Information generating means, wherein the color palette creating means creates a color palette including representative colors determined based on the face color information.
[0012]
In the color reduction processing apparatus of the present invention configured as described above, first, a human face image area is extracted from a color reduction processing target image, and facial color information relating to colors included in the face image area is generated. Next, a color palette composed of a predetermined number of representative colors including the representative color determined based on the face color information is created, and the color of each pixel of the color reduction target image is changed to a color included in the created color palette. Replacement color replacement processing is performed. Therefore, since the representative color of the color palette is determined based on the facial color information when performing the color reduction processing, it is possible to prevent the human facial color, which is an important color of the color reduction target image, from being easily deleted from the color palette. In addition, it is possible to avoid a significant change in the face color of a person due to color reduction, and it is possible to perform a color reduction process that suppresses deterioration in image quality as much as possible.
[0013]
Further, in the color reduction processing apparatus according to the present invention, the face color information generation unit includes a face color average value calculation unit that calculates an average value of colors included in the face image region, and each color near the face color average value. Weighting processing means for setting weighting coefficients, respectively, and the color palette creating means performs statistical processing on the color information of the color reduction target image using the weighting coefficients set by the weighting processing means. A color palette including a representative color determined based on the result is created.
[0014]
In the color reduction processing apparatus of the present invention configured as described above, first, a face image area of a person is extracted from a color reduction processing target image, a facial color average value is calculated, and a weighting coefficient is set for each color in the vicinity of the facial color average value. . Next, a color palette including representative colors determined based on the result of performing statistical processing on the color information of the color reduction processing target image using the weighting coefficient set by the weighting processing unit is created. Therefore, when performing the color reduction process, by setting a weighting factor for the color near the face color average value, the face color of the person, which is an important color of the color reduction target image, can be easily extracted from the color palette based on the appearance frequency. It can be prevented from being deleted, it can be avoided that the face color of the person changes greatly due to color reduction, and it is possible to perform a color reduction process that suppresses deterioration of image quality as much as possible.
[0015]
In the color reduction processing device according to the present invention, the weighting processing unit sets a weighting factor for each color in the vicinity of the face color average value according to a ratio of the face image area to the entire color reduction processing target image. It is characterized by doing. Therefore, when the area occupied by the face image area is small, colors other than the face color are easily set as the representative colors of the color palette.
[0016]
In the color reduction processing apparatus according to the present invention, the weighting processing unit sets a weighting factor for each color in the vicinity of the face color average value according to a distance from the face color average value. Therefore, since the weighting coefficient set for the color close to the face color average value is high, the color close to the face color average value is easily set as the representative color of the color palette.
[0017]
Further, the color reduction processing method according to the present invention extracts a face image area of a subject from a color reduction processing target image, generates a face color information related to a color included in the face image area, and includes the face color information in the face color information. A color palette creation step for creating a color palette including representative colors determined based on the color palette, and a color palette created in the color palette creation step, and using the color palette, the color of each pixel of the color reduction target image is stored in the color palette. And a color replacement processing step for replacing with any of the included colors.
[0018]
Therefore, since the representative color of the color palette is determined based on the facial color information when performing the color reduction processing, it is possible to prevent the human facial color, which is an important color of the color reduction target image, from being easily deleted from the color palette. In addition, it is possible to avoid a significant change in the face color of a person due to color reduction, and it is possible to perform a color reduction process that suppresses deterioration in image quality as much as possible.
[0019]
Further, in the color reduction processing method according to the present invention, the face color information generating step includes a face color average value calculating step for calculating an average value of colors included in the face image area, and each color near the face color average value. Weighting processing steps for setting weighting factors, respectively, and the color palette creating step performs statistical processing on the color information of the color reduction target image using the weighting factors set in the weighting processing step. The appearance frequency calculating step for obtaining the appearance frequency of each color in the color reduction processing target image, and the representative color for selecting the color having the higher appearance frequency as the representative color of the color palette based on the result obtained in the appearance frequency calculating step. And a selection step.
[0020]
Therefore, when performing the color reduction process, by setting a weighting factor for the color near the face color average value, the face color of the person, which is an important color of the color reduction target image, can be easily extracted from the color palette based on the appearance frequency. It can be prevented from being deleted, it can be avoided that the face color of the person changes greatly due to color reduction, and it is possible to perform a color reduction process that suppresses deterioration of image quality as much as possible.
[0021]
Furthermore, the color reduction processing program according to the present invention is for realizing the function of each means in the color reduction processing device according to any one of
[0022]
Therefore, since the representative color of the color palette is determined based on the facial color information when performing the color reduction processing, it is possible to prevent the human facial color, which is an important color of the color reduction target image, from being easily deleted from the color palette. In addition, it is possible to avoid a significant change in the face color of the person due to the color reduction, and it is possible to realize a color reduction process that suppresses the deterioration of the image quality as much as possible by the computer.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. In the description of the present embodiment, the color reduction processing apparatus and the color reduction processing method according to the present invention will be described in detail. However, the color reduction processing program according to the present invention realizes the functions of the respective units included in the color reduction processing apparatus. Therefore, the description about the program is included in the following description.
FIG. 1 is a block diagram showing a configuration example of an image distribution system using a color reduction processing apparatus according to an embodiment of the present invention.
[0024]
An
[0025]
An application program (hereinafter referred to as an image distribution application) for transferring an image distributed to the
[0026]
The
[0027]
The
[0028]
Next, the face color
As shown in the figure, the face color
[0029]
The face
[0030]
The face color average value calculation processing unit 62 expresses an average value when colors included in the face image area extracted by the face
[0031]
The
[0032]
Next, the distribution
As shown in the figure, the distribution
[0033]
The pixel number
[0034]
The color
[0035]
The
[0036]
Since the transferable data capacity varies depending on the type of mobile phone and the communication carrier company, there is a possibility that transfer may be impossible or reception may be rejected due to the excess data capacity. If the data
[0037]
As shown in FIG. 4, the color
[0038]
The face color
[0039]
The color
[0040]
FIG. 5 shows an operation procedure of the color
[0041]
As described above, a predetermined number of representatives including face color preferentially based on the result of performing statistical processing on the color information of the color reduction processing target image using the face color weighting information in the color
[0042]
Then, the color palette created by the color
[0043]
Therefore, when the image to be distributed is an image in which a person is shown small with, for example, autumn leaves or green fields, it is an important color by weighting the color in the vicinity of the human face color average value. It is possible to prevent the face color from being easily deleted from the color palette so that the face color of the person is not lost as much as possible after the color reduction process. In the case of an image in which a person looks small with autumn leaves in the background, there is a problem that the face color of the person becomes a reddish color in the conventional color reduction processing method as a result of the color reduction processing. Such a problem can be solved by the color reduction processing method of the present invention described above.
[0044]
The function of the color
[0045]
As shown in the operation flow of FIG. 5, this program examines the color of each pixel constituting the color reduction target image in consideration of the weight color information, and performs the color reduction processing by statistical processing using a histogram or the like. It is desirable to have a step of obtaining the appearance frequency of each color in the target image and a step of preferentially selecting a color having a higher appearance frequency as the representative color.
[0046]
Note that if the human face is not included in the color reduction process target image, the face extraction process, the face color average value calculation process, and the weighting process are not performed, and normal statistical processing is performed to configure the color reduction process target image. The representative color of the color palette is selected by giving priority to the color having the higher appearance frequency of each pixel. Since the operation of the color reduction processing apparatus (color reduction processing method) when a human face is not included in the color reduction processing target image is the same as that of the conventional color reduction processing apparatus (color reduction processing method), description thereof is omitted.
[0047]
Further, when the color-reduced image after compression processing by the
[0048]
In the above embodiment, the example of the color reduction process using the color palette by the free palette color reduction method has been described. However, when the color reduction process is further performed after the color reduction once as described above, the color reduction process by the fixed palette color reduction method is used. Even in the color reduction processing using the color palette, when the number of colors in the color palette is reduced, the same effects can be obtained by applying the configuration and procedure of the above-described embodiment.
[0049]
As described above, according to the color reduction processing apparatus and the color reduction processing method in the present embodiment, a predetermined number is obtained based on the result of performing statistical processing on the color information of the color reduction target image using the facial color weighting information. A color palette consisting of the representative colors is created, and the color reduction processing to convert the color reduction processing target image into an image with fewer colors than the original image by replacing the color of each pixel of the color reduction processing target image with the color included in the color palette. When implementing, by setting a weighting factor for the color in the vicinity of the face color average value, it is possible to prevent the face color, which is an important color, from being easily deleted from the color palette based on the appearance frequency. It is possible to perform a color reduction process that suppresses deterioration as much as possible.
[0050]
【The invention's effect】
As described above, according to the present invention, it is possible to prevent the human face color, which is an important color of the color reduction target image, from being deleted from the color palette when performing the color reduction processing, and to suppress degradation of image quality as much as possible. Color reduction processing can be performed.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an image distribution system using a color reduction processing apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating a configuration example of a face color information processing unit in the present embodiment.
FIG. 3 is a block diagram illustrating a configuration example of a distribution image generation unit in the present embodiment.
FIG. 4 is a block diagram illustrating a configuration example of a color reduction processing unit in the present embodiment.
FIG. 5 is a flowchart showing an operation procedure of a color palette creating unit in the present embodiment.
[Explanation of symbols]
1 Image distribution system
2 Digital camera
10 Personal computer (PC) (distribution source terminal device)
20 Mobile phone (distribution destination terminal device)
30 Image distribution server (Image conversion distribution device)
22 Display section
24 Terminal information storage unit
31 Pre-delivery image storage
32 Terminal information storage unit
33 Distribution image generator
34 Transfer section
35 Facial Color Information Processing Unit
41 Pixel reduction processing unit
42 Color Reduction Processing Unit (Color Reduction Processing Device)
43 Compression processing section
51 Facial color information storage unit
52 Color palette creation part
53 color replacement processor
61 Face extraction processing unit
62 Face color average value calculation processing unit
63 Weighting processing part
Claims (7)
前記カラーパレットを用いて減色処理対象画像の各画素の色を前記カラーパレットに含まれる色のいずれかに置き換える色置換処理手段と、
前記減色処理対象画像から被写体の顔画像領域を抽出し、前記顔画像領域内に含まれる色に関する顔色情報を生成する顔色情報生成手段と、を備え、
前記カラーパレット作成手段は、前記顔色情報に基づいて決定された代表色を含むカラーパレットを作成することを特徴とする減色処理装置。Color palette creating means for creating a color palette having a predetermined number of representative colors;
Color replacement processing means for replacing the color of each pixel of the color reduction processing target image with any of the colors included in the color palette using the color palette;
Facial color information generating means for extracting a facial image area of a subject from the color reduction processing target image and generating facial color information relating to a color included in the facial image area;
The color pallet creating means creates a color pallet including representative colors determined based on the face color information.
前記カラーパレット作成手段は、前記減色処理対象画像の色情報に対し前記重み付け処理手段によって設定された重み係数を用いて統計的処理を施した結果に基づいて決定された代表色を含むカラーパレットを作成することを特徴とする請求項1記載の減色処理装置。The face color information generating means includes a face color average value calculating means for calculating an average value of colors included in the face image area, a weighting processing means for setting a weighting factor for each color in the vicinity of the face color average value, Have
The color palette creating means includes a color palette including representative colors determined based on a result of performing statistical processing on the color information of the image to be subjected to color reduction processing using a weighting factor set by the weighting processing means. The color reduction processing apparatus according to claim 1, wherein the color reduction processing apparatus is created.
前記顔色情報に基づいて決定された代表色を含むカラーパレットを作成するカラーパレット作成ステップと、
前記カラーパレット作成ステップで作成されたカラーパレットを用いて、前記減色処理対象画像の各画素の色を前記カラーパレットに含まれる色のいずれかに置き換える色置換処理ステップと、
を具備することを特徴とする減色処理方法。A face color information generation step of extracting a face image area of the subject from the color reduction processing target image and generating face color information relating to a color included in the face image area;
A color palette creating step for creating a color palette including representative colors determined based on the face color information;
Using the color palette created in the color palette creating step, a color replacement processing step for replacing the color of each pixel of the color reduction processing target image with one of the colors included in the color palette;
A color-reduction processing method comprising:
前記カラーパレット作成ステップは、前記減色処理対象画像の色情報に対し前記重み付け処理ステップで設定された重み係数を用いて統計的処理を施すことによって、前記減色処理対象画像における各色の出現頻度を求める出現頻度算出ステップと、前記出現頻度算出ステップで求めた結果に基づいて、出現頻度のより高い色をカラーパレットの代表色に選定する代表色選定ステップと、を含むことを特徴とする請求項5記載の減色処理方法。The face color information generating step includes a face color average value calculating step for calculating an average value of colors included in the face image area, and a weighting processing step for setting a weighting factor for each color in the vicinity of the face color average value, Including
The color palette creating step obtains the appearance frequency of each color in the color reduction target image by performing statistical processing on the color information of the color reduction target image using the weighting factor set in the weighting step. 6. An appearance frequency calculating step, and a representative color selecting step of selecting a color having a higher appearance frequency as a representative color of a color palette based on the result obtained in the appearance frequency calculating step. The color reduction processing method described.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002281281A JP2004120382A (en) | 2002-09-26 | 2002-09-26 | Apparatus, method and program for subtractive color processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002281281A JP2004120382A (en) | 2002-09-26 | 2002-09-26 | Apparatus, method and program for subtractive color processing |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004120382A true JP2004120382A (en) | 2004-04-15 |
Family
ID=32275765
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002281281A Pending JP2004120382A (en) | 2002-09-26 | 2002-09-26 | Apparatus, method and program for subtractive color processing |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004120382A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020052530A (en) * | 2018-09-25 | 2020-04-02 | 富士フイルム株式会社 | Image processing apparatus, image processing system, image processing method, and program |
-
2002
- 2002-09-26 JP JP2002281281A patent/JP2004120382A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020052530A (en) * | 2018-09-25 | 2020-04-02 | 富士フイルム株式会社 | Image processing apparatus, image processing system, image processing method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8483509B2 (en) | Image processing method and apparatus, computer program, and computer-readable storage medium | |
JP4176114B2 (en) | Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method | |
CN101291386B (en) | Image processor and image processing method for reducing consumption amount of recording material | |
CN105872447A (en) | Video image processing device and method | |
TW540227B (en) | System and method for image processing | |
CN113781320A (en) | Image processing method and device, terminal equipment and storage medium | |
JP5003488B2 (en) | Video communication system, terminal, and image conversion apparatus | |
CN111679877A (en) | Method and device for changing background of terminal equipment and electronic equipment | |
CN109934783B (en) | Image processing method, image processing device, computer equipment and storage medium | |
US20040190023A1 (en) | Image processing method, apparatus and program | |
CN111462158B (en) | Image processing method and device, intelligent equipment and storage medium | |
CN116668656B (en) | Image processing method and electronic equipment | |
JP4156419B2 (en) | Image processing method, apparatus, and program | |
JP4056277B2 (en) | Color reduction processing apparatus and color reduction processing method | |
JP2004120382A (en) | Apparatus, method and program for subtractive color processing | |
JP3999091B2 (en) | Image correction processing apparatus and program | |
US8498332B2 (en) | Chroma supression features | |
CN107341770B (en) | Dynamic range extension highlight information recovery | |
JP3960210B2 (en) | Image processing device | |
CN112348739B (en) | Image processing method, device, equipment and storage medium | |
CN110941413B (en) | Display screen generation method and related device | |
KR101903428B1 (en) | System and Method of Color Correction for Related Images | |
CN108933945B (en) | GIF picture compression method, device and storage medium | |
JP2004297617A (en) | Image processing device, image forming device, image processing method, image processing program, and computer readable recording medium recorded with image processing program | |
Bao et al. | The case for context-aware compression |