JP4321666B2 - Image data correction device - Google Patents

Image data correction device Download PDF

Info

Publication number
JP4321666B2
JP4321666B2 JP2008307824A JP2008307824A JP4321666B2 JP 4321666 B2 JP4321666 B2 JP 4321666B2 JP 2008307824 A JP2008307824 A JP 2008307824A JP 2008307824 A JP2008307824 A JP 2008307824A JP 4321666 B2 JP4321666 B2 JP 4321666B2
Authority
JP
Japan
Prior art keywords
luminance
image
image data
correction
block
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
JP2008307824A
Other languages
Japanese (ja)
Other versions
JP2009050032A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2008307824A priority Critical patent/JP4321666B2/en
Publication of JP2009050032A publication Critical patent/JP2009050032A/en
Application granted granted Critical
Publication of JP4321666B2 publication Critical patent/JP4321666B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、帳票を読み取って得た画像データの輝度を補正する画像データ補正装置に関するものである。   The present invention relates to an image data correction apparatus for correcting the brightness of image data obtained by reading a form.

従来、OCR(文字読取装置)等では、読み取り対象の帳票に光を照射し、反射した光の強度をCCD(電荷結合素子)センサ等で読み取り、読み取った光のレベルを所定の閾値で2値化して文字認識等の処理を行うようにしている。   Conventionally, in an OCR (character reading device) or the like, a form to be read is irradiated with light, the intensity of the reflected light is read by a CCD (charge coupled device) sensor or the like, and the level of the read light is binary with a predetermined threshold value. To perform processing such as character recognition.

特開平8−251402号公報JP-A-8-251402

しかしながら、従来のOCR等では、次のような課題があった。
例えば、ディジタルカメラ等のCCDセンサを使用して帳票を読み取る場合、外来光等の影響によって帳票から反射される光の強度が変化し、このCCDセンサで検出される光のレベルが全体にずれ、正しく2値化できなくなることがあった。また、帳票の一部に影が入り込んで、部分的に読み取り誤りが生ずるという場合もあった。
However, the conventional OCR and the like have the following problems.
For example, when reading a form using a CCD sensor such as a digital camera, the intensity of light reflected from the form changes due to the influence of extraneous light, etc., and the level of light detected by this CCD sensor shifts as a whole, In some cases, binarization could not be performed correctly. In some cases, a shadow may enter a part of the form, resulting in partial reading errors.

本発明は、前記従来技術が持っていた課題を解決し、帳票を読み取って得た画像データの輝度の分布を所定のレベルに補正する画像データ補正装置を提供するものである。   The present invention solves the problems of the prior art and provides an image data correction apparatus that corrects the luminance distribution of image data obtained by reading a form to a predetermined level.

前記課題を解決するために、本発明は、画像データ補正装置において、読み取り対象の帳票を画素に分解して光学的に読み取り、該帳票上の各画素座標(x,y)の画素の輝度k(x,y)を画像データとして画像メモリに格納する画像読取手段と、前記画像データを縦m画素、横n画素からなる複数の矩形の画像ブロックに分割し、各画像ブロック中の画素の最大輝度をその画像ブロックの中心座標(X,Y)の輝度P(X,Y)とするブロック画像データを生成するブロック画像生成手段と、前記画像メモリに格納された画素の輝度k(x,y)を、前記ブロック画像データの内で該画素を取り囲む4個の画像ブロックの中心座標の輝度P1(Xa,Ya),P2(Xa,Yb),P3(Xb,Ya),P4(Xb,Yb)及び予め定められた基準輝度Mを使用して次式、K(x,y)=k(x,y)+M−{(Xb−x)(Yb−y)P1+(Xb−x)(y−Ya)P2+(x−Xa)(Yb−y)P3+(x−Xa)(y−Ya)P4}/{(Xb−Xa)(Yb−Ya)}に従って補正して補正輝度K(x,y)を算出する輝度補正手段とを備えている。   In order to solve the above-described problems, the present invention provides an image data correction apparatus in which an image form to be read is decomposed into pixels and optically read, and the luminance k of each pixel coordinate (x, y) on the form is read. Image reading means for storing (x, y) as image data in an image memory, and dividing the image data into a plurality of rectangular image blocks each consisting of m vertical pixels and n horizontal pixels, and the maximum number of pixels in each image block Block image generation means for generating block image data having the luminance P (X, Y) of the central coordinates (X, Y) of the image block, and the luminance k (x, y) of the pixel stored in the image memory ) Is the luminance P1 (Xa, Ya), P2 (Xa, Yb), P3 (Xb, Ya), P4 (Xb, Yb) of the central coordinates of the four image blocks surrounding the pixel in the block image data. ) And a predetermined reference brightness M are used. And K (x, y) = k (x, y) + M-{(Xb-x) (Yb-y) P1 + (Xb-x) (y-Ya) P2 + (x-Xa) (Yb -Y) P3 + (x-Xa) (y-Ya) P4} / {(Xb-Xa) (Yb-Ya)} is corrected in accordance with luminance correction means for calculating corrected luminance K (x, y). ing.

