JP2004185183A - Image correction device, character recognition method, and image correction program - Google Patents

Image correction device, character recognition method, and image correction program Download PDF

Info

Publication number
JP2004185183A
JP2004185183A JP2002349551A JP2002349551A JP2004185183A JP 2004185183 A JP2004185183 A JP 2004185183A JP 2002349551 A JP2002349551 A JP 2002349551A JP 2002349551 A JP2002349551 A JP 2002349551A JP 2004185183 A JP2004185183 A JP 2004185183A
Authority
JP
Japan
Prior art keywords
data
image
pixel
color data
maximum value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002349551A
Other languages
Japanese (ja)
Other versions
JP4222013B2 (en
Inventor
Tetsuji Makino
哲司 牧野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2002349551A priority Critical patent/JP4222013B2/en
Publication of JP2004185183A publication Critical patent/JP2004185183A/en
Application granted granted Critical
Publication of JP4222013B2 publication Critical patent/JP4222013B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image correction device and image correction program capable of realizing an improvement in recognition ratio on the basis of the distribution state of RGB data of a digital image. <P>SOLUTION: When digital image data for one frame are inputted from an image input part 17 (step P1), the inputted image data are transferred to a RAM, and developed in a bit map image (step P2). When the development to the RAM 14 is ended, values of R, G and B of a processing object are compared with the values of R, G and B of circumferential data according to an image correction processing program to determine whether the processing object is an object (background) of extinction processing or a character (foreground), and the object of extinction processing is corrected by light homogenization. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、デジタルカメラ等の撮像装置で撮影した画像の修正技術に関する。
【0002】
【従来の技術】
デジタルカメラ等の電子撮像装置で書類など平面を撮影したデジタル画像データはフラットヘッドスキャナーで得たデジタル画像データと異なり、レンズの特性上周辺部に図7(a)に示すような暗い影72、73が発生する。これはレンズ周辺部を通過した光量が低下していくためで、撮影対象が文字の場合、この減光作用により認識困難になることが知られている。このような減光作用に対しては、レンズの特性のみで考える場合、レンズの形状に沿った同心円上に光量調整を行えば補正が可能となる。
【0003】
例えば、撮影レンズの周辺減光に関するレンズ情報に基いて画像データの周辺減光を補正するようにした電子カメラ(特許文献1)、撮影レンズの特性を取得し、その特性を画像の特性に応じて展開し、この減光量を用いて画像の周辺減光を行うようにした画像処理装置(特許文献2)、撮影レンズの中心からの距離に基いて全画素に対して周辺画像の減光分を補正し、周辺部の画像の濃度に中心部の画像の濃度よりも重みをつけた状態の画像全体の濃度バランスに基いて前記減光分の補正の強度度合いを設定するようにした画像処理装置(特許文献3)、撮影時に写真フィルムに周辺減光の強さに対応する情報を記憶しておき、最盛時にこの情報を読み取って周辺減光補正を行う方法(特許文献4)がある。
【0004】
【特許文献1】
特開2002−190979号公報
【特許文献2】
特開2000−41183号公報
【特許文献3】
特開平11−355511号公報
【特許文献4】
特開平10−13667号公報
【0005】
【発明が解決しようとする課題】
しかしながら、上記特許文献1〜4に開示されているような従来の周辺減光対策はレンズ特性を重視して光量の増減を行うようにしているため、ムラが出る場合があり、また、外部からの光による光量分布の変化を吸収できないなどの課題があった。
【0006】
本発明は、上記従来の周辺減光対策の課題を解消するためになされたものであり、デジタル画像のRGBデ―タの分布状況を基に認識率の向上を実現し得る画像修正装置及び画像修正プログラムの提供を目的とする。特に、撮影した画像を文字認識する文字認識装置に適用して好適な画像修正装置及び画像修正プログラムの提供を目的とする。
【0007】
【課題を解決するための手段】
上記課題を解決するために、第1の発明の画像修正装置は、デジタル画像データをメモリに取り込む画像データ取り込み手段と、メモリに取り込まれたデジタル画像データの全画素の中からR、G、Bの最大値を取得する最大値取得手段と、画像中の所定領域内の画素の色データのうち、最も高い頻度で出現する色データを取得する最多色データ取得手段と、所定領域内の処理対象画素の色データが最多色データ取得手段によって取得された色データと略同等か否かを判定する判定手段と、判定手段によって、処理対象画素の色データが最多色データ取得手段によって取得された色データと略同等とされた場合に、R、G、Bの最大値と処理対象画素の色データのR、G、Bの最大値との差を所定領域内の各画素のR、G、Bにそれぞれ同量ずつ加算する加算手段と、を備えたことを特徴とする。
【0008】
また、第2の発明の画像修正装置は、デジタル画像データをメモリに取り込む画像データ取り込み手段と、画素の輝度を取得する輝度取得手段と、メモリに取り込まれたデジタル画像データの全画素の中から取得された輝度の最大値を取得する最大値取得手段と、画像中の所定領域内の画素の輝度データのうち、最も高い頻度で出現する輝度データを取得する最多輝度データ取得手段と、所定領域内の処理対象画素の輝度データが最多輝度データ取得手段によって取得された輝度データと略同等か否かを判定する判定手段と、判定手段によって、処理対象画素の輝度データが最多輝度データ取得手段によって取得された輝度データと略同等とされた場合に、輝度の最大値と処理対象画素の色データの輝度の最大値との差を所定領域内の各画素の輝度にそれぞれ同量ずつ加算する加算手段と、を備えたことを特徴とする。
【0009】
また、第3の発明は上記第1又は第2の発明の画像修正装置において、更に、文字認識手段を備え、修正された画像データを用いて文字認識を行うことを特徴とする。
【0010】
また、第4の発明は上記第1、第2の又は第3のいずれかの発明の画像修正装置において、所定領域は矩形であることを特徴とする。
【0011】
また、第5の発明の文字認識方法は、デジタル画像データをメモリに取り込むステップと、メモリに取り込まれたデジタル画像データの全画素の中からR、G、Bの最大値を取得するステップと、画像中の所定領域内の画素の色データのうち、最も高い頻度で出現する色データを取得するステップと、所定領域内の処理対象画素の色データが最多色データ取得手段によって取得された色データと略同等か否かを判定するステップと、処理対象画素の色データが取得された色データと略同等とされた場合に、R、G、Bの最大値と処理対象画素の色データのR、G、Bの最大値との差を所定領域内の各画素のR、G、Bにそれぞれ同量ずつ加算するステップと、ステップにより得られた画像データを基に文字認識を行うステップと、を備えたことを特徴とする。
【0012】
また、第6の発明の画像修正プログラムは、画像の周辺減光を修正する画像修正装置で実行されるプログラムであって、デジタル画像データを読み取るステップと、読み取られたデジタル画像データをメモリに取り込ませるステップと、メモリに取り込まれたデジタル画像データの全画素の中からR、G、Bのそれぞれ独立して取りうる最大値を取得させるステップと、画像中の矩形領域内の画素の色データのうち、最も高い頻度で出現する色データを取得させるステップと、矩形領域内の処理対象画素の色データが最多色データ取得手段によって取得された色データと略同等か否かを判定させるステップと、判定によって、処理対象画素の色データが最多色データ取得手段によって取得された色データと略同等であるとされた場合に、R、G、Bの最大値と処理対象画素の色データのR、G、Bの最大値との差を算出させるステップと、算出された差を矩形領域内の各画素のR、G、Bにそれぞれ同量ずつ加算させるステップと、を備えたことを特徴とする。
【0013】
【発明の実施の形態】
図1は本発明に基く画像修正装置のハードウエア構成の一実施例を示すブロック図であり、画像修正装置1は装置全体の動作を制御するCPU11と、ユーザがデータ入力や操作指示を行うキー入力部12と、画像等を表示する表示部13と、プログラムを一時駐在させると共に、入力されたデジタル画像データ(以下、単に画像データと記す)の一時記憶及び画像修正時の作業用領域として用いられるRAM14と、磁気ディスク読取装置等の保存記憶部15と保存記憶部15に内蔵又は装着される記憶媒体16と、画像データを入力する画像入力部17とイメージプリンター等からなる印刷部18とを備えている。
【0014】
なお、画像修正装置1に図示のように画像(文字イメージ)から文字認識を行う文字認識処理部22及び文字認識処理の際用いる辞書23を付加することにより、画像修正機能を備えた文字認識装置を構成することができる。このようにした場合は画像修正機能付き文字認識装置は本発明に基く周辺減光対策を施した画像(文字イメージ)に対して文字認識を行うことができるのでデジタルカメラ等の撮像装置で撮影した文字イメージ(画像データ)を取り込んで減光対策等の画像修正処理により明瞭となった文字イメージを基に文字認識を行うことができるので高い認識率による文字認識が実現できる。
【0015】
RAM14には入力バッファから転送される画像データを一時記憶する領域、矩形範囲中の最多色を調べるためのテーブル(図6)を一時記憶するためのテーブル領域、OSや本発明に基く画像修正処理プログラム等のプログラムを駐在させる領域、定数や、計算値、取得値等を保持するための一時記憶領域等が割り付けられている。
【0016】
保存記憶部15には修正処理された画像データを保存記憶する画像記憶領域と、OSや図3に示すような動作の実行指示を行う画像修正処理プログラム等のプログラム群を記憶するプログラム駐在領域が割り付けられている。
【0017】
なお、画像修正処理プログラムは最大値MaxColorを取得するためのサブプログラム1(図4)及び矩形範囲中に出現する最多色を取得するためのサブプログラム2(図5)を含み、これらのプログラムは画像修正装置1の初期設定時または任意の時点にインストールされプログラム記憶領域に記憶される。また、画像修正装置1が起動されると記憶媒体16から読み出され、RAM14の実行プログラム駐在領域に駐在する。
【0018】
画像入力部17は、デジタルカメラ等の撮像装置から取り出されたメモリーカードに書き込まれている画像データを読み取るメモリーカードリーダやCD−ROMリーダ等の画像記録媒体読取装置からなる。
【0019】
なお、画像入力部17に代えて、又は併設して、図示のようにデジタルカメラ100等の撮像装置とケーブル接続又は赤外線等の近距離無線接続による画像データ入力を行う外部インターフェイス19、又は有線又は無線通信網を介してデジタルカメラ200等の撮像装置から送信される画像データを入力する通信インターフェイス20を備えるようにしてもよい。
【0020】
文字認識処理部22は、例えば、画像イメージから1文字ずつ文字イメージを切り出して正規化し、特徴を抽出して辞書23に登録されている文字の特徴と比較して文字認識を行う。
【0021】
また、本発明の画像修正処理は実施例ではプログラム(画像修正プログラム)で構成され、CPU11は画像修正プログラム(図3〜図5)に従って画像修正処理を実行するが、専用の画像修正処理部21を備えるようにしてもよい。
【0022】
図2は本発明の画像修正装置の動作の概要を示すフローチャートであり、画像入力部17(又は、外部インターフェイス19、通信インターフェイス20)から1フレーム分の画像データ(デジタルデータ)が入力されると(ステップP1)、CPU11は入力された画像データを入力バッファからRAM14に転送しビットマップイメージで展開(一時記憶)する。ビットマップデータの一例としては、1つの画素を24ビットで表現し、R、G、B成分をそれぞれ8ビットで表現している(ステップP2)。
【0023】
RAM14への展開が終わると、CPU11は画像修正処理プログラムに従って図3のフローチャートに示すような動作で処理対象のR、G、Bの値と周囲のデータのR、G、Bの値を比較し、処理対象が減光処理の対象(背景)なのか文字(前景)なのかを判定し、減光処理の対象について光量均一化による補正を行う(ステップP3)。
なお、画像修正装置1が文字認識処理部22を備えている場合には、更に、上記ステップP3で補正後の画像について文字認識処理を行なう(ステップP4)。
【0024】
(画像修正処理動作)
図3は図2に示したステップP3での画像修正処理動作の一実施例を示すフローチャートである。
図3で、CPU11は、まず、サブプログラム1に従って図4のフローチャートに示すような動作で、RAM14に展開された入力画像の全データ領域{(X−n,Y−m)〜(X+n,Y+m)}をサーチし、それぞれ独立して取り得る最大値MaxColor(R or G or B)を取得してRAM14に保持(一時記憶)し、ステップS2に進む(ステップS1)。
【0025】
次に、画像データの原点(X=0、Y=0)を画像の左上隅に定め(ステップS2)、サブプログラム2に従って図5のフローチャートに示すような動作で、RAM14に展開された矩形範囲{(X−n,Y−m)〜(X+n,Y+m)}の中に出現する最多色AveColor(R、G、B)を取得してRAM14に保持(一時記憶)し、ステップS4に進む(ステップS3)。なおここで矩形範囲を取るのがベストモードであるが楕円など矩形に限定されるものではない。
【0026】
次に、上記ステップS3で取得した矩形範囲{(X−n,Y−m)〜(X+n,Y+m)}の中のうち最多色の色データ(R、G、B)の値と処理対象の画素(座標(X、Y))の色データ(R、G、B)の値との差の絶対値abs(AveColor−(X、Y))と閾値を比較し、差の絶対値が閾値より小さい場合は背景色と判定してステップS5に進み、そうでない場合は文字(線分)等のような前景色と判定してステップS8に進む(ステップS4)。
【0027】
次に、画素(座標(X、Y))のR、G、Bのうち最大値TopByteを取得し(ステップS5)、MaxColorとの差(R+、G+、B+)を算出し、ステップS7に進む(ステップS6)。
算出された最大値との差分値、R+、G+、B+を背景色である現在の処理対象の各画素のR、G、Bの値にそれぞれ同量ずつ加算してR、G、Bを補正する(ステップS7)。
【0028】
次に、座標Xが全データ領域の幅の値を超えているか否かを調べ、超えている場合はステップS10に進み、超えていない場合はステップS9に進む(ステップS8)。座標Xが全データ領域の横幅の値を超えていない場合は座標Xに1ドット幅の値を加えて次の矩形範囲に出現する最多色を取得するためにステップS3に進む(ステップS9)。
【0029】
また、座標Xが全データ領域の横幅の値を超えている場合は、座標Yが全データ領域の縦幅の値を超えているか否かを調べ、超えている場合は全画像データ領域について補正処理を終了したものとして画像補正処理動作を終了し、超えていない場合はステップS11に進む(ステップS10)。座標Yが全データ領域の縦幅の値を超えていない場合は座標Yに1ドット幅の値を加えて次の矩形範囲に出現する最多色を取得するためにステップS3に進む(ステップS11)。
【0030】
また、画像修正装置1が文字認識処理部22を備えている場合には、更に、文字認識処理部22は上記ステップS1〜S11で修正後の画像イメージから1文字ずつ文字イメージを切り出して正規化し、正規化後の文字イメージの特徴を抽出して辞書23に登録されている文字の特徴と比較し文字認識を行い、認識結果を出力する(ステップS12)。
【0031】
上記図3のフローチャートのステップS4により、矩形範囲内の処理対象画素の色データ(R、G、B)が最多色AveColorと略同等か否かを判定することができ、上記ステップS5により、処理対象画素の色データが最多色データと略同等とされた場合に、R、G、Bの最大値と処理対象画素の色データのR、G、Bの最大値との差を矩形範囲内の各画素のR、G、Bにそれぞれ同量ずつ加算することができるので、上記図3に示したフローチャートの動作により、処理対象の画素(座標(X、Y))のR、G、Bの値と、その周囲の最多色のR、G、Bの値を比較することにより単に背景として補正処理してよいデータかそれとも文字などの前景データかを判定することができる。そして、ステップS7で画像データの光量を均一化して周辺減光等を排除するので、画像を鮮明にできる。
【0032】
また、前景データについてはステップS8以降に示すように補正処理をバイパスするので、従来のように文字の欠損が発生せず図7(c)に示すように文字等の情報が明瞭に表示され、見やすくなる。
【0033】
また、上記ステップS12により、デジタルカメラ等の撮像装置で撮影した文字イメージ(画像データ)を取り込んで減光対策等の画像修正処理により明瞭となった文字イメージを基に文字認識を行うことができるのでデジタルカメラ等で撮影した文字についても高い文字認識率が実現できる。
【0034】
なお、上記ステップS2では画像データの原点(X=0、Y=0)を画像の左上隅に定めるものとしたが、これに限定されない。左下隅を原点としてもよく、右上隅または右下隅を原点としてもよく、画像の中心を原点としてもよい。但し、原点の位置を左上隅以外とする場合はステップS9、S11での加算値を原点の位置にしたがって変更する必要がある。
【0035】
(サブプログラム1による動作)
図4は最大値を取得するためのサブプログラムによる動作例を示すフローチャートである。
まず、画像データの原点(X=0、Y=0)を画像の左上隅に定め、RAM14の最大値MaxColor(R、G、B)エリアを0クリアし(ステップS1−1)、指定座標(X、Y)の画素のR、G、Bの値をそれぞれ取得する。ここで、R=Red(X、Y)、G=Green(X、Y)、B=Blue(X、Y)である(ステップS1−2)。
【0036】
次に、上記ステップS1−1で取得したR、G、Bの中の最大値MaxRGBを取得し(ステップS1−3)、MaxRGBとMaxColorとを比較し、MaxRGB<MaxColorの場合にはステップS1−6に進み、そうでない場合にはステップS1−5に進む(ステップS1−4)。MaxRGB<MaxColorでない場合はMaxColorにMaxRGBを代入してステップS1−6に進む(ステップS1−5)。
【0037】
次に、座標Xが全データ領域の横幅の値より小さいか否かを調べ、超えていない場合はステップS1−7に進み、超えている場合はステップS1−8に進む(ステップS1−6)。座標Xが全データ領域の横幅を超えていない場合は座標Xに1ビット幅の値を加えて次の矩形範囲の最多色を取得するためにステップS1−2に進む(ステップS1−7)。
【0038】
座標Xが全データ領域の横幅の値を超えている場合は、座標Yが全データ領域の縦幅の値を超えているか否かを調べ、超えていない場合はステップS1−9に進み、超えている場合は全画像データ領域についてMaxColor取得動作を終了したものとしてサブプログラムによる動作を終了して図3のフローチャートのステップS1に復帰する(ステップS1−8)。座標Yが全データ領域の縦幅の値を超えていない場合は座標Yに1ビット幅の値を加えてステップS1−2に進む(ステップS1−9)。
【0039】
なお、上記ステップS1−1では画像データの原点(X=0、Y=0)を画像の左上隅に定めるものとしたが、これに限定されない。左下隅を原点としてもよく、右上隅または右下隅を原点としてもよく、画像の中心を原点としてもよい。但し、原点の位置を左上隅以外とする場合はステップS1−7、S1−9での加算値を原点の位置にしたがって変更する必要がある。
【0040】
(サブプログラム2による動作)
図5は矩形範囲中に出現する最多色を取得するためのサブプログラムによる動作例を示すフローチャートである。また、図6は処理対象データを中心とした任意の領域中(実施例では矩形範囲)で最も多く出現した色(最多色色データ)を調べるためのテーブルの構成例を示す図であり、符号60−1、60−2、・・はテーブル60を構成するテーブルデータを示し、符号61−1、61−2、・・は各テーブルデータが示す色の出現頻度格納欄を示し、出現頻度格納欄61−1、61−2、・・・はカウンタとして機能する。また、各テーブルデータ60−1、60−2、・・のR、G、BはR、G、B値の格納欄を意味する。また、図5ではテーブル60(図6)をTable[]として示している。テーブル60はRAM14のテーブル領域に生成される。なお、図6の構成ではテーブル60は任意領域のサイズの4倍(出現頻度+R、G、B)+1(データ数)分の領域を必要とするが、テーブルは図6の構成に限定されない。
【0041】
図3のフローチャートのステップS2からステップS3に進むとCPU11はサブプログラム2に従い、図6に示すようなテーブル60のテーブルデータ60−1、60−2、・・・を0クリアして初期化し(ステップ3−1)、指定座標(X、Y)の画素のR、G、Bの値をそれぞれ取得する。ここで、R=Red(X、Y)、G=Green(X、Y)、B=Blue(X、Y)である(ステップS3−2)。
【0042】
次に、テーブル60のテーブルデータ60−1、60−2、・・・のうちすでに値が格納されているテーブルデータのR、G、B格納欄の値と閾値を比較し閾値以内のデータがあるか否かを調べ(ステップS3−3)、閾値以内のデータがない場合はステップS3−5に進み、ある場合はステップS3−6に進む(ステップS3−4)。
【0043】
閾値以内のデータがない場合は、テーブル60の空いたテーブルデータのR、G、B格納欄に上記ステップS3−2で取得した指定座標(X、Y)の画素のR、G、Bの値をそれぞれ格納(=記憶)し、ステップS3−7に進む(ステップS3−5)。
【0044】
また、閾値以内のデータがある場合は存在した色のデータテーブルのカウンタ(出現頻度格納欄)に1を加えて更新し、ステップS3−7に進む(ステップS3−6)。
【0045】
次に、矩形範囲内の画素について閾値以内のデータがあるか否かを調べ終わったか否かを調べ、調べ終わった場合にはステップS3−8に進み、そうでない場合はステップS3−2に戻る(ステップS3−7)。
【0046】
次に、テーブル60の各テーブルデータ60−1、60−2、・・・の出現頻度欄61−1、61−2、・・・をサーチして出現頻度が最大のテーブルデータが表す色(=R、G、B)をAveColor(R、G、B)にセットし、図3のステップS3に復帰する(ステップS3−8)。
【0047】
図7はデジタル画像に発生した周辺減光や補正処理の結果等の説明図である。図7(a)は従来技術による周辺減光の説明図であり、背景色が同じ色である場合でも左下、右下に暗い領域72、73(斜線の部分)が背景色とは別の色で出現する。なお、正確に中心から同心円状に出現しないのは撮影時の外光が影響を及ぼすためである。また、図7(b)は単純に同系色の輝度を上げたり、或いは置き換えを行った場合の例であり、文字71が消え、符号71’で表すように不明瞭なイメージとなる。
【0048】
また、図7(c)は本発明の画像修正処理後の画像であり、処理対象(文字71)の画素の周囲の色データ(R、G、B)から処理対象の画素が背景なのか前景(文字)なのかを判断し、背景の場合に周囲の色データ(R、G、B)の分布状況を基に光量均一化を行ない、減光部の補正を行っているので、図示のように文字71は消失せず明瞭なイメージとなる。
【0049】
(変形例)
なお、上記実施例の説明では処理対象の画素(座標(X、Y))のR、G、Bと、その周囲の最多色のR、G、Bを比較して単に背景として補正処理してよいデータかそれとも文字などの前景データかを判定するようにしたが、R、G、Bから輝度を導き出し、その輝度を比較に用いるようにしてもよい。この場合、図3のステップS1の前段にRAM14に取り込まれた画像データの全画素のR、G、Bから輝度を導出するステップを設け、図3のフローチャートのステップS1以下、図4のフローチャートのステップS1−1以下、図5のフローチャートのステップS3−1以下及びそれらステップの説明でR、G、Bを輝度に、色データを輝度データに置き換えればよい。また、R、G、Bから輝度を導出する方法は公知の方法(変換式)を用いて行うことができる。
また、R、G、Bのデータに限定せず、映像信号YUVデータのYデータを利用してもよい。
以上、本発明の一実施例及び変形例について説明したが本発明は上記実施例及び変形例に限定されるものではなく、種々の変形実施が可能であることはいうまでもない。
【0050】
【発明の効果】
上記説明したように、第1の発明の画像修正装置によれば、処理対象の画素(座標(X、Y))のR、G、Bの値と、その周囲の最多色のR、G、Bの値を比較することにより単に背景として補正処理してよいデータかそれとも文字などの前景データかを判定し、画像データの光量を均一化して周辺減光等を排除するので、補正後も、従来のように周辺に暗部等が出現せず、文字のような線画像も明瞭なイメージとなる。
【0051】
また、第2の発明の画像修正装置ではR、G、Bに代えて輝度を用いるので、第1の発明と同様の効果を得ることができる。
【0052】
また、第3の発明の画像修正装置では、修正した画像データを基に文字認識を行うので、より認識制度を上げることができる。
【0053】
また、第4の発明の画像修正装置では、処理対象の所定の領域を矩形としたので、コンピュータのプログラムが組みやすく演算も速いという効果がある。
【0054】
また、第5の発明の文字認識方法によれば、単に背景として補正処理してよいデータかそれとも文字などの前景データかを判定し、画像データの光量を均一化して周辺減光等を排除するので、補正後も、従来のように周辺に暗部等が出現せず、文字のような線画像も明瞭なイメージとなり、より文字認識率を向上させることができる。
【0055】
また、第6の発明の画像修正プログラムによれば、プログラムにより第1の発明と同様の効果を得ることができるので、画像修正プログラムをインストールすれば市販されているパソコンを画像修正装置として用いることができるので、デジタルカメラ等の撮像装置のエンドユーザも容易に画像の減光補正を行うことができる。
【図面の簡単な説明】
【図1】本発明に基く画像修正装置のハードウエア構成の一実施例を示すブロック図である。
【図2】本発明の画像修正装置の動作の概要を示すフローチャートである。
【図3】画像修正処理動作の一実施例を示すフローチャートである。
【図4】最大値を取得するためのサブプログラムによる動作例を示すフローチャートである。
【図5】矩形範囲中に出現する最多色を取得するためのサブプログラムによる動作例を示すフローチャートである。
【図6】矩形範囲中に出現する最多色を調べるためのテーブルの構成例を示す図である。
【図7】デジタル画像に発生した周辺減光や補正処理の結果等の説明図である。
【符号の説明】
11 CPU(画像データ取り込み手段、最大値取得手段、輝度取得手段、最多色データ取得手段、判定手段、加算手段、最多輝度データ取得手段)
14 RAM(メモリ)
17 画像入力部(画像データ取り込み手段)
19 外部インターフェイス(画像データ取り込み手段)
20 通信インターフェイス(画像データ取り込み手段)
60 テーブル(最多色データ取得手段、最多輝度データ取得手段)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technique for correcting an image captured by an imaging device such as a digital camera.
[0002]
[Prior art]
Digital image data obtained by photographing a plane such as a document with an electronic imaging device such as a digital camera is different from digital image data obtained by a flat head scanner. Due to the characteristics of the lens, a dark shadow 72 as shown in FIG. 73 occurs. This is because the amount of light that has passed through the periphery of the lens decreases, and it is known that when the object to be photographed is a character, the dimming effect makes recognition difficult. When such a dimming effect is considered only by the characteristics of the lens, correction can be made by adjusting the light amount on a concentric circle along the shape of the lens.
[0003]
For example, an electronic camera (Patent Literature 1) configured to correct peripheral dimming of image data based on lens information related to peripheral dimming of a photographing lens, acquires characteristics of a photographing lens, and sets the characteristics according to the characteristics of an image An image processing apparatus (Patent Literature 2) configured to perform peripheral dimming of an image by using the reduced light amount, and to reduce the dimming amount of the peripheral image for all pixels based on the distance from the center of the photographing lens Image processing in which the density of the peripheral image is weighted more than the density of the central image, and the intensity of the correction for the dimming is set based on the density balance of the entire image. An apparatus (Patent Literature 3) has a method in which information corresponding to the intensity of the peripheral dimming is stored in a photographic film at the time of photographing, and the information is read at the time of the peak to perform the peripheral dimming correction (Patent Literature 4).
[0004]
[Patent Document 1]
JP-A-2002-190979
[Patent Document 2]
JP 2000-41183 A
[Patent Document 3]
JP-A-11-355511
[Patent Document 4]
JP-A-10-13667
[0005]
[Problems to be solved by the invention]
However, in the conventional peripheral dimming countermeasures as disclosed in Patent Documents 1 to 4, since the amount of light is increased or decreased with emphasis on lens characteristics, unevenness may occur, and external There is a problem that a change in the light amount distribution due to the light cannot be absorbed.
[0006]
SUMMARY OF THE INVENTION The present invention has been made in order to solve the above-described conventional problem of vignetting, and an image correcting apparatus and an image correcting apparatus capable of improving the recognition rate based on the distribution of RGB data of a digital image. The purpose is to provide a fix. In particular, it is an object of the present invention to provide an image correction device and an image correction program suitable for being applied to a character recognition device that recognizes a photographed image as characters.
[0007]
[Means for Solving the Problems]
In order to solve the above-mentioned problems, an image correction apparatus according to a first aspect of the present invention includes an image data capturing unit that captures digital image data into a memory, and R, G, and B among all pixels of the digital image data captured into the memory. A maximum value acquisition unit that acquires the maximum value of the pixel data, a most frequent color data acquisition unit that acquires the color data that appears with the highest frequency among the color data of the pixels in the predetermined region in the image, and a processing target within the predetermined region. Determining means for determining whether or not the color data of the pixel is substantially equal to the color data obtained by the most frequent data obtaining means; and determining the color data of the pixel to be processed by the most frequent data obtaining means. When the values are substantially equal to each other, the difference between the maximum value of R, G, and B and the maximum value of R, G, and B of the color data of the pixel to be processed is calculated as the R, G, and B of each pixel in the predetermined area. Same amount to each And adding adding means One, characterized by comprising a.
[0008]
Further, the image correction device of the second invention includes an image data acquisition unit for acquiring digital image data into a memory, a luminance acquisition unit for acquiring the luminance of a pixel, and A maximum value acquisition unit that acquires a maximum value of the acquired luminance; a maximum luminance data acquisition unit that acquires luminance data that appears most frequently among luminance data of pixels in a predetermined region in an image; A determination unit that determines whether or not the luminance data of the pixel to be processed is substantially equal to the luminance data acquired by the maximum luminance data acquisition unit, and a luminance data of the pixel to be processed is determined by the maximum luminance data acquisition unit. When the luminance data is substantially equal to the acquired luminance data, the difference between the maximum luminance value and the maximum luminance value of the color data of the processing target pixel is calculated for each pixel within the predetermined area. Characterized by comprising adding means for adding the same amount each luminance, the.
[0009]
According to a third aspect of the present invention, there is provided the image correcting apparatus according to the first or second aspect, further comprising a character recognizing means for performing character recognition using the corrected image data.
[0010]
According to a fourth aspect of the present invention, in the image correction device according to any one of the first, second, and third aspects, the predetermined area is rectangular.
[0011]
The character recognition method according to a fifth aspect of the present invention includes the steps of: loading digital image data into a memory; acquiring the maximum values of R, G, and B from all pixels of the digital image data loaded into the memory; Acquiring the color data that appears most frequently among the color data of the pixels in the predetermined area in the image; and obtaining the color data of the pixel to be processed in the predetermined area by the most frequent data acquisition means. Determining whether the color data of the pixel to be processed is substantially equal to the acquired color data, and determining the maximum value of R, G, B and the R of the color data of the pixel to be processed. , G, and B, and adding the same amount to each of R, G, and B of each pixel in the predetermined area, and performing character recognition based on the image data obtained by the steps. With a The features.
[0012]
An image correction program according to a sixth aspect of the present invention is a program executed by an image correction device that corrects peripheral dimming of an image, and includes a step of reading digital image data and a step of loading the read digital image data into a memory. And obtaining a maximum value that can be taken independently for each of R, G, and B from all the pixels of the digital image data taken into the memory. Acquiring the color data that appears most frequently, and determining whether the color data of the pixel to be processed in the rectangular area is substantially equivalent to the color data acquired by the most multicolor data acquisition means, If it is determined by the determination that the color data of the pixel to be processed is substantially equivalent to the color data acquired by the multi-color data acquisition unit, R, Calculating the difference between the maximum value of R, G, and B of the color data of the pixel to be processed and the maximum value of R, G, and B for each pixel in the rectangular area. Adding by the amount.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram showing an embodiment of a hardware configuration of an image correction apparatus according to the present invention. The image correction apparatus 1 includes a CPU 11 for controlling the operation of the entire apparatus, and a key for a user to input data or give an operation instruction. An input unit 12, a display unit 13 for displaying images and the like, and a program temporarily resident, used as a temporary storage for input digital image data (hereinafter simply referred to as image data) and as a work area at the time of image correction. A storage unit 15 such as a magnetic disk reader, a storage medium 16 built in or attached to the storage unit 15, an image input unit 17 for inputting image data, and a printing unit 18 such as an image printer. Have.
[0014]
As shown in the drawing, a character recognition processing unit 22 for performing character recognition from an image (character image) and a dictionary 23 used for character recognition processing are added to the image correction device 1 as shown in FIG. Can be configured. In this case, the character recognition device with the image correction function can perform character recognition on an image (character image) on which the peripheral dimming countermeasures based on the present invention are applied. Character recognition can be performed based on a character image that has been clarified by image correction processing such as light reduction measures by taking in a character image (image data), so that character recognition with a high recognition rate can be realized.
[0015]
An area for temporarily storing image data transferred from the input buffer, a table area for temporarily storing a table (FIG. 6) for checking the most frequent colors in the rectangular range, an OS and image correction processing based on the present invention An area where a program such as a program resides, a constant storage area for holding constants, calculated values, acquired values, and the like are allocated.
[0016]
The storage unit 15 includes an image storage area for storing and storing the corrected image data, and a program resident area for storing a group of programs such as an OS and an image correction processing program for instructing execution of the operation as shown in FIG. Assigned.
[0017]
The image correction processing program includes a subprogram 1 (FIG. 4) for acquiring the maximum value MaxColor and a subprogram 2 (FIG. 5) for acquiring the most frequent colors appearing in the rectangular range. It is installed at the time of initial setting of the image correction device 1 or at an arbitrary time and stored in the program storage area. Further, when the image correction apparatus 1 is started, it is read from the storage medium 16 and resides in the execution program residence area of the RAM 14.
[0018]
The image input unit 17 includes an image recording medium reading device such as a memory card reader or a CD-ROM reader that reads image data written on a memory card taken out of an imaging device such as a digital camera.
[0019]
Instead of or in addition to the image input unit 17, an external interface 19 for inputting image data by a cable connection or a short-range wireless connection such as infrared light with an imaging device such as the digital camera 100 as shown in the drawing, or a wired or A communication interface 20 for inputting image data transmitted from an imaging device such as the digital camera 200 via a wireless communication network may be provided.
[0020]
For example, the character recognition processing unit 22 performs character recognition by extracting a character image one by one from an image image, normalizing the character image, extracting a feature, and comparing the extracted feature with a feature of a character registered in the dictionary 23.
[0021]
The image correction processing of the present invention is configured by a program (image correction program) in the embodiment, and the CPU 11 executes the image correction processing according to the image correction program (FIGS. 3 to 5). May be provided.
[0022]
FIG. 2 is a flowchart showing the outline of the operation of the image correction apparatus of the present invention. When one frame of image data (digital data) is input from the image input unit 17 (or the external interface 19 or the communication interface 20). (Step P1), the CPU 11 transfers the input image data from the input buffer to the RAM 14 and develops (temporarily stores) it as a bitmap image. As an example of bitmap data, one pixel is represented by 24 bits, and each of the R, G, and B components is represented by 8 bits (step P2).
[0023]
When the development to the RAM 14 is completed, the CPU 11 compares the values of R, G, and B to be processed with the values of R, G, and B of the surrounding data by the operation shown in the flowchart of FIG. Then, it is determined whether the processing target is the target (background) or the character (foreground) of the dimming process, and the target of the dimming process is corrected by equalizing the amount of light (step P3).
If the image correction device 1 includes the character recognition processing section 22, the image correction device 1 further performs a character recognition process on the image corrected in step P3 (step P4).
[0024]
(Image correction processing operation)
FIG. 3 is a flowchart showing one embodiment of the image correction processing operation in step P3 shown in FIG.
In FIG. 3, the CPU 11 first operates in the manner shown in the flowchart of FIG. 4 according to the sub-program 1 to store all the data areas 入 力 (Xn, Ym) to (X + n, Y + m) of the input image developed in the RAM 14. ) Is searched for, and the maximum value MaxColor (R or G or B) that can be independently obtained is acquired and stored (temporarily stored) in the RAM 14, and the process proceeds to step S2 (step S1).
[0025]
Next, the origin (X = 0, Y = 0) of the image data is determined at the upper left corner of the image (step S2), and the rectangular area developed on the RAM 14 by the operation shown in the flowchart of FIG. The most multicolor AveColor (R, G, B) appearing in {(Xn, Ym) to (X + n, Y + m)} is acquired and stored (temporarily stored) in the RAM 14, and the process proceeds to step S4 ( Step S3). Note that the best mode is to take a rectangular range here, but it is not limited to a rectangle such as an ellipse.
[0026]
Next, the value of the color data (R, G, B) of the most frequent color in the rectangular range {(Xn, Ym) to (X + n, Y + m)} acquired in step S3 and the processing target The absolute value abs (AveColor− (X, Y)) of the difference between the value of the color data (R, G, B) of the pixel (coordinates (X, Y)) is compared with the threshold, and the absolute value of the difference is larger than the threshold. If it is smaller, it is determined to be the background color, and the process proceeds to step S5; otherwise, it is determined to be a foreground color such as a character (line segment) and the process proceeds to step S8 (step S4).
[0027]
Next, the maximum value TopByte among the R, G, and B of the pixels (coordinates (X, Y)) is obtained (step S5), and the difference (R +, G +, B +) from MaxColor is calculated, and the process proceeds to step S7. (Step S6).
R, G, and B are corrected by adding the calculated difference values, R +, G +, and B +, to the R, G, and B values of each pixel to be processed, which is the background color, by the same amount. (Step S7).
[0028]
Next, it is determined whether or not the coordinate X exceeds the value of the width of the entire data area. If it does, the process proceeds to step S10, and if not, the process proceeds to step S9 (step S8). If the coordinate X does not exceed the value of the width of the entire data area, the process proceeds to step S3 in order to add the value of one dot width to the coordinate X and obtain the most frequent color appearing in the next rectangular range (step S9).
[0029]
When the coordinate X exceeds the value of the horizontal width of the entire data area, it is checked whether the coordinate Y exceeds the value of the vertical width of the entire data area. The image correction processing operation is terminated assuming that the processing has been completed, and if not exceeded, the process proceeds to step S11 (step S10). If the coordinate Y does not exceed the value of the vertical width of the entire data area, the process proceeds to step S3 to add the value of one dot width to the coordinate Y and obtain the most frequent color appearing in the next rectangular range (step S11). .
[0030]
When the image correcting apparatus 1 includes the character recognition processing unit 22, the character recognition processing unit 22 further cuts out the character image one by one from the corrected image image in steps S1 to S11 and normalizes the character image. Then, the feature of the character image after the normalization is extracted, compared with the feature of the character registered in the dictionary 23, character recognition is performed, and a recognition result is output (step S12).
[0031]
By the step S4 in the flowchart of FIG. 3, it can be determined whether or not the color data (R, G, B) of the pixel to be processed within the rectangular range is substantially equal to the most multicolor AveColor. When the color data of the target pixel is substantially equivalent to the maximum color data, the difference between the maximum value of R, G, B and the maximum value of R, G, B of the color data of the processing target pixel is determined within the rectangular range. Since the same amount can be added to each of R, G, and B of each pixel, the operation of the flowchart (FIG. 3) of the R, G, and B of the pixel to be processed (coordinates (X, Y)) can be performed. By comparing the value with the R, G, and B values of the most surrounding colors, it is possible to determine whether the data can be simply corrected as the background or the foreground data such as characters. Then, in step S7, the light amount of the image data is made uniform to eliminate peripheral dimming, so that the image can be sharpened.
[0032]
In addition, since the correction process is bypassed for the foreground data as shown in step S8 and thereafter, information such as characters is clearly displayed as shown in FIG. It will be easier to see.
[0033]
In addition, in step S12, a character image (image data) captured by an imaging device such as a digital camera can be captured and character recognition can be performed based on the character image that has been clarified by image correction processing such as dimming measures. Therefore, a high character recognition rate can be realized for characters photographed by a digital camera or the like.
[0034]
In step S2, the origin (X = 0, Y = 0) of the image data is set at the upper left corner of the image. However, the present invention is not limited to this. The origin may be the lower left corner, the upper right corner or the lower right corner may be the origin, or the center of the image may be the origin. However, when the position of the origin is not at the upper left corner, it is necessary to change the added value in steps S9 and S11 according to the position of the origin.
[0035]
(Operation by subprogram 1)
FIG. 4 is a flowchart showing an operation example of a subprogram for acquiring the maximum value.
First, the origin (X = 0, Y = 0) of the image data is set at the upper left corner of the image, the maximum value MaxColor (R, G, B) area of the RAM 14 is cleared to 0 (step S1-1), and the designated coordinates ( The values of R, G, and B of the pixel of (X, Y) are obtained, respectively. Here, R = Red (X, Y), G = Green (X, Y), and B = Blue (X, Y) (step S1-2).
[0036]
Next, the maximum value MaxRGB of the R, G, and B obtained in step S1-1 is obtained (step S1-3), and MaxRGB is compared with MaxColor. If MaxRGB <MaxColor, step S1- 6; otherwise, the process proceeds to step S1-5 (step S1-4). If MaxRGB <MaxColor is not satisfied, MaxRGB is substituted for MaxColor, and the process proceeds to step S1-6 (step S1-5).
[0037]
Next, it is checked whether or not the coordinate X is smaller than the value of the width of the entire data area. If not, the process proceeds to step S1-7. If not, the process proceeds to step S1-8 (step S1-6). . If the coordinate X does not exceed the horizontal width of the entire data area, the process proceeds to step S1-2 to add the value of one bit width to the coordinate X and acquire the most frequent color in the next rectangular range (step S1-7).
[0038]
If the coordinate X exceeds the value of the horizontal width of the entire data area, it is checked whether or not the coordinate Y exceeds the value of the vertical width of the entire data area. If the coordinate Y does not exceed the value, the process proceeds to step S1-9. If so, it is determined that the MaxColor acquisition operation has been completed for all image data areas, the operation by the subprogram ends, and the process returns to step S1 in the flowchart of FIG. 3 (step S1-8). If the coordinate Y does not exceed the value of the vertical width of the entire data area, a value of one bit width is added to the coordinate Y, and the process proceeds to step S1-2 (step S1-9).
[0039]
In the above step S1-1, the origin (X = 0, Y = 0) of the image data is set at the upper left corner of the image. However, the present invention is not limited to this. The origin may be the lower left corner, the upper right corner or the lower right corner may be the origin, or the center of the image may be the origin. However, when the position of the origin is other than the upper left corner, it is necessary to change the added value in steps S1-7 and S1-9 according to the position of the origin.
[0040]
(Operation by subprogram 2)
FIG. 5 is a flowchart showing an operation example of a subprogram for acquiring the most frequent colors appearing in a rectangular range. FIG. 6 is a diagram showing a configuration example of a table for examining the most frequently occurring color (most multicolor data) in an arbitrary area (rectangular range in the embodiment) centered on the processing target data. , 60-2,... Indicate table data constituting the table 60, reference numerals 61-1, 61-2,... Indicate the appearance frequency storage columns of the colors indicated by the respective table data, and the appearance frequency storage columns. .. Function as counters. .., R, G, and B in the table data 60-1, 60-2,. In FIG. 5, the table 60 (FIG. 6) is shown as Table []. The table 60 is generated in a table area of the RAM 14. In the configuration of FIG. 6, the table 60 requires an area of four times the size of the arbitrary area (appearance frequency + R, G, B) +1 (the number of data), but the table is not limited to the configuration of FIG.
[0041]
When the CPU 11 proceeds from step S2 to step S3 in the flowchart of FIG. 3, the CPU 11 clears the table data 60-1, 60-2,... Of the table 60 as shown in FIG. Step 3-1), R, G, and B values of the pixel at the designated coordinates (X, Y) are obtained. Here, R = Red (X, Y), G = Green (X, Y), and B = Blue (X, Y) (step S3-2).
[0042]
Next, among the table data 60-1, 60-2,... Of the table 60, the values in the R, G, and B storage columns of the table data in which the values have already been stored are compared with the threshold value. It is checked whether there is any data (step S3-3). If there is no data within the threshold, the process proceeds to step S3-5, and if there is, the process proceeds to step S3-6 (step S3-4).
[0043]
If there is no data within the threshold value, the R, G, and B values of the pixel at the designated coordinates (X, Y) obtained in step S3-2 are stored in the R, G, and B storage columns of the vacant table data in the table 60. Are stored (= stored), and the process proceeds to step S3-7 (step S3-5).
[0044]
If there is data within the threshold value, 1 is added to the counter of the data table of the existing color (appearance frequency storage column) to update, and the process proceeds to step S3-7 (step S3-6).
[0045]
Next, it is checked whether or not the data within the rectangular range has been checked for any data within the threshold. If the check has been completed, the process proceeds to step S3-8; otherwise, the process returns to step S3-2. (Step S3-7).
[0046]
Next, the appearance frequency columns 61-1, 61-2,... Of the table data 60-1, 60-2,. = R, G, B) is set in AveColor (R, G, B), and the process returns to step S3 in FIG. 3 (step S3-8).
[0047]
FIG. 7 is an explanatory diagram of peripheral dimming that has occurred in a digital image, the result of correction processing, and the like. FIG. 7A is an explanatory diagram of the peripheral dimming according to the related art. Even when the background color is the same color, dark regions 72 and 73 (shaded portions) at the lower left and lower right are different from the background color. Appears in The reason why the light does not appear concentrically from the center is because external light at the time of photographing has an influence. FIG. 7B shows an example in which the brightness of a similar color is simply increased or replaced, and the character 71 disappears and becomes an unclear image as represented by a reference numeral 71 ′.
[0048]
FIG. 7C shows an image after the image correction processing of the present invention. The color data (R, G, B) around the pixel of the processing target (character 71) determines whether the processing target pixel is a background or a foreground. (Character), and in the case of the background, the light amount is made uniform based on the distribution state of the surrounding color data (R, G, B) to correct the dimming part. The character 71 does not disappear and becomes a clear image.
[0049]
(Modification)
In the description of the above embodiment, R, G, and B of a pixel to be processed (coordinates (X, Y)) are compared with R, G, and B of the largest number of surrounding pixels, and correction processing is simply performed as a background. Although it is determined whether the data is good data or foreground data such as characters, the luminance may be derived from R, G, and B, and the luminance may be used for comparison. In this case, a step of deriving the luminance from R, G, and B of all the pixels of the image data taken into the RAM 14 is provided at a stage preceding the step S1 of FIG. 3, and steps S1 and subsequent steps of the flowchart of FIG. In steps S1-1 and subsequent steps, steps S3-1 and subsequent steps in the flowchart of FIG. 5 and the description of those steps, R, G, and B may be replaced with luminance, and the color data may be replaced with luminance data. The method of deriving the luminance from R, G, and B can be performed using a known method (conversion formula).
In addition, Y data of video signal YUV data may be used without being limited to R, G, and B data.
As mentioned above, although one Example and a modification were described, the present invention is not limited to the above-mentioned Example and a modification, and it cannot be overemphasized that various modifications are possible.
[0050]
【The invention's effect】
As described above, according to the image correction apparatus of the first invention, the R, G, and B values of the pixel to be processed (coordinates (X, Y)) and the R, G, and By comparing the value of B, it is determined whether the data can be simply corrected as the background or the foreground data such as characters, and the amount of image data is made uniform to eliminate peripheral dimming and the like. As in the conventional case, no dark portion or the like appears in the periphery, and a line image such as a character becomes a clear image.
[0051]
Further, in the image correcting apparatus of the second invention, since the luminance is used instead of R, G, and B, the same effect as that of the first invention can be obtained.
[0052]
Further, in the image correcting apparatus according to the third aspect of the invention, character recognition is performed based on the corrected image data, so that the recognition system can be further improved.
[0053]
Further, in the image correcting apparatus according to the fourth aspect of the present invention, since the predetermined area to be processed is rectangular, there is an effect that a computer program can be easily assembled and the calculation can be performed quickly.
[0054]
Further, according to the character recognition method of the fifth invention, it is determined whether the data can be simply corrected as the background or the foreground data such as a character, and the light amount of the image data is made uniform to eliminate peripheral dimming and the like. Therefore, even after the correction, a dark portion or the like does not appear in the periphery as in the related art, and a line image such as a character becomes a clear image, and the character recognition rate can be further improved.
[0055]
According to the image correction program of the sixth invention, the same effects as those of the first invention can be obtained by the program. Therefore, if the image correction program is installed, a commercially available personal computer can be used as the image correction device. Therefore, the end user of the imaging device such as a digital camera can easily perform the light reduction correction of the image.
[Brief description of the drawings]
FIG. 1 is a block diagram showing one embodiment of a hardware configuration of an image correction device based on the present invention.
FIG. 2 is a flowchart showing an outline of the operation of the image correction device of the present invention.
FIG. 3 is a flowchart illustrating an embodiment of an image correction processing operation.
FIG. 4 is a flowchart showing an operation example of a subprogram for acquiring a maximum value.
FIG. 5 is a flowchart illustrating an operation example of a subprogram for acquiring the most frequent colors appearing in a rectangular range.
FIG. 6 is a diagram showing a configuration example of a table for checking the most frequent colors appearing in a rectangular range.
FIG. 7 is an explanatory diagram of peripheral dimming occurring in a digital image, a result of a correction process, and the like.
[Explanation of symbols]
11 CPU (image data acquisition means, maximum value acquisition means, luminance acquisition means, most-color data acquisition means, determination means, addition means, most-luminance data acquisition means)
14 RAM (memory)
17 Image input unit (image data capturing means)
19 External interface (image data capturing means)
20 Communication interface (image data capturing means)
60 tables (most color data acquisition means, most luminance data acquisition means)

Claims (6)

デジタル画像データをメモリに取り込む画像データ取り込み手段と、
前記メモリに取り込まれたデジタル画像データの全画素の中からR、G、Bの最大値を取得する最大値取得手段と、
画像中の所定領域内の画素の色データのうち、最も高い頻度で出現する色データを取得する最多色データ取得手段と、
前記所定領域内の処理対象画素の色データが前記最多色データ取得手段によって取得された色データと略同等か否かを判定する判定手段と、
前記判定手段によって、前記処理対象画素の色データが前記最多色データ取得手段によって取得された色データと略同等とされた場合に、前記R、G、Bの最大値と前記処理対象画素の色データのR、G、Bの最大値との差を前記所定領域内の各画素のR、G、Bにそれぞれ同量ずつ加算する加算手段と、
を備えたことを特徴とする画像修正装置。
Image data capturing means for capturing digital image data into a memory;
Maximum value acquisition means for acquiring the maximum value of R, G, B from among all the pixels of the digital image data taken into the memory;
Among the color data of the pixels in the predetermined area in the image, the most frequent data acquisition means for acquiring the color data that appears most frequently,
Determining means for determining whether or not the color data of the pixel to be processed in the predetermined area is substantially equivalent to the color data obtained by the most multicolor data obtaining means;
When the color data of the pixel to be processed is substantially equivalent to the color data obtained by the multicolor data obtaining unit, the maximum value of the R, G, and B and the color of the pixel to be processed are determined by the determination unit. Adding means for adding the same amount of difference between the maximum value of R, G, and B to the R, G, and B of each pixel in the predetermined area;
An image correction device comprising:
デジタル画像データをメモリに取り込む画像データ取り込み手段と、
画素の輝度を取得する輝度取得手段と、
前記メモリに取り込まれたデジタル画像データの全画素の中から前記取得された輝度の最大値を取得する最大値取得手段と、
画像中の所定領域内の画素の輝度データのうち、最も高い頻度で出現する輝度データを取得する最多輝度データ取得手段と、
前記所定領域内の処理対象画素の輝度データが前記最多輝度データ取得手段によって取得された輝度データと略同等か否かを判定する判定手段と、
前記判定手段によって、前記処理対象画素の輝度データが前記最多輝度データ取得手段によって取得された輝度データと略同等とされた場合に、前記輝度の最大値と前記処理対象画素の色データの輝度の最大値との差を前記所定領域内の各画素の輝度にそれぞれ同量ずつ加算する加算手段と、
を備えたことを特徴とする画像修正装置。
Image data capturing means for capturing digital image data into a memory;
Brightness acquisition means for acquiring the brightness of the pixel;
Maximum value acquisition means for acquiring the maximum value of the acquired luminance from among all the pixels of the digital image data taken into the memory,
Among the luminance data of the pixels in the predetermined area in the image, the most frequent luminance data acquisition means for acquiring the luminance data that appears most frequently,
Determining means for determining whether the luminance data of the processing target pixel in the predetermined area is substantially equivalent to the luminance data acquired by the maximum luminance data acquiring means,
When the luminance data of the pixel to be processed is substantially equivalent to the luminance data acquired by the maximum luminance data acquiring unit, the maximum value of the luminance and the luminance of the color data of the pixel to be processed are determined by the determination unit. Addition means for adding the same amount to the difference between the maximum value and the luminance of each pixel in the predetermined area,
An image correction device comprising:
更に、文字認識手段を備え、前記修正された画像データを用いて文字認識を行うことを特徴とする請求項1または2記載の画像修正装置。3. The apparatus according to claim 1, further comprising a character recognizing unit, wherein character recognition is performed using the corrected image data. 前記所定領域は矩形であることを特徴とする請求項1、2または3のいずれかに記載の画像修正装置。The apparatus according to claim 1, wherein the predetermined area is a rectangle. デジタル画像データをメモリに取り込むステップと、
前記メモリに取り込まれたデジタル画像データの全画素の中からR、G、Bの最大値を取得するステップと、
画像中の所定領域内の画素の色データのうち、最も高い頻度で出現する色データを取得するステップと、
前記所定領域内の処理対象画素の色データが前記最多色データ取得手段によって取得された色データと略同等か否かを判定するステップと、
前記処理対象画素の色データが前記取得された色データと略同等とされた場合に、前記R、G、Bの最大値と前記処理対象画素の色データのR、G、Bの最大値との差を前記所定領域内の各画素のR、G、Bにそれぞれ同量ずつ加算するステップと、
前記ステップにより得られた画像データを基に文字認識を行うステップと、
を備えたことを特徴とする文字認識方法。
Capturing digital image data into a memory;
Obtaining the maximum value of R, G, B from among all the pixels of the digital image data taken into the memory;
Obtaining color data that appears most frequently among the color data of the pixels in the predetermined area in the image;
Determining whether the color data of the pixel to be processed in the predetermined area is substantially equivalent to the color data acquired by the multicolor data acquisition means,
When the color data of the pixel to be processed is substantially equivalent to the acquired color data, the maximum value of the R, G, B and the maximum value of R, G, B of the color data of the pixel to be processed are calculated. Adding the same difference to the R, G, and B of each pixel in the predetermined area by the same amount,
Performing character recognition based on the image data obtained in the step,
A character recognition method comprising:
画像の周辺減光を修正する画像修正装置で実行されるプログラムであって、
デジタル画像データを読み取るステップと、読み取られたデジタル画像データをメモリに取り込ませるステップと、
前記メモリに取り込まれたデジタル画像データの全画素の中からR、G、Bのそれぞれ独立して取りうる最大値を取得させるステップと、
画像中の矩形領域内の画素の色データのうち、最も高い頻度で出現する色データを取得させるステップと、
前記矩形領域内の処理対象画素の色データが前記最多色データ取得手段によって取得された色データと略同等か否かを判定させるステップと、
前記判定によって、前記処理対象画素の色データが前記最多色データ取得手段によって取得された色データと略同等であるとされた場合に、前記R、G、Bの最大値と前記処理対象画素の色データのR、G、Bの最大値との差を算出させるステップと、
前記算出された差を前記矩形領域内の各画素のR、G、Bにそれぞれ同量ずつ加算させるステップと、
を備えたことを特徴とする画像修正プログラム。
A program executed by an image correction device that corrects peripheral dimming of an image,
Reading digital image data, loading the read digital image data into a memory,
Acquiring a maximum value that can be taken independently of each of R, G, and B from among all the pixels of the digital image data taken into the memory;
Acquiring color data that appears most frequently among the color data of the pixels in the rectangular area in the image;
Determining whether or not the color data of the processing target pixel in the rectangular area is substantially equivalent to the color data acquired by the multicolor data acquisition unit;
When the color data of the pixel to be processed is determined to be substantially equivalent to the color data acquired by the multi-color data acquisition unit, the maximum value of the R, G, and B and the pixel of the pixel to be processed are determined. Calculating a difference between the maximum value of R, G, and B of the color data;
Adding the calculated difference to the R, G, and B of each pixel in the rectangular area by the same amount,
An image correction program characterized by comprising:
JP2002349551A 2002-12-02 2002-12-02 Image correction apparatus, character recognition method, and image correction program Expired - Fee Related JP4222013B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002349551A JP4222013B2 (en) 2002-12-02 2002-12-02 Image correction apparatus, character recognition method, and image correction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002349551A JP4222013B2 (en) 2002-12-02 2002-12-02 Image correction apparatus, character recognition method, and image correction program

Publications (2)

Publication Number Publication Date
JP2004185183A true JP2004185183A (en) 2004-07-02
JP4222013B2 JP4222013B2 (en) 2009-02-12

Family

ID=32752054

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002349551A Expired - Fee Related JP4222013B2 (en) 2002-12-02 2002-12-02 Image correction apparatus, character recognition method, and image correction program

Country Status (1)

Country Link
JP (1) JP4222013B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680342B2 (en) 2004-08-16 2010-03-16 Fotonation Vision Limited Indoor/outdoor classification in digital images
US7868922B2 (en) 2006-02-14 2011-01-11 Tessera Technologies Ireland Limited Foreground/background segmentation in digital images
US7912285B2 (en) * 2004-08-16 2011-03-22 Tessera Technologies Ireland Limited Foreground/background segmentation in digital images with differential exposure calculations
CN102175040A (en) * 2011-03-05 2011-09-07 铁岭铁光仪器仪表有限责任公司 Independent flameout alarm monitoring system of multi-combustor for combustion applying computer program
US8212897B2 (en) 2005-12-27 2012-07-03 DigitalOptics Corporation Europe Limited Digital image acquisition system with portrait mode
US8363908B2 (en) 2006-05-03 2013-01-29 DigitalOptics Corporation Europe Limited Foreground / background separation in digital images
CN103716505A (en) * 2012-09-28 2014-04-09 北京蒙恬科技有限公司 Image recognition system and method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680342B2 (en) 2004-08-16 2010-03-16 Fotonation Vision Limited Indoor/outdoor classification in digital images
US7912285B2 (en) * 2004-08-16 2011-03-22 Tessera Technologies Ireland Limited Foreground/background segmentation in digital images with differential exposure calculations
US7957597B2 (en) 2004-08-16 2011-06-07 Tessera Technologies Ireland Limited Foreground/background segmentation in digital images
US8175385B2 (en) 2004-08-16 2012-05-08 DigitalOptics Corporation Europe Limited Foreground/background segmentation in digital images with differential exposure calculations
US8212897B2 (en) 2005-12-27 2012-07-03 DigitalOptics Corporation Europe Limited Digital image acquisition system with portrait mode
US7868922B2 (en) 2006-02-14 2011-01-11 Tessera Technologies Ireland Limited Foreground/background segmentation in digital images
US8363908B2 (en) 2006-05-03 2013-01-29 DigitalOptics Corporation Europe Limited Foreground / background separation in digital images
CN102175040A (en) * 2011-03-05 2011-09-07 铁岭铁光仪器仪表有限责任公司 Independent flameout alarm monitoring system of multi-combustor for combustion applying computer program
CN102175040B (en) * 2011-03-05 2012-09-05 铁岭铁光仪器仪表有限责任公司 Independent flameout alarm monitoring system of multi-combustor for combustion applying computer program
CN103716505A (en) * 2012-09-28 2014-04-09 北京蒙恬科技有限公司 Image recognition system and method

Also Published As

Publication number Publication date
JP4222013B2 (en) 2009-02-12

Similar Documents

Publication Publication Date Title
US7734098B2 (en) Face detecting apparatus and method
US8442347B2 (en) Information processing apparatus, information processing method, program, and imaging apparatus including optical microscope
US7358994B2 (en) Image processing apparatus, image processing method, recording medium thereof, and program thereof
TWI467495B (en) Edge mapping using panchromatic pixels
JP2008527852A (en) White balance correction of digital camera images
JP2007074578A (en) Image processor, photography instrument, and program
JP2007129535A (en) Image processor, image processing method, program thereof, and computer-readable recording medium recorded with same program
CN111368819B (en) Light spot detection method and device
CN112351195B (en) Image processing method, device and electronic system
US8249321B2 (en) Image processing apparatus and method for red eye detection
CN107018407B (en) Information processing device, evaluation chart, evaluation system, and performance evaluation method
WO2010089836A1 (en) Image processing device
JP4222013B2 (en) Image correction apparatus, character recognition method, and image correction program
US20040247197A1 (en) Correction parameter determining method, correction parameter determining apparatus, computer program, and recording medium
JP2018137636A (en) Image processing device and image processing program
US7277576B2 (en) Active color correction to compensate for near field color cast
JP3950551B2 (en) Image processing method, apparatus, and recording medium
JP2005346474A (en) Image processing method and image processor and program and storage medium
JP2003219180A (en) Image processing method, image processing device, recording medium capable of reading computer and computer program
WO2021147316A1 (en) Object recognition method and device
JP2007219899A (en) Personal identification device, personal identification method, and personal identification program
JP2000013625A (en) Image processing method, device and recording medium
CN113824894A (en) Exposure control method, device, equipment and storage medium
JP2003274180A (en) Image processor, image processing method, printer driver, computer readable storage medium and computer program
JP2002117402A (en) Image processing method and device thereof

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040507

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050527

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20060208

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060406

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080519

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080701

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080828

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081110

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111128

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121128

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131128

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees