JP2004145517A - Image correcting apparatus - Google Patents
Image correcting apparatus Download PDFInfo
- Publication number
- JP2004145517A JP2004145517A JP2002308254A JP2002308254A JP2004145517A JP 2004145517 A JP2004145517 A JP 2004145517A JP 2002308254 A JP2002308254 A JP 2002308254A JP 2002308254 A JP2002308254 A JP 2002308254A JP 2004145517 A JP2004145517 A JP 2004145517A
- Authority
- JP
- Japan
- Prior art keywords
- image
- pixel
- expansion
- row
- rows
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Input (AREA)
- Facsimile Scanning Arrangements (AREA)
- Character Input (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、文書等の原稿をハンドスキャナ等で撮影した画像において生じる文字行等の傾きおよび蛇行を補正する画像補正装置に関する。
【0002】
【従来の技術】
従来から、文書等の原稿をスキャナ等で撮影し、撮影された画像を用いてOCR(Optical Character Recognition)処理を行って文字認識を行うための様々な技術が提案されている。
【0003】
特に、ハンドスキャナ等の比較的小型のスキャナを用いて使用者が原稿上をなぞって画像を撮影するという方式の装置においては、使用者の使い方によっては、撮影する際の走査方向を原稿の文字等の配列方向に対して一定方向にスキャンすることは難しく、結果的に撮影される画像には、原稿と比較して傾きや蛇行が発生する場合があった。その結果、その傾きや蛇行の度合いが大きい場合には、文字を正確に切出せず文字認識率が低下するという課題があった。
【0004】
このような画像の傾きを補正する方法として、例えば、文字画像を、2次元に配置された画素(ピクセル)の集合体からなる画像データとして、画素毎の輝度値を2値化して2次元の2値化画像データとし、各画素に対して互いに平行な多数の走査線を設定して走査を行い、2値化画像データの文字画像を示すデータを走査線毎に累積させて、その累積値につき走査線と直交する方向の分布を求めることにより投影プロフィールを作成し、この投影プロフィールの分散値にもとづいて回転補正量を求める方法が提案されてきた(例えば、特許文献1参照。)。
【0005】
【特許文献1】
特許第3108979号公報
【0006】
【発明が解決しようとする課題】
しかしながら、前述のような画像の傾き補正方法においては、投影プロフィールを作成する際、文字行毎の投影プロフィールが重なり合ってしまい、文字行毎の分離が困難であったので、文字行の傾き補正処理が適正に行われない場合があるという課題があった。
【0007】
さらに、文字行を構成する個々の文字要素毎の蛇行を補正することができないので、文字行に対して蛇行補正を別途実行する必要があった。
【0008】
本発明は、このような課題に鑑み、高精度に文字行を分離し、かつ、文字行の傾きおよび蛇行を同時に補正できる画像補正装置を提供することを目的とする。
【0009】
【課題を解決するための手段】
本発明の画像補正装置は、画像情報を記憶する記憶手段と、記憶手段に記憶された画像を、一方向に膨張させ複数の膨張行を含む画像を生成する膨張行生成手段と、複数の膨張行を含む画像の、一方向と直交する直交方向の画素列毎に、膨張行の開始位置を検出する開始位置検出手段と、膨張行の開始位置にもとづいて、補正すべき行が構成される範囲を直交方向に分離する行分離手段と、補正すべき行が構成される範囲内における膨張行の開始位置の情報にもとづいて、膨張行の開始位置が水平に揃うように、記憶手段に記憶された画像を移動させる移動演算部とを備えたことを特徴としている。
【0010】
このような構成により、膨張行の開始位置を検出して、開始位置をグルーピングすることによって、文字行を構成する下端位置の範囲を決定するので、文字全体の存在範囲を検出する場合と比較して、文字行同士が重なり合う可能性が少なく、高精度に文字行を分離することができる。
【0011】
このため、多少文字行が傾いて撮影された場合でも、蛇行補正と合わせて傾きも同時に補正することが可能である。
【0012】
さらに、記憶手段に記憶された画像が、輝度値が0または1の値で表わされた2値化画像であることにより、メモリ使用量を削減し、処理を迅速に行うことができると共に、演算部の負担を小さくできるので、携帯型の情報機器等への搭載も容易になる。
【0013】
また、膨張行の開始位置の検出を、直交方向の画素列毎に、直交方向に注目画素を移動しながら注目画素についての輝度値を検知し、輝度値が0である画素が所定の数以上連続した場合に、最初に輝度値が0である画素を検知した位置を開始位置とする構成であることにより、汚れ等によるノイズ情報を文字行とみなす可能性を低くすることができるので、より適切な画像補正を行うことが可能となる。
【0014】
さらに、膨張行の開始位置の検出を複数の膨張行について行い、複数の膨張行の開始位置分布の平均値にもとづいて、記憶手段に記憶された画像の直交方向の画素列毎に、直交方向に移動させる構成であることにより、「j」や「p」等の他の文字よりも下に飛び出たような文字の影響を受けにくくなり、より適切な画像補正を行うことが可能となる。
【0015】
また、本発明の画像補正装置を搭載した情報装置を構成することにより、画像補正された、文字認識等が行いやすい文字等を撮影することができるので、OCR機能等の文字認識機能を搭載した情報装置において、その文字読取の精度を高くすることが可能である。
【0016】
【発明の実施の形態】
以下、本発明の実施の形態について図面を用いて説明する。
【0017】
本発明の実施の形態として、本発明の画像補正装置について説明する。
【0018】
図1は、本発明の実施の形態における画像補正装置の処理手順を示すフローチャートである。また、図2は本発明の実施の形態における画像補正装置の構成の一例を示すブロック図である。
【0019】
図2に示したように、本発明の実施の形態における画像補正装置30は、文字や図形等の原稿を読み取って、その画像の撮影を行う画像入力部1と、画像入力部1に接続され、画像入力部1によって撮影された画像にもとづいて以降に説明する各種の処理を行う演算部であるCPU2、画像入力部1によって撮影された画像を2次元に配置された画素の画像情報として記憶する第1の記憶手段3、さらに、CPU2によって各種演算処理された結果、得られた画像を格納、記憶する第2の記憶手段4、さらに、CPU2に接続され、各種の演算された結果情報や必要な情報を使用者に対して表示する表示部5から構成されている。
【0020】
なお、本発明において、画素の画像情報とは、画像を構成する画素についての、輝度情報、色情報および濃度情報等の各種情報をいい、本実施の形態においては、画素の輝度情報を用いる。
【0021】
画像入力部1としては、光学的なデバイス等、公知のハンドスキャナ等に用いられるデバイスから任意に選択されるものを用いることができる。
【0022】
第1の記憶手段3および第2の記憶手段4は、それぞれフレームメモリであり、その記憶媒体としては、フラッシュメモリ等公知の媒体を任意に用いることができる。
【0023】
表示部5は、公知のディスプレイデバイス、例えば、LCD(Liquid Crystal Display)、EL(Electro−Luminescent)およびCRT(Cathode Ray Tube)等の公知のデバイスから任意に選択することができる。
【0024】
次に、本発明の実施の形態における画像補正装置が画像補正を行う際の処理ステップについて、図1に従って説明する。
【0025】
まず、画像入力部1で撮影された画像(以下、元画像と記す)10が、CPU2を介して第1の記憶手段3に2次元に配置された画素の画像情報である輝度情報として展開される(ステップS10)。
【0026】
この元画像10の一例を図3に示す。図3に示した元画像10は、ハンドスキャナで撮影された部分画像を合成して得られた画像であり、ハンドスキャナを用いて原稿上をなぞった際の軌跡が、文字行の方向に対して蛇行したために、図3に示した元画像10は蛇行してしまっている。
【0027】
なお、本実施の形態において、元画像10は、前述のように、2次元に配置された画素の集合体であり、それぞれの画素の輝度値が多値(例えば256階調)の白黒画像である。
【0028】
また、本実施の形態においては、画像入力部1の撮影手段として、256×16画素のCCDを用い、画像を展開するための第1の記憶手段3としては、図3において紙面に対して水平方向(横)×紙面に対して垂直方向(縦)=1000×400画素のフレームメモリを用いた。
【0029】
次に、CPU2は、第1の記憶手段3に記憶された元画像10に対して、公知の方法を用いて画素毎に0(黒)または1(白)のどちらかの値を輝度情報として格納する2値化処理を行う(ステップS11)。この2値化処理を行うことにより、メモリ使用量の削減および処理の高速化が可能であり、CPU2への負荷を抑えることができる。
【0030】
図4にこのような2値化処理を行った、2値化画像11の一例を示す。黒く見える画素は輝度情報として輝度値「0」が格納された画素であり、白く見える画素は輝度情報として輝度値「1」が格納された画素の部分である。なお、本発明は、この画像の2値化処理の方法については、公知のいかなる方法を用いることも可能であり、なんら限定するものではない。
【0031】
図1に戻って、次に、CPU2は、第1の記憶手段3に記憶された2値化画像11に対して、画像の黒色の画素部分について、水平方向に膨張させる水平膨張処理を行う(ステップS12)。
【0032】
この水平膨張処理についてさらに説明する。図5は、水平膨張処理(膨張行生成手段)のステップを示したフローチャートである。
【0033】
図5において、まずCPU2は、第1の記憶手段3の任意の画素を注目画素とする。実用上は、2値化画像11の最も端部、すなわち図4の紙面における左上の原点Oに位置する画素を注目画素とする。そして、注目画素の輝度値を検知する(ステップS21)。
【0034】
続いて、CPU2は注目画素の輝度値が0(黒)であるか否かを判定し(ステップS22)、輝度値が0(黒)である場合には、第2の記憶手段4における対応する注目画素の処理方向に前後する所定範囲の画素の輝度値を0(黒)とする(ステップS23)。一方、注目画素の輝度値が0でない(1である)場合には、この処理を行わない。
【0035】
ステップS23について、図6を用いて説明する。図6において、第1の記憶手段3における、ある注目画素Aの輝度値が0(黒)であった場合には、処理方向に前後する所定範囲の画素(本実施の形態においては、前後20画素ずつ、注目画素を含めて計41画素)について、第2の記憶手段4の対応する画素の輝度値を、元の輝度値に関わらず、すべて一律に輝度値=0(黒)とする。なお、この所定範囲は、実用上前後20画素程度が望ましい。
【0036】
図5に戻って、続いてCPU2は、第1の記憶手段3を構成するすべての画素についての処理が終わったか否かを判定(ステップS24)し、すべての画素についての処理が終わった場合には、処理を終了する。一方、すべての画素についての処理が終わっていない場合には、注目画素を図4における処理方向に移動して(ステップS25)、注目画素の輝度値を検知するステップ(ステップS21)に戻る。
【0037】
このような処理を行うことによって、図7に示したような水平膨張画像13を第2の記憶手段4上に得ることができる。図7は本実施の形態における水平膨張画像13の一例を示す図である。
【0038】
図7に示したように、水平膨張画像13は、複数の膨張文字行からなる。なお、ここで、膨張文字行(膨張行)とは、輝度値が0の画素、すなわち黒画素の連続した塊のことをいう。本実施の形態においては、水平膨張画像13の4つの膨張文字行LA〜LDが、2値化画像11における4つの文字行A〜Dのそれぞれに対応している。
【0039】
ここで図1に戻って、CPU2は、水平膨張処理(ステップS12)の後、各膨張文字行に対して垂直方向の黒画素の開始位置を検出する(ステップS13)。すなわち、CPU2は、水平膨張画像13の図7における紙面に向かって最も左側の垂直画素列(画像における垂直方向(列方向)の画素の連なりをいう)から、各垂直画素列毎に図7中下側からY軸方向にスキャンを行って、黒画素(輝度値=0の画素)の連続が、所定の数よりも多く続いた場合の、黒画素が初めて検出された画素の位置(以下、開始位置と記す)を、各膨張文字行毎に検出する。すなわち、本実施の形態の水平膨張画像13においては、4つの膨張文字行LA〜LDの開始位置が各垂直画素列毎に検出されることとなる。
【0040】
この膨張文字行の検出方法について、図8を用いて説明する。図8は本発明の実施の形態における膨張文字行の開始位置検出処理(開始位置検出手段)のステップを示すフローチャートである。
【0041】
図8において、まずCPU2は、第2の記憶手段4に記憶された水平膨張画像13の任意の垂直画素列について、注目画素を設定して、注目画素を移動させながら、各注目画素についての輝度値を検知する(ステップS31)。なお、この注目画素の設定は、実用上、図7中最も下側の画素から始める。
【0042】
次に、CPU2は、黒画素が所定の数以上連続して検出されたか否かを判定し(ステップS32)、所定の数以上連続して検出された場合には、最初に黒画素が開始された画素の位置を、その膨張文字行の開始位置として記憶する(ステップS34)。一方、黒画素の連続が所定の数未満であるときには、その連続は膨張文字行ではなく、ノイズ情報であるとみなして、注目画素を移動して(ステップS36)、次の膨張文字行の開始位置検出処理に進む。なお、この所定の数は、本実施の形態において、実用的には、20前後に設定することが望ましい。
【0043】
そして、注目画素が、垂直画素列の上端に達したか否かの判定(ステップS35)を行い、達した場合には、処理を終了する。
【0044】
前述したような処理を、水平膨張画像13を構成するすべての垂直画素列(全画面)について行う。このような処理を行うことによって、短い黒画素の連続は、ノイズ情報とみなされるので、文字行から構成される膨張文字行の情報のみを取り出して処理することが可能であり、ノイズ情報の影響を受けにくい構成が実現できる。
【0045】
前述のような、膨張文字行の開始位置検出処理を全垂直画素列に対して行った結果、得られた全膨張文字行の開始位置に対して、垂直方向位置と各垂直方向位置における開始位置の数を累積した積算値とをプロットした結果(ヒストグラム)を図9に示す。図9は、本発明の実施の形態における膨張文字行開始点の分布を示すものであり、文字行の下端位置の範囲を示している。
【0046】
図1に戻って、CPU2は、図9に示した関係を用いて、各文字行の下端位置の範囲(一例として図9における範囲W)を決定する。この処理(行分離手段)は、図9に示したヒストグラムから、面積がある所定の値以上の山の幅を検出することで求められる(以下、この処理をグルーピングと記す)(ステップS14)。本実施の形態においては、図9に示したように、4つの山部が存在するが、これらがそれぞれ膨張文字行LA〜LDの開始位置の存在範囲に対応している。
【0047】
なお、このステップS14において、ヒストグラムの山の面積が所定の値よりも小さい場合には、ノイズ情報であるとして、その積算値の情報を無視する構成である。このような構成により、ノイズ情報の影響の少ない適切な膨張文字行の開始位置検出を行うことができる。
【0048】
図10は、本発明の実施の形態における膨張文字行の開始位置のグルーピングを行い、膨張文字行毎の開始位置の分布を示す図である。横軸は、図7の膨張画像の水平方向位置を示し、縦軸は垂直方向位置を示している。このように、上から順に膨張文字行LD、LC、LBおよびLAの4つの膨張文字行の開始位置すなわち下端位置の分布を示している。
【0049】
このように、本発明の構成によれば、膨張文字行の開始位置のグルーピングを行うことにより、文字の下端位置の範囲が重ならず、分離しやすいので、高精度に文字行の分離が行える。
【0050】
図1に戻って、次にCPU2は、図10の4つの膨張文字行LA〜LDのそれぞれに対して、垂直方向に補正すべきずれ量を、全垂直画素列について算出する(ステップS15)。そして、4つの膨張文字行LA〜LDのずれ量平均値を算出する(ステップS16)。
【0051】
図11は、本発明の実施の形態における各垂直画素列の相対ずれ量分布を示す図である。横軸に水平方向位置、縦軸に、全文字行について平均値を算出した相対ずれ量を示す。この図11に示した関係より、各垂直画素列について、垂直方向に補正すべきずれ量が決定される。
【0052】
図1において、CPU2(移動演算部)は、このずれ量平均値にもとづいて、第1の記憶手段3に格納された2値化画像11の各垂直画素列をずれ量分垂直方向に移動させて処理を終了する(ステップS17)。
【0053】
図12に、本発明の実施の形態における画像補正装置30によって、元画像10に対して画像補正を行った結果の補正された画像15の一例を示す。
【0054】
図12から分かるように、元画像10と比較して、その文字行の傾きと、蛇行の度合いの双方が補正されていることが分かる。このように、本発明の画像補正装置を用いれば、傾きおよび蛇行が補正されるので、以降のOCR等の処理における認識率の低下を抑えることが可能となる。
【0055】
本発明の画像補正装置によれば、その補正すべきずれ量は、各文字行について算出されたずれ量の平均値を用いるので、例えば、ある文字行において、「j」「p」などの、下に突出したような文字要素があっても、行がその文字要素の悪影響を受けることの少ない構成が実現できる。
【0056】
なお、本発明の画像補正装置は、本実施の形態に示した構成に限定されない。例えば、図9に示した膨張文字行の開始位置のヒストグラムにもとづいて、最も大きな積算値を含む文字行について算出された、補正すべきずれ量のみを参照して、画像を構成する全垂直画素列について補正を行う構成であってもよい。これは、最も大きな積算値を含む文字行は、通常は最も長い文字行を意味するので、その文字行について補正すべきずれ量を検出して、補正を行うことで、画像全体の大部分を補正できるからである。実用的にはこのような構成によっても、良好に画像の傾きおよび蛇行を補正することが可能である。また、画像を構成するすべての文字行について開始位置を算出して、その平均値にもとづいてずれ補正をする場合と比較して、処理を迅速に行うことが可能となる。
【0057】
本発明の実施の形態における画像補正装置30を用いて、サンプルとして、ランダムな名刺20枚を用いて画像補正を行った。なお、OCRに供した文字数は、電話番号390文字、メールアドレスおよびURLは1026文字である。画像補正した後に、第1の記憶手段3に記憶された画像にもとづいて、CPU2でOCR処理を行い、その結果正しく認識された文字の割合を算出した結果、名刺中の電話番号、メールアドレス、URL全体において、補正を行わない場合の正読率に対して、本発明の画像補正を行った場合には蛇行補正および傾き補正の効果により、正読率を約25%向上することができた。
【0058】
なお、本発明の実施の形態においては、表示部5の機能について、特に説明しなかったが、使用者に対して、取得された元画像や2値化画像等を表示したり、エラーメッセージや必要な入力内容のメッセージ等を表示させる構成とすれば、より使用者が使いやすい装置構成を実現できる。
【0059】
また、本発明の画像補正装置を用いれば、メモリ使用量を削減し、処理を迅速に行うことができ、演算部の負担を小さくできるので、携帯型の情報機器等への搭載も容易になる。このような画像補正装置30を携帯電話装置等の情報装置に搭載した例を、図13に示す。
【0060】
図13は、画像補正装置30を搭載した携帯電話装置50の外観図であり、(a)はその正面図、(b)は画像補正装置30が搭載された端部を示す要部斜視図である。
【0061】
携帯電話装置50は、アンテナ部51、スピーカ部52、LCD等の表示部5、キー部54およびマイク部55等の公知の携帯電話装置に、画像補正装置30を内蔵した構成である。
【0062】
本発明の画像補正装置を搭載することにより、携帯電話装置50の下面に、画像補正装置30の画像入力部1の、文字や図形等の濃淡で表わされた情報を読み取る面を設けることにより、非常にユーザにとって使いやすい画像補正装置30内蔵型の携帯電話装置50を提供することができる。
【0063】
このような画像補正装置を搭載した携帯電話装置により、URLや2次元バーコード等のドキュメント情報を読み取り、OCR等の処理に供することができるので、従来にない多機能な携帯電話装置等の情報装置を提供することができる。
【0064】
なお、ここで情報装置とは、前述の携帯電話装置に限定されず、PDAやノート型等の小型パーソナルコンピュータ、PDA(パーソナル・デジタル・アシスタント)等、公知の各種情報装置を含むことはいうまでもない。
【0065】
なお、本実施の形態においては、画像補正装置が読み取った画像上の各文字要素(文字や数字等)の傾きや蛇行を補正する例を示したが、本発明の画像補正装置が補正可能な画像はこれに限定されない。例えば、本発明の画像補正装置は、文字要素に代えて、または、加えて、バーコードや図形等の情報が画面上の一方向に並んだ原稿について、読み取った画像の傾きや補正についても補正できることはいうまでもない。
【0066】
【発明の効果】
以上述べたように、本発明の画像補正装置を用いれば、文字行の傾きおよび蛇行を同時に補正できると共に、高精度に文字行を分離できる画像補正装置を実現することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態における画像補正装置の処理手順を示すフローチャート
【図2】本発明の実施の形態における画像補正装置の構成の一例を示すブロック図
【図3】本発明の実施の形態における元画像の一例を示す図
【図4】本発明の実施の形態における2値化画像の一例を示す図
【図5】本発明の実施の形態における水平膨張処理のステップを示すフローチャート
【図6】本発明の実施の形態における水平膨張処理の内容を説明する概略図
【図7】本発明の実施の形態における水平膨張画像の一例を示す図
【図8】本発明の実施の形態における膨張文字行の開始位置検出処理のステップを示すフローチャート
【図9】本発明の実施の形態における膨張文字行の開始位置のヒストグラムを示す図
【図10】本発明の実施の形態における膨張文字行の開始位置の分布を示す図
【図11】本発明の実施の形態における膨張文字行の開始位置の相対ずれ量分布を示す図
【図12】本発明の実施の形態における補正された画像の一例を示す図
【図13】(a)は本発明の実施の形態における画像補正装置を搭載した携帯電話装置の正面図
(b)は本発明の実施の形態における画像補正装置が搭載された端部を示す要部斜視図
【符号の説明】
1 画像入力部
2 CPU(演算部)
3 第1の記憶手段
4 第2の記憶手段
5 表示部
10 元画像
11 2値化画像
13 水平膨張画像
15 補正された画像
30 画像補正装置
50 携帯電話装置
51 アンテナ部
52 スピーカ部
54 キー部
55 マイク部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image correction apparatus that corrects inclination and meandering of character lines and the like that occur in an image of a document such as a document photographed by a hand scanner or the like.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, various techniques have been proposed for capturing a document such as a document by a scanner or the like, and performing OCR (Optical Character Recognition) processing using the captured image to perform character recognition.
[0003]
Particularly, in an apparatus in which a user traces an image on a document using a relatively small scanner such as a hand scanner, the scanning direction at the time of photographing may be changed depending on the usage of the user. It is difficult to scan in a fixed direction with respect to the arrangement direction, and the resulting image may have a tilt or meandering compared to the original. As a result, when the degree of inclination or meandering is large, there is a problem that characters cannot be cut out accurately and the character recognition rate decreases.
[0004]
As a method of correcting the inclination of such an image, for example, a character image is binarized by binarizing the luminance value of each pixel as image data composed of a set of pixels arranged two-dimensionally. Scanning is performed by setting a large number of scanning lines parallel to each other for each pixel as binary image data, and data representing a character image of the binary image data is accumulated for each scanning line, and the accumulated value For example, a method has been proposed in which a projection profile is created by calculating a distribution in a direction orthogonal to a scanning line, and a rotation correction amount is calculated based on a variance value of the projection profile (for example, see Patent Document 1).
[0005]
[Patent Document 1]
Japanese Patent No. 3108979
[Problems to be solved by the invention]
However, in the above-described image inclination correction method, when creating a projection profile, the projection profiles for each character line overlap, and it is difficult to separate each character line. However, there is a problem that the operation may not be performed properly.
[0007]
Furthermore, since it is not possible to correct meandering for each character element constituting a character line, it is necessary to separately perform meandering correction on the character line.
[0008]
The present invention has been made in view of the above problems, and has as its object to provide an image correction apparatus capable of separating character lines with high accuracy and simultaneously correcting the inclination and meandering of the character lines.
[0009]
[Means for Solving the Problems]
An image correction apparatus according to the present invention includes a storage unit that stores image information, an expansion line generation unit that expands an image stored in the storage unit in one direction to generate an image including a plurality of expansion lines, and a plurality of expansion units. A row to be corrected is configured based on a start position detection unit that detects a start position of an expanded row, and a start position of the expanded row, for each pixel column in an image including rows in an orthogonal direction orthogonal to one direction. A row separating means for separating the range in the orthogonal direction and a storage means for storing the expanded rows in a horizontal manner based on the information on the start positions of the expanded rows in the range in which the rows to be corrected are formed. And a movement calculation unit that moves the selected image.
[0010]
With such a configuration, the range of the lower end position forming the character line is determined by detecting the start position of the inflated line and grouping the start position. Thus, there is little possibility that character lines overlap each other, and character lines can be separated with high accuracy.
[0011]
For this reason, even when a character line is photographed with a slight inclination, it is possible to simultaneously correct the inclination together with the meandering correction.
[0012]
Furthermore, since the image stored in the storage means is a binarized image whose luminance value is represented by a value of 0 or 1, the amount of memory used can be reduced and processing can be performed quickly. Since the load on the calculation unit can be reduced, it can be easily mounted on a portable information device or the like.
[0013]
Further, the detection of the start position of the expansion row is performed for each pixel column in the orthogonal direction by detecting the luminance value of the pixel of interest while moving the pixel of interest in the orthogonal direction. In the case where the pixels are consecutively arranged, the position where the pixel having the first brightness value of 0 is detected is set as the start position, so that it is possible to reduce the possibility that noise information due to dirt or the like is regarded as a character line. Appropriate image correction can be performed.
[0014]
Further, the detection of the start position of the dilation row is performed for a plurality of dilation rows, and based on the average value of the start position distributions of the plurality of dilation rows, for each pixel column in the orthogonal direction of the image stored in the storage means, , It is less likely to be affected by characters such as “j” and “p” that have jumped out below other characters, and more appropriate image correction can be performed.
[0015]
In addition, by configuring an information device equipped with the image correction device of the present invention, it is possible to capture a character or the like that has been subjected to image correction and is easy to perform character recognition and the like. In the information device, it is possible to increase the accuracy of the character reading.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0017]
As an embodiment of the present invention, an image correction device of the present invention will be described.
[0018]
FIG. 1 is a flowchart illustrating a processing procedure of the image correction apparatus according to the embodiment of the present invention. FIG. 2 is a block diagram illustrating an example of a configuration of the image correction device according to the embodiment of the present invention.
[0019]
As shown in FIG. 2, an
[0020]
In the present invention, the image information of a pixel refers to various types of information such as luminance information, color information, and density information of a pixel forming an image. In the present embodiment, luminance information of a pixel is used.
[0021]
As the
[0022]
Each of the
[0023]
The
[0024]
Next, processing steps when the image correction apparatus according to the embodiment of the present invention performs image correction will be described with reference to FIG.
[0025]
First, an image (hereinafter, referred to as an original image) 10 captured by the
[0026]
An example of the
[0027]
In the present embodiment, as described above, the
[0028]
Further, in the present embodiment, a 256 × 16 pixel CCD is used as a photographing unit of the
[0029]
Next, the
[0030]
FIG. 4 shows an example of the
[0031]
Returning to FIG. 1, next, the
[0032]
This horizontal expansion processing will be further described. FIG. 5 is a flowchart showing the steps of the horizontal dilation process (dilation row generation means).
[0033]
In FIG. 5, first, the
[0034]
Subsequently, the
[0035]
Step S23 will be described with reference to FIG. In FIG. 6, when the luminance value of a certain pixel of interest A in the first storage means 3 is 0 (black), a pixel within a predetermined range before and after in the processing direction (in this embodiment, 20 pixels before and after). Regarding each pixel (a total of 41 pixels including the pixel of interest), the luminance value of the corresponding pixel in the second storage means 4 is uniformly set to 0 (black) regardless of the original luminance value. The predetermined range is preferably about 20 pixels before and after practically.
[0036]
Returning to FIG. 5, subsequently, the
[0037]
By performing such a process, the horizontally expanded
[0038]
As shown in FIG. 7, the horizontal dilated
[0039]
Returning to FIG. 1, after the horizontal dilation process (step S12), the
[0040]
A method for detecting the expanded character line will be described with reference to FIG. FIG. 8 is a flowchart showing the steps of the expanded character line start position detection processing (start position detection means) according to the embodiment of the present invention.
[0041]
In FIG. 8, first, the
[0042]
Next, the
[0043]
Then, it is determined whether or not the target pixel has reached the upper end of the vertical pixel column (step S35), and if it has reached, the process is terminated.
[0044]
The above-described processing is performed on all the vertical pixel rows (the entire screen) constituting the horizontal dilated
[0045]
As described above, as a result of performing the expanded character line start position detection processing on all the vertical pixel rows, the obtained expanded position of the expanded character line is obtained with respect to the vertical position and the start position at each vertical position. FIG. 9 shows a result (histogram) obtained by plotting the accumulated value obtained by accumulating the numbers of. FIG. 9 shows the distribution of expanded character line start points in the embodiment of the present invention, and shows the range of the lower end position of the character line.
[0046]
Returning to FIG. 1, the
[0047]
In this step S14, if the area of the peak of the histogram is smaller than a predetermined value, the information is regarded as noise information and the information of the integrated value is ignored. With such a configuration, it is possible to detect an appropriate expanded character line start position with less influence of noise information.
[0048]
FIG. 10 is a diagram showing the distribution of the start positions of each expanded character line by grouping the start positions of the expanded character lines in the embodiment of the present invention. The horizontal axis indicates the horizontal position of the dilated image in FIG. 7, and the vertical axis indicates the vertical position. As described above, the distribution of the start positions, that is, the lower end positions of the four expanded character lines LD, LC, LB, and LA is shown in order from the top.
[0049]
As described above, according to the configuration of the present invention, by performing the grouping of the starting position of the expanded character line, the range of the lower end position of the character does not overlap and is easily separated, so that the character line can be separated with high accuracy. .
[0050]
Returning to FIG. 1, next, the
[0051]
FIG. 11 is a diagram showing a relative shift amount distribution of each vertical pixel column in the embodiment of the present invention. The horizontal axis shows the horizontal position, and the vertical axis shows the relative deviation calculated by averaging all the character lines. From the relationship shown in FIG. 11, the shift amount to be corrected in the vertical direction is determined for each vertical pixel column.
[0052]
In FIG. 1, the CPU 2 (movement calculation unit) moves each vertical pixel column of the
[0053]
FIG. 12 shows an example of the corrected
[0054]
As can be seen from FIG. 12, compared to the
[0055]
According to the image correction apparatus of the present invention, the shift amount to be corrected uses the average value of the shift amounts calculated for each character line. Therefore, for example, in a certain character line, for example, “j”, “p”, etc. Even if there is a character element that protrudes downward, it is possible to realize a configuration in which a line is less affected by the character element.
[0056]
Note that the image correction device of the present invention is not limited to the configuration shown in the present embodiment. For example, based on the histogram of the start position of the expanded character line shown in FIG. 9, all vertical pixels forming the image are referred to by referring only to the shift amount to be corrected calculated for the character line including the largest integrated value. A configuration for performing correction on a column may be used. This means that the character line containing the largest integrated value usually means the longest character line, so that by detecting the amount of deviation to be corrected for that character line and performing correction, most of the entire image is corrected. This is because it can be corrected. Practically, even with such a configuration, it is possible to satisfactorily correct the tilt and meander of the image. In addition, the processing can be performed more quickly than in the case where the start positions are calculated for all the character lines constituting the image and the deviation is corrected based on the average value.
[0057]
Using the
[0058]
In the embodiment of the present invention, although the function of the
[0059]
Further, by using the image correction device of the present invention, the amount of memory used can be reduced, processing can be performed quickly, and the load on the arithmetic unit can be reduced, so that it can be easily mounted on portable information devices and the like. . FIG. 13 shows an example in which such an
[0060]
FIGS. 13A and 13B are external views of a
[0061]
The
[0062]
By mounting the image correction device of the present invention, the surface of the
[0063]
By using a mobile phone equipped with such an image correction device, document information such as a URL and a two-dimensional barcode can be read and used for processing such as OCR. An apparatus can be provided.
[0064]
Here, the information device is not limited to the above-mentioned portable telephone device, but includes various known information devices such as a small personal computer such as a PDA and a notebook, and a PDA (personal digital assistant). Nor.
[0065]
In the present embodiment, an example has been shown in which the inclination and meandering of each character element (such as characters and numbers) on an image read by the image correction device are corrected, but the image correction device of the present invention can correct the inclination and meandering. The image is not limited to this. For example, the image correction apparatus of the present invention corrects the inclination and correction of a read image of a document in which information such as barcodes and graphics are arranged in one direction on a screen instead of or in addition to character elements. It goes without saying that you can do it.
[0066]
【The invention's effect】
As described above, by using the image correction device of the present invention, it is possible to realize an image correction device that can simultaneously correct the inclination and meandering of a character line and can separate a character line with high accuracy.
[Brief description of the drawings]
FIG. 1 is a flowchart illustrating a processing procedure of an image correction device according to an embodiment of the present invention; FIG. 2 is a block diagram illustrating an example of a configuration of the image correction device according to an embodiment of the present invention; FIG. 4 is a diagram showing an example of an original image in the embodiment of the present invention. FIG. 4 is a diagram showing an example of a binarized image in the embodiment of the present invention. FIG. 5 is a flowchart showing steps of a horizontal dilation process in the embodiment of the present invention. FIG. 6 is a schematic diagram illustrating the contents of horizontal expansion processing according to the embodiment of the present invention. FIG. 7 is a diagram illustrating an example of a horizontal expansion image according to the embodiment of the present invention. FIG. 9 is a flowchart showing the steps of a process of detecting the start position of an expanded character line. FIG. 9 is a diagram showing a histogram of the start position of an expanded character line according to the embodiment of the present invention. FIG. 11 is a diagram showing a distribution of start positions of expanded character lines. FIG. 11 is a diagram showing a distribution of relative shift amounts of start positions of expanded character lines in the embodiment of the present invention. FIG. 13 (a) is a front view of a mobile phone device equipped with an image correction device according to the embodiment of the present invention, and FIG. 13 (b) is a front view of the mobile phone device equipped with the image correction device according to the embodiment of the present invention. Perspective view of the main part showing the cut end
1
3
Claims (5)
前記記憶手段に記憶された画像を、一方向に膨張させ複数の膨張行を含む画像を生成する膨張行生成手段と、
前記複数の膨張行を含む画像の、前記一方向と直交する直交方向の画素列毎に、前記膨張行の開始位置を検出する開始位置検出手段と、
前記膨張行の開始位置にもとづいて、補正すべき行が構成される範囲を前記直交方向に分離する行分離手段と、
前記補正すべき行が構成される範囲内における前記膨張行の開始位置の情報にもとづいて、前記膨張行の開始位置が水平に揃うように、前記記憶手段に記憶された前記画像を移動させる移動演算部とを備えたことを特徴とする画像補正装置。Storage means for storing image information;
An expansion line generation unit that expands the image stored in the storage unit in one direction to generate an image including a plurality of expansion lines,
A start position detection unit that detects a start position of the expansion row, for each pixel column in an image including the plurality of expansion rows in a direction orthogonal to the one direction,
Based on the start position of the expansion row, a row separation unit that separates the range in which the row to be corrected is configured in the orthogonal direction,
Movement for moving the image stored in the storage means such that the start positions of the expansion rows are horizontally aligned based on information on the start positions of the expansion rows within the range in which the rows to be corrected are configured. An image correction device, comprising: a calculation unit.
前記複数の膨張行の開始位置分布の平均値にもとづいて、前記記憶手段に記憶された前記画像の前記直交方向の画素列毎に、前記直交方向に移動させることを特徴とする請求項1から請求項3までのいずれか1項に記載の画像補正装置。Perform the detection of the start position of the expansion line for a plurality of expansion lines,
The method according to claim 1, wherein the image is moved in the orthogonal direction for each pixel column in the orthogonal direction of the image stored in the storage unit, based on an average value of a start position distribution of the plurality of expansion rows. The image correction device according to claim 3.
Priority Applications (7)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002308254A JP2004145517A (en) | 2002-10-23 | 2002-10-23 | Image correcting apparatus |
EP03748623A EP1465105A1 (en) | 2002-09-30 | 2003-09-30 | Image correction device and image correction method |
US10/502,218 US20050129333A1 (en) | 2002-09-30 | 2003-09-30 | Image correction device and image correction method |
CNA03802716XA CN1623164A (en) | 2002-09-30 | 2003-09-30 | Image correction device and image correction method |
PCT/JP2003/012518 WO2004029867A1 (en) | 2002-09-30 | 2003-09-30 | Image correction device and image correction method |
AU2003268699A AU2003268699A1 (en) | 2002-09-30 | 2003-09-30 | Image correction device and image correction method |
KR1020057005441A KR20050048658A (en) | 2002-09-30 | 2003-09-30 | Image correction device and image correction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002308254A JP2004145517A (en) | 2002-10-23 | 2002-10-23 | Image correcting apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004145517A true JP2004145517A (en) | 2004-05-20 |
Family
ID=32454445
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002308254A Pending JP2004145517A (en) | 2002-09-30 | 2002-10-23 | Image correcting apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004145517A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015516609A (en) * | 2012-03-02 | 2015-06-11 | 成都三泰電子実業股▲ふん▼有限公司 | Check UV anti-fake verification method |
-
2002
- 2002-10-23 JP JP2002308254A patent/JP2004145517A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015516609A (en) * | 2012-03-02 | 2015-06-11 | 成都三泰電子実業股▲ふん▼有限公司 | Check UV anti-fake verification method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ohbuchi et al. | Barcode readers using the camera device in mobile phones | |
JP4019063B2 (en) | Optical terminal device, image processing method and system | |
US8861854B2 (en) | Character recognition apparatus, method, and computer-readable, non-transitory medium | |
JP2016201126A (en) | Detection of label from image | |
JP4885789B2 (en) | Image processing method, image region detection method, image processing program, image region detection program, image processing device, and image region detection device | |
US10755065B2 (en) | Sensor device and flicker noise mitigating method | |
US8538191B2 (en) | Image correction apparatus and method for eliminating lighting component | |
JP2011243201A (en) | Method and system for preprocessing image for optical character recognition | |
KR20130066819A (en) | Apparus and method for character recognition based on photograph image | |
WO2004029867A1 (en) | Image correction device and image correction method | |
JP5870745B2 (en) | Image processing apparatus, binarization threshold value calculation method, and computer program | |
US8619316B2 (en) | Document processing apparatus and method for processing document using the same | |
JP2017161969A (en) | Character recognition device, method, and program | |
JP4145014B2 (en) | Image processing device | |
JP4177325B2 (en) | Image processing apparatus, image processing program, and image processing method | |
JP2004145517A (en) | Image correcting apparatus | |
JP2004341977A (en) | Character recognition device and portable information terminal | |
Liang et al. | Mosaicing of camera-captured document images | |
JP7027043B2 (en) | Information processing equipment, information processing methods and programs | |
US11525671B2 (en) | High contrast structured light patterns for QIS sensors | |
JP2004128643A (en) | Method for compensating tilt of image | |
JPWO2011027422A1 (en) | Image processing apparatus and video reproduction apparatus | |
JP2007026027A (en) | Character recognition program, character recognition device and character recognition method | |
CN110674863B (en) | Hamming code identification method and device and electronic equipment | |
JP2013065164A (en) | Image processing device, image processing method, and image processing program |