本発明によれば、次のような作用が行われる。
画像読取手段によって画素に分解されて読み取られた帳票の画像データは、ブロック画像生成手段によってm×n画素の矩形の画像ブロックに分割され、各画像ブロック中の画素の最大輝度が、その画像ブロックの中心座標の輝度とみなされる。更に、輝度補正手段において、画像データの各画素の輝度が、その画素を取り囲む4個の画像ブロックの中心座標の輝度に従って、所定の計算式に基づいて補正される。
According to the present invention, the following operation is performed.
The image data of the form read by being decomposed into pixels by the image reading means is divided into m × n pixel rectangular image blocks by the block image generating means, and the maximum luminance of the pixels in each image block is determined by the image block. It is regarded as the brightness of the center coordinate. Further, in the luminance correction means, the luminance of each pixel of the image data is corrected based on a predetermined calculation formula according to the luminance of the center coordinates of the four image blocks surrounding the pixel.

本発明によれば、帳票の画像データを複数の画素で構成される矩形の画像ブロックに分割し、その最大輝度を中心座標の輝度とするブロック画像データを生成するブロック画像生成手段と、このブロック画像データを用いて画像データを距離の比率による計算方法で補正する輝度補正手段を有している。   According to the present invention, the block image generation means for dividing the image data of the form into rectangular image blocks including a plurality of pixels and generating block image data having the maximum luminance as the luminance of the central coordinates, and the block Luminance correction means for correcting the image data by the calculation method based on the distance ratio using the image data is provided.

また、予め定められた基準輝度Mにブロックのヒストグラムから検出した値を使用することもできる。この場合は、影の部分が大きくなると、ヒストグラムから検出した帳票地色が影の色となり、帳票地色部分が暗い色に均一に補正される。そこで、この第2の発明で処理した画像を第1の発明で補正することにより、影の範囲が広くなっても所定のレベルで帳票地色を補正することができる。従って、画像読取手段の読み取り状態にかかわらず、読み取った画像データの輝度の分布を所定のレベルに補正できる。   In addition, a value detected from a block histogram can be used as a predetermined reference luminance M. In this case, when the shadow portion becomes large, the form background color detected from the histogram becomes a shadow color, and the form background color portion is uniformly corrected to a dark color. Therefore, by correcting the image processed in the second invention with the first invention, it is possible to correct the form background color at a predetermined level even when the shadow range is widened. Therefore, the luminance distribution of the read image data can be corrected to a predetermined level regardless of the reading state of the image reading means.

本発明を実施するための最良の形態は、以下の好ましい実施例の説明を添付図面と照らし合わせて読むと、明らかになるであろう。但し、図面はもっぱら解説のためのものであって、本発明の範囲を限定するものではない。   The best mode for carrying out the invention will become apparent from the following description of the preferred embodiments when read in conjunction with the accompanying drawings. However, the drawings are only for explanation and do not limit the scope of the present invention.

(参考例)
図1は、本発明の実施例1における参考例を示す画像データ補正装置の構成図である。
(Reference example)
FIG. 1 is a configuration diagram of an image data correction apparatus showing a reference example in Embodiment 1 of the present invention.

この画像データ補正装置は、読み取り対象の帳票1の画像を画素に分解して光学的に読み取る画像読取手段(例えば、CCDセンサ)11を有している。CCDセンサ11は、帳票1の画像を構成する各画素の輝度を、例えば256階調の画像データに変換して出力するものである。CCDセンサ11の出力側には、画像データを格納するための画像メモリ12が接続されている。   This image data correction apparatus has an image reading means (for example, a CCD sensor) 11 that optically separates an image of a form 1 to be read into pixels and reads it optically. The CCD sensor 11 converts the luminance of each pixel constituting the image of the form 1 into, for example, image data of 256 gradations and outputs it. An image memory 12 for storing image data is connected to the output side of the CCD sensor 11.

画像メモリ12には、頻度分布生成手段(例えば、頻度分布生成部)13が接続されている。頻度分布生成部13は、画像メモリ12に格納された画像データの輝度の頻度分布を生成するものであり、この頻度分布生成部13の出力側に生成した頻度分布を格納するための頻度分布メモリ14が接続されている。頻度分布メモリ14には、帳票濃度検出手段(例えば、帳票濃度検出部)15が接続されている。帳票濃度検出部15は、頻度分布メモリ14に格納された頻度分布に基づいて、帳票1の地色の濃度を検出するものである。この帳票濃度検出部15は、白レベルに近くかつ頻度が最大の階調を、帳票1の地色の濃度として検出するようになっている。   A frequency distribution generation means (for example, a frequency distribution generation unit) 13 is connected to the image memory 12. The frequency distribution generation unit 13 generates a luminance frequency distribution of the image data stored in the image memory 12, and a frequency distribution memory for storing the frequency distribution generated on the output side of the frequency distribution generation unit 13. 14 is connected. The frequency distribution memory 14 is connected to a form density detecting means (for example, a form density detecting unit) 15. The form density detection unit 15 detects the background color density of the form 1 based on the frequency distribution stored in the frequency distribution memory 14. The form density detecting unit 15 detects a gradation close to the white level and having the highest frequency as the background color density of the form 1.

帳票濃度検出部15には、輝度補正手段(例えば、輝度補正部)16が接続され、この輝度補正部16には、更に画像メモリ12及び補正値テーブル17が接続されている。輝度補正部16は、画像メモリ12に格納された画素の輝度と、帳票濃度検出部15で検出された帳票の地色の濃度の比に基づいて画素毎の補正値を求め、この補正値と予め定められた基準輝度を乗算して画像データの輝度を補正するものである。   The form density detection unit 15 is connected to a luminance correction unit (for example, a luminance correction unit) 16, and the luminance correction unit 16 is further connected to an image memory 12 and a correction value table 17. The brightness correction unit 16 obtains a correction value for each pixel based on the ratio between the brightness of the pixel stored in the image memory 12 and the background color density of the form detected by the form density detection unit 15, and the correction value and The luminance of the image data is corrected by multiplying a predetermined reference luminance.

即ち、輝度補正部16は、画像メモリ12に格納された各画素の輝度と帳票濃度検出部15で検出された帳票の地色の濃度の比を計算して正規化輝度を算出する。更に、輝度補正部16では、正規化輝度を変数として補正値テーブル17を参照して画素毎の補正値を求め、この補正値と予め定められた基準輝度を乗算して画像データの輝度を補正する。そして、輝度補正部16から補正された画像データDATAが出力されるようになっている。   That is, the luminance correction unit 16 calculates the normalized luminance by calculating the ratio between the luminance of each pixel stored in the image memory 12 and the background color density of the form detected by the form density detection unit 15. Further, the brightness correction unit 16 obtains a correction value for each pixel by referring to the correction value table 17 using the normalized brightness as a variable, and corrects the brightness of the image data by multiplying the correction value by a predetermined reference brightness. To do. Then, the corrected image data DATA is output from the luminance correction unit 16.

図2(a),(b)は、図1中の補正値テーブル17の例を示す説明図であり、同図(a)はリニア補正用の補正テーブル、及び同図(b)は正負のガンマ補正を組み合わせた場合の補正テーブルを示している。   2A and 2B are explanatory diagrams showing an example of the correction value table 17 in FIG. 1, in which FIG. 2A is a linear correction table, and FIG. 2B is positive / negative. A correction table when gamma correction is combined is shown.

図2(a)のリニア補正では、横軸に示した正規化輝度に対して、これと同じ補正値が出力されるようになっている。また、図2(b)のガンマ補正では、横軸に示した正規化輝度に対して、正負のガンマ関数の組み合わせによって算出される補正値が出力されるようになっている。   In the linear correction of FIG. 2A, the same correction value is output for the normalized luminance shown on the horizontal axis. In the gamma correction of FIG. 2B, a correction value calculated by a combination of positive and negative gamma functions is output for the normalized luminance shown on the horizontal axis.

図3(a),(b)は、図1の動作の説明図である。以下、この図3(a),(b)を参照しつつ、図1の動作を説明する。   3A and 3B are explanatory diagrams of the operation of FIG. The operation of FIG. 1 will be described below with reference to FIGS. 3 (a) and 3 (b).

読み取り対象の帳票1の画像は、CCDセンサ11によって画素に分解して読み取られる。読み取られた各画素毎の輝度は、黒レベル(0)から、白レベル(255)までの256階調の画像データに変換され、順次画像メモリ12に格納される。CCDセンサ11による帳票1の読み取りが終了すると、頻度分布生成部13が起動される。   The image of the form 1 to be read is separated into pixels by the CCD sensor 11 and read. The read luminance for each pixel is converted into image data of 256 gradations from the black level (0) to the white level (255) and sequentially stored in the image memory 12. When reading of the form 1 by the CCD sensor 11 is completed, the frequency distribution generation unit 13 is activated.

頻度分布生成部13では、画像メモリ12に格納された画像データの輝度が順次読み出され、各輝度毎の画素の頻度分布が生成され、頻度分布メモリ14に格納される。帳票1の画素の頻度分布は、図3(a)に示すように、文字等の輝度に対応したほぼ黒レベルのピークと、地色の濃度に対応した比較的白レベルに近いピークを有している。頻度分布生成部13によって帳票1の頻度分布の生成が終了すると、帳票濃度検出部15が起動される。   The frequency distribution generation unit 13 sequentially reads the luminance of the image data stored in the image memory 12, generates a frequency distribution of pixels for each luminance, and stores it in the frequency distribution memory 14. As shown in FIG. 3A, the frequency distribution of the pixels of the form 1 has a peak of almost black level corresponding to the brightness of characters and the like, and a peak relatively close to white level corresponding to the density of the ground color. ing. When the frequency distribution generation unit 13 finishes generating the frequency distribution of the form 1, the form density detection unit 15 is activated.

帳票濃度検出部15では、頻度分布メモリ14に格納された頻度分布に基づいて、白レベルに近くかつ画素の頻度が最大であるレベルP(例えば、P=200)が、帳票1の地色の濃度として検出される。帳票濃度検出部15によって帳票1の地色の濃度Pが検出されると、輝度補正部16が起動される。   In the form density detection unit 15, the level P (for example, P = 200) that is close to the white level and has the highest pixel frequency is the background color of the form 1 based on the frequency distribution stored in the frequency distribution memory 14. Detected as concentration. When the background density P of the form 1 is detected by the form density detection unit 15, the brightness correction unit 16 is activated.

輝度補正部16によって、画像メモリ12に格納されている各画素の輝度kが順次読み出され、この輝度kの値に応じて次の(1)〜(3)のような補正処理が行われ、補正された輝度Kが出力される。   The luminance correction unit 16 sequentially reads the luminance k of each pixel stored in the image memory 12 and performs the following correction processes (1) to (3) according to the value of the luminance k. The corrected luminance K is output.

(1) k≦Pの場合
まず、画素の輝度kと帳票の地色の濃度Pの比(=k/P)が、正規化輝度として算出される。更に、正規化輝度を変数として補正値テーブル17が参照され、予め定められた補正方法(例えば、リニア補正、ガンマ補正等)に従って画素毎の補正値TBL(k/P)が求められる。更に、補正値TBL(k/P)と、予め定められた基準輝度M(例えば、M=230)が乗算される。そして、乗算結果の輝度Kが補正された画像データDATAとして出力される。即ち、補正された輝度Kは、次のように表すことができる。
K=TBL(k/P)×M
(1) When k ≦ P First, the ratio (= k / P) between the luminance k of the pixel and the density P of the background color of the form is calculated as the normalized luminance. Further, the correction value table 17 is referred to using the normalized luminance as a variable, and a correction value TBL (k / P) for each pixel is obtained according to a predetermined correction method (for example, linear correction, gamma correction, etc.). Further, the correction value TBL (k / P) is multiplied by a predetermined reference luminance M (for example, M = 230). Then, it is output as image data DATA in which the luminance K of the multiplication result is corrected. That is, the corrected luminance K can be expressed as follows.
K = TBL (k / P) × M

(2) P<k≦255−M+Pの場合
画素の輝度kを(M−P)だけシフトする。即ち、補正された輝度Kは、次のように表すことができる。
K=k+M−P
(2) When P <k ≦ 255−M + P The luminance k of the pixel is shifted by (M−P). That is, the corrected luminance K can be expressed as follows.
K = k + MP

(3) k>255−M+Pの場合
すべて、K=255とする。
(3) When k> 255−M + P In all cases, K = 255.

この輝度補正部16の補正処理により、補正後の画素の輝度Kの頻度分布は、図3(b)に示すように、地色の濃度Pが基準輝度Mに一致するように補正される。そして、輝度補正部16から、補正された輝度Kが画像データDATAとして出力される。
以上のように、この参考例の画像データ補正装置は、読み取った帳票1の画素の輝度の頻度分布に基づいて、この帳票1の地色の濃度Pを検出する帳票濃度検出部15と、地色の濃度Pが基準輝度Mに変換されるように、補正値テーブル17を用いて各画素の輝度を補正する輝度補正部16を有している。これにより、帳票1の地色や、CCDセンサ11の読み取り状態にかかわらず、画像データの輝度の分布を所定のレベルに補正できるという利点がある。
By the correction processing of the luminance correction unit 16, the frequency distribution of the luminance K of the corrected pixel is corrected so that the background color density P matches the reference luminance M, as shown in FIG. Then, the corrected luminance K is output from the luminance correction unit 16 as image data DATA.
As described above, the image data correction apparatus according to the reference example includes the form density detection unit 15 that detects the density P of the ground color of the form 1 based on the read frequency distribution of the luminance of the pixels of the form 1, A luminance correction unit 16 that corrects the luminance of each pixel using the correction value table 17 is provided so that the color density P is converted into the reference luminance M. Accordingly, there is an advantage that the luminance distribution of the image data can be corrected to a predetermined level regardless of the background color of the form 1 or the reading state of the CCD sensor 11.

(実施例1の構成)
図4は、本発明の実施形態を示す画像データ補正装置の構成図であり、図1中の要素と共通の要素には共通の符号が付されている。
(Configuration of Example 1)
FIG. 4 is a block diagram of an image data correction apparatus showing an embodiment of the present invention. Elements common to those in FIG. 1 are denoted by common reference numerals.

この画像データ補正装置は、読み取り対象の帳票1の画像を、例えば縦3000×横2000の画素に分解して読み取るCCDセンサ11を有している。CCDセンサ11は、帳票1の画像を構成する各画素の輝度を、例えば256階調の画像データとして出力するものである。CCDセンサ11の出力側には、画像データを格納するための画像メモリ12が接続されている。   This image data correction apparatus has a CCD sensor 11 that reads an image of a form 1 to be read by dividing it into, for example, pixels of 3000 × 2000 pixels. The CCD sensor 11 outputs the luminance of each pixel constituting the image of the form 1 as, for example, 256-gradation image data. An image memory 12 for storing image data is connected to the output side of the CCD sensor 11.

画像メモリ12には、ブロック画像生成手段(例えば、画像分割部)18が接続されている。画像分割部18は、画像メモリ12に格納された画像データを、縦m(例えば、100)画素、横n(例えば、100)画素からなる30×20個の矩形の画像ブロックに分割するものである。また、画像分割部18では、分割してできた各画像ブロック中の画素の最大輝度を、その画像ブロックの中心座標(X,Y)の輝度P(X,Y)とするブロック画像データを生成するようになっている。画像分割部18の出力側には、生成されたブロック画像データを格納するためのブロックメモリ19が接続されている。   A block image generating means (for example, an image dividing unit) 18 is connected to the image memory 12. The image dividing unit 18 divides the image data stored in the image memory 12 into 30 × 20 rectangular image blocks having m (for example, 100) pixels and n (for example, 100) pixels. is there. Further, the image dividing unit 18 generates block image data in which the maximum luminance of the pixels in each image block obtained by the division is the luminance P (X, Y) of the center coordinates (X, Y) of the image block. It is supposed to be. A block memory 19 for storing the generated block image data is connected to the output side of the image dividing unit 18.

ブロックメモリ19には、輝度補正手段(例えば、輝度補正部)20が接続され、この輝度補正部20には、更に画像メモリ12が接続されている。輝度補正部20は、画像メモリ12に格納された各画素座標(x,y)の画素の輝度k(x,y)を、ブロック画像データの内でこの画素を取り囲む4個の画像ブロックの中心座標の輝度P1,P2,P3,P4を使用して、距離の比率による計算方法で補正するものである。   The block memory 19 is connected with a luminance correction means (for example, a luminance correction unit) 20, and the luminance memory 20 is further connected with an image memory 12. The luminance correction unit 20 determines the luminance k (x, y) of the pixel at each pixel coordinate (x, y) stored in the image memory 12 as the center of the four image blocks surrounding the pixel in the block image data. Using the luminances P1, P2, P3, and P4 of the coordinates, correction is performed by a calculation method based on a distance ratio.

即ち、輝度補正部20は、帳票地色のヒストグラム上の補正位置(即ち、輝度)を表す予め定められた基準輝度M、4個の画素ブロックの中心座標をP1(Xa,Ya),P2(Xa,Yb),P3(Xb,Ya),P4(Xb,Yb)として、次式(1)に従って補正輝度K(x,y)を算出する。
K(x,y)=k(x,y)+M−{(Xb−x)(Yb−y)P1+(Xb−x)(y−Ya)P2+(x−Xa)(Yb−y)P3+(x−Xa)(y−Ya)P4}/{(Xb−Xa)(Yb−Ya)} ・・・(1)
In other words, the luminance correction unit 20 uses the predetermined reference luminance M representing the correction position (that is, luminance) on the histogram of the form background color as the center coordinates of the four pixel blocks P1 (Xa, Ya), P2 ( Xa, Yb), P3 (Xb, Ya), and P4 (Xb, Yb) are used to calculate the corrected luminance K (x, y) according to the following equation (1).
K (x, y) = k (x, y) + M-{(Xb-x) (Yb-y) P1 + (Xb-x) (y-Ya) P2 + (x-Xa) (Yb-y) P3 + ( x-Xa) (y-Ya) P4} / {(Xb-Xa) (Yb-Ya)} (1)

そして、輝度補正部20から補正された輝度K(x,y)の画像データDATAが出力されるようになっている。   Then, the corrected brightness K (x, y) image data DATA is output from the brightness correction unit 20.

(実施例1の動作)
図5(a)〜(c)は、図4の動作の説明図である。以下、この図5(a)〜(c)を参照しつつ、図4の動作を説明する。
(Operation of Example 1)
5A to 5C are explanatory diagrams of the operation of FIG. The operation of FIG. 4 will be described below with reference to FIGS. 5 (a) to 5 (c).

読み取り対象の帳票1の画像は、CCDセンサ11によって画素に分解して読み取られる。読み取られた各画素毎の輝度は、黒レベル(0)から、白レベル(255)までの256階調の画像データに変換され、順次画像メモリ12に格納される。CCDセンサ11による帳票1の読み取りが終了すると、画像分割部18が起動される。   The image of the form 1 to be read is separated into pixels by the CCD sensor 11 and read. The read luminance for each pixel is converted into image data of 256 gradations from the black level (0) to the white level (255) and sequentially stored in the image memory 12. When the reading of the form 1 by the CCD sensor 11 is completed, the image dividing unit 18 is activated.

画像分割部18では、画像メモリ12に格納された画像データが、縦・横それぞれ100画素毎に縦線と横線で格子状に区切られ、30×20個の矩形の画像ブロックに分割される。図5(a)には、画像分割部18で分割された画像データが簡略化されて模式的に示されている。この図5(a)では、中央部が影によって暗くなった(輝度が低くなった)画像データが示されている。   In the image dividing unit 18, the image data stored in the image memory 12 is divided into a grid pattern of vertical and horizontal lines every 100 pixels in the vertical and horizontal directions, and is divided into 30 × 20 rectangular image blocks. FIG. 5A schematically shows the image data divided by the image dividing unit 18 in a simplified manner. FIG. 5A shows image data in which the central portion is darkened by the shadow (the luminance is lowered).

更に、画像分割部18では、分割してできた各画像ブロック中の画素の最大輝度を、その画像ブロックの中心座標(X,Y)の輝度P(X,Y)としてブロック画像データが生成される。生成されたブロック画像データは、ブロックメモリ19に格納される。図5(b)には、ブロックメモリ19に格納されたブロック画像データが模式的に示されている。この図5(b)では、影の影響で中央部の画像ブロックの輝度が低いため、この画像ブロックの輝度はその周囲の画像ブロックに比べて低くなっている。画像分割部18によってブロック画像データが生成されると、輝度補正部20が起動される。   Further, the image dividing unit 18 generates block image data with the maximum luminance of the pixels in each image block formed by the division as the luminance P (X, Y) of the center coordinates (X, Y) of the image block. The The generated block image data is stored in the block memory 19. FIG. 5B schematically shows block image data stored in the block memory 19. In FIG. 5B, since the luminance of the image block in the central portion is low due to the influence of the shadow, the luminance of this image block is lower than that of the surrounding image blocks. When block image data is generated by the image dividing unit 18, the luminance correction unit 20 is activated.

輝度補正部20によって、画像メモリ12中の各画素座標(x,y)の輝度k(x,y)が順次読み出され、ブロックメモリ19中のブロック画像データに基づいて、この輝度k(x,y)に対する補正処理が行われる。即ち、輝度補正部20において、画像メモリ12から読み出された画素座標(x,y)に対応する画像ブロックの中心座標(Xa,Ya),(Xa,Yb),(Xb,Ya),(Xb,Yb)が算出される。図5(c)に示すように、X座標Xa,Xbは、画像データを分割する縦線の内で、補正対象画素の両側の縦線のX座標値である。同様に、Y座標Ya,Ybは、画像データを分割する横線の内で、補正対象画素の上下の横線のY座標値である。   The brightness correction unit 20 sequentially reads the brightness k (x, y) of each pixel coordinate (x, y) in the image memory 12, and based on the block image data in the block memory 19, this brightness k (x , Y) is corrected. That is, in the brightness correction unit 20, the center coordinates (Xa, Ya), (Xa, Yb), (Xb, Ya), (X) of the image block corresponding to the pixel coordinates (x, y) read from the image memory 12. Xb, Yb) is calculated. As shown in FIG. 5C, the X coordinates Xa and Xb are the X coordinate values of the vertical lines on both sides of the correction target pixel among the vertical lines dividing the image data. Similarly, the Y coordinates Ya and Yb are the Y coordinate values of the upper and lower horizontal lines of the correction target pixel among the horizontal lines dividing the image data.

次に、これらの中心座標における各画像ブロックの輝度P1(Xa,Ya),P2(Xa,Yb),P3(Xb,Ya),P4(Xb,Yb)が、ブロックメモリ19から読み出される。そして、補正対象画素の輝度k(x,y)が、前記(1)式によって補正され、輝度K(x,y)が算出される。算出された輝度K(x,y)は、補正された画像データDATAとして逐次出力される。   Next, the luminance P1 (Xa, Ya), P2 (Xa, Yb), P3 (Xb, Ya), and P4 (Xb, Yb) of each image block at these center coordinates are read from the block memory 19. Then, the luminance k (x, y) of the correction target pixel is corrected by the equation (1), and the luminance K (x, y) is calculated. The calculated brightness K (x, y) is sequentially output as corrected image data DATA.

なお、補正対象画素が帳票1の周辺部の画素の場合、これに対応する4つの画像ブロックの中心座標を得ることができない。このような場合には、同じ輝度の画像ブロックが存在すると仮定して処理を行うこともできるが、補正処理を行わずそのままの輝度を画像データDATAとして出力するようにしても良い。   When the correction target pixel is a peripheral pixel of the form 1, the center coordinates of the four image blocks corresponding thereto cannot be obtained. In such a case, the processing can be performed on the assumption that an image block having the same luminance exists, but the luminance as it is may be output as the image data DATA without performing the correction processing.

(実施例1の効果)
以上のように、この実施例1の画像データ補正装置は、読み取った帳票1の画像データを複数の画素で構成される矩形の画像ブロックに分割し、その最大輝度を中心座標の輝度とするブロック画像データを生成する画像分割部18と、このブロック画像データを用いて画像データを距離の比率による計算方法で補正する輝度補正部20を有している。これにより、影の無い画像ブロックの画素はほとんど補正されない。一方、暗くなった部分がその周囲の画像ブロックの輝度の影響を受け、影のない帳票の地色に近い輝度に補正される。従って、CCDセンサ11の読み取り状態にかかわらず、読み取った画像データの輝度の分布を所定のレベルに補正できるという利点がある。
(Effect of Example 1)
As described above, the image data correction apparatus according to the first embodiment divides the read image data of the form 1 into rectangular image blocks including a plurality of pixels, and uses the maximum luminance as the central coordinate luminance. An image dividing unit 18 that generates image data, and a luminance correction unit 20 that corrects the image data by a calculation method based on a distance ratio using the block image data are provided. Thereby, the pixels of the image block without shadow are hardly corrected. On the other hand, the darkened part is affected by the brightness of the surrounding image blocks, and is corrected to a brightness close to the ground color of the form without shadows. Therefore, there is an advantage that the luminance distribution of the read image data can be corrected to a predetermined level regardless of the reading state of the CCD sensor 11.

(変形例)
なお、本発明は、上記参考例や実施形態に限定されず、種々の変形が可能である。この変形例としては、例えば、次の(a)〜(e)のようなものがある。
(Modification)
In addition, this invention is not limited to the said reference example and embodiment, A various deformation | transformation is possible. Examples of such modifications include the following (a) to (e).

(a) 画像データの階調は256に限定されない。16,64,128,512等の任意の階調に対して同様に適用することができる。   (A) The gradation of the image data is not limited to 256. The present invention can be similarly applied to arbitrary gradations such as 16, 64, 128, and 512.

(b) 図1中の補正テーブル17における補正は、リニア補正やガンマ補正に限定されない。   (B) The correction in the correction table 17 in FIG. 1 is not limited to linear correction or gamma correction.

(c) 図1では予め補正用の変換表を格納した補正テーブル17を用いているが、補正テーブル17を使用せずに、補正関数を用いて計算するようにしても良い。例えば、リニア補正の場合には補正テーブル17は不要である。   (C) Although the correction table 17 in which the conversion table for correction is stored in advance is used in FIG. 1, the calculation may be performed using a correction function without using the correction table 17. For example, in the case of linear correction, the correction table 17 is not necessary.

(d) 図1の動作説明では、輝度補正部16において画像メモリ12に格納された各画素毎に輝度レベルの補正処理を行うように説明したが、例えば、画像メモリ12に格納される輝度レベル0〜255に対する各補正値を予め算出し、輝度レベルをこの補正値で置き換えるようにしても良い。これにより、ルックアップテーブルを用いたビットマップ方式の画像処理等の場合に、処理時間の短縮が可能になる。   (D) In the description of the operation in FIG. 1, it has been described that the luminance correction unit 16 performs the luminance level correction processing for each pixel stored in the image memory 12. For example, the luminance level stored in the image memory 12 is described. Each correction value for 0 to 255 may be calculated in advance, and the luminance level may be replaced with this correction value. This makes it possible to reduce the processing time in the case of bitmap image processing using a lookup table.

(e) 図2中の画像分割部18で分割する画像ブロックのサイズは、100×100画素に限定されない。実際の使用環境に応じて適切な値を使用することができる。   (E) The size of the image block divided by the image dividing unit 18 in FIG. 2 is not limited to 100 × 100 pixels. An appropriate value can be used according to the actual use environment.

本発明の参考例を示す画像データ補正装置の構成図である。It is a block diagram of the image data correction apparatus which shows the reference example of this invention. 図1中の補正値テーブル17の例を示す説明図である。It is explanatory drawing which shows the example of the correction value table 17 in FIG. 図1の動作の説明図である。It is explanatory drawing of the operation | movement of FIG. 本発明の実施形態を示す画像データ補正装置の構成図である。1 is a configuration diagram of an image data correction apparatus showing an embodiment of the present invention. 図4の動作の説明図である。It is explanatory drawing of the operation | movement of FIG.

符号の説明Explanation of symbols

1 帳票
11 CCDセンサ
12 画像メモリ
13 頻度分布生成部
14 頻度分布メモリ
15 帳票濃度検出部
16,20 輝度補正部
17 補正値テーブル
18 画像分割部
19 ブロックメモリ
DESCRIPTION OF SYMBOLS 1 Form 11 CCD sensor 12 Image memory 13 Frequency distribution production | generation part 14 Frequency distribution memory 15 Form density detection part 16, 20 Brightness correction part 17 Correction value table 18 Image division part 19 Block memory

Claims (1)

読み取り対象の帳票を画素に分解して光学的に読み取り、該帳票上の各画素座標(x,y)の画素の輝度k(x,y)を画像データとして画像メモリに格納する画像読取手段と、
前記画像データを縦m画素、横n画素からなる複数の矩形の画像ブロックに分割し、各画像ブロック中の画素の最大輝度をその画像ブロックの中心座標(X,Y)の輝度P(X,Y)とするブロック画像データを生成するブロック画像生成手段と、
前記画像メモリに格納された画素の輝度k(x,y)を、前記ブロック画像データの内で該画素を取り囲む4個の画像ブロックの中心座標の輝度P1(Xa,Ya),P2(Xa,Yb),P3(Xb,Ya),P4(Xb,Yb)及び予め定められた基準輝度Mを使用して次式、
K(x,y)=k(x,y)+M−{(Xb−x)(Yb−y)P1+(Xb−x)
(y−Ya)P2+(x−Xa)(Yb−y)P3+(x−Xa)(y−Ya)P4}/{(
Xb−Xa)(Yb−Ya)}
に従って補正して補正輝度K(x,y)を算出する輝度補正手段とを、
備えたことを特徴とする画像データ補正装置。
Image reading means for optically reading a form to be read into pixels and storing the luminance k (x, y) of each pixel coordinate (x, y) on the form as image data in an image memory; ,
The image data is divided into a plurality of rectangular image blocks each consisting of m vertical pixels and n horizontal pixels, and the maximum luminance of the pixels in each image block is set to the luminance P (X, Y) of the center coordinates (X, Y) of the image block. Y) block image generation means for generating block image data;
The luminance k (x, y) of the pixel stored in the image memory is used as the luminance P1 (Xa, Ya), P2 (Xa, X) of the central coordinates of the four image blocks surrounding the pixel in the block image data. Yb), P3 (Xb, Ya), P4 (Xb, Yb) and a predetermined reference luminance M,
K (x, y) = k (x, y) + M-{(Xb-x) (Yb-y) P1 + (Xb-x)
(Y−Ya) P2 + (x−Xa) (Yb−y) P3 + (x−Xa) (y−Ya) P4} / {(
Xb−Xa) (Yb−Ya)}
Brightness correction means for correcting according to the above and calculating the corrected brightness K (x, y),
An image data correction apparatus comprising:
JP2008307824A 2008-12-02 2008-12-02 Image data correction device Expired - Fee Related JP4321666B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008307824A JP4321666B2 (en) 2008-12-02 2008-12-02 Image data correction device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008307824A JP4321666B2 (en) 2008-12-02 2008-12-02 Image data correction device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2000198123A Division JP2002015313A (en) 2000-06-30 2000-06-30 Image data correcting device

Publications (2)

Publication Number Publication Date
JP2009050032A JP2009050032A (en) 2009-03-05
JP4321666B2 true JP4321666B2 (en) 2009-08-26

Family

ID=40501729

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008307824A Expired - Fee Related JP4321666B2 (en) 2008-12-02 2008-12-02 Image data correction device

Country Status (1)

Country Link
JP (1) JP4321666B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010286307A (en) * 2009-06-10 2010-12-24 Nec Engineering Ltd Image pickup device
CN113099191B (en) * 2021-03-22 2023-04-07 浙江大华技术股份有限公司 Image processing method and device

Also Published As

Publication number Publication date
JP2009050032A (en) 2009-03-05

Similar Documents

Publication Publication Date Title
JP4831067B2 (en) Image processing apparatus, image processing method, image processing program product, and imaging apparatus
KR101640096B1 (en) Image processing device, projector, and method of controlling projector
CN1308891C (en) Apparatus and method for intensifying edge in picture processing
JP6115214B2 (en) Pattern processing apparatus, pattern processing method, and pattern processing program
WO2008139577A1 (en) Image processor, imager, and image distortion correcting method
JPWO2014064916A1 (en) Image processing apparatus and image processing method
US8805072B2 (en) Binarized threshold value determination device, method thereof, and image processing device
JP2012094052A (en) Fingerprint authentication device and program for fingerprint authentication
JP2011050013A (en) Video projection apparatus and video projection method
JP2018148318A5 (en)
JP3671616B2 (en) Image processing device
JP2017151908A (en) Image correction device, image correction method, and computer program for image correction
JP6115545B2 (en) Image processing apparatus and image processing method
US20110249884A1 (en) Checking apparatus and method for checking holes position and size in a plate
JP4321666B2 (en) Image data correction device
KR101470019B1 (en) Method for detecting and correcting bad pixels in image sensor
JP5322824B2 (en) Resolution conversion apparatus and resolution conversion method
JP6030890B2 (en) Image processing unit, image processing method, and stand type scanner
JP5273008B2 (en) Projector and projected image correction program
MX2021009226A (en) Generation of texture models using a moveable scanner.
CN110992328A (en) Dark spot detection method and device
US20230169689A1 (en) Suppression of clipping artifacts from color conversion
JP6704726B2 (en) Edge detection device, edge detection method, and program
JP2002015313A (en) Image data correcting device
JP2016048828A (en) Information processing device, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081202

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090525

R150 Certificate of patent or registration of utility model

Ref document number: 4321666

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120612

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120612

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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

Free format text: PAYMENT UNTIL: 20120612

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130612

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees