JP3643201B2 - Digital camera - Google Patents

Digital camera Download PDF

Info

Publication number
JP3643201B2
JP3643201B2 JP01300097A JP1300097A JP3643201B2 JP 3643201 B2 JP3643201 B2 JP 3643201B2 JP 01300097 A JP01300097 A JP 01300097A JP 1300097 A JP1300097 A JP 1300097A JP 3643201 B2 JP3643201 B2 JP 3643201B2
Authority
JP
Japan
Prior art keywords
image
block
characteristic
light
histogram
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
JP01300097A
Other languages
Japanese (ja)
Other versions
JPH10210353A (en
Inventor
宣之 沖須
真一 藤井
Original Assignee
コニカミノルタフォトイメージング株式会社
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 コニカミノルタフォトイメージング株式会社 filed Critical コニカミノルタフォトイメージング株式会社
Priority to JP01300097A priority Critical patent/JP3643201B2/en
Priority to US09/013,055 priority patent/US6806903B1/en
Publication of JPH10210353A publication Critical patent/JPH10210353A/en
Priority to US10/923,828 priority patent/US20050024508A1/en
Application granted granted Critical
Publication of JP3643201B2 publication Critical patent/JP3643201B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Picture Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、静止した被写体光像を電気信号に光電変換して取り込むデジタルカメラに関するものである。
【0002】
【従来の技術】
従来、デジタル複写機等の画像形成装置においては、記録紙に複写された文字や図形等の情報の明瞭度を高めるため、電気信号に光電変換して取り込まれた画像に対して比較的γ値の大きいγ特性(2値化処理に近い特性を有するγ特性)を用いて画像処理(ガンマ補正処理)が行なわれている。また、このガンマ補正処理においては、一般に、照度ムラの影響を低減するため、図36に示すように、撮像画像Gを副走査方向に複数の短冊状のブロックB(1),B(2),…B(n)に分割し、各ブロックB(r)内に含まれる画素データのレベル分布を示すヒストグラムに基づいて各ブロック毎にγ特性γ(1),γ(2),…γ(n)を設定し、各ブロックB(r)(r=1,2,…n)内の画素データは、そのブロックに対するγ特性γ(r)を用いてガンマ補正が行なわれるようになっている。
【0003】
このガンマ補正により所定レベル以上の白地部分が一律に一定の白色に変換されるとともに、所定レベル以下の文字部分(黒字部分)が一律に一定の黒色に変換されるので、2値化処理に近似した画質が得られるようになっている。
【0004】
また、特開平6−113139号公報には、撮像画像を複数の部分画像ブロックに分割し、選択された部分画像ブロック(注目部分画像ブロック)とこの注目部分画像ブロックに隣接する複数の部分画像ブロックについて、ブロック毎にブロック内に含まれる画素データのレベル分布のヒストグラムを作成するとともに、このヒストグラムのデータを用いてニュ−ラルネットワークにより注目部分画像ブロックの閾値を設定し、この閾値を用いて注目部分画像ブロック内の画素データの2値化処理を行なう画像2値化装置が示されている。
【0005】
また、デジタル複写機等の画像形成装置においては、原稿で照明光が正反射されると、この正反射光により原稿に記載された文字等の濃度が著しく低下し、原稿像を正確に取り込むことができなくなるので、従来、このような不具合を防止するため、原稿で正反射された照明光を検出する技術が知られている。
【0006】
この検出技術は、センサのライン単位でCCD(Charge Coupled Device)等の撮像素子で取り込まれる画素信号のレベル分布のヒストグラムを作成し、このヒストグラムの形状から正反射光の有無を判別するというものである。より具体的には、正反射光が含まれている場合、正反射光を受光した画素からは飽和したレベルの画素信号が出力されるので、例えばヒストグラムの飽和レベルにおける頻度が所定の閾値を超えているか否かを判別することにより正反射光の有無が判別されている。
【0007】
【発明が解決しようとする課題】
ところで、デジタルカメラは、画像処理により撮影された画像の画質を自在に制御できることから、撮影の目的や被写体の種類に応じて撮影画像の画質の処理を適正に行なうことにより通常の銀塩フィルムに撮影するカメラに比してより好適な画質の画像を取り込むことができるという利点がある。このため、通常の写真撮影のためだけでなく、例えば会議場でホワイトボードに書かれた文字、図形等の情報を写し取るための機器として利用されている。
【0008】
デジタルカメラで文字や図形等が書かれたホワイトボードを撮影する場合、その撮影の主目的は専らホワイトボード上の文字や図形等の情報の記録にあるので、このような撮影画像に対しては上記デジタル複写機と同様に白地部分(ホワイトボードの部分)を白く飛ばして情報部分(文字や図形の部分)の明瞭度を高めるようなガンマ補正を行なうことが望ましい。
【0009】
この場合、ホワイトボード上の文字密度のバラツキや照度ムラが大きいので、撮像画像を2次元的に複数のブロックに分割し、ブロック単位でガンマ補正を行なうことにより照度ムラの補正(シェーディング補正)を行なうことが望ましい。
【0010】
すなわち、部屋の天井灯と窓外の太陽光とによりホワイトボードが照明されているとすると、照明光の不均一により照度ムラが生じ、かつ、また、撮影レンズの入射瞳に角度ωで入射する光軸外物点の像はcos4ωに比例して暗くなるという、いわゆるコサイン4乗則による入射光量分布と上記照度ムラとの相乗効果により、CCD等の撮像素子の出力分布は撮像面内で2次元方向に大きく変動する。
【0011】
このため、撮像画像を2次元的に複数のブロックに分割し、各ブロック毎にそのブロック内の照度に応じたガンマ補正をして照度ムラ補正を行なうことが望ましい。そして、より好ましくは、隣接するブロック間でブロック毎に設定されたγ特性が大きく変化する場合にこのγ特性の急変に起因してブロックの境界に偽線が生じるのを回避するため、ブロックサイズを可及的に小さくして各ブロックに適正なγ特性を設定するようにするのがよい。
【0012】
この場合、天井灯や太陽光等の照明光がホワイトボードで正反射されるような撮影位置では、正反射された照明光によりホワイトボード上の文字等が白く飛んでしまうため、情報価値の低い画像が撮影されることになる。特に、画像処理において上述の照度ムラ補正を行なうと、正反射光を含むブロックでは正確なヒストグラムが作成できず、効果的な照度ムラ補正が行えないばかりか、そのブロックの周辺の正反射光を含まないブロックにも正反射光の悪影響が生じ、画質及び情報価値の低下が著しくなるという問題が生じる。
【0013】
デジタル複写機においては、人工光源により所定の条件で原稿を照明しているので、センサのライン単位の検出処理により十分に正反射光の検出が可能であるが、デジタルカメラにおいては、照明光の照明条件が一定せず、特に太陽光等の外光はスポット状にホワイトボードに入射して正反射するので、上記従来のデジタル複写機における正反射光の検出方法のようにライン単位で検出処理を行なったのではスポット状の正反射光を確実に検出することは困難で、十分な検出精度が得られない。
【0014】
一方、上記特開平6−113139号公報に記載の2値化処理技術も、主としてコピー装置やファクシミリ装置における2値化処理に関するものであるが、同公報には上述したデジタルカメラにおける撮影特有の正反射光の問題やそれを示唆する記述は全くなされていない。
【0015】
本発明は、上記課題に鑑みてなされたものであり、照明光がホワイトボードで正反射される撮影条件下でボード上に記載された文字等の情報を撮影する際、正反射光を高い精度で検出し、低画質の映像を撮影するという撮影ミスを確実に防止することのできるデジタルカメラを提供するものである。
【0016】
【課題を解決するための手段】
本発明は、複数の光電変換素子からなる撮像手段により被写体光像を画素信号に光電変換して取り込み、その画素信号からなる画像を記録媒体に記録するデジタルカメラにおいて、上記撮像手段で取り込まれた画像を複数の小画像に分割する画像分割手段と、小画像毎に各小画像を構成する画素信号のレベル分布のヒストグラムを作成するヒストグラム作成手段と、小画像毎に、作成されたヒストグラムを用いてその小画像内に主被写体で正反射された照明光が含まれるか否かを判別する判別手段と、上記撮像手段で取り込まれた画像の照度ムラを補正する照度ムラ補正手段とを備え、いずれかの小画像に正反射された照明光が含まれているとき、上記照度ムラ補正手段による照度ムラの補正を禁止し、正反射された照明光が含まれていないとき、上記照度ムラ補正手段による照度ムラの補正を行うことを特徴とするものである(請求項1)。
【0017】
また、本発明は、上記デジタルカメラにおいて、警告手段を備え、主被写体で照明光が正反射光されていることを上記警告手段により警告するものである(請求項2)。
【0018】
上記構成によれば、撮像手段で取り込まれた画像は複数の小画像に分割され、小画像毎に、各小画像を構成する画素信号のレベル分布のヒストグラムが作成される。また、小画像毎に、作成されたヒストグラムを用いてその小画像内に主被写体で正反射された照明光が含まれるか否かが判別され、いずれかの小画像に正反射光が含まれているとき、照度ムラ補正手段による照度ムラの補正を禁止し、正反射光が含まれていないとき、上記照度ムラ補正手段による照度ムラの補正を行う処理が行われる。また、正反射光を含む撮影画像であることの警告をする処理が行なわれる。
【0019】
また、本発明は、複数の光電変換素子からなる撮像手段により被写体光像を画素信号に光電変換して取り込み、その画素信号からなる画像を記録媒体に記録するデジタルカメラにおいて、上記撮像手段で取り込まれた画像を複数の小画像に分割する画像分割手段と、小画像毎に各小画像を構成する画素信号のレベル分布のヒストグラムを作成するヒストグラム作成手段と、小画像毎に、作成されたヒストグラムを用いてその小画像内に主被写体で正反射された照明光が含まれるか否かを判別する判別手段とを備え、いずれかの小画像に正反射された照明光が含まれているとき、取り込まれた画像の上記記録媒体への記録を禁止し、正反射された照明光が含まれていないとき、取り込まれた画像を上記記録媒体へ記録するものである(請求項3)。
【0020】
上記構成によれば、いずれかの小画像に主被写体で正反射された照明光が含まれていると、取り込まれた画像の記録手段への記録が禁止される。すなわち、正反射光を含む被写体の撮影が禁止される。
【0021】
これにより撮影者は正反射光により一部不明瞭となった低画質の被写体像(例えばホワイトボード上に書かれた文字等が正反射光により不明瞭となった画像)の誤撮影を確実に防止することができる。
【0022】
【発明の実施の形態】
図1は、本発明に係るデジタルカメラの外観を示す斜視図である。また、図2は、同デジタルカメラの背面図である。
【0023】
同図に示すカメラ1は撮像素子としてCCDエリアセンサを備え、このCCDエリアセンサで撮像された画像データが、図略のPCMCIA準拠のハードディスクカードに記録されるようになっている。なお、本実施の形態では撮像素子としてエリアセンサを用いた場合について説明するが、ラインセンサにより被写体光像をスキャンして画像データを取り込む構成にしてもよい。
【0024】
カメラ1はホワイトボード上に書かれた文字、図形等の情報(以下、この種の2値情報を文字情報という。)の撮影画像に対してホワイトボードに対する照明光(天井灯や窓外の太陽光等)のムラやCCDエリアセンサの感度のバラツキに起因する照度ムラの補正機能を備えている。
【0025】
すなわち、例えば図4に示すように、部屋の天井灯と窓外の太陽光とによりホワイトボード23が照明されているとすると、照明光の不均一により照度ムラが生じ、かつ、また、撮影レンズの入射瞳に角度ωで入射する光軸外物点の像はcos4ωに比例して暗くなるという、いわゆるコサイン4乗則による入射光量分布とこの照度ムラとの相乗効果により、CCDエリアセンサの出力分布は、図5(a),(b)に示すように、撮像面内で2次元的に大きく変動する。カメラ1では、後述する文字画モードで撮影した場合は、各画素データ毎にあるいは複数の画素データ単位で適切なγ特性を設定し、そのγ特性を用いて各画素データもしくは各画素データ単位でガンマ補正を行なうことにより、2次元的に生じるCCDエリアセンサの出力変動が可及的に低減される。
【0026】
なお、図5において、実線はホワイトボード23に何も書かれていない場合で、ホワイトボード23の白地部分の出力分布を示し、点線はホワイトボード23に文字が書かれていた場合の文字部分の出力分布を示している。
【0027】
ここで、照度ムラ補正について簡単に説明する。
文字情報を撮影した画像は主として情報の記録が目的であり、描写性よりも情報の判読性の高い画質が要求されることから、ホワイトボードの白地部分に対する文字情報部分のコントラストを高くして文字情報の明瞭化を図るとともに、照度ムラを低減して全体的に見易くすることが望ましい。
【0028】
本実施の形態で、図6に示すように、撮像画像Gを縦横に複数の正方形のブロックB(I)(同図ではI=1,2,…18)に分割し、各ブロックB(I)に含まれる画素データのレベル分布のヒストグラムを用いて算出された白地レベルWにより、図7に示すようなγ特性をそのブロック(I)の中心位置O(I)に対するγ特性γ(I)として設定し、更に設定されたγ特性γ(I)を用いて各ブロックB(I)の中心位置O(I)以外の画素位置Pのγ特性γ(P)を補間し、これらのγ特性γ(I),γ(P)を用いて対応する画素位置O(I),Pの画素データのガンマ補正を行なうことにより文字情報の明瞭化と照度ムラ補正とを行なうようにしている。
【0029】
なお、図7は画素データを8ビットデータにA/D変換した場合のもので、入出力レベルのレベル値「255」は最大値を示している。また、同図に示すγ特性では、入力レベルW以上の画素データは全て最大レベルに飽和した画素データに変換されるので、撮像画像は入力レベルW以上の画素データからなる白地部分が一律に最大明度の白色となる画質に補正される。これにより白地部分に対する文字情報部分のコントラストが強調され、文字情報の明瞭化が図られる。
【0030】
また、必要に応じて照度ムラ補正後の画像に対し、図8に示すようなγ特性を用いてガンマ補正を行なうことにより文字情報部分の黒字強調が行なわれる。すなわち、照度ムラ補正後の画像は入力レベルB以下の画素データからなる黒地部分が一律に最小明度の黒色となる画質に補正され、これによりホワイトボード23に書かれた文字、図形等の濃度、線の太さ、線密度に応じて文字部分の黒色強調がなされ、文字情報の明瞭化の適正化が図られるようになっている。なお、照度ムラ補正におけるガンマ補正処理の詳細については後述する。
【0031】
図1に戻り、カメラ1は前面の略中央にズームレンズから成る撮影レンズ2が配設され、その上部にアクティブ測距方式により被写体距離を測定するための投光窓4と受光窓5とが配設され、両窓の間に被写体の輝度を測定するための測光窓3が配設されている。また、投光窓4の左側にファインダー対物窓6が配設され、受光窓5の右側にフラッシュ7が配設されている。
【0032】
カメラ本体内の撮影レンズ2の結像位置には、図3に示すように、横長長方形のCCDエリアセンサ21(以下、CCD21と略称する。)が配設され、このCCD21と撮影レンズ2との間に絞り22が配設されている。
【0033】
投光窓4は被写体に対して赤外光を照射する窓であり、受光窓5はこの赤外光の被写体からの反射光を受光する窓である。なお、本実施の形態では測距方式としてアクティブ測距方式を採用しているが、パッシブ測距方式でもよい。
【0034】
カメラ1の側面にはハードディスクカード13が装着脱されるカード挿入口8が設けられ、このカード挿入口8の上部にハードディスクカード13をイジェクトするためのカード取出ボタン9が設けられている。撮影結果をプリントアウトする場合、カード取出ボタン9を押してハードディスクカード13をカメラ1から取り外し、ハードディスクカードが装着可能なプリンタにこのハードディスクカード13を装着してプリントアウトすることができる。
【0035】
なお、カメラ1にSCSIケーブルのインターフェースを設け、カメラ1とプリンタとをSCSIケーブルで接続して直接、カメラ1からプリンタに画像データを転送して撮影画像をプリントアウトさせるようにしてもよい。
【0036】
また、本実施の形態では画像データの記録媒体としてPCMCIA準拠のハードディスクカードを採用しているが、撮影結果を画像データとして記憶できるものであれば、メモリカードやミニディスク(MD)等の他の記録媒体でもよい。
【0037】
カメラ1の上面には左端部にシャッタボタン10が設けられ、右端部にズームスイッチ11と撮影/再生スイッチ12が設けられている。シャッタボタン10は半押しで焦点距離調節、露出制御値設定等の撮影準備を指示するS1スイッチがONになり、全押しでレリーズを指示するS2スイッチがONになる操作ボタンである。ズームスイッチ11は左右にスライド可能な3接点スイッチから成り、ズームスイッチ11をT(TELE)側にスライドさせると、望遠側に、また、W(WIDE)側にスライドさせると、広角側に、撮影レンズ2のズーム比を連続的に変更することができる。
【0038】
撮影/再生スイッチ12は撮影モードと再生モードとを切換設定するスイッチである。撮影/再生スイッチ12は左右にスライド可能な2接点切換スイッチから成り、撮影/再生スイッチ12が撮影(REC)側に設定されていると、被写体の撮影(撮像画像のハードディスクカード13への記録)が可能になり、再生(PLAY)側に設定されていると、ハードディスクカード13に記録された撮像画像のLCD表示部19(図2参照)へのモニター表示が可能になる。
【0039】
カメラ1の背面には、図2に示すように、その上部の左端部と略中央とにそれぞれ電源投入用のメインスイッチ14とファインダー接眼窓15とが設けられ、右上隅部にブザー16が設けられている。このブザー16は、ホワイトボード23上の文字情報を撮影する際、照明光がホワイトボード23で正反射して文字情報が不明瞭になることを撮影者に警告するためのものである。以下、この警告のことを「正反射警告」という。
【0040】
また、メインスイッチ14の下部に照度ムラ補正スイッチ17及び黒色濃度調整スイッチ18が設けられ、この黒色濃度調整スイッチ18の右側に正反射警告スイッチ20が設けられている。更に、カメラ1の背面の右下隅部にはLCD表示部19が設けられている。
【0041】
照度ムラ補正スイッチ17は上述した照度ムラ補正を指示するスイッチである。照度ムラ補正スイッチ17は操作ボタンが左右にスライドするON/OFFスイッチで構成されている。照度ムラ補正スイッチ17により照度ムラ補正が指示されると、撮影画像を複数のブロック(小画像)に分割し、ブロック毎にそのブロックに含まれる画素データを用いて設定された図7に示すようなγ特性に従ってガンマ補正が行なわれる。一方、照度ムラ補正スイッチ17がOFFになっているときは、予め設定された通常の写真撮影に適したγ特性(被写体の有する階調を可能な限り忠実に再生し得る描写性の高い画質が得られるようなγ特性)を用いて撮像画像のガンマ補正処理が行なわれる。
【0042】
照度ムラ補正は、ホワイトボードに書かれた文字情報を撮影する際の照度ムラによる画質劣化を改善するもので、主としてこのような文字情報を撮影するときに適用される。従って、文字、図形等の情報を撮影した画像を「文字画」とし、風景や人物を撮影した画像を「自然画」として撮影画像の内容を2種類に分けると、照度ムラ補正スイッチ17は撮影画像の画像処理(特にガンマ補正処理)を文字画モードと自然画モードとに切り換えるスイッチとなっている。
【0043】
撮影者は文字画を撮影するときは、照度ムラ補正スイッチ17を「ON」に設定することにより文字画に適した画質(白地部分を白く飛ばして文字等の情報が適切に強調された画質)の撮影画像を得ることができ、自然画を撮影するときは、照度ムラ補正スイッチ17を「OFF]に設定することにより自然画に適した画質(描写性の高い画質)の撮影画像を得ることができる。
【0044】
黒色濃度調整スイッチ18は、照度ムラ補正後の画像に対して黒色強調のガンマ補正におけるγ特性の黒色飽和レベルB(図8参照)を調整するスイッチである。黒色濃度調整スイッチ18は操作ボタンが左右にスライドする3接点スイッチで構成されている。黒色濃度調整スイッチ18は照度ムラ補正スイッチ17が「ON」に設定されているとき(文字画モードが設定されているとき)にのみ機能する。文字画モードにおいて、黒色濃度調整スイッチ18がOFF状態に設定されているときは、図9に示すように、γ特性の黒色飽和レベルは予め設定された所定レベルB0に設定され、黒色濃度調整スイッチ18が「濃」に設定されると、γ特性の黒色飽和レベルは所定レベルB0より大きい所定のレベルB1(>B0)に切換設定され、「淡」に設定されると、γ特性の黒色飽和レベルは所定レベルB0より小さい所定レベルB2(<B0)に切換設定される。
【0045】
文字画モードの画像処理では、下地部分を白く飛ばすようにγ特性の白色飽和レベルが自動調整されるが、更に黒色濃度調整スイッチ18により黒色飽和レベルを変更することにより文字部分の濃度を変更して下地(白地)とのコントラストを調整することができる。
【0046】
例えばホワイトボードに書かれた文字と原稿に書かれた文字とを比較すると、一般にホワイトボードの文字の方が原稿の文字よりも太く、大きいから、原稿を撮像した場合にホワイトボードの場合と同様のガンマ補正を行なうと、下地に対する文字のコントラストがホワイトボードの場合に比して低下することになる。従って、原稿を撮影する場合は、黒色濃度調整スイッチ18を「濃」に設定することにより文字部分の黒色を強調し、下地に対する文字部分のコントラストを好適に調整することができる。
【0047】
なお、本実施の形態では、黒色飽和レベルを2段階に切換設定するようにしているが、多段切換方式でもよく、連続的に切り換えられるようにしてもよい。
【0048】
LCD表示部19は撮像画像をモニター表示するものである。撮影/再生スイッチ12が再生側に設定されると、図略の選択スイッチにより指定されたコマの撮像画像がハードディスクカード13から読み出されてLCD表示部19に再生表示される。
【0049】
正反射警告スイッチ20は上述した正反射警告を行なうように指示するスイッチである。正反射警告スイッチ20は操作ボタンが左右にスライドするON/OFFスイッチで構成されている。正反射警告スイッチ20により「警告有り」が指示されていると、撮影画像を複数のブロック(小画像)に分割し、ブロック毎にそのブロックに含まれる画素データのレベル分布のヒストグラムを用いて正反射光の有無が判別され、いずれかのブロックで正反射光が検出されると、上記ブザー16から警告音を発生される。また、図10に示すように、ファインダー視野枠42内に設けられた正反射警告用のLED表示24を発光して正反射光により撮影画像の画質低下を招くおそれがあることを警告する。一方、正反射警告スイッチ20が「OFF」になっているときは、上記正反射光の検出及び正反射警告は行なわれない。
【0050】
なお、上記のように正反射警告を行なうか否かを撮影者の選択に委せているのは、正反射光は主として文字画モードにおける撮影で問題となり、通常の写真撮影と同様の撮影を行なう自然画モードでは逆に正反射光が撮影効果として有効に活用されることがあるので、撮影目的、撮影シーン等を考慮し、必要に応じて正反射警告をなし得るようにしたものである。従って、正反射警告スイッチ20を設けることなく、常に正反射警告を行なわせるようにしてあってもよい。
【0051】
図11は、本発明に係るカメラ1のブロック構成図である。
同図において、上述した部材と同一部材には同一の番号を付している。また、CCD駆動部31は、CPU30から入力される露出制御値のシャッタースピードに基づいてCCD21の撮像動作を制御するものである。CCD21はカラーエリアセンサから成り、CCD駆動部31から入力される制御信号に基づき撮像動作(電荷蓄積動作)を行ない、R,G,Bの各色成分の画素信号を時系列信号に変換して画像処理部32に出力する。
【0052】
画像処理部32はCCD21から出力された画素信号に所定の信号処理を施してハードディスクカード13に出力するものである。画像処理部32はA/D変換器321、画像メモリ322、第1γ特性設定部323、第2γ特性設定部324、第1γ補正部325、第2γ補正部326及びスイッチ回路327,328を有し、照度ムラ補正が指示されているときは、照度ムラ補正を行なう。照度ムラ補正はブロック毎に照度ムラ補正用のγ特性を設定し、そのγ特性を用いてガンマ補正を行なうことにより行なわれる。このとき、ブロックの中心位置間の部分に対するγ特性が補間され、この部分の画像信号を補間されたγ特性を用いてガンマ補正することによりブロック間のγ特性の相違に基づく画質の不連続が緩和される。
【0053】
A/D変換器321はCCD21から読み出された画像信号に含まれる各画素信号をデジタルの信号(以下、画素データという。)に変換するものである。
【0054】
画像メモリ322はA/D変換器321から出力された画素データを記憶するものである。画像メモリ322は撮像画像1枚分の画素データを記憶し得る容量を有し、撮像画像の画像処理が一括して行なえるようになっている。
【0055】
なお、ブロックに分割した際、ブロックの行単位で画像処理を成し得るように、メモリの画像メモリ322の容量を、設定され得る最大のブロックサイズで撮像画像を複数のブロックに分割した際、少なくとも1行に配置されるブロックに含まれる画素データを記憶し得る容量とし、メモリの削減を図るようにしてもよい。すなわち、図14に示すように、例えば撮像画像Gが最大ブロックサイズで3×3個のブロックB(1)〜B(9)に分割されるとすると、画像メモリ322の容量を各行に配置されるブロックB(1)〜B(3),ブロックB(4)〜B(6),ブロックB(7)〜B(9)に含まれる画素データを記憶し得る容量としてもよい。
【0056】
第1γ特性設定部323は撮像画像の照度ムラ補正用のγ特性を設定するものである。第1γ特性設定部323は撮像画像を複数のブロックに分割し、ブロック毎に各ブロック内に含まれる画素データを用いて照度ムラ補正用のγ特性を設定する。第2γ特性設定部324は照度ムラ補正後の画像の黒色濃度強調用のγ特性を設定するものである。第2γ特性設定部324はCPU30から入力される黒色濃度調整スイッチ18の操作情報に基づいて黒色濃度強調用のγ特性を設定する。
【0057】
また、第1γ補正部325は自然画に対するガンマ補正を行なう回路であり、第2γ補正部326は文字画に対するガンマ補正を行なう回路である。第1γ補正部325は予め設定された自然画に適したγ特性を用いて画像メモリ322から読み出された画素データのガンマ補正を行なう。第2γ補正部326は文字画の撮像画像を複数のブロックに分割し、ブロック毎に第1γ特性設定部323で設定された照度ムラ補正用のγ特性を用いて撮像画像を構成する画素データのガンマ補正を行なった後、第2γ特性設定部324で設定された黒色濃度強調用のγ特性を用いて画素データのガンマ補正を行なう。なお、文字画に対するガンマ補正については後述する。
【0058】
また、スイッチ回路327は画像メモリ322と第1、第2γ補正部325,326との接続を切り換えるものであり、スイッチ回路328は第1,第2γ補正部325,326とハードディスクカード13との接続を切り換えるものである。スイッチ回路327,328の切換制御は照度ムラ補正スイッチ17の設定状態に対応してCPU30から出力される制御信号により行なわれ、照度ムラ補正スイッチ17が「OFF」に設定されている(自然画モードが設定されている)と、画像メモリ322と第1γ補正部325及び第1γ補正部325とハードディスクカード13とがそれぞれ接続され、照度ムラ補正スイッチ17が「ON」に設定されている(文字画モードが設定されている)と、画像メモリ322と第2γ補正部326及び第2γ補正部326とハードディスクカード13とがそれぞれ接続される。
【0059】
ここで、文字画に対するガンマ補正(照度ムラ補正及び黒色強調補正)の方法について説明する。
【0060】
上述したように、文字画の場合は、白地部分に対して相対的に文字部分の明瞭度を大きくすることが望ましいので、白地部分を白く飛ばすために、図7に示すように、所定の入力レベルWで出力レベルを飽和させたγ特性が用いられる。
【0061】
このγ特性における白色飽和レベルWは、例えば文字画の画像を構成する緑色成分の画素データのレベル分布のヒストグラムを作成し、白地部分に相当する範囲内で最大頻度を有する階級が設定される。すなわち、文字、図形等の描かれたホワイトボード23を撮影した画像について、緑色成分の画素データのレベル分布のヒストグラムを作成すると、図15に示すように、一般に白地部分(ボード部分)に相当する山Uと黒字部分(文字部分)に相当する山Cとを有する二山分布になり、白地部分に相当する山Uのピークに対応するレベルwがγ特性の白色飽和レベルWとして設定される。
【0062】
撮像画像全体を構成する緑色成分の画素データのヒストグラムから白色飽和レベルWを決定したγ特性を設定し、このγ特性を用いて撮像画像全体のガンマ補正を行なうようにしてもよいが、ホワイトボード23に手書きされたものは文字密度(白地部分に対する文字部分の比率)のバラツキが大きく、しかも写真撮影の場合は、照明装置を備えた複写機等の場合と異なり、光源が一定でなく、画面内で照度分布が大きく変化することから、撮像画面内の照度ムラが大きくなるので、好ましくは撮像画像を複数のブロックに分割し、各ブロック毎に設定したγ特性に従ってブロック単位でガンマ補正することにより照度ムラを補正することが望ましい。
【0063】
本実施の形態に係るカメラ1では、通常の撮影モードの場合(すなわち、正面撮影の場合)、図16に示すように、撮像画像Gを縦横にn(=K(縦)×L(横))個のブロックB(I,J)(I=1,2,…K,J=1,2,…L)に分割し、各ブロックB(I,J)毎にそのブロックB(I,J)を代表する照度ムラ補正用のγ特性を設定するようにしている。この場合、ブロックB(I,J)のサイズ(面積)は略9(=3×3)個の文字が入るサイズに設定されている。このようにブロックB(I,J)のサイズを文字数との関係で相対的に設定しているのは、ブロック内の画素データを用いてヒストグラムを作成した場合に、ホワイトボード23に相当する部分の山Uが適度に急峻な山形となり、その山Uのピーク位置wを確実に検出できるようにするためである。
【0064】
すなわち、図17(a)に示すように、ブロックサイズを文字に対して相対的に小サイズに設定すると、ブロックB(I,J)内の文字部分の占める面積が大きく、ヒストグラムのホワイトボード23に相当する部分の山Uが低くなるので、山Uのピーク位置wが誤検出されるおそれがあり、同図(b)に示すように、ブロックサイズを文字に対して相対的に大サイズに設定すると、ブロックB(I,J)内での照度ムラが大きく、ヒストグラムのホワイトボード23に相当する部分の山Uがなだらかになるので、この場合も山Uのピーク位置wが誤検出されるおそれがあるからである。
【0065】
ブロックサイズを決定するには撮影画面に投影された文字の大きさを知る必要があるが、撮影画面に投影された文字の大きさy′はホワイトボード23に書かれた文字の大きさy及び撮影倍率mからy′=y・mで算出することができ、しかもホワイトボード23に書かれる文字の大きさyは個人差があるとはいっても一定の範囲内にあると考えられるので、ホワイトボード23に書かれる文字の大きさyの代表値y0と撮影倍率m0とを実験的に決定しておけば、撮影画面に投影された文字の大きさy′は撮影倍率mから一意的に決定することができる。
【0066】
本実施の形態では、ある撮影倍率m0での撮影画面に投影された文字の大きさy0に基づいて基準となるブロックサイズS0を決定しておき、任意の撮影倍率mにおけるブロックサイズSを撮影倍率m0及びブロックサイズS0からS=S0・m/m0の演算式で算出するようにしている。従って、ブロックサイズS0のブロック内に縦横(i×j)個の画素データが含まれているとすると、ブロックサイズSに含まれる画素データの縦方向の個数i′はi・m/m0個、横方向の個数j′はj・m/m0となる。
【0067】
なお、本実施の形態ではブロック内の文字数が9個となるように、ブロックサイズSを設定しているが、これは一例であって、ホワイトボード23に書かれる文字の大きさyの代表値y0を変更すれば、ブロック内の文字数も変化するものである。従って、ブロックサイズSは代表値y0の設定に応じて適宜、適当な文字数が含まれるように設定される。
【0068】
また、本実施の形態では、撮影倍率mに応じてブロックサイズSを変更するようにしているが、ブロックサイズS0を固定しておき、文字画の撮影においては撮影倍率mがブロックサイズS0に対する所定値m0となるように調整するようにしてもよい。すなわち、図18に示すように、ファインダー視野枠42内にブロックサイズS0に相当するブロック枠43を表示させ、撮影者がこのブロック枠43内のホワイトボード23に書かれた文字が9個入るように、撮影レンズ2のズーム比もしくは被写体距離を調整するようにしてもよい。また、ブロック枠43は常時、表示させるようにしてもよいが、文字画モードが設定されたときにのみ表示させるようにしてもよい。
【0069】
更に、上記実施の形態では、設定された各ブロックB(I,J)について全てヒストグラムを作成し、このヒストグラムから照度ムラ補正用のγ特性の白色飽和レベルWを設定するようにしているが、縦方向については比較的照度ムラが少なく、横方向にのみ照度ムラが大きい場合は、図19に示すように、撮像画像Gの中央を通る横方向のブロックB(3,1),B(3,2),…B(3,9)についてのみヒストグラムを作成してそのヒストグラムからγ特性の白色飽和レベルWを設定し、他のブロックB(I,J)(I=1,2,4,5、J=1,2,…9)については、そのブロックが含まれる列で設定されたブロックB(3,r)で設定されたγ特性を適用するようにしてもよい。例えば第1列目に含まれるブロックB(1,1),B(2,1),B(4,1),B(5,1)についてはブロックB(3,1)で設定されたγ特性を適用する。
【0070】
逆に縦方向については比較的照度ムラが少なく、横方向にのみ照度ムラが大きい場合は、図20に示すように、撮像画像Gの中央を通る縦方向のブロックB(1,5),B(2,5),…B(5,5)についてのみヒストグラムを作成してそのヒストグラムからγ特性の白色飽和レベルWを設定し、他のブロックB(I,J)(I=1,2,…5、J=1〜4,6〜9)についてはそのブロックが含まれる行で設定されたブロックB(r,5)で設定されたγ特性を適用するようにしてもよい。例えば第1行目に含まれるブロックB(1,1),B(1,2),B(1,3),B(1,4),B(1,6),B(1,7),B(1,8),B(1,9)についてはブロックB(1,5)で設定されたγ特性を適用する。このようにすると、γ特性の演算時間の短縮及び設定されたγ特性を記憶するメモリの容量の低減を図ることができる。
【0071】
また、上記実施の形態では、撮像画像G全体をマトリックス状に均等に分割してブロックB(I,J)を連続的に設定しているが、図21に示すように、撮像画面G内に複数のブロックB(I,J)を離散的に設定するようにしてもよい。このようにすると、ブロック数が少なくなるので、上記例と同様にγ特性設定のための演算時間を短縮することができるとともに、演算されたγ特性を記憶するためのメモリの容量を低減することができる。
【0072】
次に、緑色成分の画素データのヒストグラムから照度ムラ補正用のγ特性を決定する方法について説明する。
【0073】
ブロックB(I,J)内に含まれる(i×j)個の画素データg(1,1),g(1,2),…g(i-1,j),g(i,j)の内、最大レベルから低レベル側に積算して予め設定されたX(%)分の画素データを除去し、残りの画素データを用いてレベル分布のヒストグラムが作成される。例えばブロック内に含まれる総画素データ数を10000個とし、X=3%とすると、最大レベルqの画素データから低レベル側に順次、積算して得られる300個の画素データを除去し、残りの9700個の画素データを用いてヒストグラムが作成される。ハイレベル側のX%の画素データを除去するのは、ノイズ等の悪影響を回避するためである。
【0074】
このヒストグラムは、一般に、図22に示すように二山分布となり、ハイレベル側の山Uはホワイトボード23の下地部分に相当し、ローレベル側の山Cは文字部分に相当している。なお、同図における階級pはブロックB(I,J)内に含まれる画素データの内の最大レベルであり、階級q(<p)はヒストグラムの階級の最大値である。
【0075】
ヒストグラムが作成されると、最大階級pから低レベル側に予め設定された範囲dに含まれる分布内で最も頻度の高い階級wが算出され、この階級wが照度ムラ補正用のγ特性の白色飽和レベルWに設定される。上記範囲dは、ブロックサイズが文字数との関係で所定サイズに設定されているので、通常の照度で撮影されているブロックであれば、ハイレベル側の山Uのみが確実に含まれると推定される範囲である。例えば画素データが8ビットで、0〜255の階調を有している場合、上記範囲dはおよそ48程度に設定される。
【0076】
従って、例えば最大階級qが200であれば、階級範囲152〜200内で最大頻度を有する階級wが算出され、この階級wが、例えばw=180であれば、白色飽和レベルW=180に設定され、図23に示すようなγ特性が決定される。
【0077】
ところで、ホワイトボード23が完全に白色でなく、僅かに色が着いていたり、カメラ1のホワイトバランス調整が不適切であると、照度ムラ補正用のγ特性と黒色強調用のγ特性とに従って行なわれるガンマ補正の等価的なγ特性のγ値は比較的大きいので、緑色成分の画素データを用いて設定された照度ムラ補正用のγ特性を赤色成分の画素データ及び青色成分の画素データのガンマ補正に適用することはできない。
【0078】
すなわち、ホワイトボード23のある領域での撮影データが完全に白色でなく、R,G,Bの各色成分の画素データのレベルDR,DG,DBが、例えば(DR,DG,DB)=(130,140,125)であり、緑色成分の画素データを用いて設定された照度ムラ補正用のγ特性と黒色強調用のγ特性との等価的なγ特性(両γ特性を重ね合わせたγ特性)が、例えば図24のように設定された場合、このγ特性を用いて赤色成分の画素データ及び青色成分の画素データのガンマ補正を行なうと、各色成分の出力は、同図に示すように、(DR,DG,DB)=(185,255,140)となり、ガンマ補正後の画像は黄緑色に大きく色ずれを起こすことになる。
【0079】
図24に示すγ特性のγ値が小さければ(傾斜が緩やかであれば)、ガンマ補正後の各色成分の出力差は小さいので、色ずれは殆ど問題にならないが、文字画モードに適用されるγ特性は2値化処理に近いガンマ補正を行なうものであるため、γ値が比較的大きく設定されるため、緑色成分の画素データを用いて設定されたγ特性を赤色成分の画素データ及び青色成分の画素データのガンマ補正に適用することは困難となる。
【0080】
上記のような白色部分の着色現象を回避する方法として、R,G,Bの各色成分の画素データを輝度データと色差データとに変換し、輝度データのみでガンマ補正を行なった後、再度、R,G,Bの色成分の画素データに逆変換する方法が考えられるが、この方法では色差データが保存されるため、例えばホワイトボード上に書かれた文字がインクの掠れた薄い色の文字である場合はガンマ補正後もその文字の薄い状態が残り、薄い文字を明瞭に再現することは困難となる。
【0081】
本実施の形態では、緑色成分の画素データにより設定された照度ムラ補正用のγ特性を補正して各色成分に専用のγ特性を設定し、各色成分毎に専用のγ特性でガンマ補正することにより薄い色の文字であっても明瞭に再現することができるようにしている。
【0082】
なお、各色成分に対するγ特性は、例えばレベルの余裕値を「5」とし、入力レベル(DR−5,DG−5,DB−5)が白色飽和レベルとなるように、各色成分の画素データを用いて設定される。例えば図24に示すγ特性の例では、図25(a)〜(c)に示すように、R,G,Bの各色成分の入力レベル(125,135,120)が白色飽和レベル255となるように、R,G,Bの各色成分のγ特性が設定される。
【0083】
なお、着色された白地部分を白色となるように、ガンマ補正するため、着色部分は本来の色よりずれることになるが、文字画では色の再現性より情報性が重視されるので、多少の色ずれは許容されるものと考えられる。
【0084】
また、上記説明では、ブロック内に含まれる画素データのレベル分布のヒストグラムを作成し、このヒストグラムを用いて白色飽和レベルを決定する(すなわち、γ特性を設定する)ようにしているが、ヒストグラムの代りに画素データの演算によってγ特性を設定するようにしてもよい。
【0085】
さて、上述の方法により各ブロックB(I,J)毎に照度ムラ補正用のγ特性を設定し、このγ特性を用いてブロック単位で画像のガンマ補正を行なうと、ブロック毎に照度ムラ補正用のγ特性が異なるので、ブロックの境界で画質が急変し、これによって境界線(偽線)が生じるおそれがある。すなわち、ブロックの境界で白地レベルが急変し、この白地レベルの不連続が境界線として生じるおそれがある。
【0086】
そこで、本実施の形態では、各ブロックB(I,J)毎に設定された照度ムラ補正用のγ特性をそのブロックB(I,J)の中心位置の画素データに対するγ特性とし、隣接するブロックの中心位置間の画素データに対する照度ムラ補正用のγ特性を両ブロックの照度ムラ補正用のγ特性を用いで線形補間し、この線形補間したγ特性で中心位置以外の画素データをガンマ補正することによりブロック間のγ特性の相違に基づく画質の不連続を緩和するようにしている。
【0087】
すなわち、図26に示すように、ブロックB(I,J),B(I,J+1),B(I+1,J),B(I+1,J+1)の各中心位置をA,B,C,Dとすると、ABCDで囲まれた領域AR1内の任意の位置Pに対する照度ムラ補正用のγ特性を、ブロックB(I,J),B(I,J+1),B(I+1,J),B(I+1,J+1)毎に設定された照度ムラ補正用のγ特性を用いて線形補間し、この補間したγ特性を用いて位置Pの画素データのガンマ補正が行なわれる。
【0088】
位置Pに対する補間された照度ムラ補正用のγ特性は、ブロックB(I,J),B(I,J+1),B(I+1,J),B(I+1,J+1)についてそれぞれ算出された白色飽和レベルWA,WB,WC,WDは位置A,B,C,Dに対するものとして扱われるので、これらの白色飽和レベルWA,WB,WC,WDから位置A,B,C,Dに対して位置Pに内分する値WPを下記(1)式により算出して設定される。
【0089】
【数1】

Figure 0003643201
【0090】
なお、上記内分法では撮像画像の周辺に位置するブロックB(1,1)〜B(1,L),B(2,L)〜B(K,L),B(K,L-1)〜B(K,1),B(K-1,1)〜B(2,1)において、各ブロックの中心位置より外側の部分のγ特性が補間されないが、この部分については外分法によりγ特性の線形補間を行なうようにすればよい。
【0091】
また、各ブロックB(I,J)の中心位置を除く全ての位置についてγ特性を補間してもよいが、各ブロックB(I,J)の中心位置以外の部分を複数の画素データ(例えば4×4画素乃至6×6画素等)が含まれるブロックに分割し、このブロック単位でγ特性を線形補間するようにして補間演算の時間を短縮するようにしてもよい。
【0092】
なお、上述の照度ムラ補正用のγ特性の補間処理は、各画素位置についてγ特性を設定しているので、各画素位置を中心とするブロックを設定し、そのブロックに含まれる画素データのレベル分布のヒストグラムを用いてγ特性を設定しても同様の結果が得られるが、この方法は、撮像画像Gに非常に沢山のブロックが設定されるため、γ特性の演算に長時間を要する欠点がある。また、隣接するブロック間では画素データの殆どが重複するため、作成されたヒストグラムに殆ど差異が見られないため、両ブロックについてそれぞれヒストグラムを作成する実益もないので、本実施の形態では、より高速演算が可能で、しかもメモリ容量の低減が可能なγ特性の線形補間処理を採用している。
【0093】
図12はカラー画像の画像処理を行なうためのA/D変換器321〜第1,第2γ補正部325,326までの構成を示すブロック構成図である。
【0094】
画像メモリ322、第1γ特性設定部323、第1,第2γ補正部325,326及びスイッチ回路327はそれぞれR,G,Bの各色成分の画素データに対応して3個の同一構造の処理回路を有している。
【0095】
例えばRの色成分の画素信号はA/D変換器321Aで画素データにA/D変換された後、画像メモリ322Aに一時的に記録される。自然画モードにおいては、画像メモリ322Aに記憶されたRの色成分の画素データはスイッチ回路327を介して第1γ補正部325Aに読み出され、所定の自然画用のγ特性を用いてガンマ補正が行なわれる。
【0096】
一方、文字画モードにおいては、第1γ特性設定部323Aによりブロック毎に各ブロックに含まれるRの画素データのレベル分布のヒストグラムから照度ムラ補正用のγ特性が設定され、第2γ特性設定部324により黒色濃度調整スイッチ17の調整値に基づき黒色調整用のγ特性が設定される。そして、画像メモリ322Aに記憶されたRの色成分の画素データはスイッチ回路327を介して第2γ補正部326Aに読み出され、ブロック毎に照度ムラ補正用のγ特性を持ついてガンマ補正が行なわれた後、黒色濃度調整用のγ特性を用いてガンマ補正が行なわれる。
【0097】
G,Bの各色成分の画素信号についても上述のRの色成分の画素信号と同様に進行処理が行なわれる。
【0098】
また、図13は、Gの色成分に対する第1γ特性設定部323Bの内部構成を示すブロック図である。
同図において、ブロックサイズ設定部323aは撮像画像を小画像のブロックB(I,J)に分割するためのブロックサイズを設定するものである。ブロックサイズ設定部323aは、撮像画像をブロック分割するために、CPU30から入力される撮影画面中央の撮影倍率mと予め設定された基準サイズS0及び基準撮影倍率m0とを用いてブロックサイズSを設定する。
【0099】
アドレス生成部323bはブロックサイズ設定部323aで設定されたブロックサイズSに基づいて各ブロックB(I,J)に含まれる画素データのアドレスを生成するものである。このアドレスデータはCCD21からの画素信号に読出し及びA/D変換器321でのA/D変換に用いられるとともに、白色飽和レベル補間演算部323eにおける補間演算に用いられる。
【0100】
ヒストグラム作成部323cは各ブロックB(I,J)毎にそのブロックに含まれる画素データのレベル分布のヒストグラム(図22参照)を作成するものである。白色飽和レベル設定部323dはヒストグラム作成部323cで作成されたヒストグラムを用いて各ブロックB(I,j)の中心位置に対するγ特性の白色飽和レベルW(図23参照)を設定するものである。白色飽和レベル補間演算部323eはブロックB(I,j)毎に設定されたγ特性の白色飽和レベルWを用いて各ブロックB(I,j)の中心位置以外の部分に対するγ特性の白色飽和レベルWを補間設定するものである。
【0101】
γ特性設定部323fは白色飽和レベル設定部323d及び白色飽和レベル補間演算部323eにより設定された白色飽和レベルWを用いて撮像画像の各画素データに対する照度ムラ補正用のγ特性を設定するものである。
【0102】
正反射検出部323gは、正反射警告スイッチ20により正反射警告が指示されているとき、ブロック単位で撮影画像に主被写体で正反射された照明光の画像が含まれるか否かを判別し、正反射光の画像を含む撮影画像を検出するものである。正反射検出部323gはブロック毎に作成されたヒストグラムの形状に基づいて各ブロックB(I,J)内に正反射光の画像が含まれるか否かを判別する。
【0103】
すなわち、ホワイトボード23に書かれた文字、図形等の文字情報が撮影された際、天井灯や窓外からの太陽光等の照明光がホワイトボード23で正反射されていると、正反射光を受光した画素からは飽和レベルの画素データが出力されるので、正反射光の画像を含むブロックではホワイトボード23の画像を構成する画素データの大部分は飽和レベルの画素データとなっている。このため、このブロックに対するヒストグラムの形状は、図27に示すように、ホワイトボード23に相当する山Uの最大頻度を有する階級wが最大階級pに略一致したものとなる。
【0104】
正反射検出部323gは、照度ムラ補正用のγ特性における白色飽和レベルWの設定方法と同様の方法でヒストグラムのホワイトボード23に相当する山Uの最大頻度を有する階級wを算出するとともに、この算出結果と最大階級pとを比較し、階級wが最大階級pと略一致する場合は、そのブロックに正反射光の画像が含まれていると判別する。そして、この判別結果をCPU30に出力する。
【0105】
CPU30は正反射検出部323gの判別結果に応じてブザー16を発音し、また、LED表示24を点灯して正反射光を含む撮影画像であることの警告を行なう。
【0106】
なお、R,Bの色成分に対する第1γ特性設定部323A,323Cは正反射検出部323gを除いてGの色成分に対する第1γ特性設定部323Bと同一の内部構成を有している。
【0107】
図11に戻り、カード駆動部33は画像データを記録するべくハードディスクカード13の駆動を制御するものである。発光制御部34はフラッシュ7の発光を制御するものである。また、LCD駆動部35はCPU30からの制御信号に基づき撮像画像のLCD表示部19へのモニター表示を制御するものである。メモリ36はCPU30で演算された各種データを記憶するものである。
【0108】
レンズ駆動部37はCPU30から入力されるAF制御値に基づき撮影レンズ2の合焦動作を制御するものである。また、ズーム駆動部38はCPU30から入力される駆動信号に基づき撮影レンズ2のズーム動作を制御するものである。絞り駆動部39はCPU30から入力される露出制御値の絞り値Avに基づき絞り22の開口量を制御するものである。
【0109】
測光部40は測光窓3の後方位置に設けられたSPC等の受光素子からなり、被写体の輝度を測光するものである。測距部41は被写体距離を検出するもので、投光窓4の後方位置に設けられ、赤外光を発光する投光部411と、受光窓5の後方位置に設けられ、被写体で反射した赤外光を受光する受光部412とからなる。
【0110】
CPU30はカメラの撮影動作を集中制御するものである。CPU30は撮影倍率演算部301を有し、測距部41で検出された測距点(CCD21の撮像面の中央位置A)における被写体距離DA及びその測距点における撮影倍率mAを演算する。また、CPU30は露出制御値演算部302を有し、測光部40で検出された被写体の輝度情報に基づき露出制御値(絞り値Av、シャッタースピードTv)を演算し、その演算結果をそれぞれ絞り駆動部39とCCD駆動部31とに出力する。また、CPU30はAF制御値演算部303を有し、測距部41で検出された被写体距離DAに基づき撮影レンズ2を合焦位置に設定するためのレンズ駆動量を演算し、その演算結果をAF制御値としてレンズ駆動部37に出力する。
【0111】
次に、上記カメラ1の撮影制御について、図28〜図31のフローチャートを用いて説明する。なお、撮影/再生スイッチ12は撮影側に設定されているものとする。また、カメラ1が起動し、シャッタボタン10によりS1スイッチがONになると、CCD21により所定の周期で被写体像の取込み及び画像処理が行なわれ、S2スイッチがONになると、この後に取り込まれた画像が所定の画像処理を経てハードディスクカード13に記録される。
【0112】
メインスイッチ14をオンにし、カメラ1を起動すると、撮影可能の状態となる。この状態でズームスイッチ11が操作されると(#2でYES)、その操作方向及び操作量に応じて撮影レンズ2内のズームレンズが駆動され、ズーム比が変更される(#4)。この後、シャッタボタン10が半押しされ、S1スイッチがオンになると(#6でYES)、ステップ#8に移行し、撮影準備のための処理が行なわれる。
【0113】
すなわち、まず、測距部41により被写体距離DAが検出される(#8)。測距部41は投光部411から被写体に向けて測距用の赤外光を投光し、その赤外光の被写体からの反射光を受光部412で受光して測距用のデータを取り込み、このデータを用いて撮像画面中央における撮像面から被写体までの距離DAを算出する。続いて、算出された被写体距離DAに基づいて撮影レンズ2を合焦位置に設定するためのレンズ駆動量が演算される(#10)。
【0114】
続いて、正反射警告スイッチ20により正反射警告が指示されているか否かが判別され(#12)、正反射警告が指示されていれば(#12でYES)、ステップ#14〜#20で正反射警告処理が行なわれ、正反射警告が指示されていなければ(#12でNO)、ステップ#14〜#20はスキップされ、正反射警告処理は行なわれない。
【0115】
正反射警告処理では、まず、被写体距離DA及び撮影レンズ2の焦点距離fから撮影画面中央の撮影倍率mA(=a・f/DA,a;比例係数)が算出され(#14)、続いて、図31に示すサブルーチン「正反射光検出」のフローチャートに従って撮影画像内の正反射光の画像の検出が行なわれる(#16)。
【0116】
撮影画像内の正反射光の画像の検出は、まず、撮影倍率mAと予め設定された基準の撮影倍率m0及びブロックサイズS0とを用いて撮像画像をブロック分割するためのブロックサイズS(=S0・mA/m0)が算出され(#70)、更に、このブロックサイズSと撮像面のサイズとから分割されるブロック数nが算出される(#72)。
【0117】
続いて、ブロック数をカウントするカウンタMが「1」に設定される(#74)。なお、正反射光検出処理におけるブロックの順番は、図16に示すブロック分割においてラスター方向に行なうようにしているので、M=L・(I−1)+Jとなり、ブロックB(I,J)はブロックB(L・(I-1)+J)に対応している。
【0118】
続いて、ブロックB(M)内に含まれる全画素データが全て読み出され(#76)、これらの画素データの内、ハイレベル側のX%を除いた画素データを用いて図22もしくは図27に示すようなヒストグラムが作成される(#78)。続いて、ヒストグラムの白地部分に対応する山Uのピーク値に対応する階級wが算出され(#80)、この階級wがヒストグラムの最大階級p(=255)に略一致しているか否かが判別される(#82)。
【0119】
階級wが最大階級pに略一致していれば(#82でYES)、そのブロック内に正反射光の画像が含まれると判断し、フラグFLAGHを「1」にセットして(#90)、リターンする。なお、フラグFLAGHは正反射光の検出フラグで、「1」にセットされていれば、撮影画像内に正反射光の画像が含まれていることを示し、「0」にリセットされていれば、撮影画像内に正反射光の画像が含まれていないことを示す。
【0120】
ステップ#82で階級wが最大階級pに略一致していなければ、カウンタMのカウント値が「1」だけインクリメントされた後(#84)、このカウント値Mが総ブロック数nより大きいか否かが判別され(#86)、M≦nであれば(#86でNO)、ステップ#76に戻り、次のブロックB(M)について正反射光の画像が含まれているか否かの判別が行なわれる(#76〜#82)。
【0121】
そして、全てのブロックB(M)で正反射光の画像が検出されなければ(#86でYES)、撮影画像には正反射光の画像が含まれていないと判断し、フラグFLAGHを「0」にリセットして(#88)、リターンする。
【0122】
図28に戻り、正反射光の検出処理が終了すると、フラグFLAGHにより正反射光の画像の有無が判別され(#18)、フラグFLAGHが「1」にセット(正反射光の画像有り)されていれば(#18でYES)、ブザー16及びLED表示24により正反射警告が行なわれる(#20)。一方、フラグFLAGHが「0」にリセット(正反射光の画像無し)されていれば(#18でNO)、ステップ#20はスキップされ、ブザー16及びLED表示24による正反射警告は行なわれない。
【0123】
続いて、測光部40により被写体の輝度のデータ(測光データ)が取り込まれ(#22)、この測光データに基づき露出制御値が演算される(#24)。更に照度ムラ補正スイッチ17により照度ムラ補正が指示されているか否かが判別され(図29,#26)、照度ムラ補正が指示されていれば(#24でYES)、発光制御部34に発光禁止の制御信号が出力されてフラッシュ7の発光が禁止され(#28)、照度ムラ補正が指示されていなければ(#24でNO)、ステップ#28はスキップされ、フラッシュ7の発光禁止は行なわれない。これにより撮影準備処理は終了し、レリーズ待機状態となる。
【0124】
なお、照度ムラ補正が指示されているときにフラッシュ7の発光を禁止するようにしているのは、例えばホワイトボード23に対して正面から撮影するシーンでフラッシュ7が自動発光される場合、フラッシュ光がホワイトボード23で全反射されて撮像画像の文字が判読不能になるおそれがあるので、このような撮影ミスを防止するためである。
【0125】
レリーズ待機状態で、シャッタボタン10が全押しされてS2スイッチがオンになると(#30でYES)、ステップ#34に移行してレリーズ動作が行なわれる。一方、シャッタボタン10の半押し状態が継続され、S1スイッチがオン状態であれば(#32でYES)、ステップ#8に戻り、上述の撮影準備処理が繰り返される(#8〜#32のループ)。また、シャッタボタン10の操作が解除され、S1スイッチがオフ状態になると(#32でNO)、ステップ#2に戻る。
【0126】
レリーズ動作に移行すると、まず、レンズ駆動量のデータがレンズ駆動部37に出力され、撮影レンズ2の焦点調節が行なわれた後(#34)、露出制御値の絞り値Avのデータが絞り駆動部39に出力され、絞り22の開口量が調節される(#36)。
【0127】
続いて、照度ムラ補正が指示されているか否かが判別され(#38)、照度ムラ補正が指示されていれば(#38でYES)、画像を複数のブロックに分割する際のブロックサイズSが演算される(#40)。この演算は正反射光検出処理におけるステップ#70と同様の方法で演算される。
【0128】
ブロックサイズの設定処理が終了すると、ステップ#24で算出されたシャッタスピードのデータがCCD駆動部31に出力され、CCD21による撮像動作(積分動作)が開始される(#42)。CCD21はCCD駆動部31からの駆動制御信号に基づき感光部の電荷をリセットした後、所定の時間だけ感光部に電荷を蓄積(電荷積分)することにより被写体を撮像する。
【0129】
CCD21による撮像動作が終了すると、感光部の各画素に蓄積された電荷(画素データ)の画像処理部32への読出しが開始される(図30,#44)。CCD21の画素データは、図35に示すように、縦ライン毎に矢印方向に順次、読み出されて画像処理部32に入力される。画像処理部32に入力された画素信号はA/D変換器321で画素データに変換された後、画像メモリ322に記憶されるとともに、第1γ特性設定部323に入力される。
【0130】
続いて、照度ムラ補正が指示されているか否かが判別され(#46)、照度ムラ補正が指示されていれば(#46でYES)、図32に示すサブルーチン「γ特性設定」のフローチャートに従って第1γ特性設定部323により各ブロック毎の照度ムラ補正用のγ特性が設定される(#48)。
【0131】
各ブロックの照度ムラ補正用のγ特性の設定は、まず、ブロック数をカウントするカウンタMが「1」に設定される(#100)。なお、γ特性設定処理におけるブロックの順番は上述の正反射光検出処理におけるブロックの順番と同一である。
【0132】
続いて、ブロックB(M)内に含まれる全画素データが全て読み出され(#102)、これらの画素データの内、ハイレベル側のX%を除いた画素データを用いて図22もしくは図27に示すようなヒストグラムが作成される(#104)。続いて、ヒストグラムの白地部分に対応する山Uのピーク値に対応する階級wが算出され(#106)、この階級wがブロック(M)に対するγ特性の白色飽和レベルW(M)として記憶される(#108)。
【0133】
続いて、カウンタMのカウント値が「1」だけインクリメントされた後(#110)、このカウント値Mが総ブロック数nより大きいか否かが判別され(#112)、M≦nであれば(#112でNO)、ステップ#100に戻り、次のブロックB(M)について白色飽和レベルW(I)の設定が行なわれる(#102〜#110)。そして、M>nになると(#102でYES)、全ブロックB(M)についてγ特性の白色飽和レベルW(M)の設定が終了したと判断して、リターンする。
【0134】
図30のフローチャートに戻り、続いて、ブロックB(I)毎に設定された照度ムラ補正用のγ特性の白色飽和レベルW(I)の補間演算が行なわれ、各ブロックB(I)の中心位置以外の画素位置における照度ムラ補正用のγ特性が設定される(#50)。続いて、設定されたγ特性は第2γ補正部326に入力される一方、画像メモリ322からスイッチ回路327を介して第2γ補正部326に画素データが読み出され、この画素データはその画素位置に対応する照度ムラ補正用のγ特性を用いてガンマ補正が行なわれた後、更に黒色強調用のγ特性を用いてガンマ補正が行なわれる(#52)。
【0135】
一方、ステップ#46で照度ムラ補正が指示されていなれば(#46でNO)、画像メモリ322からスイッチ回路327を介して第1γ補正部325に画素データが読み出され、この画素データは予め設定された自然画用のγ特性によりガンマ補正が行なわれる(#54)。続いて、ガンマ補正後の画素データはスイッチ回路328を介してハードディスクカード13に書き込まれる(#56)。
【0136】
そして、ガンマ補正が行なわれた画素データは順次、スイッチ回路328を介してハードディスクカード13に書き込まれ(#46〜#58のループ)、全画素データのハードディスクカード13への書込みが完了とすると(#58でYES)、CCD駆動部31に画素データの読出終了の制御信号が出力されるとともに、カード駆動部33に画素データの書込終了の制御信号が出力されて1枚の撮影動作が終了し(#60)、次の撮影処理を行なうべくステップ#2に戻る。
【0137】
上記のように、撮影準備処理において、取り込まれた画像を複数のブロックに分割し、ブロック単位で各ブロック毎に作成したヒストグラムを用いてそのブロック内に主被写体(ホワイトボード23)で正反射された照明光の画像が含まれるか否かを判別することにより正反射光の検出を行なうようにしているので、スポット状の正反射光であっても確実に検出することができる。そして、この検出結果に応じて撮影者に正反射警告を行なうようにしているので、例えば被写体がホワイトボード23に書かれた文字、図形等で、照明光のホワイトボード23での正反射により文字、図形等の情報が不明瞭となる場合は、正反射警告によりこのような情報価値の低い画像の誤撮影を未然に防止することができる。
【0138】
なお、上記実施の形態では、正反射光が検出されると、正反射警告のみを行なうようにしていたが、照明光の正反射により文字情報が不明瞭となった画像は記録価値が低いので、ハードディスクカード13のメモリ容量の有効活用を考慮し、正反射警告だけでなく、撮影画像のハードディスクカード13への記録を禁止するようにしてもよい。この場合は、図33に示すように、図29のフローチャートにおいて、例えばステップ#30とステップ#34との間にフラグFLAGHのセット状態の判別(ステップ#18に相当する正反射光の画像の有無の判別)を行なうステップ#31を挿入し、フラグFLAGHが「1」にセットされていれば(#31でYES)、ステップ#8に戻って撮影準備処理を行ない、フラグFLAGHが「0」にリセットされていれば(#31でNO)、ステップ#34に移行する処理にするとよい。すなわち、フラグFLAGHが「0」にリセットされない限り、S2スイッチがON状態になってもこれを無視して撮影準備処理を繰り返すような処理にするとよい。
【0139】
また、上記実施の形態では、シャッタボタン10が全押しされると、正反射警告の有無に拘らず、取り込まれた画像に対して照度ムラ補正スイッチ17による指示に応じた所定の画像処理(照度ムラ補正)を行なった後、ハードディスクカード13に記録するようにしていたが、正反射警告が行なわれたときは、照度ムラ補正スイッチ17の設定状態に拘らず、取り込まれた画像に対して通常の写真撮影に対する画像処理(すなわち、照度ムラ補正を行なわない。)を行なった後、ハードディスクカード13に記録するようにしてもよい。
【0140】
この場合は、図34に示すように、図29,図30のフローチャートにおいて、ステップ#36とステップ#38との間とステップ#44とステップ#46との間とにそれぞれフラグFLAGHによる正反射光の画像の有無の判別を行なうステップ#37とステップ#45と挿入し、ステップ37でフラグFLAGHが「1」にセットされていれば(#37でYES)、ステップ#38,#40をスキップし、ステップ#45で、フラグFLAGHが「1」にセットされていれば(#45でYES)、ステップ#54に移行する処理にするとよい。
【0141】
このように撮影画像に正反射光の画像が含まれるときは、照度ムラ補正が指示されていてもガンマ補正を通常の写真撮影に対するガンマ補正に切り換えて画像処理を行なうようにすると、正反射光により不明瞭となった文字情報が照度ムラ補正により更に不明瞭になり、画質及び情報価値の低下が増長されるという弊害を防止することができる。
【0142】
【発明の効果】
以上説明したように、本発明によれば、複数の光電変換素子からなる撮像手段により被写体光像を画素信号に光電変換して取り込み、その画素信号からなる画像を記録媒体に記録するデジタルカメラにおいて、取り込まれた画像を小画像に分割し、小画像毎に、作成したヒストグラムを用いて主被写体で正反射された照明光の有無を判別し、いずれかの小画像で正反射光が検出されると、警告等の特定の処理を行なうようにしたので、スポット状の正反射光であっても高精度で正反射光の警告が行なわれ、正反射光により不明瞭となった低画質の被写体像の誤撮影を防止することができる。
【0143】
また、いずれかの小画像で正反射光が検出されると、取り込まれた画像の記録媒体への記録を禁止するようにしたので、正反射光により不明瞭となった低画質の被写体像の誤撮影を確実に防止することができる。
【図面の簡単な説明】
【図1】本発明に係るデジタルカメラの外観を示す斜視図である。
【図2】本発明に係るデジタルカメラの背面図である。
【図3】本発明に係るデジタルカメラの光学系の概略構成図である。
【図4】ホワイトボードの照明光の照明方向の一例を示す図である。
【図5】撮像素子の出力分布を示すもので、(a)は縦方向の出力分布を示す図、(b)は横方向の出力分布を示す図である。
【図6】撮像画像を複数のブロックに分割した状態を示す図である。
【図7】ブロック毎に設定される白地を強調するγ特性の一例を示す図である。
【図8】黒色部分を強調とするγ特性の一例を示す図である。
【図9】黒色濃度調整スイッチによる黒色調整と黒色部分を強調とするγ特性との関係を示す図である。
【図10】ファインダー内の正反射光警告用のLED表示を示す図である。
【図11】本発明に係るデジタルカメラのブロック構成図である。
【図12】カラー画像の画像処理を行なうためのA/D変換器〜第1,第2γ補正部までの構成を示すブロック構成図である。
【図13】Gの色成分の第1γ特性設定部の内部構成を示すブロック図である。
【図14】画像メモリの容量を説明するための図である。
【図15】文字画像を構成する画素データのヒストグラムの一般的な形を示す図である。
【図16】撮像画像を複数のブロックの小画像に分割した状態を示す図である。
【図17】不適切なサイズのブロックで撮像画像を分割した状態を示すもので、(a)はブロックサイズが適正値より小さい場合を示す図、(b)はブロックサイズが適正値より大きい場合を示す図である。
【図18】ファインダー視野枠内にブロック枠を表示させた状態を示す図である。
【図19】横方向に配列されたブロックで設定された照度ムラ補正用のγ特性を用いて他のブロックに対する照度ムラ補正用のγ特性を設定する方法を説明するための図である。
【図20】縦方向に配列されたブロックで設定された照度ムラ補正用のγ特性を用いて他のブロックに対する照度ムラ補正用のγ特性を設定する方法を説明するための図である。
【図21】照度ムラ補正を行なうための撮像画像の他のブロック分割の方法を示す図である。
【図22】ブロックに分割された小画像を構成する画素データのヒストグラムの一例を示す図である。
【図23】画素データのヒストグラムを用いて決定されるγ特性を示す図である。
【図24】緑色成分の画素データを用いて設定されたγ特性の一例を示す図である。
【図25】各色成分の画像毎に設定されたγ特性を示す図で、(a)は赤色成分の画像に対するγ特性、(b)は緑色成分の画像に対するγ特性、(c)は青色成分の画像に対するγ特性である。
【図26】隣接する4個のブロックの中心位置で囲まれた領域内の画素データに対するγ特性の補間演算を説明するための図である。
【図27】正反射光の画像を含むブロックの画素データのヒストグラムの形を示す図である。
【図28】本発明に係るカメラの撮影制御を示すフローチャートである。
【図29】本発明に係るカメラの撮影制御を示すフローチャートである。
【図30】本発明に係るカメラの撮影制御を示すフローチャートである。
【図31】サブルーチン「正反射光検出」のフローチャートである。
【図32】サブルーチン「γ特性設定」のフローチャートである。
【図33】正反射光検出時に取込画像のハードディスクカードへの記録禁止するためのフローチャートの修正案を示す図である。
【図34】正反射光検出時の取込画像のガンマ補正を強制的に通常のガンマ補正に切り換えるためのフローチャートの修正案を示す図である。
【図35】CCDの画素データの読出方向を示す図である。
【図36】デジタル複写機における取込画像のブロック分割方法を示す図である。
【符号の説明】
1 カメラ(デジタルカメラ)
2 撮影レンズ
3 測光窓
4 測距用投光窓
5 測距用受光窓
6 ファインダー対物窓
7 フラッシュ
8 カード挿入口
9 カード取出ボタン
10 シャッタボタン
11 ズームスイッチ
12 撮影/再生スイッチ
13 ハードディスクカード(記録媒体)
14 メインスイッチ
15 ファインダー接眼窓
16 ブザー(警告手段)
17 照度ムラ補正スイッチ
18 黒色濃度調整スイッチ
19 LCD表示部
20 正反射警告スイッチ
21 CCDエリアセンサ(撮像手段)
22 絞り
23 ホワイトボード
24 LED表示(警告手段)
30 CPU(特定処理手段)
31 CCD駆動部
32 画像処理部
321 A/D変換器
322 画像メモリ
323 第1γ特性設定部
323a ブロックサイズ設定部(画像分割手段)
323b アドレス生成部
323c ヒストグラム作成部(ヒストグラム作成手段)
323d 白色飽和レベル設定部
323e 白色飽和レベル補間演算部
323f γ特性設定部
323g 正反射検出部(判別手段)
324 第2γ特性設定部
325 第1γ補正部
326 第2γ補正部
327 スイッチ回路
33 カード駆動部
34 発光制御部
35 LCD駆動部
36 メモリ
37 レンズ駆動部
38 ズーム駆動部
39 絞り駆動部
40 測光部
41 測距部
42 ファインダー視野枠
43 ブロック枠[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a digital camera that photoelectrically converts a stationary subject light image into an electric signal.
[0002]
[Prior art]
Conventionally, in an image forming apparatus such as a digital copying machine, in order to increase the clarity of information such as characters and figures copied on a recording paper, a relatively γ value is obtained for an image captured by photoelectric conversion into an electric signal. Image processing (gamma correction processing) is performed using a large γ characteristic (γ characteristic having characteristics close to binarization processing). In this gamma correction processing, generally, in order to reduce the influence of illuminance unevenness, as shown in FIG. 36, the captured image G is converted into a plurality of strip-like blocks B (1), B (2) in the sub-scanning direction. ,... B (n) and γ characteristics γ (1), γ (2),... Γ () for each block based on a histogram showing the level distribution of pixel data contained in each block B (r). n) is set, and the pixel data in each block B (r) (r = 1, 2,... n) is subjected to gamma correction using the γ characteristic γ (r) for that block. .
[0003]
By this gamma correction, the white background part above the predetermined level is uniformly converted to a constant white color, and the character part below the predetermined level (the black part) is uniformly converted to a constant black color. Image quality.
[0004]
In Japanese Patent Laid-Open No. 6-113139, a captured image is divided into a plurality of partial image blocks, a selected partial image block (target partial image block) and a plurality of partial image blocks adjacent to the target partial image block. For each block, a histogram of the level distribution of the pixel data included in the block is created for each block, and the threshold value of the target partial image block is set by the neural network using the histogram data. An image binarization apparatus that performs binarization processing of pixel data in a partial image block is shown.
[0005]
Also, in an image forming apparatus such as a digital copying machine, when the illumination light is specularly reflected on the original, the density of characters and the like written on the original is significantly reduced by the specularly reflected light, and the original image is accurately captured. In order to prevent such problems, conventionally, a technique for detecting illumination light regularly reflected on a document is known.
[0006]
This detection technique creates a histogram of the level distribution of pixel signals captured by an image sensor such as a CCD (Charge Coupled Device) in units of sensor lines, and determines the presence or absence of specularly reflected light from the shape of this histogram. is there. More specifically, when regular reflected light is included, a pixel signal having a saturated level is output from a pixel that has received the regular reflected light, and thus, for example, the frequency at the saturation level of the histogram exceeds a predetermined threshold value. The presence or absence of regular reflection light is determined by determining whether or not the light is reflected.
[0007]
[Problems to be solved by the invention]
By the way, since a digital camera can freely control the image quality of an image taken by image processing, it can be converted into a normal silver salt film by appropriately processing the image quality of the taken image according to the purpose of photography and the type of subject. There is an advantage that it is possible to capture an image having a better image quality than a camera for photographing. For this reason, it is used not only for normal photography, but also as a device for copying information such as characters and figures written on a whiteboard in a conference hall, for example.
[0008]
When shooting a whiteboard with characters or figures written on it with a digital camera, the main purpose of the shooting is to record information such as letters and figures on the whiteboard. Similar to the digital copying machine, it is desirable to perform gamma correction to increase the clarity of the information portion (character or graphic portion) by skipping the white portion (whiteboard portion) white.
[0009]
In this case, the variation in character density and illuminance unevenness on the whiteboard is large, so the captured image is divided into a plurality of blocks two-dimensionally, and gamma correction is performed on a block basis to correct illuminance unevenness (shading correction). It is desirable to do so.
[0010]
That is, if the whiteboard is illuminated by the ceiling light in the room and sunlight outside the window, uneven illumination occurs due to non-uniform illumination light, and the incident light enters the entrance pupil of the photographing lens at an angle ω. Due to the synergistic effect of the incident light intensity distribution according to the so-called cosine fourth law and the above illuminance unevenness that the image of the object point outside the optical axis becomes darker in proportion to cos 4 ω, the output distribution of the image sensor such as a CCD is within the imaging plane. Greatly varies in the two-dimensional direction.
[0011]
For this reason, it is desirable to divide the captured image into a plurality of blocks in a two-dimensional manner and perform gamma correction according to the illuminance in the block for each block to perform illuminance unevenness correction. More preferably, when the γ characteristic set for each block greatly changes between adjacent blocks, in order to avoid the occurrence of a false line at the block boundary due to the sudden change of the γ characteristic, the block size It is preferable to set an appropriate γ characteristic for each block by making the value as small as possible.
[0012]
In this case, in a shooting position where illumination light such as ceiling light or sunlight is regularly reflected on the whiteboard, characters on the whiteboard fly white due to the regularly reflected illumination light, resulting in low information value. An image will be taken. In particular, when the above-described illuminance unevenness correction is performed in image processing, an accurate histogram cannot be created for a block including specular reflection light, and effective illuminance unevenness correction cannot be performed. The blocks that are not included are also adversely affected by the specularly reflected light, causing a problem that the image quality and the information value are significantly reduced.
[0013]
In a digital copying machine, since an original is illuminated with an artificial light source under a predetermined condition, specular reflection light can be sufficiently detected by detection processing in units of lines of a sensor. Illumination conditions are not constant, and in particular, external light such as sunlight is incident on the whiteboard in a spot shape and is regularly reflected, so detection processing is performed in units of lines as in the above-described conventional method of detecting regular reflected light in a digital copying machine If it is performed, it is difficult to reliably detect spot-like specularly reflected light, and sufficient detection accuracy cannot be obtained.
[0014]
On the other hand, the binarization processing technique described in Japanese Patent Laid-Open No. 6-113139 mainly relates to the binarization processing in a copy apparatus or a facsimile apparatus. There is no description of the problem of reflected light or any suggestion thereof.
[0015]
The present invention has been made in view of the above problems, and when photographing information such as characters written on a board under photographing conditions in which illumination light is regularly reflected on a whiteboard, the specularly reflected light is highly accurate. It is possible to provide a digital camera that can reliably prevent a shooting mistake of shooting a low-quality image.
[0016]
[Means for Solving the Problems]
The present invention is a digital camera that captures a light image of a subject by photoelectrically converting it into a pixel signal by an image capturing unit including a plurality of photoelectric conversion elements, and records the image including the pixel signal on a recording medium. An image dividing means for dividing an image into a plurality of small images, a histogram creating means for creating a histogram of level distribution of pixel signals constituting each small image for each small image, and a histogram created for each small image And determining means for determining whether or not the illumination light regularly reflected by the main subject is included in the small image, and illuminance unevenness correcting means for correcting the illuminance unevenness of the image captured by the imaging means, when any of the small image contains specular illumination light, it prohibits the correction of the uneven illuminance by the illuminance nonuniformity correcting means does not contain the specularly reflected illumination light Come, and is characterized in that to correct the uneven illuminance by the illuminance nonuniformity correction means (claim 1).
[0017]
According to the present invention, the digital camera includes a warning unit, and the warning unit warns that the illumination light is regularly reflected by the main subject.
[0018]
According to the above configuration, the image captured by the imaging unit is divided into a plurality of small images, and for each small image, a histogram of the level distribution of pixel signals constituting each small image is created. In addition, for each small image, it is determined whether or not illumination light regularly reflected by the main subject is included in the small image using the created histogram, and regular reflection light is included in any small image. and a tree, prohibits the correction of the illuminance unevenness due UI corrector, when there is not any specularly reflected light, the processing to correct the uneven illuminance by the illuminance nonuniformity correction means is performed. In addition, a process for giving a warning that the photographed image includes regular reflection light is performed.
[0019]
In addition, the present invention provides a digital camera that photoelectrically converts a subject light image into a pixel signal and captures it on a recording medium by an image capturing unit including a plurality of photoelectric conversion elements, and captures the image with the pixel signal on the recording medium. An image dividing means for dividing the image into a plurality of small images, a histogram creating means for creating a histogram of the level distribution of the pixel signals constituting each small image for each small image, and a histogram created for each small image When the small image contains illumination light regularly reflected in any one of the small images, the discrimination means for determining whether the illumination light regularly reflected by the main subject is included in the small image prohibits the recording to the recording medium of the captured image, when there is not any specularly reflected illumination light, the image captured is intended to be recorded on the recording medium (claim 3 .
[0020]
According to the above configuration, if any of the small images includes illumination light regularly reflected by the main subject, recording of the captured image on the recording unit is prohibited. That is, photographing of a subject including regular reflection light is prohibited.
[0021]
This ensures that the photographer mistakenly shoots a low-quality subject image that is partially obscured by specular reflection light (for example, an image in which characters written on the whiteboard are obscured by specular reflection light). Can be prevented.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a perspective view showing an appearance of a digital camera according to the present invention. FIG. 2 is a rear view of the digital camera.
[0023]
The camera 1 shown in the figure includes a CCD area sensor as an image pickup device, and image data picked up by the CCD area sensor is recorded on a PCMCIA-compliant hard disk card (not shown). In this embodiment, the case where an area sensor is used as the image sensor will be described. However, the subject optical image may be scanned by the line sensor to capture image data.
[0024]
The camera 1 illuminates the whiteboard with respect to a photographed image of information such as characters and figures written on the whiteboard (hereinafter this type of binary information is referred to as character information) (ceiling light or sun outside the window). A function of correcting unevenness in illuminance caused by unevenness in light and the like and variations in sensitivity of the CCD area sensor.
[0025]
That is, for example, as shown in FIG. 4, if the whiteboard 23 is illuminated by the ceiling light of the room and sunlight outside the window, uneven illumination occurs due to unevenness of the illumination light, and the photographing lens The CCD area sensor has a synergistic effect between the incident light distribution based on the so-called cosine fourth law and the uneven illuminance that the image of the off-axis object point incident on the entrance pupil of the lens at an angle ω becomes darker in proportion to cos 4 ω. As shown in FIGS. 5A and 5B, the output distribution of fluctuates greatly two-dimensionally within the imaging surface. In the camera 1, when shooting in a character image mode, which will be described later, an appropriate γ characteristic is set for each pixel data or a plurality of pixel data units, and each pixel data or each pixel data unit is set using the γ characteristics. By performing gamma correction, the output fluctuation of the CCD area sensor that occurs two-dimensionally is reduced as much as possible.
[0026]
In FIG. 5, the solid line shows the output distribution of the white background portion of the whiteboard 23 when nothing is written on the whiteboard 23, and the dotted line shows the character portion when the characters are written on the whiteboard 23. The output distribution is shown.
[0027]
Here, the illuminance unevenness correction will be briefly described.
The image of character information is mainly for the purpose of recording information, and image quality that is higher in legibility than information is required. Therefore, the contrast of the character information portion with respect to the white background portion of the whiteboard is increased. It is desirable to clarify the information and reduce the unevenness in illuminance to make it easy to see as a whole.
[0028]
In the present embodiment, as shown in FIG. 6, the captured image G is divided into a plurality of square blocks B (I) (I = 1, 2,... 18 in the figure) vertically and horizontally, and each block B (I 7), the γ characteristic γ (I) with respect to the center position O (I) of the block (I) is obtained from the white background level W calculated using the histogram of the level distribution of the pixel data included in the block (I). Further, using the set γ characteristics γ (I), the γ characteristics γ (P) of the pixel positions P other than the center position O (I) of each block B (I) are interpolated, and these γ characteristics Character information is clarified and illuminance unevenness correction is performed by performing gamma correction of pixel data at corresponding pixel positions O (I) and P using γ (I) and γ (P).
[0029]
FIG. 7 shows a case where the pixel data is A / D converted into 8-bit data, and the level value “255” of the input / output level indicates the maximum value. Further, in the γ characteristic shown in the figure, since all the pixel data of the input level W or higher are converted to pixel data saturated to the maximum level, the white background portion consisting of the pixel data of the input level W or higher is uniformly maximized in the captured image. The image quality is corrected to whiteness. Thereby, the contrast of the character information portion with respect to the white background portion is emphasized, and the character information is clarified.
[0030]
Further, as necessary, the character information portion is emphasized by performing gamma correction using the γ characteristic as shown in FIG. In other words, the image after the illuminance unevenness correction is corrected to an image quality in which the black background portion composed of pixel data of the input level B or less is uniformly black with the minimum brightness, whereby the density of characters, figures, etc. written on the whiteboard 23, Character portions are black-enhanced in accordance with the thickness and line density of the lines, so that the character information is clarified appropriately. Details of the gamma correction processing in the illuminance unevenness correction will be described later.
[0031]
Returning to FIG. 1, the camera 1 is provided with a photographing lens 2 including a zoom lens at a substantially central portion of the front surface, and a light projection window 4 and a light receiving window 5 for measuring a subject distance by an active distance measuring method are provided on the upper part. A photometric window 3 for measuring the luminance of the subject is provided between the windows. A finder objective window 6 is disposed on the left side of the light projection window 4, and a flash 7 is disposed on the right side of the light receiving window 5.
[0032]
As shown in FIG. 3, a horizontally long CCD area sensor 21 (hereinafter abbreviated as CCD 21) is disposed at the imaging position of the photographic lens 2 in the camera body. A diaphragm 22 is disposed between them.
[0033]
The light projecting window 4 is a window that irradiates the subject with infrared light, and the light receiving window 5 is a window that receives the reflected light from the subject of the infrared light. In this embodiment, the active distance measurement method is adopted as the distance measurement method, but a passive distance measurement method may be used.
[0034]
A card insertion slot 8 into which the hard disk card 13 is inserted and removed is provided on the side of the camera 1, and a card eject button 9 for ejecting the hard disk card 13 is provided above the card insertion slot 8. When printing out the photographing result, the hard disk card 13 can be removed from the camera 1 by pressing the card eject button 9 and the hard disk card 13 can be attached to a printer to which the hard disk card can be attached.
[0035]
The camera 1 may be provided with a SCSI cable interface, and the camera 1 and the printer may be connected with the SCSI cable to directly transfer the image data from the camera 1 to the printer to print out the photographed image.
[0036]
In this embodiment, a PCMCIA-compliant hard disk card is used as a recording medium for image data. However, as long as the photographing result can be stored as image data, another memory card, mini disk (MD), or the like can be used. It may be a recording medium.
[0037]
On the upper surface of the camera 1, a shutter button 10 is provided at the left end, and a zoom switch 11 and a photographing / playback switch 12 are provided at the right end. The shutter button 10 is an operation button that turns on an S1 switch that instructs to prepare for photographing such as focal length adjustment and exposure control value setting when pressed halfway and turns on an S2 switch that instructs release when fully pressed. The zoom switch 11 is composed of a three-contact switch that can slide to the left and right. When the zoom switch 11 is slid to the T (TELE) side, it is photographed to the telephoto side, and when it is slid to the W (WIDE) side, the wide angle side is photographed. The zoom ratio of the lens 2 can be continuously changed.
[0038]
The shooting / playback switch 12 is a switch for switching between shooting mode and playback mode. The shooting / playback switch 12 includes a two-contact selector switch that can slide to the left and right. When the shooting / playback switch 12 is set to the shooting (REC) side, shooting of a subject (recording of a captured image on the hard disk card 13) is performed. When the playback (PLAY) side is set, the captured image recorded on the hard disk card 13 can be displayed on the LCD display unit 19 (see FIG. 2).
[0039]
As shown in FIG. 2, a power switch main switch 14 and a viewfinder eyepiece window 15 are provided on the rear surface of the camera 1 at the upper left end and approximately the center, respectively, and a buzzer 16 is provided at the upper right corner. It has been. The buzzer 16 is used to warn the photographer that when the character information on the whiteboard 23 is photographed, the illumination light is regularly reflected by the whiteboard 23 and the character information becomes unclear. Hereinafter, this warning is referred to as “regular reflection warning”.
[0040]
Further, an illuminance unevenness correction switch 17 and a black density adjustment switch 18 are provided below the main switch 14, and a regular reflection warning switch 20 is provided on the right side of the black density adjustment switch 18. Further, an LCD display unit 19 is provided at the lower right corner on the back of the camera 1.
[0041]
The illuminance unevenness correction switch 17 is a switch for instructing the illuminance unevenness correction described above. The illuminance unevenness correction switch 17 is composed of an ON / OFF switch in which an operation button slides left and right. When illumination unevenness correction is instructed by the illumination unevenness correction switch 17, the captured image is divided into a plurality of blocks (small images), and each block is set using pixel data included in the block as shown in FIG. The gamma correction is performed according to the γ characteristic. On the other hand, when the illuminance unevenness correction switch 17 is OFF, a γ characteristic suitable for preset normal photography (highly descriptive image quality capable of reproducing the gradation of the subject as faithfully as possible). The gamma correction processing of the captured image is performed using the γ characteristics as obtained.
[0042]
Illuminance unevenness correction improves image quality deterioration due to illuminance unevenness when photographing character information written on a whiteboard, and is mainly applied when photographing such character information. Accordingly, when the image of information such as characters and figures is taken as a “character image” and the image taken of a landscape or a person is taken as a “natural image”, the illuminance unevenness correction switch 17 takes a picture. This is a switch for switching image processing (particularly gamma correction processing) of an image between a character image mode and a natural image mode.
[0043]
When the photographer shoots a character image, the illuminance unevenness correction switch 17 is set to “ON” so that the image quality is suitable for the character image (image quality in which information such as characters is appropriately emphasized by whitening the white background portion). When shooting a natural image, the illuminance unevenness correction switch 17 is set to “OFF” to obtain a captured image with an image quality suitable for a natural image (high image quality). Can do.
[0044]
The black density adjustment switch 18 is a switch for adjusting the black saturation level B (see FIG. 8) of the γ characteristic in the gamma correction with black enhancement for the image after the illuminance unevenness correction. The black density adjustment switch 18 is composed of a three-contact switch in which an operation button slides left and right. The black density adjustment switch 18 functions only when the illuminance unevenness correction switch 17 is set to “ON” (when the character image mode is set). In the character image mode, when the black density adjustment switch 18 is set to the OFF state, as shown in FIG. 9, the black saturation level of the γ characteristic is set to a predetermined level B0, and the black density adjustment switch When 18 is set to “dark”, the black saturation level of the γ characteristic is switched to a predetermined level B1 (> B0) higher than the predetermined level B0, and when set to “light”, the black saturation level of the γ characteristic is set. The level is switched and set to a predetermined level B2 (<B0) smaller than the predetermined level B0.
[0045]
In the image processing in the character image mode, the white saturation level of the γ characteristic is automatically adjusted so that the background portion is whitened. Further, the density of the character portion is changed by changing the black saturation level by the black density adjustment switch 18. The contrast with the ground (white background) can be adjusted.
[0046]
For example, comparing text written on a whiteboard with text written on a manuscript, the characters on the whiteboard are generally thicker and larger than the characters on the manuscript. When the gamma correction is performed, the contrast of the character with respect to the background is lowered as compared with the case of the whiteboard. Therefore, when shooting a document, the black density adjustment switch 18 is set to “dark” to emphasize the black color of the character portion and to suitably adjust the contrast of the character portion with respect to the background.
[0047]
In this embodiment, the black saturation level is set to be switched between two levels. However, a multi-stage switching method may be used, or the black saturation level may be switched continuously.
[0048]
The LCD display unit 19 displays the captured image on a monitor. When the shooting / playback switch 12 is set to the playback side, a captured image of a frame designated by a selection switch (not shown) is read from the hard disk card 13 and reproduced and displayed on the LCD display unit 19.
[0049]
The regular reflection warning switch 20 is a switch for instructing to perform the regular reflection warning described above. The regular reflection warning switch 20 is composed of an ON / OFF switch whose operation button slides to the left and right. When “with warning” is instructed by the regular reflection warning switch 20, the photographed image is divided into a plurality of blocks (small images), and each block is corrected using a histogram of the level distribution of the pixel data included in the block. When the presence or absence of reflected light is determined and regular reflected light is detected in any block, a warning sound is generated from the buzzer 16. Further, as shown in FIG. 10, the regular reflection warning LED display 24 provided in the finder field frame 42 is lit to warn that there is a possibility that the image quality of the photographed image may be deteriorated by the regular reflection light. On the other hand, when the regular reflection warning switch 20 is “OFF”, the detection of the regular reflection light and the regular reflection warning are not performed.
[0050]
Note that it is up to the photographer to decide whether or not to give a regular reflection warning as described above. The regular reflection light is a problem mainly in the shooting in the character image mode. On the contrary, in the natural image mode to be performed, specular reflection light may be effectively used as a photographing effect. Therefore, the specular reflection warning can be performed as necessary in consideration of the photographing purpose and the photographing scene. . Therefore, the regular reflection warning may be always performed without providing the regular reflection warning switch 20.
[0051]
FIG. 11 is a block diagram of the camera 1 according to the present invention.
In the figure, the same members as those described above are denoted by the same reference numerals. The CCD drive unit 31 controls the imaging operation of the CCD 21 based on the shutter speed of the exposure control value input from the CPU 30. The CCD 21 is composed of a color area sensor, performs an imaging operation (charge accumulation operation) based on a control signal input from the CCD driving unit 31, and converts pixel signals of R, G, and B color components into time-series signals to generate an image. The data is output to the processing unit 32.
[0052]
The image processing unit 32 performs predetermined signal processing on the pixel signal output from the CCD 21 and outputs it to the hard disk card 13. The image processing unit 32 includes an A / D converter 321, an image memory 322, a first γ characteristic setting unit 323, a second γ characteristic setting unit 324, a first γ correction unit 325, a second γ correction unit 326, and switch circuits 327 and 328. When illuminance unevenness correction is instructed, illuminance unevenness correction is performed. Illuminance unevenness correction is performed by setting γ characteristics for illuminance unevenness correction for each block and performing gamma correction using the γ characteristics. At this time, the γ characteristic for the portion between the center positions of the blocks is interpolated, and the image signal of this portion is gamma-corrected using the interpolated γ property, so that the discontinuity in image quality based on the difference in the γ property between the blocks is eliminated. Alleviated.
[0053]
The A / D converter 321 converts each pixel signal included in the image signal read from the CCD 21 into a digital signal (hereinafter referred to as pixel data).
[0054]
The image memory 322 stores the pixel data output from the A / D converter 321. The image memory 322 has a capacity capable of storing pixel data for one captured image, and can perform image processing of the captured image collectively.
[0055]
In addition, when dividing the captured image into a plurality of blocks with the maximum block size that can be set, the capacity of the image memory 322 of the memory so that image processing can be performed in units of rows of blocks when divided into blocks, It is possible to reduce the memory by setting the capacity to store pixel data included in blocks arranged in at least one row. That is, as shown in FIG. 14, for example, if the captured image G is divided into 3 × 3 blocks B (1) to B (9) with the maximum block size, the capacity of the image memory 322 is arranged in each row. The block B (1) to B (3), the block B (4) to B (6), and the block B (7) to B (9) may have a capacity capable of storing pixel data.
[0056]
The first γ characteristic setting unit 323 sets γ characteristics for correcting illuminance unevenness of a captured image. The first γ characteristic setting unit 323 divides the captured image into a plurality of blocks, and sets γ characteristics for illuminance unevenness correction using pixel data included in each block for each block. The second γ characteristic setting unit 324 sets a γ characteristic for emphasizing black density of an image after illuminance unevenness correction. The second γ characteristic setting unit 324 sets the γ characteristic for black density enhancement based on the operation information of the black density adjustment switch 18 input from the CPU 30.
[0057]
The first γ correction unit 325 is a circuit that performs gamma correction on a natural image, and the second γ correction unit 326 is a circuit that performs gamma correction on a character image. The first γ correction unit 325 performs gamma correction of the pixel data read from the image memory 322 using a preset γ characteristic suitable for a natural image. The second γ correction unit 326 divides the captured image of the character image into a plurality of blocks, and uses the γ characteristics for illuminance unevenness correction set by the first γ characteristic setting unit 323 for each block of the pixel data constituting the captured image. After performing the gamma correction, the gamma correction of the pixel data is performed using the γ characteristic for black density enhancement set by the second γ characteristic setting unit 324. Note that gamma correction for character images will be described later.
[0058]
The switch circuit 327 switches the connection between the image memory 322 and the first and second γ correction units 325 and 326, and the switch circuit 328 connects the first and second γ correction units 325 and 326 and the hard disk card 13. Is to switch. Switching control of the switch circuits 327 and 328 is performed by a control signal output from the CPU 30 corresponding to the setting state of the illuminance unevenness correction switch 17, and the illuminance unevenness correction switch 17 is set to “OFF” (natural image mode). Is set), the image memory 322, the first γ correction unit 325, the first γ correction unit 325, and the hard disk card 13 are connected, and the illuminance unevenness correction switch 17 is set to “ON” (character image). When the mode is set), the image memory 322, the second γ correction unit 326, the second γ correction unit 326, and the hard disk card 13 are connected to each other.
[0059]
Here, a method of gamma correction (illuminance unevenness correction and black enhancement correction) for a character image will be described.
[0060]
As described above, in the case of a character image, it is desirable to increase the clarity of the character portion relative to the white background portion. Therefore, in order to make the white background portion white, a predetermined input as shown in FIG. A γ characteristic in which the output level is saturated at level W is used.
[0061]
For the white saturation level W in this γ characteristic, for example, a histogram of the level distribution of the pixel data of the green component constituting the image of the character image is created, and a class having the maximum frequency within the range corresponding to the white background portion is set. That is, when a histogram of the level distribution of the pixel data of the green component is created for an image obtained by photographing the whiteboard 23 on which characters, figures, and the like are drawn, as shown in FIG. 15, it generally corresponds to a white background portion (board portion). A two-crest distribution having a mountain U and a mountain C corresponding to a black portion (character portion), and a level w corresponding to the peak of the mountain U corresponding to a white background portion is set as the white saturation level W of the γ characteristic.
[0062]
A γ characteristic in which the white saturation level W is determined from the histogram of the pixel data of the green component constituting the entire captured image may be set, and gamma correction of the entire captured image may be performed using this γ characteristic. What is handwritten in 23 has a large variation in character density (ratio of the character portion to the white background portion), and in the case of photography, the light source is not constant and the screen is different from the case of a copying machine equipped with an illumination device. Since the illuminance distribution changes greatly in the image, the illuminance unevenness in the imaging screen increases, so the captured image is preferably divided into a plurality of blocks, and gamma correction is performed in units of blocks according to the γ characteristics set for each block. Therefore, it is desirable to correct illuminance unevenness.
[0063]
In the camera 1 according to the present embodiment, in the normal shooting mode (that is, front shooting), as shown in FIG. 16, the captured image G is vertically and horizontally n (= K (vertical) × L (horizontal). ) Blocks B (I, J) (I = 1, 2,... K, J = 1, 2,... L), and for each block B (I, J), the block B (I, J ) Representing illuminance unevenness correction that is representative of) is set. In this case, the size (area) of the block B (I, J) is set to a size that can accommodate approximately 9 (= 3 × 3) characters. The size of the block B (I, J) is set relatively in relation to the number of characters in this way because the portion corresponding to the whiteboard 23 when the histogram is created using the pixel data in the block. This is because the peak U becomes a moderately steep peak and the peak position w of the peak U can be reliably detected.
[0064]
That is, as shown in FIG. 17A, when the block size is set to be relatively small with respect to the characters, the area occupied by the character portion in the block B (I, J) is large, and the histogram whiteboard 23 Since the peak U corresponding to is lower, there is a possibility that the peak position w of the peak U may be erroneously detected, and as shown in FIG. If set, the illuminance unevenness in the block B (I, J) is large, and the peak U corresponding to the whiteboard 23 of the histogram becomes gentle. In this case, the peak position w of the peak U is erroneously detected. Because there is a fear.
[0065]
In order to determine the block size, it is necessary to know the size of the character projected on the shooting screen. The size y ′ of the character projected on the shooting screen is the size y and the size of the character written on the whiteboard 23. It can be calculated from the photographing magnification m by y ′ = y · m, and the size y of the characters written on the whiteboard 23 is considered to be within a certain range even though there are individual differences. If the representative value y0 of the character size y written on the board 23 and the photographing magnification m0 are experimentally determined, the character size y ′ projected on the photographing screen is uniquely determined from the photographing magnification m. can do.
[0066]
In the present embodiment, a block size S0 serving as a reference is determined based on the size y0 of a character projected on the shooting screen at a certain shooting magnification m0, and the block size S at an arbitrary shooting magnification m is set as the shooting magnification. From m0 and block size S0, S = S0 · m / m0 is used to calculate. Therefore, assuming that a block having a block size S0 includes vertical and horizontal (i × j) pixel data, the vertical number i ′ of pixel data included in the block size S is i · m / m0, The number j ′ in the horizontal direction is j · m / m0.
[0067]
In this embodiment, the block size S is set so that the number of characters in the block is nine. However, this is an example, and the representative value of the character size y written on the whiteboard 23 If y0 is changed, the number of characters in the block also changes. Accordingly, the block size S is appropriately set so as to include an appropriate number of characters according to the setting of the representative value y0.
[0068]
In the present embodiment, the block size S is changed according to the shooting magnification m. However, the block size S0 is fixed, and the shooting magnification m is a predetermined value relative to the block size S0 when shooting a character image. You may make it adjust so that it may become the value m0. That is, as shown in FIG. 18, a block frame 43 corresponding to the block size S0 is displayed in the finder field frame 42, and the photographer enters nine characters written on the whiteboard 23 in the block frame 43. In addition, the zoom ratio or subject distance of the photographing lens 2 may be adjusted. The block frame 43 may be displayed at all times, but may be displayed only when the character image mode is set.
[0069]
Furthermore, in the above embodiment, a histogram is created for all the set blocks B (I, J), and the white saturation level W of the γ characteristic for illuminance unevenness correction is set from this histogram. When the illuminance unevenness is relatively small in the vertical direction and the illuminance unevenness is large only in the horizontal direction, the horizontal blocks B (3,1) and B (3 (3) passing through the center of the captured image G are shown in FIG. , 2),..., B (3, 9) is created, a white saturation level W of γ characteristics is set from the histogram, and the other blocks B (I, J) (I = 1, 2, 4, 5, J = 1, 2,... 9), the γ characteristic set in the block B (3, r) set in the column including the block may be applied. For example, for the blocks B (1,1), B (2,1), B (4,1), and B (5,1) included in the first column, γ set in the block B (3,1) Apply properties.
[0070]
On the contrary, when the illuminance unevenness is relatively small in the vertical direction and the illuminance unevenness is large only in the horizontal direction, the vertical blocks B (1,5), B passing through the center of the captured image G are shown in FIG. A histogram is created only for (2,5),... B (5,5), and the white saturation level W of the γ characteristic is set from the histogram, and other blocks B (I, J) (I = 1, 2, ..., 5, J = 1 to 4, 6 to 9), the γ characteristic set in the block B (r, 5) set in the row including the block may be applied. For example, the blocks B (1,1), B (1,2), B (1,3), B (1,4), B (1,6), B (1,7) included in the first row , B (1,8), B (1,9), the γ characteristic set in block B (1,5) is applied. In this way, it is possible to shorten the calculation time of the γ characteristic and reduce the capacity of the memory that stores the set γ characteristic.
[0071]
In the above embodiment, the entire captured image G is equally divided into a matrix and blocks B (I, J) are set continuously. However, as shown in FIG. A plurality of blocks B (I, J) may be set discretely. In this way, since the number of blocks is reduced, the calculation time for setting the γ characteristic can be shortened as in the above example, and the capacity of the memory for storing the calculated γ characteristic can be reduced. Can do.
[0072]
Next, a method for determining the γ characteristic for correcting illuminance unevenness from the histogram of the pixel data of the green component will be described.
[0073]
(I × j) pieces of pixel data g (1,1), g (1,2),... G (i−1, j), g (i, j) included in the block B (I, J) Among these, pixel data corresponding to X (%) set in advance is removed from the maximum level to the low level side, and a histogram of level distribution is created using the remaining pixel data. For example, if the total number of pixel data included in the block is 10,000 and X = 3%, the 300 pixel data obtained by sequentially integrating the pixel data of the maximum level q to the low level side is removed, and the rest A histogram is created using 9700 pixel data. The reason why X% pixel data on the high level side is removed is to avoid adverse effects such as noise.
[0074]
This histogram generally has a two-peak distribution as shown in FIG. 22, with the high-level mountain U corresponding to the background portion of the whiteboard 23 and the low-level mountain C corresponding to the character portion. In the figure, the class p is the maximum level of the pixel data included in the block B (I, J), and the class q (<p) is the maximum value of the histogram class.
[0075]
When the histogram is created, a class w having the highest frequency in the distribution included in the range d set in advance on the low level side from the maximum class p is calculated, and this class w is a white of γ characteristic for correcting illuminance unevenness. Saturation level W is set. In the above range d, since the block size is set to a predetermined size in relation to the number of characters, it is estimated that only the high-level mountain U is surely included if the block is shot with normal illuminance. It is a range. For example, when the pixel data is 8 bits and has a gradation of 0 to 255, the range d is set to about 48.
[0076]
Therefore, for example, if the maximum class q is 200, the class w having the maximum frequency within the class range 152 to 200 is calculated. If the class w is, for example, w = 180, the white saturation level W = 180 is set. Then, the γ characteristic as shown in FIG. 23 is determined.
[0077]
By the way, if the whiteboard 23 is not completely white and slightly colored, or if the white balance adjustment of the camera 1 is inappropriate, it is performed according to the γ characteristic for correcting uneven illuminance and the γ characteristic for black enhancement. Since the γ value of the equivalent γ characteristic of the gamma correction is relatively large, the γ characteristic for correcting the illuminance unevenness set using the green component pixel data is the gamma of the red component pixel data and the blue component pixel data. It cannot be applied to amendments.
[0078]
That is, the shooting data in a certain area of the whiteboard 23 is not completely white, and the pixel data levels D R , D G , D B of the R, G, B color components are, for example, (D R , D G , D B ) = (130, 140, 125), and an equivalent γ characteristic (both γ characteristics) of the γ characteristic for illuminance unevenness set using the pixel data of the green component and the γ characteristic for black enhancement. When the gamma correction of the red component pixel data and the blue component pixel data is performed using this γ characteristic, the output of each color component is as follows. As shown in the figure, (D R , D G , D B ) = (185, 255, 140), and the image after gamma correction causes a large color shift to yellowish green.
[0079]
If the γ value of the γ characteristic shown in FIG. 24 is small (if the slope is gentle), the output difference of each color component after gamma correction is small, so color misregistration is not a problem, but is applied to the character image mode. Since the γ characteristic performs gamma correction similar to the binarization process, the γ value is set to be relatively large. Therefore, the γ characteristic set using the green component pixel data is changed to the red component pixel data and the blue component. It becomes difficult to apply this to gamma correction of component pixel data.
[0080]
As a method for avoiding the coloring phenomenon of the white portion as described above, the pixel data of each color component of R, G, B is converted into luminance data and color difference data, and after performing gamma correction only with the luminance data, again, A method of inverse conversion to pixel data of R, G, and B color components is conceivable. However, since color difference data is stored in this method, for example, a character written on a whiteboard is a light-colored character with ink. In the case of, the thin state of the character remains even after the gamma correction, and it becomes difficult to clearly reproduce the thin character.
[0081]
In this embodiment, the γ characteristic for correcting illuminance unevenness set by the pixel data of the green component is corrected, a dedicated γ characteristic is set for each color component, and gamma correction is performed with the dedicated γ characteristic for each color component. Therefore, even light characters can be clearly reproduced.
[0082]
The γ characteristic for each color component is, for example, that the margin value of the level is “5”, and the input level (D R −5, D G −5, D B −5) is the white saturation level. It is set using pixel data. For example, in the example of the γ characteristic shown in FIG. 24, as shown in FIGS. 25A to 25C, the input levels (125, 135, 120) of the R, G, B color components become the white saturation level 255. As described above, the γ characteristics of the R, G, and B color components are set.
[0083]
In addition, since gamma correction is performed so that the colored white background portion becomes white, the colored portion will deviate from the original color, but in character images, information is more important than color reproducibility. Color misregistration is considered acceptable.
[0084]
In the above description, a histogram of the level distribution of the pixel data included in the block is created, and the white saturation level is determined using this histogram (that is, the γ characteristic is set). Instead, the γ characteristic may be set by calculating pixel data.
[0085]
By setting the γ characteristic for illuminance unevenness correction for each block B (I, J) by the above-described method, and performing gamma correction of the image in units of blocks using this γ characteristic, the illuminance unevenness correction is performed for each block. Therefore, the image quality changes suddenly at the boundary between the blocks, which may cause a boundary line (false line). That is, the white background level changes suddenly at the block boundary, and this white background level discontinuity may occur as a boundary line.
[0086]
Therefore, in this embodiment, the γ characteristic for correcting illuminance unevenness set for each block B (I, J) is used as the γ characteristic for the pixel data at the center position of the block B (I, J), and adjacent to the block B (I, J). The γ characteristic for illuminance unevenness correction for the pixel data between the block center positions is linearly interpolated using the γ characteristics for illuminance unevenness correction of both blocks, and the pixel data other than the center position is gamma-corrected using this linearly interpolated γ characteristic. By doing so, discontinuity in image quality based on the difference in γ characteristics between blocks is alleviated.
[0087]
That is, as shown in FIG. 26, the respective center positions of the blocks B (I, J), B (I, J + 1), B (I + 1, J), B (I + 1, J + 1) are determined. Assuming A, B, C, and D, the γ characteristics for correcting illuminance unevenness at an arbitrary position P in the area AR1 surrounded by ABCD are represented by blocks B (I, J), B (I, J + 1), Linear interpolation is performed using the γ characteristic for correcting illuminance unevenness set for each of B (I + 1, J) and B (I + 1, J + 1), and the pixel at the position P using this interpolated γ characteristic. Data gamma correction is performed.
[0088]
The interpolated illuminance unevenness correction γ characteristic with respect to the position P is represented by blocks B (I, J), B (I, J + 1), B (I + 1, J), B (I + 1, J + 1). ), The white saturation levels W A , W B , W C , and W D respectively calculated for) are treated as for the positions A, B, C, and D, so that these white saturation levels W A , W B , W C , position from the W D a, B, C, is set by calculating the value W P which internally divides the position P by the following equation (1) with respect to D.
[0089]
[Expression 1]
Figure 0003643201
[0090]
In the internal division method, blocks B (1,1) to B (1, L), B (2, L) to B (K, L), B (K, L-1) located around the captured image are used. ) To B (K, 1) and B (K-1,1) to B (2,1), the gamma characteristic of the portion outside the center position of each block is not interpolated. Thus, linear interpolation of the γ characteristic may be performed.
[0091]
Further, the γ characteristic may be interpolated for all positions except the center position of each block B (I, J), but a portion other than the center position of each block B (I, J) is replaced with a plurality of pixel data (for example, 4) to 4 × 4 pixels to 6 × 6 pixels), and the interpolation calculation time may be shortened by linearly interpolating the γ characteristics in units of blocks.
[0092]
In the above-described γ characteristic interpolation processing for illuminance unevenness correction, since the γ characteristic is set for each pixel position, a block centered on each pixel position is set, and the level of pixel data included in the block is set. Although the same result can be obtained even if the γ characteristic is set using the histogram of the distribution, this method requires a long time to calculate the γ characteristic because a large number of blocks are set in the captured image G. There is. In addition, since most of the pixel data overlaps between adjacent blocks, and almost no difference is seen in the created histograms, there is no practical advantage of creating histograms for both blocks. A linear interpolation process with a γ characteristic that can perform calculations and can reduce the memory capacity is employed.
[0093]
FIG. 12 is a block diagram showing the configuration from the A / D converter 321 to the first and second γ correction units 325 and 326 for performing image processing of a color image.
[0094]
The image memory 322, the first γ characteristic setting unit 323, the first and second γ correction units 325 and 326, and the switch circuit 327 are three processing circuits having the same structure corresponding to the pixel data of the R, G, and B color components, respectively. have.
[0095]
For example, the pixel signal of the R color component is A / D converted into pixel data by the A / D converter 321A, and then temporarily recorded in the image memory 322A. In the natural image mode, the pixel data of the R color component stored in the image memory 322A is read to the first γ correction unit 325A via the switch circuit 327, and gamma correction is performed using a predetermined γ characteristic for natural images. Is done.
[0096]
On the other hand, in the character image mode, the first γ characteristic setting unit 323A sets the γ characteristic for correcting unevenness of illuminance from the histogram of the level distribution of the R pixel data included in each block for each block, and the second γ characteristic setting unit 324 Thus, the γ characteristic for black adjustment is set based on the adjustment value of the black density adjustment switch 17. Then, the R color component pixel data stored in the image memory 322A is read out to the second γ correction unit 326A via the switch circuit 327, and each block has a γ characteristic for illuminance unevenness correction and performs gamma correction. After that, gamma correction is performed using the γ characteristic for black density adjustment.
[0097]
Progression processing is performed on the pixel signals of the G and B color components in the same manner as the pixel signal of the R color component.
[0098]
FIG. 13 is a block diagram illustrating an internal configuration of the first γ characteristic setting unit 323B for the G color component.
In the figure, a block size setting unit 323a sets a block size for dividing a captured image into small image blocks B (I, J). The block size setting unit 323a sets the block size S using the shooting magnification m at the center of the shooting screen input from the CPU 30, the preset reference size S0 and the reference shooting magnification m0, in order to divide the captured image into blocks. To do.
[0099]
The address generation unit 323b generates an address of pixel data included in each block B (I, J) based on the block size S set by the block size setting unit 323a. This address data is read out as a pixel signal from the CCD 21 and used for A / D conversion in the A / D converter 321 and also used for interpolation calculation in the white saturation level interpolation calculation unit 323e.
[0100]
The histogram creation unit 323c creates a histogram (see FIG. 22) of the level distribution of pixel data included in each block B (I, J). The white saturation level setting unit 323d sets the white saturation level W (see FIG. 23) of the γ characteristic with respect to the center position of each block B (I, j) using the histogram created by the histogram creation unit 323c. The white saturation level interpolation calculation unit 323e uses the white saturation level W of the γ characteristic set for each block B (I, j), and the white saturation of the γ characteristic for the portion other than the center position of each block B (I, j). Level W is set for interpolation.
[0101]
The γ characteristic setting unit 323f sets γ characteristics for correcting illuminance unevenness for each pixel data of a captured image using the white saturation level W set by the white saturation level setting unit 323d and the white saturation level interpolation calculation unit 323e. is there.
[0102]
When the regular reflection warning is instructed by the regular reflection warning switch 20, the regular reflection detection unit 323g determines whether or not the captured image includes illumination light image regularly reflected by the main subject in units of blocks, A captured image including an image of regular reflection light is detected. The regular reflection detection unit 323g determines whether or not an image of regular reflection light is included in each block B (I, J) based on the shape of the histogram created for each block.
[0103]
That is, when character information such as letters and figures written on the whiteboard 23 is photographed, if the illumination light such as sunlight from the ceiling lamp or the outside of the window is specularly reflected by the whiteboard 23, the specularly reflected light Since the pixel data at the saturation level is output from the pixel receiving the light, most of the pixel data constituting the image of the whiteboard 23 is the saturation level pixel data in the block including the image of the regular reflection light. For this reason, the shape of the histogram for this block is such that the class w having the maximum frequency of the mountain U corresponding to the whiteboard 23 substantially matches the maximum class p, as shown in FIG.
[0104]
The regular reflection detection unit 323g calculates the class w having the maximum frequency of the peak U corresponding to the whiteboard 23 of the histogram by the same method as the setting method of the white saturation level W in the γ characteristic for illuminance unevenness correction. The calculated result is compared with the maximum class p, and when the class w substantially matches the maximum class p, it is determined that the image of the regular reflection light is included in the block. Then, this determination result is output to the CPU 30.
[0105]
The CPU 30 sounds the buzzer 16 according to the determination result of the regular reflection detection unit 323g, and lights the LED display 24 to give a warning that the photographed image includes regular reflected light.
[0106]
The first γ characteristic setting units 323A and 323C for the R and B color components have the same internal configuration as the first γ characteristic setting unit 323B for the G color component except for the regular reflection detection unit 323g.
[0107]
Returning to FIG. 11, the card drive unit 33 controls the drive of the hard disk card 13 to record image data. The light emission control unit 34 controls the light emission of the flash 7. The LCD drive unit 35 controls the monitor display of the captured image on the LCD display unit 19 based on a control signal from the CPU 30. The memory 36 stores various data calculated by the CPU 30.
[0108]
The lens driving unit 37 controls the focusing operation of the taking lens 2 based on the AF control value input from the CPU 30. The zoom drive unit 38 controls the zoom operation of the photographic lens 2 based on the drive signal input from the CPU 30. The aperture drive unit 39 controls the aperture amount of the aperture 22 based on the aperture value Av of the exposure control value input from the CPU 30.
[0109]
The photometric unit 40 is composed of a light receiving element such as SPC provided at the rear position of the photometric window 3 and measures the luminance of the subject. The distance measuring unit 41 detects a subject distance, and is provided at a rear position of the light projecting window 4. The light projecting unit 411 that emits infrared light and a rear position of the light receiving window 5 are reflected by the subject. It comprises a light receiving portion 412 that receives infrared light.
[0110]
The CPU 30 centrally controls the shooting operation of the camera. The CPU 30 includes a photographing magnification calculation unit 301, and calculates a subject distance D A at a distance measuring point (center position A on the imaging surface of the CCD 21) detected by the distance measuring unit 41 and a photographing magnification m A at the distance measuring point. . Further, the CPU 30 has an exposure control value calculation unit 302, calculates an exposure control value (aperture value Av, shutter speed Tv) based on the luminance information of the subject detected by the photometry unit 40, and drives the calculation results to the respective apertures. To the unit 39 and the CCD drive unit 31. Further, the CPU 30 has an AF control value calculation unit 303, calculates a lens driving amount for setting the photographing lens 2 to the in-focus position based on the subject distance D A detected by the distance measurement unit 41, and the calculation result Is output to the lens driving unit 37 as an AF control value.
[0111]
Next, shooting control of the camera 1 will be described with reference to the flowcharts of FIGS. It is assumed that the shooting / playback switch 12 is set on the shooting side. When the camera 1 is activated and the S1 switch is turned on by the shutter button 10, the subject image is captured and processed by the CCD 21 at a predetermined cycle. When the S2 switch is turned on, an image captured thereafter is captured. The image is recorded on the hard disk card 13 through predetermined image processing.
[0112]
When the main switch 14 is turned on and the camera 1 is activated, the camera 1 is ready for photographing. When the zoom switch 11 is operated in this state (YES in # 2), the zoom lens in the photographing lens 2 is driven according to the operation direction and the operation amount, and the zoom ratio is changed (# 4). Thereafter, when the shutter button 10 is pressed halfway and the S1 switch is turned on (YES in # 6), the process proceeds to step # 8, and processing for preparation for photographing is performed.
[0113]
That is, first, the subject distance D A is detected by the distance measuring unit 41 (# 8). The distance measuring unit 41 projects infrared light for distance measurement from the light projecting unit 411 toward the subject, and the reflected light from the subject of the infrared light is received by the light receiving unit 412 to obtain data for distance measurement. The distance D A from the imaging surface to the subject at the center of the imaging screen is calculated using this data. Subsequently, based on the calculated subject distance D A , a lens driving amount for setting the photographing lens 2 to the in-focus position is calculated (# 10).
[0114]
Subsequently, it is determined whether or not the regular reflection warning is instructed by the regular reflection warning switch 20 (# 12). If the regular reflection warning is instructed (YES in # 12), steps # 14 to # 20 are performed. If the regular reflection warning process is performed and the regular reflection warning is not instructed (NO in # 12), steps # 14 to # 20 are skipped and the regular reflection warning process is not performed.
[0115]
In the regular reflection warning process, first, the photographing magnification m A (= a · f / D A , a: proportional coefficient) at the center of the photographing screen is calculated from the subject distance D A and the focal length f of the photographing lens 2 (# 14). Subsequently, the image of the regular reflection light in the photographed image is detected according to the flowchart of the subroutine “Specular reflection detection” shown in FIG. 31 (# 16).
[0116]
First, the detection of the image of the specularly reflected light in the captured image is performed by first using a block size S (=) for dividing the captured image into blocks using the imaging magnification m A and a preset reference imaging magnification m 0 and block size S 0. S0 · m A / m0) is calculated (# 70), and the number of blocks n divided from the block size S and the size of the imaging surface is calculated (# 72).
[0117]
Subsequently, the counter M for counting the number of blocks is set to “1” (# 74). Note that the order of the blocks in the specular reflection detection process is M = L · (I−1) + J because the block division shown in FIG. 16 is performed in the raster direction, and the block B (I, J) is Corresponds to block B (L · (I-1) + J).
[0118]
Subsequently, all the pixel data included in the block B (M) are all read out (# 76), and the pixel data excluding X% on the high level side among these pixel data is used as shown in FIG. A histogram as shown in FIG. 27 is created (# 78). Subsequently, a class w corresponding to the peak value of the mountain U corresponding to the white background portion of the histogram is calculated (# 80), and whether or not this class w substantially matches the maximum class p (= 255) of the histogram. Discriminated (# 82).
[0119]
If class w substantially matches maximum class p (YES in # 82), it is determined that the image of the regular reflection light is included in the block, and flag FLAGH is set to “1” (# 90). To return. The flag FLAGH is a specular reflection light detection flag. If it is set to “1”, it indicates that the image of the specular reflection light is included in the captured image, and if it is reset to “0”. This indicates that the image of regular reflection light is not included in the captured image.
[0120]
If the class w does not substantially match the maximum class p in step # 82, the count value of the counter M is incremented by “1” (# 84), and then whether or not the count value M is greater than the total block number n. Is determined (# 86), and if M ≦ n (NO in # 86), the process returns to step # 76 to determine whether or not an image of regular reflection light is included in the next block B (M). Is performed (# 76 to # 82).
[0121]
If no image of regular reflection light is detected in all the blocks B (M) (YES in # 86), it is determined that the image of regular reflection light is not included in the captured image, and the flag FLAGH is set to “0”. ”(# 88) and return.
[0122]
Returning to FIG. 28, when the detection processing of the regular reflection light is completed, the presence or absence of the regular reflection light image is determined by the flag FLAGH (# 18), and the flag FLAGH is set to “1” (the regular reflection light image exists). If so (YES in # 18), a regular reflection warning is given by the buzzer 16 and the LED display 24 (# 20). On the other hand, if the flag FLAGH is reset to “0” (no image of specular reflection light) (NO in # 18), step # 20 is skipped, and the regular reflection warning by the buzzer 16 and the LED display 24 is not performed. .
[0123]
Subsequently, luminance data (photometric data) of the subject is captured by the photometric unit 40 (# 22), and an exposure control value is calculated based on the photometric data (# 24). Further, it is determined whether or not illuminance unevenness correction is instructed by the illuminance unevenness correction switch 17 (FIG. 29, # 26). If illuminance unevenness correction is instructed (YES in # 24), the light emission control unit 34 emits light. If the prohibit control signal is output and the flash 7 is inhibited from emitting light (# 28), and if uneven illumination correction is not instructed (NO in # 24), step # 28 is skipped and the flash 7 is inhibited from emitting light. I can't. As a result, the shooting preparation process ends, and the camera enters a release standby state.
[0124]
Note that the flash 7 is prohibited from being emitted when illumination unevenness correction is instructed, for example, when the flash 7 is automatically emitted in a scene where the whiteboard 23 is photographed from the front, the flash light This is for the purpose of preventing such a photographing error because there is a possibility that the characters of the captured image may become unreadable by being totally reflected by the whiteboard 23.
[0125]
When the shutter button 10 is fully pressed and the S2 switch is turned on in the release standby state (YES in # 30), the process proceeds to step # 34 and a release operation is performed. On the other hand, if the shutter button 10 is half-pressed and the S1 switch is on (YES in # 32), the process returns to step # 8 and the above-described shooting preparation process is repeated (loop of # 8 to # 32). ). When the operation of the shutter button 10 is released and the S1 switch is turned off (NO in # 32), the process returns to step # 2.
[0126]
When shifting to the release operation, first, lens driving amount data is output to the lens driving unit 37, and after the focus adjustment of the photographing lens 2 is performed (# 34), the aperture value Av data of the exposure control value is aperture driving. Is output to the unit 39, and the opening amount of the diaphragm 22 is adjusted (# 36).
[0127]
Subsequently, it is determined whether or not illuminance unevenness correction is instructed (# 38), and if illuminance unevenness correction is instructed (YES in # 38), the block size S for dividing the image into a plurality of blocks is determined. Is calculated (# 40). This calculation is performed by the same method as in step # 70 in the regular reflection light detection process.
[0128]
When the block size setting process is completed, the shutter speed data calculated in step # 24 is output to the CCD drive unit 31, and the imaging operation (integration operation) by the CCD 21 is started (# 42). The CCD 21 images the subject by accumulating the charge in the photosensitive portion for a predetermined time (charge integration) after resetting the charge of the photosensitive portion based on the drive control signal from the CCD drive portion 31.
[0129]
When the imaging operation by the CCD 21 is completed, reading of charges (pixel data) accumulated in each pixel of the photosensitive unit to the image processing unit 32 is started (FIG. 30, # 44). As shown in FIG. 35, the pixel data of the CCD 21 is sequentially read out in the direction of the arrow for each vertical line and input to the image processing unit 32. The pixel signal input to the image processing unit 32 is converted into pixel data by the A / D converter 321, stored in the image memory 322, and input to the first γ characteristic setting unit 323.
[0130]
Subsequently, it is determined whether or not illuminance unevenness correction is instructed (# 46), and if illuminance unevenness correction is instructed (YES in # 46), according to the flowchart of the subroutine “γ characteristic setting” shown in FIG. The first γ characteristic setting unit 323 sets γ characteristics for correcting illuminance unevenness for each block (# 48).
[0131]
In setting the γ characteristic for correcting illuminance unevenness of each block, first, a counter M for counting the number of blocks is set to “1” (# 100). The order of blocks in the γ characteristic setting process is the same as the order of blocks in the regular reflection light detection process described above.
[0132]
Subsequently, all the pixel data included in the block B (M) are all read out (# 102), and among these pixel data, pixel data excluding X% on the high level side is used as shown in FIG. A histogram as shown in FIG. 27 is created (# 104). Subsequently, the class w corresponding to the peak value of the mountain U corresponding to the white background portion of the histogram is calculated (# 106), and this class w is stored as the white saturation level W (M) of the γ characteristic for the block (M). (# 108).
[0133]
Subsequently, after the count value of the counter M is incremented by “1” (# 110), it is determined whether or not the count value M is larger than the total block number n (# 112). (NO in # 112), the process returns to step # 100, and the white saturation level W (I) is set for the next block B (M) (# 102 to # 110). If M> n (YES in # 102), it is determined that the setting of the white saturation level W (M) of the γ characteristic has been completed for all blocks B (M), and the process returns.
[0134]
Returning to the flowchart of FIG. 30, subsequently, the interpolation calculation of the white saturation level W (I) of the γ characteristic for correcting the illuminance unevenness set for each block B (I) is performed, and the center of each block B (I) is calculated. A γ characteristic for correcting illuminance unevenness at a pixel position other than the position is set (# 50). Subsequently, while the set γ characteristic is input to the second γ correction unit 326, pixel data is read from the image memory 322 to the second γ correction unit 326 via the switch circuit 327, and the pixel data is stored in the pixel position. After the gamma correction is performed using the γ characteristic for illuminance unevenness correction corresponding to γ, the gamma correction is further performed using the γ characteristic for black enhancement (# 52).
[0135]
On the other hand, if illuminance unevenness correction is not instructed in step # 46 (NO in # 46), pixel data is read from the image memory 322 to the first γ correction unit 325 via the switch circuit 327, and the pixel data is stored in advance. Gamma correction is performed by the set natural image γ characteristic (# 54). Subsequently, the pixel data after gamma correction is written to the hard disk card 13 via the switch circuit 328 (# 56).
[0136]
Then, the pixel data subjected to the gamma correction is sequentially written to the hard disk card 13 via the switch circuit 328 (loop of # 46 to # 58), and when the writing of all the pixel data to the hard disk card 13 is completed ( In step # 58, YES, the pixel data reading end control signal is output to the CCD driving unit 31, and the pixel data writing end control signal is output to the card driving unit 33, thereby completing one photographing operation. In step # 60, the process returns to step # 2 to perform the next photographing process.
[0137]
As described above, in the shooting preparation process, the captured image is divided into a plurality of blocks, and is regularly reflected by the main subject (whiteboard 23) in the block using a histogram created for each block in block units. Since the regular reflection light is detected by determining whether or not the image of the illumination light is included, even the spot-like regular reflection light can be reliably detected. Then, since the specular reflection warning is given to the photographer according to the detection result, for example, the subject is a character, a figure or the like written on the whiteboard 23, and the character is reflected by the regular reflection of the illumination light on the whiteboard 23. When the information such as the figure becomes unclear, it is possible to prevent such erroneous photographing of an image having a low information value by using a regular reflection warning.
[0138]
In the above embodiment, only the regular reflection warning is performed when the specular reflection light is detected. However, an image in which the character information is obscured by the regular reflection of the illumination light is low in recording value. Considering the effective utilization of the memory capacity of the hard disk card 13, not only the regular reflection warning but also recording of the photographed image on the hard disk card 13 may be prohibited. In this case, as shown in FIG. 33, in the flowchart of FIG. 29, for example, determination of the flag FLAGH set state between step # 30 and step # 34 (the presence or absence of an image of specular reflection light corresponding to step # 18) If the flag FLAGH is set to “1” (YES in # 31), the process returns to step # 8 to perform the shooting preparation process, and the flag FLAGH is set to “0”. If it has been reset (NO in # 31), the process may proceed to step # 34. That is, as long as the flag FLAGH is not reset to “0”, even if the S2 switch is turned on, it is preferable to ignore this and repeat the shooting preparation process.
[0139]
Further, in the above embodiment, when the shutter button 10 is fully pressed, predetermined image processing (illuminance) according to an instruction from the illuminance unevenness correction switch 17 is performed on the captured image regardless of whether there is a regular reflection warning. The recording is performed on the hard disk card 13 after performing (unevenness correction). However, when a regular reflection warning is issued, the captured image is usually recorded regardless of the setting state of the unevenness correction switch 17. The image processing (that is, the illuminance unevenness correction is not performed) may be recorded on the hard disk card 13.
[0140]
In this case, as shown in FIG. 34, in the flowcharts of FIGS. 29 and 30, the specularly reflected light by the flag FLAGH is provided between step # 36 and step # 38 and between step # 44 and step # 46, respectively. Step # 37 and Step # 45 for determining whether or not there is an image, and if the flag FLAGH is set to “1” in Step 37 (YES in # 37), Steps # 38 and # 40 are skipped. If the flag FLAGH is set to “1” in step # 45 (YES in # 45), the process may be shifted to step # 54.
[0141]
Thus, when an image of specular reflection light is included in the captured image, even if illuminance unevenness correction is instructed, if the gamma correction is switched to gamma correction for normal photography and image processing is performed, the specular reflection light Therefore, it is possible to prevent the adverse effect that the character information that is obscured by the above becomes further obscured by the illuminance unevenness correction and the deterioration of image quality and information value is increased.
[0142]
【The invention's effect】
As described above, according to the present invention, in a digital camera that captures a subject light image by photoelectrically converting it into a pixel signal by an imaging means composed of a plurality of photoelectric conversion elements, and records an image composed of the pixel signal on a recording medium. The captured image is divided into small images, and for each small image, the presence or absence of illumination light regularly reflected by the main subject is determined using the created histogram, and regular reflected light is detected in any of the small images. Then, since a specific process such as a warning is performed, even if it is a spot-like specular reflection light, a high-precision warning of the specular reflection light is performed, and the low image quality that is obscured by the specular reflection light is low. It is possible to prevent erroneous photographing of the subject image.
[0143]
In addition, when specular reflection light is detected in any small image, recording of the captured image on the recording medium is prohibited, so that the low-quality subject image that is obscured by the specular reflection light is not recorded. It is possible to reliably prevent erroneous photographing.
[Brief description of the drawings]
FIG. 1 is a perspective view showing an external appearance of a digital camera according to the present invention.
FIG. 2 is a rear view of the digital camera according to the present invention.
FIG. 3 is a schematic configuration diagram of an optical system of a digital camera according to the present invention.
FIG. 4 is a diagram illustrating an example of an illumination direction of illumination light from a whiteboard.
5A and 5B show output distributions of the image sensor, where FIG. 5A is a diagram showing output distribution in the vertical direction, and FIG. 5B is a diagram showing output distribution in the horizontal direction.
FIG. 6 is a diagram illustrating a state in which a captured image is divided into a plurality of blocks.
FIG. 7 is a diagram illustrating an example of a γ characteristic for emphasizing a white background set for each block.
FIG. 8 is a diagram illustrating an example of a γ characteristic in which a black portion is emphasized.
FIG. 9 is a diagram illustrating a relationship between black adjustment by a black density adjustment switch and a γ characteristic that emphasizes a black portion.
FIG. 10 is a view showing an LED display for warning of regular reflection light in the finder.
FIG. 11 is a block diagram of a digital camera according to the present invention.
FIG. 12 is a block configuration diagram illustrating a configuration from an A / D converter to first and second γ correction units for performing image processing of a color image;
FIG. 13 is a block diagram illustrating an internal configuration of a first γ characteristic setting unit for a G color component;
FIG. 14 is a diagram for explaining the capacity of an image memory;
FIG. 15 is a diagram showing a general shape of a histogram of pixel data constituting a character image.
FIG. 16 is a diagram illustrating a state in which a captured image is divided into small images of a plurality of blocks.
FIGS. 17A and 17B show a state in which a captured image is divided by an inappropriately sized block, where FIG. 17A shows a case where the block size is smaller than an appropriate value, and FIG. 17B shows a case where the block size is larger than an appropriate value; FIG.
FIG. 18 is a diagram illustrating a state in which a block frame is displayed in a finder field frame.
FIG. 19 is a diagram for explaining a method of setting γ characteristics for illuminance unevenness correction for other blocks using γ characteristics for illuminance unevenness correction set in blocks arranged in the horizontal direction.
FIG. 20 is a diagram for explaining a method of setting γ characteristics for illuminance unevenness correction for other blocks using γ characteristics for illuminance unevenness correction set in blocks arranged in the vertical direction.
FIG. 21 is a diagram illustrating another block division method of a captured image for correcting uneven illuminance.
FIG. 22 is a diagram illustrating an example of a histogram of pixel data constituting a small image divided into blocks.
FIG. 23 is a diagram illustrating γ characteristics determined using a histogram of pixel data.
FIG. 24 is a diagram illustrating an example of γ characteristics set using pixel data of a green component.
FIGS. 25A and 25B are diagrams illustrating γ characteristics set for each color component image, where FIG. 25A is a γ characteristic for a red component image, FIG. 25B is a γ characteristic for a green component image, and FIG. Γ characteristic for the image.
FIG. 26 is a diagram for explaining interpolation calculation of γ characteristics with respect to pixel data in a region surrounded by the center positions of four adjacent blocks.
FIG. 27 is a diagram showing a histogram shape of pixel data of a block including an image of regular reflection light.
FIG. 28 is a flowchart showing shooting control of the camera according to the present invention.
FIG. 29 is a flowchart showing shooting control of the camera according to the present invention.
FIG. 30 is a flowchart showing shooting control of the camera according to the present invention.
FIG. 31 is a flowchart of a subroutine “regular reflection detection”.
FIG. 32 is a flowchart of a subroutine “γ characteristic setting”;
FIG. 33 is a diagram showing a correction plan of a flowchart for prohibiting recording of a captured image on a hard disk card upon detection of specular reflection light.
FIG. 34 is a diagram showing a correction plan of a flowchart for forcibly switching the captured image gamma correction to the normal gamma correction when detecting regular reflection light.
FIG. 35 is a diagram showing a reading direction of pixel data of a CCD.
FIG. 36 is a diagram showing a block division method of a captured image in a digital copying machine.
[Explanation of symbols]
1 Camera (digital camera)
2 Shooting Lens 3 Photometric Window 4 Distance Projecting Window 5 Distance Light-Receiving Window 6 Viewfinder Objective Window 7 Flash 8 Card Slot 9 Card Eject Button 10 Shutter Button 11 Zoom Switch 12 Shooting / Playback Switch 13 Hard Disk Card (Recording Medium) )
14 Main switch 15 Viewfinder eyepiece window 16 Buzzer (Warning means)
17 Illuminance unevenness correction switch 18 Black density adjustment switch 19 LCD display unit 20 Regular reflection warning switch 21 CCD area sensor (imaging means)
22 Aperture 23 Whiteboard 24 LED display (warning)
30 CPU (specific processing means)
31 CCD drive unit 32 Image processing unit 321 A / D converter 322 Image memory 323 First γ characteristic setting unit 323a Block size setting unit (image dividing means)
323b Address generator 323c Histogram generator (histogram generator)
323d White saturation level setting unit 323e White saturation level interpolation calculation unit 323f γ characteristic setting unit 323g Regular reflection detection unit (discrimination means)
324 second γ characteristic setting unit 325 first γ correction unit 326 second γ correction unit 327 switch circuit 33 card drive unit 34 light emission control unit 35 LCD drive unit 36 memory 37 lens drive unit 38 zoom drive unit 39 aperture drive unit 40 photometry unit 41 measurement Distance unit 42 Viewfinder field frame 43 Block frame

Claims (3)

複数の光電変換素子からなる撮像手段により被写体光像を画素信号に光電変換して取り込み、その画素信号からなる画像を記録媒体に記録するデジタルカメラにおいて、上記撮像手段で取り込まれた画像を複数の小画像に分割する画像分割手段と、小画像毎に各小画像を構成する画素信号のレベル分布のヒストグラムを作成するヒストグラム作成手段と、小画像毎に、作成されたヒストグラムを用いてその小画像内に主被写体で正反射された照明光が含まれるか否かを判別する判別手段と、上記撮像手段で取り込まれた画像の照度ムラを補正する照度ムラ補正手段とを備え、いずれかの小画像に正反射された照明光が含まれているとき、上記照度ムラ補正手段による照度ムラの補正を禁止し、正反射された照明光が含まれていないとき、上記照度ムラ補正手段による照度ムラの補正を行うことを特徴とするデジタルカメラ。In a digital camera that photoelectrically converts a subject light image into a pixel signal and captures it by an image capturing unit composed of a plurality of photoelectric conversion elements, and records an image composed of the pixel signal on a recording medium, the image captured by the image capturing unit Image dividing means for dividing into small images, histogram creating means for creating a histogram of the level distribution of pixel signals constituting each small image for each small image, and the small image using the histogram created for each small image A determination unit that determines whether or not illumination light regularly reflected by the main subject is included, and an illuminance unevenness correction unit that corrects illuminance unevenness of an image captured by the imaging unit. when it contains specularly reflected illumination light to an image, to prohibit correction of the uneven illuminance by the illuminance nonuniformity correction means, when there is not any specularly reflected illumination light, the Digital camera, characterized in that to correct the illuminance unevenness due degrees unevenness correcting means. 請求項1記載のデジタルカメラにおいて、警告手段を備え、主被写体で照明光が正反射光されていることを上記警告手段により警告することを特徴とするデジタルカメラ。The digital camera according to claim 1, further comprising a warning means, the digital camera, wherein the benzalkonium warning by said warning means that the illumination light is regularly reflected light in the main object. 複数の光電変換素子からなる撮像手段により被写体光像を画素信号に光電変換して取り込み、その画素信号からなる画像を記録媒体に記録するデジタルカメラにおいて、上記撮像手段で取り込まれた画像を複数の小画像に分割する画像分割手段と、小画像毎に各小画像を構成する画素信号のレベル分布のヒストグラムを作成するヒストグラム作成手段と、小画像毎に、作成されたヒストグラムを用いてその小画像内に主被写体で正反射された照明光が含まれるか否かを判別する判別手段とを備え、いずれかの小画像に正反射された照明光が含まれているとき、取り込まれた画像の上記記録媒体への記録を禁止し、正反射された照明光が含まれていないとき、取り込まれた画像を上記記録媒体へ記録することを特徴とするデジタルカメラ。 In a digital camera that photoelectrically converts a subject light image into a pixel signal and captures it by an image capturing unit composed of a plurality of photoelectric conversion elements, and records an image composed of the pixel signal on a recording medium, the image captured by the image capturing unit Image dividing means for dividing into small images, histogram creating means for creating a histogram of the level distribution of pixel signals constituting each small image for each small image, and the small image using the histogram created for each small image Determining means for determining whether or not illumination light regularly reflected by the main subject is included, and when any of the small images contains illumination light that is regularly reflected, A digital camera that prohibits recording on the recording medium and records the captured image on the recording medium when specularly reflected illumination light is not included .
JP01300097A 1997-01-27 1997-01-27 Digital camera Expired - Fee Related JP3643201B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP01300097A JP3643201B2 (en) 1997-01-27 1997-01-27 Digital camera
US09/013,055 US6806903B1 (en) 1997-01-27 1998-01-26 Image capturing apparatus having a γ-characteristic corrector and/or image geometric distortion correction
US10/923,828 US20050024508A1 (en) 1997-01-27 2004-08-24 Image capturing apparatus provided with image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP01300097A JP3643201B2 (en) 1997-01-27 1997-01-27 Digital camera

Publications (2)

Publication Number Publication Date
JPH10210353A JPH10210353A (en) 1998-08-07
JP3643201B2 true JP3643201B2 (en) 2005-04-27

Family

ID=11820931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01300097A Expired - Fee Related JP3643201B2 (en) 1997-01-27 1997-01-27 Digital camera

Country Status (1)

Country Link
JP (1) JP3643201B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003266207A1 (en) * 2002-09-24 2004-04-19 Imacon A/S Image quality indicator
JP4895927B2 (en) * 2007-06-15 2012-03-14 日立オムロンターミナルソリューションズ株式会社 Media verification device
US9584733B2 (en) 2010-09-30 2017-02-28 Apple Inc. High dynamic range transition

Also Published As

Publication number Publication date
JPH10210353A (en) 1998-08-07

Similar Documents

Publication Publication Date Title
US6806903B1 (en) Image capturing apparatus having a γ-characteristic corrector and/or image geometric distortion correction
JP3540485B2 (en) Electronic still camera
US7916181B2 (en) Method and device for creating high dynamic range pictures from multiple exposures
CN1645943B (en) Electronic camera and image generating apparatus generating stereo image
US20050074232A1 (en) Camera with an exposure control function
JP4834425B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US5872643A (en) Film image reproducing apparatus using a domestic light condition or an undomestic light condition for generation of a designated area
JP3758284B2 (en) Imaging device
JP3643201B2 (en) Digital camera
JP3643203B2 (en) Digital camera
JP3631575B2 (en) Digital camera
JP3564050B2 (en) Camera, focus adjustment device, focus adjustment method, medium for providing focus adjustment program
JPH10210360A (en) Digital camera
JP3631576B2 (en) Digital camera
JP4854417B2 (en) Imaging apparatus and method, program, and storage medium
JP3631577B2 (en) Digital camera
JP3358584B2 (en) 3D information input camera
JP3641537B2 (en) Digital camera
JPH10210355A (en) Digital camera
JP3275873B2 (en) 3D information input camera
JP3643202B2 (en) Digital camera
JP3411931B2 (en) Imaging device and imaging method
JPH10136298A (en) Camera and printer
JP3836890B2 (en) camera
JPH10210358A (en) Digital camera

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041008

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20041022

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20041101

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20041101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041224

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050127

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080204

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090204

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees