JP3605856B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3605856B2
JP3605856B2 JP17252994A JP17252994A JP3605856B2 JP 3605856 B2 JP3605856 B2 JP 3605856B2 JP 17252994 A JP17252994 A JP 17252994A JP 17252994 A JP17252994 A JP 17252994A JP 3605856 B2 JP3605856 B2 JP 3605856B2
Authority
JP
Japan
Prior art keywords
saturation
luminance
digital image
signals
correction coefficient
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 - Fee Related
Application number
JP17252994A
Other languages
Japanese (ja)
Other versions
JPH0837603A (en
Inventor
仁 卜部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP17252994A priority Critical patent/JP3605856B2/en
Publication of JPH0837603A publication Critical patent/JPH0837603A/en
Application granted granted Critical
Publication of JP3605856B2 publication Critical patent/JP3605856B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/11Scanning of colour motion picture films, e.g. for telecine

Landscapes

  • Picture Signal Circuits (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Description

【0001】
【産業上の利用分野】
本発明は画像処置装置に係り、特にカラー画像を撮影して得たデジタル画像信号R,G,Bをデジタル処理する画像処理装置に関する。
【0002】
【従来の技術】
従来、ネガフイルムのカラー画像をイメージセンサで撮像し、そのカラー画像を示す映像信号をモニタTVやビデオプリンタに出力することができるフイルムスキャナが提案されている。
この種のフイルムスキャナでは、イメージセンサから出力されるR,G,B信号に対して白バランス、黒バランス、ネガポジ反転、ガンマ補正等の画像処理が行われ、またガンマ補正されたR,G,B信号はYCC変換回路によって輝度信号Yとクロマ信号CR,に変換する処理が行われている。
【0003】
ところで、上記R,G,B信号の白バランス、黒バランスを調整する場合、イメージセンサから出力されるR,G,B信号から各色別に基準最小値及び基準最大値を算出し、これらの基準最小値及び基準最大値がそれぞれ映像信号の最小及び最大の階調を示すようにR,G,B信号別にオフセットするとともに、ゲイン調整するようにしている。
【0004】
【発明が解決しようとする課題】
ところで、上記のようにしてR,G,B信号の階調を調整すると、ネガフイルム上の濃度レンジの広さ(上記基準最小値と基準最大値との輝度比が大きさ)に応じて、後段のガンマ補正におけるトータルガンマが相対的に変化し、輝度比が大きい場合には相対的に小さいトータルガンマが使用され、輝度比か小さい場合には相対的に大きいトータルガンマが使用される。
【0005】
これにより輝度比が大きい場合には彩度が低下し、輝度比か小さい場合には彩度が強調されるという問題がある。
また、カラー画像には撮影光源、光質により彩度の高い絵柄や、彩度の低い絵柄があるが、従来、絵柄によって自動的に彩度を補正して好ましい色調になるように色再現するようにしたものがなかった。
【0006】
本発明はこのような事情に鑑みてなされたもので、カラー画像の濃度レンジによる彩度変動が少なく、また絵柄に応じて自動的に良好な色再現を実現することができる画像処理装置を提供することを目的とする。
【0007】
【課題を解決するための手段】
本発明は前記目的を達成するために、カラー画像を撮影して得た画像信号から最大輝度及び最小輝度を求め、該最大輝度及び最小輝度がそれぞれ所定の階調となるように前記画像信号を補正した後、ガンマ補正して赤、緑、青を示すデジタル画像信号R,G,Bを得る画像処理手段と、予め3×3行列(A11〜A33)を1セットとする複数セットの彩度補正係数を記憶する記憶手段と、前記複数セットの彩度補正係数から前記最大輝度と最小輝度との輝度比が大きい場合には彩度を強調する彩度補正係数を選択し、輝度比が小さい場合には彩度を低減する彩度補正係数を選択する選択手段と、前記デジタル画像信号R,G,Bと前記選択した彩度補正係数とに基づいて、次式、

Figure 0003605856
の演算を実行して彩度補正したデジタル画像信号R′,G′,B′を算出する演算手段とを備えたことを特徴としている。
【0008】
また、本発明は、カラー画像を撮影して得た画像信号から最大輝度及び最小輝度を求め、該最大輝度及び最小輝度がそれぞれ所定の階調となるように前記画像信号を補正した後、ガンマ補正して赤、緑、青を示すデジタル画像信号R,G,Bを得る画像処理手段と、予め4つの係数KRR,KRB,KBR,KBBを1セットとする複数セットの彩度補正係数を記憶する記憶手段と、前記複数セットの彩度補正係数から前記最大輝度と最小輝度との輝度比が大きい場合には彩度を強調する彩度補正係数を選択し、輝度比が小さい場合には彩度を低減する彩度補正係数を選択する選択手段と、前記デジタル画像信号R,G,Bと前記選択した彩度補正係数とに基づいてクロマ信号C,Cを、次式、
=KRR(R−G)+KRB(B−G)
=KBR(R−G)+KBB(B−G)
から算出する演算手段とを備えたことを特徴としている。
【0010】
に、請求項に記載の画像処理装置において、前記演算手段は、前記デジタル信号R,G,Bに基づいて輝度信号Yを、次式、
Y ={(R/2+R/8)+(G+G/8)+B/4}/2
によって算出し、
前記クロマ信号CR ,CB を算出するために4つの係数KRR,KRB,KBR,KBBを、それぞれ次式、
RR=NRR/2N1, −KRB=NRB/2N2
−KBR=NBR/2N3, KBB=NBB/2N4
(但し、NRR〜NBB及びN1〜N4は整数)
で表現されたものを使用することを特徴としている。
【0011】
【作用】
本発明によれば、画像信号の最大輝度及び最小輝度がそれぞれ所定の階調となるように階調補正した後、ガンマ補正して赤、緑、青を示すデジタル画像信号R,G,Bを得る画像処理系において、最小輝度と最大輝度との輝度比が大きい場合には、彩度を強調する彩度補正係数を使用し、輝度比か小さい場合には彩度を低減する彩度補正係数を選択し、この選択した彩度補正係数を使用して前記デジタル画像信号R,G,Bから彩度補正したデジタル画像信号R′,G′,B′を算出するようにしている。即ち、予め3×3行列(A11〜A33)を1セットとする複数セットの彩度補正係数を準備し、この複数セットの彩度補正係数から前記輝度比に応じて適宜の彩度補正係数を選択する。そして、前記デジタル画像信号R,G,Bと前記選択した彩度補正係数とに基づいて、次式、
Figure 0003605856
の演算を実行して彩度補正したデジタル画像信号R′,G′,B′を求めるようにしている。
【0012】
本発明の他の態様によれば、デジタル画像信号R,G,Bと4つの係数KRR,KRB,KBR,KBBを1セットとする彩度補正係数とに基づいてクロマ信号C,Cを、次式、
=KRR(R−G)+KRB(B−G)
=KBR(R−G)+KBB(B−G)
から算出する際に、上記と同様にして輝度比の大きさによって彩度補正係数を可変にしている。
【0013】
本発明の更に他の態様によれば、請求項2に記載の画像処理装置において、デジタル信号R,G,Bに基づいて輝度信号Yを、次式、
Y ={(R/2+R/8)+(G+G/8)+B/4}/2
によって算出し、
前記クロマ信号CR ,CB を算出するために4つの係数KRR,KRB,KBR,KBBを、それぞれ次式、
RR=NRR/2N1, −KRB=NRB/2N2
−KBR=NBR/2N3, KBB=NBB/2N4
(但し、NRR〜NBB及びN1〜N4は整数)
で表現されたものを使用し、これによりYCC変換を行う回路の簡略化を図るようにしている。
【0014】
【実施例】
以下添付図面に従って本発明に係る画像処理装置の好ましい実施例を詳説する。
図1は本発明が適用されるフイルムスキャナの一実施例を示す要部ブロック図である。このフイルムスキャナは、主として照明用の光源10、撮影レンズ12、CCDラインセンサ14、アナログアンプ16、A/Dコンバータ18、デジタル信号処理回路20、モータ31、キャプスタン32及びピンチローラ33を含むフイルム駆動装置、中央処理装置(CPU)40等を備えている。
【0015】
光源10は、フイルムカートリッジ50内から引き出される現像済みのネガフイルム52を図示しない赤外カットフィルタを介して照明し、フイルム52を透過した透過光は、撮影レンズ12を介してCCDラインセンサ14の受光面に結像される。
CCDラインセンサ14は、フイルム搬送方向と直交する方向に1024画素分の受光部が配設されており、CCDラインセンサ14の受光面に結像された画像光は、R,G,Bフィルタが設けられて各受光部で電荷蓄積され、光の強さに応じた量のR,G,Bの信号電荷に変換される。このようにして蓄積されたR,G,Bの電荷は、CCD駆動回路15から加えられる1ライン周期のリードゲートパルスが加えられると、シフトレジスタに転送されたのちレジスタ転送パルスによって順次電圧信号として出力される。また、このCCDラインセンサ14は、各受光部に隣接してシャッターゲート及びシャッタードレインが設けられており、このシャッターゲートをシャッターゲートパルスによって駆動することにより、受光部に蓄積された電荷をシャッタードレインに掃き出すことができる。即ち、このCCDラインセンサ14は、CCD駆動回路15から加えれるシャッターゲートパルスに応じて受光部に蓄積する電荷を制御することができる、いわゆる電子シャッター機能を有している。
【0016】
上記CCDラインセンサ14から読み出されたR,G,B電圧信号は、図示しないCDSクランプによってクランプされてアナログアンプ16に加えられ、ここで後述するようにゲインが制御される。アナログアンプ16から出力される1コマ分のR,G,B電圧信号はA/Dコンバータ18によって点順次のR,G,Bデジタル画像信号に変換されたのち、デジタル信号処理回路20によって後述する白バランス、黒バランス、ネガポジ反転、ガンマ補正等が行われ、YCC変換回路35によって輝度信号Yとクロマ信号CR,に変換される。そして、輝度信号Yとクロマ信号CR,は、図示しない画像メモリに記憶される。
【0017】
尚、画像メモリに記憶された1コマ分の輝度信号Yとクロマ信号CR,は、繰り返し読み出され、D/Aコンバータによってアナログ信号に変換されたのち、エンコーダでNTSC方式の複合映像信号に変換されてモニタTVに出力される。これにより、モニタTVよってフイルム画像を見ることができるようになる。
【0018】
フイルム駆動装置は、フイルムカートリッジ50のスプール50Aと係合し、そのスプール50Aを正転/逆転駆動するフイルム供給部と、このフイルム供給部から送出されるフイルム52を巻き取るフイルム巻取部と、フイルム搬送路に配設され、フイルム52をモータ31によって駆動されるキャプスタン32とピンチローラ33とで挟持してフイルム32を所望の速度で搬送する手段とから構成されている。尚、上記フイルム供給部は、フイルムカートリッジ50のスプール50Aを図1上で時計回り方向に駆動し、フイルム先端がフイルム巻取部によって巻き取られるまでフイルムカートリッジ50からフイルム52を送り出すようにしている。また、CPU40は、モータ回転数/方向制御回路34を通じてモータ31の正転/逆転、起動/停止、パルス幅変調によるフイルム搬送速度の制御を行うことができる。
【0019】
さて、フイルムカートリッジ50がカートリッジ収納部(図示せず)にセットされ、フイルムカートリッジ50からフイルム52が送り出されてフイルム先端がフイルム巻取部の巻取軸に巻き付けられると(フイルムローディングが完了すると)、フイルム52が一定速度で搬送される。これにより、フイルム画像のスキャンが行われ、CCDラインセンサ14、アナログアンプ16及びA/Dコンバータ18を介して積算ブロック41に点順次のR,G,Bデジタル画像信号が取り込まれる。
【0020】
積算ブロック41は、R,G,Bデジタル画像信号毎に所定の積算エリアのデジタル画像信号の階調(本実施例では、9ビット(0〜511)の階調)を積算し、その積算エリアの平均階調を求め、1画面に付き5000〜10000点数の積算エリアの各階調データを作成する。更に、積算ブロック41は、順次作成される階調データに基づいて各階調毎の度数をカウントし、この度数が階調データの総点数に対して設定された閾値TH(本実施例では総点数の1%)を越えた場合にはカウントを停止する。即ち、積算ブロック41は、図2に示すように0〜511までの全ての階調に対して最大閾値THまでカウントした簡易ヒストグラム(図2中の斜線で示すヒストグラム)を作成し、CPU40に出力する。尚、上記閾値THを越える度数をカウントしないことにより、カウンタのビット数を大幅に低減することができる。また、図2上で2点鎖線は、総点数をカウントした場合の本来のヒストグラムである。
【0021】
CPU40は、図2に示した簡易ヒストグラムの階調の小さい方から度数を順次累算し、その累算度数が前記閾値THと一致又は最初に越えたときの階調を基準最小値としてR,G,B毎に求めるとともに、簡易ヒストグラムの階調の大きい方から度数を順次累算し、その累算度数が前記閾値THと一致又は最初に越えたときの階調を基準最大値としてR,G,B毎に求める。
【0022】
次に、白バランス、黒バランス、ネガポジ反転、ガンマ補正等を行うデジタル信号処理回路20について説明する。
先ず、白バランス及び黒バランスを合わせるために使用するオフセット値、ゲイン量の算出方法について説明する。
CPU40は、前記R,G,B毎に求めた基準最大値に基づいてR,G,B毎のオフセット値を算出するとともに、基準最大値及び基準最小値に基づいてR,G,B毎のゲイン量を算出する。即ち、Rの基準最大値をRref max 、基準最小値をRref min とすると、上記オフセット値及びゲイン量は、次式、
オフセット値=511−Rref max …(1)
ゲイン量=511/(Rref max −Rref min ) …(2)
により算出する。
【0023】
尚、式(1)、(2)は、Rに関するものであるが、他の色チャンネルも同様にして算出する。また、ここでは、R,G,Bのデジタル画像信号は9ビットとして表しており、511はその最大値である。
そして、スキャン時にA/Dコンバータ18から出力されるオリジナルRorg に対して、次式、
R1=Rorg +オフセット値 …(3)
に示すようにRのオフセット値を加算することによって黒点オフセットされたデジタル画像信号R1を得ることができる。G,Bのオリジナルについても同様の処理を行うことににより、R,G,Bデジタル画像信号のピーク値(ポジ画像の黒)が一致させられる(図3(A)参照)。
【0024】
続いて、上記オフセットされたデジタル画像信号R1に対して、次式、
R2=511−R1 …(4)
の演算を実行することにより、ネガポジ反転が行われる(図3(B)参照)。
次に、ネガポジ反転されたデジタル画像信号R2に対して、式(2)で求めたゲイン量を、次式に示すように乗算することにより、
R3=R2×ゲイン量 …(5)
デジタル画像信号R,G,Bの他方のピーク値(ポジ画像の白)が一致させられる(図3(C)参照)。
【0025】
最後に、ゲイン量が乗算されたデジタル画像信号R,G,Bにそれぞれ異なるガンマ補正を行うことにより、グレーが合わせられる(図3(D)参照)。
次に、上記ガンマ補正について更に詳細に説明する。
先ず、図4に示すようにガンマ補正をする際の基準となるルックアップテーブル(以下、ベースLUTという)を準備する。
【0026】
このベースLUTは、ネガフイルムがもっているガンマの曲線とブラウン管に出力される映像信号がもっているガンマ(一般的にはγ=0.45)の曲線との差分を示すガンマ補正値が各階調毎に記憶されている。尚、入出力特性を示す実際のルックアップテーブル(以下、実際のLUTという)は、図4(A)に示すように関数y=xからベースLUT(ガンマ補正値)を差し引いたものである。
【0027】
また、ベースLUTに対して、ガンマゲインを乗算することにより、ベースLUTを変化させることができる(図4(B)参照)。これにより1つのベースLUTから適宜のガンマゲインを乗算することにより、R,G,B毎にガンマ補正値が伸長又は圧縮されたLUTを得ることができる。尚、図4(C)は、関数y=xからそれぞれR,G,B毎にガンマ補正値が伸長又は圧縮されたLUTを差し引くことにより得られるR,G,B毎の実際のLUTである。
【0028】
従って、前述した式(3)〜(5)によって白バランス及び黒バランスが合わされ、ネガポジ反転された点順次のデジタル画像信号R,G,Bに対してガンマ補正を行う場合には、点順次のデジタル画像信号R,G,Bに基づいて前記ベースLUTから順次ガンマ補正値を読み出し、そのガンマ補正値にR,G,B毎のガンマゲインを乗算して適宜伸長又は圧縮したガンマ補正値を求め、点順次のR,G,Bデジタル画像信号から色別に伸長又は圧縮したガンマ補正値を減算することにより点順次で各色別にガンマ補正を行うことができる。
【0029】
図5は図1に示したデジタル信号処理回路20の内部構成を含むブロック図である。このデジタル信号処理回路20は上述したデジタル信号処理を行うもので、主として加算器21、22、24、乗算器23、26、及びベースLUT25から構成されている。加算器21には、A/Dコンバータ18から点順次のR,G,Bデジタル画像信号CMPAD が入力している。尚、デジタル画像信号CMPAD は、所定のクロックにしたがって時系列的にR,G,B,Gと流れている。
【0030】
一方、CPU40は、式(1)及び(2)に示したようにR,G,B毎にオフセット値(Roffset, offset,Boffset)及びゲイン量(Rwbgain, wbgain,Bwbgain)を算出して記憶するとともに、R,G,B毎にガンマゲイン(Rgamgain,gamgain,gamgain )を記憶している。また、これらのオフセット値等は、各コマ毎に記憶されている。そして、アドレスデコーダ42によってスキャンしようとするコマに対応するオフセット値等が選択され、図5中のINTDATA によってR,G,Bのオフセット値はレジスタ43R,43G,43Bに格納され、R,G,Bのゲイン量はレジスタ44R,44G,44Bに格納され、R,G,Bのガンマゲインはレジスタ45R,45G,45Bに格納される。尚、これらのレジスタには、1コマ分のデジタル画像信号R,G,Bが処理されるまで保持される。
【0031】
レジスタ43R,43G,43Bに格納されたオフセット値(Roffset, offset,Boffset)はマルチプレクサ46に加えられており、マルチプレクサ46の他の入力には、前記所定のクロックを分周して作成されたタイミング信号INTCOLSL0,1が加えられている。マルチプレクサ46は、タイミング信号INTCOLSL0,1によって3つのオフセット値からいずれか1つのオフセット値を選択し、この選択したオフセット値をデジタル信号処理回路20の加算器21の他の入力に出力する。
【0032】
同様にして、マルチプレクサ47は、レジスタ44R,44G,44Bから入力する3つのゲイン量(Rwbgain, wbgain,Bwbgain)のうちの1つのゲイン量を選択し、この選択したゲイン量を乗算器23に出力し、また、マルチプレクサ48は、レジスタ45R,45G,45Bから入力する3つのガンマゲイン(Rgamgain,gamgain,gamgain )からいずれか1つのガンマゲインを選択し、この選択したガンマゲインを乗算器26に出力する。
【0033】
一方、加算器21には前述したようにデジタル画像信号CMPAD が入力しており、加算器21はデジタル画像信号CMPAD とオフセット値とを加算する。これにより、黒点オフセットされたデジタル画像信号が得られる(式(3)、図3(A)参照)。
加算器21から出力される黒点オフセットされたデジタル画像信号は、加算器22の負入力に加えられ、加算器22の正入力には白ピークレベルを示す値(511)が加えられており、加算器22は511から黒点オフセットされたデジタル画像信号を減算する。これによりネガポジ反転されたデジタル画像信号が得られる(式(4)、図3(B)参照)。
【0034】
続いて、ネガポジ反転されたデジタル画像信号は、乗算器23に加えられる。乗算器23の他の入力にはマルチプレクサ47からゲイン量が加えられており、乗算器23は2入力を乗算することにより、デジタル画像信号R,G,Bのポジ画像の白を合わせる(式(5)、図3(C)参照)。
次に、乗算器23から出力されるデジタル画像信号は、加算器24及びベースLUT25に加えられる。ベースLUT25は、図4(A)に示したように入力信号の階調に応じたガンマ補正値を有しており、入力するデジタル画像信号の階調に応じたガンマ補正値を読み出し、このガンマ補正値を乗算器26に出力する。乗算器26の他の入力にはマルチプレクサ48からガンマゲインが加えられており、乗算器23は2入力を乗算することにより、デジタル画像信号R,G,Bの色別のガンマ補正値を生成し、これを加算器24の負入力に出力する。
【0035】
加算器24は入力するデジタル画像信号R,G,Bから各色別に伸長又は圧縮されたガンマ補正値を減算する。これによりガンマ補正された正規のR,G,Bのデジタル画像信号RGBGgam が得られる。
さて、図1のデジタル信号処理回路20から出力されるガンマ補正されたデジタル画像信号R,G,Bは、YCC変換回路35に加えられる。YCC変換回路35は、デジタル画像信号R,G,Bを同時化するとともに、同時化したデジタル画像信号R,G,Bを輝度信号Yとクロマ信号CR,に変換する。
【0036】
ここで、例えば国際無線通信諮問委員会のRec601−2のYCC変換式は、
Y =0.299 R+0.587 G+0.114 G …(6)
=0.713 (R−Y) …(7)
=0.564 (B−Y) …(8)
を使用しているが、本発明では、回路構成の簡略化を図るために、YCC変換回路35は、同時化したデジタル画像信号R,G,Bに基づいて輝度信号Y及びクロマ信号C,Cを、次式、
Y ={(R/2+R/8)+(G+G/8)+B/4}/2 …(9)
=KRR(R−G)+KRB(B−G) …(10)
=KBR(R−G)+KBB(B−G) …(11)
によって算出するようにしている。ここで、上式の4つの係数KRR,KRB,KBR,KBBは、それぞれ次式、
RR=NRR/2N1, −KRB=NRB/2N2
−KBR=NBR/2N3, KBB=NBB/2N4
(但し、NRR〜NBB及びN1〜N4は整数)
で近似表現されている。
【0037】
上式からも明らかなように、輝度信号Yは、デジタル画像信号R,G,Bのビットシフトと加算によって求めることができ、また、クロマ信号C,Cの算出時における係数の乗算もビットシフトによって行うことができ、YCC変換回路35を簡単なハードウエアで構成することができる。
また、YCC変換回路35は、上記4つの係数KRR,KRB,KBR,KBBを1セットとして予め複数セットの彩度補正係数を有しており、CPU40は彩度を適正レベルに制御するために適正な彩度補正係数を選択する。そして、YCC変換回路35は、CPU40によって選択された彩度補正係数を使用してYCC変換を行う。
【0038】
即ち、フイルム画像の基準最小値と基準最大値の輝度比が大きい場合には、撮影されたネガ上の濃度レンジが広く、デジタル信号処理回路20から出力されるR,G,Bデジタル画像信号は、輝度比に対し相対的に小さいトータルガンマが使用され彩度が低下しており、逆に、輝度比が小さい場合には、デジタル信号処理回路20から出力されるデジタル画像信号R,G,Bは、輝度比に対し相対的に大きいトータルガンマが使用され彩度が強調されている。そこで、CPU40は基準最小値と基準最大値の輝度比を検出し、その輝度比が大きい場合には、彩度を強調する彩度補正係数を選択するための指令をYCC変換回路35に出力し、輝度比が小さい場合には彩度を低減する彩度補正係数を選択するための指令をYCC変換回路35に出力する。
【0039】
尚、上記実施例では、輝度比によって適正な彩度補正係数を選択するようにしているが、これに限らず、絵柄を解析して適正な彩度補正係数を選択するようにしてもよい。即ち、彩度の高い色が多い絵柄の場合には、彩度を低減する彩度補正係数を選択し、彩度の低い色が多い絵柄の場合には、彩度を強調する彩度補正係数を選択する。ここで、彩度の解析方法としては、例えば、(R−G),(B−G)信号の分布を解析し、(R−G),(B−G)信号の分布幅が小さい場合には彩度が低く、(R−G),(B−G)信号の分布幅が大きい場合には彩度が高いと判断する。
【0040】
また、上記実施例では、YCC変換時に彩度補正を行うようにしているが、これに限らず、デジタル画像信号R,G,Bから直接的に彩度補正したデジタル画像信号R′,G′,B′を得るようにしてもよい。
次に、デジタル画像信号R,G,Bから彩度補正したデジタル画像信号R′,G′,B′を算出するカラーマトリックスの導出について説明する。
【0041】
デジタル画像信号R,G,Bを前述した式(9)、(10)、(11)によってYCC変換された輝度信号Y及びクロマ信号C,Cを、YCCデコーダで式(6)、(7)、(8)の関係を使ってデジタル画像信号R′,G′,B′に変換すると、デジタル画像信号R′,G′,B′は、次式、
R′=C/0.713 +Y …(12)
B′=C/0.564 +Y …(13)
G′=(Y−0.299 R′−0.114 B′)/0.587 …(14)
で表すことができる。
【0042】
式(14)に式(12)、式(13)を代入すると、
G′=(0.587 Y−0.299 C/0.713 −0.114 C/0.564 )/0.587 …(15)
となり、更に、式(12)、(13)、(15)に前述した式(9)、(10)、(11)を代入すると、以下に示すようにデジタル画像信号R,G,Bと、デジタル画像信号R′,G′,B′との入出力関係を示す関係式が得られる。
【0043】
R′=R(KRR/0.713 +5/16)+G(9/16−KRR/0.713 −KRB/0.71 3 )+B(2/16+KRB/0.713 ) …(16)
B′=R(KBR/0.564 +5/16)+G(9/16−KBR/0.564 −KBB/0.56 4 )+B(2/16+KBB/0.564 ) …(17)
G′=R{5/16−0.299 KRR/(0.713 ×0.587 )−0.114 KBR/(0.564 ×0.587 )}+G{9/16−0.299 (KRR+KRB)/(0.713 ×0.587 )+0.114(KBR+KBB)/(0.564 ×0.587 )}+B{2/16−0.299 KRB/(0.713 ×0.587 )−0.114 KBB/(0.564 ×0.587 )} …(18)
上式(16)、(17)、(18)は、行列式、
Figure 0003605856
で表現できる。この式(19)における3×3行列(A11〜A33)の係数(彩度補正係数)は、式(16)、(17)、(18)により求めることができる。
【0044】
式(19)は、入力信号R,G,Bを出力信号R′,G′,B′に変換する式になっており、上記3×3行列の彩度補正係数を変更することによって彩度補正することができる。3×3行列の彩度補正係数は9個あるが、これらは4つの係数KRR,KRB,KBR,KBBによって可変することができる。
さて、式(19)において、R=G=B(即ち、入力がグレー)の場合には、R′=G′=B′(出力もグレー)となり、グレー条件が保存されることが分かる。これは、式(9)、(10)、(11)において、R=G=Bのとき、C=C=0となることからも明らかである。
【0045】
次に、彩度補正係数の具体例について説明する。
行列式で表される彩度補正係数によって彩度が強調されるか低減されるかは、行列式の対角項の大きさで決まる。ここで、対角項を0.7 〜1.3 まで0.1 刻みで変更したとのNRR,NRB,NBR,NBBの値(2=128 の場合)と、そのときの3×3行列の彩度補正係数の一例を次表に示す。
Figure 0003605856
Figure 0003605856
そして、上記と同様にして輝度比が大きい場合には、輝度比に対して相対的に小さいトータルガンマが使用されるため、彩度を強調するために少し大きめの対角項をもった彩度補正係数を選択し、一方、輝度比が小さい場合には、輝度比に対して相対的に大きいトータルガンマが使用されるため、彩度を低減するために少し小さめの対角項をもった彩度補正係数を選択する。
【0046】
また、上記と同様にして絵柄を解析し、適正な対角項をもった彩度補正係数を選択するようにしてもよい。即ち、彩度の高い色が多い絵柄の場合には、対角項の小さい彩度補正係数を選択して彩度を低減し、一方、彩度の低い色が多い絵柄の場合には、対角項の大きい彩度補正係数を選択して彩度を強調する。
更に、上記実施例では、彩度補正係数の対角項のみについて説明したが、肌色・緑等の記憶色を好ましく仕上げるために非対角項の係数を最適に選択することにより所望の色再現を実現することができる。
【0047】
【発明の効果】
以上説明したように本発明に係る画像処理装置によれば、カラー画像の最大輝度及び最小輝度がそれぞれ所定の階調となるように階調変換する画像処理系において、最大輝度と最小輝度との輝度比に応じた適正な彩度補正係数を選択して彩度補正を実施するようにしたため、カラー画像の濃度レンジの相違による彩度変動を少なくすることができ、安定した良好な色再現を実現することができる。また、本発明によれば、YCC変換における乗算をビットシフトで置換できるようにYCC変換係数を好適な数値で表現したため、回路構成の簡略化を図ることができるという利点がある。
【図面の簡単な説明】
【図1】図1は本発明が適用されるフイルムスキャナの一実施例を示す要部ブロック図である。
【図2】図2は基準最大値及び基準最小値の求め方を説明するために用いたヒストグラムである。
【図3】図3(A)乃至(D)はそれぞれ図1のデジタル信号処理回路の各部における処理内容を示すグラフである。
【図4】図4(A)乃至(C)はそれぞれガンマ補正方法を説明するために用いたグラフである。
【図5】図5は図1のデジタル信号処理回路の詳細な構成を示すブロック図である。
【符号の説明】
10…光源
12…撮影レンズ
14…CCDラインセンサ
15…CCD駆動回路
18…A/Dコンバータ
20…デジタル信号処理回路
21、22、24…加算器
23、26…乗算器
25…ベースLUT
31…モータ
40…中央処理装置(CPU)
41…積算ブロック
42…アドレスデコーダ
43R〜45B…レジスタ
46、47、48…マルチプレクサ
50…フイルムカートリッジ
52…ネガフイルム[0001]
[Industrial applications]
The present invention relates to an image processing apparatus.In placeIn particular, an image processing apparatus for digitally processing digital image signals R, G, and B obtained by capturing a color image.In placeRelated.
[0002]
[Prior art]
2. Description of the Related Art A film scanner capable of capturing a color image of a negative film with an image sensor and outputting a video signal indicating the color image to a monitor TV or a video printer has been proposed.
In this type of film scanner, image processing such as white balance, black balance, negative / positive inversion, and gamma correction is performed on the R, G, and B signals output from the image sensor. The B signal is converted into a luminance signal Y and a chroma signal C by a YCC conversion circuit.R,CBIs performed.
[0003]
When adjusting the white balance and black balance of the R, G, and B signals, a reference minimum value and a reference maximum value are calculated for each color from the R, G, and B signals output from the image sensor, and these reference minimum values are calculated. The value and the reference maximum value are offset for each of the R, G, and B signals so as to indicate the minimum and maximum gradation of the video signal, and the gain is adjusted.
[0004]
[Problems to be solved by the invention]
By the way, when the gradation of the R, G, and B signals is adjusted as described above, according to the width of the density range on the negative film (the luminance ratio between the reference minimum value and the reference maximum value is large), The total gamma in the subsequent gamma correction changes relatively. When the luminance ratio is large, a relatively small total gamma is used. When the luminance ratio is small, a relatively large total gamma is used.
[0005]
As a result, there is a problem that the saturation decreases when the luminance ratio is large, and the saturation is emphasized when the luminance ratio is small.
In addition, a color image has a pattern with high saturation or a pattern with low saturation depending on the shooting light source and light quality, but conventionally, the color is reproduced so as to obtain a preferable color tone by automatically correcting the saturation by the pattern. There was no such thing.
[0006]
SUMMARY OF THE INVENTION The present invention has been made in view of such circumstances, and there is little variation in saturation due to the density range of a color image, and an image processing apparatus capable of automatically achieving good color reproduction according to a picture.PlaceThe purpose is to provide.
[0007]
[Means for Solving the Problems]
In order to achieve the above object, the present invention obtains a maximum luminance and a minimum luminance from an image signal obtained by photographing a color image, and converts the image signal so that the maximum luminance and the minimum luminance have predetermined gradations, respectively. After the correction, image processing means for obtaining digital image signals R, G, and B indicating red, green, and blue by gamma correction, and a 3 × 3 matrix (A11~ A33) As a set, and a storage unit for storing a plurality of sets of saturation correction coefficients, and a color emphasizing a saturation when the luminance ratio between the maximum luminance and the minimum luminance is large from the plurality of sets of saturation correction coefficients. Selecting means for selecting a saturation correction coefficient, and selecting a saturation correction coefficient for reducing the saturation when the luminance ratio is small, and based on the digital image signals R, G, B and the selected saturation correction coefficient. And the following equation:
Figure 0003605856
And arithmetic means for calculating digital image signals R ', G', and B 'whose saturation has been corrected by executing the above calculation.
[0008]
Further, the present invention obtains a maximum luminance and a minimum luminance from an image signal obtained by photographing a color image, and corrects the image signal so that the maximum luminance and the minimum luminance each have a predetermined gradation. Image processing means for obtaining digital image signals R, G and B representing red, green and blue by correction,RR, KRB, KBR, KBBStorage means for storing a plurality of sets of saturation correction coefficients, each of which is a set; Selecting means for selecting a correction coefficient and selecting a saturation correction coefficient for reducing the saturation when the luminance ratio is small; Chroma signal CR, CBWith the following equation:
CR= KRR(RG) + KRB(BG)
CB= KBR(RG) + KBB(BG)
And calculating means for calculating from
[0010]
ChangeToClaim2In the image processing device described in the above, the calculating means converts the luminance signal Y based on the digital signals R, G, B into the following equation:
Y = {(R / 2 + R / 8) + (G + G / 8) + B / 4} / 2
Calculated by
The chroma signal CR, CBFour coefficients K to calculateRR, KRB, KBR, KBBWith the following equations, respectively.
KRR= NRR/ 2N1, −KRB= NRB/ 2N2
-KBR= NBR/ 2N3, KBB= NBB/ 2N4
(However, NRR~ NBBAnd N1 to N4 are integers)
It is characterized by using what is expressed by.
[0011]
[Action]
According to the present invention, after the gradation correction is performed so that the maximum luminance and the minimum luminance of the image signal are each a predetermined gradation, the digital image signals R, G, and B indicating red, green, and blue are corrected by gamma correction. In the obtained image processing system, when the luminance ratio between the minimum luminance and the maximum luminance is large, a saturation correction coefficient that emphasizes the saturation is used, and when the luminance ratio is small, the saturation correction coefficient that reduces the saturation is used. Is selected, and digital image signals R ′, G ′, and B ′ that have been subjected to chroma correction are calculated from the digital image signals R, G, and B using the selected chroma correction coefficient. That is, a 3 × 3 matrix (A11~ A33) Is prepared as one set, and an appropriate saturation correction coefficient is selected from the plurality of sets of saturation correction coefficients according to the luminance ratio. Then, based on the digital image signals R, G, and B and the selected saturation correction coefficient,
Figure 0003605856
Is performed to obtain digital image signals R ', G', and B 'whose saturation has been corrected.
[0012]
According to another aspect of the invention, the digital image signals R, G, B and the four coefficients KRR, KRB, KBR, KBBChroma signal C based on the saturation correction coefficient withR, CBWith the following equation:
CR= KRR(RG) + KRB(BG)
CB= KBR(RG) + KBB(BG)
When calculating from the above, the saturation correction coefficient is made variable according to the magnitude of the luminance ratio in the same manner as described above.
[0013]
According to yet another aspect of the present invention,The image processing device according to claim 2,The luminance signal Y is calculated based on the digital signals R, G, and B by the following equation:
Y = {(R / 2 + R / 8) + (G + G / 8) + B / 4} / 2
Calculated by
The chroma signal CR, CBFour coefficients K to calculateRR, KRB, KBR, KBBBy the following equations, respectively.
KRR= NRR/ 2N1, −KRB= NRB/ 2N2
-KBR= NBR/ 2N3, KBB= NBB/ 2N4
(However, NRR~ NBBAnd N1 to N4 are integers)
Are used to simplify the circuit for performing YCC conversion.
[0014]
【Example】
Hereinafter, an image processing apparatus according to the present invention will be described with reference to the accompanying drawings.Place ofThe preferred embodiment will be described in detail.
FIG. 1 is a main block diagram showing an embodiment of a film scanner to which the present invention is applied. This film scanner mainly includes a light source 10 for illumination, a photographing lens 12, a CCD line sensor 14, an analog amplifier 16, an A / D converter 18, a digital signal processing circuit 20, a motor 31, a capstan 32, and a pinch roller 33. A driving device, a central processing unit (CPU) 40, and the like are provided.
[0015]
The light source 10 illuminates the developed negative film 52 drawn out of the film cartridge 50 through an infrared cut filter (not shown), and the transmitted light transmitted through the film 52 passes through the photographing lens 12 to the CCD line sensor 14. An image is formed on the light receiving surface.
The CCD line sensor 14 is provided with a light receiving portion for 1024 pixels in a direction orthogonal to the film transport direction. The image light formed on the light receiving surface of the CCD line sensor 14 is filtered by R, G, B filters. The charge is accumulated in each light receiving unit, and is converted into R, G, B signal charges in an amount corresponding to the light intensity. The R, G, and B electric charges thus accumulated are transferred to a shift register when a read gate pulse of one line cycle is applied from the CCD drive circuit 15, and then sequentially converted into a voltage signal by a register transfer pulse. Is output. Further, the CCD line sensor 14 is provided with a shutter gate and a shutter drain adjacent to each light receiving section. By driving the shutter gate by a shutter gate pulse, charges accumulated in the light receiving section are discharged to the shutter drain. Can be swept out. That is, the CCD line sensor 14 has a so-called electronic shutter function that can control the electric charge accumulated in the light receiving section in accordance with the shutter gate pulse applied from the CCD drive circuit 15.
[0016]
The R, G, and B voltage signals read from the CCD line sensor 14 are clamped by a CDS clamp (not shown) and applied to the analog amplifier 16, where the gain is controlled as described later. The R, G, and B voltage signals for one frame output from the analog amplifier 16 are converted into dot-sequential R, G, and B digital image signals by the A / D converter 18 and then described later by the digital signal processing circuit 20. White balance, black balance, negative / positive inversion, gamma correction, etc. are performed, and the luminance signal Y and the chroma signal C are output by the YCC conversion circuit 35.R,CBIs converted to Then, the luminance signal Y and the chroma signal CR,CBAre stored in an image memory (not shown).
[0017]
The luminance signal Y and the chroma signal C for one frame stored in the image memory are stored.R,CBAre repeatedly read out, converted into an analog signal by a D / A converter, converted into an NTSC composite video signal by an encoder, and output to a monitor TV. As a result, the film image can be viewed on the monitor TV.
[0018]
The film driving device engages with a spool 50A of the film cartridge 50, and drives a forward / reverse rotation of the spool 50A; Means are provided in the film transport path, and means for transporting the film 32 at a desired speed by sandwiching the film 52 between a capstan 32 driven by a motor 31 and a pinch roller 33. The film supply unit drives the spool 50A of the film cartridge 50 in the clockwise direction in FIG. 1 so as to send out the film 52 from the film cartridge 50 until the film leading end is wound by the film winding unit. . Further, the CPU 40 can control the forward / reverse rotation, start / stop, and control of the film transport speed by pulse width modulation of the motor 31 through the motor speed / direction control circuit 34.
[0019]
When the film cartridge 50 is set in a cartridge storage unit (not shown), the film 52 is sent out from the film cartridge 50, and the leading end of the film is wound around the winding shaft of the film winding unit (when the film loading is completed). The film 52 is conveyed at a constant speed. As a result, the film image is scanned, and dot-sequential R, G, B digital image signals are captured by the integrating block 41 via the CCD line sensor 14, analog amplifier 16, and A / D converter 18.
[0020]
The integration block 41 integrates the gradation (in this embodiment, 9-bit (0 to 511) gradation) of the digital image signal in a predetermined integration area for each of the R, G, and B digital image signals, and calculates the integration area. Is obtained, and each gradation data of an accumulation area of 5000 to 10000 points per screen is created. Further, the integrating block 41 counts the frequency for each gradation based on the gradation data sequentially created, and the frequency is set to a threshold value TH (total points in this embodiment) set with respect to the total points of the gradation data. If it exceeds 1%), the counting is stopped. That is, the integration block 41 creates a simple histogram (histogram indicated by oblique lines in FIG. 2) counting up to the maximum threshold value TH for all gradations from 0 to 511 as shown in FIG. I do. By not counting the frequency exceeding the threshold value TH, the number of bits of the counter can be greatly reduced. The two-dot chain line in FIG. 2 is an original histogram when the total number of points is counted.
[0021]
The CPU 40 sequentially accumulates the frequencies from the smaller one of the gradations of the simple histogram shown in FIG. 2, and sets the gradation when the accumulated frequency coincides with or exceeds the threshold value TH first as a reference minimum value. G and B are obtained, and the frequencies are sequentially accumulated from the larger gradation of the simple histogram, and the gradation at which the accumulated frequency coincides with the threshold TH or exceeds the threshold TH for the first time is set as a reference maximum value. It is determined for each of G and B.
[0022]
Next, the digital signal processing circuit 20 for performing white balance, black balance, negative / positive inversion, gamma correction, and the like will be described.
First, a method of calculating an offset value and a gain used for adjusting the white balance and the black balance will be described.
The CPU 40 calculates an offset value for each of R, G, and B based on the reference maximum value obtained for each of R, G, and B, and also calculates an offset value for each of R, G, and B based on the reference maximum value and the reference minimum value. Calculate the gain amount. That is, the reference maximum value of R isref max, The reference minimum value is Rref minThen, the offset value and the gain amount are given by the following equations:
Offset value = 511-Rref max                  … (1)
Gain = 511 / (Rref max-Rref min…… (2)
It is calculated by:
[0023]
Expressions (1) and (2) relate to R, but other color channels are similarly calculated. Here, the R, G, and B digital image signals are represented as 9 bits, and 511 is the maximum value.
The original R output from the A / D converter 18 during scanningorgFor the following equation:
R1 = Rorg+ Offset value ... (3)
By adding the offset value of R as shown in (1), the digital image signal R1 with black point offset can be obtained. By performing the same processing for the G and B originals, the peak values (black of the positive image) of the R, G and B digital image signals are matched (see FIG. 3A).
[0024]
Subsequently, for the offset digital image signal R1,
R2 = 511-R1 (4)
, The negative-positive inversion is performed (see FIG. 3B).
Next, by multiplying the negative-positive inverted digital image signal R2 by the gain amount obtained by Expression (2) as shown in the following expression,
R3 = R2 × gain amount (5)
The other peak values (white of the positive image) of the digital image signals R, G, and B are matched (see FIG. 3C).
[0025]
Finally, gray is adjusted by performing different gamma corrections on the digital image signals R, G, and B multiplied by the gain amounts (see FIG. 3D).
Next, the gamma correction will be described in more detail.
First, as shown in FIG. 4, a look-up table (hereinafter, referred to as a base LUT) serving as a reference when performing gamma correction is prepared.
[0026]
This base LUT has a gamma correction value indicating a difference between a gamma curve of a negative film and a gamma curve (generally γ = 0.45) of a video signal output to a cathode ray tube for each gradation. Is stored in Note that an actual look-up table indicating input / output characteristics (hereinafter, referred to as an actual LUT) is obtained by subtracting a base LUT (gamma correction value) from a function y = x as shown in FIG.
[0027]
The base LUT can be changed by multiplying the base LUT by a gamma gain (see FIG. 4B). Thus, by multiplying one base LUT by an appropriate gamma gain, it is possible to obtain an LUT in which a gamma correction value is expanded or compressed for each of R, G, and B. FIG. 4C is an actual LUT for each of R, G, and B obtained by subtracting an LUT whose gamma correction value has been expanded or compressed for each of R, G, and B from the function y = x. .
[0028]
Therefore, when gamma correction is performed on the point-sequential digital image signals R, G, and B in which the white balance and the black balance are adjusted according to the above-described equations (3) to (5) and the negative / positive inversion is performed, the point-sequential A gamma correction value is sequentially read from the base LUT based on the digital image signals R, G, and B, and the gamma correction value is multiplied by a gamma gain for each of R, G, and B to obtain a properly expanded or compressed gamma correction value. By subtracting the gamma correction value expanded or compressed for each color from the dot-sequential R, G, B digital image signal, gamma correction can be performed for each color in a dot-sequential manner.
[0029]
FIG. 5 is a block diagram including the internal configuration of the digital signal processing circuit 20 shown in FIG. The digital signal processing circuit 20 performs the above-described digital signal processing, and mainly includes adders 21, 22, and 24, multipliers 23 and 26, and a base LUT 25. The adder 21 receives the dot-sequential R, G, B digital image signal CMPAD from the A / D converter 18. Note that the digital image signal CMPAD flows through R, G, B, and G in a time series according to a predetermined clock.
[0030]
On the other hand, the CPU 40 determines the offset value (R) for each of R, G, and B as shown in Expressions (1) and (2).offset,Goffset, Boffset) And gain (Rwbgain,Gwbgain, Bwbgain) Is calculated and stored, and the gamma gain (Rgammagain,Ggammagain,Bgammagain) Is remembered. These offset values and the like are stored for each frame. Then, an offset value or the like corresponding to a frame to be scanned is selected by the address decoder 42. The offset values of R, G, and B are stored in registers 43R, 43G, and 43B by INTDATA in FIG. The gain amount of B is stored in registers 44R, 44G, and 44B, and the gamma gains of R, G, and B are stored in registers 45R, 45G, and 45B. These registers hold digital image signals R, G, and B for one frame until they are processed.
[0031]
The offset value (R) stored in the registers 43R, 43G, 43Boffset,Goffset, Boffset) Is applied to the multiplexer 46, and the other input of the multiplexer 46 is applied with a timing signal INTCOLSL0,1 generated by dividing the predetermined clock. The multiplexer 46 selects any one of the three offset values according to the timing signals INTCOLSL0 and INTCOLSL1, and outputs the selected offset value to another input of the adder 21 of the digital signal processing circuit 20.
[0032]
Similarly, the multiplexer 47 outputs three gain amounts (R) input from the registers 44R, 44G, and 44B.wbgain,Gwbgain, Bwbgain), And outputs the selected gain amount to the multiplier 23. The multiplexer 48 outputs three gamma gains (R) input from the registers 45R, 45G, and 45B.gammagain,Ggammagain,Bgammagain) Is selected, and the selected gamma gain is output to the multiplier 26.
[0033]
On the other hand, the digital image signal CMPAD is input to the adder 21 as described above, and the adder 21 adds the digital image signal CMPAD and the offset value. As a result, a digital image signal with a black point offset is obtained (see equation (3) and FIG. 3A).
The digital image signal with the black point offset outputted from the adder 21 is applied to the negative input of the adder 22, and the value (511) indicating the white peak level is added to the positive input of the adder 22. The subtractor 22 subtracts the black point offset digital image signal from 511. Thereby, a negative-positive inverted digital image signal is obtained (see Equation (4) and FIG. 3B).
[0034]
Subsequently, the negative-positive inverted digital image signal is applied to the multiplier 23. The other input of the multiplier 23 is provided with a gain amount from the multiplexer 47, and the multiplier 23 multiplies the two inputs to adjust the white of the positive image of the digital image signals R, G, and B (formula ( 5), FIG. 3 (C)).
Next, the digital image signal output from the multiplier 23 is applied to the adder 24 and the base LUT 25. The base LUT 25 has a gamma correction value corresponding to the gradation of the input signal as shown in FIG. 4A, reads out the gamma correction value corresponding to the gradation of the input digital image signal, and reads this gamma. The correction value is output to the multiplier 26. A gamma gain is added from a multiplexer 48 to the other input of the multiplier 26. The multiplier 23 multiplies the two inputs to generate a gamma correction value for each color of the digital image signals R, G, and B, This is output to the negative input of the adder 24.
[0035]
The adder 24 subtracts the expanded or compressed gamma correction value for each color from the input digital image signals R, G, B. Thus, a gamma-corrected regular R, G, B digital image signal RGBGgamIs obtained.
The gamma-corrected digital image signals R, G, and B output from the digital signal processing circuit 20 in FIG. 1 are applied to the YCC conversion circuit 35. The YCC conversion circuit 35 synchronizes the digital image signals R, G, and B, and converts the synchronized digital image signals R, G, and B into a luminance signal Y and a chroma signal C.R,CBConvert to
[0036]
Here, for example, the YCC conversion formula of Rec 601-2 of the International Radio Communication Advisory Committee is:
Y = 0.299 R + 0.587 G + 0.114 G (6)
CR= 0.713 (RY) (7)
CB= 0.564 (BY) (8)
However, in the present invention, in order to simplify the circuit configuration, the YCC conversion circuit 35 generates the luminance signal Y and the chroma signal C based on the synchronized digital image signals R, G, and B.R, CBWith the following equation:
Y = {(R / 2 + R / 8) + (G + G / 8) + B / 4} / 2 (9)
CR= KRR(RG) + KRB(BG) ... (10)
CB= KBR(RG) + KBB(BG) ... (11)
It is calculated by the following. Here, the four coefficients K in the above equationRR, KRB, KBR, KBBAre given by
KRR= NRR/ 2N1, −KRB= NRB/ 2N2
-KBR= NBR/ 2N3, KBB= NBB/ 2N4
(However, NRR~ NBBAnd N1 to N4 are integers)
Approximate expression.
[0037]
As is clear from the above equation, the luminance signal Y can be obtained by bit shifting and adding the digital image signals R, G, and B, and the chroma signal CR, CBCan be multiplied by a bit shift at the time of calculation, and the YCC conversion circuit 35 can be configured with simple hardware.
The YCC conversion circuit 35 calculates the four coefficients KRR, KRB, KBR, KBBAre set as a set, and a plurality of sets of saturation correction coefficients are provided in advance, and the CPU 40 selects an appropriate saturation correction coefficient in order to control the saturation to an appropriate level. Then, the YCC conversion circuit 35 performs the YCC conversion using the saturation correction coefficient selected by the CPU 40.
[0038]
That is, when the luminance ratio between the reference minimum value and the reference maximum value of the film image is large, the density range on the photographed negative is wide, and the R, G, B digital image signals output from the digital signal processing circuit 20 are When the luminance ratio is low, the total gamma relatively small with respect to the luminance ratio is used to decrease the saturation. Conversely, when the luminance ratio is low, the digital image signals R, G, B output from the digital signal processing circuit 20 are used. Is used, the total gamma relatively large with respect to the luminance ratio is used, and the saturation is emphasized. Therefore, the CPU 40 detects the luminance ratio between the reference minimum value and the reference maximum value, and if the luminance ratio is large, outputs a command for selecting a saturation correction coefficient for enhancing the saturation to the YCC conversion circuit 35. When the luminance ratio is small, a command for selecting a saturation correction coefficient for reducing the saturation is output to the YCC conversion circuit 35.
[0039]
In the above embodiment, an appropriate saturation correction coefficient is selected according to the luminance ratio. However, the present invention is not limited to this, and a suitable saturation correction coefficient may be selected by analyzing a picture. That is, in the case of a pattern having many high-saturation colors, a saturation correction coefficient for reducing the saturation is selected. In the case of a pattern having many low-saturation colors, the saturation correction coefficient for enhancing the saturation is selected. Select Here, as a method of analyzing the saturation, for example, the distribution of the (RG) and (BG) signals is analyzed, and the distribution width of the (RG) and (BG) signals is small. Is low, and if the distribution width of the (RG) and (BG) signals is large, it is determined that the saturation is high.
[0040]
Further, in the above embodiment, the saturation correction is performed at the time of the YCC conversion. However, the present invention is not limited to this, and the digital image signals R ′, G ′ that have been subjected to the saturation correction directly from the digital image signals R, G, B are provided. , B ′.
Next, the derivation of a color matrix for calculating digital image signals R ′, G ′, and B ′ that have been subjected to chroma correction from the digital image signals R, G, and B will be described.
[0041]
The luminance signal Y and the chroma signal C obtained by YCC-converting the digital image signals R, G, and B by the above-described equations (9), (10), and (11)R, CBIs converted into digital image signals R ′, G ′, and B ′ by the YCC decoder using the relations of Equations (6), (7), and (8). The following formula,
R '= CR/0.713 + Y (12)
B '= CB/0.564 + Y (13)
G ′ = (Y−0.299 R′−0.114 B ′) / 0.587 (14)
Can be represented by
[0042]
Substituting equations (12) and (13) into equation (14) gives
G ′ = (0.587 Y−0.299 CR/0.713 -0.114 CB/0.564)/0.587 (15)
Further, by substituting the expressions (9), (10), and (11) into the expressions (12), (13), and (15), the digital image signals R, G, and B are expressed as follows: A relational expression showing the input / output relationship with the digital image signals R ', G', B 'is obtained.
[0043]
R '= R (KRR/0.713 +5/16) + G (9 / 16-KRR/0.713 -KRB/0.71 3) + B (2/16 + KRB/0.713) ... (16)
B ′ = R (KBR/0.564 +5/16) + G (9 / 16-KBR/0.564 -KBB/0.56 4) + B (2/16 + KBB/0.564) ... (17)
G ′ = R {5 / 16−0.299 KRR/(0.713×0.587)−0.114 KBR/(0.564×0.587)}+G{9/16−0.299 (KRR+ KRB) / (0.713 × 0.587) +0.114 (KBR+ KBB) / (0.564 × 0.587)} + B {2 / 16−0.299 KRB/(0.713×0.587)−0.114 KBB/(0.564×0.587)} (18)
The above equations (16), (17), and (18) are determinants,
Figure 0003605856
Can be expressed by The 3 × 3 matrix (A11~ A33) Can be obtained by equations (16), (17) and (18).
[0044]
Equation (19) is an equation for converting the input signals R, G, and B into output signals R ', G', and B '. By changing the saturation correction coefficient of the 3 × 3 matrix, the saturation is calculated. Can be corrected. There are nine saturation correction coefficients of a 3 × 3 matrix, and these are four coefficients KRR, KRB, KBR, KBBCan vary.
Now, in equation (19), if R = G = B (that is, the input is gray), then R ′ = G ′ = B ′ (the output is also gray), and it can be seen that the gray condition is preserved. This is because in equations (9), (10) and (11), when R = G = B, CR= CB= 0.
[0045]
Next, a specific example of the saturation correction coefficient will be described.
Whether the saturation is enhanced or reduced by the saturation correction coefficient represented by the determinant depends on the size of the diagonal term of the determinant. Here, the diagonal term is changed from 0.7 to 1.3 in steps of 0.1.RR, NRB, NBR, NBBValue of (2N= 128) and an example of a 3 × 3 matrix of saturation correction coefficients at that time are shown in the following table.
Figure 0003605856
Figure 0003605856
When the luminance ratio is large in the same manner as described above, the total gamma relatively small with respect to the luminance ratio is used, so that the saturation having a slightly larger diagonal term to emphasize the saturation is used. When the correction coefficient is selected, when the luminance ratio is small, a total gamma relatively large with respect to the luminance ratio is used, so that a diagonal term having a slightly smaller diagonal term is used to reduce the saturation. Select the degree correction coefficient.
[0046]
Alternatively, the pattern may be analyzed in the same manner as described above, and a saturation correction coefficient having an appropriate diagonal term may be selected. That is, in the case of a pattern having many colors with high saturation, the saturation is reduced by selecting a saturation correction coefficient having a small diagonal term. On the other hand, in the case of a pattern having many colors with low saturation, A saturation correction coefficient having a large angular term is selected to enhance the saturation.
Further, in the above-described embodiment, only the diagonal term of the saturation correction coefficient has been described. Can be realized.
[0047]
【The invention's effect】
As described above, according to the image processing apparatus of the present invention, in an image processing system that performs gradation conversion so that the maximum luminance and the minimum luminance of a color image each have a predetermined gradation, the maximum luminance and the minimum luminance Saturation correction is performed by selecting an appropriate saturation correction coefficient according to the luminance ratio, so that saturation variation due to differences in the density range of color images can be reduced, and stable and good color reproduction can be achieved. Can be realized. MaThe bookAccording to the invention, since the YCC conversion coefficient is represented by a suitable numerical value so that the multiplication in the YCC conversion can be replaced by the bit shift, there is an advantage that the circuit configuration can be simplified.
[Brief description of the drawings]
FIG. 1 is a main block diagram showing an embodiment of a film scanner to which the present invention is applied.
FIG. 2 is a histogram used for explaining how to obtain a reference maximum value and a reference minimum value.
3 (A) to 3 (D) are graphs each showing processing contents in each section of the digital signal processing circuit of FIG. 1;
FIGS. 4A to 4C are graphs used for explaining a gamma correction method.
FIG. 5 is a block diagram showing a detailed configuration of the digital signal processing circuit of FIG. 1;
[Explanation of symbols]
10. Light source
12 ... photographic lens
14 ... CCD line sensor
15 ... CCD drive circuit
18 A / D converter
20 Digital signal processing circuit
21, 22, 24 ... adder
23, 26 Multiplier
25 ... Base LUT
31 ... Motor
40 ... Central processing unit (CPU)
41 ... Integration block
42 ... Address decoder
43R-45B ... register
46, 47, 48 ... Multiplexer
50 ... Film cartridge
52 ... Negative film

Claims (3)

カラー画像を撮影して得た画像信号から最大輝度及び最小輝度を求め、該最大輝度及び最小輝度がそれぞれ所定の階調となるように前記画像信号を補正した後、ガンマ補正して赤、緑、青を示すデジタル画像信号R,G,Bを得る画像処理手段と、
予め3×3行列(A11〜A33)を1セットとする複数セットの彩度補正係数を記憶する記憶手段と、
前記複数セットの彩度補正係数から前記最大輝度と最小輝度との輝度比が大きい場合には彩度を強調する彩度補正係数を選択し、輝度比が小さい場合には彩度を低減する彩度補正係数を選択する選択手段と、
前記デジタル画像信号R,G,Bと前記選択した彩度補正係数とに基づいて、次式、
│R′│ │A111213││R│
│G′│=│A212223││G│
│B′│ │A313233││B│
の演算を実行して彩度補正したデジタル画像信号R′,G′,B′を算出する演算手段と、
を備えたことを特徴とする画像処理装置。
A maximum luminance and a minimum luminance are obtained from an image signal obtained by photographing a color image, and the image signal is corrected so that the maximum luminance and the minimum luminance have predetermined gradations respectively. Image processing means for obtaining digital image signals R, G, B representing blue,
Storage means for storing in advance a plurality of sets of saturation correction coefficients each including a 3 × 3 matrix (A 11 to A 33 ) as one set;
When the luminance ratio between the maximum luminance and the minimum luminance is large, a saturation correction coefficient for enhancing the saturation is selected from the plurality of sets of saturation correction coefficients, and when the luminance ratio is small, the saturation is reduced. Selecting means for selecting a degree correction coefficient;
Based on the digital image signals R, G, B and the selected saturation correction coefficient,
│R'│ │A 11 A 12 A 13 ││R│
│G'│ = │A 21 A 22 A 23 ││G│
│B'│ │A 31 A 32 A 33 ││B│
Calculating means for calculating digital image signals R ', G', B 'having undergone saturation correction by executing
An image processing apparatus comprising:
カラー画像を撮影して得た画像信号から最大輝度及び最小輝度を求め、該最大輝度及び最小輝度がそれぞれ所定の階調となるように前記画像信号を補正した後、ガンマ補正して赤、緑、青を示すデジタル画像信号R,G,Bを得る画像処理手段と、
予め4つの係数KRR,KRB,KBR,KBBを1セットとする複数セットの彩度補正係数を記憶する記憶手段と、
前記複数セットの彩度補正係数から前記最大輝度と最小輝度との輝度比が大きい場合には彩度を強調する彩度補正係数を選択し、輝度比が小さい場合には彩度を低減する彩度補正係数を選択する選択手段と、
前記デジタル画像信号R,G,Bと前記選択した彩度補正係数とに基づいてクロマ信号CR ,CB を、次式、
R =KRR(R−G)+KRB(B−G)
B =KBR(R−G)+KBB(B−G)
から算出する演算手段と、
を備えたことを特徴とする画像処理装置。
A maximum luminance and a minimum luminance are obtained from an image signal obtained by photographing a color image, and the image signal is corrected so that the maximum luminance and the minimum luminance have predetermined gradations respectively. Image processing means for obtaining digital image signals R, G, B representing blue,
Storage means for storing in advance a plurality of sets of saturation correction coefficients each including four coefficients K RR , K RB , K BR , and K BB as one set;
When the luminance ratio between the maximum luminance and the minimum luminance is large, a saturation correction coefficient for enhancing the saturation is selected from the plurality of sets of saturation correction coefficients, and when the luminance ratio is small, the saturation is reduced. Selecting means for selecting a degree correction coefficient;
Based on the digital image signals R, G, B and the selected saturation correction coefficient, the chroma signals C R , C B are represented by the following equations:
C R = K RR (RG) + K RB (BG)
C B = K BR (RG) + K BB (BG)
Computing means for calculating from
An image processing apparatus comprising:
前記演算手段は、前記デジタル信号R,G,Bに基づいて輝度信号Yを、次式、
Y ={(R/2+R/8)+(G+G/8)+B/4}/2
によって算出し、
前記クロマ信号CR ,CB を算出するために4つの係数KRR,KRB,KBR,KBBを、それぞれ次式、
RR=NRR/2N1, −KRB=NRB/2N2
−KBR=NBR/2N3, KBB=NBB/2N4
(但し、NRR〜NBB及びN1〜N4は整数)
で表現されたものを使用することを特徴とする請求項に記載の画像処理装置。
The calculating means calculates a luminance signal Y based on the digital signals R, G, and B by the following equation:
Y = {(R / 2 + R / 8) + (G + G / 8) + B / 4} / 2
Calculated by
In order to calculate the chroma signals C R and C B , four coefficients K RR , K RB , K BR and K BB are represented by the following equations, respectively:
K RR = N RR / 2 N1 , −K RB = N RB / 2 N2
−K BR = N BR / 2 N3 , K BB = N BB / 2 N4
(However, N RR ~N BB and N1~N4 is an integer)
3. The image processing apparatus according to claim 2 , wherein an image represented by the following expression is used.
JP17252994A 1994-07-25 1994-07-25 Image processing device Expired - Fee Related JP3605856B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17252994A JP3605856B2 (en) 1994-07-25 1994-07-25 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17252994A JP3605856B2 (en) 1994-07-25 1994-07-25 Image processing device

Publications (2)

Publication Number Publication Date
JPH0837603A JPH0837603A (en) 1996-02-06
JP3605856B2 true JP3605856B2 (en) 2004-12-22

Family

ID=15943613

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17252994A Expired - Fee Related JP3605856B2 (en) 1994-07-25 1994-07-25 Image processing device

Country Status (1)

Country Link
JP (1) JP3605856B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6351558B1 (en) 1996-11-13 2002-02-26 Seiko Epson Corporation Image processing system, image processing method, and medium having an image processing control program recorded thereon
JP3809298B2 (en) 1998-05-26 2006-08-16 キヤノン株式会社 Image processing method, apparatus, and recording medium
JP4189328B2 (en) 2004-01-16 2008-12-03 セイコーエプソン株式会社 Image processing apparatus, image display apparatus, image processing method, and image processing program
JP4073477B2 (en) 2005-03-25 2008-04-09 三菱電機株式会社 Image processing apparatus and image display apparatus
JP4501766B2 (en) * 2005-04-28 2010-07-14 株式会社日立製作所 Video processing apparatus and video display apparatus

Also Published As

Publication number Publication date
JPH0837603A (en) 1996-02-06

Similar Documents

Publication Publication Date Title
US5926562A (en) Image processing method using reference values to determine exposure state
EP0472695B1 (en) Method and apparatus for improving the color rendition of hardcopy images from electronic cameras
US5818525A (en) RGB image correction using compressed flat illuminated files and a simple one or two point correction algorithm
US7358988B1 (en) Image signal processor for performing image processing appropriate for an output device and method therefor
JP3948229B2 (en) Image capturing apparatus and method
US9438875B2 (en) Image processing apparatus, image processing method, and program
US8208038B2 (en) Image signal processing device and image signal processing method
US7050098B2 (en) Signal processing apparatus and method, and image sensing apparatus having a plurality of image sensing regions per image frame
US5790707A (en) Film image reading system and image processing method dot sequentially adjusting image parameters
JP3456032B2 (en) Image processing method
US20010016081A1 (en) Image filter circuit
JP3605856B2 (en) Image processing device
JPH11191871A (en) Image processor
JPH0638043A (en) Quantization circuit
JP3876932B2 (en) Image processing method
JP3575113B2 (en) Film image processing method
JP3714491B2 (en) Outline enhancement method
JP2000354250A (en) Image pickup device
JP3958708B2 (en) Gamma correction method
JP3446843B2 (en) Gamma correction method
JPH07322282A (en) Gamma correction method
JP3896424B2 (en) Image signal processing method and gamma correction method for film scanner
JP3605813B2 (en) Exposure control device and method for film scanner
JPH07322274A (en) Image processing method
JPH07336539A (en) Image processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20031226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040302

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040416

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040722

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040813

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20040818

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040927

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20071015

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20071015

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20081015

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091015

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees