JP6304598B2 - Image reading device - Google Patents

Image reading device Download PDF

Info

Publication number
JP6304598B2
JP6304598B2 JP2014196221A JP2014196221A JP6304598B2 JP 6304598 B2 JP6304598 B2 JP 6304598B2 JP 2014196221 A JP2014196221 A JP 2014196221A JP 2014196221 A JP2014196221 A JP 2014196221A JP 6304598 B2 JP6304598 B2 JP 6304598B2
Authority
JP
Japan
Prior art keywords
pixel
thinning
pixels
thinned
group
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.)
Active
Application number
JP2014196221A
Other languages
Japanese (ja)
Other versions
JP2016066982A (en
Inventor
捷 鄭
捷 鄭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2014196221A priority Critical patent/JP6304598B2/en
Publication of JP2016066982A publication Critical patent/JP2016066982A/en
Application granted granted Critical
Publication of JP6304598B2 publication Critical patent/JP6304598B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Input (AREA)

Description

本発明は、画像読取装置に関する。   The present invention relates to an image reading apparatus.

画像読取装置では、画像読取装置の読取デバイスに入力される電源の変動により、読取信号にノイズが発生する問題がある。例えば、読取デバイスの電源におけるリップル電圧に起因する直流電源ノイズ成分が読取信号に重畳してしまう。
特許文献1に記載の画像読取装置は、読取信号に重畳するノイズ成分を抽出し、抽出されたノイズ成分を読取信号から減算することにより、ノイズ成分を除去している。
In the image reading apparatus, there is a problem that noise is generated in the read signal due to fluctuations in the power input to the reading device of the image reading apparatus. For example, a DC power supply noise component due to a ripple voltage in the power supply of the reading device is superimposed on the read signal.
The image reading apparatus described in Patent Document 1 extracts a noise component to be superimposed on a read signal, and subtracts the extracted noise component from the read signal to remove the noise component.

特開2005−348340号公報JP 2005-348340 A

ところが、読取デバイスが、読取デバイス内の光電変換素子が電気信号を出力すると同時にその電気信号を読取信号として出力してしまうと、読取信号を全て出力し終わるまで異なる光源の色に切り換えることができなくなり、読取速度が遅くなってしまう。そこで、近年では、読取デバイスは、光電変換素子の素子数分のアナログメモリを内蔵し、1ライン分の読取を行った後に、電気信号をアナログメモリに一時記憶させることで、前の1ライン分の読取後に直ぐに、次の1ライン分の読取のために異なる光源の色に切り換え可能に構成されている。   However, if the reading device outputs the electric signal as a reading signal at the same time as the photoelectric conversion element in the reading device outputs the electric signal, it can be switched to a different light source color until all the reading signals are output. The reading speed becomes slow. Therefore, in recent years, the reading device has built-in analog memories as many as the number of photoelectric conversion elements, and after reading one line, temporarily stores an electrical signal in the analog memory, so that the previous one line is stored. Immediately after reading, the color can be switched to a different light source for reading the next one line.

上記のように構成された読取デバイスは、次の1ライン分の読取を行っている間に、前の1ライン分を読み取った信号を読取信号として出力するため、読取信号のノイズ成分は前の1ライン分のノイズ成分であるのに対し、電源のノイズ成分は次の1ライン分のノイズ成分であり、共通するラインのノイズ成分ではない。よって、ノイズ成分を除去するタイミングを考慮せずに、特許文献1に記載されたノイズ成分を除去する技術を、近年用いられる読取デバイスに使用したとしても、ノイズ成分を除去できないという問題が発生していた。   The reading device configured as described above outputs a signal obtained by reading the previous one line as a read signal while reading the next one line. While the noise component for one line is the noise component for the next line, it is not the noise component for the common line. Therefore, even if the technique for removing the noise component described in Patent Document 1 is used for a reading device used in recent years without considering the timing for removing the noise component, there is a problem that the noise component cannot be removed. It was.

本願では、読取デバイスの電源における周期的なリップル電圧に起因して読取信号に重畳する直流電源ノイズ成分を低減させることを目的とする。   An object of the present application is to reduce a DC power supply noise component superimposed on a read signal due to a periodic ripple voltage in a power supply of a reading device.

上記目的を達成するために、請求項1に記載の発明態様は、原稿を所定の読取ライン周期でライン毎に読み取り主走査方向の各画素のアナログ画像データを生成する読取部と、前記読取部に対向する位置に配置される基準板と、第1直流電圧をスイッチング周波数でスイッチング制御することにより前記読取部へ供給する第2直流電圧に変換する電源供給部と、前記アナログ画像データをサンプリング周期でサンプリングしてデジタル画像データに変換する変換部と、前記デジタル画像データを階調値にシェーディング補正する補正部と、設定値に従い前記主走査方向の画素を間引くことにより前記デジタル画像データの解像度を、第1解像度から第2解像度へ変換する解像度変換部と、制御部と、を備え、前記制御部は、前記基準板を読み取り前記補正部により補正された1ラインの全画素の階調値を平均することにより全平均階調値を算出する平均階調値算出処理と、前記スイッチング周波数に対応する周期と前記変換部のサンプリング周期との公倍数となる一定ノイズ周期に対応する一定ノイズ画素数毎の複数の階調値グループに前記1ラインの全画素の前記階調値を分割し、各前記階調値グループのうちの同一順位の全ての画素の階調値を平均することによりグループ平均階調値を算出するグループ平均階調値算出処理と、前記全平均階調値と前記グループ平均階調値との差分が大きい画素から順に前記階調値グループにおいて間引き候補画素を確定する間引き候補画素確定処理と、前記1ラインの全画素について、前記間引き候補画素に基いてライン間引き画素を確定し、前記ライン間引き画素を前記設定値に設定するライン間引き画素設定処理と、を実行し、前記読取ライン周期は、前記一定ノイズ周期の整数倍に定められる。   In order to achieve the above object, according to an aspect of the present invention, a reading unit that reads a document for each line at a predetermined reading line cycle and generates analog image data of each pixel in the main scanning direction, and the reading unit A reference plate disposed at a position opposite to the power supply, a power supply unit that converts the first DC voltage to a second DC voltage to be supplied to the reading unit by switching control with a switching frequency, and a sampling period for the analog image data A conversion unit that samples and converts the digital image data into digital image data, a correction unit that corrects the digital image data to a gradation value, and a resolution of the digital image data by thinning out pixels in the main scanning direction according to a set value A resolution conversion unit for converting from the first resolution to the second resolution, and a control unit, wherein the control unit reads the reference plate. Average gradation value calculation processing for calculating the total average gradation value by averaging the gradation values of all pixels of one line corrected by the correction unit, the period corresponding to the switching frequency, and the sampling of the conversion unit Dividing the gradation values of all pixels of the one line into a plurality of gradation value groups for each constant noise pixel number corresponding to a constant noise period that is a common multiple of the period, and the same among the gradation value groups A group average gradation value calculation process for calculating a group average gradation value by averaging the gradation values of all the pixels in the rank, and a pixel having a large difference between the total average gradation value and the group average gradation value Thinning candidate pixel determination processing for determining thinning candidate pixels in the gradation value group in order, and line thinning pixels are determined based on the thinning candidate pixels for all pixels in the one line. Run a line thinning pixel setting process for setting the line thinning pixels in the set value, and the line scanning cycle is determined to an integral multiple of the constant noise cycle.

請求項2に記載の具体的態様では、前記制御部は、前記第1解像度に対応する整数と前記第2解像度に対応する整数との比のうち前記第1解像度に対応する整数を間引きグループの画素数として算出し、前記間引きグループの前記画素数から前記第2解像度に対応する整数を引算した値を前記間引きグループから間引かれる間引き画素数として算出する間引き算出処理を実行し、前記間引きグループは、前記1ラインの全画素の先頭から後尾まで、順次連続した画素をグルーピングし、そのグループ毎に前記ライン間引き画素を確定させるためのグループであり、前記間引き候補画素は、前記階調値グループにおいて第1間引き画素と第2間引き画素とから構成され、前記第1間引き画素は前記第1解像度と前記第2解像度とに関連する画素であり、前記第2間引き画素は前記第1解像度と前記第2解像度とに関連しない画素であり、前記ライン間引き画素設定処理は、各前記間引きグループにおける前記ライン間引き画素を確定する処理において前記第1間引き画素を前記第2間引き画素よりも優先して前記間引き画素数の前記ライン間引き画素を確定する。   According to a specific aspect of the present invention, the control unit calculates an integer corresponding to the first resolution from a ratio of an integer corresponding to the first resolution and an integer corresponding to the second resolution. Calculating the number of pixels, performing a decimation calculation process for calculating a value obtained by subtracting an integer corresponding to the second resolution from the number of pixels of the decimation group as a decimation pixel number decimation from the decimation group; The group is a group for sequentially grouping consecutive pixels from the head to the tail of all the pixels of the one line, and determining the line thinning pixels for each group, and the thinning candidate pixels are the gradation values The group includes a first thinned pixel and a second thinned pixel, and the first thinned pixel is a pixel related to the first resolution and the second resolution. And the second thinned pixel is a pixel not related to the first resolution and the second resolution, and the line thinned pixel setting process includes the first thinned pixel in the process of determining the line thinned pixel in each thinned group. The line-thinned pixels corresponding to the number of thinned-out pixels are determined in preference to the thinned-out pixels over the second thinned-out pixels.

請求項3に記載の具体的態様では、前記制御部は、前記第1解像度で前記第2解像度を割算することにより間引き率を算出する間引き率算出処理と、前記一定ノイズ画素数と前記間引き率とを掛算することにより画素判定値を算出する画素判定値算出処理と、前記画素判定値の整数部の整数を第1間引き画素数とする第1間引き画素確定処理と、を実行する。   In a specific aspect according to claim 3, the control unit calculates a thinning rate by dividing the second resolution by the first resolution, the constant noise pixel number, and the thinning-out rate. A pixel determination value calculation process for calculating a pixel determination value by multiplying the rate and a first decimation pixel determination process in which the integer of the integer part of the pixel determination value is set to the first decimation pixel number are executed.

請求項4に記載の具体的態様では、前記第1間引き画素確定処理は、前記全平均階調値と前記グループ平均階調値との差分が大きい画素から第1間引き画素として前記第1間引き画素数を設定する。   5. The specific aspect according to claim 4, wherein the first decimation pixel determination process includes the first decimation pixel as a first decimation pixel from a pixel having a large difference between the total average gradation value and the group average gradation value. Set the number.

請求項5に記載の具体的態様では、前記制御部は、前記間引きグループにおいて、前記間引き画素数の前記第1間引き画素が確定された場合は、前記第1間引き画素として確定されていない画素に対して前記第1間引き画素の設定を禁止する設定禁止画素として設定する禁止画素設定処理を実行する。   In the specific aspect according to claim 5, when the first thinned pixel of the number of thinned pixels is determined in the thinned group, the control unit determines that the first thinned pixel is not determined as the first thinned pixel. On the other hand, forbidden pixel setting processing is performed for setting as a forbidden pixel for prohibiting setting of the first thinned pixel.

請求項6に記載の具体的態様では、前記制御部は、前記画素判定値が整数でない場合、若しくは前記第1間引き画素が前記第1間引き画素数確定されなかった場合は、前記第2間引き画素の確定を行う第2間引き画素設定フラグをオンに設定する第2間引き画素確定処理を実行する。   In a specific aspect according to claim 6, the control unit determines that the second thinned pixel is determined when the pixel determination value is not an integer, or when the first thinned pixel number is not determined for the first thinned pixel. The second decimation pixel determination process for setting the second decimation pixel setting flag for confirming to ON is executed.

請求項7に記載の具体的態様では、前記第2間引き画素確定処理は、前記第2間引き画素設定フラグがオンの場合に、各前記間引きグループにおいて、前記第1間引き画素と前記第2間引き画素との合計の画素数が前記間引き画素数となるように前記第2間引き画素を確定する。   In the specific aspect according to claim 7, the second thinned pixel determination process includes the first thinned pixel and the second thinned pixel in each thinned group when the second thinned pixel setting flag is on. The second thinned pixel is determined so that the total number of pixels becomes the thinned pixel number.

請求項8に記載の発明態様は、原稿を所定の読取ライン周期でライン毎に読み取り主走査方向の各画素のアナログ画像データを生成する読取部と、前記読取部に対向する位置に配置される基準板と、第1直流電圧をスイッチング周波数でスイッチング制御することにより前記読取部へ供給する第2直流電圧に変換する電源供給部と、前記アナログ画像データをサンプリング周期でサンプリングしてデジタル画像データに変換する変換部と、前記デジタル画像データを階調値にシェーディング補正する補正部と、前記主走査方向の画素を間引くことにより前記デジタル画像データの解像度を、第1解像度から第2解像度へ変換する解像度変換部と、前記基準板を読み取り前記補正部により補正された1ラインの全画素の階調値を平均することにより全平均階調値を算出する平均階調値算部と、前記スイッチング周波数に対応する周期と前記変換部のサンプリング周期との公倍数となる一定ノイズ周期に対応する一定ノイズ画素数毎の複数の階調値グループに前記1ラインの全画素の前記階調値を分割し、各前記階調値グループのうちの同一順位の全ての画素の階調値を平均することによりグループ平均階調値を算出するグループ平均階調値算出部と、前記全平均階調値と前記グループ平均階調値との差分が大きい画素から順に前記階調値グループに対して間引き候補画素として確定する間引き候補画素確定部と、前記1ラインの全画素について、前記間引き候補画素に基いてライン間引き画素として確定するライン間引き画素確定部と、を備え、前記解像度変換部は前記ライン間引き画素を間引き、前記読取ライン周期は、前記一定ノイズ周期の整数倍に定められる。   According to an eighth aspect of the present invention, a document is read line by line at a predetermined reading line cycle, and an analog image data of each pixel in the main scanning direction is generated, and arranged at a position facing the reading unit. A reference plate, a power supply unit that converts the first DC voltage to a second DC voltage to be supplied to the reading unit by performing switching control with a switching frequency, and the analog image data is sampled at a sampling period into digital image data. A conversion unit for converting, a correction unit for shading correction of the digital image data to a gradation value, and a resolution of the digital image data are converted from the first resolution to the second resolution by thinning out pixels in the main scanning direction. The resolution conversion unit reads the reference plate and averages the gradation values of all pixels of one line corrected by the correction unit. An average gradation value calculation unit for calculating the total average gradation value, and a plurality of levels for each number of fixed noise pixels corresponding to a fixed noise period that is a common multiple of a period corresponding to the switching frequency and a sampling period of the conversion unit. Divide the gradation values of all the pixels in one line into a tone value group, and calculate the group average gradation value by averaging the gradation values of all the pixels in the same order in each gradation value group A group average gradation value calculation unit, and a thinning candidate pixel determination unit that determines a thinning candidate pixel for the gradation value group in order from a pixel having a large difference between the total average gradation value and the group average gradation value A line thinning pixel determination unit that determines all the pixels of the one line as line thinning pixels based on the thinning candidate pixels, and the resolution conversion unit includes the line thinning pixels Thinning, the line scanning cycle is determined to an integral multiple of the constant noise cycle.

請求項1に記載の発明態様では、平均階調値算出処理は、基準板を読み取り補正部に補正された1ラインの全画素の階調値の平均値を算出することにより全平均階調値を算出する処理である。グループ平均階調値算出処理は、1ライン全画素の階調値を一定ノイズ周期に対応する一定ノイズ画素数毎に複数の階調値グループに分割し、各階調値グループのうちの同一順位の全ての画素の階調値を平均することによりグループ平均階調値を算出する。間引き候補画素確定処理は、全平均階調値とグループ平均階調値との差分が大きい画素から順に階調値グループに対して間引き候補画素を確定する。ライン間引き画素設定処理は、1ラインの全画素について、間引き候補画素に基いてライン間引き画素を確定し、ライン間引き画素を設定値に設定する。よって、一定ノイズ周期毎に間引き候補画素を確定し、その間引き候補画素に基いて間引き画素を確定しているので、ノイズ成分を低減することができる。   In the first aspect of the invention, the average gradation value calculation processing is performed by calculating an average value of gradation values of all the pixels of one line corrected by reading the reference plate and corrected by the correction unit. Is a process for calculating. The group average tone value calculation process divides the tone value of all pixels in one line into a plurality of tone value groups for each fixed noise pixel number corresponding to a fixed noise period, A group average gradation value is calculated by averaging the gradation values of all the pixels. In the thinning candidate pixel determination process, thinning candidate pixels are determined for the gradation value group in order from the pixel having the largest difference between the total average gradation value and the group average gradation value. In the line thinning pixel setting process, for all pixels in one line, line thinning pixels are determined based on the thinning candidate pixels, and the line thinning pixels are set to set values. Therefore, since the thinning candidate pixels are determined every fixed noise period and the thinning pixels are determined based on the thinning candidate pixels, the noise component can be reduced.

請求項2に記載の具体的態様では、1ラインの全画素の間引き画素を確定させる間引きグループについて、間引き算出処理は、第1解像度に対応する整数と第2解像度に対応する整数との比のうち第1解像度に対応する整数を間引きグループの画素数として算出し、間引きグループの画素数から第2解像度に対応する整数を引算した値を間引きグループから間引かれる間引き数として算出する。間引き候補画素は、階調値グループに対して第1間引き画素と第2間引き画素とから構成される。ライン間引き画素設定処理は、第1解像度および第2解像度に関連する第1間引き画素が関連しない第2間引き画素よりも優先してライン間引き画素を確定する。よって、間引きグループ毎に解像度に関連する第1間引き画素を解像度に関連しない第2間引き画素よりも優先してライン間引き画素を確定するため、第1解像度から第2解像度への変換を精度良く行うことができる。   In a specific aspect according to claim 2, for a thinning group for determining thinned pixels of all pixels in one line, the thinning calculation processing is performed by calculating a ratio between an integer corresponding to the first resolution and an integer corresponding to the second resolution. Of these, an integer corresponding to the first resolution is calculated as the number of pixels in the thinning group, and a value obtained by subtracting an integer corresponding to the second resolution from the number of pixels in the thinning group is calculated as a thinning number to be thinned out from the thinning group. The thinning candidate pixels are composed of a first thinning pixel and a second thinning pixel with respect to the gradation value group. In the line thinning pixel setting process, the line thinning pixel is determined in preference to the second thinning pixel not associated with the first thinning pixel related to the first resolution and the second resolution. Therefore, since the first thinned pixel related to the resolution is determined for each thinned group in preference to the second thinned pixel not related to the resolution, the line thinned pixel is determined, so that the conversion from the first resolution to the second resolution is performed with high accuracy. be able to.

請求項3に記載の具体的態様では、間引き率算出処理は、第1解像度と第2解像度とを割算することにより間引き率を算出する。画素判定値算出部は、一定ノイズ画素数と間引き率とを掛算することにより画素判定値を算出する。第1間引き画素確定処理は、画素判定値の整数部の整数を第1間引き画素数とする。よって、第1間引き画素数を画素判定値の整数部の整数とすることで、一定ノイズ画素グループにおいて常に間引くことができる間引き数を算出でき、ノイズの影響のある画素を常に間引くことができ、ノイズ成分を低減することができる。   According to a specific aspect of the present invention, the thinning rate calculation process calculates the thinning rate by dividing the first resolution and the second resolution. The pixel determination value calculation unit calculates a pixel determination value by multiplying a certain number of noise pixels and a thinning rate. In the first decimation pixel determination process, the integer of the integer part of the pixel determination value is set as the first decimation pixel number. Therefore, by setting the number of first thinned pixels as an integer in the integer part of the pixel determination value, it is possible to calculate a thinned number that can always be thinned in a fixed noise pixel group, and to always thin out pixels that are affected by noise. Noise components can be reduced.

請求項4に記載の具体的態様では、第1間引き画素確定処理は、全平均階調値とグループ平均階調値との差分が大きい画素から第1間引き画素を設定する。よって、ノイズ量の大きい画素を除去することができる。   According to a specific aspect of the present invention, the first thinned pixel determination process sets the first thinned pixel from pixels having a large difference between the total average gradation value and the group average gradation value. Therefore, pixels with a large amount of noise can be removed.

請求項5に記載の具体的態様では、禁止画素設定処理は、間引きグループにおいて間引き画素数の第1間引き画素が確定された場合は、第1間引き画素として確定されていない画素に対して第1間引き画素の確定を禁止する設定禁止画素として設定する。よって、間引き画素グループにおいて、間引き画素数以下の第1間引き画素しか確定していないので、常に第1間引き画素を間引くことができる。   According to a specific aspect of the present invention, when the first thinned-out pixel of the number of thinned-out pixels is determined in the thinned-out group, the prohibited pixel setting process is performed for the pixels that are not determined as the first thinned-out pixels. It is set as a setting prohibition pixel that prohibits the determination of the thinned pixel. Therefore, since only the first thinned pixels equal to or smaller than the number of thinned pixels are determined in the thinned pixel group, the first thinned pixels can always be thinned.

請求項6に記載の具体的態様では、第2間引き画素確定処理は、画素判定値が整数でない場合、若しくは第1間引き画素が第1間引き画素数確定されなかった場合は、第2間引き画素設定フラグをオンにする。よって、第2間引き画素を確定する必要がない場合は、第2間引き画素設定フラグをオフにすることで、間引き処理を高速に実行することができる。   According to a specific aspect of the present invention, when the pixel determination value is not an integer or when the first number of thinned pixels is not determined, the second thinned pixel determination process sets the second thinned pixel. Turn on the flag. Therefore, when it is not necessary to determine the second thinned pixel, the thinning process can be executed at high speed by turning off the second thinned pixel setting flag.

請求項7に記載の具体的態様では、第2間引き画素確定処理は、第2間引きフラグがオンの場合に、各間引きグループにおいて、第1間引き画素と第2間引き画素の合計の画素数が間引き画素数となるように第2間引き画素を確定する。よって、各間引きグループにおいて、第1間引き画素と第2間引き画素とを合計することで間引き画素数の間引き画素が確定できるため、第1解像度から第2解像度への変換を精度良く行うことができる。   According to a specific aspect of the present invention, in the second thinning pixel determination process, when the second thinning flag is ON, the total number of pixels of the first thinning pixel and the second thinning pixel is thinned in each thinning group. The second thinned pixels are determined so that the number of pixels is reached. Accordingly, in each thinning group, the thinned-out pixels can be determined by adding up the first thinned-out pixels and the second thinned-out pixels, so that the conversion from the first resolution to the second resolution can be performed with high accuracy. .

本発明の実施形態に係る画像読取装置1の内部構成を示す正面図である。1 is a front view showing an internal configuration of an image reading apparatus 1 according to an embodiment of the present invention. 画像読取装置1の読取部24の構成を拡大して示す図面である。2 is an enlarged view illustrating a configuration of a reading unit 24 of the image reading apparatus 1. 画像読取装置1の電源構成を示すブロック図である。2 is a block diagram illustrating a power supply configuration of the image reading apparatus 1. FIG. 画像読取装置1の電気的構成を示すブロック図である。2 is a block diagram illustrating an electrical configuration of the image reading apparatus 1. FIG. 保守メイン処理を示すフローチャートである。It is a flowchart which shows a maintenance main process. 読取メイン処理を示すフローチャートである。It is a flowchart which shows a reading main process. 間引き設定処理を示すフローチャートである。It is a flowchart which shows a thinning setting process. 第1間引き画素確定処理を示すフローチャートである。It is a flowchart which shows a 1st thinning pixel determination process. 第2間引き画素確定処理を示すフローチャートである。It is a flowchart which shows a 2nd thinning pixel determination process. 1ライン間引き画素設定処理を示すフローチャートである。It is a flowchart which shows 1 line thinning pixel setting processing. 第1具体例を説明する図面である。It is drawing explaining a 1st specific example. 第2具体例を説明する図面である。It is drawing explaining the 2nd specific example.

[実施形態]
以下に、本発明の一実施形態に係る画像読取装置1について図面を参照して説明する。図1において、上下方向および前後方向は矢印により示される。
[Embodiment]
Hereinafter, an image reading apparatus 1 according to an embodiment of the present invention will be described with reference to the drawings. In FIG. 1, the vertical direction and the front-back direction are indicated by arrows.

<画像読取装置1の機械的構成>
図1において、画像読取装置1は、給紙トレイ2と、本体部3と、排紙トレイ4とを備える。操作部5、および表示部6が、本体部3の上面に配置される。操作部5は、電源スイッチ、および各種設定ボタンを含み、使用者からの操作指令等を受け付ける。たとえば、操作部5は、3色のカラーモードおよび単色のモノモードのいずれかを選択する選択ボタン、解像度を設定する操作ボタンなどを含む。表示部6は、LCDからなり画像読取装置1の状況を表示する。
<Mechanical Configuration of Image Reading Apparatus 1>
In FIG. 1, the image reading apparatus 1 includes a paper feed tray 2, a main body 3, and a paper discharge tray 4. The operation unit 5 and the display unit 6 are disposed on the upper surface of the main body unit 3. The operation unit 5 includes a power switch and various setting buttons, and receives operation commands and the like from the user. For example, the operation unit 5 includes a selection button for selecting one of a three-color mode and a mono mode and an operation button for setting a resolution. The display unit 6 includes an LCD and displays the status of the image reading apparatus 1.

搬送経路20が、本体部3の内部に形成される。給紙トレイ2に載置された原稿GSは、搬送経路20に沿って搬送方向FDに搬送され、排紙トレイ4に排出される。給紙ローラ21と、分離パッド22と、一対の上流側搬送ローラ23と、読取部24と、プラテンガラス25と、一対の下流側搬送ローラ26とが、搬送経路20に沿って配置される。   A conveyance path 20 is formed inside the main body 3. The document GS placed on the paper feed tray 2 is transported in the transport direction FD along the transport path 20 and is discharged to the paper discharge tray 4. A paper feed roller 21, a separation pad 22, a pair of upstream transport rollers 23, a reading unit 24, a platen glass 25, and a pair of downstream transport rollers 26 are arranged along the transport path 20.

給紙ローラ21は、分離パッド22と協働して、給紙トレイ2に載置された複数枚の原稿GSを、1枚ずつ給送する。上流側搬送ローラ23、および下流側搬送ローラ26は、搬送モータMT(図4参照)により駆動される。プラテンガラス25は、光透過性を有し、搬送経路20の下側において搬送経路20に沿って配置される。搬送ローラ23、26は、給紙ローラ21から給送された原稿GSがプラテンガラス25の上を通過するように原稿GSを搬送する。   The paper feed roller 21 cooperates with the separation pad 22 to feed a plurality of originals GS placed on the paper feed tray 2 one by one. The upstream side conveyance roller 23 and the downstream side conveyance roller 26 are driven by a conveyance motor MT (see FIG. 4). The platen glass 25 is light transmissive and is disposed along the transport path 20 below the transport path 20. The transport rollers 23 and 26 transport the document GS so that the document GS fed from the paper feed roller 21 passes over the platen glass 25.

本実施形態では、原稿GSの読み取り面が給紙トレイ2の載置面に向くように原稿GSが給紙トレイ2に載置される。読取部24は、搬送経路20の下側に配置され、プラテンガラス25を通過する原稿GSの読み取り面の画像を読み取る。原稿センサ27が、給紙トレイ2に配置され、給紙トレイ2に原稿GSが載置されたときにオンし、給紙トレイ2に原稿GSが載置されていないときにオフするように構成される。   In the present embodiment, the document GS is placed on the paper feed tray 2 so that the reading surface of the document GS faces the placement surface of the paper feed tray 2. The reading unit 24 is disposed below the conveyance path 20 and reads an image on the reading surface of the document GS passing through the platen glass 25. The document sensor 27 is disposed in the paper feed tray 2 and is turned on when the document GS is placed on the paper feed tray 2 and turned off when the document GS is not placed on the paper feed tray 2. Is done.

(読取部24の詳細な構成)
読取部24の詳細な構成について図2を参照して説明する。図2において、読取部24は、光源30と、受光部31と、光学部材32とを備える。光源30は、赤色、緑色および青色の3色の発光ダイオードを含む。光源30から出射された光が原稿GSの読み取り面などにより反射されたときに、光学部材32は、反射光を受光部31に導く。本実施形態において、カラーモードが選択されたとき、3色の発光ダイオードが順次点灯することにより1ライン分の原稿GSの画像が読み取られる。また、モノモードが選択されたとき、3色のうちの特定の1色、たとえば緑色の発光ダイオードが点灯することにより1ライン分の原稿GSの画像が読み取られる。
(Detailed configuration of the reading unit 24)
A detailed configuration of the reading unit 24 will be described with reference to FIG. In FIG. 2, the reading unit 24 includes a light source 30, a light receiving unit 31, and an optical member 32. The light source 30 includes light emitting diodes of three colors of red, green, and blue. When the light emitted from the light source 30 is reflected by the reading surface of the document GS or the like, the optical member 32 guides the reflected light to the light receiving unit 31. In the present embodiment, when the color mode is selected, the three-color light emitting diodes are sequentially turned on to read an image of the original GS for one line. When the mono mode is selected, an image of the original GS for one line is read by turning on a specific one of the three colors, for example, a green light emitting diode.

灰色基準板34が、読取部24と搬送経路20を介して対向する位置に、配置される。灰色基準板34は、原稿GSの背景色である白色より低い反射率を有する。搬送経路20に原稿GSが存在しない場合、光源30からの出射光は、灰色基準板34により反射され、その反射光は光学部材32を介して受光部31により受光される。光学部材32は、主走査方向MDに延びるロッドレンズを含む。   The gray reference plate 34 is disposed at a position facing the reading unit 24 via the conveyance path 20. The gray reference plate 34 has a lower reflectance than white, which is the background color of the document GS. When the document GS is not present on the conveyance path 20, the light emitted from the light source 30 is reflected by the gray reference plate 34, and the reflected light is received by the light receiving unit 31 through the optical member 32. The optical member 32 includes a rod lens extending in the main scanning direction MD.

受光部31は、主走査方向MDに直線状に配列される多数のセンサICチップを有し、各センサICチップは、主走査方向MDに配列される多数の光電変換素子33を含み、図示しないシフトレジスタ、および増幅器を内蔵する。ここで、各光電変換素子33が1画素を出力する素子である。   The light receiving unit 31 has a large number of sensor IC chips arranged linearly in the main scanning direction MD, and each sensor IC chip includes a large number of photoelectric conversion elements 33 arranged in the main scanning direction MD, which are not shown. Built-in shift register and amplifier. Here, each photoelectric conversion element 33 is an element that outputs one pixel.

<画像読取装置1の電気的構成>
画像読取装置1の電気的構成について図3及び図4を参照して説明する。図3において、画像読取装置1は、AC/DC変換部48、DC/DC変換部49、駆動部47、読取部24、および制御部50を構成要素の一部として備える。これらの構成要素のうちAC/DC変換部48およびDC/DC変換部49は、電圧を変換する変換部であり、駆動部47、読取部24、および制御部50へそれぞれ異なる電圧で電源を供給している。制御部50は、CPU40、ROM41、RAM42、デバイス制御部44、および画像処理部46から構成され、画像読取装置1を制御する。詳細は後述する。
<Electrical Configuration of Image Reading Apparatus 1>
The electrical configuration of the image reading apparatus 1 will be described with reference to FIGS. In FIG. 3, the image reading apparatus 1 includes an AC / DC conversion unit 48, a DC / DC conversion unit 49, a drive unit 47, a reading unit 24, and a control unit 50 as a part of constituent elements. Among these components, the AC / DC converter 48 and the DC / DC converter 49 are converters that convert voltages, and supply power to the drive unit 47, the reading unit 24, and the control unit 50 at different voltages. doing. The control unit 50 includes a CPU 40, a ROM 41, a RAM 42, a device control unit 44, and an image processing unit 46, and controls the image reading apparatus 1. Details will be described later.

AC/DC変換部48は、交流電圧100Vを直流電圧24Vへ変換し、DC/DC変換部49へ出力している。即ち、AC/DC変換部48は、ダイオードブリッジと積分回路などの公知の回路構成を用いて、交流電圧100Vを直流電圧24Vへ変換している。   The AC / DC converter 48 converts the AC voltage 100V into a DC voltage 24V and outputs the DC voltage to the DC / DC converter 49. That is, the AC / DC converter 48 converts the AC voltage 100V into the DC voltage 24V using a known circuit configuration such as a diode bridge and an integration circuit.

DC/DC変換部49は、AC/DC変換部48から入力された直流電圧24VをPWM設定値に従いPWM制御した後、積分回路を用いて積分することにより、必要となる直流電圧を生成している。例えば、読取部24が必要とする直流電圧3.3Vは、通流率が13.75%(3.3V/24V=13.75%)となるように直流電圧24VをPWM制御することにより生成される。制御部50が必要とする直流電圧1.8Vおよび駆動回路47が必要とする直流電圧24Vも同様にPWM制御することにより生成される。   The DC / DC converter 49 generates the necessary DC voltage by performing PWM control on the DC voltage 24V input from the AC / DC converter 48 according to the PWM setting value, and then integrating using an integration circuit. Yes. For example, the DC voltage 3.3V required by the reading unit 24 is generated by PWM control of the DC voltage 24V so that the conduction ratio is 13.75% (3.3V / 24V = 13.75%). Is done. The DC voltage 1.8V required by the controller 50 and the DC voltage 24V required by the drive circuit 47 are similarly generated by PWM control.

図4において、画像読取装置1は、CPU40、ROM41、RAM42、フラッシュPROM43、デバイス制御部44、アナログフロントエンド(以下、AFEとする)45、画像処理部46、および駆動回路47を構成要素の一部として備える。これらの構成要素は、バス48を介して、操作部5、表示部6、および原稿センサ27に接続される。   In FIG. 4, the image reading apparatus 1 includes a CPU 40, a ROM 41, a RAM 42, a flash PROM 43, a device control unit 44, an analog front end (hereinafter referred to as AFE) 45, an image processing unit 46, and a drive circuit 47. Prepare as a part. These components are connected to the operation unit 5, the display unit 6, and the document sensor 27 via the bus 48.

ROM41は、後述する保守メイン処理、読取メイン処理、各メイン処理中のサブルーチンの処理など、画像読取装置1の各種動作を実行するためのプログラムを記憶する。CPU40は、ROM41から読み出されたプログラムに従って、各部の制御を行う。フラッシュPROM43は、読み書き可能な不揮発性メモリであり、CPU40の制御処理により生成された各種のデータ、たとえば保守メイン処理により取得された黒データBKおよび白データWHなどを記憶する。RAM42は、CPU40の制御処理により生成された算出結果などを一時的に記憶する。   The ROM 41 stores programs for executing various operations of the image reading apparatus 1 such as a maintenance main process, a reading main process, and a subroutine process in each main process, which will be described later. The CPU 40 controls each unit according to the program read from the ROM 41. The flash PROM 43 is a readable / writable nonvolatile memory, and stores various data generated by the control process of the CPU 40, such as black data BK and white data WH acquired by the maintenance main process. The RAM 42 temporarily stores the calculation result generated by the control process of the CPU 40.

デバイス制御部44は、読取部24に接続され、CPU40からの命令に基いて、光源30の点灯または消灯を制御する信号、および、光源30に流れる電流値を制御する信号を読取部24に送信する。また、デバイス制御部44は、CPU40からの命令に基いて、受光部31の各センサICチップの多数の光電変換素子33を順番に動作させるために、クロック信号CLK、および、シリアルイン信号SIを受光部31に送信する。読取部24は、デバイス制御部44から点灯制御信号を受け取ると、光源30を点灯させるとともに、受光部32が受光した受光量に応じたアナログ信号をAFE45に送信する。   The device control unit 44 is connected to the reading unit 24 and transmits to the reading unit 24 a signal for controlling turning on / off of the light source 30 and a signal for controlling a current value flowing through the light source 30 based on a command from the CPU 40. To do. In addition, the device control unit 44 receives the clock signal CLK and the serial-in signal SI in order to sequentially operate a large number of photoelectric conversion elements 33 of each sensor IC chip of the light receiving unit 31 based on a command from the CPU 40. Transmit to the light receiving unit 31. When receiving the lighting control signal from the device control unit 44, the reading unit 24 turns on the light source 30 and transmits an analog signal corresponding to the amount of light received by the light receiving unit 32 to the AFE 45.

AFE45は、読取部24に接続され、CPU40からの命令に基づいて、読取部24から送信されるアナログ信号をデジタル信号に変換する。AFE45は、予め定められた入力レンジおよび分解能を有する。たとえば、分解能は、10ビットであるならば「0」から「1023」の階調である。この場合、AFE45は、読取部24から送信されたアナログ信号をデジタル信号として10ビット(0〜1023)のデジタル画像データに変換する。AFE45によって変換されたデジタル画像データは、画像処理部46に送信される。   The AFE 45 is connected to the reading unit 24 and converts an analog signal transmitted from the reading unit 24 into a digital signal based on a command from the CPU 40. The AFE 45 has a predetermined input range and resolution. For example, if the resolution is 10 bits, the gradation is from “0” to “1023”. In this case, the AFE 45 converts the analog signal transmitted from the reading unit 24 into 10-bit (0 to 1023) digital image data as a digital signal. The digital image data converted by the AFE 45 is transmitted to the image processing unit 46.

画像処理部46は、画像処理用の専用ICであるASICから構成され、デジタル画像データに各種の画像処理を施す。画像処理は、シェーディング補正などの各種の補正処理、および解像度変換処理などである。画像処理部46は、デジタル画像データに黒データBKおよび白データWHを用いてシェーディング補正を行い階調値に補正する。さらに、画像処理部46は、階調値を間引いて出力することにより、解像度変換処理を行う。具体的には、画像処理部46は、先頭画素から最終画素までの全画素について設定された複数の間引き画素を間引いて階調値を出力する。間引き後の階調値は、バス48を介してRAM42に記憶される。   The image processing unit 46 is composed of an ASIC that is a dedicated IC for image processing, and performs various types of image processing on the digital image data. The image processing includes various correction processing such as shading correction, resolution conversion processing, and the like. The image processing unit 46 performs shading correction on the digital image data using the black data BK and the white data WH to correct the gradation value. Further, the image processing unit 46 performs resolution conversion processing by thinning out and outputting the gradation values. Specifically, the image processing unit 46 thins out a plurality of thinned pixels set for all the pixels from the first pixel to the last pixel, and outputs a gradation value. The tone values after the thinning are stored in the RAM 42 via the bus 48.

駆動回路47は、搬送モータMTに接続され、CPU40から送信される駆動指令に基づいて搬送モータMTを駆動する。駆動回路47は、駆動指令により指令された回転量および回転方向に従って搬送モータMTを回転させる。搬送モータMTが所定量だけ回転すると、搬送ローラ23、26が所定角度回転し、搬送経路20において原稿GSが所定距離だけ搬送される。   The drive circuit 47 is connected to the transport motor MT and drives the transport motor MT based on a drive command transmitted from the CPU 40. The drive circuit 47 rotates the transport motor MT according to the rotation amount and the rotation direction commanded by the drive command. When the transport motor MT rotates by a predetermined amount, the transport rollers 23 and 26 rotate by a predetermined angle, and the document GS is transported by a predetermined distance on the transport path 20.

<実施形態の動作>
次に、画像読取装置1の動作について図面を参照して説明する。画像読取装置1は、原稿GSの読み取り前に実行される保守メイン処理と、原稿GSを読み取る読取メイン処理とを主に実行する。保守メイン処理中のステップM1〜M10の処理、読取メイン処理中のステップMA1〜MA13の処理、および各サブルーチンのステップの処理は、CPU40が実行する処理である。
<Operation of Embodiment>
Next, the operation of the image reading apparatus 1 will be described with reference to the drawings. The image reading apparatus 1 mainly executes a maintenance main process executed before reading the document GS and a read main process for reading the document GS. The processing of steps M1 to M10 during the maintenance main processing, the processing of steps MA1 to MA13 during the reading main processing, and the processing of the steps of each subroutine are processing executed by the CPU 40.

(保守メイン処理)
図5に示す保守メイン処理は、画像読取装置1が工場から出荷される前に、または出荷後にサービスマンが保守点検するときに、サービスマン等の作業者が画像読取装置1の操作部5を特別な操作方法に従って操作することにより開始される。
(Maintenance main processing)
The maintenance main process shown in FIG. 5 is performed when an operator such as a service person operates the operation unit 5 of the image reading apparatus 1 before the image reading apparatus 1 is shipped from the factory or when a service person performs maintenance inspection after the shipment. Start by operating according to a special operating method.

まず、作業者が、白基準となる特別な原稿GSを給紙トレイ2に載置すると、原稿センサ27が原稿GSを検知する。原稿センサ27からの検知信号に従って、原稿GSがあるか否かが判断される(M1)。原稿GSがあるとき(M1:YES)、処理がステップM2に進む。原稿GSがないとき(M1:NO)、処理がステップM10に進み、原稿GSがないことを報知するエラーメッセージが表示部6に表示され(M10)、保守メイン処理が終了する。   First, when an operator places a special document GS serving as a white reference on the paper feed tray 2, the document sensor 27 detects the document GS. It is determined whether there is a document GS according to the detection signal from the document sensor 27 (M1). When document GS is present (M1: YES), the process proceeds to step M2. When there is no document GS (M1: NO), the process proceeds to step M10, an error message notifying that there is no document GS is displayed on the display unit 6 (M10), and the maintenance main process ends.

CPU40は、デバイス制御部44およびAFE45について読取設定値を設定する(M2)。具体的には、CPU40は、各解像度に応じたクロック信号CLKをフラッシュPROM43から取得し、デバイス制御部44に設定する。さらに、CPU40は、AFE45のオフセット調整値、ゲイン調整値、およびサンプリング値をフラッシュPROM43から取得し、AFE45に設定する。クロック信号CLKの設定値は、受光部31に含まれるシフトレジスタの1画素の信号を転送するための設定値である。よって、クロック信号CLKの設定値は、受光部31から出力されるアナログ信号の1画素あたりの出力速度(以下、画素速度という)に対応する値である。サンプリング値は、アナログ信号をデジタル信号に変換するタイミングを示す値であり、1画素毎に設定される。言い換えると、サンプリング周期は、画素周期と同じである。オフセット調整値は、AFE45に入力されるアナログ信号のレベルをシフトする値であり、ゲイン調整値は、AFE45に入力されるアナログ信号の利得を調整する値である。   The CPU 40 sets reading setting values for the device control unit 44 and the AFE 45 (M2). Specifically, the CPU 40 acquires a clock signal CLK corresponding to each resolution from the flash PROM 43 and sets it in the device control unit 44. Further, the CPU 40 acquires the offset adjustment value, gain adjustment value, and sampling value of the AFE 45 from the flash PROM 43 and sets them in the AFE 45. The set value of the clock signal CLK is a set value for transferring the signal of one pixel of the shift register included in the light receiving unit 31. Therefore, the set value of the clock signal CLK is a value corresponding to the output speed per pixel of the analog signal output from the light receiving unit 31 (hereinafter referred to as pixel speed). The sampling value is a value indicating timing for converting an analog signal into a digital signal, and is set for each pixel. In other words, the sampling period is the same as the pixel period. The offset adjustment value is a value for shifting the level of the analog signal input to the AFE 45, and the gain adjustment value is a value for adjusting the gain of the analog signal input to the AFE 45.

CPU40は、一定ノイズ周期を算出する(M3)。具体的には、CPU40は、フラッシュPROM43からPWM設定値を取得し、DC/DC変換部49のスイッチング周期SWTを算出する。CPU40は、画素速度から画素周期IPTを算出する。CPU40は、スイッチング周期SWTと画素周期IPTとの最小公倍数を一定ノイズ周期FNTとして算出する。また、一定ノイズ周期FNTを画素周期IPTで割算した値を一定ノイズ画素数FNCとしてRAM42に記憶する。   The CPU 40 calculates a constant noise period (M3). Specifically, the CPU 40 acquires the PWM setting value from the flash PROM 43 and calculates the switching cycle SWT of the DC / DC converter 49. The CPU 40 calculates the pixel period IPT from the pixel speed. The CPU 40 calculates the least common multiple of the switching period SWT and the pixel period IPT as the constant noise period FNT. Further, a value obtained by dividing the constant noise period FNT by the pixel period IPT is stored in the RAM 42 as the constant noise pixel number FNC.

CPU40は、ライン周期を設定する(M4)。具体的には、CPU40は、各解像度に応じたシリアルイン信号SIの設定値を一定ノイズ周期FNTの整数倍となるように算出し、デバイス制御部44にライン周期として設定する。   The CPU 40 sets a line cycle (M4). Specifically, the CPU 40 calculates the set value of the serial-in signal SI corresponding to each resolution so as to be an integral multiple of the constant noise period FNT, and sets it as a line period in the device control unit 44.

CPU40は、光源30の光量を調整する(M5)。CPU40は、白基準原稿GSに向けて、光源30から光を照射させ、その反射光を読み取った時のアナログ信号がAFE45の最大値となるように、光量STを調整する。ここで、光量STは、光源30の1ラインにおける点灯時間および電流値にて決定される。   The CPU 40 adjusts the light amount of the light source 30 (M5). The CPU 40 irradiates light from the light source 30 toward the white reference document GS, and adjusts the light amount ST so that the analog signal when the reflected light is read becomes the maximum value of the AFE 45. Here, the light quantity ST is determined by the lighting time and current value in one line of the light source 30.

CPU40は、黒データBKを取得する(M6)。CPU40は、光源30を消灯させ、白基準原稿GSを読み取る。そして、読み取った1ライン分のデジタル画像データを黒データBKとして取得し、フラッシュPROM43に記憶する。   The CPU 40 acquires black data BK (M6). The CPU 40 turns off the light source 30 and reads the white reference document GS. Then, the read digital image data for one line is acquired as black data BK and stored in the flash PROM 43.

CPU40は、白データWHを取得する(M7)。CPU40は、光源30を光量STで点灯させ、白基準原稿GSを読み取る。そして、CPU40は、読み取った1ライン分のデジタル画像データを白データWHとして取得し、フラッシュPROM43に記憶する。   The CPU 40 acquires white data WH (M7). The CPU 40 turns on the light source 30 with the light quantity ST and reads the white reference document GS. Then, the CPU 40 acquires the read digital image data for one line as white data WH and stores it in the flash PROM 43.

CPU40は、原稿センサ27からの検知信号に従って、原稿GSがないか否かを判断する(M8)。CPU40は、原稿GSがないと判断(M8:YES)すれば、処理を灰データの最大値検出処理(M9)に進める。CPU40は、原稿GSがあると判断(M8:NO)すれば、処理をエラー表示処理(M10)に進める。CPU40は、原稿GSが誤って載置されたことを報知するエラーメッセージを表示部6に表示させ(M10)、保守メイン処理が終了する。   The CPU 40 determines whether or not there is a document GS according to the detection signal from the document sensor 27 (M8). If CPU 40 determines that there is no document GS (M8: YES), CPU 40 advances the process to the maximum value detection process (M9) of ash data. If CPU 40 determines that there is document GS (M8: NO), CPU 40 advances the process to error display process (M10). The CPU 40 causes the display unit 6 to display an error message notifying that the document GS has been erroneously placed (M10), and the maintenance main process ends.

CPU40は、灰データ最大値GRmaxを検出する(M9)。CPU40は、光源30を光量STで点灯させ、灰色基準板34を読み取る。そして、CPU40は、読み取った1ライン分のデジタル画像データのうちで、最大値を灰データ最大値GRmaxとして検出する。CPU40は、この灰データ最大値GRmaxをフラッシュPROM43に記憶する。灰データ最大値GRmaxが記憶されると、保守メイン処理が終了する。   The CPU 40 detects the ash data maximum value GRmax (M9). The CPU 40 turns on the light source 30 with the light amount ST and reads the gray reference plate 34. Then, the CPU 40 detects the maximum value as the gray data maximum value GRmax among the read digital image data for one line. The CPU 40 stores the ash data maximum value GRmax in the flash PROM 43. When the gray data maximum value GRmax is stored, the maintenance main process ends.

(読取メイン処理)
図6に示す読取メイン処理は、ユーザが読取用の原稿GSを給紙トレイ2に載置して操作部5のうちの読取開始ボタンを操作することにより開始される。
(Reading main process)
The reading main process shown in FIG. 6 is started when the user places a reading document GS on the paper feed tray 2 and operates a reading start button of the operation unit 5.

ユーザが読取開始ボタンを操作すると、CPU40は、読取設定値を設定する(MA1)。ユーザが操作部5を操作して設定した解像度RESに応じて、CPU40は、デバイス制御部44、AFE45、および画像処理部46の読取設定値を設定する。保守メイン処理の読取設定処理(M2)および間引き関連設定(M4)と同様に、CPU40は、デバイス制御部44に対してクロック信号CLKおよびシリアルイン信号SIの設定を行い、AFE45に対してオフセット調整値、ゲイン調整値、およびサンプリング値を設定する。さらに、CPU40は、画像処理部46に対してシェーディング補正を実行し、階調値をRAM42へ保存する設定を行う。   When the user operates the reading start button, the CPU 40 sets a reading setting value (MA1). In accordance with the resolution RES set by the user operating the operation unit 5, the CPU 40 sets reading setting values for the device control unit 44, the AFE 45, and the image processing unit 46. Similar to the reading setting process (M2) and the thinning-related setting (M4) in the maintenance main process, the CPU 40 sets the clock signal CLK and the serial-in signal SI to the device control unit 44 and adjusts the offset to the AFE 45. Set the value, gain adjustment value, and sampling value. Further, the CPU 40 performs shading correction on the image processing unit 46 and performs setting to save the gradation value in the RAM 42.

CPU40は、光源30の光量STを調整する(MA2)。CPU40は、灰色基準板34に向けて、光源30から光を照射させ、その反射光を読み取った時のデジタル画像データの最大値が灰データ最大値GRmaxとなるように、光量STを調整する。   The CPU 40 adjusts the light quantity ST of the light source 30 (MA2). The CPU 40 irradiates light from the light source 30 toward the gray reference plate 34 and adjusts the light quantity ST so that the maximum value of the digital image data when the reflected light is read becomes the gray data maximum value GRmax.

CPU40は、ユーザにより設定された設定解像度RESが間引き処理を実行する解像度か否かを判断する(MA3)。具体的には、CPU40は、設定解像度RESが読取部24から出力される出力解像度REDと一致しない場合(MA3:Yes)には、間引き画素を設定する間引き設定処理(MA4)に進み、設定解像度RESが出力解像度REDと一致する場合(MA3:No)には、CPU40は読取処理(MA5)を実行する。   The CPU 40 determines whether or not the set resolution RES set by the user is the resolution for executing the thinning process (MA3). Specifically, when the set resolution RES does not match the output resolution RED output from the reading unit 24 (MA3: Yes), the CPU 40 proceeds to a thinning setting process (MA4) for setting thinned pixels, and sets the setting resolution. When RES matches the output resolution RED (MA3: No), the CPU 40 executes a reading process (MA5).

CPU40は、画像処理部46に1ライン分の間引きする画素を設定する(MA4)。詳細は後述するが、間引き設定処理(MA4)は、1ライン分の階調値を取得し、取得した階調値から後述する一定ノイズグループにおける第1間引き画素および第2間引き画素の位置を確定する。さらに、間引き設定処理(MA4)は、確定した第1間引き画素および第2間引き画素から1ライン分の間引き画素を確定し、確定した間引き画素を画像処理部46に設定する。   The CPU 40 sets pixels to be thinned out for one line in the image processing unit 46 (MA4). Although details will be described later, the thinning setting process (MA4) acquires gradation values for one line, and determines the positions of the first thinned pixels and the second thinned pixels in the fixed noise group described later from the acquired gradation values. To do. Further, the thinning setting process (MA4) determines thinned pixels for one line from the determined first thinned pixels and second thinned pixels, and sets the determined thinned pixels in the image processing unit 46.

CPU40は、原稿GSを読み取らせる(MA5)。具体的には、CPU40は、読取設定処理(MA1)で設定された読取設定値に基き、原稿GSを読み取らせ、アナログ信号画像処理部46へ出力させる。CPU40は、出力されたアナログ信号を画像処理部46によりシェーディング補正させ、階調値を生成させる。CPU40は、画像処理部46に設定された1ライン分の間引き画素設定に従って生成された階調値を間引かせる。CPU40は、間引かせた階調値をRAM42に保存する。画像処理部46に間引き画素が設定されていない場合は、階調値は間引かれずにRAM42に保存される。   The CPU 40 reads the document GS (MA5). Specifically, the CPU 40 reads the document GS based on the reading setting value set in the reading setting process (MA1), and outputs it to the analog signal image processing unit 46. The CPU 40 causes the image processing unit 46 to perform shading correction on the output analog signal to generate a gradation value. The CPU 40 thins out the gradation values generated according to the thinning pixel setting for one line set in the image processing unit 46. The CPU 40 stores the thinned gradation value in the RAM 42. When no thinning pixels are set in the image processing unit 46, the gradation values are stored in the RAM 42 without being thinned out.

(間引き設定処理MA4)
間引き設定処理(MA4)が開始されると、CPU40は、1ライン分の階調値DTを取得する(TA1)。CPU40は、灰色基準板34を光量STで照射させ、その反射光を読み取り、1ライン分の階調値DTを取得し、RAM42に記憶する。
(Thinning setting process MA4)
When the thinning setting process (MA4) is started, the CPU 40 acquires the gradation value DT for one line (TA1). The CPU 40 irradiates the gray reference plate 34 with the light amount ST, reads the reflected light, acquires the gradation value DT for one line, and stores it in the RAM 42.

CPU40は、全平均階調値DTaveを算出する(TA2)。具体的には、CPU40は、1ライン分の階調値DTの全ての値の平均値を全平均階調値DTaveとして算出し、RAM42に記憶する。   The CPU 40 calculates the total average gradation value DTave (TA2). Specifically, the CPU 40 calculates the average value of all the gradation values DT for one line as the total average gradation value DTave and stores it in the RAM 42.

CPU40は、各順位画素平均階調値DTgrを算出する(TA3)。具体的には、CPU40は、1ライン分の階調値DTのうち先頭画素の階調値から一定ノイズ画素数FNC毎の階調値の平均値を第1順位画素平均階調値として算出する。CPU40は、1ライン分の階調値DTのうち2番目の画素の階調値から一定ノイズ画素数FNC毎の階調値の平均値を第2順位画素平均階調値として算出する。同様に、CPU40は、一定ノイズ画素数FNC分の各順位画素平均階調値DTgrを算出する。この一定ノイズ画素数FNC毎にグルーピングしたグループを一定ノイズグループといい、一定ノイズグループのうち先頭画素側の画素を第1順位画素とし、次の画素を第2順位画素として、各順位の画素を定義する。例えば、灰基準板の階調値が600であった場合は、第1順位画素平均階調値の一例は630であり、第2順位画素平均階調値の一例は575である。   The CPU 40 calculates each rank pixel average gradation value DTgr (TA3). Specifically, the CPU 40 calculates the average value of the gradation values for each fixed noise pixel number FNC from the gradation value of the first pixel among the gradation values DT for one line as the first rank pixel average gradation value. . The CPU 40 calculates the average value of the gradation values for each fixed noise pixel number FNC from the gradation value of the second pixel among the gradation values DT for one line as the second-order pixel average gradation value. Similarly, the CPU 40 calculates each rank pixel average gradation value DTgr for a certain number of noise pixels FNC. A group that is grouped for each fixed number of noise pixels FNC is called a fixed noise group. In the fixed noise group, a pixel on the first pixel side is a first rank pixel, a next pixel is a second rank pixel, and each rank pixel is Define. For example, when the gradation value of the gray reference plate is 600, an example of the first rank pixel average gradation value is 630, and an example of the second rank pixel average gradation value is 575.

CPU40は、各平均差分値DFaveを算出する(TA4)。具体的には、CPU40は、各順位画素平均階調値DTgrと全平均階調値DTaveとの差分値を各平均差分値DFaveとして算出する。差分値の算出方法は、引算した値の絶対値を算出する方法である。各平均差分値DFaveは、1ラインについて一定ノイズ画素数FNCに相当する数だけ算出され、各順位画素に関連付けて保存される。   The CPU 40 calculates each average difference value DFave (TA4). Specifically, the CPU 40 calculates a difference value between each rank pixel average gradation value DTgr and the total average gradation value DTave as each average difference value DFave. The difference value calculation method is a method of calculating the absolute value of the subtracted value. Each average difference value DFave is calculated by a number corresponding to the fixed noise pixel number FNC for one line, and stored in association with each rank pixel.

CPU40は、間引き間隔TOI、間引き数TON、および間引き率TORを算出する(TA5)。具体的には、CPU40は、ユーザにより設定された設定解像度RESと読取部24から出力される出力解像度REDとの整数比を算出する。CPU40は、その整数比のうち出力解像度REDに対応している整数を間引き間隔TOIとして算出し、間引き間隔TOIから設定解像度RESに対応している整数を引算した値を間引き数TONとして算出する。さらに、CPU40は、間引き数TONを間引き間隔TOIで割算した値を間引き率TORとして算出する。ここで、間引き間隔TOIは、後述する間引きグループの画素数に相当する。   The CPU 40 calculates the thinning interval TOI, the thinning number TON, and the thinning rate TOR (TA5). Specifically, the CPU 40 calculates an integer ratio between the set resolution RES set by the user and the output resolution RED output from the reading unit 24. The CPU 40 calculates an integer corresponding to the output resolution RED out of the integer ratio as the thinning interval TOI, and calculates a value obtained by subtracting an integer corresponding to the set resolution RES from the thinning interval TOI as the thinning number TON. . Further, the CPU 40 calculates a value obtained by dividing the thinning number TON by the thinning interval TOI as the thinning rate TOR. Here, the thinning interval TOI corresponds to the number of pixels in a thinning group described later.

CPU40は、第1間引き画素を決定する(TA6)。CPU40は、一定ノイズグループに対して第1間引き画素を決定する。詳細は後述するが、一定ノイズグループの画素数と間引きグループの画素数とは、異なる画素数である場合がある。そのため、間引きグループではなく、一定ノイズグループ毎に間引き画素を設定すると、優先して間引かれる第1間引き画素と第1間引き画素が無い場合に間引かれる第2間引き画素とを設定する必要がある。本処理(TA6)においては、優先して間引かれる第1間引き画素を決定する。   The CPU 40 determines the first thinned pixel (TA6). The CPU 40 determines the first thinned pixel for the constant noise group. Although details will be described later, the number of pixels of the fixed noise group and the number of pixels of the thinning group may be different. Therefore, if a thinned pixel is set for each fixed noise group instead of a thinned group, it is necessary to set a first thinned pixel that is thinned preferentially and a second thinned pixel that is thinned when there is no first thinned pixel. is there. In this process (TA6), the first thinned pixels to be thinned out with priority are determined.

CPU40は、第2間引き画素を決定する(TA7)。CPU40は、一定ノイズグループに対して第2間引き画素を決定する。詳細は後述するが、本処理においては、間引きグループにおいて、第1間引き画素の画素数が間引き数TON未満であった場合に、間引かれる第2間引き画素を決定する。   The CPU 40 determines the second thinning pixel (TA7). The CPU 40 determines the second thinning pixel for the constant noise group. Although details will be described later, in this processing, in the thinning group, when the number of pixels of the first thinning pixel is less than the thinning number TON, the second thinning pixel to be thinned is determined.

CPU40は、1ラインの間引き画素を確定し、確定した間引き画素を画像処理部46に設定する(TA8)。詳細は後述するが、CPU40は、先頭画素から順に間引きグループ毎に、第1間引き画素と第2間引き画素のどちらか若しくは両方を間引き画素として画像処理部46に設定する。   The CPU 40 determines the thinned pixels for one line and sets the determined thinned pixels in the image processing unit 46 (TA8). Although details will be described later, the CPU 40 sets one or both of the first thinned pixels and the second thinned pixels in the image processing unit 46 as thinned pixels for each thinning group in order from the top pixel.

(第1間引き画素確定処理TA6)
第1間引き画素確定処理(TA6)が開始されると、CPU40は、画素判定値JVを算出する(TB1)。具体的には、CPU40は、一定ノイズ画素数FNCと間引き率TORとを掛算することにより、画素判定値JVを算出する。
(First thinning pixel determination process TA6)
When the first thinned pixel determination process (TA6) is started, the CPU 40 calculates a pixel determination value JV (TB1). Specifically, the CPU 40 calculates the pixel determination value JV by multiplying the constant noise pixel number FNC and the thinning rate TOR.

CPU40は、第1間引き数TON1を算出する(TB2)。具体的には、CPU40は、画素判定値JVの整数部を第1間引き数TON1として算出する。   The CPU 40 calculates the first thinning-out number TON1 (TB2). Specifically, the CPU 40 calculates the integer part of the pixel determination value JV as the first thinning number TON1.

CPU40は、第2間引き画素の設定が必要か否かを判断する(TB3)。第2間引き画素は、間引きグループ内において第1間引き画素が間引かれた場合に、さらに間引く必要がある場合に設定される画素である。よって、画素判定値JVが整数である場合には、画像処理部46は、第1間引き画素を間引くだけで、設定解像度RESへ変換することができる。しかし、画素判定値JVが整数でない場合には、画像処理部46は、第1間引き画素に加えて他の画素を間引かないと、設定解像度RESへ変換することができない。本処理(TB3)では、画素判定値JVが整数である場合(TB3:No)には、最大画素位置算出処理(TB5)へ進み、画素判定値JVが整数でない場合(TB3:Yes)には、第2間引き画素設定フラグをONにする処理(TB4)へ進む。第2間引き画素設定フラグをONにする処理(TB4)では、CPU40は、第2間引き画素を設定する処理を行うための第2間引き画素設定フラグをONに設定する。   The CPU 40 determines whether it is necessary to set the second thinning pixel (TB3). The second thinned pixel is a pixel that is set when further thinning is necessary when the first thinned pixel is thinned in the thinning group. Therefore, when the pixel determination value JV is an integer, the image processing unit 46 can convert the setting resolution RES by only thinning out the first thinned pixels. However, if the pixel determination value JV is not an integer, the image processing unit 46 cannot convert to the set resolution RES unless other pixels are thinned out in addition to the first thinned pixels. In this process (TB3), when the pixel determination value JV is an integer (TB3: No), the process proceeds to the maximum pixel position calculation process (TB5), and when the pixel determination value JV is not an integer (TB3: Yes). Then, the process proceeds to the process of turning on the second thinning pixel setting flag (TB4). In the process of turning on the second thinned pixel setting flag (TB4), the CPU 40 sets the second thinned pixel setting flag for performing the process of setting the second thinned pixel to ON.

CPU40は、各平均差分値DFaveの最大値である最大順位画素を算出する(TB5)。CPU40は、一定ノイズ画素グループにおいて後述する第1間引き画素設定禁止画素でなく、且つ第1間引き画素が確定していない画素のうち平均差分値DFaveが最大値の画素を算出し、その最大値に関連付けられた最大順位画素を確定する。ここで、第1間引き画素設定禁止画素は、第1間引き画素の設定を禁止している画素であり、TB8において定めされる。   The CPU 40 calculates the maximum rank pixel that is the maximum value of each average difference value DFave (TB5). The CPU 40 calculates a pixel whose average difference value DFave is a maximum value among pixels that are not first-decimation pixel setting prohibition pixels, which will be described later in the fixed noise pixel group, and in which the first decimation pixel is not determined, and sets the maximum value Determine the associated maximum rank pixel. Here, the first decimation pixel setting prohibition pixel is a pixel that prohibits the setting of the first decimation pixel, and is determined in TB8.

CPU40は、最大順位画素を第1間引き画素に確定する(TB6)。CPU40は、一定ノイズ画素グループにおいて最大順位画素を第1間引き画素として確定する。   The CPU 40 determines the highest-order pixel as the first thinned pixel (TB6). The CPU 40 determines the highest rank pixel as the first thinned pixel in the constant noise pixel group.

CPU40は、最大順位画素を含む全ての間引きグループにおいて第1間引き画素の確定数と間引き数TONとが一致するか否かを判断する(TB7)。各間引きグループにおいて、間引き可能な画素数は間引き数TONまでである。よって、CPU40は、最新の第1間引き画素である最大順位画素を含む全ての間引きグループにおいて、第1間引き画素の確定数が間引き数TONと一致するか否かを判断し、一致する場合(TB7:Yes)は、一致した全ての間引きグループに含まれる画素に対して、第1間引き画素設定禁止画素とする処理(TB8)に進み、一致しない場合(TB7:No)は、第1間引き数TON1分確定したかを判断する処理(TB9)に進む。   The CPU 40 determines whether or not the determined number of first thinned pixels matches the thinned number TON in all thinned groups including the highest-order pixel (TB7). In each thinning group, the number of pixels that can be thinned is up to the thinning number TON. Therefore, the CPU 40 determines whether or not the determined number of the first thinned pixels matches the thinned number TON in all the thinned groups including the highest-order pixel that is the latest first thinned pixel. : Yes) proceeds to the process (TB8) for making the pixels included in all the matched thinning groups the first thinned pixel setting prohibition pixel, and if they do not match (TB7: No), the first thinned number TON1 The process proceeds to a process (TB9) for determining whether the minute has been confirmed.

CPU40は、第1間引き画素の確定数と間引き数TONとが一致した間引きグループに対して、第1間引き画素として確定していない全ての画素を第1間引き画素設定禁止画素とする(TB8)。   The CPU 40 sets all pixels not determined as the first thinned-out pixels as the first thinned-out pixel setting prohibited pixels for the thinned-out group in which the determined number of the first thinned-out pixels matches the thinned-out number TON (TB8).

CPU40は、一定ノイズ画素グループにおいて確定した第1間引き画素の数が第1間引き画素数TON1に一致したか否かを判断する(TB9)。CPU40は、一定ノイズ画素グループにおいて確定した第1間引き画素の画素数が第1間引き画素数TON1と一致する場合(TB9:Yes)は、第1間引き画素確定処理(TA6)を終了し、一致しない場合(TB9:No)は、第1間引き画素確定処理を継続するか否かを判断する処理(TB10)へ進む。   The CPU 40 determines whether or not the number of first thinned pixels determined in the constant noise pixel group matches the first thinned pixel number TON1 (TB9). When the number of first thinned pixels determined in the constant noise pixel group matches the first thinned pixel number TON1 (TB9: Yes), the CPU 40 ends the first thinned pixel determination process (TA6) and does not match. In the case (TB9: No), the process proceeds to the process (TB10) for determining whether or not to continue the first thinned pixel determination process.

CPU40は、第1間引き画素確定処理を継続するか否かを判断する(TB10)。具体的には、CPU40は、一定ノイズ画素グループにおいて第1間引き画素設定禁止画素でなく、且つ第1間引き画素として確定していない画素があるか否かを判断する。一定ノイズ画素グループにおいて第1間引き画素設定禁止画素でなく、且つ第1間引き画素として確定していない画素がある場合(TB10:Yes)は、再び最大順位画素確定処理(TB5)に進み、一定ノイズ画素グループにおいて第1間引き画素設定禁止画素または第1間引き画素として確定した画素しかない場合(TB10:No)は、第2間引き画素設定フラグをONにする処理(TB11)に進む。TB11の処理では、CPU40は、第2間引き画素を設定する処理を行うための第2間引き画素設定フラグをONに設定する。TB11の処理が終了すると、第1間引き画素確定処理(TA6)が終了する。   The CPU 40 determines whether or not to continue the first thinning pixel determination process (TB10). Specifically, the CPU 40 determines whether or not there is a pixel that is not the first thinned pixel setting prohibition pixel and is not determined as the first thinned pixel in the constant noise pixel group. If there is a pixel that is not the first decimation pixel setting prohibition pixel and is not determined as the first decimation pixel in the constant noise pixel group (TB10: Yes), the process proceeds to the maximum rank pixel determination process (TB5) again, and the fixed noise When there is only a pixel determined as the first thinned pixel setting prohibited pixel or the first thinned pixel in the pixel group (TB10: No), the process proceeds to a process of turning on the second thinned pixel setting flag (TB11). In the processing of TB11, the CPU 40 sets a second thinning pixel setting flag for performing processing for setting the second thinning pixel to ON. When the process of TB11 ends, the first thinned pixel determination process (TA6) ends.

(第2間引き画素確定処理TA7)
第2間引き画素確定処理(TA7)が開始されると、CPU40は、第2間引き画素設定フラグがONか否かを判断する(TC1)。第2間引き画素設定フラグがONということは、第1間引き画素確定処理(TA6)において、第1間引き画素を間引くだけでは、設定解像度RESへ変換することができない場合である。
(Second thinning pixel determination process TA7)
When the second thinned pixel determination process (TA7) is started, the CPU 40 determines whether or not the second thinned pixel setting flag is ON (TC1). The second decimation pixel setting flag is ON when the first decimation pixel determination process (TA6) cannot be converted into the set resolution RES only by decimation of the first decimation pixel.

CPU40は、次の間引きグループを選択する(TC2)。具体的は、CPU40は、現在間引きグループが選択されていない場合は、TA1の処理で取得した1ライン階調値DTの先頭画素から間引きグループの画素数分の画素を間引きグループとして選択し、間引きグループが選択されている場合は、現在選択されている間引きグループの次の画素から間引きグループの画素数分の画素を間引きグループとして選択する。   The CPU 40 selects the next thinning group (TC2). Specifically, when the thinning group is not currently selected, the CPU 40 selects, as a thinning group, pixels corresponding to the number of pixels of the thinning group from the first pixel of the 1-line gradation value DT acquired in the TA1 process. When the group is selected, pixels corresponding to the number of pixels in the thinning group are selected as the thinning group from the next pixel of the currently selected thinning group.

CPU40は、選択された間引きグループに対して、第1間引き画素が間引き数TON確定しているか否かを判断する(TC3)。第1間引き画素が間引き数TON確定している場合(TC3:Yes)は、選択されている間引きグループが最終間引きグループか否かを判断する処理(TC6)へ進み、第1間引き画素が間引き数TON確定していない場合(TC3:No)は、第2間引き数TON2を算出する処理(TC4)へ進む。   The CPU 40 determines whether or not the first thinning pixel is determined as the thinning number TON for the selected thinning group (TC3). When the first thinning pixel is determined as the thinning number TON (TC3: Yes), the process proceeds to processing (TC6) for determining whether the selected thinning group is the final thinning group, and the first thinning pixel is the thinning number. If the TON has not been determined (TC3: No), the process proceeds to the process (TC4) for calculating the second thinning-out number TON2.

CPU40は、第2間引き数TON2を算出する(TC4)。具体的には、CPU40は、選択されている間引きグループに設定されている第1間引き画素数を間引き数TONから減算することにより、第2間引き数TON2を算出する。   The CPU 40 calculates the second thinning number TON2 (TC4). Specifically, the CPU 40 calculates the second thinning number TON2 by subtracting the first thinning pixel number set in the selected thinning group from the thinning number TON.

CPU40は、第2間引き画素を確定する(TC5)。具体的には、CPU40は、選択されている間引きグループのうち、第1間引き画素として確定した画素を除いて、各平均差分値DFaveが最大値である順位画素を算出し、その順位画素を第2間引き画素として確定する。   The CPU 40 determines the second thinned pixel (TC5). Specifically, the CPU 40 calculates a rank pixel in which each average difference value DFave has a maximum value, except for a pixel determined as the first thinning pixel in the selected thinning group, and sets the rank pixel as the first pixel. Determined as 2 thinned pixels.

CPU40は、選択されている間引きグループが最終間引きグループか否かを判断する(TC6)。選択されている間引きグループが最終間引きグループでない場合(TC6:No)は、間引きグループを選択する処理(TC2)へ進み、選択されている間引きグループが最終間引きグループである場合(TC6:Yes)は、第2間引き画素確定処理(TA7)を終了する。   The CPU 40 determines whether or not the selected thinning group is the final thinning group (TC6). When the selected thinning group is not the final thinning group (TC6: No), the process proceeds to the process of selecting the thinning group (TC2). When the selected thinning group is the final thinning group (TC6: Yes) Then, the second thinning pixel determination process (TA7) is terminated.

(1ライン間引き画素設定処理TA8)
1ライン間引き画素設定処理(TA8)が開始されると、CPU40は、次の間引きグループを選択する(TD1)。具体的には、CPU40は、現在間引きグループが選択されていない場合は、TA1の処理で取得した1ライン階調値DTの先頭画素から間引きグループの画素数分の画素を間引きグループとして選択し、間引きグループが選択されている場合は、現在選択されている間引きグループの次の画素から間引きグループの画素数分の画素を間引きグループとして選択する。
(1 line thinning pixel setting processing TA8)
When the one-line thinning pixel setting process (TA8) is started, the CPU 40 selects the next thinning group (TD1). Specifically, when the thinning group is not currently selected, the CPU 40 selects, as a thinning group, pixels corresponding to the number of pixels of the thinning group from the first pixel of the 1-line gradation value DT acquired in the TA1 process. When the thinning group is selected, pixels corresponding to the number of pixels of the thinning group are selected as the thinning group from the next pixel of the currently selected thinning group.

CPU40は、現在選択されている間引きグループに第1間引き画素があるか否かを判断する(TD2)。第1間引き画素がない場合(TD2:No)は、第2間引き画素を間引き画素として設定する処理(TD5)へ進み、第1間引き画素がある場合(TD2:Yes)は、第1間引き画素を間引き画素として設定する処理(TD3)へ進む。   The CPU 40 determines whether or not there is a first thinning pixel in the currently selected thinning group (TD2). When there is no first thinned pixel (TD2: No), the process proceeds to the process of setting the second thinned pixel as a thinned pixel (TD5), and when there is a first thinned pixel (TD2: Yes), the first thinned pixel is selected. It progresses to the process (TD3) set as a thinning pixel.

CPU40は、第1間引き画素を間引き画素として確定し、設定する(TD3)。具体的には、CPU40は、第1間引き画素を間引き画素として確定し、画像処理部46に設定する。   The CPU 40 determines and sets the first thinned pixel as the thinned pixel (TD3). Specifically, the CPU 40 determines the first thinned pixel as a thinned pixel and sets it in the image processing unit 46.

CPU40は、現在選択されている間引きグループの画素に対して、間引き数TONの設定を画像処理部46に実行したか否かを判断する(TD4)。現在選択されている間引きグループの画素に対して間引き数TONの設定が実行された場合(TD4:Yes)は、現在選択されている間引きグループが最終間引きグループか否かを判断する処理(TD6)に進み、現在選択されている間引きグループの画素に対して間引き数TONの設定が実行されていない場合(TD4:No)は、第2間引き画素を間引き画素として設定する処理(TD5)へ進む。   The CPU 40 determines whether or not the image processing unit 46 has been set for the thinning number TON for the pixels of the currently selected thinning group (TD4). When the setting of the thinning number TON is executed for the pixels of the currently selected thinning group (TD4: Yes), a process for determining whether or not the currently selected thinning group is the final thinning group (TD6). If the setting of the thinning number TON is not executed for the pixels of the currently selected thinning group (TD4: No), the process proceeds to the process of setting the second thinning pixel as a thinning pixel (TD5).

CPU40は、第2間引き画素を間引き画素として確定し、設定する(TD5)。具体的には、CPU40は、第2間引き画素を間引き画素として確定し、画像処理部46に設定する。   The CPU 40 determines and sets the second thinned pixel as the thinned pixel (TD5). Specifically, the CPU 40 determines the second thinned pixel as a thinned pixel and sets it in the image processing unit 46.

CPU40は、選択されている間引きグループが最終間引きグループか否かを判断する(TD6)。選択されている間引きグループが最終間引きグループでない場合(TD6:No)は、間引きグループを選択する処理(TD1)へ進み、選択されている間引きグループが最終間引きグループである場合(TC6:Yes)は、第2間引き画素確定処理(TA7)を終了する。   The CPU 40 determines whether or not the selected thinning group is the final thinning group (TD6). When the selected thinning group is not the final thinning group (TD6: No), the process proceeds to the process of selecting the thinning group (TD1). When the selected thinning group is the final thinning group (TC6: Yes) Then, the second thinning pixel determination process (TA7) is terminated.

(具体的なケース)
(第1具体例)
続いて図11および図12を用いて、図6〜図10の処理によって実現される様々なケースについて説明する。第1具体例及び第2具体例の共通する部分について説明する。図11および図12は、先頭画素から6画素目までの読取部24から出力されるアナログ信号と、光電変換素子33が動作したときのDC/DC変換部49の読取部24へ供給される直流電圧3.3Vの電圧変動とを示した図である。先頭画素から5画素目は第1順位画素であり、先頭から6画素目は第2順位画素であるので、括弧内にて数字のみ表している。読取部24へ供給される直流電圧3.3Vに電圧変動が発生すると、読取部24から出力されるアナログ信号にその電圧変動が重畳する。図示される波形図は、縦軸に各信号の出力を示し、横軸に時間を示す。
(Specific case)
(First example)
Next, various cases realized by the processes of FIGS. 6 to 10 will be described with reference to FIGS. 11 and 12. A common part of the first specific example and the second specific example will be described. 11 and 12 show an analog signal output from the reading unit 24 from the first pixel to the sixth pixel and a direct current supplied to the reading unit 24 of the DC / DC conversion unit 49 when the photoelectric conversion element 33 operates. It is the figure which showed the voltage fluctuation of voltage 3.3V. Since the fifth pixel from the top pixel is the first rank pixel and the sixth pixel from the top is the second rank pixel, only the numbers are shown in parentheses. When voltage fluctuation occurs in the DC voltage 3.3 V supplied to the reading unit 24, the voltage fluctuation is superimposed on the analog signal output from the reading unit 24. In the waveform chart shown in the figure, the vertical axis indicates the output of each signal, and the horizontal axis indicates time.

図11を参照して、具体例1について説明する。具体例1では、DC/DC変換部49のスイッチング周期SWTが1μsであり、画素周期IPTが250nsである。本具体例では、保守メイン処理の一定ノイズ周期算出処理(M3)は、スイッチング周期SWTの1μsと画素周期IPTの250nsとの最小公倍数を算出し、一定ノイズ周期FNTの1μsを算出する。   Specific example 1 will be described with reference to FIG. In the specific example 1, the switching cycle SWT of the DC / DC converter 49 is 1 μs, and the pixel cycle IPT is 250 ns. In this specific example, the constant noise period calculation process (M3) of the maintenance main process calculates the least common multiple of 1 μs of the switching period SWT and 250 ns of the pixel period IPT, and calculates 1 μs of the constant noise period FNT.

次に、読取メイン処理内の間引き設定処理(MA4)は、画像処理部46に1ライン分の間引き画素の設定をする。具体的には、順を追って説明する。全平均階調値DTave算出処理(TA2)は、1ライン分の階調値DTの全ての値の平均値を算出し、破線にて図示する全平均階調値DTaveを算出する。   Next, a thinning setting process (MA4) in the reading main process sets thinning pixels for one line in the image processing unit 46. Specifically, it will be described in order. In the total average gradation value DTave calculation process (TA2), the average value of all the gradation values DT for one line is calculated, and the total average gradation value DTave illustrated by the broken line is calculated.

次に、各順位画素平均階調値DTgr算出処理(TA3)は、第1順位画素から第4順位画素までの順位画素平均階調値DTgrを算出する。各平均差分値DFave算出処理(TA4)は、第1順位画素から第4順位画素までの矢印にて図示する平均差分値DFaveを算出する。本具体例では、第1順位画素の平均差分値DFaveが最大となっており、第4順位画素の平均差分値DFaveが2番目に大きく、第2順位画素の平均差分値DFaveが3番目に大きい。   Next, each rank pixel average gradation value DTgr calculation process (TA3) calculates rank pixel average gradation values DTgr from the first rank pixel to the fourth rank pixel. Each average difference value DFave calculation process (TA4) calculates an average difference value DFave illustrated by arrows from the first rank pixel to the fourth rank pixel. In this specific example, the average difference value DFave of the first rank pixel is the largest, the average difference value DFave of the fourth rank pixel is the second largest, and the average difference value DFave of the second rank pixel is the third largest. .

本具体例1は、読取部24が出力する出力解像度REDが300DPIであり、ユーザにより設定された設定解像度RESが200DPIである。この場合、間引き設定処理(MA4)におけるTA5の処理は、出力解像度REDの300DPIと設定解像度RESの200DPIとの整数比3:2を算出し、出力解像度REDに対応する整数である3を間引き間隔TOI(言い換えると、間引きグループ数の画素数)として算出する。さらに、本処理は、間引き間隔TOIである3から設定解像度RESに対応している整数である2を引算した値である1を間引き数TONとして算出する。さらに、本処理は、間引き数TONである1から間引き間隔TOIである3を割算した値である0.33を間引き率TORとして算出する。   In the first specific example, the output resolution RED output by the reading unit 24 is 300 DPI, and the setting resolution RES set by the user is 200 DPI. In this case, the TA5 process in the thinning setting process (MA4) calculates an integer ratio 3: 2 of 300 DPI of the output resolution RED and 200 DPI of the setting resolution RES, and sets 3 which is an integer corresponding to the output resolution RED as a thinning interval. It is calculated as TOI (in other words, the number of pixels of the number of thinning groups). Further, this process calculates 1 as the thinning-out number TON by subtracting 2 as an integer corresponding to the set resolution RES from 3 as the thinning-out interval TOI. Further, in this process, 0.33, which is a value obtained by dividing 1 as the thinning number TON from 3 as the thinning interval TOI, is calculated as the thinning rate TOR.

画素判定値JV算出処理(TB1)は、一定ノイズ画素数FNCの4と間引き率TORの0.33を掛算し、画素判定値JVとして1.32を算出する。第1間引き画素数TON1算出処理(TB2)は、画素判定値JVの整数部1を第1間引き画素数TON1として算出する。TB3の処理は、画素判定値JVが整数でない(TB3:Yes)ので、第2間引き画素を設定する必要があると判断し、第2間引き画素設定フラグをONにする(TB4)。   The pixel determination value JV calculation process (TB1) multiplies the fixed noise pixel number FNC by 4 and the thinning rate TOR 0.33 to calculate 1.32 as the pixel determination value JV. In the first thinned pixel number TON1 calculation process (TB2), the integer part 1 of the pixel determination value JV is calculated as the first thinned pixel number TON1. In the process of TB3, since the pixel determination value JV is not an integer (TB3: Yes), it is determined that the second thinned pixel needs to be set, and the second thinned pixel setting flag is turned ON (TB4).

次に、最大順位画素確定処理(TB5)は、第1順位画素を最大順位画素として確定する。第1間引き画素確定処理(TB6)は、最大順位画素である第1順位画素を第1間引き画素として確定する。   Next, in the maximum rank pixel determination process (TB5), the first rank pixel is determined as the maximum rank pixel. In the first thinned pixel determination process (TB6), the first rank pixel that is the highest rank pixel is confirmed as the first thinned pixel.

次に、TB7の処理は、最大順位画素である第1順位画素を含む全ての間引きグループである第1順位画素、第2順位画素、および第3順位画素のグループ、第3順位画素、第4順位画素、および第1順位画素のグループ、並びに第4順位画素、第1順位画素、および第2順位画素のグループにおいて、第1間引き画素設定数が1であり、間引き数TONも1であるので、TB7の処理においてYesと判断し、TB8の処理へ進む。TB8の処理は、これらのグループに含まれる画素を第1間引き画素設定禁止画素とする。即ち、第2順位画素、第3順位画素、および第4順位画素が第1間引き画素設定禁止画素とされる。   Next, the processing of TB7 includes a first rank pixel, a second rank pixel, a group of third rank pixels, a third rank pixel, and a fourth rank pixel that are all thinning groups including the first rank pixel that is the maximum rank pixel. In the rank pixel, first rank pixel group, and fourth rank pixel, first rank pixel, and second rank pixel group, the first decimation pixel setting number is 1, and the decimation number TON is also 1. , TB7 is determined as Yes, and the process proceeds to TB8. In the process of TB8, the pixels included in these groups are set as the first thinned pixel setting prohibited pixels. That is, the second rank pixel, the third rank pixel, and the fourth rank pixel are set as the first thinned pixel setting prohibition pixels.

次に、第2間引き画素設定フラグがONである(TC1:Yes)ので、第2間引き画素が確定される。間引きグループ選択処理(TC2)が、第1間引き画素である第1順位画素を含む間引きグループを選択した場合は、TC3の処理は、間引き画素数TONである1画素分確定されているので、第2間引き画素を確定するTC5の処理に進まず、間引きグループ選択処理(TC2)へ戻るか第2間引き画素確定処理(TA7)が終了する。   Next, since the second thinning pixel setting flag is ON (TC1: Yes), the second thinning pixel is determined. When the thinning group selection process (TC2) selects a thinning group including the first rank pixel that is the first thinning pixel, the processing of TC3 is determined for one pixel that is the thinning pixel number TON. The process does not proceed to TC5 for determining two thinned pixels, and the process returns to the thinning group selection process (TC2) or the second thinned pixel determination process (TA7) ends.

間引きグループ選択処理(TC2)が、第1間引き画素である第1順位画素を含まないグループである第2順位画素、第3順位画素、および第4順位画素のグループを選択した場合は、第1間引き画素が間引き数TONの1画素分確定されていない(TC3:No)ので、第2間引き画素確定処理(TC5)に進み、TC5の処理はグループ内で最も平均差分値DFaveが大きい第4順位画素を第2間引き画素として確定する。   When the thinning group selection process (TC2) selects a group of second-ranked pixels, third-ranked pixels, and fourth-ranked pixels that are groups that do not include the first-ranked pixels that are first-thinned pixels, Since one pixel of the thinning-out number TON has not been determined (TC3: No), the process proceeds to the second thinning-out pixel determination process (TC5), and the process of TC5 is the fourth rank having the largest average difference value DFave in the group. The pixel is determined as the second thinned pixel.

1ライン間引き画素設定処理(TA8)は、第1間引き画素である第1順位画素と第2間引き画素である第2順位画素とにより、間引き画素を確定し、画像処理部46に確定した間引き画素を設定する。具体的には、間引きグループ選択処理(TD1)は、先頭画素から3画素目を間引きグループとして設定する。この場合、第1間引き画素である第1順位画素が含まれるため(TD2:Yes)、第1順位画素が間引き画素として確定し、先頭画素が間引き画素として画像処理部46に設定される(TD3)。TD4の処理は、間引き数TONである1画素分設定した(TD4:Yes)のでYesと判断し、最終間引きグループか否かを判断する処理(TD6)に進む。次に、現在選択されている先頭画素から3画素目の間引きグループは最終間引きグループでない(TD6:No)ので、間引きグループ選択処理(TD1)へ進む。   In the one-line thinning pixel setting process (TA8), thinning pixels are determined by the first rank pixels that are the first thinning pixels and the second rank pixels that are the second thinning pixels, and are determined by the image processing unit 46. Set. Specifically, in the thinning group selection process (TD1), the third pixel from the top pixel is set as a thinning group. In this case, since the first rank pixel that is the first decimation pixel is included (TD2: Yes), the first rank pixel is determined as the decimation pixel, and the first pixel is set as the decimation pixel in the image processing unit 46 (TD3 ). The process of TD4 is set to one pixel which is the thinning-out number TON (TD4: Yes), so it is determined as Yes, and the process proceeds to the process of determining whether it is the final thinning-out group (TD6). Next, since the third pixel thinning group from the currently selected first pixel is not the final thinning group (TD6: No), the flow proceeds to the thinning group selection processing (TD1).

次に、間引きグループ選択処理(TD1)は、次の間引きグループである4画素目から6画素目を間引きグループとして設定する。この場合、先ほどと同様に、第1間引き画素である第1順位画素が含まれるため(TD2:Yes)、第1順位画素が間引き画素として確定し、5画素目が間引き画素として画像処理部46に設定される(TD3)。同様の処理が最終間引きグループまで繰り返し実行され、1ライン分の間引き画素が確定し、確定した画素が画像処理部46に設定される。   Next, in the thinning group selection process (TD1), the fourth to sixth pixels, which are the next thinning group, are set as the thinning group. In this case, since the first rank pixel that is the first thinned pixel is included (TD2: Yes), the first rank pixel is determined as the thinned pixel, and the fifth pixel is the thinned pixel as in the previous case. (TD3). Similar processing is repeatedly executed up to the final thinning group, thinning pixels for one line are determined, and the determined pixels are set in the image processing unit 46.

(第2具体例)
図12を参照して、具体例2について説明する。具体例2では、DC/DC変換部49のスイッチング周期SWTが333nsであり、画素周期IPTが250nsの場合である。本具体例では、保守メイン処理の一定ノイズ周期算出処理(M3)は、スイッチング周期SWTの333nsと画素周期IPTの250nsの最小公倍数を算出し、一定ノイズ周期FNTの1μsおよび一定ノイズ画素数FNCの4を算出する。
(Second specific example)
A specific example 2 will be described with reference to FIG. In the second specific example, the DC / DC converter 49 has a switching cycle SWT of 333 ns and a pixel cycle IPT of 250 ns. In this specific example, the constant noise period calculation process (M3) of the maintenance main process calculates the least common multiple of 333 ns of the switching period SWT and 250 ns of the pixel period IPT, and calculates 1 μs of the constant noise period FNT and the constant noise pixel number FNC. 4 is calculated.

次に、読取メイン処理内の間引き設定処理(MA4)は、画像処理部46に1ライン分の間引き画素の設定をする。具体的には、順を追って説明する。全平均階調値DTave算出処理(TA2)は、1ライン分の階調値DTの全ての値の平均値を算出し、破線にて図示する全平均階調値DTaveを算出する。   Next, a thinning setting process (MA4) in the reading main process sets thinning pixels for one line in the image processing unit 46. Specifically, it will be described in order. In the total average gradation value DTave calculation process (TA2), the average value of all the gradation values DT for one line is calculated, and the total average gradation value DTave illustrated by the broken line is calculated.

次に、各順位画素平均階調値DTgr算出処理(TA3)は、第1順位画素から第4順位画素までの順位画素平均階調値DTgrを算出する。各平均差分値DFave算出処理(TA4)は、第1順位画素から第4順位画素までの矢印にて図示する平均差分値DFaveを算出する。本具体例では、第2順位画素の平均差分値DFaveが最大となっており、第3順位画素の平均差分値DFaveが2番目に大きく、第1順位画素の平均差分値DFaveが3番目に大きい。   Next, each rank pixel average gradation value DTgr calculation process (TA3) calculates rank pixel average gradation values DTgr from the first rank pixel to the fourth rank pixel. Each average difference value DFave calculation process (TA4) calculates an average difference value DFave illustrated by arrows from the first rank pixel to the fourth rank pixel. In this specific example, the average difference value DFave of the second rank pixel is the largest, the average difference value DFave of the third rank pixel is the second largest, and the average difference value DFave of the first rank pixel is the third largest. .

本具体例2は、読取部24が出力する出力解像度REDが1200DPIであり、ユーザにより設定された設定解像度RESが600DPIである。この場合、間引き設定処理(MA4)におけるTA5の処理は、出力解像度REDの1200DPIと設定解像度RESの600DPIとの整数比2:1を算出し、出力解像度REDに対応する整数である2を間引き間隔TOI(言い換えると、間引きグループ数の画素数)として算出する。さらに、本処理は、間引き間隔TOIである2から設定解像度RESに対応している整数である1を引算した値である1を間引き数TONとして算出する。さらに、本処理は、間引き数TONである1を間引き間隔TOIである2で割算した値である0.5を間引き率TORとして算出する。   In this specific example 2, the output resolution RED output by the reading unit 24 is 1200 DPI, and the setting resolution RES set by the user is 600 DPI. In this case, the TA5 process in the thinning setting process (MA4) calculates an integer ratio 2: 1 between 1200 DPI of the output resolution RED and 600 DPI of the setting resolution RES, and subtracts 2 which is an integer corresponding to the output resolution RED. It is calculated as TOI (in other words, the number of pixels of the number of thinning groups). Further, this process calculates 1 as a thinning number TON by subtracting 1 as an integer corresponding to the set resolution RES from 2 as the thinning interval TOI. Further, in the present process, 0.5, which is a value obtained by dividing 1 as the thinning number TON by 2 as the thinning interval TOI, is calculated as the thinning rate TOR.

画素判定値JV算出処理(TB1)は、一定ノイズ画素数FNCの4と間引き率TORの0.5を掛算し、画素判定値JVとして2を算出する。第1間引き画素数TON1算出処理(TB2)は、画素判定値JVの整数部2を第1間引き画素数TON1として算出する。TB3の処理は、画素判定値JVが整数である(TB3:No)ので、第2間引き画素を設定する必要がないと判断し、第2間引き画素設定フラグをONにする処理(TB4)に進まず、最大順位画素確定処理(TB5)へ進む。   The pixel determination value JV calculation process (TB1) multiplies the fixed noise pixel number FNC by 4 and the thinning rate TOR by 0.5 to calculate 2 as the pixel determination value JV. In the first thinned pixel number TON1 calculation process (TB2), the integer part 2 of the pixel determination value JV is calculated as the first thinned pixel number TON1. In the process of TB3, since the pixel determination value JV is an integer (TB3: No), it is determined that it is not necessary to set the second thinned pixel, and the process proceeds to the process of turning on the second thinned pixel setting flag (TB4). First, the process proceeds to the maximum rank pixel determination process (TB5).

次に、最大順位画素確定処理(TB5)は、第2順位画素を最大順位画素として確定する。次に、第1間引き画素確定処理(TB6)は、最大順位画素である第2順位画素を第1間引き画素として確定する。   Next, in the maximum rank pixel determination process (TB5), the second rank pixel is determined as the maximum rank pixel. Next, in the first thinned pixel determination process (TB6), the second rank pixel that is the highest rank pixel is confirmed as the first thinned pixel.

次に、TB7の処理は、最大順位画素である第2順位画素を含む全ての間引きグループである第1順位画素および第2順位画素のグループ、並びに第2順位画素および第3順位画素のグループにおいて、第1間引き画素設定数が1であり、間引き数TONも1であるので、TB7の処理においてYesと判断し、TB8の処理へ進む。TB8の処理は、これらのグループに含まれる画素を第1間引き画素設定禁止画素とする。即ち、第1順位画素および第3順位画素が第1間引き画素設定禁止画素とされる。   Next, the processing of TB7 is performed in the first rank pixel group and the second rank pixel group which are all thinning groups including the second rank pixel which is the maximum rank pixel, and in the second rank pixel group and the third rank pixel group. Since the first decimation pixel setting number is 1 and the decimation number TON is 1, it is determined Yes in the TB7 process, and the process proceeds to the TB8 process. In the process of TB8, the pixels included in these groups are set as the first thinned pixel setting prohibited pixels. That is, the first rank pixel and the third rank pixel are the first thinned pixel setting prohibition pixels.

次に、TB9の処理は、確定した第1間引き画素の数が1であり、第1間引き画素数TON1が2である(TB9:No)ので、TB10の処理に進み、TB10の処理は、第1間引き画素設定禁止画素でなく、且つ第1間引き画素として確定していない画素は第4順位画素である(TB10:Yes)ため、再度、最大順位画素確定処理(TB5)へ進む。   Next, in the process of TB9, since the determined number of first thinned pixels is 1 and the first number of thinned pixels TON1 is 2 (TB9: No), the process proceeds to TB10. Since the pixel that is not the one-thinned pixel setting prohibition pixel and is not determined as the first thinned-out pixel is the fourth rank pixel (TB10: Yes), the process proceeds to the maximum rank pixel determination process (TB5) again.

次に、最大順位画素確定処理(TB5)は、第1間引き画素設定禁止画素でなく、且つ第1間引き画素として確定していない画素のうち平均差分値DFaveが最大である第4順位画素を算出し、第4順位画素を第1間引き画素として確定する。   Next, the maximum rank pixel determination process (TB5) calculates a fourth rank pixel that is not the first decimation pixel setting prohibition pixel and has the maximum average difference value DFave among the pixels that are not definite as the first decimation pixel. Then, the fourth rank pixel is determined as the first thinned pixel.

本具体例2では、第2間引き画素設定フラグがONでない(TC1:No)ため、第2間引き画素の設定はされない。   In the second specific example, since the second thinning pixel setting flag is not ON (TC1: No), the second thinning pixel is not set.

1ライン間引き画素設定処理(TA8)は、第1間引き画素である第2順位画素および第4順位画素により、間引き画素を確定し、画像処理部46に確定した間引き画素を設定する。具体的には、間引きグループ選択処理(TD1)は、先頭画素から2画素目を間引きグループとして設定する。この場合、第1間引き画素である第2順位画素が含まれるため(TD2:Yes)、第2順位画素が間引き画素として確定し、2画素目が間引き画素として画像処理部46に設定される(TD3)。TD4の処理は、間引き数TONである1画素分設定した(TD4:Yes)のでYesと判断し、最終間引きグループか否かを判断する処理(TD6)に進む。次に、現在選択されている先頭画素から2画素目の間引きグループは最終間引きグループでない(TD6:No)ので、間引きグループ選択処理(TD1)へ進む。   In the one-line thinning pixel setting process (TA8), thinning pixels are determined by the second and fourth rank pixels, which are the first thinning pixels, and the determined thinning pixels are set in the image processing unit 46. Specifically, in the thinning group selection process (TD1), the second pixel from the top pixel is set as a thinning group. In this case, since the second rank pixel that is the first thinned pixel is included (TD2: Yes), the second rank pixel is determined as the thinned pixel, and the second pixel is set as the thinned pixel in the image processing unit 46 ( TD3). The process of TD4 is set to one pixel which is the thinning-out number TON (TD4: Yes), so it is determined as Yes, and the process proceeds to the process of determining whether it is the final thinning-out group (TD6). Next, since the thinning group for the second pixel from the currently selected first pixel is not the final thinning group (TD6: No), the process proceeds to the thinning group selection process (TD1).

次に、間引きグループ選択処理(TD1)は、次の間引きグループである3画素目から4画素目を間引きグループとして設定する。この場合、先ほどと同様に、第1間引き画素である第4順位画素が含まれるため(TD2:Yes)、第4順位画素が間引き画素として確定し、4画素目が間引き画素として画像処理部46に設定される(TD3)。同様の処理が最終間引きグループまで繰り返し実行され、1ライン分の間引き画素が確定し、確定した画素が画像処理部46に設定される。   Next, in the thinning group selection process (TD1), the third to fourth pixels, which are the next thinning group, are set as the thinning group. In this case, since the fourth rank pixel that is the first decimation pixel is included (TD2: Yes), the fourth rank pixel is determined as the decimation pixel, and the fourth pixel is the decimation pixel. (TD3). Similar processing is repeatedly executed up to the final thinning group, thinning pixels for one line are determined, and the determined pixels are set in the image processing unit 46.

<実施形態の効果>
本実施形態では、間引き設定処理(MA4)の各順位画素平均階調値DTgr算出処理(TA3)において、均一な濃度の灰基準板を読み取ったときの階調値DTに対して一定ノイズ画素グループの順位画素毎に階調値を平均して各順位画素平均階調値DTgrを算出している。よって、各順位画素平均階調値DTgrはノイズ成分の階調値への影響を順位画素毎に表している。また、1ラインの階調値の平均した全平均階調値DTaveと各順位画素平均階調値DTgrとの差分値を各平均差分値DFaveとして算出しているため、ノイズ成分の階調値への影響の大きな画素を特定することを可能としている。第1間引き画素確定処理(TA6)および第2間引き画素確定処理(TA7)は、一定ノイズ画素グループに対して、第1間引き画素および第2間引き画素を確定しているため、ノイズ成分の階調値への影響の大きな画素のみを特定することを可能としている。1ライン間引き画素設定処理(TA8)は、間引きグループ毎に第1間引き画素を優先して間引き画素を確定し、1ラインの間引き画素を設定している。よって、解像度変換の精度を向上する効果と、ノイズ成分の階調値への影響の大きな画素を除去するという効果とを奏し、スイッチング電源の様な電圧変動の大きな電源でも読取デバイスの電源として使用できる。
<Effect of embodiment>
In the present embodiment, in each rank pixel average gradation value DTgr calculation process (TA3) of the thinning setting process (MA4), a fixed noise pixel group with respect to the gradation value DT when the gray reference plate having a uniform density is read. Each rank pixel average gradation value DTgr is calculated by averaging the gradation values for each rank pixel. Therefore, each rank pixel average gradation value DTgr represents the influence of the noise component on the gradation value for each rank pixel. Further, since the difference value between the total average gradation value DTave obtained by averaging the gradation values of one line and each rank pixel average gradation value DTgr is calculated as each average difference value DFave, the gradation value of the noise component is changed. This makes it possible to identify pixels that have a large influence. Since the first decimation pixel determination process (TA6) and the second decimation pixel determination process (TA7) determine the first decimation pixel and the second decimation pixel for a certain noise pixel group, the gradation of the noise component It is possible to specify only pixels that have a large influence on the value. In the one-line thinning pixel setting process (TA8), the thinning pixels are determined with priority given to the first thinning pixels for each thinning group, and the thinning pixels are set for one line. Therefore, it has the effect of improving resolution conversion accuracy and the effect of removing pixels that have a large influence on the tone value of noise components, and can be used as a power source for reading devices even with power sources with large voltage fluctuations such as switching power sources. it can.

[実施形態と発明との対応関係]
画像読取装置1、読取部24、および灰色基準板34が、本発明の画像読取装置、読取部、および基準板の一例である。DC/DC変換部49が本発明の電源供給部の一例であり、画像処理部46が、本発明の変換部、補正部、および解像度変換部の一例である。CPU40が、本発明の制御部の一例である。全平均階調値DTave算出処理(TA2)が、本発明の平均階調値算出処理の一例である。各順位画素平均階調値DTgr算出処理(TA3)が、本発明のグループ平均階調値算出処理の一例である。第1間引き画素確定処理(TA6)および第2間引き画素確定処理(TA7)が、本発明の間引き候補画素確定処理の一例である。1ライン間引き画素設定処理(TA8)が、本発明のライン間引き画素設定処理の一例である。
[Correspondence between embodiment and invention]
The image reading device 1, the reading unit 24, and the gray reference plate 34 are examples of the image reading device, the reading unit, and the reference plate of the present invention. The DC / DC conversion unit 49 is an example of the power supply unit of the present invention, and the image processing unit 46 is an example of the conversion unit, the correction unit, and the resolution conversion unit of the present invention. The CPU 40 is an example of the control unit of the present invention. The total average gradation value DTave calculation process (TA2) is an example of the average gradation value calculation process of the present invention. Each rank pixel average gradation value DTgr calculation process (TA3) is an example of the group average gradation value calculation process of the present invention. The first thinning pixel determination process (TA6) and the second thinning pixel determination process (TA7) are examples of the thinning candidate pixel determination process of the present invention. One line thinning pixel setting process (TA8) is an example of the line thinning pixel setting process of the present invention.

[変形例]
本発明は、本実施形態に限定されることなく、その趣旨を逸脱しない範囲において種々の変形が可能である。以下にその変形の一例を述べる。
[Modification]
The present invention is not limited to this embodiment, and various modifications can be made without departing from the spirit of the present invention. An example of the modification will be described below.

(1)本実施形態の画像読取装置1は、プリンタ部を備えた複合機に適用されてもよい。読取部24の電源として、直流電圧3.3Vの電源について説明したが、他の直流電圧であっても良いし、他の回路と共通の電源であってもよい。 (1) The image reading apparatus 1 according to the present embodiment may be applied to a multi-function peripheral including a printer unit. Although the power supply of the DC voltage 3.3V has been described as the power supply of the reading unit 24, another DC voltage may be used, or a power supply common to other circuits may be used.

(2)本実施形態では、一定ノイズ周期算出処理(M3)において、一定ノイズ周期FNTおよび一定ノイズ画素数FNCを算出し、ライン周期設定処理(M4)において、一定ノイズ周期FNTの整数倍となるようにライン周期を設定しているが、DC/DC変換部49のスイッチング周期SWTと画素周期IPTを製品設計段階において固定値として決めておき、一定ノイズ画素数FNCおよびライン周期を装置本体に予め記憶しておいても良い。 (2) In this embodiment, the constant noise period FNT and the constant noise pixel number FNC are calculated in the constant noise period calculation process (M3), and become an integral multiple of the constant noise period FNT in the line period setting process (M4). The line cycle is set as described above, but the switching cycle SWT and the pixel cycle IPT of the DC / DC converter 49 are determined as fixed values in the product design stage, and the fixed noise pixel number FNC and the line cycle are set in advance in the apparatus body. You may remember it.

(3)本実施形態では、間引き設定処理(MA4)をCPUが実行するソフトウェアによる実現したが、この間引き設定処理をハードウェアの機能により実現しても良い。 (3) Although the thinning setting process (MA4) is realized by software executed by the CPU in this embodiment, this thinning setting process may be realized by a hardware function.

(4)本実施形態では、灰色基準板34を用いて説明を行ったが、灰色でない色、例えば、白基準板、又は黒基準板を用いてもリップル電圧の影響は同様に発生するので、同様の効果を奏する。 (4) In the present embodiment, the description has been given using the gray reference plate 34. However, even if a non-gray color, for example, a white reference plate or a black reference plate is used, the influence of the ripple voltage similarly occurs. The same effect is produced.

(5)本実施形態では、1ライン間引き画素設定処理(TA8)において、間引き画素を確定する処理と設定する処理とを同じ処理において実現しているが、確定する処理と設定する処理とを2つの処理で実現しても良い。 (5) In the present embodiment, in the one-line thinning pixel setting process (TA8), the thinning pixel determination process and the setting process are realized in the same process. It may be realized by one process.

1…画像読取装置、5…操作部、24…読取部、30…光源、31…受光部、33…光電変換素子、40…CPU、43…フラッシュPROM、45…AFE、46…画像処理部
DESCRIPTION OF SYMBOLS 1 ... Image reading apparatus, 5 ... Operation part, 24 ... Reading part, 30 ... Light source, 31 ... Light receiving part, 33 ... Photoelectric conversion element, 40 ... CPU, 43 ... Flash PROM, 45 ... AFE, 46 ... Image processing part

Claims (8)

原稿を所定の読取ライン周期でライン毎に読み取り主走査方向の各画素のアナログ画像データを生成する読取部と、
前記読取部に対向する位置に配置される基準板と、
第1直流電圧をスイッチング周波数でスイッチング制御することにより前記読取部へ供給する第2直流電圧に変換する電源供給部と、
前記アナログ画像データをサンプリング周期でサンプリングしてデジタル画像データに変換する変換部と、
前記デジタル画像データを階調値にシェーディング補正する補正部と、
設定値に従い前記主走査方向の画素を間引くことにより前記デジタル画像データの解像度を、第1解像度から第2解像度へ変換する解像度変換部と、
制御部と、を備え、
前記制御部は、
前記基準板を読み取り前記補正部により補正された1ラインの全画素の階調値を平均することにより全平均階調値を算出する平均階調値算出処理と、
前記スイッチング周波数に対応する周期と前記変換部のサンプリング周期との公倍数となる一定ノイズ周期に対応する一定ノイズ画素数毎の複数の階調値グループに前記1ラインの全画素の前記階調値を分割し、各前記階調値グループのうちの同一順位の全ての画素の階調値を平均することによりグループ平均階調値を算出するグループ平均階調値算出処理と、
前記全平均階調値と前記グループ平均階調値との差分が大きい画素から順に前記階調値グループにおいて間引き候補画素を確定する間引き候補画素確定処理と、
前記1ラインの全画素について、前記間引き候補画素に基いてライン間引き画素を確定し、前記ライン間引き画素を前記設定値に設定するライン間引き画素設定処理と、を実行し、
前記読取ライン周期は、前記一定ノイズ周期の整数倍に定められることを特徴とする画像読取装置。
A reading unit that reads an original for each line at a predetermined reading line cycle and generates analog image data of each pixel in the main scanning direction;
A reference plate disposed at a position facing the reading unit;
A power supply unit that converts the first DC voltage to the second DC voltage supplied to the reading unit by switching control at a switching frequency;
A converter that samples the analog image data at a sampling period and converts the analog image data into digital image data;
A correction unit for correcting the shading of the digital image data into gradation values;
A resolution conversion unit that converts the resolution of the digital image data from the first resolution to the second resolution by thinning out pixels in the main scanning direction according to a set value;
A control unit,
The controller is
An average gradation value calculation process for calculating the total average gradation value by reading the reference plate and averaging the gradation values of all pixels in one line corrected by the correction unit;
The gradation values of all pixels of the one line are assigned to a plurality of gradation value groups for each number of fixed noise pixels corresponding to a fixed noise period that is a common multiple of a period corresponding to the switching frequency and a sampling period of the conversion unit. A group average gradation value calculation process for calculating a group average gradation value by dividing and averaging the gradation values of all the pixels of the same rank in each gradation value group;
A thinning candidate pixel determination process for determining thinning candidate pixels in the gradation value group in order from a pixel having a large difference between the total average gradation value and the group average gradation value;
A line thinning pixel setting process for determining a line thinning pixel based on the thinning candidate pixels and setting the line thinning pixel to the set value for all pixels of the one line;
The image reading apparatus, wherein the reading line cycle is determined to be an integral multiple of the constant noise cycle.
前記制御部は、
前記第1解像度に対応する整数と前記第2解像度に対応する整数との比のうち前記第1解像度に対応する整数を間引きグループの画素数として算出し、前記間引きグループの前記画素数から前記第2解像度に対応する整数を引算した値を前記間引きグループから間引かれる間引き画素数として算出する間引き算出処理を実行し、
前記間引きグループは、前記1ラインの全画素の先頭から後尾まで、順次連続した画素をグルーピングし、そのグループ毎に前記ライン間引き画素を確定させるためのグループであり、
前記間引き候補画素は、前記階調値グループにおいて第1間引き画素と第2間引き画素とから構成され、前記第1間引き画素は前記第1解像度と前記第2解像度とに関連する画素であり、前記第2間引き画素は前記第1解像度と前記第2解像度とに関連しない画素であり、
前記ライン間引き画素設定処理は、各前記間引きグループにおける前記ライン間引き画素を確定する処理において前記第1間引き画素を前記第2間引き画素よりも優先して前記間引き画素数の前記ライン間引き画素を確定することを特徴とする請求項1に記載の画像読取装置。
The controller is
Of the ratio of the integer corresponding to the first resolution and the integer corresponding to the second resolution, an integer corresponding to the first resolution is calculated as the number of pixels of the thinning group, and the number of pixels of the thinning group is calculated based on the number of pixels. Performing a thinning calculation process for calculating a value obtained by subtracting an integer corresponding to two resolutions as the number of thinned pixels to be thinned from the thinning group;
The thinning group is a group for sequentially grouping consecutive pixels from the beginning to the tail of all the pixels of the one line, and determining the line thinning pixels for each group,
The thinning candidate pixel is composed of a first thinning pixel and a second thinning pixel in the gradation value group, and the first thinning pixel is a pixel related to the first resolution and the second resolution, The second thinned pixel is a pixel not related to the first resolution and the second resolution,
In the line thinning pixel setting process, in the process of determining the line thinning pixel in each thinning group, the first thinning pixel is given priority over the second thinning pixel, and the number of thinning pixels is determined. The image reading apparatus according to claim 1.
前記制御部は、
前記第1解像度で前記第2解像度を割算することにより間引き率を算出する間引き率算出処理と、
前記一定ノイズ画素数と前記間引き率とを掛算することにより画素判定値を算出する画素判定値算出処理と、
前記画素判定値の整数部の整数を第1間引き画素数とする第1間引き画素確定処理と、を実行することを特徴とする請求項1に記載の画像読取装置。
The controller is
A decimation rate calculation process for calculating a decimation rate by dividing the second resolution by the first resolution;
A pixel determination value calculation process for calculating a pixel determination value by multiplying the constant noise pixel number and the thinning rate;
The image reading apparatus according to claim 1, wherein a first thinned pixel determination process is performed in which an integer in the integer part of the pixel determination value is a first thinned pixel number.
前記第1間引き画素確定処理は、前記全平均階調値と前記グループ平均階調値との差分が大きい画素から第1間引き画素として前記第1間引き画素数を設定することを特徴とする請求項3に記載の画像読取装置。 The first thinned-out pixel determination process sets the first thinned-out pixel number as a first thinned-out pixel from a pixel having a large difference between the total average gradation value and the group average gradation value. The image reading apparatus according to 3. 前記制御部は、
前記間引きグループにおいて、前記間引き画素数の前記第1間引き画素が確定された場合は、前記第1間引き画素として確定されていない画素に対して前記第1間引き画素の確定を禁止する確定禁止画素として設定する禁止画素設定処理を実行することを特徴とする請求項2乃至請求項4のいずれかに記載の画像読取装置。
The controller is
In the thinning-out group, when the first thinned-out pixel of the number of thinned-out pixels is fixed, as a determination prohibition pixel that prohibits the determination of the first thinned-out pixel with respect to a pixel that is not fixed as the first thinned-out pixel 5. The image reading apparatus according to claim 2, wherein a prohibited pixel setting process to be set is executed.
前記制御部は
前記画素判定値が整数でない場合、若しくは前記第1間引き画素が前記第1間引き画素数確定されなかった場合は、前記第2間引き画素の確定を行う第2間引き画素設定フラグをオンに設定する第2間引き画素確定処理を実行することを特徴とする請求項3または請求項4に記載の画像読取装置。
When the pixel determination value is not an integer, or when the first thinned pixel number is not determined for the first thinned pixel number, the control unit turns on a second thinned pixel setting flag for determining the second thinned pixel. 5. The image reading apparatus according to claim 3, wherein a second thinning pixel determination process is set to “5”.
前記第2間引き画素確定処理は、前記第2間引き画素設定フラグがオンの場合に、各前記間引きグループにおいて、前記第1間引き画素と前記第2間引き画素との合計の画素数が前記間引き画素数となるように前記第2間引き画素を確定することを特徴とする請求項6に記載の画像読取装置。 In the second decimation pixel determination process, when the second decimation pixel setting flag is on, the total number of pixels of the first decimation pixel and the second decimation pixel is the number of decimation pixels in each decimation group. The image reading apparatus according to claim 6, wherein the second thinned pixels are determined so that 原稿を所定の読取ライン周期でライン毎に読み取り主走査方向の各画素のアナログ画像データを生成する読取部と、
前記読取部に対向する位置に配置される基準板と、
第1直流電圧をスイッチング周波数でスイッチング制御することにより前記読取部へ供給する第2直流電圧に変換する電源供給部と、
前記アナログ画像データをサンプリング周期でサンプリングしてデジタル画像データに変換する変換部と、
前記デジタル画像データを階調値にシェーディング補正する補正部と、
前記主走査方向の画素を間引くことにより前記デジタル画像データの解像度を、第1解像度から第2解像度へ変換する解像度変換部と、
前記基準板を読み取り前記補正部により補正された1ラインの全画素の階調値を平均することにより全平均階調値を算出する平均階調値算部と、
前記スイッチング周波数に対応する周期と前記変換部のサンプリング周期との公倍数となる一定ノイズ周期に対応する一定ノイズ画素数毎の複数の階調値グループに前記1ラインの全画素の前記階調値を分割し、各前記階調値グループのうちの同一順位の全ての画素の階調値を平均することによりグループ平均階調値を算出するグループ平均階調値算出部と、
前記全平均階調値と前記グループ平均階調値との差分が大きい画素から順に前記階調値グループに対して間引き候補画素として確定する間引き候補画素確定部と、
前記1ラインの全画素について、前記間引き候補画素に基いてライン間引き画素として確定するライン間引き画素確定部と、を備え、
前記解像度変換部は前記ライン間引き画素を間引き、
前記読取ライン周期は、前記一定ノイズ周期の整数倍に定められることを特徴とする画像読取装置。
A reading unit that reads an original for each line at a predetermined reading line cycle and generates analog image data of each pixel in the main scanning direction;
A reference plate disposed at a position facing the reading unit;
A power supply unit that converts the first DC voltage to the second DC voltage supplied to the reading unit by switching control at a switching frequency;
A converter that samples the analog image data at a sampling period and converts the analog image data into digital image data;
A correction unit for correcting the shading of the digital image data into gradation values;
A resolution converter that converts the resolution of the digital image data from a first resolution to a second resolution by thinning out pixels in the main scanning direction;
An average gradation value calculating unit that calculates the total average gradation value by reading the reference plate and averaging the gradation values of all pixels of one line corrected by the correction unit;
The gradation values of all pixels of the one line are assigned to a plurality of gradation value groups for each number of fixed noise pixels corresponding to a fixed noise period that is a common multiple of a period corresponding to the switching frequency and a sampling period of the conversion unit. A group average gradation value calculation unit that calculates a group average gradation value by dividing and averaging the gradation values of all the pixels of the same rank in each of the gradation value groups;
A thinning candidate pixel determining unit that determines a thinning candidate pixel for the gradation value group in order from a pixel having a large difference between the total average gradation value and the group average gradation value;
A line thinning pixel determining unit that determines all pixels of the one line as line thinning pixels based on the thinning candidate pixels;
The resolution conversion unit thins the line thinning pixels,
The image reading apparatus, wherein the reading line cycle is determined to be an integral multiple of the constant noise cycle.
JP2014196221A 2014-09-26 2014-09-26 Image reading device Active JP6304598B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014196221A JP6304598B2 (en) 2014-09-26 2014-09-26 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014196221A JP6304598B2 (en) 2014-09-26 2014-09-26 Image reading device

Publications (2)

Publication Number Publication Date
JP2016066982A JP2016066982A (en) 2016-04-28
JP6304598B2 true JP6304598B2 (en) 2018-04-04

Family

ID=55804276

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014196221A Active JP6304598B2 (en) 2014-09-26 2014-09-26 Image reading device

Country Status (1)

Country Link
JP (1) JP6304598B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0678110A (en) * 1992-08-28 1994-03-18 Fuji Photo Film Co Ltd Detection of white reference plate

Also Published As

Publication number Publication date
JP2016066982A (en) 2016-04-28

Similar Documents

Publication Publication Date Title
EP3637760B1 (en) Photoelectric conversion device, image reading apparatus, image forming apparatus, and method of photoelectric conversion
US8130421B2 (en) Image reading apparatus and method
JP6554973B2 (en) Image reading device
US9225867B2 (en) Image reading apparatus
US9344595B2 (en) Image scanning apparatus
JP6152819B2 (en) Image reading device
JP6558639B2 (en) Image reading device
JP6304598B2 (en) Image reading device
CN112565546B (en) Image processing apparatus
JP6555166B2 (en) Image reading device
US20190116286A1 (en) Image reading apparatus and image sensor
JP2005229371A (en) Print profile setting device, print profile setting system, print profile setting method, and print profile setting program
US7726569B2 (en) Method for determining sampling timing and image reading apparatus using the same
JP6380197B2 (en) Image reading device
US9270863B2 (en) Image scanning apparatus
JP6330636B2 (en) Image reading device
JP2019016828A (en) Image reading apparatus, image reading method, and program
JP6493807B2 (en) Image reading device
JP3881276B2 (en) Image reader
US20060114521A1 (en) Method and apparatus for improving color registration in contact-image-sensor scanners
US10070015B2 (en) Image reading apparatus, image reading method and storage medium for shading correction accounting for dark current influence
JP6508573B2 (en) Image reader
JP6558211B2 (en) Image reading device
JP2003152958A (en) Image scanner
KR20060082169A (en) Image forming apparatus capable of correcting color automatically and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170323

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180131

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180222

R150 Certificate of patent or registration of utility model

Ref document number: 6304598

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150