JP5608511B2 - Image correction apparatus and image correction method - Google Patents

Image correction apparatus and image correction method Download PDF

Info

Publication number
JP5608511B2
JP5608511B2 JP2010238900A JP2010238900A JP5608511B2 JP 5608511 B2 JP5608511 B2 JP 5608511B2 JP 2010238900 A JP2010238900 A JP 2010238900A JP 2010238900 A JP2010238900 A JP 2010238900A JP 5608511 B2 JP5608511 B2 JP 5608511B2
Authority
JP
Japan
Prior art keywords
color
image
correction
ground
shadow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010238900A
Other languages
Japanese (ja)
Other versions
JP2012095002A (en
Inventor
広 新庄
寿一 高橋
淳一 平山
隆久 村瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Omron Terminal Solutions Corp
Original Assignee
Hitachi Omron Terminal Solutions Corp
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 Hitachi Omron Terminal Solutions Corp filed Critical Hitachi Omron Terminal Solutions Corp
Priority to JP2010238900A priority Critical patent/JP5608511B2/en
Publication of JP2012095002A publication Critical patent/JP2012095002A/en
Application granted granted Critical
Publication of JP5608511B2 publication Critical patent/JP5608511B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、カメラやスキャナで撮像した画像の影を除去する技術に関する。   The present invention relates to a technique for removing a shadow of an image captured by a camera or a scanner.

従来から、オフィスや家庭において、書面、伝票、郵便物、紙幣などを、エリアイメージセンサを用いたカメラもしくはスキャナで撮像し、得られた画像データを保存したり活用したりする技術がある。   2. Description of the Related Art Conventionally, in offices and homes, there are techniques for capturing documents, slips, postal items, banknotes, and the like with a camera or scanner using an area image sensor and storing or using the obtained image data.

また、例えば、金融機関などでは、営業店窓口に設置された端末装置に接続されたスキャナによって、顧客が記入した取引帳票の画像を撮像し、得られた画像データを保存したり、画像データについて文字認識を行ったりしている。その場合、スキャナとしては、スタンド型スキャナが使われることが多い。   Also, for example, in a financial institution, a scanner connected to a terminal device installed at a sales office window captures an image of a transaction form filled by a customer and stores the obtained image data, Character recognition is performed. In that case, a stand-type scanner is often used as the scanner.

スタンド型スキャナとは、読み取り面が上向きに置かれた書面を、支柱に固定されたイメージセンサで真上から読み取る非接触型のスキャナである。スタンド型スキャナは、フラットベッドスキャナと比べると、多様なサイズや厚さの用紙が混在している場合にスキャンする手間を少なくできるため、多様な帳票を扱う金融機関の窓口業務などで多く活用されている。   The stand-type scanner is a non-contact type scanner that reads a document with a reading surface facing upward from an image sensor fixed to a support from above. Compared with flatbed scanners, stand-type scanners can be used more often in the counter operations of financial institutions that handle a variety of forms because they can reduce the time and effort required to scan paper of various sizes and thicknesses. ing.

しかし、スタンド型スキャナを使用すると、照明条件などによって、読み取った画像データに影(輝度ムラ(shade))が発生することがある。そのため、キャリブレーションを行うことで環境光の影響を取り除く必要がある。一般的なキャリブレーション方法としては、原稿台に白紙を置いて読み込ませることで影の濃度を表わすシェーディングデータを取得し、シェーディングデータを用いて原稿画像のシェーディング補正を行っている。また、その他のキャリブレーション方法として、例えば、白紙ではなく原稿台の画像を基準としてキャリブレーションする方法がある(特許文献1参照)。   However, when a stand-type scanner is used, shadows (brightness unevenness) may occur in the read image data depending on illumination conditions and the like. Therefore, it is necessary to remove the influence of ambient light by performing calibration. As a general calibration method, shading data representing shadow density is acquired by placing a blank sheet on a platen and reading it, and shading correction of the document image is performed using the shading data. As another calibration method, for example, there is a method of performing calibration based on an image on a platen instead of a blank sheet (see Patent Document 1).

しかし、キャリブレーション実施後の照明環境の変化や、撮像時にスキャナの近くに人が立つなどの周辺状況の変化により、読み込んだ画像に影が発生する場合がある。このような影を、以下、「動的な影」と称する。動的な影は、撮像した画像を利用した文字認識処理の精度低下等、画像処理に悪影響を及ぼすという問題がある。   However, there may be a case where a shadow is generated in the read image due to a change in the illumination environment after the calibration is performed or a change in the surrounding situation such as a person standing near the scanner during imaging. Such a shadow is hereinafter referred to as a “dynamic shadow”. Dynamic shadows have a problem of adversely affecting image processing, such as a decrease in accuracy of character recognition processing using captured images.

また、特許文献2では、スキャナ画像やカメラ画像の動的な影を除去する技術が開示されている。この技術では、画像を部分領域に分割し、部分領域ごとに影判定と濃度判定を行っている。具体的には、各部分領域内の画素の輝度値の頻度分布をとり、白レベルに近いピークの輝度を書面の地色(影の影響も含めた地の色)の輝度の代表値として検出する。この値を部分領域の中心座標における地色の輝度値としている。   Patent Document 2 discloses a technique for removing dynamic shadows from a scanner image or a camera image. In this technique, an image is divided into partial areas, and shadow determination and density determination are performed for each partial area. Specifically, the frequency distribution of the luminance values of the pixels in each partial area is taken, and the peak luminance close to the white level is detected as the representative value of the luminance of the document ground color (ground color including the influence of shadows). To do. This value is the luminance value of the ground color at the center coordinates of the partial area.

その他の座標での地色の輝度値は、部分領域の中心座標の輝度値から線形補間を用いて求められる。この地色の輝度値が低いほど影が濃いとして判定できる。輝度値補正は、予め定めた白の基準となる輝度値(例えば、白画素を示す255)と地色輝度との比に基づいて画素毎の補正値を求め、入力画像の画素の輝度に補正値を乗算することで求めることができる。   The luminance value of the ground color at other coordinates can be obtained from the luminance value of the central coordinates of the partial region using linear interpolation. It can be determined that the lower the luminance value of the ground color, the darker the shadow. In the luminance value correction, a correction value for each pixel is obtained based on a ratio between a predetermined luminance value serving as a white reference (for example, 255 indicating a white pixel) and the ground color luminance, and is corrected to the luminance of the pixel of the input image. It can be obtained by multiplying the values.

特開2008−199556号公報JP 2008-199556 A 特開2002−15313号公報JP 2002-15313 A

一般的なキャリブレーションでは白紙を基準として補正することができるのに対し、動的な影を補正するには、補正の基準となる画像がない。したがって、撮像した画像のみで影の領域や濃度を検出して補正する必要がある。前記したように、特許文献2の技術では、基準画像なしで影を除去するために、輝度値の頻度分布から白に近いピークを地色の輝度としている。   In general calibration, correction can be performed using blank paper as a reference, but there is no image serving as a correction reference for correcting dynamic shadows. Therefore, it is necessary to detect and correct the shadow area and density only with the captured image. As described above, in the technique of Patent Document 2, in order to remove a shadow without a reference image, a peak close to white is used as the luminance of the ground color from the frequency value luminance distribution.

しかし、この方法は、書面の地色が均一な白であることを前提としているため、カラー書面には適用できないという問題がある。例えば、白い紙に赤や緑の地色領域が印刷されており、白い部分の面積が少ない書面に適用した場合を考える。この場合、領域ごとに地色の輝度値は異なるため、輝度値の頻度分布では赤や緑の地色に相当するピークが検出されるが、白い紙の面積が小さいためピークとして検出できない場合がある。このような場合には、適切に紙の白を地色として検出することができない。さらに、紙の色とは異なる印刷色を地色として輝度を補正した場合、この色領域も白になるという問題がある。これらの問題を解決するためには、カラー書面においては、地色の色を判別して輝度補正をすることが必要となる。   However, since this method is based on the premise that the background color of the document is uniform white, there is a problem that it cannot be applied to a color document. For example, consider a case in which a red or green ground color region is printed on white paper and the document is applied to a document having a small white area. In this case, since the luminance value of the ground color is different for each region, the peak corresponding to the red or green ground color is detected in the frequency distribution of the luminance value, but it may not be detected as a peak because the area of the white paper is small. is there. In such a case, it is not possible to appropriately detect paper white as the background color. Furthermore, when the luminance is corrected using a printing color different from the paper color as a ground color, there is a problem that this color region also becomes white. In order to solve these problems, it is necessary to determine the ground color and correct the luminance in the color document.

そこで、本発明は、このような問題を解決するためになされたものであり、被写体を撮像して得られたカラー画像における動的な影を適切に除去することを課題とする。   Accordingly, the present invention has been made to solve such a problem, and an object thereof is to appropriately remove dynamic shadows in a color image obtained by imaging a subject.

前記課題を解決するために、本発明は、被写体を非接触型スキャナで撮像して得られたカラー画像から影を除去する補正を行う画像補正装置であって、前記カラー画像、および、複数の代表色から前記被写体の地色を検出するための所定の判定基準を記憶する記憶部と、前記カラー画像を複数の部分領域に分割した後、前記部分領域それぞれについて、各画素を色空間上でクラスタリングする処理である色クラスタリングを行い、前記色クラスタリングの結果を用いて各クラスタの代表色を求め、前記所定の判定基準によって、その求めた代表色のうちのいずれかを地色として検出し、前記検出した部分領域それぞれの地色に基づいて、前記被写体に対応する画像領域全体の地色濃度を示す地色濃度マップを作製し、前記地色濃度マップを用いて、地色が濃いほど影が濃いものとして前記カラー画像における各画素値から影を除去する補正を行い、前記補正を行った画素値を前記記憶部に格納する画像補正部と、を備えることを特徴とする。 In order to solve the above-described problems, the present invention provides an image correction apparatus that performs correction for removing a shadow from a color image obtained by imaging a subject with a non-contact scanner, the color image, and a plurality of images A storage unit that stores a predetermined determination criterion for detecting the background color of the subject from the representative color, and after dividing the color image into a plurality of partial areas, each pixel in each of the partial areas is represented in a color space. It performs color clustering is a process of clustering determined representative color of each cluster using the results of the color clustering by the predetermined criteria to detect any of the determined representative color as a background color, on the basis of the detected partial regions each of the background color, to produce a ground-color-density map showing a ground color density of the entire image region corresponding to the object, use the ground color density map An image correction unit that performs correction to remove a shadow from each pixel value in the color image, assuming that the darker the background color is, and stores the corrected pixel value in the storage unit. It is characterized by.

本発明によれば、被写体を撮像して得られたカラー画像における動的な影を適切に除去することができる。   ADVANTAGE OF THE INVENTION According to this invention, the dynamic shadow in the color image obtained by imaging a to-be-photographed object can be removed appropriately.

第1実施形態の画像補正装置の構成図である。It is a block diagram of the image correction apparatus of 1st Embodiment. 撮像部の一例であるスタンド型スキャナの概略図である。It is the schematic of the stand type scanner which is an example of an imaging part. 画像補正処理を示すフローチャートである。It is a flowchart which shows an image correction process. 補正対象となるカラー帳票画像の例を示す図である。It is a figure which shows the example of the color form image used as correction | amendment object. 部分領域の色クラスタリングの例を示す図である。It is a figure which shows the example of the color clustering of a partial area. 紙の地色の面積が少ない部分領域での輝度の頻度分布の例を示す図である。It is a figure which shows the example of the frequency distribution of the brightness | luminance in the partial area | region where there are few areas of the ground color of paper. 紙の地色の面積が少ない部分領域の色クラスタリングの例を示す図である。It is a figure which shows the example of the color clustering of the partial area | region where the area of the ground color of paper is small. 画像補正と文字認識をする画像処理装置の構成図である。It is a block diagram of the image processing apparatus which performs image correction and character recognition. 営業店窓口端末の構成図である。It is a block diagram of a sales office window terminal. 地色濃度マップ(補間前)の例を示す図である。It is a figure which shows the example of a ground color density map (before interpolation). 地色濃度マップ(補間後)の例を示す図である。It is a figure which shows the example of a ground color density map (after interpolation).

以下、図面を参照(言及図以外の図面も適宜参照)して、本発明を実施するための形態(以下、実施形態と称する。)について、第1実施形態〜第6実施形態に分けて説明する。   DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, modes for carrying out the present invention (hereinafter, referred to as embodiments) will be described by dividing them into first to sixth embodiments with reference to the drawings (refer to drawings other than the reference drawings as appropriate). To do.

(第1実施形態)
まず、第1実施形態に係る画像補正装置の構成について説明する。図1に示すように、画像補正装置100は、帳票や書面等を撮像して取得した影付きカラー画像を補正することで影無しカラー画像(影がない状況で撮像した画像と同等の画像)を生成するコンピュータ装置であり、操作部110と、表示部120と、撮像部130と、記憶部140と、制御部150とを備える。
(First embodiment)
First, the configuration of the image correction apparatus according to the first embodiment will be described. As illustrated in FIG. 1, the image correction apparatus 100 corrects a shadowed color image acquired by capturing a form, a document, or the like to correct a shadowless color image (an image equivalent to an image captured in a situation without a shadow). And includes an operation unit 110, a display unit 120, an imaging unit 130, a storage unit 140, and a control unit 150.

操作部110は、ユーザが数字や文字の入力操作を行う際に利用するキーボードや、スキャンの開始を指示するためのボタン等からなる操作部である。表示部120は、入力画像や補正後の画像等を表示する液晶ディスプレイ等からなる表示部である。撮像部130は、CCD(Charge Coupled Device)等の撮像素子を用いて画像を撮像するデジタルカメラやスタンド型スキャナ等(非接触型スキャナ)の撮像部である。   The operation unit 110 is an operation unit including a keyboard used when a user performs input operations of numbers and characters, a button for instructing start of scanning, and the like. The display unit 120 is a display unit including a liquid crystal display that displays an input image, a corrected image, and the like. The imaging unit 130 is an imaging unit such as a digital camera or a stand-type scanner (non-contact scanner) that captures an image using an imaging element such as a CCD (Charge Coupled Device).

記憶部140は、メモリやハードディスク装置等からなる記憶デバイスであり、撮像部130で撮像された画像や各種内部処理用プログラム、および各種設定データを記憶する。また、例えば、記憶部140は、複数の代表色から被写体(書面など)の地色を検出するための所定の判定基準として、求めた各クラスタの代表色のうち輝度が最も高い色を被写体の地色とするという基準を記憶する。   The storage unit 140 is a storage device including a memory, a hard disk device, and the like, and stores images captured by the imaging unit 130, various internal processing programs, and various setting data. Further, for example, as a predetermined determination criterion for detecting the ground color of a subject (such as a document) from a plurality of representative colors, the storage unit 140 selects a color having the highest luminance among the obtained representative colors of each cluster. Memorize the standard of ground color.

制御部150は、画像の撮像処理と入力画像の補正処理を行う制御部であり、撮像処理部151と画像補正部152を有する。
撮像処理部151は、撮像部130を用いて被写体の撮像制御を行う制御部であり、撮像部130で被写体を撮像した場合には、シェーディングデータ等のキャリブレーションパラメータを用いて動的な影以外の輝度ムラを除去した画像データを入力画像としてメモリ上に展開して一時的に保持するとともに、この画像データをファイルとして記憶部140に格納することができる。撮像処理部151の処理の手法の例としては、前記した特許文献1の手法などが挙げられる。
The control unit 150 is a control unit that performs image capture processing and input image correction processing, and includes an image capture processing unit 151 and an image correction unit 152.
The imaging processing unit 151 is a control unit that performs imaging control of a subject using the imaging unit 130. When the subject is imaged by the imaging unit 130, the imaging processing unit 151 uses a calibration parameter such as shading data other than dynamic shadows. The image data from which the luminance unevenness is removed is developed as an input image on a memory and temporarily held, and the image data can be stored in the storage unit 140 as a file. As an example of a processing method of the imaging processing unit 151, the method described in Patent Document 1 described above can be cited.

画像補正部152は、撮像処理部151で作成された入力画像から動的な影を除去する手段であり、第1実施形態の画像補正装置100における特徴部分である。具体的には、画像補正部152は、画像を複数の領域に分割して、各領域内で色クラスタリング(詳細は後記)を実行し、複数のクラスタの代表色の中で最大輝度の色を領域の地色とする。さらに、地色の輝度(濃度)を用いて、画素の輝度値の補正を行う。具体的な処理については、図3から図7を用いて後述する。   The image correction unit 152 is means for removing a dynamic shadow from the input image created by the imaging processing unit 151, and is a characteristic part in the image correction apparatus 100 of the first embodiment. Specifically, the image correction unit 152 divides the image into a plurality of regions, performs color clustering (details will be described later) in each region, and selects a color having the maximum luminance among the representative colors of the plurality of clusters. The area color. Further, the luminance value of the pixel is corrected using the luminance (density) of the ground color. Specific processing will be described later with reference to FIGS.

次に、撮像部130の一例について説明する。図2に示すように、撮像部130の一例であるスタンド型スキャナ200は、カメラヘッド210、カメラヘッド210を固定する支柱220、被写体である原稿240を置く原稿台230を備えている。カメラヘッド210の撮像方向は下向きであり、原稿台230上に置いた原稿240を読取ることができる。なお、撮像部130の例としてスタンド型スキャナ200を挙げたが、その他に、通常のデジタルカメラや携帯電話のカメラ等を用いてもよい。   Next, an example of the imaging unit 130 will be described. As shown in FIG. 2, a stand-type scanner 200 that is an example of the imaging unit 130 includes a camera head 210, a column 220 that fixes the camera head 210, and a document table 230 on which a document 240 that is a subject is placed. The imaging direction of the camera head 210 is downward, and the document 240 placed on the document table 230 can be read. In addition, although the stand-type scanner 200 was mentioned as an example of the imaging part 130, you may use a normal digital camera, a mobile phone camera, etc. in addition to this.

次に、画像補正部152の処理手順について詳細に説明する。なお、撮像部130で採取された画像が撮像処理部151でキャリブレーションパラメータにより補正された画像情報を入力画像とし、この入力画像があらかじめ記憶部140に格納されているものとする。この入力画像には、キャリブレーション後の照明変動や撮像部130の付近の人の存在などにより、動的な影が生じている場合がある。図3の処理フローは、このような動的な影を除去することを目的としている。各ステップの処理の内容は次のとおりである。   Next, the processing procedure of the image correction unit 152 will be described in detail. It is assumed that image information obtained by correcting the image collected by the imaging unit 130 using the calibration parameters by the imaging processing unit 151 is an input image, and the input image is stored in the storage unit 140 in advance. This input image may have a dynamic shadow due to illumination fluctuation after calibration or the presence of a person near the imaging unit 130. The processing flow of FIG. 3 aims to remove such dynamic shadows. The contents of the processing in each step are as follows.

図3に示すように、画像補正部152は、まず、画像全体を複数の部分領域に分割(ステップ300)する。一般的には、N×M画素の矩形領域に分割する。具体的には、処理の精度や速度の都合上、例えば、1つの部分領域が200×200ピクセル程度の大きさになるように分割すればよいが、他の大きさに分割してもよい。   As shown in FIG. 3, the image correction unit 152 first divides the entire image into a plurality of partial regions (step 300). In general, it is divided into rectangular areas of N × M pixels. Specifically, for the convenience of processing accuracy and speed, for example, one partial region may be divided so as to have a size of about 200 × 200 pixels, but may be divided into other sizes.

これ以降、画像補正部152は、色クラスタリング(ステップ320)と地色検出(ステップ330)の処理を、全ての部分領域に対して実行する(「ステップ310でNo→ステップ320→ステップ330」の繰り返し)。なお、部分領域への分割は必須ではなく、領域分割(ステップ300)をすることなく、入力画像全体を対象として以降の処理をしてもよい。例えば、画像自体が元々小さい場合や、画像全体にできる影が均一である確率が高い場合などは、領域分割をしなくてもよい。   Thereafter, the image correction unit 152 executes the processing of color clustering (step 320) and ground color detection (step 330) for all partial areas (“No in step 310 → step 320 → step 330”). repetition). Note that division into partial regions is not essential, and the subsequent processing may be performed on the entire input image without performing region division (step 300). For example, when the image itself is originally small, or when there is a high probability that the shadow formed in the entire image is uniform, the region division may not be performed.

画像補正部152は、各部分領域について色クラスタリングをする(ステップ320)。色クラスタリングとは、処理領域中の各画素を色空間上でクラスタリングする処理である。具体的には、各画素を色空間上にマッピングした後、ボロノイ分割やユークリッド距離の閾値などを用いて近い色同士を同じクラスタとして色空間内を領域分割することにより実現できる。そして、各クラスタにおいて、クラスタの中心に位置する色や最も頻度が高い色を、クラスタの代表色とすることができる。   The image correction unit 152 performs color clustering for each partial region (step 320). Color clustering is a process of clustering each pixel in a processing area on a color space. More specifically, after mapping each pixel on the color space, it is possible to divide the color space into regions using the Voronoi division, Euclidean distance threshold, or the like as the same clusters as the same cluster. In each cluster, the color located at the center of the cluster or the color with the highest frequency can be set as the representative color of the cluster.

ここで、図4の帳票画像例と図5の色クラスタリングの例を用いて色クラスタリングについて具体的に説明する。図4に示すカラー帳票400は、地色が紙の元の地色である白と同じである地色領域410、地色が赤で印刷されている地色領域420、地色が緑で印刷されている地色領域430を含んで構成されており、各領域内には符号440の箇所などに示す文字が記載される白地の領域がある。   Here, the color clustering will be specifically described using the form image example of FIG. 4 and the color clustering example of FIG. A color form 400 shown in FIG. 4 is printed with a ground color area 410 in which the ground color is the same as white, which is the original ground color of paper, a ground color area 420 in which the ground color is printed in red, and a ground color in green. The background color area 430 is included, and each area includes a white area in which characters indicated by reference numeral 440 and the like are written.

図5は、図4の部分領域450内の画素の色をRGB(Red(赤), Green(緑), Blue(青))色空間へマッピングした例である。RGB色空間は、RGBそれぞれの値を軸に持つ3次元空間であり、RGBの各軸の値は0から255をとる。原点(0,0,0)は黒を表し、(255,255,255)は白を表す。処理対象領域内の各画素はRGB色空間上の一点にマッピングできる。その結果、代表的な色を中心とした複数の分布ができ、それぞれをクラスタとみなすことができる。   FIG. 5 is an example in which the colors of the pixels in the partial region 450 of FIG. 4 are mapped to the RGB (Red, Green, Blue) color space. The RGB color space is a three-dimensional space having the values of RGB as axes, and the values of the axes of RGB range from 0 to 255. The origin (0, 0, 0) represents black and (255, 255, 255) represents white. Each pixel in the processing target area can be mapped to one point on the RGB color space. As a result, a plurality of distributions centered on representative colors can be formed, and each can be regarded as a cluster.

図4の部分領域450と図5の各クラスタを対応付けすると、クラスタ500がカラー帳票400の紙の地色である白の分布、クラスタ510が文字の色である黒の分布、クラスタ520が地色領域420の赤の分布、クラスタ530が地色領域430の緑の分布を表している。   When the partial area 450 in FIG. 4 and each cluster in FIG. 5 are associated with each other, the cluster 500 is a white distribution that is the paper ground color of the color form 400, the cluster 510 is a black distribution that is the character color, and the cluster 520 is the ground color. The red distribution in the color area 420 and the cluster 530 represent the green distribution in the ground color area 430.

なお、図5ではRGB色空間を利用したが、その代わりに、L*a*b*色空間やL*u*v*色空間、HSV(色相(Hue)、彩度(Saturation)、明度(Value))色空間、HSL(色相(Hue)、彩度(Saturation)、明度(Lightness))色空間などを利用してもよい。   In FIG. 5, the RGB color space is used, but instead, the L * a * b * color space, the L * u * v * color space, HSV (Hue, Saturation, Lightness ( Value)) color space, HSL (Hue, Saturation, Lightness) color space, etc. may be used.

さらに、色クラスタリングは領域内の全ての画素を利用しても、一部の画素を利用してもよい。例えば、一定間隔でサンプリングした画素を色クラスタリングに用いてもよい。さらに、この例では画素の値を直接クラスタリングの対象にしているが、CCDの特性上発生する偽色等、隣接する画素との大きな色の変動の影響を軽減するために、周辺の画素との平均値や重み付き平均値を求めて、この値を色クラスタリングに用いてもよい。   Furthermore, color clustering may use all pixels in a region or some pixels. For example, pixels sampled at regular intervals may be used for color clustering. Furthermore, in this example, pixel values are directly subject to clustering, but in order to reduce the influence of large color fluctuations with neighboring pixels, such as false colors that occur due to CCD characteristics, An average value or a weighted average value may be obtained and used for color clustering.

地色検出(ステップ330)は、色クラスタリング結果を用いて、部分領域の地色を検出する処理である。この第1実施形態では、色クラスタリングで求めたクラスタの代表色のうち、最も輝度が高い色を地色とする。なお、RGB色空間上の画素の色(RGB値)から輝度Yを算出するには、例えば、次の式(1)を用いればよい。
Y=0.299×R+0.587×G+0.114×B ・・・式(1)
The ground color detection (step 330) is a process for detecting the ground color of the partial region using the color clustering result. In the first embodiment, the color having the highest luminance among the representative colors of the clusters obtained by color clustering is set as the ground color. In order to calculate the luminance Y from the pixel color (RGB value) in the RGB color space, for example, the following equation (1) may be used.
Y = 0.299 × R + 0.587 × G + 0.114 × B (1)

ただ、この式(1)は一例であり、他の式であってもよい。このような変換式は、人間の視覚がRGB色空間上の画素の色から感じる明るさの度合いである輝度を算出するためのものであり、この式(1)に限定される理由はないからである。   However, this formula (1) is an example, and other formulas may be used. Such a conversion formula is for calculating the brightness, which is the degree of brightness that human vision perceives from the color of the pixel in the RGB color space, and there is no reason limited to this formula (1). It is.

ここで、第1実施形態で、色クラスタリングで求めたクラスタの代表色のうち、最も輝度が高い色を地色とする理由を、図4から図7を用いて説明する。図4の部分領域460から地色を判定する場合、特許文献2の技術を用いて輝度値の頻度分布をとると図6のようになる。図6では、ピーク600が文字を、ピーク610が赤い地色領域420を、ピーク620が緑の地色領域430を、突起630が紙の地色を表している。白い地色の部分は面積が小さいためピークが現出しておらず、最大輝度のピーク値を地色濃度にする手法では、緑の地色の濃度の代表値である輝度値640を地色として選択してしまう。これに対し、図4の部分領域460を色クラスタリングした結果を図7に示す。   Here, the reason why the color having the highest luminance among the representative colors of the clusters obtained by color clustering in the first embodiment is used as the ground color will be described with reference to FIGS. When the ground color is determined from the partial region 460 of FIG. 4, if the frequency distribution of luminance values is taken using the technique of Patent Document 2, the result is as shown in FIG. In FIG. 6, a peak 600 represents a character, a peak 610 represents a red ground color region 420, a peak 620 represents a green ground color region 430, and a protrusion 630 represents a paper ground color. Since the area of the white ground color has a small area, no peak appears, and in the method of setting the peak value of the maximum brightness to the ground color density, the brightness value 640, which is a representative value of the green ground color density, is used as the ground color. I will choose. In contrast, FIG. 7 shows the result of color clustering of the partial region 460 of FIG.

クラスタ700がカラー帳票400の紙の地色である白(数字「8」の領域の白)の分布、クラスタ710が文字の色(ここでは、文字の色と同等である地色領域420の枠線の色など)である黒の分布、クラスタ720が地色領域420の赤の分布、クラスタ730が地色領域430の緑の分布を表しており、白い地色領域であるクラスタ700と緑の地色領域であるクラスタ730は分離されている。第1実施形態によるクラスタの代表色の最大輝度を地色濃度とする手法では、クラスタ700の代表色の輝度値650(図6参照)が地色濃度であると判定できる。すなわち、地色検出(ステップ330)では、印刷された地色の影響を受けずに紙の地色を検出することができるという特徴がある。   The cluster 700 is a distribution of white (white in the region of the number “8”) that is the ground color of the paper of the color form 400, and the cluster 710 is a character color (here, a frame of the ground color region 420 equivalent to the character color) The distribution of black as a line color), the cluster 720 represents the red distribution of the ground color region 420, the cluster 730 represents the green distribution of the ground color region 430, and the cluster 700 as a white ground color region and the green distribution The cluster 730 that is the ground color region is separated. In the method of using the maximum luminance of the representative color of the cluster according to the first embodiment as the ground color density, it can be determined that the luminance value 650 (see FIG. 6) of the representative color of the cluster 700 is the ground color density. That is, the ground color detection (step 330) has a feature that the ground color of the paper can be detected without being influenced by the printed ground color.

図3に戻って、ステップ310でYesの後(全ての領域を処理した後)、画像補正部152は、各部分領域で求めた地色を用いて、入力画像の各画素の地色の濃度を表わす地色濃度マップを作製する(ステップ340)。ここで、地色濃度マップ作製処理の一例について、図10と図11を参照して説明する。   Returning to FIG. 3, after Yes in step 310 (after processing all the regions), the image correction unit 152 uses the ground color obtained in each partial region, and the density of the ground color of each pixel of the input image. Is created (step 340). Here, an example of the ground color density map creation process will be described with reference to FIGS. 10 and 11.

この処理は、図10に示す地色濃度マップ(補間前)から図11に示す地色濃度マップ(補間後)(以下、単に「地色濃度マップ」とも称する。)を作製することを目的とする。つまり、図10の地色濃度マップ(補間前)について、次の処理を行う。まず、各領域で求めた地色の輝度を、各領域の中心座標の地色濃度とする。次に、最小の矩形を形成する4つの中心座標(例えば、A,B,C,D)の内側に存在する画素(例えばα)の地色濃度は、その4つの中心座標の地色濃度に基づいた線形補間によって求めることができる。この処理を画像全体に対して実行することにより、図11に示す地色濃度マップ(補間後)を作製することができる。図11に示す地色濃度マップ(補間後)は、上部中央の影が濃くて全体の濃淡がなめらかな画像、つまり、現実の影を高精度で再現した画像となっている。   The purpose of this process is to create the ground color density map (after interpolation) shown in FIG. 11 (hereinafter also simply referred to as “ground color density map”) from the ground color density map (before interpolation) shown in FIG. To do. That is, the following processing is performed on the ground color density map (before interpolation) in FIG. First, the brightness of the ground color obtained in each area is set as the ground color density of the center coordinates of each area. Next, the background color density of the pixel (for example, α) existing inside the four center coordinates (for example, A, B, C, D) forming the smallest rectangle is changed to the background color density of the four center coordinates. It can be determined by linear interpolation based on it. By executing this process on the entire image, the ground color density map (after interpolation) shown in FIG. 11 can be created. The ground color density map (after interpolation) shown in FIG. 11 is an image in which the shadow at the upper center is dark and the overall shade is smooth, that is, an image in which an actual shadow is reproduced with high accuracy.

この他の手法としては、領域の中心座標の地色濃度から、多項式近似によって画像全体の地色濃度の近似曲面を求めることもできる。さらに、その他の手法として、各領域で求めた地色の輝度を各領域の中心座標とするのではなく、領域内で最もその色と近い色の画素の座標での地色濃度として、線形補間や近似曲面を求めることで地色濃度マップを作製することもできる。   As another method, an approximate curved surface of the ground color density of the entire image can be obtained from the ground color density of the center coordinates of the region by polynomial approximation. Furthermore, as another method, instead of using the brightness of the ground color obtained in each area as the center coordinates of each area, linear interpolation is performed as the ground color density at the coordinates of the pixel closest to that color in the area. Alternatively, a ground color density map can be created by obtaining an approximate curved surface.

図3に戻って、ステップ340の後、画像補正部152は、地色濃度マップに基づいて、画素値補正の必要の判定(ステップ360)、画素値補正(ステップ370)、および補正値セット(記録)(ステップ380)の処理を、全ての画素について行う(「ステップ350でNo→ステップ360→(ステップ370→)ステップ380」の繰り返し)。
画素値補正の必要の判定(ステップ360)では、例えば、地色濃度マップの輝度値が所定の基準値以下であれば、画素値補正が必要(Yes)であると判定する。
Returning to FIG. 3, after step 340, the image correction unit 152 determines whether or not pixel value correction is necessary based on the ground color density map (step 360), pixel value correction (step 370), and correction value set ( The process of (recording) (step 380) is performed for all the pixels (“No in step 350 → step 360 → (step 370 →) step 380”).
In the determination of necessity of pixel value correction (step 360), for example, if the luminance value of the ground color density map is equal to or smaller than a predetermined reference value, it is determined that pixel value correction is necessary (Yes).

画素値補正(ステップ370)では、地色が濃いほど影が濃いものとして画像における各画素値から影を除去する補正を行う。具体的には、地色濃度マップの輝度値と入力画像のRGB値から補正後のRGB値を求める。補正方法の一例として、線形コントラスト補正について説明する。   In the pixel value correction (step 370), correction is performed to remove the shadow from each pixel value in the image, assuming that the darker the background color, the darker the shadow. Specifically, the corrected RGB value is obtained from the luminance value of the ground color density map and the RGB value of the input image. As an example of the correction method, linear contrast correction will be described.

線形コントラスト補正とは、画像中の処理領域内の画素の明るさ(輝度値)の最大値と最小値の差を拡大する処理である。例えば、入力の最大値をXmaxとし、補正後の最大値を255とすると、0〜Xmaxの入力を0〜255に伸張する。線形コントラスト補正の例として、画素のRGBのそれぞれの値を次の式(2)を用いて補正する方式がある。式(2)では、Xを入力画像の画素のRGB値、Xcを補正画像の画素のRGB値、Ysを当該画素の地色の輝度値(濃度)、αを補正パラメータとする。式(2)は、α・Ysの値に応じて入力画像の画素のRGB値を補正するものである。また、min()は、()内の複数の値のうち最小のものを選択するという意味である。つまり、補正値の最大値を255とする。
Xc=min(255×X/(α・Ys),255) ・・・式(2)
The linear contrast correction is a process for enlarging the difference between the maximum value and the minimum value of the brightness (luminance value) of the pixels in the processing area in the image. For example, if the maximum input value is Xmax and the corrected maximum value is 255, the input of 0 to Xmax is expanded to 0 to 255. As an example of linear contrast correction, there is a method of correcting each value of RGB of a pixel using the following equation (2). In Equation (2), X is the RGB value of the pixel of the input image, Xc is the RGB value of the pixel of the corrected image, Ys is the luminance value (density) of the ground color of the pixel, and α is the correction parameter. Expression (2) corrects the RGB value of the pixel of the input image according to the value of α · Ys. Further, min () means that the smallest one of a plurality of values in () is selected. That is, the maximum correction value is 255.
Xc = min (255 × X / (α · Ys), 255) (2)

補正パラメータαは地色のバラつきを吸収するためのパラメータであり、0以上1以下の値をとる。αの値は、小さいほど補正後の画像が明るくなるという特性を持つ。αを用いる理由は、クラスタ内の地色のバラつきの影響を軽減するためである。クラスタ内の地色にはバラつきがあるため、クラスタの代表色をそのまま補正に用いた場合、クラスタ内と判定されていても地色濃度が代表色よりも低輝度の画素では影が薄く残る場合がある。αを1未満の値にすると、代表色よりも低い値を基準に画素値を補正することができるため、バラついた地色でも影を残さずに補正できる。
なお、コントラスト補正は、入力画像の画素の輝度値や地色濃度に応じて非線形に変換することで行ってもよい。
The correction parameter α is a parameter for absorbing ground color variations, and takes a value of 0 or more and 1 or less. As the value of α is smaller, the corrected image becomes brighter. The reason for using α is to reduce the influence of variations in ground color in the cluster. Since the ground color in the cluster varies, if the representative color of the cluster is used as it is for correction, even if it is determined to be in the cluster, the shadow remains light in pixels where the ground color density is lower than the representative color. There is. When α is set to a value less than 1, the pixel value can be corrected based on a value lower than the representative color, so that even a ground color that is uneven can be corrected without leaving a shadow.
Note that the contrast correction may be performed by non-linear conversion according to the luminance value or ground color density of the pixel of the input image.

最後に、画素値セット(ステップ380)では、ステップ370で補正した画素値を補正画像の画素値として格納する。補正されない画素は入力画像の画素値を格納する。   Finally, in the pixel value set (step 380), the pixel value corrected in step 370 is stored as the pixel value of the corrected image. The pixel that is not corrected stores the pixel value of the input image.

このように、第1実施形態の画像補正装置100によれば、主に色クラスタリングと地色濃度マップによって、被写体を撮像して得られたカラー画像における動的な影を適切に除去することができる。その結果、照明条件が変わるごとにキャリブレーションすることなく輝度ムラのない画像を生成することができ、使い勝手の向上を図ることができる。   As described above, according to the image correction apparatus 100 of the first embodiment, dynamic shadows in a color image obtained by imaging a subject can be appropriately removed mainly by color clustering and a ground color density map. it can. As a result, it is possible to generate an image having no luminance unevenness without calibration each time the illumination condition changes, and it is possible to improve usability.

(第2実施形態)
第2実施形態では、第1実施形態における図3の地色検出(ステップ330)の別の実現形態について説明する。第2実施形態の地色検出処理は、まず、部分領域で色クラスタリングしてから地色を検出し、隣接する前記部分領域の地色間の色差または輝度差を評価し、着目した前記部分領域について、隣接する2つ以上の前記部分領域と前記色差または前記輝度差が所定以上に大きい場合には、前記検出された地色を破棄し、隣接する前記部分領域から補間処理で求めた値を当該部分領域の地色とする。
(Second Embodiment)
In the second embodiment, another implementation of the ground color detection (step 330) in FIG. 3 in the first embodiment will be described. In the ground color detection process of the second embodiment, first, color clustering is performed on partial areas, ground colors are detected, color differences or luminance differences between adjacent partial areas are evaluated, and the focused partial areas When the color difference or the luminance difference between two or more adjacent partial areas is larger than a predetermined value, the detected ground color is discarded, and a value obtained by interpolation processing from the adjacent partial areas is calculated. The ground color of the partial area is used.

この第2実施形態の手法は、図4の部分領域470のように、部分領域中に紙の地色(白色)領域を含まず、地色が緑である地色領域430の地色のみを含む場合などに、過度の補正がかかるという問題を解決することを目的としている。過度の補正がかかる理由は、印刷された色付きの地色領域の輝度値を地色として検出し、それが実際の地色の輝度よりも低い値だからである。   In the method of the second embodiment, as in the partial area 470 of FIG. 4, the ground color (white) area of the paper is not included in the partial area, and only the ground color of the ground color area 430 whose ground color is green is used. The purpose is to solve the problem that excessive correction is applied. The reason why excessive correction is applied is that the brightness value of the printed ground color area is detected as the ground color and is lower than the actual brightness of the ground color.

また、第1実施形態における図3の地色検出(ステップ330)の別の実現形態として、部分領域中の色クラスタリング結果から、最大頻度のクラスタの代表色の輝度を地色濃度とすることも可能である。   As another implementation form of the ground color detection (step 330) in FIG. 3 in the first embodiment, the brightness of the representative color of the cluster with the highest frequency is used as the ground color density from the color clustering result in the partial region. Is possible.

(第3実施形態)
第3実施形態では、第1実施形態における図3の画素値補正(ステップ370)の別の実現形態について説明する。第3実施形態では、色クラスタリング結果から文字色を検出し、文字色の画素値補正とその他の画素値補正を異ならせる。具体的には、文字の色と判断されたクラスタ内の画素は、補正量をその他の画素値補正量よりも少なくする、もしくは補正しないという処理をする。
(Third embodiment)
In the third embodiment, another implementation of the pixel value correction (step 370) in FIG. 3 in the first embodiment will be described. In the third embodiment, the character color is detected from the color clustering result, and the pixel value correction for the character color is different from the other pixel value correction. Specifically, the pixel in the cluster determined to be the character color is processed so that the correction amount is made smaller than other pixel value correction amounts or not corrected.

この処理の目的は、補正後も文字の画素の輝度値を高くし過ぎないようにすることである。文字の画素の輝度値を高くし過ぎると、二値化処理によって文字がかすれてしまい、文字認識処理に悪影響を及ぼすためである。文字の色のクラスタの判定の一例としては、色の鮮やかさの指標である彩度(S)と明るさの指標である明度(V)が基準を満たすか否かによって行うことができる。この理由は、一般に文字の色は黒または黒に近い色であり、彩度も明度も低いためである。   The purpose of this processing is to prevent the luminance value of the character pixels from being too high after correction. This is because if the luminance value of the character pixel is excessively high, the character is faded by the binarization process, which adversely affects the character recognition process. As an example of the determination of the character color cluster, it can be performed based on whether the saturation (S), which is an index of color vividness, and the brightness (V), which is an index of brightness, satisfy a criterion. This is because the color of characters is generally black or a color close to black and has low saturation and lightness.

(第4実施形態)
第4実施形態では、第1実施形態における図3の地色検出(ステップ330)の別の実現形態について説明する。
第4実施形態では、まず、部分領域中で色クラスタリングしてから地色を検出する。検出された地色の輝度値が紙の地色と同等であると判断された場合に、紙の地色B0と、画素の頻度(数)があらかじめ定めた基準以上となるクラスタの代表色Bi(i=1〜n)を全て記憶しておく。なお、画素の頻度(数)が基準未満のクラスタの代表色を記憶しないのは、ノイズ除去のためである。ここで記憶した色Biは、帳票上に印刷や記載された色を、影がない状況で撮像した色であると仮定できる。具体的には、例えば、B0が影のない白色であり、B1が黒、B2が赤、B3が緑であった場合である。
(Fourth embodiment)
In the fourth embodiment, another implementation of the ground color detection (step 330) of FIG. 3 in the first embodiment will be described.
In the fourth embodiment, first, the background color is detected after color clustering in the partial region. When it is determined that the luminance value of the detected ground color is equal to the ground color of the paper, the ground color B0 of the paper and the representative color Bi of the cluster whose pixel frequency (number) is equal to or greater than a predetermined reference. All (i = 1 to n) are stored. The reason why the representative color of the cluster whose pixel frequency (number) is less than the reference is not stored is to remove noise. The color Bi stored here can be assumed to be a color obtained by capturing the color printed or described on the form in a situation where there is no shadow. Specifically, for example, B0 is white with no shadow, B1 is black, B2 is red, and B3 is green.

次に、別の部分領域で地色Bkを検出する。Bkの輝度が低く、この領域に影があり、かつ、Bkが紙の地色でないと判断できる場合には、BkをB0〜Bnと比較して、Bkに最も近い色を求める。この比較には、色の種類の指標である色相(H)や、明度(V)などを用いることができる。Bkは影により実際の色よりも明度が低下していると考えられる。そこで、判断基準の例としては、Bkの明度がBiの明度より低く、BkとBiの色相差が基準以内である場合に、BkはBiの色が影によって暗くなったと色であると判定する。なお、明るさの判定基準としては明度(V)のほかに、輝度(Y)やHSL色空間の明度(L)などを用いてもよい。   Next, the ground color Bk is detected in another partial area. If the brightness of Bk is low, there is a shadow in this area, and it can be determined that Bk is not the paper ground color, Bk is compared with B0 to Bn, and the color closest to Bk is obtained. For this comparison, hue (H), brightness (V) or the like, which is an index of the type of color, can be used. It is considered that the brightness of Bk is lower than the actual color due to the shadow. Therefore, as an example of a determination criterion, when the brightness of Bk is lower than the brightness of Bi and the hue difference between Bk and Bi is within the reference, it is determined that Bk is a color when the color of Bi is darkened by a shadow. . In addition to brightness (V), brightness (Y), HSL color space brightness (L), or the like may be used as a brightness criterion.

具体的には、例えば、Bkが実際に赤で影をともなっている場合、BkはB2と色相差が基準以内であることから赤であると判断でき、また、BkとB2の明度もしくは輝度を比較することで影の程度がわかる。   Specifically, for example, when Bk is actually red and shaded, it can be determined that Bk is red because the hue difference from B2 is within the reference, and the brightness or luminance of Bk and B2 is determined. By comparing, the degree of shadow is known.

このような場合、式(2)で用いる地色濃度Ysは、当該部分領域の地色Bkの地色濃度Ykをそのまま利用するのではなく、Biの輝度値YiとB0の輝度値Y0を利用して次の式(3)により求めることができる。
Ys=(Y0/Yi)Yk ・・・式(3)
In such a case, the ground color density Ys used in Expression (2) does not use the ground color density Yk of the ground color Bk of the partial area as it is, but uses the brightness value Yi of Bi and the brightness value Y0 of B0. Then, it can be obtained by the following equation (3).
Ys = (Y0 / Yi) Yk (3)

式(3)は、検出した色付き領域の地色の輝度から紙の地色の輝度を求めることを示す。これにより、部分領域から検出した地色が紙の地色でない場合でも、適切に輝度を補正することができる。   Expression (3) indicates that the luminance of the ground color of the paper is obtained from the luminance of the ground color of the detected colored region. Thereby, even when the ground color detected from the partial area is not the ground color of the paper, the luminance can be corrected appropriately.

(第5実施形態)
第5実施形態では、画像補正だけでなく文字認識も行うことができる画像処理装置の例を説明する。図8は、第1実施形態から第4実施形態のいずれかの画像補正装置100の機能を持つ画像処理装置800を示す構成図の例である。
(Fifth embodiment)
In the fifth embodiment, an example of an image processing apparatus capable of performing not only image correction but also character recognition will be described. FIG. 8 is an example of a configuration diagram illustrating an image processing apparatus 800 having a function of the image correction apparatus 100 according to any one of the first to fourth embodiments.

図8に示すように、画像処理装置800は、制御部810に文字認識部811が追加されている以外は、図1に示す画像補正装置100と同様の構成であるので、重複説明を適宜省略する。文字認識部811は、画像補正によって生成した画像から文字認識処理をする。   As shown in FIG. 8, the image processing apparatus 800 has the same configuration as that of the image correction apparatus 100 shown in FIG. 1 except that a character recognition unit 811 is added to the control unit 810, and thus redundant description is omitted as appropriate. To do. The character recognition unit 811 performs character recognition processing from an image generated by image correction.

文字認識部811は、例えば、図4の地色領域420を含む画像から、文字(数字)として「1」、「2」、「3」、「4」、「5」を認識する。文字認識部811の主な処理のうち、文字の位置を検出する処理は、あらかじめ帳票上の文字の位置を指定しておいた帳票定義情報を用いて画像中から切出すことができる。また、画像中の枠を検出して文字を検出することもできる。個々の文字を認識する処理は、パターン認識の既存手法を用いることができる。なお、文字認識の前処理として、画像の二値化処理を実行してもよい。   For example, the character recognition unit 811 recognizes “1”, “2”, “3”, “4”, and “5” as characters (numbers) from the image including the ground color region 420 of FIG. Among the main processes of the character recognition unit 811, the process of detecting the position of the character can be cut out from the image using the form definition information in which the position of the character on the form is specified in advance. It is also possible to detect characters by detecting a frame in the image. The process for recognizing individual characters can use an existing method of pattern recognition. Note that image binarization processing may be executed as character recognition preprocessing.

(第6実施形態)
第6実施形態では、第1実施形態から第4実施形態のいずれかの画像補正装置100を利用した、金融機関の営業店窓口に設置される営業店窓口端末装置について説明する。図9に示すように、営業店窓口端末装置900は、操作部110(図1と同様)と、表示部120(図1と同様)と、スタンド型スキャナなどの撮像部130(図1と同様)と、利用者との授受のための現金を取り扱う現金入出金部910と、通帳に取引内容を印字する通帳プリンタ部920と、レシートなどに印字するプリンタ部930と、端末記憶部940とこれらを制御する端末制御部950とを有する。なお、端末制御部950は図1の制御部150に対応し、端末記憶部940は図1の記憶部140に対応する。
(Sixth embodiment)
In the sixth embodiment, a branch office window terminal device installed at a bank counter of a financial institution using the image correction apparatus 100 according to any one of the first to fourth embodiments will be described. As shown in FIG. 9, the sales office window terminal device 900 includes an operation unit 110 (similar to FIG. 1), a display unit 120 (similar to FIG. 1), and an imaging unit 130 such as a stand-type scanner (similar to FIG. 1). ), A cash deposit / withdrawal unit 910 that handles cash for exchange with the user, a passbook printer unit 920 that prints transaction contents on a passbook, a printer unit 930 that prints on receipts, a terminal storage unit 940, and the like And a terminal control unit 950 for controlling. The terminal control unit 950 corresponds to the control unit 150 in FIG. 1, and the terminal storage unit 940 corresponds to the storage unit 140 in FIG.

以下、営業店窓口端末装置900を利用した業務フローについて説明する。営業店窓口端末装置900は、利用者から取引科目別の取引帳票を受け取ったオペレータが、帳票と対応する取引データ入力画面を呼び出すための画面番号を操作部110から入力し、表示部120である端末画面に表示された取引画面の各入力フィールドに取引金額等、帳票上の記入データをキーボード入力することにより、目的の取引を実行する。   Hereinafter, a business flow using the sales office window terminal device 900 will be described. The sales office window terminal device 900 is a display unit 120, in which an operator who receives a transaction form for each transaction item from a user inputs a screen number for calling a transaction data input screen corresponding to the form from the operation unit 110. The target transaction is executed by inputting the entry data on the form such as the transaction amount into each input field of the transaction screen displayed on the terminal screen.

さらに、端末制御部950は、撮像部130であるスタンド型スキャナによって採取した取引帳票の特定個所の画像について影を除去する補正を行い、その補正後の画像に基づいてOCR(Optical Character Recognition)機能により記載内容を読取り、取引内容の確認画面を表示部120に表示する。この場合、取引内容の確認画面には、帳票からOCRで読取られた各データ項目の内容、例えば、店番、口座番号、入金額などが表示され、確認画面の表示データに問題がなければ、これらのデータが記録データとして管理装置に送信処理される。   Further, the terminal control unit 950 performs a correction for removing a shadow on an image of a specific part of the transaction form collected by the stand type scanner that is the imaging unit 130, and an OCR (Optical Character Recognition) function based on the corrected image. The description is read out, and a transaction confirmation screen is displayed on the display unit 120. In this case, the transaction details confirmation screen displays the contents of each data item read from the form by OCR, for example, the store number, account number, deposit amount, etc. Are transmitted to the management apparatus as recording data.

このように、営業店窓口端末装置900によれば、撮像部130によって採取した画像上に照明変動などによる動的な影が発生しても、その影を除去する補正をすることができ、OCR処理の精度向上をはかることができる。   As described above, according to the sales office window terminal device 900, even when a dynamic shadow due to illumination variation or the like occurs on the image collected by the imaging unit 130, the shadow can be corrected to be removed, and the OCR can be corrected. The processing accuracy can be improved.

100 画像補正装置
110 操作部
120 表示部
130 撮像部
140 記憶部
150 制御部
151 撮像処理部
152 画像補正部
200 スタンド型スキャナ
210 カメラヘッド
220 支柱
230 原稿台
240 原稿
800 画像処理装置
810 制御部
811 文字認識部
900 営業店窓口端末装置
910 現金入出金部
920 通帳プリンタ部
930 プリンタ部
940 端末記憶部
950 端末制御部
DESCRIPTION OF SYMBOLS 100 Image correction apparatus 110 Operation part 120 Display part 130 Image pick-up part 140 Storage part 150 Control part 151 Image pick-up process part 152 Image correction part 200 Stand type scanner 210 Camera head 220 Column 230 Manuscript stand 240 Manuscript 800 Image processing apparatus 810 Control part 811 Character Recognition unit 900 Sales office window terminal device 910 Cash deposit / withdrawal unit 920 Passbook printer unit 930 Printer unit 940 Terminal storage unit 950 Terminal control unit

Claims (7)

被写体を非接触型スキャナで撮像して得られたカラー画像から影を除去する補正を行う画像補正装置であって、
前記カラー画像、および、複数の代表色から前記被写体の地色を検出するための所定の判定基準を記憶する記憶部と、
前記カラー画像を複数の部分領域に分割した後、前記部分領域それぞれについて、
画素を色空間上でクラスタリングする処理である色クラスタリングを行い、
前記色クラスタリングの結果を用いて各クラスタの代表色を求め、前記所定の判定基準によって、その求めた代表色のうちのいずれかを地色として検出し、
前記検出した部分領域それぞれの地色に基づいて、前記被写体に対応する画像領域全体の地色濃度を示す地色濃度マップを作製し、
前記地色濃度マップを用いて、地色が濃いほど影が濃いものとして前記カラー画像における各画素値から影を除去する補正を行い、
前記補正を行った画素値を前記記憶部に格納する画像補正部と、
を備えることを特徴とする画像補正装置。
An image correction apparatus that performs correction to remove a shadow from a color image obtained by imaging a subject with a non-contact scanner,
A storage unit for storing predetermined determination criteria for detecting the background color of the subject from the color image and a plurality of representative colors;
After dividing the color image into a plurality of partial areas, for each of the partial areas,
Perform color clustering, which is a process of clustering each pixel in the color space,
Determined representative color of each cluster using the results of the color clustering by the predetermined criteria to detect any of the determined representative color as a background color,
Based on the ground color of each of the detected partial areas , create a ground color density map showing the ground color density of the entire image area corresponding to the subject,
Using the background color density map, the shadow is darker as the background color is darker, and correction is performed to remove the shadow from each pixel value in the color image,
An image correction unit that stores the corrected pixel value in the storage unit;
An image correction apparatus comprising:
前記所定の判定基準は、前記部分領域について求めた各クラスタの代表色のうち、輝度が最も高い色を前記部分領域の地色とすることであることを特徴とする請求項1に記載の画像補正装置。 Wherein the predetermined criterion, of the representative color of each cluster obtained for the partial region image according to claim 1, characterized in that it is to the highest color intensity and background color of the partial region Correction device. 前記画像補正部は、
記部分領域それぞれについて、前記色クラスタリングしてから前記地色を検出するとき
隣接する前記部分領域の地色間の色差または輝度差を評価し、
着目した前記部分領域について、隣接する2つ以上の前記部分領域と前記色差または前記輝度差が所定以上に大きい場合には、前記検出された地色を破棄し、隣接する前記部分領域から補間処理で求めた値を当該着目した部分領域の地色とする
ことを特徴とする請求項1または請求項2に記載の画像補正装置。
The image correction unit
For each pre-Symbol subregion, when detecting the background color from the above color clustering,
Evaluate the color difference or brightness difference between the ground colors of the adjacent partial areas,
If the color difference or the luminance difference between two or more adjacent partial areas is larger than a predetermined value for the focused partial area, the detected ground color is discarded and interpolation processing is performed from the adjacent partial areas. The image correction apparatus according to claim 1, wherein the value obtained in step 1 is used as a ground color of the focused partial area.
前記画像補正部は、
前記カラー画像における各画素値から影を除去する補正を行うとき、
彩度または明度の指標を用いて前記色クラスタリングの結果から文字色を検出し、
前記文字色の画素値補正を、文字色の画素と判断されなかった画素の画素値補正よりも小さく行うか、あるいはまったく行わない
ことを特徴とする請求項1から請求項3のいずれか1項に記載の画像補正装置。
The image correction unit
When performing correction to remove a shadow from each pixel value in the color image,
Detect text color from the result of the color clustering using the saturation or brightness index,
The pixel value correction of the character color is performed smaller than the pixel value correction of a pixel that has not been determined to be a character color pixel , or is not performed at all. The image correction apparatus described in 1.
前記画像補正部は、
前記カラー画像における各画素値から影を除去する補正を行うとき、
前記代表色の輝度値から影がないと判断した前記部分領域で検出されたクラスタにおける複数の代表色を前記記憶部に記憶させ、
前記代表色の輝度値から影があると判断した前記部分領域で検出された地色と、前記記憶したクラスタの複数の代表色とを比較し、色相または明度の指標から、前記検出された地色と最も近い前記代表色を選択し、
前記影がないと判断した前記部分領域の地色と、前記選択された色と、前記検出された当該部分領域の地色とに基づいて、前記検出された当該部分領域における各画素値から影を除去する補正を行う
ことを特徴とする請求項1から請求項4のいずれか1項に記載の画像補正装置。
The image correction unit
When performing correction to remove a shadow from each pixel value in the color image,
A plurality of representative colors in the cluster detected in the partial area determined to have no shadow from the luminance value of the representative color are stored in the storage unit,
The ground color detected in the partial area determined to have a shadow from the luminance value of the representative color is compared with a plurality of representative colors of the stored cluster, and the detected ground color is determined from an index of hue or brightness. Select the representative color closest to the color,
Based on the ground color of the partial area determined to have no shadow, the selected color, and the ground color of the detected partial area, shadows are detected from the pixel values in the detected partial area. The image correction apparatus according to claim 1, wherein correction for removing the image is performed.
被写体を非接触型スキャナで撮像して得られたカラー画像から影を除去する補正を行う画像補正装置であって、
前記カラー画像、および、複数の代表色から前記被写体の地色を検出するための所定の判定基準を記憶する記憶部と、
前記カラー画像を複数の部分領域に分割した後、前記部分領域それぞれについて、
画素を色空間上でクラスタリングする処理である色クラスタリングを行い、
前記色クラスタリングの結果を用いて各クラスタの代表色を求め、前記所定の判定基準によって、その求めた代表色のうちのいずれかを地色として検出し、
前記検出した部分領域それぞれの地色に基づいて、前記被写体に対応する画像領域全体の地色濃度を示す地色濃度マップを作製し、
前記地色濃度マップを用いて、地色が濃いほど影が濃いものとして前記カラー画像における各画素値から影を除去する補正を行い、
前記補正を行った画素値を前記記憶部に格納する画像補正部と、
前記記憶部に格納した画素値に基づいて文字認識を行う文字認識部と、
を備えることを特徴とする画像補正装置。
An image correction apparatus that performs correction to remove a shadow from a color image obtained by imaging a subject with a non-contact scanner,
A storage unit for storing predetermined determination criteria for detecting the background color of the subject from the color image and a plurality of representative colors;
After dividing the color image into a plurality of partial areas, for each of the partial areas,
Perform color clustering, which is a process of clustering each pixel in the color space,
Determined representative color of each cluster using the results of the color clustering by the predetermined criteria to detect any of the determined representative color as a background color,
Based on the ground color of each of the detected partial areas , create a ground color density map showing the ground color density of the entire image area corresponding to the subject,
Using the background color density map, the shadow is darker as the background color is darker, and correction is performed to remove the shadow from each pixel value in the color image,
An image correction unit that stores the corrected pixel value in the storage unit;
A character recognition unit that performs character recognition based on pixel values stored in the storage unit;
An image correction apparatus comprising:
被写体を非接触型スキャナで撮像して得られたカラー画像から影を除去する補正を行う画像補正装置による画像補正方法であって、
前記画像補正装置は、前記カラー画像、および、複数の代表色から前記被写体の地色を検出するための所定の判定基準を記憶する記憶部と、画像補正部と、を備えており、
前記画像補正部は、
前記カラー画像を複数の部分領域に分割した後、前記部分領域それぞれについて、
画素を色空間上でクラスタリングする処理である色クラスタリングを行い、
前記色クラスタリングの結果を用いて各クラスタの代表色を求め、前記所定の判定基準によって、その求めた代表色のうちのいずれかを地色として検出し、
前記検出した部分領域それぞれの地色に基づいて、前記被写体に対応する画像領域全体の地色濃度を示す地色濃度マップを作製し、
前記地色濃度マップを用いて、地色が濃いほど影が濃いものとして前記カラー画像における各画素値から影を除去する補正を行い、
前記補正を行った画素値を前記記憶部に格納する
ことを特徴とする画像補正方法。
An image correction method by an image correction apparatus that performs correction to remove a shadow from a color image obtained by imaging a subject with a non-contact scanner,
The image correction apparatus includes the storage unit that stores the color image and a predetermined criterion for detecting the ground color of the subject from a plurality of representative colors, and an image correction unit.
The image correction unit
After dividing the color image into a plurality of partial areas, for each of the partial areas,
Perform color clustering, which is a process of clustering each pixel in the color space,
Determined representative color of each cluster using the results of the color clustering by the predetermined criteria to detect any of the determined representative color as a background color,
Based on the ground color of each of the detected partial areas , create a ground color density map showing the ground color density of the entire image area corresponding to the subject,
Using the background color density map, the shadow is darker as the background color is darker, and correction is performed to remove the shadow from each pixel value in the color image,
An image correction method, wherein the corrected pixel value is stored in the storage unit.
JP2010238900A 2010-10-25 2010-10-25 Image correction apparatus and image correction method Expired - Fee Related JP5608511B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010238900A JP5608511B2 (en) 2010-10-25 2010-10-25 Image correction apparatus and image correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010238900A JP5608511B2 (en) 2010-10-25 2010-10-25 Image correction apparatus and image correction method

Publications (2)

Publication Number Publication Date
JP2012095002A JP2012095002A (en) 2012-05-17
JP5608511B2 true JP5608511B2 (en) 2014-10-15

Family

ID=46387897

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010238900A Expired - Fee Related JP5608511B2 (en) 2010-10-25 2010-10-25 Image correction apparatus and image correction method

Country Status (1)

Country Link
JP (1) JP5608511B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6030890B2 (en) * 2012-08-28 2016-11-24 日立オムロンターミナルソリューションズ株式会社 Image processing unit, image processing method, and stand type scanner
US8837867B2 (en) * 2012-12-07 2014-09-16 Realnetworks, Inc. Method and system to detect and select best photographs
JP6624827B2 (en) 2015-07-13 2019-12-25 キヤノン株式会社 Information processing apparatus, information processing method, and computer program
JP6584179B2 (en) 2015-07-13 2019-10-02 キヤノン株式会社 Information processing apparatus, information processing method, and computer program
JP6503308B2 (en) * 2016-02-18 2019-04-17 富士通フロンテック株式会社 Image processing apparatus and image processing method
JP6294524B1 (en) * 2017-02-15 2018-03-14 ソフネック株式会社 Image processing method and computer program
KR102014217B1 (en) * 2018-01-19 2019-08-26 주식회사 한글과컴퓨터 Method for correcting distortion of shade and apparatus using the same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0993445A (en) * 1995-09-20 1997-04-04 Fuji Xerox Co Ltd Image processor
JPH0997309A (en) * 1995-09-28 1997-04-08 Glory Ltd Character extracting device
JP3467725B2 (en) * 1998-06-02 2003-11-17 富士通株式会社 Image shadow removal method, image processing apparatus, and recording medium

Also Published As

Publication number Publication date
JP2012095002A (en) 2012-05-17

Similar Documents

Publication Publication Date Title
JP5608511B2 (en) Image correction apparatus and image correction method
JP4926568B2 (en) Image processing apparatus, image processing method, and image processing program
US9769354B2 (en) Systems and methods of processing scanned data
US9036223B2 (en) Systems and methods for edge detection during an imaging operation
JP5547243B2 (en) Image processing apparatus, program, and recording medium
US7680325B2 (en) Image processing method of detecting a correspondence between colors, image processing apparatus and program for detecting a correspondence between colors
US11308318B2 (en) Image processing apparatus, image processing method, and storage medium
JP5810628B2 (en) Image processing apparatus and image processing program
JP2005310068A (en) Method for correcting white of eye, and device for executing the method
WO2007127085A1 (en) Generating a bitonal image from a scanned colour image
CN110536040A (en) The method and medium for carrying out the image processing apparatus for cutting processing more, generating image
CN107566684A (en) Image processing apparatus, image processing method and storage medium
JP2017046342A (en) Image processing system and image processing method
JP5782838B2 (en) Image processing apparatus and image processing program
US20090244608A1 (en) Image-Output Control Device, Method of Controlling Image-Output, Program for Controlling Image-Output, and Printing Device
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
CN108965646A (en) Image processing apparatus, image processing method and storage medium
JP5870745B2 (en) Image processing apparatus, binarization threshold value calculation method, and computer program
JP5887242B2 (en) Image processing apparatus, image processing method, and program
JP2017146856A (en) Image processing device and image processing method
CN109510916B (en) Scanner, method for producing scanned data, and recording medium
US20090244570A1 (en) Face image-output control device, method of controlling output of face image, program for controlling output of face image, and printing device
JP2005260657A (en) Photographing apparatus, image processing method and program therefor
KR20080034757A (en) Image forming apparatus and image forming method
JP2007249802A (en) Image processor and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130516

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140424

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140603

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140725

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140901

R150 Certificate of patent or registration of utility model

Ref document number: 5608511

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140825

LAPS Cancellation because of no payment of annual fees