JP3780587B2 - Color data converter - Google Patents
Color data converter Download PDFInfo
- Publication number
- JP3780587B2 JP3780587B2 JP29144396A JP29144396A JP3780587B2 JP 3780587 B2 JP3780587 B2 JP 3780587B2 JP 29144396 A JP29144396 A JP 29144396A JP 29144396 A JP29144396 A JP 29144396A JP 3780587 B2 JP3780587 B2 JP 3780587B2
- Authority
- JP
- Japan
- Prior art keywords
- output
- value
- input
- color
- color data
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
- Controls And Circuits For Display Device (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、カラー画像に特定の処理を施す装置に関し、特に、カラー画像の特定の領域を抽出する装置や、自然画像の階調を減少させることにより画像に特殊な効果(ポスタリゼーション効果)を施す装置に関する。
【0002】
【従来の技術】
(第1の従来技術)
まず、第1の従来技術として、色情報を用いた領域選択の方法について図面を参照しながら説明する。
【0003】
領域の選択は、静止画像処理においてはマスクデータの生成、動画像処理においてはキー信号の生成と呼ばれ、以降の処理において特定の領域を他の領域と切り離して独立に処理するために必須となる工程である。
【0004】
マスクデータとキー信号は、いずれも選択された部分において最大値、非選択部分において最小値を持つような値で表され、処理対象となる画像の信号に準じた形式を持つある種の画像データである。
【0005】
ここでは、人物などのテレビジョン映像から、映像中の色情報を用いることによって単色系の背景の領域のみを選択する信号、いわゆるキー信号を生成する場合について述べる。実際の映像製作の現場において、このキー信号の生成は、撮影した映像の背景のみを他の映像に差し替える装置、いわゆるクロマキー合成装置における前段の処理として頻繁に行われている。
【0006】
図11は、キー信号を生成する従来の色彩データ変換装置の構成を示すブロック図である。入力映像の画素を構成する3次元の信号成分をY、U、Vとすると、極座標変換部1101において元信号の色差成分であるU、V信号は彩度成分C(Chroma)、色相成分H(HueAngle)に変換される。Y、C、Hの3成分は成分毎に対応する選択信号生成部1102〜1104において選択信号key−y,key−c,key−hに変換されたのち、乗算部1105において合成され、最終的にキー信号keyとして出力される。
【0007】
図12は、図11における選択信号生成部1102〜1104における動作を説明するための図であり、信号の入出力関係を示す。この関係は、各成分毎にあらかじめ設定された選択中心値(CenterValue)と選択幅(Width)によって定められる矩形状のグラフとなる。従って、入力された信号のY、C、Hの各成分は、図12に示されるグラフに従って変換が施され、それぞれ2値(0/255)で表される選択信号となる。
【0008】
各成分ごとの選択信号は、乗算部1105において論理積がとられ、キー信号(Key)として出力される。図13(a)はC成分の選択信号(Key−c)、図13(b)はH成分の選択信号(Key−h)、図13(c)は合成後のキー信号(Key)のそれぞれのUV入力色差平面における分布を示す。
【0009】
なお、図13は、分割された色空間におけるY成分を一定とする断面図、即ち、UV入力色差平面のみを示しているが、実際には、特定YUV空間の特定領域が3次元的に選択される。
【0010】
このようにして、第1の従来技術により、色各成分毎にあらかじめ設定された選択中心値と選択幅に基づいてキー信号の生成が行われている。
【0011】
(第2の従来技術)
次に、第2の従来技術として、画像処理における色彩の成分の階調数を減少させることによる特殊効果、いわゆるポスタリゼーション効果の実施方法について図面を参照しながら説明する。
【0012】
ポスタリゼーションとは、多階調を有する自然画像の階調成分を指定の階調数に減ずることにより、元の自然画像をポスターデザインなどで用いられるような少ない色数で表現された画像に変換する画像処理をいう。なお、色彩を構成する各成分の値としてとり得る数を階調数、各成分の合成として表現された色彩の種類としてとり得る数を色数と呼ぶ。
【0013】
広告画像などを製作するデザイナらは、素材となる自然画像にポスタリゼーション効果を含む様々な特殊効果を組み合わせて施すことにより、自分のイメージする作品を作り上げている。それらの特殊効果のなかでも特にポスタリゼーション効果は、素材画像からアニメーションに用いられるセル画のような少数色で表現される画像を簡易かつ効果的に生成するための手段として様々な場面で多用されている。
【0014】
図14は、従来のポスタリゼーションのための色彩データ変換装置の構成を示すブロック図である。入力画像の画素を構成する3次元の値の各成分(ここではR、G、B成分)は、各々独立した信号変換部1401〜1403によって階調を減ぜられ出力される。
【0015】
図15は、この信号変換部1401〜1403における信号変換の動作を説明するための図である。例えば、出力側の階調数を3とする場合であれば、図15のように、多階調の入力信号は、信号変換部1401〜1403によって3階調の値に変換される。
【0016】
ここで、入力画像の画素を構成する値は3次元の成分を持つので、各成分をいずれも2階調で表現した場合は8色(2の3乗)、3階調で表現した場合は27色(3の3乗)で塗り分けられた出力画像が得られることになる。各成分を3階調で表現した場合における色空間の分割の例を図16に示す。なお、図16は、分割された色空間におけるB成分を一定とする断面図、即ち、RG平面のみを示しているが、実際には色空間は3次元的に分割される。
【0017】
このようにして、第2の従来技術では、色空間を固定的に分割し、同一の分割領域に属する入力画素の色彩をその領域を代表する同一の色に変更することにより、入力画素の色彩数を減じている。
【0018】
なお、上記の説明では、画素の各成分を(R、G、B)による値で表現したが、従来の方式におけるポスタリゼーションに用いられる3次元の値の成分としては、テレビジョン映像信号の処理などに用いられる(Y、U、V)や印刷用画像などに用いられる均等知覚色空間で定義される(L*、a*、b*)などの値が用いられる場合もある。
【0019】
【発明が解決しようとする課題】
しかしながら、上記第1の従来技術による色情報を用いたキー信号の生成では、入力映像の画素を構成する3次元の信号は各成分毎に独立して選択信号に変換された後にキー信号として合成されるため、キー信号として選択される領域の色空間における形状は、各成分の軸に沿った一定のものに限定されるという問題がある。
【0020】
例えば、図11に示したような信号変換では、最終的に選択される色領域は、色空間上でみると図13(c)で示されたような扇型(実際にはY方向への3次元的な厚みを持つ)となってしまうため、実際に処理を施したい入力画像に対して、選択したい色の色空間における分布が図17のように斜線で示した領域のような形状であった場合には、もはやこのような色領域の切り出しをすることはできない。つまり、選択したい色が3次元の信号のいずれの成分の定義された軸に対しても傾いた方向に分布している場合などは、その領域を的確に切り出すことは困難である。
【0021】
また入力すべき切り出し領域の選択中心値と選択幅の指定作業そのものについても、作業者の熟練に負うものであり、最適な値を簡易に得ることができる方法が望まれている。
【0022】
また、キー信号は、後処理において画像の合成や色彩調整などの画像編集効果の係り具合を決定する重みデータとして用いられる場合が多い。キー信号が2値の場合は、編集後の画像に疑似的な輪郭が発生することがあるので、キー信号自身に階調を持つことが望まれている。
【0023】
また、上記第2の従来技術によるポスタリゼーション効果の実施方法では、階調の分割方法や効果の実施後の画像の配色が画素を構成する3次元の値の各成分と指定された階調数により一意に定まっている。即ち、入力信号を3階調に減ずる場合は同様に図15に示される通り固定的に3分割されるだけであり、これらの分割方法は実施の対象となる画像と無関係に一律に決定されたものである。そのために、画像の内容や種類に応じた最適なポスタリゼーション効果を行うことができないという問題点がある。
【0024】
配色についても、色空間を均等に分割し各領域をそれぞれの代表色で塗り分けるだけであり、作業者の意思が反映される余地はない。
【0025】
そこで、本発明は上記従来の問題点を解決するものであり、色情報を用いた領域選択の実施において、簡易な操作により、入力信号の各成分の定義された色空間上で、自由な形状の領域の切り出しをおこなうことが可能で、さらに選択信号出力に中間階調を持つことが可能な色彩データ変換装置を提供することを目的とする。
【0026】
また、本発明は、ポスタリゼーション効果の実施において、簡易な操作により、自由な色の分割による任意の色数や配色を用いることが可能な色彩データ変換装置を提供することを目的とする。
【0027】
【課題を解決するための手段】
この課題を解決するために、本発明に係る第1の色彩データ変換装置は、カラー画像を構成する画素の色彩データを変換する色彩データ変換装置であって、キー信号を作成する場合に代表となる色の三次元色空間上の座標値を記録する入力指定値記録手段と、それぞれの入力指定値をキー信号として選択するか否かを決定する情報を出力指定値として記録する出力指定値記録手段と、入力指定値と出力指定値を決定する指定値決定手段と、入力画像を画素毎に出力する入力手段と、入力画素を色空間上の座標値と考えてその近傍の座標値を演算する近傍値演算手段と、入力値と全ての入力指定値との三次元色空間における距離を演算し最も距離の近い入力指定値を特定する入力指定値特定手段と、入力指定値特定手段で選択された入力指定値に対応する出力指定値を出力する出力指定値選択手段と、出力値選択手段からの出力を積和して出力する出力値演算手段と、出力値演算手段から出力されたキー信号を画像情報として表示あるいは記録する出力手段を備えることを特徴とする。
【0028】
また、本発明に係る第2の色彩データ変換装置は、カラー画像を構成する画素の色彩データを変換する色彩データ変換装置であって、第1の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段に加え、カラー画像を構成する画素の色彩データと入力値指定手段に記録された各入力指定値との三次元色空間における距離を算出して比較することによりその距離が最小となる入力指定値と、二番目に距離が小さい入力指定値を特定する入力指定値特定手段と、入力指定値特定手段によって特定された二つの入力指定値に対応する出力指定値を用いて出力を決定する出力演算手段とを備えることを特徴とする。
【0029】
また、本発明に係る第3の色彩データ変換装置は、カラー画像を構成する画素の色彩データを変換する色彩データ変換装置であって、第1の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段に加え、三次元色空間を各軸について等分に標本化した色彩データの座標をルックアップテーブル(LUT)座標値として出力するLUTアドレス生成手段と、LUTアドレス生成手段から出力される色彩データと各入力指定値との三次元色空間における距離を算出して比較することによりその距離が最小となる入力指定値を特定する入力指定値特定手段と、入力指定値特定手段によって特定された入力指定値に対応する出力指定値を出力指定値記録手段から読み出して出力する出力値選択手段と、出力値選択手段から出力されたデータをLUTとして記録するLUT記録手段と、カラー画像を構成する画素の色彩データを座標値として、LUT記録手段の複数のデータを用いた補間演算によって出力値を決定するLUT演算手段を備えることを特徴とする。
【0030】
また、本発明に係る第4の色彩データ変換装置は、第1の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段、入力指定値特定手段、出力指定値選択手段、出力値演算手段に加え、入力画素を色空間上の座標値と考えてその近傍の座標値を演算し、かつ出力する色彩データの数を決定するユーザインタフェースを備える近傍値演算手段を持つことを特徴とする。
【0031】
また、本発明に係る第5の色彩データ変換装置は、第1の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段、入力指定値特定手段、出力指定値選択手段、出力値演算手段に加え、入力画素を色空間上の座標値と考えてその近傍の座標値を演算し、かつカラー画像を構成する画素の色彩データと出力する色彩データとの距離を決定するユーザインタフェースを備える近傍値演算手段を持つことを特徴とする。
【0032】
また、本発明に係る第6の色彩データ変換装置は、第1の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段、入力指定値特定手段、出力指定値選択手段、近傍値演算手段に加え、出力指定値決定手段からの出力に対して、その出力指定値決定手段の入力である色彩データと前記カラー画像を構成する画素の色彩データとの距離に対応した重みをつけて、積和する出力演算手段を持つことを特徴とする。
【0033】
また、本発明に係る第7の色彩データ変換装置は、カラー画像を構成する画素の色彩データを変換する色彩データ変換装置であって、第2の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段、入力指定値特定手段に加え、入力指定値特定手段によって特定された二つの入力指定値に対応する出力指定値と、二つの入力指定値から距離が等しい面とカラー画像を構成する画素の色彩データとの距離情報を用いて出力を決定する出力演算手段を持つことを特徴とする。
【0034】
また、本発明に係る第8の色彩データ変換装置は、カラー画像を構成する画素の色彩データを変換する色彩データ変換装置であって、第2の色彩データ変換装置と同様のものである入力指定値記録手段、出力指定値記録手段、指定値決定手段、入力手段、出力手段、入力指定値特定手段に加え、二つの入力指定値から距離が等しい面とカラー画像を構成する画素の色彩データとの距離がある閾値以上離れている場合は、出力が、距離が最小となる入力指定値に対応する出力指定値の値に等しくなるような重み関数によって出力を決定する出力演算手段を持つことを特徴とする。
【0035】
【発明の実施の形態】
(実施の形態1)
以下に、動画像からキーとなる信号情報を抜き出す装置である本発明の第1の実施の形態について、詳しく説明する。
【0036】
図1は、第1の実施の形態に係る色彩データ変換装置の構成を示す図である。図1において、101は入力手段、102は指定値決定手段、103は入力指定値記録手段、104は出力指定値記録手段、105は近傍値演算手段、106は入力指定値特定手段、107は出力指定値選択手段、108は出力値演算手段、109は出力手段である。
【0037】
入力手段101は、入力動画像を画素単位で近傍値演算手段105に出力するもので、ビデオカメラ、ビデオデッキと、その2つの機器の信号を選択するセレクタと、A/D変換器によって構成される。
【0038】
(表1)は、入力指定値記録手段103と出力指定値記録手段104に記録されるデータの例である。入力指定値記録手段103は、キー信号を作成する場合に代表となる色の三次元色空間上の座標値を入力指定値として記録するもので、書き換え可能なメモリにより構成されている。
【0039】
出力指定値記録手段104は、それぞれの入力指定値をキー信号として選択するか否かを決定する情報を出力指定値として記録するもので、書き換え可能なメモリにより構成されている。
【0040】
【表1】
【0041】
指定値決定手段102は、入力指定値と出力指定値を決定するもので、動画像キャプチャボードと、グラフィカルユーザインタフェースを搭載したパーソナルコンピュータにより構成される。
【0042】
近傍値演算手段105は、入力画素を色空間上の座標値と考え、その近傍の座標値を演算し、入力指定値特定手段106に出力するものであり、加算器とバッファにより構成される。
【0043】
入力指定値特定手段106は、近傍値演算手段105で得られた座標値と、入力指定値記録手段103に記録された全ての入力指定値との、三次元色空間における距離を演算する加算器および乗算器と、そのうちで最も距離の近い入力指定値を選択する比較器により構成される。
【0044】
出力指定値選択手段107は、入力指定値特定手段106で選択された入力指定値に対応する出力指定値を、出力指定値記録手段103から選択し、入力された座標値に対応する値として出力値演算手段108に出力するセレクタにより構成される。
【0045】
出力値演算手段108は、出力値選択手段107からの出力を積和して出力するもので、バッファ、乗算器、および加算器により構成される。
【0046】
出力手段109は、入力画素に対応した出力値演算手段108から出力されたキー信号を、画像情報として表示、あるいは記録するもので、D/A変換器、ビデオセレクタ、モニタ、ビデオデッキにより構成される。
【0047】
以上のように構成された本装置の動作について説明する。
まず、入力画像は、画素毎に三次元色空間上の座標値として近傍値演算手段105に入力される。ここで、画素は、輝度、色差の3属性をもつCCIR601勧告のYuv色空間座標を持つとする。
【0048】
次に、近傍値演算手段105によって、図2のように、近傍値演算手段に入力された値を中心にした、Yuv各軸に沿ってδ離れた近傍6点の座標が演算され、入力指定値特定手段106に入力される。
【0049】
一方で、指定値決定手段102では、ユーザからの指示により、入力手段101からの1フレームが静止画像として取りこまれ、表示される。次に、ユーザインタフェースを用いて、その画像中の複数の色が、キー信号として選択したいあるいは選択したくない色として抜きだされ、入力指定値として入力指定値記録手段103に出力される。また、それぞれの入力指定値は、選択信号であるか(255)ないか(0)を決定し、その値を出力指定値として、出力指定値記録手段104に出力される。
【0050】
入力指定値記録手段103と出力指定値記録手段104には、(表1)のようなキー信号を作成する場合に代表となる色の三次元色空間上の座標値と、その色を選択するか(255)否か(0)を示すデータを記録するもので、あらかじめ準備して記録しておいてもよいし、ユーザが指定値決定手段102で、そのつど決定して記録してもよい。
【0051】
図3は、入力指定値特定手段106と、出力指定値選択手段107の動作を説明するためのフロー図である。入力指定値特定手段106では、入力値と入力指定値記録手段103に記録されている全ての入力指定値との三次元色空間における距離が算出される。さらにその値を順次比較することによって、入力値との色空間上での距離が最小となる入力指定値が決定され、出力指定値選択手段107に通知される。その通知を受けた出力指定値選択手段107では、その入力指定値に対応する出力指定値が出力指定値記録手段104から読み出され、入力値に対応する出力値として出力される。
【0052】
図4(a)は、三次元色空間の分割の様子を示す図であり、Yを一定とするuv平面における断面図である。表示の便宜上、Yが一定となる断面を表示したが、実際の色空間の分割の様子は三次元的なものとなる。図中の白丸は(表1)の入力指定値に該当し、×印は入力値に該当する。色空間上の任意の点は距離が最も近い入力指定値の領域に属するように分割される。このような手法による空間の分割図は一般にボロノイ図(VoronoiDiagrams)と呼ばれる。入力指定値特定手段106と、出力指定値選択手段107の動作によって、境界線に囲まれた分割領域に属する入力値が与えられると、その領域中の白丸に相当する出力値が出力される。つまり、出力指定値選択手段107によって出力値は、0または255の値に変換されたことになる。
【0053】
しかし、キー信号は、後処理で画像の合成や色彩調整などの画像編集効果の係り具合を決定するデータとして用いられることを考えると、信号自身に階調を持つことが望ましい。そこで、出力値演算手段107では、入力値とその近傍値に対応する6つの出力値が、(数1)の演算で積和され、入力値に対応する8階調のキー信号として出力される。ここで、kiは出力選択手段の出力値、qiは重み係数、k^は出力である。
【0054】
【数1】
【0055】
この動作を言い換えれば、図4(b)のように三次元色空間上の領域の境界を近傍の点を用いて平滑化する処理がおこなわれことになる。そして、入力画素に対応した出力値演算手段108から出力されたキー信号は、出力手段109により、画像情報として表示、あるいは記録される。
【0056】
このようにして、入力画素は、本装置によって、色空間上の距離が最も近い指定値の影響を最大限に受けた階調を持つキー信号となって出力される。また、このキー信号は、画像表示空間位置情報を全く使用しないので、画像の輪郭情報を一様に失うことがない、色情報に応じた階調情報を持つことができる。
【0057】
従って、本装置により、処理の対象となる画像の内容に応じて、作業者が得たい信号を、階調を持つキー信号として出力することができる。
【0058】
なお、本実施形態において入力信号系の定義された色空間をYUV色空間としているが、RGB、YCbCr、YIQ、CMY、CMYK、L*a*b*、L*u*v*、HSV、HLSなど画像処理に一般に用いられる他の色空間を用いてもよく、また処理画像に応じて独自に定義した色空間を用いてもよい。
【0059】
なお、本実施形態において入力指定値特定手段106で比較される色空間における距離は、三次元色空間における距離を用いたが、距離の二乗の値を用いてもよい。距離の二乗の値を用いた場合は、距離計算において平方根を求める処理が不要となるので処理コストの大幅な削減が可能となる。
【0060】
なお、近傍値演算手段105と、出力値演算手段108は、6つのデータを蓄積するためのバッファを持つ構成でもよく、バッファから6つの出力値を順次出力することによって、入力指定値特定手段106と出力指定値選択手段107を複数持たない構成にすることもできる。
【0061】
また、本装置の近傍値演算手段102において、近傍値として6点を出力するとしたが、周辺8点や、12点や、あるいは演算コストが許される限りそれ以上のデータを出力するように設定できるユーザインタフェースを備えていてもよく、点数を増やすことでより多くの階調を持ったキー信号の出力が期待できる。
【0062】
さらに、近傍値演算手段105は、距離範囲δをユーザが設定できるようなインタフェースを備えていてもよく、δを変更することでキー信号の中間階調をもつデータの割合を変更することができる。
【0063】
なお、本装置においては、出力指定値としてキー信号を設定したが、(表2)のように出力指定値に色空間上の座標値を設定してもよい。この場合、出力画像として、中間調を持つポスタリゼーション効果を施した画像を得ることができる。
【0064】
【表2】
【0065】
さらに、出力指定値に色空間上の座標値を設定する場合、出力指定値の値として入力指定値をそのまま設定しなくてもよい。入力指定値と出力指定値を異なる値に設定したり異なる色空間で定義される値に設定しておくことにより、ポスタリゼーション効果の実施後に得られる画像の配色を自由に設定することが可能となり、出力画像の定義される色空間も、システムの要請に合わせ自由に選択することが可能となる。
【0066】
なお、本装置では、入力指定値記録手段103、出力指定値記録手段104、近傍値演算手段105、入力指定値特定手段106、出力指定値選択手段107、出力値演算手段108は、専用ハードウェアを用いるとしているが、すべてパーソナルコンピュータと、そのメモリにロードされるソフトウェアで実現しても良い。
【0067】
(実施の形態2)
以下に、静止画像からキーとなる信号情報を抜き出す装置である本発明の第2の実施の形態について詳しく説明する。
【0068】
図5は、本発明の第2の実施の形態における装置の機能ブロックを示す図である。図5において、501は指定値決定手段、502は入力指定値記録手段、503は出力指定値記録手段、504は入力指定値特定手段、505は出力値演算手段、506は入力手段、507は出力手段である。
【0069】
指定値決定手段501は、ユーザが、入力画像あるいはカラーパレットなどから入力指定値を抽出し、それに対応する出力指定値を決定するためのもので、マウスなどのポインティングデバイスとグラフィカルユーザインタフェースによって構成される。
【0070】
(表3)は、入力指定値記録手段502と出力指定値記録手段503に記録されるデータの例である。入力指定値記録手段502は、キー信号を作成する場合に代表となる色のCIEL*a*b*色空間座標値を入力指定値として記録するものである。出力指定値記録手段503は、実施の形態1のものと同様なもので、ここでは詳しい説明は省略する。
【0071】
【表3】
【0072】
入力指定値特定手段504は、入力指定値記録手段502に記録された全ての入力指定値との、三次元色空間における距離を演算し、そのうちで最も距離の近い入力指定値と二番目に近い入力指定値を選択するものである。
【0073】
出力値演算手段505は、入力指定値特定手段504からの二つの入力指定値と、それぞれに対応する出力指定値を用いて、入力された色彩データが選択信号であるか否かを示すキー信号を演算し、出力するものである。
【0074】
入力手段506は、入力静止画像を画素単位で入力指定値特定手段504に出力するもので、出力手段は507は、出力値演算手段505から出力されたキー信号を、画像情報として表示、あるいは記録するものである。以上の機能ブロックは、すべてパーソナルコンピュータと、そのメモリにロードされるプログラムによって構成される。
【0075】
このように構成された本実施の形態における装置の動作について説明する。
まず、ユーザは、指定値決定手段501のマウスを使って、モニタに表示されている入力画像あるいはカラーパレットなどから入力指定値を抽出し、対応する出力指定値を決定する。指定されたデータは、入力指定値記録手段502と出力指定値記録手段503に記録される。
【0076】
入力指定値と出力指定値は、入力指定値の色空間座標がCIEL*a*b*であること以外は、第一の実施の形態で説明したものと同様であるので説明は省略する。
【0077】
モニタに表示されている入力画像は、画素毎に三次元色空間上の座標値として入力指定値特定手段504に入力される。ここで、画素は、輝度、色差の3属性をもつCIEL*a*b*色空間座標を持つとする。
【0078】
図6(a)に、入力指定値特定手段504の動作を説明するためのフロー図を示す。ここで、図6(b)は、図6(a)におけるブロックAの内部構成である。入力指定値特定手段504では、その入力値と入力指定値記録部502に記録されている全ての入力指定値との三次元色空間における距離(=√L*2+a*2+b*2)が算出される。さらにその値を順次比較することによって、その画素との距離が最小となる入力指定値と、二番目に距離が小さい入力指定値が決定され、対応する出力指定値とともに出力値演算手段505に出力される。
【0079】
図7は、三次元色空間の分割の様子を示す図であり、L*を一定とするa*b*平面における断面図である。表示の便宜上、L*が一定となる断面を表示したが、実際の色空間の分割の様子は三次元的なものとなる。図中の×印pは、ある入力値の色空間上における座標値で、白丸1はその点に最も近い入力指定値、白丸2はその点に二番目に近い入力指定値である。
【0080】
出力値演算手段505では、白丸1、白丸2に対応する出力指定値が出力指定値記録手段503から読み出され、(数2)、(数3)、(数4)の演算式で得られたデータが、階調をもつキー信号として出力される。ここで、式のL12、L1p、L2pは、図に示す各点間の距離、δは任意の値であり、境界面からのδの距離の領域の出力信号に階調を持たせることができる。
【0081】
図8(a)は、ボロノイ分割によって作られた領域の出力をそのままキー信号とする場合のグラフで、図8(b)は、(数2)、(数3)、(数4)によって得られる出力を表すグラフである。ここで、図の横軸は白丸1からの距離で、縦軸はキー信号出力である。
【0082】
【数2】
【0083】
【数3】
【0084】
【数4】
【0085】
このように、白丸1、白丸2に対応する出力指定値と、白丸1、白丸2にから構成される最も近い境界面からの距離情報から出力信号が導かれる。この動作を言い換えれば、三次元色空間上の領域の境界近傍の出力に階調を持たせる処理がおこなわれことになる。
【0086】
このようにして、入力画素は、本装置によって、色空間上の距離が最も近い指定値の影響を最大限に受けた階調を持つキー信号となって出力される。また、このキー信号は、画像表示空間位置情報を全く使用しないので、画像の輪郭情報を一様に失うことがない、色情報に応じた階調情報を持つことができる。
【0087】
従って、本実施の形態における装置により、処理の対象となる画像の内容に応じて、作業者が得たい信号を、階調を持つキー信号として出力することができる。
【0088】
なお、本実施形態において入力信号系の定義された色空間をL*a*b*色空間としているが、RGB、YCbCr、YIQ、CMY、CMYK、YUV、L*u*v*、HSV、HLSなど画像処理に一般に用いられる他の色空間を用いてもよく、また処理画像に応じて独自に定義した色空間を用いてもよい。なお、本実施形態において入力指定値特定手段504で比較される色空間における距離は、三次元色空間における距離を用いたが、距離の二乗の値を用いてもよい。距離の二乗の値を用いた場合は、距離計算において平方根を求める処理が不要となるので処理コストの大幅な削減が可能となる。
【0089】
なお、出力値演算手段505は、距離範囲δをユーザが設定できるようなインタフェースを備えていてもよく、δを変更することでキー信号の中間階調をもつデータの割合を変更することができる。
【0090】
なお、本装置においては、出力指定値としてキー信号を設定したが、(表4)のように出力指定値に色空間上の座標値を設定してもよい。この場合、出力画像として、中間調を持つポスタリゼーション効果を施した画像を得ることができる。
【0091】
【表4】
【0092】
さらに、出力指定値に色空間上の座標値を設定する場合、出力指定値の値として入力指定値をそのまま設定しなくてもよい。入力指定値と出力指定値を異なる値に設定したり異なる色空間で定義される値に設定しておくことにより、ポスタリゼーション効果の実施後に得られる画像の配色を自由に設定することが可能となり、出力画像の定義される色空間も、システムの要請に合わせ自由に選択することが可能となる。
【0093】
なお、本発明の実施の形態は、パーソナルコンピュータとそのメモリにロードされるプログラムにより構成されるとしたが、図5の機能ブロックの一部あるいはすべてを専用ハードウェアに置き換えてもよい。
【0094】
(実施の形態3)
以下に、動画像からキーとなる信号情報を抜き出す装置である本発明の第3の実施の形態について図面を参照しながら説明する。図9は、本発明の第3の実施の形態における装置の構成を示す図である。
【0095】
図9において、901は指定値決定手段、902は入力指定値記録手段、903は出力指定値記録手段、904は入力指定値特定手段、905は出力指定値選択手段、909は入力手段、910は出力手段で、以上は第1の実施の形態のものと同様なものであるので説明は省略する。
【0096】
906はLUTアドレス生成手段、907はLUT記録手段、908はLUT演算手段である。LUTアドレス生成手段906は、三次元色空間座標値を各軸について8等分にサンプリングした729点の座標値をルックアップテーブル(LUT)座標値として入力指定値特定手段904に出力するものでカウンタにより構成される。LUT記録手段907は、出力指定値選択手段905から出力される729個のデータをLUTデータとして記録するものである。LUT演算手段908は、入力画像の画素データに対応する出力値を、LUT記録手段907に記録された複数のLUTデータを用いた補間演算により出力するものである。
【0097】
以上のように構成された本装置の動作について説明する。
まず、指定値決定手段901では、ユーザからの指示により、入力手段909からの1フレームが静止画像として取りこまれ、表示される。次に、ユーザインタフェースを用いて、その画像中の複数の色が、キー信号として選択したいあるいは選択したくない色として抜きだされ、入力指定値として入力指定値記録手段902に出力される。また、それぞれの入力指定値は、選択信号であるか(255)ないか(0)を決定し、その値を出力指定値として、出力指定値記録手段903に出力される。
【0098】
次に、LUTアドレス生成手段906から、三次元色空間座標値を各軸について8等分にサンプリングした729点の座標値が、ルックアップテーブル(LUT)座標値として入力指定値特定手段904に出力される。入力指定値特定手段904と出力指定値選択手段905は、第一の実施の形態と同様の動作で信号を出力するので、詳しい説明は省略する。
【0099】
LUT記録手段907には、出力指定値選択手段905からの出力が、三次元色空間座標値を各軸について8等分にサンプリングした729点の座標値に対応したキー信号として記録される。
【0100】
入力画像は、画素毎に三次元色空間上の座標値としてLUT演算手段908に入力される。ここで、画素は、輝度、色差の3属性をもつCCIR901勧告のYuv色空間座標を持つとする。
【0101】
次に、LUT演算手段908によって、入力座標値に対応する出力が補間演算され、出力手段910に出力され、出力手段910により画像情報として表示あるいは記録される。入力手段909と出力手段910は、第一の実施の形態における装置と同様なので詳しい説明は省略する。
【0102】
ここでLUTを用いた補間演算について詳しく説明する。LUT記録手段907は、三次元色空間を各軸8等分した512個の立方体の頂点に対応する729個の格子点の座標値に対応する出力値を持つ。LUT参照手段は、LUTの格子点の値のうち入力値を囲む頂点に対応する近傍6点のデータを用いたPRISM補間演算(Fastcolorprocessorwithprogrammableinterpolationbysmallmemory(PRISM),JournalofElectronicImaging,Vol.2(3)(1993)参照)をおこない、出力値を決定する。
【0103】
図10(a)は、補間演算を説明するための概念図である。実際の色空間は三次元であるが、説明のために、ここでは横軸を色空間座標、縦軸を出力値とする。また、図10(b)のようにLUTを実際の出力レンジより大きい値に設定し、補間結果を実際の出力レンジでクリッピングすることにより補間における中間階調をもつデータの範囲を調整することができる。
【0104】
このようにして、入力画素は、本装置によって、色空間上の距離が最も近い指定値の影響を最大限に受けた階調を持つキー信号となって出力される。また、このキー信号は、画像表示空間位置情報を全く使用しないので、画像の輪郭情報を一様に失うことがない、色情報に応じた階調情報を持つことができる。
【0105】
また、第1および第2の実施の形態と異なり、入力指定値特定手段904は、入力画像に対して処理をおこなわない前演算処理なので、指定値の数によらない一定の演算時間で、入力画像に対する出力値を演算するという効果も期待できる。従って、本装置により、処理の対象となる画像の内容に応じて、作業者が得たい信号を、階調を持つキー信号として出力することができる。
【0106】
なお、本実施形態において入力信号系の定義された色空間をYUV色空間としているが、RGB、YCbCr、YIQ、CMY、CMYK、L*a*b*、L*u*v*、HSV、HLSなど画像処理に一般に用いられる他の色空間を用いてもよく、また処理画像に応じて独自に定義した色空間を用いてもよい。
【0107】
なお、本実施の形態において、LUTは729個の値を持つものとしたが、その数は出力誤差が許される範囲内でこれより少なくてもよく、LUT演算手段908で実用的に処理可能な範囲内でこれより多くても同様の効果が期待できる。また、本実施例のLUT演算手段908における補間計算において、入力画素値を囲む近傍6点の値を用いたが、近傍8点などを用いた他の補間演算をおこなうハードウェアを用いてもよい。
【0108】
なお、本装置においては、出力指定値としてキー信号を設定したが、(表2)のように出力指定値に色空間上の座標値を設定してもよい。この場合、出力画像として、中間調を持つポスタリゼーション効果を施した画像を得ることができる。
【0109】
さらに、出力指定値に色空間上の座標値を設定する場合、出力指定値の値として入力指定値をそのまま設定しなくてもよい。入力指定値と出力指定値を異なる値に設定したり異なる色空間で定義される値に設定しておくことにより、ポスタリゼーション効果の実施後に得られる画像の配色を自由に設定することが可能となり、出力画像の定義される色空間も、システムの要請に合わせ自由に選択することが可能となる。
【0110】
なお、本装置では、入力指定値記録手段902、出力指定値記録手段903、LUTアドレス生成手段906、入力指定値特定手段904、出力指定値選択手段905は、専用ハードウェアを用いるとしているが、すべてパーソナルコンピュータと、そのメモリにロードされるソフトウェアで実現しても良い。
【0111】
【発明の効果】
以上のように、本発明によれば、入力画像は、色空間上の距離が最も近い指定値の影響を最大限に受けた階調を持つキー信号となって出力される。また、このキー信号の階調情報は、画像表示空間における位置情報とは無関係なので、画像の輪郭情報を一様に失うことがないという利点を持つ。
【0112】
つまり、処理の対象となる画像の内容に応じて、作業者が得たい信号を、階調を持つキー信号として出力することができる。
【0113】
なお、出力指定値に色空間上の座標値を設定した場合、出力画像として、作業者の得たい自由な配色のポスタリゼーション効果を施した出力画像を得ることができる。
【0114】
また、LUT(ルックアップテーブル)を用いた補間演算により、指定色の数によらない一定の演算時間で、入力画像に対する出力値を演算するという効果も期待できる。
【図面の簡単な説明】
【図1】第1の実施の形態の装置構成図
【図2】第1の実施の形態の近傍値演算手段の動作を説明するための図
【図3】第1の実施の形態の入力指定値特定手段と出力指定値選択手段の動作を説明するための図
【図4】第1の実施の形態の三次元色空間の分割図
【図5】第2の実施の形態の機能ブロック構成図
【図6】第2の実施の形態の入力指定値特定手段の動作を説明するための図
【図7】第2の実施の形態の三次元色空間の分割図
【図8】第2の実施の形態の出力演算を説明するためのグラフ
【図9】第3の実施の形態の装置構成図
【図10】第3の実施の形態の補間演算を説明するためのグラフ
【図11】第1の従来技術における装置の構成図
【図12】第1の従来技術における装置の選択信号生成部の動作を説明するためのグラフ
【図13】第1の従来技術における装置の乗算部の動作を説明するためのグラフ
【図14】第2の従来技術における装置の構成図
【図15】第2の従来技術における装置の信号変換部の動作を説明するためのグラフ
【図16】第2の従来技術における装置の三次元色空間の分割図
【図17】第2の従来技術における装置の三次元色空間を説明するための図
【符号の説明】
101 入力手段
102 指定値決定手段
103 入力指定値記録手段
104 出力指定値記録手段
105 近傍値演算手段
106 入力指定値特定手段
107 出力指定値選択手段
108 出力値演算手段
109 出力手段
501 指定値決定手段
502 入力指定値記録手段
503 出力指定値記録手段
504 入力指定値特定手段
505 出力値演算手段
506 入力手段
507 出力手段
901 指定値決定手段
902 入力指定値記録手段
903 出力指定値記録手段
904 入力指定値特定手段
905 出力指定値選択手段
906 LUTアドレス生成手段
907 LUT記録手段
908 LUT演算手段
909 入力手段
910 出力手段
1101 極座標変換部
1102 選択信号生成部
1103 選択信号生成部
1104 選択信号生成部
1105 乗算部
1401 信号変換部
1402 信号変換部
1403 信号変換部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an apparatus for performing a specific process on a color image, and in particular, an apparatus for extracting a specific area of a color image or a special effect (posterization effect) on an image by reducing the gradation of a natural image. Relates to the device.
[0002]
[Prior art]
(First prior art)
First, as a first conventional technique, a method for selecting an area using color information will be described with reference to the drawings.
[0003]
Area selection is called mask data generation in still image processing, and key signal generation in moving image processing, and is essential for processing a specific area independently from other areas in subsequent processing. It is a process.
[0004]
Both mask data and key signals are represented by values that have a maximum value in the selected part and a minimum value in the non-selected part, and have certain types of image data that have a format that conforms to the signal of the image to be processed. It is.
[0005]
Here, a case will be described in which a signal for selecting only a monochromatic background region, that is, a so-called key signal is generated from a television image of a person or the like by using color information in the image. In the actual video production site, this key signal is frequently generated as a preceding process in a device that replaces only the background of a captured video with another video, a so-called chroma key composition device.
[0006]
FIG. 11 is a block diagram showing a configuration of a conventional color data conversion apparatus that generates a key signal. If the three-dimensional signal components constituting the pixels of the input video are Y, U and V, the U and V signals which are the color difference components of the original signal in the polar
[0007]
FIG. 12 is a diagram for explaining the operation of the
[0008]
The selection signal for each component is subjected to a logical product in the
[0009]
Note that FIG. 13 shows a cross-sectional view in which the Y component in the divided color space is constant, that is, only the UV input color difference plane, but in practice, a specific region of the specific YUV space is selected three-dimensionally. Is done.
[0010]
In this manner, the key signal is generated based on the selection center value and the selection width preset for each color component by the first conventional technique.
[0011]
(Second prior art)
Next, as a second conventional technique, a special effect by reducing the number of gradations of color components in image processing, that is, a so-called posterization effect implementation method will be described with reference to the drawings.
[0012]
Posterization transforms an original natural image into an image expressed with a small number of colors that can be used in poster designs, etc., by reducing the gradation component of a natural image with multiple gradations to a specified number of gradations. Refers to image processing. The number that can be taken as the value of each component constituting the color is called the number of gradations, and the number that can be taken as the type of color expressed as a combination of the components is called the number of colors.
[0013]
Designers who produce advertisement images and others create works that they imagine by combining various natural effects, including posterization effects, with natural images. Among these special effects, the posterization effect is used widely in various scenes as a means for easily and effectively generating images expressed with a small number of colors such as cell images used for animation from material images. Yes.
[0014]
FIG. 14 is a block diagram showing a configuration of a conventional color data conversion apparatus for posterization. The components of the three-dimensional values (here, R, G, and B components) constituting the pixels of the input image are output with their gradations reduced by
[0015]
FIG. 15 is a diagram for explaining the signal conversion operation in the
[0016]
Here, since the values constituting the pixels of the input image have a three-dimensional component, when each component is expressed in two gradations, eight colors (2 to the third power) are expressed in three gradations. An output image with 27 colors (3 to the third power) is obtained. FIG. 16 shows an example of color space division when each component is expressed by three gradations. FIG. 16 shows only a cross-sectional view in which the B component in the divided color space is constant, that is, only the RG plane, but the color space is actually divided three-dimensionally.
[0017]
In this way, in the second conventional technique, the color space is fixedly divided, and the color of the input pixel belonging to the same divided region is changed to the same color representing the region, thereby changing the color of the input pixel. The number is decreasing.
[0018]
In the above description, each component of the pixel is represented by a value based on (R, G, B). However, as a three-dimensional value component used for posterization in the conventional method, processing of a television video signal, etc. In some cases, values such as (Y *, U *, V *) and (L *, a *, b *) defined in the uniform perceptual color space used for printing images and the like are used.
[0019]
[Problems to be solved by the invention]
However, in the key signal generation using the color information according to the first prior art, the three-dimensional signal constituting the pixel of the input video is converted into the selection signal independently for each component and then synthesized as the key signal. Therefore, there is a problem that the shape in the color space of the region selected as the key signal is limited to a certain shape along the axis of each component.
[0020]
For example, in the signal conversion as shown in FIG. 11, the color region to be finally selected is a fan shape (actually in the Y direction) as shown in FIG. Therefore, the distribution in the color space of the color to be selected is shaped like a region indicated by diagonal lines as shown in FIG. 17 with respect to the input image to be actually processed. If so, it is no longer possible to cut out such a color region. In other words, when the color to be selected is distributed in a direction inclined with respect to the defined axis of any component of the three-dimensional signal, it is difficult to accurately cut out the region.
[0021]
Further, the selection center value and selection width of the cut-out area to be input are also subject to the skill of the operator, and a method that can easily obtain an optimum value is desired.
[0022]
In many cases, the key signal is used as weight data for determining the degree of image editing effects such as image synthesis and color adjustment in post-processing. When the key signal is binary, a pseudo contour may occur in the edited image, so it is desired that the key signal itself has a gradation.
[0023]
In the posterization effect implementation method according to the second prior art, the gradation division method and the color scheme of the image after the effect are applied depend on each component of the three-dimensional values constituting the pixel and the designated number of gradations. It is determined uniquely. That is, when the input signal is reduced to three gradations, it is similarly fixedly divided into three as shown in FIG. 15, and these division methods are uniformly determined irrespective of the image to be implemented. Is. Therefore, there is a problem that an optimal posterization effect according to the content and type of the image cannot be performed.
[0024]
As for the color arrangement, the color space is divided evenly and each area is painted with each representative color, and there is no room for reflecting the operator's intention.
[0025]
Therefore, the present invention solves the above-described conventional problems, and in performing area selection using color information, a simple operation allows a free shape in the color space in which each component of the input signal is defined. It is an object of the present invention to provide a color data conversion apparatus that can cut out the above-mentioned area and can further have an intermediate gradation in the selection signal output.
[0026]
It is another object of the present invention to provide a color data conversion device that can use any number of colors and color schemes by free color division with a simple operation in implementing the posterization effect.
[0027]
[Means for Solving the Problems]
In order to solve this problem, a first color data conversion device according to the present invention is a color data conversion device that converts color data of pixels constituting a color image, and represents a representative when a key signal is created. Input designation value recording means for recording the coordinate value of the color in the three-dimensional color space, and output designation value recording for recording information for determining whether or not to select each input designation value as a key signal Means, input value determining means for determining the input specified value and output specified value, input means for outputting the input image for each pixel, and calculating the coordinate value in the vicinity considering the input pixel as a coordinate value in the color space Selected by the input specified value specifying means, the input specified value specifying means for calculating the distance between the input value and all input specified values in the three-dimensional color space, and specifying the input specified value closest to the distance Input specification value Output designation value selection means for outputting the corresponding output designation value, output value calculation means for multiplying and outputting the outputs from the output value selection means, and displaying the key signal output from the output value calculation means as image information Or the output means to record is provided, It is characterized by the above-mentioned.
[0028]
A second color data conversion apparatus according to the present invention is a color data conversion apparatus that converts color data of pixels constituting a color image, and is similar to the first color data conversion apparatus. In addition to the value recording means, the output designated value recording means, the designated value determining means, the input means, and the output means, the three-dimensional color of the color data of the pixels constituting the color image and the input designated values recorded in the input value designating means The input specified value that minimizes the distance by calculating and comparing the distance in the space, the input specified value specifying means for specifying the input specified value having the second smallest distance, and the input specified value specifying means Output calculating means for determining output using output specified values corresponding to two input specified values.
[0029]
A third color data conversion apparatus according to the present invention is a color data conversion apparatus that converts color data of pixels constituting a color image, and is the same as the first color data conversion apparatus. In addition to the value recording means, the output designated value recording means, the designated value determining means, the input means, and the output means, the coordinates of the color data obtained by equally sampling the three-dimensional color space for each axis are look-up table (LUT) coordinate values. The LUT address generation means that outputs the input specified value and the input specified value that minimizes the distance by calculating and comparing the distance in the three-dimensional color space between the color data output from the LUT address generating means and each input specified value. An input specified value specifying means to be specified and an output specified value corresponding to the input specified value specified by the input specified value specifying means are read from the output specified value recording means and output. Force value selection means, LUT recording means for recording data output from the output value selection means as LUT, and interpolation using a plurality of data of the LUT recording means with color data of pixels constituting a color image as coordinate values LUT calculation means for determining an output value by calculation is provided.
[0030]
Further, the fourth color data conversion apparatus according to the present invention is the same as the first color data conversion apparatus, that is, input designation value recording means, output designation value recording means, designation value determining means, input means, and output means. In addition to the input specified value specifying means, output specified value selecting means, and output value calculating means, the input pixel is considered as a coordinate value in the color space, and its neighboring coordinate values are calculated, and the number of color data to be output is determined. And a neighborhood value calculation means having a user interface.
[0031]
Further, the fifth color data conversion apparatus according to the present invention is the same as the first color data conversion apparatus, that is, input designation value recording means, output designation value recording means, designation value determining means, input means, and output means. In addition to the input specified value specifying means, the output specified value selecting means, and the output value calculating means, the input pixels are considered as coordinate values in the color space, the coordinate values in the vicinity thereof are calculated, and the colors of the pixels constituting the color image It has a neighborhood value calculation means having a user interface for determining the distance between the data and the output color data.
[0032]
Further, a sixth color data conversion apparatus according to the present invention is the same as the first color data conversion apparatus, that is, an input designated value recording means, an output designated value recording means, a designated value determining means, an input means, and an output means. In addition to the input specified value specifying means, the output specified value selecting means, and the neighborhood value calculating means, for the output from the output specified value determining means, the color data and the color image which are the inputs of the output specified value determining means are configured It is characterized by having output calculation means for multiplying and adding weights corresponding to the distance from the color data of the pixel to be processed.
[0033]
A seventh color data conversion apparatus according to the present invention is a color data conversion apparatus that converts color data of pixels constituting a color image, and is similar to the second color data conversion apparatus. In addition to the value recording means, the output specified value recording means, the specified value determining means, the input means, the output means, and the input specified value specifying means, the output specified values corresponding to the two input specified values specified by the input specified value specifying means and And an output calculation means for determining an output using distance information between a surface having the same distance from two input designation values and color data of pixels constituting a color image.
[0034]
An eighth color data conversion apparatus according to the present invention is a color data conversion apparatus that converts color data of pixels constituting a color image, and is similar to the second color data conversion apparatus. In addition to the value recording means, the output designated value recording means, the designated value determining means, the input means, the output means, and the input designated value specifying means, the surface having the same distance from the two input designated values and the color data of the pixels constituting the color image, If the distance is more than a certain threshold, there is an output calculation means for determining the output by a weight function such that the output is equal to the output specified value corresponding to the input specified value at which the distance is minimum. Features.
[0035]
DETAILED DESCRIPTION OF THE INVENTION
(Embodiment 1)
The first embodiment of the present invention, which is an apparatus for extracting signal information as a key from a moving image, will be described in detail below.
[0036]
FIG. 1 is a diagram illustrating a configuration of a color data conversion apparatus according to the first embodiment. In FIG. 1, 101 is an input means, 102 is a designated value determining means, 103 is an input designated value recording means, 104 is an output designated value recording means, 105 is a neighborhood value calculating means, 106 is an input designated value specifying means, and 107 is an output. Designated value selection means 108, output value calculation means 108, and 109 output means.
[0037]
The
[0038]
Table 1 is an example of data recorded in the input specified value recording unit 103 and the output specified value recording unit 104. The input designation value recording means 103 records the coordinate value in the three-dimensional color space of a representative color when creating a key signal as an input designation value, and is composed of a rewritable memory.
[0039]
The output designation value recording means 104 records information for determining whether or not to select each input designation value as a key signal as an output designation value, and is constituted by a rewritable memory.
[0040]
[Table 1]
[0041]
The specified value determining means 102 determines an input specified value and an output specified value, and includes a moving image capture board and a personal computer equipped with a graphical user interface.
[0042]
The neighborhood value calculation means 105 considers an input pixel as a coordinate value in the color space, calculates a coordinate value in the vicinity of the input pixel, and outputs it to the input designation value specifying means 106, and includes an adder and a buffer.
[0043]
The input specified value specifying means 106 is an adder that calculates the distance in the three-dimensional color space between the coordinate value obtained by the neighborhood value calculating means 105 and all the input specified values recorded in the input specified value recording means 103. And a multiplier, and a comparator for selecting an input designation value having the closest distance.
[0044]
The output designation value selection means 107 selects an output designation value corresponding to the input designation value selected by the input designation value identification means 106 from the output designation value recording means 103 and outputs it as a value corresponding to the input coordinate value. The selector is output to the value calculation means 108.
[0045]
The output value calculation means 108 is a product-sum of outputs from the output value selection means 107, and is constituted by a buffer, a multiplier, and an adder.
[0046]
The
[0047]
The operation of the present apparatus configured as described above will be described.
First, the input image is input to the neighborhood value calculation means 105 as a coordinate value in the three-dimensional color space for each pixel. Here, it is assumed that the pixel has Yuv color space coordinates of CCIR601 recommendation having three attributes of luminance and color difference.
[0048]
Next, as shown in FIG. 2, the coordinates of six points near the point separated by δ along each axis of the Yuv are calculated by the neighborhood
[0049]
On the other hand, the designated
[0050]
In the input specified value recording means 103 and the output specified value recording means 104, the coordinate value in the three-dimensional color space of a representative color when generating a key signal as shown in (Table 1) and its color are selected. (255) or (0) is recorded and may be prepared and recorded in advance, or may be determined and recorded by the user using the designated value determining means 102 each time. .
[0051]
FIG. 3 is a flowchart for explaining the operation of the input specified value specifying means 106 and the output specified
[0052]
FIG. 4A is a diagram showing how the three-dimensional color space is divided, and is a cross-sectional view in the uv plane where Y is constant. For the sake of display, a cross section in which Y is constant is displayed, but the actual color space division is three-dimensional. White circles in the figure correspond to the input designation values in (Table 1), and x marks correspond to the input values. Arbitrary points on the color space are divided so as to belong to the region of the input designation value that is closest in distance. A space division diagram by such a method is generally called a Voronoi Diagram. When an input value belonging to the divided area surrounded by the boundary line is given by the operation of the input specified value specifying means 106 and the output specified value selecting means 107, an output value corresponding to a white circle in the area is output. That is, the output value is converted into a value of 0 or 255 by the output designated value selection means 107.
[0053]
However, considering that the key signal is used as data for determining the degree of image editing effects such as image synthesis and color adjustment in post-processing, it is desirable that the signal itself has a gradation. Therefore, in the output value calculation means 107, the six output values corresponding to the input value and its neighboring values are multiplied and summed by the calculation of (Equation 1), and output as an 8-gradation key signal corresponding to the input value. . Here, ki is an output value of the output selection means, qi is a weighting factor, and k ^ is an output.
[0054]
[Expression 1]
[0055]
In other words, as shown in FIG. 4B, the process of smoothing the boundary of the region in the three-dimensional color space using the nearby points is performed. Then, the key signal output from the output value calculation means 108 corresponding to the input pixel is displayed or recorded as image information by the output means 109.
[0056]
In this way, the input pixel is output as a key signal having a gradation having the maximum influence of the designated value having the closest distance in the color space by this apparatus. Further, since this key signal does not use any image display space position information, it can have gradation information corresponding to the color information without losing the contour information of the image uniformly.
[0057]
Therefore, this apparatus can output a signal that the operator wants to obtain as a key signal having gradation according to the content of the image to be processed.
[0058]
In this embodiment, the color space defined for the input signal system is a YUV color space. However, RGB, YCbCr, YIQ, CMY, CMYK, L * a * b *, L * u * v *, HSV, HLS Other color spaces that are generally used for image processing may be used, or a color space that is uniquely defined according to the processed image may be used.
[0059]
In this embodiment, the distance in the color space compared by the input designation
[0060]
The neighborhood value calculation means 105 and the output value calculation means 108 may have a configuration for storing six data. The input specified value specifying means 106 can be obtained by sequentially outputting six output values from the buffer. It is also possible to adopt a configuration without a plurality of output designated value selection means 107.
[0061]
Also, the neighborhood value calculation means 102 of this apparatus outputs 6 points as neighborhood values, but it can be set to output 8 points, 12 points, or more data as long as the calculation cost is allowed. A user interface may be provided, and output of a key signal having more gradations can be expected by increasing the number of points.
[0062]
Further, the neighborhood value calculation means 105 may be provided with an interface that allows the user to set the distance range δ. By changing δ, the ratio of the data having the intermediate gradation of the key signal can be changed. .
[0063]
In this apparatus, the key signal is set as the output designation value. However, a coordinate value in the color space may be set as the output designation value as shown in (Table 2). In this case, an image having a posterization effect having a halftone can be obtained as an output image.
[0064]
[Table 2]
[0065]
Further, when a coordinate value in the color space is set as the output specified value, the input specified value may not be set as it is as the value of the output specified value. By setting the input specified value and output specified value to different values or values defined in different color spaces, it becomes possible to freely set the color scheme of the image obtained after the implementation of the posterization effect, The color space in which the output image is defined can also be freely selected according to the system requirements.
[0066]
In this apparatus, the input specified value recording means 103, the output specified value recording means 104, the neighborhood value calculating means 105, the input specified value specifying means 106, the output specified value selecting means 107, and the output value calculating means 108 are dedicated hardware. However, it may be realized by a personal computer and software loaded in the memory.
[0067]
(Embodiment 2)
Hereinafter, a second embodiment of the present invention, which is an apparatus for extracting signal information as a key from a still image, will be described in detail.
[0068]
FIG. 5 is a diagram showing functional blocks of the device according to the second embodiment of the present invention. In FIG. 5, 501 is a designated value determining means, 502 is an input designated value recording means, 503 is an output designated value recording means, 504 is an input designated value specifying means, 505 is an output value calculating means, 506 is an input means, and 507 is an output. Means.
[0069]
The designated value determining means 501 is used by a user to extract an input designated value from an input image or a color palette and determine an output designated value corresponding to the input designated value, and is configured by a pointing device such as a mouse and a graphical user interface. The
[0070]
(Table 3) is an example of data recorded in the input specified
[0071]
[Table 3]
[0072]
The input designation
[0073]
The output value calculation means 505 uses the two input designation values from the input designation value specifying means 504 and the corresponding output designation values to indicate whether or not the input color data is a selection signal. Is calculated and output.
[0074]
The
[0075]
The operation of the apparatus according to this embodiment configured as described above will be described.
First, the user uses the mouse of the specified value determining means 501 to extract an input specified value from an input image or a color palette displayed on the monitor, and determines a corresponding output specified value. The designated data is recorded in the input designated
[0076]
The input specified value and the output specified value are the same as those described in the first embodiment except that the color space coordinates of the input specified value are CIE L * a * b *, and thus description thereof is omitted.
[0077]
The input image displayed on the monitor is input to the input designation
[0078]
FIG. 6A is a flowchart for explaining the operation of the input designation
[0079]
FIG. 7 is a diagram showing how the three-dimensional color space is divided, and is a cross-sectional view in the a * b * plane in which L * is constant. For the convenience of display, a cross section in which L * is constant is displayed, but the actual color space division is three-dimensional. The x mark p in the figure is a coordinate value of a certain input value in the color space, the
[0080]
In the output value calculation means 505, the output designation values corresponding to the
[0081]
FIG. 8A is a graph when the output of the region created by Voronoi division is used as a key signal as it is, and FIG. 8B is obtained by (Equation 2), (Equation 3), and (Equation 4). It is a graph showing the output to be output. Here, the horizontal axis of the figure is the distance from the
[0082]
[Expression 2]
[0083]
[Equation 3]
[0084]
[Expression 4]
[0085]
As described above, the output signal is derived from the output designation values corresponding to the
[0086]
In this way, the input pixel is output as a key signal having a gradation having the maximum influence of the designated value having the closest distance in the color space by this apparatus. Further, since this key signal does not use any image display space position information, it can have gradation information corresponding to the color information without losing the contour information of the image uniformly.
[0087]
Therefore, the apparatus according to the present embodiment can output a signal that the operator wants to obtain as a key signal having gradation according to the content of the image to be processed.
[0088]
In this embodiment, the defined color space of the input signal system is the L * a * b * color space. However, RGB, YCbCr, YIQ, CMY, CMYK, YUV, L * u * v *, HSV, HLS Other color spaces that are generally used for image processing may be used, or a color space that is uniquely defined according to the processed image may be used. In this embodiment, the distance in the color space compared by the input designation
[0089]
The output value calculating means 505 may be provided with an interface that allows the user to set the distance range δ. By changing δ, the ratio of data having an intermediate gray level of the key signal can be changed. .
[0090]
In this apparatus, the key signal is set as the output designation value, but a coordinate value in the color space may be set as the output designation value as shown in (Table 4). In this case, an image having a posterization effect having a halftone can be obtained as an output image.
[0091]
[Table 4]
[0092]
Further, when a coordinate value in the color space is set as the output specified value, the input specified value may not be set as it is as the value of the output specified value. By setting the input specified value and output specified value to different values or values defined in different color spaces, it becomes possible to freely set the color scheme of the image obtained after the implementation of the posterization effect, The color space in which the output image is defined can also be freely selected according to the system requirements.
[0093]
Although the embodiment of the present invention is configured by a personal computer and a program loaded in its memory, a part or all of the functional blocks in FIG. 5 may be replaced with dedicated hardware.
[0094]
(Embodiment 3)
Hereinafter, a third embodiment of the present invention, which is a device for extracting signal information as a key from a moving image, will be described with reference to the drawings. FIG. 9 is a diagram showing a configuration of an apparatus according to the third embodiment of the present invention.
[0095]
In FIG. 9, 901 is a designated value determining means, 902 is an input designated value recording means, 903 is an output designated value recording means, 904 is an input designated value specifying means, 905 is an output designated value selecting means, 909 is an input means, and 910 is Since the output means is the same as that of the first embodiment, description thereof will be omitted.
[0096]
[0097]
The operation of the present apparatus configured as described above will be described.
First, in the designated
[0098]
Next, from the LUT
[0099]
In the LUT recording unit 907, the output from the output designation
[0100]
The input image is input to the LUT calculation unit 908 as a coordinate value in the three-dimensional color space for each pixel. Here, it is assumed that the pixel has Yuv color space coordinates of CCIR901 recommendation having three attributes of luminance and color difference.
[0101]
Next, an output corresponding to the input coordinate value is interpolated by the LUT calculating means 908, output to the output means 910, and displayed or recorded as image information by the output means 910. Since the
[0102]
Here, the interpolation calculation using the LUT will be described in detail. The LUT recording unit 907 has output values corresponding to the coordinate values of 729 lattice points corresponding to the vertices of 512 cubes obtained by equally dividing the three-dimensional color space into eight axes. The LUT reference means is a PRISM interpolation calculation using data of six neighboring points corresponding to the vertices surrounding the input value among the values of the grid points of the LUT (refer to Fastcolor processor interpolation programmable memory (PRISM), JournalofElectricalImag. 93). ) To determine the output value.
[0103]
FIG. 10A is a conceptual diagram for explaining the interpolation calculation. Although the actual color space is three-dimensional, for the sake of explanation, the horizontal axis is the color space coordinate and the vertical axis is the output value. Further, as shown in FIG. 10B, the range of data having intermediate gradations in the interpolation can be adjusted by setting the LUT to a value larger than the actual output range and clipping the interpolation result in the actual output range. it can.
[0104]
In this way, the input pixel is output as a key signal having a gradation having the maximum influence of the designated value having the closest distance in the color space by this apparatus. Further, since this key signal does not use any image display space position information, it can have gradation information corresponding to the color information without losing the contour information of the image uniformly.
[0105]
Unlike the first and second embodiments, the input designated
[0106]
In this embodiment, the color space defined for the input signal system is a YUV color space. However, RGB, YCbCr, YIQ, CMY, CMYK, L * a * b *, L * u * v *, HSV, HLS Other color spaces that are generally used for image processing may be used, or a color space that is uniquely defined according to the processed image may be used.
[0107]
In the present embodiment, the LUT has 729 values. However, the number may be smaller than that within an allowable range of output error, and can be practically processed by the LUT calculation means 908. A similar effect can be expected even if the number is larger than this within the range. In addition, in the interpolation calculation in the LUT calculation unit 908 of the present embodiment, the values of the six neighboring points surrounding the input pixel value are used. However, hardware that performs other interpolation calculations using the eight neighboring points may be used. .
[0108]
In this apparatus, the key signal is set as the output designation value. However, a coordinate value in the color space may be set as the output designation value as shown in (Table 2). In this case, an image having a posterization effect having a halftone can be obtained as an output image.
[0109]
Further, when a coordinate value in the color space is set as the output specified value, the input specified value may not be set as it is as the value of the output specified value. By setting the input specified value and output specified value to different values or values defined in different color spaces, it becomes possible to freely set the color scheme of the image obtained after the implementation of the posterization effect, The color space in which the output image is defined can also be freely selected according to the system requirements.
[0110]
In this apparatus, the input specified value recording unit 902, the output specified value recording unit 903, the LUT
[0111]
【The invention's effect】
As described above, according to the present invention, the input image is output as a key signal having a gradation that is maximally influenced by the designated value having the closest distance in the color space. Further, since the gradation information of the key signal is not related to the position information in the image display space, there is an advantage that the contour information of the image is not lost uniformly.
[0112]
That is, a signal that the operator wants to obtain can be output as a key signal having gradation according to the content of the image to be processed.
[0113]
When a coordinate value in the color space is set as the output designation value, an output image having a posterization effect with a free color scheme desired by the operator can be obtained as the output image.
[0114]
In addition, an effect of calculating an output value for an input image in a fixed calculation time that does not depend on the number of designated colors can be expected by interpolation using a LUT (look-up table).
[Brief description of the drawings]
FIG. 1 is an apparatus configuration diagram of a first embodiment.
FIG. 2 is a diagram for explaining the operation of the neighborhood value calculation means of the first embodiment;
FIG. 3 is a diagram for explaining operations of an input designated value specifying unit and an output designated value selecting unit according to the first embodiment;
FIG. 4 is a division diagram of a three-dimensional color space according to the first embodiment.
FIG. 5 is a functional block configuration diagram of the second embodiment;
FIG. 6 is a diagram for explaining an operation of an input designation value specifying unit according to the second embodiment;
FIG. 7 is a division diagram of a three-dimensional color space according to the second embodiment.
FIG. 8 is a graph for explaining an output calculation according to the second embodiment;
FIG. 9 is an apparatus configuration diagram of the third embodiment.
FIG. 10 is a graph for explaining the interpolation calculation according to the third embodiment;
FIG. 11 is a block diagram of an apparatus according to the first prior art.
FIG. 12 is a graph for explaining the operation of the selection signal generation unit of the device according to the first conventional technique;
FIG. 13 is a graph for explaining the operation of the multiplication unit of the device according to the first prior art;
FIG. 14 is a block diagram of an apparatus according to the second prior art.
FIG. 15 is a graph for explaining the operation of the signal conversion unit of the apparatus according to the second prior art.
FIG. 16 is a division diagram of the three-dimensional color space of the apparatus according to the second prior art.
FIG. 17 is a diagram for explaining a three-dimensional color space of an apparatus according to the second prior art.
[Explanation of symbols]
101 Input means
102 Specified value determination means
103 Input designation value recording means
104 Output specified value recording means
105 Neighborhood value calculation means
106 Input specified value specifying means
107 Output designation value selection means
108 Output value calculation means
109 Output means
501 Specified value determination means
502 Input designation value recording means
503 Output specified value recording means
504 Input specification value specifying means
505 Output value calculation means
506 Input means
507 Output means
901 Specified value determination means
902 Input designation value recording means
903 Output specified value recording means
904 Input designation value specifying means
905 Output specified value selection means
906 LUT address generation means
907 LUT recording means
908 LUT calculation means
909 input means
910 Output means
1101 Polar coordinate converter
1102 Selection signal generator
1103 Selection signal generator
1104 Selection signal generator
1105 Multiplier
1401 Signal converter
1402 Signal converter
1403 Signal converter
Claims (4)
前記入力指定値ごとに対応づけられた値であって最終的に出力させたいものを出力指定値として記録している出力指定値記録手段と、
前記カラー画像を構成する画素の色彩データが与えられると、三次元色空間上でその色彩からある距離にある色彩データを出力する近傍値演算手段と、
前記カラー画像を構成する画素の色彩データと前記近傍値演算手段の出力である色彩データの各々について前記入力値指定手段に記録された各入力指定値との三次元色空間における距離を算出して比較することによりその距離が最小となる入力指定値を特定する入力指定値特定手段と、
前記入力指定値特定手段によって特定された入力指定値に対応する出力指定値を前記出力指定値記録手段から読み出して出力する出力指定値選択手段と、
前記カラー画像を構成する画素の色彩データと前記近傍値演算手段の出力である色彩データの各々について前記出力指定値選択手段によって特定された出力を積和演算して出力する出力演算手段と
を備えることを特徴とする色彩データ変換装置。A color data conversion device for converting color data of pixels constituting a color image, wherein an input designated value is a reference color for dividing a three-dimensional color space used for specifying the color into predetermined regions Input designation value recording means recording as:
An output designation value recording means for recording an output designation value that is a value associated with each of the input designation values and that is to be finally output;
Given the color data of the pixels constituting the color image, neighborhood value calculation means for outputting color data at a certain distance from the color in a three-dimensional color space;
Calculating a distance in a three-dimensional color space between each of the input specified values recorded in the input value specifying means for each of the color data of the pixels constituting the color image and the color data as the output of the neighborhood value calculating means; An input specification value specifying means for specifying an input specification value that minimizes the distance by comparing;
An output designation value selecting means for reading out and outputting an output designation value corresponding to the input designation value identified by the input designation value identification means from the output designation value recording means;
Output calculation means for multiplying and outputting the output specified by the output designated value selection means for each of the color data of the pixels constituting the color image and the color data output from the neighborhood value calculation means. A color data converter characterized by the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29144396A JP3780587B2 (en) | 1996-11-01 | 1996-11-01 | Color data converter |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29144396A JP3780587B2 (en) | 1996-11-01 | 1996-11-01 | Color data converter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH10136220A JPH10136220A (en) | 1998-05-22 |
| JP3780587B2 true JP3780587B2 (en) | 2006-05-31 |
Family
ID=17768943
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP29144396A Expired - Lifetime JP3780587B2 (en) | 1996-11-01 | 1996-11-01 | Color data converter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3780587B2 (en) |
-
1996
- 1996-11-01 JP JP29144396A patent/JP3780587B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH10136220A (en) | 1998-05-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4804660B2 (en) | Noise reduction method using color information for digital image processing | |
| JP4209599B2 (en) | Two-dimensional nonlinear interpolation system and interpolation method, and two-dimensional mixed interpolation system and mixed interpolation method | |
| JP3830747B2 (en) | Color reproduction range compression method and color reproduction range compression apparatus | |
| US20120057785A1 (en) | Method and system to modify a color lookup table | |
| JP3715719B2 (en) | Image processing apparatus and method, and computer-readable memory | |
| US7755670B2 (en) | Tone-conversion device for image, program, electronic camera, and tone-conversion method | |
| US5442717A (en) | Sharpness processing apparatus | |
| JP2001014454A (en) | Picture processor | |
| JP4243362B2 (en) | Image processing apparatus, image processing method, and recording medium recording image processing program | |
| JPH05244406A (en) | Color adjustment device | |
| JP2879006B2 (en) | Color data converter | |
| JP2876853B2 (en) | Color converter | |
| JP3780587B2 (en) | Color data converter | |
| JP2006121432A (en) | Image processor and correction processing method therein | |
| JP3787393B2 (en) | Image processing apparatus and method | |
| JPH0814843B2 (en) | Color conversion method and color conversion device | |
| JP3953897B2 (en) | Image processing apparatus, image processing method, and medium on which image processing program is recorded | |
| JPH05284346A (en) | Color converter | |
| JP4708866B2 (en) | Lookup table creation device and method, and lookup table creation program | |
| JPH0799586A (en) | Color conversion device | |
| JPH07262351A (en) | Image processing apparatus and control method thereof | |
| JP3215156B2 (en) | Color image processing method | |
| JP3426372B2 (en) | Method and apparatus for creating color conversion lookup table | |
| JP2001320593A (en) | Image processing apparatus, image forming apparatus having the same, and image processing method | |
| JP2009296139A (en) | Image processor, image processing method and computer program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20050623 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20051115 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20051122 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060120 |
|
| 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: 20060214 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060227 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100317 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110317 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110317 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120317 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130317 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130317 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140317 Year of fee payment: 8 |
|
| EXPY | Cancellation because of completion of term |