JP2002015313A - Image data correcting device - Google Patents

Image data correcting device

Info

Publication number
JP2002015313A
JP2002015313A JP2000198123A JP2000198123A JP2002015313A JP 2002015313 A JP2002015313 A JP 2002015313A JP 2000198123 A JP2000198123 A JP 2000198123A JP 2000198123 A JP2000198123 A JP 2000198123A JP 2002015313 A JP2002015313 A JP 2002015313A
Authority
JP
Japan
Prior art keywords
luminance
image
image data
pixel
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000198123A
Other languages
Japanese (ja)
Inventor
Hiroichi Iwashita
博一 岩下
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 JP2000198123A priority Critical patent/JP2002015313A/en
Publication of JP2002015313A publication Critical patent/JP2002015313A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To correct the luminance distribution of the image data of a document to a prescribed level. SOLUTION: The image data of the document 1 are read by a CCD(charge coupled device) sensor 11 and stored in an image memory 12. A frequency distribution generating section 13 generates the luminance frequency distribution of pixels based on the image data in the image memory 12 and stores it in a frequency distribution memory 14. A document density detecting section 15 detects a peak near the white level in the frequency distribution as the density of the ground color of the document. A luminance correcting section 16 determines a correction value based on the ratio between the luminance of the pixels in the image memory 12 and the density of the ground color in reference to a correction value table 17. The determined correction value is multiplied by the predetermined reference luminance to output corrected image data DATA.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、帳票を読み取って
得た画像データの輝度を補正する画像データ補正装置に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image data correcting apparatus for correcting the brightness of image data obtained by reading a form.

【0002】[0002]

【従来の技術】従来、OCR(文字読取装置)等では、
読み取り対象の帳票に光を照射し、反射した光の強度を
CCD(電荷結合素子)センサ等で読み取り、読み取っ
た光のレベルを所定の閾値で2値化して文字認識等の処
理を行うようにしている。
2. Description of the Related Art Conventionally, in an OCR (character reading device) or the like,
The 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 binarized by a predetermined threshold to perform processing such as character recognition. ing.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
OCR等では、次のような課題があった。例えば、ディ
ジタルカメラ等のCCDセンサを使用して帳票を読み取
る場合、外来光等の影響によって帳票から反射される光
の強度が変化し、このCCDセンサで検出される光のレ
ベルが全体にずれ、正しく2値化できなくなることがあ
った。また、帳票の一部に影が入り込んで、部分的に読
み取り誤りが生ずるという場合もあった。
However, the conventional OCR has 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 and the like, and the level of light detected by the CCD sensor shifts as a whole. In some cases, binarization could not be performed correctly. In addition, there is a case where a shadow enters a part of a form and a reading error occurs partially.

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

【0005】[0005]

【課題を解決するための手段】前記課題を解決するため
に、本発明の内の第1の発明は、画像データ補正装置に
おいて、読み取り対象の帳票を画素に分解して光学的に
読み取り、各画素の輝度を画像データとして画像メモリ
に格納する画像読取手段と、前記画像データの輝度の頻
度分布(ヒストグラム)を生成する頻度分布生成手段
と、前記頻度分布に基づいて前記帳票の地色の濃度を検
出する帳票濃度検出手段と、前記画像メモリに格納され
た画素の輝度と前記帳票濃度検出手段で検出された帳票
の地色の濃度の比に基づいて画素毎の補正値を求め、該
補正値と予め定められた基準輝度を乗算して前記画像デ
ータの輝度を補正する輝度補正手段とを備えている。
According to a first aspect of the present invention, a form to be read is decomposed into pixels and optically read by an image data correcting apparatus. Image reading means for storing the luminance of the pixels as image data in an image memory; frequency distribution generating means for generating a frequency distribution (histogram) of the luminance of the image data; and ground density of the form based on the frequency distribution And a correction value for each pixel based on the ratio of the luminance of the pixel stored in the image memory to the density of the ground color of the form detected by the form density detection means. Brightness correction means for correcting the brightness of the image data by multiplying the value by a predetermined reference brightness.

【0006】第1の発明によれば、以上のように画像デ
ータ補正装置を構成したので、次のような作用が行われ
る。画像読取手段によって画素に分解されて読み取られ
た帳票の画像データに基づいて、頻度分布生成手段によ
って輝度の頻度分布が作成される。また、帳票濃度検出
手段によって頻度分布から帳票の地色の濃度が検出され
る。輝度補正手段によって、各画素の輝度と地色の濃度
の比に基づいて画素毎の補正値が求められ、この補正値
と基準輝度が乗算されて画像データの補正が行われる。
According to the first aspect of the present invention, since the image data correcting device is configured as described above, the following operation is performed. A frequency distribution generating unit creates a luminance frequency distribution based on the image data of the form that has been decomposed into pixels and read by the image reading unit. In addition, the density of the ground color of the form is detected from the frequency distribution by the form density detecting means. A correction value for each pixel is obtained by the luminance correction unit based on the ratio of the luminance of each pixel to the density of the ground color, and the correction value is multiplied by the reference luminance to correct the image data.

【0007】第2の発明は、画像データ補正装置におい
て、読み取り対象の帳票を画素に分解して光学的に読み
取り、該帳票上の各画素座標(x,y)の画素の輝度k
(x,y)を画像データとして画像メモリに格納する画
像読取手段と、前記画像データを縦m画素、横n画素か
らなる複数の矩形の画像ブロックに分割し、各画像ブロ
ック中の画素の最大輝度をその画像ブロックの中心座標
(X,Y)の輝度P(X,Y)とするブロック画像デー
タを生成するブロック画像生成手段と、前記画像メモリ
に格納された画素の輝度k(x,y)を、前記ブロック
画像データの内で該画素を取り囲む4個の画像ブロック
の中心座標の輝度P1(Xa,Ya),P2(Xa,Yb),P
3(Xb,Ya),P4(Xb,Yb)及び予め定められた基準
輝度Mを使用して次式、K(x,y)=k(x,y)+
M−{(Xb−x)(Yb−y)P1+(Xb−x)(y−Y
a)P2+(x−Xa)(Yb−y)P3+(x−Xa)(y−Y
a)P4}/{(Xb−Xa)(Yb−Ya)}に従って補正し
て補正輝度K(x,y)を算出する輝度補正手段とを備
えている。
According to a second aspect of the present invention, in the image data correcting apparatus, the form to be read is decomposed into pixels and optically read, and the luminance k of the pixel at each pixel coordinate (x, y) on the form is determined.
An 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 having m pixels vertically and n pixels horizontally, and A block image generating means for generating block image data whose luminance is a luminance P (X, Y) at the center coordinates (X, Y) of the image block; and a luminance k (x, y) of a pixel stored in the image memory. ) Is the luminance P1 (Xa, Ya), P2 (Xa, Yb), P2 of the center coordinates of the four image blocks surrounding the pixel in the block image data.
Using 3 (Xb, Ya), P4 (Xb, Yb) and a predetermined reference luminance M, the following equation is obtained: K (x, y) = k (x, y) +
M − {(Xb−x) (Yb−y) P1 + (Xb−x) (y−Y
a) P2 + (x-Xa) (Yb-y) P3 + (x-Xa) (y-Y
a) brightness correction means for calculating a corrected brightness K (x, y) by correcting according to P4) / {(Xb-Xa) (Yb-Ya)}.

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

【0009】[0009]

【発明の実施の形態】(第1の実施形態)図1は、本発
明の第1の実施形態を示す画像データ補正装置の構成図
である。この画像データ補正装置は、読み取り対象の帳
票1の画像を画素に分解して光学的に読み取る画像読取
手段(例えば、CCDセンサ)11を有している。CC
Dセンサ11は、帳票1の画像を構成する各画素の輝度
を、例えば256階調の画像データに変換して出力する
ものである。CCDセンサ11の出力側には、画像デー
タを格納するための画像メモリ12が接続されている。
(First Embodiment) FIG. 1 is a block diagram of an image data correction apparatus showing a first embodiment of the present invention. This image data correction device has image reading means (for example, a CCD sensor) 11 which decomposes an image of the form 1 to be read into pixels and optically reads the pixels. CC
The D sensor 11 converts the luminance of each pixel constituting the image of the form 1 into, for example, 256-gradation image data and outputs the image data. The output side of the CCD sensor 11 is connected to an image memory 12 for storing image data.

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

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

【0012】即ち、輝度補正部16は、画像メモリ12
に格納された各画素の輝度と帳票濃度検出部15で検出
された帳票の地色の濃度の比を計算して正規化輝度を算
出する。更に、輝度補正部16では、正規化輝度を変数
として補正値テーブル17を参照して画素毎の補正値を
求め、この補正値と予め定められた基準輝度を乗算して
画像データの輝度を補正する。そして、輝度補正部16
から補正された画像データDATAが出力されるように
なっている。
That is, the brightness correction section 16 is provided in the image memory 12
Is calculated by calculating the ratio of the luminance of each pixel stored in the form and the density of the ground color of the form detected by the form density detection unit 15. Further, the brightness correction unit 16 obtains a correction value for each pixel with reference 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. I do. Then, the brightness correction unit 16
Output corrected image data DATA.

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

【0014】図2(a)のリニア補正では、横軸に示し
た正規化輝度に対して、これと同じ補正値が出力される
ようになっている。また、図2(b)のガンマ補正で
は、横軸に示した正規化輝度に対して、正負のガンマ関
数の組み合わせによって算出される補正値が出力される
ようになっている。
In the linear correction shown in 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.

【0015】図3(a),(b)は、図1の動作の説明
図である。以下、この図3(a),(b)を参照しつ
つ、図1の動作を説明する。読み取り対象の帳票1の画
像は、CCDセンサ11によって画素に分解して読み取
られる。読み取られた各画素毎の輝度は、黒レベル
(0)から、白レベル(255)までの256階調の画
像データに変換され、順次画像メモリ12に格納され
る。CCDセンサ11による帳票1の読み取りが終了す
ると、頻度分布生成部13が起動される。
FIGS. 3A and 3B are explanatory diagrams of the operation of FIG. Hereinafter, the operation of FIG. 1 will be described with reference to FIGS. 3 (a) and 3 (b). The image of the form 1 to be read is separated into pixels by the CCD sensor 11 and read. The read luminance of each pixel is converted into image data of 256 gradations from a black level (0) to a white level (255), and is sequentially stored in the image memory 12. When the reading of the form 1 by the CCD sensor 11 is completed, the frequency distribution generator 13 is activated.

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

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

【0018】輝度補正部16によって、画像メモリ12
に格納されている各画素の輝度kが順次読み出され、こ
の輝度kの値に応じて次の(1)〜(3)のような補正
処理が行われ、補正された輝度Kが出力される。
The brightness correction unit 16 controls the image memory 12
Are sequentially read out, and the following correction processing (1) to (3) is performed according to the value of the luminance k, and the corrected luminance K is output. You.

【0019】(1) k≦Pの場合 まず、画素の輝度kと帳票の地色の濃度Pの比(=k/
P)が、正規化輝度として算出される。更に、正規化輝
度を変数として補正値テーブル17が参照され、予め定
められた補正方法(例えば、リニア補正、ガンマ補正
等)に従って画素毎の補正値TBL(k/P)が求めら
れる。更に、補正値TBL(k/P)と、予め定められ
た基準輝度M(例えば、M=230)が乗算される。そ
して、乗算結果の輝度Kが補正された画像データDAT
Aとして出力される。即ち、補正された輝度Kは、次の
ように表すことができる。 K=TBL(k/P)×M
(1) In the case of k ≦ P First, the ratio of the luminance k of a pixel to the density P of the ground color of a form (= k / P)
P) 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, or the like). Further, the correction value TBL (k / P) is multiplied by a predetermined reference luminance M (for example, M = 230). Then, the image data DAT in which the luminance K resulting from the multiplication is corrected
Output as A. That is, the corrected luminance K can be expressed as follows. K = TBL (k / P) × M

【0020】(2) P<k≦255−M+Pの場合 画素の輝度kを(M−P)だけシフトする。即ち、補正
された輝度Kは、次のように表すことができる。 K=k+M−P
(2) In the case of 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

【0021】(3) k>255−M+Pの場合 すべて、K=255とする。この輝度補正部16の補正
処理により、補正後の画素の輝度Kの頻度分布は、図3
(b)に示すように、地色の濃度Pが基準輝度Mに一致
するように補正される。そして、輝度補正部16から、
補正された輝度Kが画像データDATAとして出力され
る。
(3) When k> 255−M + P In all cases, K = 255. The frequency distribution of the luminance K of the pixel after the correction by the correction processing of the luminance correction unit 16 is shown in FIG.
As shown in (b), the correction is performed so that the ground color density P matches the reference luminance M. Then, from the brightness correction unit 16,
The corrected luminance K is output as image data DATA.

【0022】以上のように、この第1の実施形態の画像
データ補正装置は、読み取った帳票1の画素の輝度の頻
度分布に基づいて、この帳票1の地色の濃度Pを検出す
る帳票濃度検出部15と、地色の濃度Pが基準輝度Mに
変換されるように、補正値テーブル17を用いて各画素
の輝度を補正する輝度補正部16を有している。これに
より、帳票1の地色や、CCDセンサ11の読み取り状
態にかかわらず、画像データの輝度の分布を所定のレベ
ルに補正できるという利点がある。
As described above, the image data correcting apparatus according to the first embodiment detects the form density of the background color of the form 1 based on the frequency distribution of the luminance of the pixels of the form 1 read. It has a detection unit 15 and a luminance correction unit 16 that corrects the luminance of each pixel using the correction value table 17 so that the ground 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 ground color of the form 1 or the reading state of the CCD sensor 11.

【0023】(第2の実施形態)図4は、本発明の第2
の実施形態を示す画像データ補正装置の構成図であり、
図1中の要素と共通の要素には共通の符号が付されてい
る。この画像データ補正装置は、読み取り対象の帳票1
の画像を、例えば縦3000×横2000の画素に分解
して読み取るCCDセンサ11を有している。CCDセ
ンサ11は、帳票1の画像を構成する各画素の輝度を、
例えば256階調の画像データとして出力するものであ
る。CCDセンサ11の出力側には、画像データを格納
するための画像メモリ12が接続されている。
(Second Embodiment) FIG. 4 shows a second embodiment of the present invention.
FIG. 1 is a configuration diagram of an image data correction device according to an embodiment;
Elements common to those in FIG. 1 are denoted by common reference numerals. This image data correction device is a form 1 to be read.
Has a CCD sensor 11 which reads the image of (3) into, for example, 3000 × 2000 pixels. The CCD sensor 11 calculates the luminance of each pixel constituting the image of the form 1 by
For example, it is output as image data of 256 gradations. The output side of the CCD sensor 11 is connected to an image memory 12 for storing image data.

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

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

【0026】即ち、輝度補正部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) そして、輝度補正部20から補正された輝度K(x,
y)の画像データDATAが出力されるようになってい
る。
That is, the luminance correction unit 20 determines a predetermined reference luminance M representing a correction position (ie, luminance) on the histogram of the form ground color, and sets the center coordinates of the four pixel blocks to P1.
(Xa, Ya), P2 (Xa, Yb), P3 (Xb, Ya), P4
As (Xb, Yb), the corrected luminance K according to the following equation (1):
(X, y) is calculated. 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) Then, the luminance K (x,
The image data DATA of y) is output.

【0027】図5(a)〜(c)は、図4の動作の説明
図である。以下、この図5(a)〜(c)を参照しつ
つ、図4の動作を説明する。読み取り対象の帳票1の画
像は、CCDセンサ11によって画素に分解して読み取
られる。読み取られた各画素毎の輝度は、黒レベル
(0)から、白レベル(255)までの256階調の画
像データに変換され、順次画像メモリ12に格納され
る。CCDセンサ11による帳票1の読み取りが終了す
ると、画像分割部18が起動される。
FIGS. 5A to 5C are explanatory diagrams of the operation of FIG. Hereinafter, the operation of FIG. 4 will be described with reference to FIGS. 5 (a) to 5 (c). The image of the form 1 to be read is separated into pixels by the CCD sensor 11 and read. The read luminance of each pixel is converted into image data of 256 gradations from a black level (0) to a white level (255), and is 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.

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

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

【0030】輝度補正部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 controls the image memory 12
The luminance k (x, y) at each pixel coordinate (x, y) in the block is sequentially read out, and correction processing for the luminance k (x, y) is performed based on the block image data in the block memory 19. . That is, in the brightness correction unit 20, the center coordinates (Xa, Ya), (Xa, Yb), (Xb, Yb) of the image block corresponding to the pixel coordinates (x, y) read from the image memory 12.
Ya) and (Xb, Yb) are 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.

【0031】次に、これらの中心座標における各画像ブ
ロックの輝度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 brightness P1 (Xa, Ya), P2 (Xa, Yb), P3 of each image block at these center coordinates
(Xb, Ya) and P4 (Xb, Yb) are read from the block memory 19. Then, the luminance k (x,
y) 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.

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

【0033】以上のように、この第2の実施形態の画像
データ補正装置は、読み取った帳票1の画像データを複
数の画素で構成される矩形の画像ブロックに分割し、そ
の最大輝度を中心座標の輝度とするブロック画像データ
を生成する画像分割部18と、このブロック画像データ
を用いて画像データを距離の比率による計算方法で補正
する輝度補正部20を有している。これにより、影の無
い画像ブロックの画素はほとんど補正されない。一方、
暗くなった部分がその周囲の画像ブロックの輝度の影響
を受け、影のない帳票の地色に近い輝度に補正される。
従って、CCDセンサ11の読み取り状態にかかわら
ず、読み取った画像データの輝度の分布を所定のレベル
に補正できるという利点がある。
As described above, the image data correction apparatus according to the second embodiment divides the read image data of the form 1 into rectangular image blocks composed of a plurality of pixels, and sets the maximum luminance as the central coordinate. An image division unit 18 that generates block image data having a luminance of, and a luminance correction unit 20 that uses the block image data to correct image data by a calculation method based on a distance ratio. As a result, the pixels of the image block having no shadow are hardly corrected. on the other hand,
The darkened portion is affected by the luminance of the surrounding image blocks, and is corrected to a luminance close to the ground color of a form without shadow.
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.

【0034】なお、本発明は、上記実施形態に限定され
ず、種々の変形が可能である。この変形例としては、例
えば、次の(a)〜(e)のようなものがある。 (a) 画像データの階調は256に限定されない。1
6,64,128,512等の任意の階調に対して同様
に適用することができる。
Note that the present invention is not limited to the above embodiment, and various modifications are possible. For example, there are the following modifications (a) to (e). (A) The gradation of the image data is not limited to 256. 1
The same can be applied to arbitrary gradations such as 6, 64, 128, and 512.

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

【0036】(c) 図1では予め補正用の変換表を格
納した補正テーブル17を用いているが、補正テーブル
17を使用せずに、補正関数を用いて計算するようにし
ても良い。例えば、リニア補正の場合には補正テーブル
17は不要である。
(C) Although FIG. 1 uses the correction table 17 in which a conversion table for correction is stored in advance, 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 unnecessary.

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

【0038】(e) 図2中の画像分割部18で分割す
る画像ブロックのサイズは、100×100画素に限定
されない。実際の使用環境に応じて適切な値を使用する
ことができる。
(E) The size of the image block to be 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.

【0039】[0039]

【発明の効果】以上詳細に説明したように、第1の発明
によれば、帳票の画素の輝度の頻度分布に基づいてこの
帳票の地色の濃度を検出する帳票濃度検出手段と、地色
の濃度が基準輝度に変換されるように補正値を用いて各
画素の輝度を補正する輝度補正手段を有している。これ
により、帳票の地色や画像読取手段の読み取り状態にか
かわらず、読み取った画像データの輝度の分布を所定の
レベルに補正できる。
As described above in detail, according to the first aspect, the form density detecting means for detecting the density of the ground color of the form based on the frequency distribution of the luminance of the pixels of the form, Brightness correction means for correcting the brightness of each pixel using a correction value so that the density of the pixel is converted to the reference brightness. This makes it possible to correct the luminance distribution of the read image data to a predetermined level regardless of the background color of the form or the reading state of the image reading unit.

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

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

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施形態を示す画像データ補正
装置の構成図である。
FIG. 1 is a configuration diagram of an image data correction device according to a first embodiment of the present invention.

【図2】図1中の補正値テーブル17の例を示す説明図
である。
FIG. 2 is an explanatory diagram showing an example of a correction value table 17 in FIG.

【図3】図1の動作の説明図である。FIG. 3 is an explanatory diagram of the operation of FIG. 1;

【図4】本発明の第2の実施形態を示す画像データ補正
装置の構成図である。
FIG. 4 is a configuration diagram of an image data correction device according to a second embodiment of the present invention.

【図5】図4の動作の説明図である。FIG. 5 is an explanatory diagram of the operation in FIG. 4;

【符号の説明】[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 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 (2)

【特許請求の範囲】[Claims] 【請求項1】 読み取り対象の帳票を画素に分解して光
学的に読み取り、各画素の輝度を画像データとして画像
メモリに格納する画像読取手段と、 前記画像データの輝度の頻度分布を生成する頻度分布生
成手段と、 前記頻度分布に基づいて前記帳票の地色の濃度を検出す
る帳票濃度検出手段と、 前記画像メモリに格納された画素の輝度と前記帳票濃度
検出手段で検出された帳票の地色の濃度の比に基づいて
画素毎の補正値を求め、該補正値と予め定められた基準
輝度を乗算して前記画像データの輝度を補正する輝度補
正手段とを、 備えたことを特徴とする画像データ補正装置。
An image reading unit that decomposes a form to be read into pixels and optically reads the pixels and stores the luminance of each pixel as image data in an image memory; and a frequency of generating a frequency distribution of the luminance of the image data. Distribution generation means; form density detection means for detecting the density of the ground color of the form based on the frequency distribution; luminance of the pixels stored in the image memory; and the form background detected by the form density detection means. Brightness correction means for obtaining a correction value for each pixel based on a color density ratio, and multiplying the correction value by a predetermined reference brightness to correct the brightness of the image data. Image data correction device.
【請求項2】 読み取り対象の帳票を画素に分解して光
学的に読み取り、該帳票上の各画素座標(x,y)の画
素の輝度k(x,y)を画像データとして画像メモリに
格納する画像読取手段と、 前記画像データを縦m画素、横n画素からなる複数の矩
形の画像ブロックに分割し、各画像ブロック中の画素の
最大輝度をその画像ブロックの中心座標(X,Y)の輝
度P(X,Y)とするブロック画像データを生成するブ
ロック画像生成手段と、 前記画像メモリに格納された画素の輝度k(x,y)
を、前記ブロック画像データの内で該画素を取り囲む4
個の画像ブロックの中心座標の輝度P1(Xa,Ya),P
2(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)を算出する輝度
補正手段とを、備えたことを特徴とする画像データ補正
装置。
2. A form to be read is decomposed into pixels and optically read, and a luminance k (x, y) of a pixel at each pixel coordinate (x, y) on the form is stored in an image memory as image data. An image reading unit that divides the image data into a plurality of rectangular image blocks each including m pixels vertically and n pixels horizontally, and calculates the maximum luminance of the pixels in each image block as the center coordinates (X, Y) of the image block. A block image generating means for generating block image data having a luminance P (X, Y) of the pixel luminance k (x, y) of a pixel stored in the image memory
Is defined as 4 surrounding the pixel in the block image data.
Luminance P1 (Xa, Ya), P at the center coordinates of the image blocks
2 (Xa, Yb), P3 (Xb, Ya), P4 (Xb, Yb) and a predetermined reference luminance M, the following equation: 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)}, and a brightness correction unit that calculates a corrected brightness K (x, y).
JP2000198123A 2000-06-30 2000-06-30 Image data correcting device Pending JP2002015313A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (1)

Publication Number Publication Date
JP2002015313A true JP2002015313A (en) 2002-01-18

Family

ID=18696332

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP2002015313A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190088627A (en) * 2018-01-19 2019-07-29 주식회사 한글과컴퓨터 Method for correcting distortion of shade and apparatus using the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190088627A (en) * 2018-01-19 2019-07-29 주식회사 한글과컴퓨터 Method for correcting distortion of shade and apparatus using the same
KR102014217B1 (en) 2018-01-19 2019-08-26 주식회사 한글과컴퓨터 Method for correcting distortion of shade and apparatus using the same

Similar Documents

Publication Publication Date Title
US7227990B2 (en) Color image processing device and color image processing method
US7834921B1 (en) Compensation techniques for variations in image field data
KR100749069B1 (en) Image processing system, projector, information storage medium, and image processing method
JP3671616B2 (en) Image processing device
JP4321666B2 (en) Image data correction device
JP2002015313A (en) Image data correcting device
JP5273008B2 (en) Projector and projected image correction program
JP2016048828A (en) Information processing device, information processing method, and program
JP4340503B2 (en) Document reader
JP2988209B2 (en) Color shading pattern recognition device
JP3297502B2 (en) Image reproduction device
KR100306419B1 (en) Method for correcting shading of shuttle scanner
JP5361624B2 (en) Image processing apparatus, image processing method, and program
JP5187351B2 (en) Projector and projected image correction program
JPH0396171A (en) Picture read method
JPH05328112A (en) Method for dither processing of variable density picture and device therefor
CN113129230A (en) Image color cast correction method and system of CIS scanner
CN115755077A (en) High dynamic range depth ranging method, system, equipment and medium
JP2008146572A (en) Image processing method and image processor
JPH06268861A (en) Correction method for close contact type image sensor
JP2005142951A (en) Image reader and image evaluation program
JPS61177018A (en) Method of compensating binary code threshold
JPH02166582A (en) Shading correcting circuit
JPH0460888A (en) Picture processor
JPH08307678A (en) Image processing unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081007

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081202

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090120