JP2014045443A - Shading correction device and shading correction method - Google Patents

Shading correction device and shading correction method Download PDF

Info

Publication number
JP2014045443A
JP2014045443A JP2012187783A JP2012187783A JP2014045443A JP 2014045443 A JP2014045443 A JP 2014045443A JP 2012187783 A JP2012187783 A JP 2012187783A JP 2012187783 A JP2012187783 A JP 2012187783A JP 2014045443 A JP2014045443 A JP 2014045443A
Authority
JP
Japan
Prior art keywords
moving average
white
correction
average value
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012187783A
Other languages
Japanese (ja)
Other versions
JP5918080B2 (en
Inventor
Takashige Karube
貴繁 軽部
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.)
Asahi Kasei Electronics Co Ltd
Original Assignee
Asahi Kasei Electronics 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 Asahi Kasei Electronics Co Ltd filed Critical Asahi Kasei Electronics Co Ltd
Priority to JP2012187783A priority Critical patent/JP5918080B2/en
Publication of JP2014045443A publication Critical patent/JP2014045443A/en
Application granted granted Critical
Publication of JP5918080B2 publication Critical patent/JP5918080B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a shading correction device which can detect a white level peak value even if the peak position in one line for scanning a line sensor is unknown.SOLUTION: Shading correction is performed by performing black correction of an image signal read from a manuscript 11 being subjected to image processing to adjust the offset amount, and performing white correction to adjust the gain. The shading correction device comprises: a black correction circuit 15 performing black correction of an image signal; a variable gain amplifier 18 for receiving a signal from the black correction circuit 15 after correction and outputting the signal after amplifying with a desired gain; and a white correction circuit 17 connected with the variable gain amplifier 18 and performing white correction based on a true white level peak value detected from an output signal of the variable gain amplifier 18. Black correction is performed by the black correction circuit 15, and white correction is performed for a signal passed through the variable gain amplifier 18 by the white correction circuit 17.

Description

本発明は、シェーディング補正装置及び方法に関し、より詳細には、ラインセンサの出力信号に含まれるオフセットを黒補正した後に、ゲインバラツキを白補正するシェーディング補正装置及び方法に関する。   The present invention relates to a shading correction apparatus and method, and more particularly to a shading correction apparatus and method for white correction of gain variation after black correction of an offset included in an output signal of a line sensor.

一般に、シェーディング補正装置として、ファクシミリ、デジタル複写機、スキャナー等の情報処理装置を構成する画像処理系において、CCD等のラインセンサの走査動作によって、画像処理対象となる原稿を読み取って得られたラインセンサの出力信号に対し、このラインセンサの出力信号に含まれるオフセット及びゲインバラツキを補正し、この補正後の信号を真の画像処理対象を表す信号として画像処理を行うものがある。   In general, a line obtained by reading a document to be image-processed by a scanning operation of a line sensor such as a CCD in an image processing system constituting an information processing apparatus such as a facsimile, a digital copying machine, and a scanner as a shading correction apparatus. There is a technique in which offset and gain variations included in the output signal of the line sensor are corrected with respect to the output signal of the sensor, and image processing is performed using the corrected signal as a signal representing a true image processing target.

また、例えば、特許文献1には、シェーディング補正装置、原稿読取り装置及び画像形成装置として、高品質のシェーディング補正データを安定して生成し、これを各補正データ生成装置で個別に自動的に実現するものが開示されている。これは、基準白板を読取らせた画像データのうち、適正領域のデータのみを読み込んでシェーディング補正データを生成する。このように生成されたシェーディング補正データにより、コンタクトガラス面の反射などのノイズの影響がない、高精度のシェーディング補正を容易に実現できる。それに加えて、画像読取り装置個別の組立て寸法差のばらつきによる個別のノイズの影響がない領域を、容易にあるいは自動的に設定できる。このように、個別の製品ごとに高精度のシェーディング補正できるというものである。   Further, for example, in Patent Document 1, as a shading correction device, a document reading device, and an image forming device, high-quality shading correction data is stably generated, and this is automatically realized by each correction data generation device. What to do is disclosed. This generates shading correction data by reading only the data in the appropriate area from the image data read from the reference white board. With the shading correction data generated in this way, highly accurate shading correction without the influence of noise such as reflection on the contact glass surface can be easily realized. In addition, it is possible to easily or automatically set a region free from the influence of individual noise due to variations in assembly dimension differences among individual image reading apparatuses. Thus, highly accurate shading correction can be performed for each individual product.

具体的には、基準白板の読取りデータを読込むための副走査位置を位置メモリに設定する手段として、イメージラインセンサに画像光を投影する光学手段と基準白板の一方を、他方に対して副走査する副走査駆動の間に、位置メモリの副走査位置に基づいて基準白板読取りデータ読込み指示信号SMPLを発生する手段と、そのSMPLに応答して基準白板読取りの画像データを読込み、シェーディング補正データを生成してFIFOメモリに格納する補正データ保存手段と、自動的に基準白板読取りの有効領域を検出してSMPL発生位置情報を設定するタイミング手段とを備えた構成である。   Specifically, as means for setting the sub-scanning position for reading the reading data of the reference white board in the position memory, one of the optical means for projecting image light on the image line sensor and the reference white board is sub-scanned with respect to the other. Means for generating a reference whiteboard reading data reading instruction signal SMPL based on the subscanning position of the position memory during the subscanning drive, and reading the reference whiteboard reading image data in response to the SMPL to generate shading correction data The correction data storing means for storing in the FIFO memory and the timing means for automatically detecting the effective area for reading the reference white plate and setting the SMPL occurrence position information.

また、例えば、特許文献2には、カラーアナログ画像信号をシェーディング補正する画像信号処理方法において、迅速に適切なシェーディング補正データを得ることを可能とする画像信号処理方法が開示されている。具体的には、光源を消灯状態で各色成分のイメージラインセンサが出力した複数のアナログ画像信号のレベルから最低出力レベルを検出し、検出した最低出力レベルに、アナログ/デジタル変換器の入力レンジの最低値が一致するようにシフトする。次に、光源を点灯して、各色成分のイメージラインセンサが、白基準板を読取って出力する複数のアナログ画像信号のレベルから最高出力レベルを検出する。そして検出した最低出力レベル、最高出力レベル、シフト後の入力レンジ及びアナログ/デジタル変換器の分解能に基づき所定の演算式によりアナログ/デジタル変換器の入力レンジを設定し、シェーディング補正データを取得するというものである。   For example, Patent Document 2 discloses an image signal processing method capable of quickly obtaining appropriate shading correction data in an image signal processing method for shading correction of a color analog image signal. Specifically, the minimum output level is detected from the levels of the plurality of analog image signals output by the image line sensor of each color component with the light source turned off, and the input range of the analog / digital converter is detected to the detected minimum output level. Shift so that the lowest value matches. Next, the light source is turned on, and the image line sensor for each color component detects the maximum output level from the levels of a plurality of analog image signals read and output from the white reference plate. Then, based on the detected minimum output level, maximum output level, shifted input range, and analog / digital converter resolution, the analog / digital converter input range is set by a predetermined arithmetic expression, and shading correction data is acquired. Is.

また、例えば、特許文献3には、シェーディング補正されてA/D変換されたデータに、アナログ系の回路の有するオフセット誤差やゲイン誤差を含まないようにして高精度の補正を可能にしたシェーディング装置が開示されている。具体的には、以下のとおりである。レジスタには、ラインセンサの出力信号を一定値の固定状態とし、黒補正値(オフセット補正値)を最小値に設定した時のA/D変換器の出力が格納される。レジスタには、ラインセンサの出力信号を一定値の固定状態とし、黒補正値を最大値に設定した時のA/D変換器の出力が格納される。メモリには、例えば、「OFF」の状態でのラインセンサの出力に対し、黒補正値を最小値に設定して、A/D変換器でA/D変換を行なった時の出力結果が格納される。また、演算器は、上記の格納内容を使用して所定の演算式により黒補正値を算出するというものである。   Further, for example, Patent Document 3 discloses a shading device that enables high-precision correction by preventing the offset error and gain error of an analog circuit from being included in data subjected to shading correction and A / D converted. Is disclosed. Specifically, it is as follows. The register stores the output of the A / D converter when the output signal of the line sensor is set to a fixed value and the black correction value (offset correction value) is set to the minimum value. The register stores the output of the A / D converter when the output signal of the line sensor is fixed at a fixed value and the black correction value is set to the maximum value. For example, the memory stores the output result when the A / D converter performs A / D conversion with the black correction value set to the minimum value for the output of the line sensor in the “OFF” state. Is done. The computing unit calculates the black correction value by using a predetermined arithmetic expression using the stored contents.

特開2006−245717号公報JP 2006-245717 A 特開2006−180153号公報JP 2006-180153 A 特開2000−278495号公報(特許第4204690号)JP 2000-278495 A (Patent No. 4204690)

上述した特許文献1のシェーディング補正装置等は、主にコピー機において、コンタクトガラス面の反射、特にガラス始端部の強い反射光により、ラインセンサの出力に間違ったピーク値を生じて、正しい基準白レベルを示さない場合のノイズの影響をなくす目的と、個々のコピー機等の組立て寸法差のばらつきによる個々のノイズの影響がない領域を容易にあるいは自動的に設定する目的とを達成しようとするものである。しかしながら、この特許文献1のシェーディング補正装置等は、必ずしも簡便なものではなく、しかも、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査する1ライン中のどこにあるか分からない場合であっても、白補正のため検出すべき白レベルピーク値を正確に検出することができないという問題があった。   The above-described shading correction apparatus of Patent Document 1 mainly produces a wrong reference white value in the output of the line sensor due to reflection on the contact glass surface, particularly strong reflected light at the glass start end, in a copying machine. An attempt to achieve the purpose of eliminating the influence of noise when the level is not indicated and the purpose of easily or automatically setting an area where there is no influence of individual noise due to variations in assembly dimensions of individual copying machines, etc. Is. However, the shading correction apparatus of Patent Document 1 is not always simple, and the white level peak position output by the line sensor is not known where it is in one line scanned by the line sensor. Even in such a case, there is a problem that the white level peak value to be detected for white correction cannot be detected accurately.

また、上述した特許文献2の画像信号処理方法等は、光源を点灯した直後で光源が不安定な状態において、各色成分のイメージラインセンサが、白基準板を読取って出力する出力信号から、迅速に適切なシェーディング補正データを得る目的を達成しようとする方法である。しかしながら、この特許文献2の画像信号処理方法等は、必ずしも簡便なものではなく、しかも、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査する1ライン中のどこにあるか分からない場合であっても、白補正のため検出すべき白レベルピーク値を正確に検出することができないという問題があった。   In addition, the image signal processing method described in Patent Document 2 described above can be quickly performed from the output signal that the image line sensor of each color component reads and outputs the white reference plate in a state where the light source is unstable immediately after the light source is turned on. This is a method for achieving the object of obtaining shading correction data suitable for the above. However, the image signal processing method of Patent Document 2 is not always simple, and the white level peak position output from the line sensor is not known in one line scanned by the line sensor. However, there is a problem that the white level peak value to be detected for white correction cannot be detected accurately.

さらに、上述した特許文献3のシェーディング補正装置は、黒補正や白補正を行ったデータに対してアナログ/デジタル(A/D)変換を行う結果、A/D変換の結果に対して含まれるアナログ回路系のオフセットや歪を除去する目的を達成しようとするものである。しかしながら、この特許文献3のシェーディング補正装置は、必ずしも簡便なものではなく、しかも、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査する1ライン中のどこにあるか分からない場合であっても、白補正のため検出すべき白レベルピーク値を正確に検出できないという問題があった。   Further, the above-described shading correction apparatus of Patent Document 3 performs analog / digital (A / D) conversion on the data subjected to black correction and white correction, and as a result, analog included in the result of A / D conversion. This is intended to achieve the purpose of removing the offset and distortion of the circuit system. However, the shading correction apparatus disclosed in Patent Document 3 is not always simple, and it is a case where the white level peak position output from the line sensor is unknown in one line scanned by the line sensor. However, there is a problem that the white level peak value to be detected for white correction cannot be detected accurately.

詳しくは、白レベルピーク値が、走査1ラインにおける中間位置からずれた位置にあった場合、正しく白補正値のピーク値を検出できず、正しいターゲット白補正値に収束できない。その理由は、走査の1ラインにおける全期間での平均値からピーク値を推定する方法によれば、走査1ラインにおいて、100%白レベルを表す1番大きな第1ピークの前後で、近い時間に発生した2番目に大きな第2ピークも含めて平均値を算出するためである。つまり、前記ずれた位置のピーク値のみが、本来の100%白レベルピーク値であるが、走査の1ラインにおける全期間での平均値からピーク値を推定すると、本来のピーク値よりも誤って小さな値に推定する。その場合、本来の理想とする白ターゲットレベルに対して過度に大きな補正値でプログラマブルゲインアンプ(Programmable Gain Amplifier:PGA)をゲイン補正することになる。その結果、正確な白補正を行うことができないという問題があった。   Specifically, when the white level peak value is at a position shifted from the intermediate position in one scanning line, the peak value of the white correction value cannot be detected correctly, and cannot be converged to the correct target white correction value. The reason for this is that according to the method of estimating the peak value from the average value over the entire period in one line of scanning, in the scanning one line, before and after the largest first peak representing 100% white level, in a close time. This is because the average value including the second largest second peak that has occurred is calculated. That is, only the peak value at the shifted position is the original 100% white level peak value, but if the peak value is estimated from the average value over the entire period in one line of scanning, the peak value is more erroneous than the original peak value. Estimate to a small value. In this case, the gain of a programmable gain amplifier (PGA) is corrected with an excessively large correction value with respect to the original ideal white target level. As a result, there has been a problem that accurate white correction cannot be performed.

本発明は、このような問題に鑑みてなされたもので、その目的とするところは、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査する1ライン中のどこにあるか分からない場合であっても、白補正のため検出すべき白レベルピーク値を正確に検出できるようにしたシェーディング補正装置及びシェーディング補正方法を提供することにある。   The present invention has been made in view of such problems, and the object of the present invention is when the peak position of the white level output from the line sensor is unknown in one line scanned by the line sensor. Even so, an object of the present invention is to provide a shading correction apparatus and a shading correction method capable of accurately detecting a white level peak value to be detected for white correction.

本発明は、このような目的を達成するためになされたもので、請求項1に記載の発明は、画像処理の対象となる原稿(11)を読み取った画像信号を黒補正してオフセット量を調整するとともに、白補正してゲインを調整するシェーディング補正装置(図1に示す実施例1)において、前記画像信号を黒補正する黒補正回路(15)と、前記黒補正回路(15)による補正後の信号を入力し所望のゲインにて増幅した後に出力する可変ゲインアンプ(18)と、前記可変ゲインアンプ(18)に接続され該可変ゲインアンプ(18)の出力信号より検出した真の白レベルピーク値に基づいて白補正を行う白補正回路(17)とを備え、前記黒補正回路(15)により黒補正するとともに、前記可変ゲインアンプ(18)を経た信号に対して前記白補正回路(17)により白補正を行うことを特徴とする。   The present invention has been made in order to achieve such an object. The invention according to claim 1 is directed to black correction of an image signal obtained by reading a document (11) to be subjected to image processing, thereby reducing an offset amount. In the shading correction apparatus (Example 1 shown in FIG. 1) that adjusts and adjusts the gain by white correction, the black correction circuit (15) that corrects the image signal to black and the correction by the black correction circuit (15) A variable gain amplifier (18) that inputs the subsequent signal, amplifies it with a desired gain and outputs it, and true white detected from the output signal of the variable gain amplifier (18) connected to the variable gain amplifier (18) A white correction circuit (17) for performing white correction based on the level peak value, and black correction is performed by the black correction circuit (15), and the signal passed through the variable gain amplifier (18) And performing white correction by the white correction circuit (17).

また、請求項2に記載の発明は、前記白補正回路(17)は、請求項1に記載のシェーディング補正装置(図3に示す実施例1)において、白レベルピーク値を検出する検出区間(1H)中に設けられた複数の移動平均区間(1−1…1−7)毎の白レベルの値から移動平均値を算出する第1平均回路(31)と、前記検出区間(1H)中に設けられた前記複数の移動平均区間(1−1…1−7)とは別の複数の移動平均区間(2−1…2−6)毎の前記白レベルの値から移動平均値を算出する第2平均回路(32)と、前記第1平均回路(31)から算出された第1移動平均値と前記第2平均回路(32)から算出された第2移動平均値とを比較していずれか一方の移動平均値を選択する選択回路(33)と、前記選択回路(33)により選択された移動平均値に基づいて白補正を行う可変ゲインアンプ(34,37)とを備えたことを特徴とする。   According to a second aspect of the present invention, the white correction circuit (17) is configured to detect a white level peak value in the shading correction device (first embodiment shown in FIG. 3) according to the first aspect. 1H), a first averaging circuit (31) for calculating a moving average value from a white level value for each of a plurality of moving average sections (1-1... 1-7) provided in 1H), and in the detection section (1H) The moving average value is calculated from the white level value for each of a plurality of moving average sections (2-1... 2-6) different from the plurality of moving average sections (1-1. A second average circuit (32) that compares the first moving average value calculated from the first average circuit (31) with the second moving average value calculated from the second average circuit (32). A selection circuit (33) for selecting one of the moving average values, and the selection circuit (33) Based on the-option moving average value, characterized in that a variable gain amplifier (34, 37) for performing white correction.

また、請求項3に記載の発明は、請求項2に記載のシェーディング補正装置(図3に示す実施例1)において、 前記検出区間(1H)中に前記複数の移動平均区間(1−1…1−7)の一区間(例えば1−1)と、前記一区間(1−1)に対応する前記別の複数の移動平均区間(2−1…2−6)の一区間(2−1)とは、時間的なずれを有することを特徴とする。   Further, the invention according to claim 3 is the shading correction apparatus according to claim 2 (Example 1 shown in FIG. 3), wherein the plurality of moving average intervals (1-1...) Are included in the detection interval (1H). 1-7) one section (for example, 1-1) and one section (2-1) of the other plurality of moving average sections (2-1 ... 2-6) corresponding to the one section (1-1) ) Is characterized by having a time lag.

また、請求項4に記載の発明は、請求項2又は請求項3に記載のシェーディング補正装置(図3に示す実施例1)において、前記選択回路(33)は、前記第1移動平均値と前記第2移動平均値とを比較して大きい方の移動平均値を選択することを特徴とする。
また、請求項5に記載の発明は、請求項1乃至請求項4のいずれかに記載のシェーディング補正装置(図10に示す実施例2)において、前記可変ゲインアンプ(18)はデジタルプログラマブルゲインアンプ(18)であり、該デジタルプログラマブルゲインアンプ(18)の前段又は後段にアナログプログラマブルゲインアンプ(13)を介挿し、該アナログプログラマブルゲインアンプ(13)に前記白補正回路(17)の出力する白補正信号を加えて前記アナログプログラマブルゲインアンプ(13)でも白補正を行うことを特徴とする。
According to a fourth aspect of the present invention, in the shading correction apparatus according to the second or third aspect (the first embodiment shown in FIG. 3), the selection circuit (33) includes the first moving average value and the first moving average value. The larger moving average value is selected by comparing with the second moving average value.
According to a fifth aspect of the present invention, in the shading correction apparatus according to any one of the first to fourth aspects (Embodiment 2 shown in FIG. 10), the variable gain amplifier (18) is a digital programmable gain amplifier. (18), an analog programmable gain amplifier (13) is inserted before or after the digital programmable gain amplifier (18), and the white color output from the white correction circuit (17) is output to the analog programmable gain amplifier (13). The correction signal is added and the analog programmable gain amplifier (13) also performs white correction.

また、請求項6に記載の発明は、画像処理の対象となる原稿(11)を読み取った画像信号を黒補正してオフセット量を調整するとともに、白補正してゲインを調整するシェーディング補正方法(図2に示す実施例1)であって、前記画像信号を黒補正するステップ(図2に示すS101)と、前記黒補正後の信号を可変ゲインアンプ(18)に入力し所望のゲインにて増幅するステップ(S102)と、前記可変ゲインアンプ(18)の出力信号より検出した真の白レベルピーク値に基づいて白補正回路(17)が白補正を行うステップ(S103)と、を含むことを特徴とする。   According to a sixth aspect of the present invention, there is provided a shading correction method in which an image signal obtained by reading a document (11) to be subjected to image processing is black corrected to adjust an offset amount, and white correction is performed to adjust a gain. 2 is a first embodiment shown in FIG. 2, in which the image signal is black-corrected (S101 shown in FIG. 2), and the black-corrected signal is input to a variable gain amplifier (18) with a desired gain. Amplifying (S102), and a white correction circuit (17) performing white correction based on the true white level peak value detected from the output signal of the variable gain amplifier (18) (S103). It is characterized by.

また、請求項7に記載の発明は、請求項6に記載のシェーディング補正方法(図9に示す実施例1)において、 前記白補正を行うステップ(図2に示すS103)は、白レベルピーク値を検出する検出区間(1H)中に複数の移動平均区間(図8(c)に示す1−1…1−7)を設けて前記移動平均区間(1−1…1−7)毎の前記白レベルの値から第1移動平均値を算出するステップ(図9に示すS111)と、前記検出区間(1H)中に前記複数の移動平均区間(1−1…1−7)とは別の複数の移動平均区間(2−1…2−6)を設けて前記別の複数の移動平均区間(図8(d)に示す2−1…2−6)毎の前記白レベルの値から第2移動平均値を算出するステップ(S112)と、前記第1移動平均値と前記第2移動平均値とを比較するステップ(S113)と、前記比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップ(S114)とを含むことを特徴とする。   According to a seventh aspect of the present invention, in the shading correction method according to the sixth aspect (Example 1 shown in FIG. 9), the step of performing the white correction (S103 shown in FIG. 2) includes a white level peak value. A plurality of moving average sections (1-1... 1-7 shown in FIG. 8C) are provided in the detection section (1H) for detecting the moving average sections (1-1... 1-7). The step of calculating the first moving average value from the white level value (S111 shown in FIG. 9) is different from the plurality of moving average sections (1-1... 1-7) in the detection section (1H). A plurality of moving average sections (2-1... 2-6) are provided, and the white level value of each of the other plurality of moving average sections (2-1... 2-6 shown in FIG. 8D) is calculated. A step of calculating two moving average values (S112), and comparing the first moving average value and the second moving average value. A step (S113) for, characterized in that it comprises a step (S114) of performing white correction based on one of the first moving average value and the second moving average value the comparison.

また、請求項8に記載の発明は、請求項7に記載のシェーディング補正方法(図1〜9に示す実施例1)において、前記検出区間(1H)中に前記複数の移動平均区間(1−1…1−7)の一区間(例えば1−1)と、前記区間(1−1)に対応する前記別の複数の移動平均区間(2−1…2−6)の一区間(2−1)とは、時間的なずれを有することを特徴とする。   The invention according to claim 8 is the shading correction method according to claim 7 (the first embodiment shown in FIGS. 1 to 9), wherein the plurality of moving average intervals (1− 1 ... 1-7) (e.g., 1-1) and one of the other moving average intervals (2-1 ... 2-6) corresponding to the interval (1-1) (2- 1) is characterized in that there is a time lag.

また、請求項9に記載の発明は、請求項7又は請求項8に記載のシェーディング補正方法(図1〜9に示す実施例1)において、前記比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップ(S114)では、前記第1移動平均値と第2移動平均値とを比較するステップ(S113)により大きいと判定された方の移動平均値を用いることを特徴とする。   The invention according to claim 9 is the shading correction method according to claim 7 or claim 8 (Example 1 shown in FIGS. 1 to 9), wherein the compared first moving average value and second movement are compared. In the step of performing white correction based on either one of the average values (S114), the moving average determined to be larger than the step (S113) of comparing the first moving average value and the second moving average value It is characterized by using a value.

また、請求項10に記載の発明は、請求項6乃至請求項9のいずれかに記載のシェーディング方法(図10に示す実施例2)において、前記可変ゲインアンプ(18)はデジタルプログラマブルゲインアンプ(18)であり、該デジタルプログラマブルゲインアンプ(18)の前段又は後段に介挿されたアナログプログラマブルゲインアンプ(13)に前記白補正回路17の出力する白補正信号を加えて前記アナログプログラマブルゲインアンプ(13)でも白補正を行うことを特徴とする。   The invention described in claim 10 is the shading method according to any one of claims 6 to 9 (second embodiment shown in FIG. 10), wherein the variable gain amplifier (18) is a digital programmable gain amplifier ( 18), and adding the white correction signal output from the white correction circuit 17 to the analog programmable gain amplifier (13) inserted before or after the digital programmable gain amplifier (18), the analog programmable gain amplifier ( 13) is also characterized in that white correction is performed.

また、請求項11に記載の発明は、請求項7に記載のシェーディング補正方法(図9に示す実施例1)において、前記比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップ(S114)では、前記複数の移動平均区間(1−1…1−7,2−1…2−6)における各移動平均区間の終了時に、いずれか一方の移動平均値を選択することを特徴とする。   The invention described in claim 11 is the shading correction method according to claim 7 (the first embodiment shown in FIG. 9), which is one of the compared first moving average value and second moving average value. In the step of performing white correction based on one (S114), at the end of each moving average section in the plurality of moving average sections (1-1... 1-7, 2-1. A moving average value is selected.

本発明によれば、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査する1ライン中のどこにあるか分からない場合であっても、白補正のため検出すべき白レベルピーク値を正確に検出できるようにしたシェーディング補正装置及びシェーディング補正方法を提供することができる。   According to the present invention, the white level peak value to be detected for white correction can be obtained even when the peak position of the white level output from the line sensor is unknown in one line scanned by the line sensor. It is possible to provide a shading correction apparatus and a shading correction method that can be accurately detected.

本発明に係るシェーディング補正装置の実施例1を説明するためのブロック構成図である。It is a block block diagram for demonstrating Example 1 of the shading correction apparatus which concerns on this invention. 本発明係るシェーディング補正方法の実施例1を説明するためのフローチャートを示す図である。It is a figure which shows the flowchart for demonstrating Example 1 of the shading correction method which concerns on this invention. 本発明に係るシェーディング補正装置の実施例1における白補正回路を説明するためのブロック構成図である。It is a block block diagram for demonstrating the white correction circuit in Example 1 of the shading correction apparatus which concerns on this invention. 本発明に係るシェーディング補正装置の実施例1,2における移動平均による白補正の動作全体を示すフローチャートを示す図である。It is a figure which shows the flowchart which shows the whole operation | movement of the white correction by the moving average in Example 1, 2 of the shading correction apparatus based on this invention. ラインセンサのオフセット及びゲインのバラツキに関する説明図である。It is explanatory drawing regarding the offset and gain variation of a line sensor. (a)乃至(c)は、走査の1ラインにおいて、ラインセンサ出力のピークが一つのため、ピーク値が正確に得られる場合の説明図である。(a)は、白レベルピーク値である。(b)は、白レベルピーク検出区間である。(c)は、白レベルピーク検出値である。(A) thru | or (c) is explanatory drawing in case a peak value is obtained correctly in one line of scanning, since there is one line sensor output peak. (A) is a white level peak value. (B) is a white level peak detection section. (C) is a white level peak detection value. (a)乃至(c)は、走査の1ラインにおいて、ラインセンサ出力に二つのピークを有するため、白レベルピーク値が不正確になる場合の説明図である。(a)は、白レベルピーク値である。(b)は、白レベルピーク検出区間である。(c)は、白レベルピーク検出値である。(A) thru | or (c) are explanatory drawings in case a white level peak value becomes inaccurate because it has two peaks in the line sensor output in one line of scanning. (A) is a white level peak value. (B) is a white level peak detection section. (C) is a white level peak detection value. (a)乃至(f)は、走査の1ラインにおいて、ラインセンサ出力に二つのピークを有するため、移動平均値を検出する説明図である。(a)は、白レベルピーク値である。(b)検出区間である。(c)は、検出タイミング1による移動平均区間である。(d)は、検出タイミング2による移動平均区間である。(e)は、検出タイミング1による白レベルピーク値である。(f)は、検出タイミング2による白レベルピーク値である。(A) thru | or (f) is explanatory drawing which detects a moving average value since it has two peaks in a line sensor output in 1 line of scanning. (A) is a white level peak value. (B) A detection interval. (C) is a moving average section at detection timing 1. (D) is a moving average section based on the detection timing 2. (E) is a white level peak value at detection timing 1. (F) is a white level peak value at the detection timing 2. 本発明に係るシェーディング補正方法の実施例1において、移動平均による白補正の動作を説明するフローチャートを示す図である。It is a figure which shows the flowchart explaining the operation | movement of the white correction by a moving average in Example 1 of the shading correction method which concerns on this invention. 本発明に係るシェーディング補正装置の実施例2を説明するためのブロック構成図である。It is a block block diagram for demonstrating Example 2 of the shading correction apparatus which concerns on this invention.

以下、図面を参照して本発明の各実施例について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

以下、図1〜図9を参照して本発明の実施例1について説明する。
図1は、本発明に係るシェーディング補正装置の実施例1を説明するためのブロック構成図である。図1に示すシェーディング補正装置100は、ラインセンサ12と、アナログ/デジタル変換器(ADC)16と、黒補正回路15と、デジタル/アナログ変換器(DAC)14と、加減算器19と、デジタルPGA18と、白補正回路17とを備えている。ラインセンサ12はCCD等で構成されており、原稿11の読み取りに応じたアナログ値による真の信号成分と、オフセットやゲインのバラツキとを含んだ信号を出力する。加減算器19は、ラインセンサ12の出力信号からDAC14の出力信号を減算してアナログ/デジタル(ADC)変換器16へ入力する。
Hereinafter, Embodiment 1 of the present invention will be described with reference to FIGS.
FIG. 1 is a block diagram for explaining a first embodiment of a shading correction apparatus according to the present invention. A shading correction apparatus 100 shown in FIG. 1 includes a line sensor 12, an analog / digital converter (ADC) 16, a black correction circuit 15, a digital / analog converter (DAC) 14, an adder / subtractor 19, and a digital PGA 18. And a white correction circuit 17. The line sensor 12 is constituted by a CCD or the like, and outputs a signal including a true signal component based on an analog value corresponding to reading of the document 11 and variations in offset and gain. The adder / subtracter 19 subtracts the output signal of the DAC 14 from the output signal of the line sensor 12 and inputs it to the analog / digital (ADC) converter 16.

黒補正回路15は、ADC16を経てデジタル化されたデジタル信号に対して黒補正する。DAC14は黒補正回路15の出力信号として表れるオフセット量をデジタル/アナログ(D/A)変換したアナログ信号を加減算器19へ減算入力する。加減算器19で、ラインセンサ12の出力信号からDAC14の出力信号を減算してADC16へ入力する。ADC16は、加減算器19の出力をアナログ/デジタル(A/D)変換してデジタルプログラマブルゲインアンプ(Digital Programmable Gain Amplifier:PGA)18へ入力する。白補正回路17は、デジタルPGA18のデジタル出力信号に基づいて、デジタルPGA18に対する白補正を行う。その結果、デジタルPGA18は、白補正回路17の出力信号に基づいて、それぞれ最適ゲインに調整される。   The black correction circuit 15 performs black correction on the digital signal digitized through the ADC 16. The DAC 14 subtracts and inputs to the adder / subtracter 19 an analog signal obtained by digital / analog (D / A) conversion of an offset amount appearing as an output signal of the black correction circuit 15. The adder / subtracter 19 subtracts the output signal of the DAC 14 from the output signal of the line sensor 12 and inputs the result to the ADC 16. The ADC 16 performs analog / digital (A / D) conversion on the output of the adder / subtractor 19 and inputs the result to a digital programmable gain amplifier (PGA) 18. The white correction circuit 17 performs white correction on the digital PGA 18 based on the digital output signal of the digital PGA 18. As a result, the digital PGA 18 is adjusted to an optimum gain based on the output signal of the white correction circuit 17.

図1に示す実施例1のシェーディング補正装置100は、画像処理の対象となる原稿11を読み取った画像信号を黒補正してオフセット量を調整するとともに、白補正してゲインを調整することにより、シェーディング補正を行う。このシェーディング補正装置100は、画像信号を黒補正する黒補正回路15と、その黒補正回路15による補正後の信号を入力し所望のゲインにて増幅した後に出力する可変ゲインアンプ18と、その可変ゲインアンプ18に接続されておりその可変ゲインアンプ18の出力信号より検出した真の白レベルピーク値に基づいて白補正を行う白補正回路17と、を備えている。そして、黒補正回路15により黒補正するとともに、可変ゲインアンプ18を経た信号に対して前記白補正回路17により白補正を行う。なお、可変ゲインアンプ18は、上述したデジタルPGA18である。   The shading correction apparatus 100 according to the first embodiment illustrated in FIG. 1 adjusts an offset amount by performing black correction on an image signal obtained by reading a document 11 to be subjected to image processing, and adjusts a gain by performing white correction. Perform shading correction. The shading correction apparatus 100 includes a black correction circuit 15 that black corrects an image signal, a variable gain amplifier 18 that receives a signal corrected by the black correction circuit 15, amplifies the signal with a desired gain, and outputs the amplified signal. And a white correction circuit 17 that is connected to the gain amplifier 18 and performs white correction based on the true white level peak value detected from the output signal of the variable gain amplifier 18. Then, the black correction circuit 15 performs black correction, and the white correction circuit 17 performs white correction on the signal that has passed through the variable gain amplifier 18. The variable gain amplifier 18 is the digital PGA 18 described above.

そして、このシェーディング補正装置100の主要動作は、下記(1)〜(3)に示す順に実行される。
(1)黒補正値の検出動作を行う。
(2)白補正値の検出動作を行う。
(3)原稿の読み取り動作を行う。
つまり、(2)白補正値の検出動作の前に、(1)黒補正が必要であり、(3)原稿の読み取り動作には、(1)黒補正と(2)白補正と両方の完了が必須要件となる。
And the main operation | movement of this shading correction apparatus 100 is performed in the order shown to following (1)-(3).
(1) A black correction value detection operation is performed.
(2) A white correction value detection operation is performed.
(3) A document reading operation is performed.
That is, (1) black correction is required before (2) white correction value detection operation, and (3) original reading operation is completed with both (1) black correction and (2) white correction. Is an essential requirement.

図1に示す実施例1に係るシェーディング補正装置100による、シェーディング補正方法は、以下にフローチャートを示す図に示すとおりであり、ラインセンサ12の出力を黒補正してオフセット量を調整するとともに、白補正してゲインを調整する。   The shading correction method performed by the shading correction apparatus 100 according to the first embodiment shown in FIG. 1 is as shown in the flowchart below. The output of the line sensor 12 is black corrected to adjust the offset amount and Correct and adjust the gain.

図2は、本発明に係る本実施例1におけるシェーディング補正方法を説明するためのフローチャートを示す図である。すなわち、このシェーディング補正方法は、画像処理の対象となる原稿11を読み取った画像信号を黒補正してオフセット量を調整するとともに、白補正してゲインを調整するシェーディング補正方法である。このシェーディング補正方法の手順は以下のとおりである。まず画像信号を黒補正する。(S101)S101で黒補正された後の信号を可変ゲインアンプ18に入力して、所望のゲインにて増幅する。(S102)白補正回路17が、S102で増幅された出力信号より検出した真の白レベルピーク値に基づいて白補正を行うことによりシェーディング補正が完了する。(S103)   FIG. 2 is a flowchart for explaining the shading correction method according to the first embodiment of the present invention. That is, this shading correction method is a shading correction method in which an image signal obtained by reading an original 11 to be subjected to image processing is black-corrected to adjust an offset amount, and white is corrected to adjust a gain. The procedure of this shading correction method is as follows. First, the image signal is black corrected. (S101) The signal after the black correction in S101 is input to the variable gain amplifier 18 and amplified with a desired gain. (S102) The white correction circuit 17 completes the shading correction by performing white correction based on the true white level peak value detected from the output signal amplified in S102. (S103)

図3は、白補正回路17の構成を示すブロック構成図である。図3に示す白補正回路17は、タイミング平均回路30と、2to1セレクタ33,35と、比較器34,37と、レジスタ36,38と、制御回路39とを備えて構成されている。タイミング平均回路30は、デジタルPGA18の出力を分配するように並列に接続されたタイミング1平均回路31及びタイミング2平均回路32を有し、それらタイミング1平均回路31とタイミング2平均回路32それぞれの出力は、2to1セレクタ33に入力される。   FIG. 3 is a block diagram showing the configuration of the white correction circuit 17. The white correction circuit 17 shown in FIG. 3 includes a timing averaging circuit 30, 2 to 1 selectors 33 and 35, comparators 34 and 37, registers 36 and 38, and a control circuit 39. The timing average circuit 30 includes a timing 1 average circuit 31 and a timing 2 average circuit 32 connected in parallel so as to distribute the output of the digital PGA 18, and outputs of the timing 1 average circuit 31 and the timing 2 average circuit 32 respectively. Is input to the 2to1 selector 33.

制御回路39の制御信号は、2to1セレクタ33の選択的ロード条件として入力される。また、制御回路39はタイミング1を生成して、タイミング1平均回路31を制御するとともに、タイミング2を生成して、タイミング2平均回路32を制御している。2to1セレクタ33の選択出力は、比較器34へ入力されるとともに、2to1セレクタ35の選択肢として入力される。また、比較器34の出力は2to1セレクタ35へ制御信号として入力される。レジスタ36に格納されているデータは、比較器34,37に、それぞれ入力されるとともに、2to1セレクタ35の選択肢として入力される。予めレジスタ38に格納されている白補正ターゲットレベルは、比較器37で参照値として用いられる。   The control signal of the control circuit 39 is input as a selective load condition of the 2to1 selector 33. The control circuit 39 generates the timing 1 to control the timing 1 average circuit 31 and also generates the timing 2 to control the timing 2 average circuit 32. The selection output of the 2to1 selector 33 is input to the comparator 34 and input as an option of the 2to1 selector 35. The output of the comparator 34 is input to the 2to1 selector 35 as a control signal. The data stored in the register 36 is input to the comparators 34 and 37, and is input as an option of the 2to1 selector 35. The white correction target level stored in advance in the register 38 is used as a reference value by the comparator 37.

以下、白補正回路17の動作を簡単に説明する。白補正期間になると、デジタルPGA18から、白レベル相当の信号が入力され、タイミング1平均回路31とタイミング2平均回路32にて、それぞれ平均値が演算される。また、制御回路39では、図8(c)〜(f)に沿って後述する、タイミング1とタイミング2が生成されている。この制御回路39は、2to1セレクタ33に、選択的ロード条件となる制御信号を与えている。そのため、2to1セレクタ33は、タイミング1によるタイミング1平均回路31の演算結果と、タイミング2によるタイミング2平均回路32の演算結果とを、半相遅れの関係で、相互に選択して取り込むように動作する。   Hereinafter, the operation of the white correction circuit 17 will be briefly described. In the white correction period, a signal corresponding to the white level is input from the digital PGA 18, and the average value is calculated by the timing 1 averaging circuit 31 and the timing 2 averaging circuit 32, respectively. Further, in the control circuit 39, timing 1 and timing 2, which will be described later along FIGS. 8C to 8F, are generated. This control circuit 39 gives a control signal as a selective load condition to the 2to1 selector 33. Therefore, the 2to1 selector 33 operates so as to select and fetch the calculation result of the timing 1 average circuit 31 based on the timing 1 and the calculation result of the timing 2 average circuit 32 based on the timing 2 in a half-phase delay relationship. To do.

その結果、2to1セレクタ33の出力端子には、タイミング1平均回路31と、タイミング2平均回路32と、それぞれの移動平均値が得られる。2to1セレクタ33は、比較器34によりタイミング1とタイミング2との移動平均区間毎の大小比較を行う。そして、2to1セレクタ33は、制御回路39により生成された信号により、タイミング1とタイミング2の移動平均区間が、それぞれ終了する度に、タイミング1平均回路31とタイミング2平均回路32の演算結果の大きい方を選択して比較器34へ入力する。なお、タイミング1とタイミング2との移動平均区間毎の大小比較は、図8(c),(d)に沿って後述する、1−1対2−1,2−1対1−2,…,2−6対1−7、という組み合わせによって大小の比較を継続する。   As a result, the moving average values of the timing 1 averaging circuit 31 and the timing 2 averaging circuit 32 are obtained at the output terminal of the 2to1 selector 33. The 2to1 selector 33 uses the comparator 34 to compare the magnitudes of the timing 1 and the timing 2 for each moving average section. The 2to1 selector 33 has a large calculation result of the timing 1 average circuit 31 and the timing 2 average circuit 32 each time the moving average interval of the timing 1 and the timing 2 is ended by the signal generated by the control circuit 39. Is selected and input to the comparator 34. In addition, the size comparison for each moving average section between the timing 1 and the timing 2 will be described later with reference to FIGS. 8C and 8D, 1-1 to 2-1, 2-1 to 1-2,. , 2-6 vs. 1-7, and the comparison is continued.

次に、比較器34は、前述の移動平均区間において、2to1セレクタ33で選択された演算結果と、レジスタ36に格納されている前回の移動平均区間のデータとを比較した結果を、2to1セレクタ35へ制御信号として入力する。2to1セレクタ35は、レジスタ36に格納される白レベルピーク値として、移動平均区間毎に更新される値を選択している。このように、移動平均区間毎にタイミング1及びタイミング2で、白レベルピーク値が更新されることにより、移動平均を算出している。白補正期間が終了すると、比較器37は、レジスタ38に格納されている白補正ターゲットレベルを参照値として、レジスタ36の出力を比較し、その比較結果を出力する。白補正回路17は、比較器37の出力する比較結果に基づいて、デジタルPGA18のゲインを、白補正ターゲットレベルに合わせるように制御する。   Next, the comparator 34 compares the calculation result selected by the 2to1 selector 33 with the data of the previous moving average section stored in the register 36 in the above-described moving average section, and the 2to1 selector 35. As a control signal. The 2to1 selector 35 selects a value updated for each moving average section as the white level peak value stored in the register 36. Thus, the moving average is calculated by updating the white level peak value at timing 1 and timing 2 for each moving average section. When the white correction period ends, the comparator 37 compares the output of the register 36 using the white correction target level stored in the register 38 as a reference value, and outputs the comparison result. The white correction circuit 17 controls the gain of the digital PGA 18 to match the white correction target level based on the comparison result output from the comparator 37.

次に、黒補正が行われた後の白補正の動作に関して、以下に説明する。
図4は、本発明に係るシェーディング補正装置の実施例1,2における移動平均による白補正の動作全体を示すフローチャートを示す図である。図4に示すように、白補正期間が開始されると設定ライン数と実行回数とを比較する。(ステップS1)ステップS1において、「設定ライン数>実行回数」がYes、すなわち、設定ライン数よりも実行回数が少ないならば、設定ライン毎に白補正期間の移動平均値を演算してピーク値を検出する。(ステップS2)ステップS2で検出したピーク値と、ターゲット値とを比較して、ファインゲインの決定が完了したかどうかを判断する。(ステップS4)なお、ここで、ステップS2からステップS4へと、動作が進んでいる。
Next, the white correction operation after the black correction is performed will be described below.
FIG. 4 is a flowchart showing the entire white correction operation by moving average in the first and second embodiments of the shading correction apparatus according to the present invention. As shown in FIG. 4, when the white correction period is started, the number of set lines is compared with the number of executions. (Step S1) In step S1, if “the number of set lines> the number of executions” is Yes, that is, if the number of executions is less than the number of set lines, the moving average value of the white correction period is calculated for each set line to obtain the peak value Is detected. (Step S2) The peak value detected in Step S2 is compared with the target value to determine whether or not the fine gain has been determined. (Step S4) Here, the operation proceeds from step S2 to step S4.

図4は、実施例1と実施例2を兼用する図である。図4における、実施例1と実施例2との違いは、ステップS3およびステップS5の有無であり、実施例2では実行されるステップS3およびステップS5が、実施例1では省略されている。
ステップS4でNo、すなわちファインゲインが未決定ならば、デジタルPGA18のゲインを変更する。(ステップS6)ステップS6で、デジタルPGA18のゲインが変更されたならば、ステップS1に戻って設定ライン数と回数とを比較することを繰り返す。ステップS4でYes、すなわちファインゲインの決定が完了したならば、白補正が終了する。(ステップS7)
FIG. 4 is a diagram combining the first embodiment and the second embodiment. In FIG. 4, the difference between the first embodiment and the second embodiment is the presence or absence of steps S3 and S5. In the second embodiment, steps S3 and S5 executed in the second embodiment are omitted.
If No in step S4, that is, if the fine gain has not been determined, the gain of the digital PGA 18 is changed. (Step S6) If the gain of the digital PGA 18 is changed in step S6, the process returns to step S1 and the comparison of the number of set lines and the number of times is repeated. If YES in step S4, that is, if the fine gain determination is completed, the white correction ends. (Step S7)

図5は、ラインセンサのオフセット及びゲインのバラツキに関する説明図である。なお、オフセットとは、図5の斜線部に示すように、例えば不図示の基準黒色板を走査する際、ラインセンサへの照射光を無くした状態 において、ラインセンサの各画素が本来出力すべき基準信号と、実際のラインセンサ出力値との差分のことである 。また、ゲインのバラツキとは、例えば不図示の基準白色板を走査することにより、ラインセンサに照射する光量を所定量とした状態において、ラインセンサの各画素の出力信号は、走査の1ラインにおいて、本来フラットになるべきところを、光学系の歪み、傷等によって、ピーク値が増減することをいう。このゲインのバラツキを補正するには、ピーク値を基準として、例えばピーク値の0.5倍の出力信号の画素のゲインを「2(=1/0.5)」となるようにし、各画素の所定光量照射状態での出力特性をフラットにする。   FIG. 5 is an explanatory diagram relating to variations in offset and gain of the line sensor. As indicated by the hatched portion in FIG. 5, the offset is, for example, that each pixel of the line sensor should originally output in the state where the irradiation light to the line sensor is eliminated when scanning a reference black plate (not shown). It is the difference between the reference signal and the actual line sensor output value. Also, the gain variation is, for example, when a light amount irradiated to the line sensor is set to a predetermined amount by scanning a reference white plate (not shown), and the output signal of each pixel of the line sensor is in one scanning line. What is supposed to be flat means that the peak value increases or decreases due to distortion or scratches of the optical system. In order to correct this gain variation, for example, the pixel gain of the output signal 0.5 times the peak value is set to “2 (= 1 / 0.5)” with the peak value as a reference, and each pixel The output characteristics in a predetermined light quantity irradiation state are flattened.

また、本明細書において、画素毎のオフセットを「黒歪み」という。そして、この黒歪みを補正することを「黒補正」という。この黒補正については、ラインセンサへの照射光を無くした状態でのラインセンサ出力を、A/D変換することによりオフセット補正値を検出する。また、画素毎のゲインバラツキを「白歪み」という。この白歪みを補正することを「白補正」という。この白補正については、ラインセンサへの照射光量を所定量にすべく基準白色板を走査させた場合のラインセンサ出力をA/D変換することによりゲインバラツキ補正値を検出する。   In this specification, the offset for each pixel is referred to as “black distortion”. Correcting this black distortion is called “black correction”. For this black correction, the offset correction value is detected by A / D converting the output of the line sensor in a state where the irradiation light to the line sensor is eliminated. The gain variation for each pixel is called “white distortion”. Correcting this white distortion is called “white correction”. For this white correction, the gain variation correction value is detected by A / D converting the line sensor output when the reference white plate is scanned so that the amount of light applied to the line sensor is a predetermined amount.

なお、黒補正を行った後、白補正も行う必要がある。つまり、原稿等の読み取り対象画像を、ラインセンサで走査した時に得られるラインセンサの出力信号に対して、黒補正と白補正を行うことによりシェーディング補正が完了する。   Note that it is necessary to perform white correction after performing black correction. That is, the shading correction is completed by performing black correction and white correction on the output signal of the line sensor obtained when the image to be read such as a document is scanned by the line sensor.

次に、白補正に必要な白レベルピーク値及び、そのピーク値検出のための演算タイミング等について、以下に説明する。
図6は、走査の1ラインにおいて、ラインセンサ出力のピークが一つのため、ピーク値が正確に得られる場合の説明図である。図6(a)は、白レベルピーク値である。図6(b)は、白レベルピーク検出区間である。図6(c)は、白レベルピーク検出値である。図6(a)に示す走査の1ラインにおいて、その中央の位置に、白レベルピーク値があった場合、図6(b)に示すように、走査の1ラインに相当する白レベルピーク検出区間を設定し、その白レベルピーク検出区間1Hで平均値を演算することにより、白補正値に必要なピーク値を決定することができる。このようにして決定された白補正値のピーク値を用いて、図1に沿って上述したシェーディング補正装置100のデジタルPGA18のゲインを適正レベルに制御することにより、ターゲット白補正値に収束させることができる。
Next, a white level peak value necessary for white correction, a calculation timing for detecting the peak value, and the like will be described below.
FIG. 6 is an explanatory diagram in the case where the peak value is obtained accurately because one line sensor output has one peak in one scanning line. FIG. 6A shows the white level peak value. FIG. 6B shows a white level peak detection section. FIG. 6C shows a white level peak detection value. When a white level peak value exists at the center position in one line of scanning shown in FIG. 6A, as shown in FIG. 6B, a white level peak detection section corresponding to one line of scanning is obtained. And the average value is calculated in the white level peak detection section 1H, and the peak value required for the white correction value can be determined. By using the peak value of the white correction value determined in this way, the gain of the digital PGA 18 of the shading correction apparatus 100 described above with reference to FIG. Can do.

つまり、白レベルピーク値を検出する際に、白レベルピーク検出区間を設定し、その区間の平均値を算出して、白ターゲットレベルに対しての大小でPGAを動作させ、白補正を行うものである。ここで、白補正期間において、ラインセンサを走査している1ライン中のどこがピークであるかがわかっている場合、すなわち、白レベルピーク値が、図6(a)に示すような中央にあった場合は、図6(b)に示すように白レベルピーク検出区間1Hとして設定する。その白レベルピーク検出区間1Hで平均値を演算して、白補正値のピーク値を決定することができ、ターゲット白補正値に収束させることができる。   That is, when detecting the white level peak value, the white level peak detection section is set, the average value of the section is calculated, the PGA is operated with respect to the white target level, and white correction is performed. It is. Here, in the white correction period, when it is known where the peak is in one line scanning the line sensor, that is, the white level peak value is at the center as shown in FIG. In such a case, the white level peak detection section 1H is set as shown in FIG. The average value can be calculated in the white level peak detection section 1H to determine the peak value of the white correction value, and can be converged to the target white correction value.

しかしながら、上述した方法において、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査している1ライン中のどこにあるか分からない場合、白補正するために検出すべき白レベルピーク値を、正確に検出することはできない。このような不具合に関し、以下に説明する。   However, in the above-described method, if it is not known where the peak position of the white level output from the line sensor is in one line that is scanning the line sensor, the white level peak value to be detected for white correction is determined. , Can not be detected accurately. Such a problem will be described below.

図7は、走査の1ラインにおいて、ラインセンサ出力に二つのピークを有するため、白レベルピーク値が不正確になる場合の説明図である。図7(a)は、白レベルピーク値である。図7(b)は、白レベルピーク検出区間である。図7(c)は、白レベルピーク検出値である。なお、図7(b)に示した検出区間1Hと、図7(c)に示した検出値の平均値については、他図も交えて後述する。   FIG. 7 is an explanatory diagram when the white level peak value becomes inaccurate because one line of scanning has two peaks in the line sensor output. FIG. 7A shows a white level peak value. FIG. 7B shows a white level peak detection section. FIG. 7C shows white level peak detection values. The detection interval 1H shown in FIG. 7B and the average value of the detection values shown in FIG. 7C will be described later with reference to other figures.

図7に示すように、白レベルピーク値を検出する際に、白レベルピーク検出区間1Hを設定し、その区間における検出値の平均値を算出する。図7(c)に示した平均値を用い、本来の理想値である白ターゲットレベルを目標値として参照するようにPGAを動作させて白補正を行うことが可能である。具体的には、図3に示した白補正回路17が、デジタルPGA18のゲインを適正に制御する。   As shown in FIG. 7, when detecting the white level peak value, the white level peak detection section 1H is set, and the average value of the detection values in that section is calculated. Using the average value shown in FIG. 7C, it is possible to perform white correction by operating the PGA so that the white target level, which is the original ideal value, is referred to as the target value. Specifically, the white correction circuit 17 shown in FIG. 3 appropriately controls the gain of the digital PGA 18.

例えば、白レベルピーク値が、図7に示すように若干右にずれた位置にあった場合、正しく白補正値のピーク値を検出できず、ターゲット白補正値に収束しない。右にずれた位置に表れたピーク値が、本来の白レベルピーク値である。しかし、白レベルピーク検出区間1Hの全期間(以下、区間1Hという)における平均値を算出すると、本来の白レベルの第1ピークの左肩に位置する第2ピーク分も加算してしまうことになる。したがって、本来の第1ピーク値のみの値よりも小さな平均値になる。その場合、白ターゲットレベルに対する本来の理想よりも、不必要に大きな補正値を用いてPGAをゲイン制御するので、白補正の結果は不正確である。   For example, when the white level peak value is at a position slightly shifted to the right as shown in FIG. 7, the peak value of the white correction value cannot be detected correctly and does not converge to the target white correction value. The peak value appearing at the position shifted to the right is the original white level peak value. However, if the average value of the entire white level peak detection section 1H (hereinafter referred to as section 1H) is calculated, the second peak located on the left shoulder of the first peak of the original white level is also added. . Therefore, the average value is smaller than the original first peak value alone. In this case, since the gain of the PGA is controlled using a correction value that is unnecessarily larger than the original ideal for the white target level, the result of white correction is inaccurate.

図8(a)乃至(f)は、走査の1ラインにおいて、ラインセンサ出力に二つのピークを有するため、移動平均値を検出する説明図である。図8(a)は、白レベルピーク値である。図8(b)は、検出区間である。図8(c)は、検出タイミング1による移動平均区間である。図8(d)は、検出タイミング2による移動平均区間である。図8(e)は、検出タイミング1による白レベルピーク値である。図8(f)は、検出タイミング2による白レベルピーク値である。そして、走査1ライン中における白レベルピーク値を検出する際に、図8(b)に示す白レベルピーク検出区間1H中、図8(c)に示す移動平均区間1−1…1−7を設定し、それら各区間の移動平均を算出する。算出された区間ごとの移動平均値が、白ターゲットレベルに対して大きければ、デジタルPGA18(図1)のゲインを下げ、移動平均値が白ターゲットレベルより小さければ、デジタルPGA18のゲインを上げるように制御する。   FIGS. 8A to 8F are explanatory diagrams for detecting the moving average value because one line of scanning has two peaks in the line sensor output. FIG. 8A shows the white level peak value. FIG. 8B is a detection section. FIG. 8C shows a moving average section based on the detection timing 1. FIG. 8D shows a moving average section based on the detection timing 2. FIG. 8E shows the white level peak value at the detection timing 1. FIG. 8F shows the white level peak value at the detection timing 2. Then, when detecting the white level peak value in one scanning line, the moving average section 1-1... 1-7 shown in FIG. 8C is included in the white level peak detection section 1H shown in FIG. Set and calculate the moving average of each section. If the calculated moving average value for each section is larger than the white target level, the gain of the digital PGA 18 (FIG. 1) is decreased, and if the moving average value is smaller than the white target level, the gain of the digital PGA 18 is increased. Control.

図8(a),(e),(f)に示すように、走査1ライン中のラインセンサ出力に二つのピークを有する場合も、移動平均値を算出することにより、ピーク値を、ある程度推定することができる。しかし、白レベル検出タイミング1のみでは、同一区間内に小さな山と谷とが混在して差異が生じない等の原因により、ピークの検出を失敗する可能性がある。そこで、図8(c),(d)に示すように、白レベルピーク検出区間1H中に、白レベル検出タイミング1と、その白レベル検出タイミング1から、移動平均区間1−1の半分の時間(以下、半相という)だけずらした白レベル検出タイミング2を設定する。このように検出タイミング1における1サイクルの移動平均区間の開始時と終了時との時刻設定(以下、位相という)とは、位相差を持たせた2つのタイミングを設定する。これら、検出タイミング1と検出タイミング2と、それぞれのタイミングの移動平均区間ごとに算出した移動平均値によってピーク値を推定する。こうすることにより、一方の検出タイミング1で算出した移動平均値から上述したピークの検出失敗が生じても、他方の検出タイミング2で算出した移動平均値で補うことが可能である。その結果、白レベルの正確なピーク値を検出することができる。   As shown in FIGS. 8A, 8E, and 8F, even when the line sensor output in one scanning line has two peaks, the peak value is estimated to some extent by calculating the moving average value. can do. However, only with the white level detection timing 1, there is a possibility that the peak detection may fail due to a reason that a small peak and valley are mixed in the same section and no difference occurs. Therefore, as shown in FIGS. 8C and 8D, during the white level peak detection section 1H, the white level detection timing 1 and the half time of the moving average section 1-1 from the white level detection timing 1 are shown. A white level detection timing 2 shifted by (hereinafter referred to as half phase) is set. As described above, the time setting (hereinafter referred to as phase) at the start and end of the moving average section of one cycle at detection timing 1 sets two timings having a phase difference. The peak value is estimated based on the detection timing 1 and the detection timing 2 and the moving average value calculated for each moving average section at each timing. By doing so, even if the above-described peak detection failure occurs from the moving average value calculated at one detection timing 1, it is possible to compensate with the moving average value calculated at the other detection timing 2. As a result, an accurate peak value of the white level can be detected.

また、ピークが鋭い場合においても、移動平均区間の長さ(以下、周期という)を調整できるようにすることで、より細かく正確にピーク検出できる。また、白レベルピーク値を更新するタイミングは、白レベルピーク検出区間の移動平均区間1−1…1−7,2−1…2−7が、それぞれ終了する都度に更新される。例えば、図8(c),(d)に示す1−1対2−1,2−1対1−2,…,2−6対1−7、という組み合わせによって大小の比較を継続する。例えば、2−3と1−4と2−4とを連続的に大小関係を比較していけば、最大値を示す1−4又は2−4がピーク値であろうと推定される。そうすると、走査1ライン中のラインセンサ出力に二つのピークを有する場合も、第2ピークが検出された後に、より大きい第1ピークが検出された場合は、そちらが真のピーク値であるものとして更新される。その結果、白補正のため検出すべき白レベルピーク値を正確に検出できる。なお、ここでは、移動平均区間1−4と、移動平均区間2−4とで、それぞれの移動平均値の大小関係を比較した結果、移動平均区間1−4に真のピーク値である最大値が検出される。   Even when the peak is sharp, the peak can be detected more finely and accurately by adjusting the length of the moving average section (hereinafter referred to as the period). Further, the timing for updating the white level peak value is updated every time the moving average sections 1-1... 1-7, 2-1. For example, the size comparison is continued by the combination of 1-1 to 2-1, 2-1 to 1-2,..., 2-6 to 1-7 shown in FIGS. For example, if 2-3, 1-4, and 2-4 are continuously compared in magnitude, it is estimated that 1-4 or 2-4 indicating the maximum value will be the peak value. Then, even if the line sensor output in one scanning line has two peaks, if a larger first peak is detected after the second peak is detected, it is assumed that there is a true peak value. Updated. As a result, the white level peak value to be detected for white correction can be accurately detected. Here, as a result of comparing the magnitude relation of the moving average values in the moving average section 1-4 and the moving average section 2-4, the maximum value that is a true peak value in the moving average section 1-4 is shown here. Is detected.

なお、移動平均値の選択について、制御回路39により生成された信号により、タイミング1とタイミング2の移動平均区間が、それぞれ終了する度に、2to1セレクタ33は、タイミング1平均回路31の演算結果である第1移動平均値と、タイミング2平均回路32の演算結果である第2移動平均値とを比較して、いずれか大きい方を選択して次の処理へと出力する。白補正回路17は、第1移動平均値と、第2移動平均値とを比較して、大きい方の移動平均値を選択し、選択した大きい方の移動平均値に基づいて、アナログPGA13のゲイン及びデジタルPGA18のゲインを、白補正ターゲットレベルに合わせるように制御する。なお、場合によっては、必ずしも、大きい方の移動平均値を選択する方法に限定するものではない。   Note that, regarding the selection of the moving average value, the 2to1 selector 33 indicates the calculation result of the timing 1 averaging circuit 31 every time the moving average interval of the timing 1 and the timing 2 is ended by the signal generated by the control circuit 39. The first moving average value is compared with the second moving average value that is the calculation result of the timing 2 averaging circuit 32, and the larger one is selected and output to the next processing. The white correction circuit 17 compares the first moving average value and the second moving average value, selects the larger moving average value, and based on the selected larger moving average value, gain of the analog PGA 13 The gain of the digital PGA 18 is controlled to match the white correction target level. In some cases, the method is not necessarily limited to the method of selecting the larger moving average value.

本実施例1に係るシェーディング補正装置によれば、ラインセンサが出力する白レベルのピーク位置が、ラインセンサを走査する1ライン中のどこにあるか分からない場合であっても、白補正のため検出すべき白レベルピーク値を正確に検出できるようにしたシェーディング補正装置及びシェーディング補正方法を提供することができる。   According to the shading correction apparatus according to the first embodiment, even if it is not known where the peak position of the white level output from the line sensor is in one line scanned by the line sensor, it is detected for white correction. It is possible to provide a shading correction apparatus and a shading correction method capable of accurately detecting a white level peak value to be detected.

図1に示したシェーディング補正装置における白補正回路17は、第1平均回路31と、第2平均回路32と、選択回路33と、プログラマブルゲインアンプ34,37とより構成されている。第1平均回路31は、白レベルピーク値を検出する検出区間1H中に設けられた複数の移動平均区間1−1…1−7毎の白レベルの値から移動平均値を算出する。第2平均回路32は、検出区間1H中に設けられた複数の移動平均区間1−1…1−7とは別の複数の移動平均区間2−1…2−6毎の白レベルの値から移動平均値を算出する。選択回路33は、第1平均回路31から算出された第1移動平均値と第2平均回路32から算出された第2移動平均値とを比較していずれか一方の移動平均値を選択する。プログラマブルゲインアンプ34,37は、選択回路33により選択された移動平均値に基づいて白補正を行う。   The white correction circuit 17 in the shading correction apparatus shown in FIG. 1 includes a first average circuit 31, a second average circuit 32, a selection circuit 33, and programmable gain amplifiers 34 and 37. The first average circuit 31 calculates a moving average value from the white level value for each of the plurality of moving average sections 1-1... 1-7 provided in the detection section 1H for detecting the white level peak value. The second average circuit 32 determines the white level value for each of a plurality of moving average sections 2-1... 2-6 different from the plurality of moving average sections 1-1... 1-7 provided in the detection section 1H. Calculate the moving average value. The selection circuit 33 compares the first moving average value calculated from the first average circuit 31 with the second moving average value calculated from the second average circuit 32 and selects one of the moving average values. The programmable gain amplifiers 34 and 37 perform white correction based on the moving average value selected by the selection circuit 33.

図9は、本実施例1におけるシェーディング補正方法において、移動平均による白補正の動作を説明するフローチャートを示す図である。図2に示したシェーディング補正方法における白補正を行うステップ(S103)には、図9に示すステップS111〜S114を含んでいる。すなわち、白レベルピーク値を検出する検出区間(1H)中に複数の移動平均区間1−1…1−7を設けて移動平均区間1−1…1−7毎の白レベルの値から第1移動平均値を算出するステップ(S111)と、検出区間(1H)中に複数の移動平均区間1−1…1−7とは別の複数の移動平均区間2−1…2−6を設けて別の複数の移動平均区間2−1…2−6毎の白レベルの値から第2移動平均値を算出するステップ(S112)と、第1移動平均値と第2移動平均値とを比較するステップ(S113)と、比較された第1移動平均値と第2移動平均値とのいずれか一方に基づき白補正を行うステップ(S114)とを含んでいる。   FIG. 9 is a flowchart illustrating the white correction operation based on the moving average in the shading correction method according to the first embodiment. The step of performing white correction (S103) in the shading correction method shown in FIG. 2 includes steps S111 to S114 shown in FIG. That is, a plurality of moving average sections 1-1... 1-7 are provided in the detection section (1H) for detecting the white level peak value, and the first is determined from the white level value for each moving average section 1-1. A step of calculating a moving average value (S111), and a plurality of moving average sections 2-1 ... 2-6 different from the plurality of moving average sections 1-1 ... 1-7 are provided in the detection section (1H). The step of calculating the second moving average value from the value of the white level for each of a plurality of other moving average sections 2-1 ... 2-6 (S112) is compared with the first moving average value and the second moving average value. Step (S113) and Step (S114) of performing white correction based on one of the compared first moving average value and second moving average value are included.

なお、比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップ(S114)では、複数の移動平均区間1−1…1−7,2−1…2−6における各移動平均区間の終了時に、いずれか一方の移動平均値を選択することが好ましい。この時、大きい方の移動平均値を選択することが、さらに好ましい。   In the step of performing white correction based on one of the compared first moving average value and second moving average value (S114), a plurality of moving average sections 1-1... 1-7, 2-1 ... It is preferable to select one of the moving average values at the end of each moving average section in 2-6. At this time, it is more preferable to select the larger moving average value.

図10は、本発明の実施例2に係るシェーディング補正装置を用いたシェーディング補正装置の構成を示すブロック構成図である。図10に示すシェーディング補正装置200は、図1に示したシェーディング補正装置100における、加減算器19とADC16との間にアナログPGA13を介挿したものである。そしてアナログPGA13のフィードバック経路に白補正回路17の出力する信号を加えてアナログPGA13にも白補正を行うようにしている。つまり、シェーディング補正装置200は、ラインセンサ12と、アナログPGA13と、A / D 変換器(ADC)16と、黒補正回路15と、D/A変換器(DAC)14と、加減算器19と、デジタルPGA18と、白補正回路17とを備えている。ラインセンサ12はCCD等で構成されており、原稿11の読み取りに応じたアナログ値による真の信号成分と、オフセットやゲインのバラツキとを含んだ信号を出力する。アナログPGA13は、ラインセンサ12の出力信号を増幅する。加減算器19は、ラインセンサ12の出力信号からDAC14の出力信号を減算してアナログPGA13へ入力する。アナログPGA13は、加減算器19の出力を増幅してADC16へ入力する。   FIG. 10 is a block diagram illustrating a configuration of a shading correction apparatus using the shading correction apparatus according to the second embodiment of the present invention. The shading correction apparatus 200 shown in FIG. 10 is obtained by inserting an analog PGA 13 between the adder / subtractor 19 and the ADC 16 in the shading correction apparatus 100 shown in FIG. A signal output from the white correction circuit 17 is added to the feedback path of the analog PGA 13 so that the analog PGA 13 is also subjected to white correction. That is, the shading correction apparatus 200 includes a line sensor 12, an analog PGA 13, an A / D converter (ADC) 16, a black correction circuit 15, a D / A converter (DAC) 14, an adder / subtractor 19, A digital PGA 18 and a white correction circuit 17 are provided. The line sensor 12 is constituted by a CCD or the like, and outputs a signal including a true signal component based on an analog value corresponding to reading of the document 11 and variations in offset and gain. The analog PGA 13 amplifies the output signal of the line sensor 12. The adder / subtracter 19 subtracts the output signal of the DAC 14 from the output signal of the line sensor 12 and inputs the result to the analog PGA 13. The analog PGA 13 amplifies the output of the adder / subtractor 19 and inputs the amplified output to the ADC 16.

黒補正回路15は、ADC16を経てデジタル化されたデジタル信号に対して黒補正する。DAC14は黒補正回路15の出力信号として表れるオフセット量を調整するとともに、そのオフセット量をD/A変換したアナログ信号を加減算器19に減算入力する。加減算器19で、ラインセンサ12の出力信号からDAC14の出力信号を減算してアナログPGA13へ入力する。ADC16は、アナログPGA13の出力をA / D 変換してデジタルPGA18へ入力する。白補正回路17は、デジタルPGA18のデジタル出力信号に基づいて、アナログPGA13及びデジタルPGA18に対する白補正を行う。すなわち、アナログPGA13とデジタルPGA18は、白補正回路17の出力信号に基づいて、それぞれ最適ゲインに調整される。   The black correction circuit 15 performs black correction on the digital signal digitized through the ADC 16. The DAC 14 adjusts an offset amount appearing as an output signal of the black correction circuit 15 and subtracts and inputs an analog signal obtained by D / A converting the offset amount to the adder / subtractor 19. The adder / subtracter 19 subtracts the output signal of the DAC 14 from the output signal of the line sensor 12 and inputs the result to the analog PGA 13. The ADC 16 A / D converts the output of the analog PGA 13 and inputs it to the digital PGA 18. The white correction circuit 17 performs white correction on the analog PGA 13 and the digital PGA 18 based on the digital output signal of the digital PGA 18. That is, the analog PGA 13 and the digital PGA 18 are each adjusted to an optimum gain based on the output signal of the white correction circuit 17.

本実施例2について、以下に説明する。シェーディング補正装置200は、図1に示した実施例1のシェーディング補正装置100に対して、デジタルPGA18に加えてアナログPGA13を追加して装備し、両方のPGAでゲイン制御することにより白補正する。この点が異なる以外、白補正および黒補正に関する基本的な信号処理の原理は同じである。より具体的には、図10に示すシェーディング補正装置200は、図1に示したシェーディング補正装置100において、加減算器19とADC16との間にアナログPGA13を介挿し、そのアナログPGA13のフィードバック経路に白補正回路17の出力する信号を加えてアナログPGA13にも白補正を行うようにしている。   The second embodiment will be described below. The shading correction apparatus 200 is equipped with an analog PGA 13 in addition to the digital PGA 18 with respect to the shading correction apparatus 100 of the first embodiment shown in FIG. 1, and performs white correction by gain control with both PGAs. Except for this difference, the basic signal processing principles for white correction and black correction are the same. More specifically, in the shading correction apparatus 200 shown in FIG. 10, the analog PGA 13 is inserted between the adder / subtractor 19 and the ADC 16 in the shading correction apparatus 100 shown in FIG. In addition to the signal output from the correction circuit 17, the analog PGA 13 is also subjected to white correction.

実施例2のシェーディング補正装置において、黒補正が行われた後の白補正の動作に関して、以下に説明する。
図4は、本発明に係るシェーディング補正装置の実施例1,2における移動平均による白補正の動作全体を示すフローチャートを示す図である。図4に示すように、白補正期間が開始されると設定ライン数と実行回数とを比較する。(ステップS1)ステップS1において、「設定ライン数>実行回数」がYes、すなわち、設定ライン数よりも実行回数が少ないならば、設定ライン毎に白補正期間の移動平均値を演算してピーク値を検出する。(ステップS2)ステップS2で検出したピーク値と、ターゲット値とを比較して、ラフゲインの決定が完了したかどうかを判断する。(ステップS3)ステップS3でNo、すなわちラフゲインが未決定ならば、アナログPGA13の値を、ライン毎に逐次比較してアナログPGA13のゲインを変更する。(ステップS5)ステップS5で、アナログPGA13のゲインが変更されたならば、ステップS1に戻って設定ライン数と回数とを比較することを繰り返す。ステップS1で、「設定ライン数>実行回数」がNo、すなわち、設定ライン数よりも実行回数が少なくないならば、白補正を終了する。(ステップS7)
図4における、実施例1と実施例2との違いは、ステップS3およびステップS5の有無であり、実施例1ではなかったステップS3およびステップS5を、実施例2では実行する。
In the shading correction apparatus according to the second embodiment, the white correction operation after the black correction is performed will be described below.
FIG. 4 is a flowchart showing the entire white correction operation by moving average in the first and second embodiments of the shading correction apparatus according to the present invention. As shown in FIG. 4, when the white correction period is started, the number of set lines is compared with the number of executions. (Step S1) In step S1, if “the number of set lines> the number of executions” is Yes, that is, if the number of executions is less than the number of set lines, the moving average value of the white correction period is calculated for each set line and the peak value is calculated. Is detected. (Step S2) The peak value detected in Step S2 is compared with the target value to determine whether or not the rough gain has been determined. (Step S3) No in Step S3, that is, if the rough gain is not yet determined, the value of the analog PGA 13 is sequentially compared for each line, and the gain of the analog PGA 13 is changed. (Step S5) If the gain of the analog PGA 13 is changed in step S5, the process returns to step S1 and the comparison of the number of set lines and the number of times is repeated. In step S1, if “the number of set lines> the number of executions” is No, that is, if the number of executions is not smaller than the number of set lines, the white correction is terminated. (Step S7)
The difference between the first embodiment and the second embodiment in FIG. 4 is the presence or absence of steps S3 and S5. In the second embodiment, steps S3 and S5 that were not the first embodiment are executed.

本発明は、ファクシミリ、デジタル複写機、スキャナー等の情報処理装置を構成する画像処理系において、CCD等のラインセンサの走査動作によって、画像処理対象となる原稿を読み取って得られたラインセンサの出力信号に対し、このラインセンサの出力信号に含まれるオフセット及びゲインバラツキを補正し、この補正後の信号を真の画像処理対象を表す信号として画像処理を行うシェーディング補正装置及びシェーディング補正方法に利用可能である。   The present invention provides an output of a line sensor obtained by reading a document to be image-processed by a scanning operation of a line sensor such as a CCD in an image processing system constituting an information processing apparatus such as a facsimile, a digital copying machine, and a scanner. It can be used for a shading correction device and a shading correction method for correcting an offset and gain variation included in the output signal of the line sensor with respect to a signal and performing the image processing using the corrected signal as a signal representing a true image processing target. It is.

1−1…1−7,2−1…2−6 移動平均区間
11 原稿
12 ラインセンサ
13 アナログPGA(アナログ可変ゲインアンプ)
14 DAC(デジタル/アナログ変換器)
15 黒補正回路
16 ADC(アナログ/デジタル変換器)
17,27 白補正回路
18 デジタルPGA(デジタル可変ゲインアンプ)
19 加減算器
30 タイミング平均回路
31 タイミング1平均回路
32 タイミング2平均回路
33,35 2to1セレクタ
34,37 比較器(プログラマブルゲインアンプ)
36,38,92,94 レジスタ
39 制御回路
91 平均回路
93 比較器
95 制御回路
100,200,300 シェーディング補正装置
1-1 ... 1-7, 2-1 ... 2-6 Moving average section 11 Document 12 Line sensor 13 Analog PGA (Analog variable gain amplifier)
14 DAC (digital / analog converter)
15 Black correction circuit 16 ADC (analog / digital converter)
17, 27 White correction circuit 18 Digital PGA (Digital variable gain amplifier)
19 Adder / Subtractor 30 Timing averaging circuit 31 Timing 1 averaging circuit 32 Timing 2 averaging circuit 33, 35 2to1 selectors 34, 37 Comparator (programmable gain amplifier)
36, 38, 92, 94 Register 39 Control circuit 91 Average circuit 93 Comparator 95 Control circuit 100, 200, 300 Shading correction device

Claims (11)

画像処理の対象となる原稿を読み取った画像信号を黒補正してオフセット量を調整するとともに、白補正してゲインを調整するシェーディング補正装置において、
前記画像信号を黒補正する黒補正回路と、
前記黒補正回路による補正後の信号を入力し所望のゲインにて増幅した後に出力する可変ゲインアンプと、
前記可変ゲインアンプに接続され該可変ゲインアンプの出力信号より検出した真の白レベルピーク値に基づいて白補正を行う白補正回路とを備え、
前記黒補正回路により黒補正するとともに、
前記可変ゲインアンプを経た信号に対して前記白補正回路により白補正を行うことを特徴とするシェーディング補正装置。
In a shading correction apparatus that adjusts an offset amount by black correction of an image signal obtained by reading a document to be subjected to image processing, and adjusts a gain by white correction,
A black correction circuit for black correction of the image signal;
A variable gain amplifier that inputs the signal corrected by the black correction circuit and outputs the signal after amplification by a desired gain;
A white correction circuit connected to the variable gain amplifier and performing white correction based on a true white level peak value detected from an output signal of the variable gain amplifier;
While performing black correction by the black correction circuit,
A shading correction apparatus, wherein white correction is performed by the white correction circuit on a signal that has passed through the variable gain amplifier.
前記白補正回路は、
白レベルピーク値を検出する検出区間中に設けられた複数の移動平均区間毎の白レベルの値から移動平均値を算出する第1平均回路と、
前記検出区間中に設けられた前記複数の移動平均区間とは別の複数の移動平均区間毎の前記白レベルの値から移動平均値を算出する第2平均回路と、
前記第1平均回路から算出された第1移動平均値と前記第2平均回路から算出された第2移動平均値とを比較していずれか一方の移動平均値を選択する選択回路と、
前記選択回路により選択された移動平均値に基づいて白補正を行う可変ゲインアンプとを備えたことを特徴とする請求項1に記載のシェーディング補正装置。
The white correction circuit is
A first average circuit for calculating a moving average value from white level values for each of a plurality of moving average sections provided in a detection section for detecting a white level peak value;
A second averaging circuit that calculates a moving average value from a value of the white level for each of a plurality of moving average sections different from the plurality of moving average sections provided in the detection section;
A selection circuit that compares the first moving average value calculated from the first average circuit and the second moving average value calculated from the second average circuit to select one of the moving average values;
The shading correction apparatus according to claim 1, further comprising: a variable gain amplifier that performs white correction based on the moving average value selected by the selection circuit.
前記検出区間中に前記複数の移動平均区間の一区間と、前記一区間に対応する前記別の複数の移動平均区間の一区間とは、時間的なずれを有することを特徴とする請求項2に記載のシェーディング補正装置。   3. A section of the plurality of moving average sections in the detection section and a section of the other plurality of moving average sections corresponding to the one section have a time lag. The shading correction apparatus described in 1. 前記選択回路は、前記第1移動平均値と前記第2移動平均値とを比較して大きい方の移動平均値を選択することを特徴とする請求項2又は請求項3に記載のシェーディング補正装置。   4. The shading correction apparatus according to claim 2, wherein the selection circuit selects the larger moving average value by comparing the first moving average value and the second moving average value. 5. . 前記可変ゲインアンプはデジタルプログラマブルゲインアンプであり、該デジタルプログラマブルゲインアンプの前段又は後段にアナログプログラマブルゲインアンプを介挿し、
該アナログプログラマブルゲインアンプに前記白補正回路の出力する白補正信号を加えて前記アナログプログラマブルゲインアンプでも白補正を行うことを特徴とする請求項1乃至請求項4のいずれかに記載のシェーディング補正装置。
The variable gain amplifier is a digital programmable gain amplifier, and an analog programmable gain amplifier is inserted before or after the digital programmable gain amplifier,
5. The shading correction apparatus according to claim 1, wherein the analog programmable gain amplifier performs white correction by adding a white correction signal output from the white correction circuit to the analog programmable gain amplifier. 6. .
画像処理の対象となる原稿を読み取った画像信号を黒補正してオフセット量を調整するとともに、白補正してゲインを調整するシェーディング補正方法であって、
前記画像信号を黒補正するステップと、
前記黒補正後の信号を可変ゲインアンプに入力し所望のゲインにて増幅するステップと、
前記可変ゲインアンプの出力信号より検出した真の白レベルピーク値に基づいて白補正回路が白補正を行うステップと、
を含むことを特徴とするシェーディング補正方法。
A shading correction method in which an image signal obtained by reading a document to be subjected to image processing is black-corrected to adjust an offset amount and white-corrected to adjust a gain.
Black correcting the image signal;
Inputting the black-corrected signal to a variable gain amplifier and amplifying it with a desired gain;
A white correction circuit performing white correction based on a true white level peak value detected from an output signal of the variable gain amplifier;
A shading correction method comprising:
前記白補正を行うステップは、
白レベルピーク値を検出する検出区間中に複数の移動平均区間を設けて前記移動平均区間毎の前記白レベルの値から第1移動平均値を算出するステップと、
前記検出区間)中に前記複数の移動平均区間とは別の複数の移動平均区間を設けて前記別の複数の移動平均区間毎の前記白レベルの値から第2移動平均値を算出するステップと、
前記第1移動平均値と前記第2移動平均値とを比較するステップと、
前記比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップとを含むことを特徴とする請求項6に記載のシェーディング補正方法。
The step of performing the white correction includes
Providing a plurality of moving average sections in a detection section for detecting a white level peak value, and calculating a first moving average value from the white level value for each moving average section;
Providing a plurality of moving average sections different from the plurality of moving average sections in the detection section), and calculating a second moving average value from the white level value for each of the plurality of other moving average sections; ,
Comparing the first moving average value and the second moving average value;
The shading correction method according to claim 6, further comprising a step of performing white correction based on one of the compared first moving average value and second moving average value.
前記検出区間(1H)中に前記複数の移動平均区間の一区間と、前記区間に対応する前記別の複数の移動平均区間の一区間とは、時間的なずれを有することを特徴とする請求項7に記載のシェーディング補正方法。   One section of the plurality of moving average sections and one section of the other plurality of moving average sections corresponding to the section in the detection section (1H) have a time lag. Item 8. The shading correction method according to Item 7. 前記比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップでは、前記第1移動平均値と第2移動平均値とを比較するステップにより大きいと判定された方の移動平均値を用いることを特徴とする請求項7又は請求項8に記載のシェーディング補正方法。   The step of performing white correction based on one of the compared first moving average value and second moving average value is larger than the step of comparing the first moving average value and the second moving average value. 9. The shading correction method according to claim 7, wherein the moving average value of the determined one is used. 前記可変ゲインアンプはデジタルプログラマブルゲインアンプであり、該デジタルプログラマブルゲインアンプの前段又は後段に介挿されたアナログプログラマブルゲインアンプに前記白補正回路17の出力する白補正信号を加えて前記アナログプログラマブルゲインアンプでも白補正を行うことを特徴とする請求項6乃至請求項9のいずれかに記載のシェーディング方法。   The variable gain amplifier is a digital programmable gain amplifier, and the analog programmable gain amplifier is configured by adding a white correction signal output from the white correction circuit 17 to an analog programmable gain amplifier inserted in a preceding stage or a subsequent stage of the digital programmable gain amplifier. 10. The shading method according to claim 6, wherein white correction is performed. 前記比較された第1移動平均値と第2移動平均値とのいずれか一方に基づいて白補正を行うステップでは、前記複数の移動平均区間における各移動平均区間の終了時に、いずれか一方の移動平均値を選択することを特徴とする請求項7に記載のシェーディング補正方法。   In the step of performing white correction based on one of the compared first moving average value and second moving average value, at the end of each moving average section in the plurality of moving average sections, one of the movements The shading correction method according to claim 7, wherein an average value is selected.
JP2012187783A 2012-08-28 2012-08-28 Shading correction apparatus and shading correction method Active JP5918080B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012187783A JP5918080B2 (en) 2012-08-28 2012-08-28 Shading correction apparatus and shading correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012187783A JP5918080B2 (en) 2012-08-28 2012-08-28 Shading correction apparatus and shading correction method

Publications (2)

Publication Number Publication Date
JP2014045443A true JP2014045443A (en) 2014-03-13
JP5918080B2 JP5918080B2 (en) 2016-05-18

Family

ID=50396401

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012187783A Active JP5918080B2 (en) 2012-08-28 2012-08-28 Shading correction apparatus and shading correction method

Country Status (1)

Country Link
JP (1) JP5918080B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07283904A (en) * 1994-04-06 1995-10-27 Oki Electric Ind Co Ltd Image reader
JP2012156621A (en) * 2011-01-24 2012-08-16 Ricoh Co Ltd Image reading device, image forming device, and signal processing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07283904A (en) * 1994-04-06 1995-10-27 Oki Electric Ind Co Ltd Image reader
JP2012156621A (en) * 2011-01-24 2012-08-16 Ricoh Co Ltd Image reading device, image forming device, and signal processing method

Also Published As

Publication number Publication date
JP5918080B2 (en) 2016-05-18

Similar Documents

Publication Publication Date Title
US8804209B2 (en) Image processing apparatus, image processing system, image processing method and computer readable medium
JP6051654B2 (en) Image reading apparatus and image forming apparatus
JP4544311B2 (en) Image processing device
US8107132B2 (en) Image forming apparatus and control method thereof
US9930212B2 (en) Image reading device generating black correction data for shade correction based on intermediate data acquired at different positions in the sub-scanning direction
JP6512744B2 (en) Image reader
US20170078527A1 (en) Image reading device
KR101236387B1 (en) Image foaming apparatus and control method thereof
JP5918080B2 (en) Shading correction apparatus and shading correction method
JP6194486B2 (en) Image reading device
JP5091550B2 (en) White balance adjusting device and white balance adjusting method
JP3995845B2 (en) Image reading apparatus, copying machine, and facsimile machine
JP2010258827A (en) Black level correction circuit and solid-state imaging device
JP2011176688A (en) Image-reading apparatus, and image-forming apparatus
US20110235112A1 (en) Image scanning device, image forming apparatus, and image scanning method
JP5014029B2 (en) Image reading apparatus and sampling timing determination method thereof
JP2012039403A (en) Image-reading device, image reading method, and program
JP6642038B2 (en) Scanner and image production method
JP6642037B2 (en) Scanner and image production method
JP2008177649A (en) Signal processing apparatus and imaging apparatus
JP2007142916A (en) Clump circuit
JP4083291B2 (en) Line sensor output signal processing apparatus and line sensor output signal signal processing method
JP2003209687A (en) Image processor
JP5487667B2 (en) Image reading apparatus and image forming apparatus
JP5354694B2 (en) Image processing apparatus 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: 20150212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160112

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160302

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160407

R150 Certificate of patent or registration of utility model

Ref document number: 5918080

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350