JP6508573B2 - Image reader - Google Patents

Image reader Download PDF

Info

Publication number
JP6508573B2
JP6508573B2 JP2015230371A JP2015230371A JP6508573B2 JP 6508573 B2 JP6508573 B2 JP 6508573B2 JP 2015230371 A JP2015230371 A JP 2015230371A JP 2015230371 A JP2015230371 A JP 2015230371A JP 6508573 B2 JP6508573 B2 JP 6508573B2
Authority
JP
Japan
Prior art keywords
group
black
chip
data
light
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
JP2015230371A
Other languages
Japanese (ja)
Other versions
JP2017098812A (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 JP2015230371A priority Critical patent/JP6508573B2/en
Publication of JP2017098812A publication Critical patent/JP2017098812A/en
Application granted granted Critical
Publication of JP6508573B2 publication Critical patent/JP6508573B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

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

従来から、1列に並べられた受光素子を複数のブロックに分割したラインセンサを用いて原稿の画像を読み取る画像読取装置がある。この画像読取装置は、原稿の画像を読み取る前に、黒補正のための黒データを取得し、取得した黒データを用いて黒補正を実行している。この画像読取装置が、黒データを取得するときに、画像読取装置の外からの光(以下、外光という)が受光素子に入射すると、外光の影響により黒データが変化してしまい、正確な黒補正を実行することができなかった。   2. Description of the Related Art Conventionally, there is an image reading apparatus that reads an image of a document using a line sensor in which light receiving elements arranged in one row are divided into a plurality of blocks. The image reading apparatus acquires black data for black correction before reading an image of a document, and executes black correction using the acquired black data. When light from the outside of the image reading device (hereinafter referred to as "external light") enters the light receiving element when the image reading device acquires black data, the black data changes due to the influence of the external light. Black correction could not be performed.

特許文献1に記載の画像読取装置は、外光の有無を判断して黒データを更新している。具体的には、この画像読取装置は、黒データの更新処理において、1列に並べられた複数の受光素子のブロック毎に外光の有無を判断し、外光がないブロックについては、黒データを更新し、外光があるブロックについては、黒データを更新しない様に構成されている。   The image reading apparatus described in Patent Document 1 updates black data by determining the presence or absence of external light. Specifically, the image reading apparatus determines the presence or absence of external light for each block of a plurality of light receiving elements arranged in a line in the black data update process, and black data for a block having no external light. , And black data is not updated for blocks having external light.

特開2013−150175号公報JP, 2013-150175, A

しかしながら、受光素子の温度特性等により、受光素子に対する温度等の経時的条件が変化すると黒データも変化する。そのため、特許文献1のように、取得時点の異なる黒データが存在すると、黒データが変化してしまうという問題が発生する。   However, if the temporal conditions such as the temperature of the light receiving element change due to the temperature characteristics of the light receiving element, the black data also changes. Therefore, as in Patent Document 1, when black data at different acquisition times exist, there arises a problem that the black data is changed.

そこで本発明は上述した事情に鑑みてなされ、外光のない受光素子について黒データを更新し、外光のある受光素子について黒データを更新しない場合でも、正確な黒データを用いて黒補正することが可能な画像読取装置を提供することを目的とする。   Therefore, the present invention is made in view of the above-described circumstances, and black data is updated for light receiving elements without external light, and black correction is performed using accurate black data even when black data is not updated for light receiving elements with external light. It is an object of the present invention to provide an image reading apparatus capable of

上記目的を達成するために、請求項1に記載の発明態様では、画像読取装置は、光源と1ラインに並んだ多数の受光素子とを有し、前記光源を点灯して読み取る読取部と、前記読取部を覆う閉状態と前記読取部を開放する開状態とに開閉可能なカバーと、補正データに基づいて前記読取部が読み取った値を黒補正する補正部と、準備処理を実行し、前記準備処理を実行した後に実行処理を実行する制御部と、を備え、前記準備処理は、前記カバーが閉状態で、前記光源を消灯して前記読取部により読み取ることによって前記複数の受光素子の各受光素子の第1黒データを取得する第1黒データ取得処理を含み、前記実行処理は、前記カバーが開状態で、前記光源を消灯して前記読取部により読み取ることによって前記各受光素子の第2黒データを取得する第2黒データ取得処理と、前記第2黒データに基づいて外光が前記各受光素子に入射したか否かを判断する判断処理と、外光が入射していないと判断された各受光素子において前記第2黒データと前記第1黒データとに基づいて黒調整データを算出する調整データ算出処理と、外光が入射したと判断された各受光素子において前記第1黒データと前記黒調整データとに基づいて第3黒データを算出する第3黒データ算出処理と、前記外光が入射したと判断された各受光素子において前記第3黒データを前記補正データとして決定し、外光が入射していないと判断された各受光素子において前記第2黒データを前記補正データとして決定する補正データ決定処理と、原稿の画像を読み取らせ、前記補正データに基づいて黒補正させる読取処理と、を含む。   In order to achieve the above object, in the aspect of the invention according to claim 1, the image reading apparatus has a light source and a large number of light receiving elements arranged in one line, and a reading unit which lights and reads the light source; A cover that can be opened and closed in a closed state covering the reading unit and an open state opening the reading unit; a correction unit that performs black correction on a value read by the reading unit based on correction data; And a control unit that executes an execution process after the preparation process is performed. The preparation process is performed by turning off the light source and reading the light from the reading unit while the cover is closed. The first black data acquisition process for acquiring first black data of each light receiving element, and the execution process is performed by turning off the light source and reading by the reading unit while the cover is open. 2nd Black Day A second black data acquisition process of acquiring the second black data, a determination process of determining whether or not outside light is incident on the light receiving elements based on the second black data, and it is determined that the outside light is not incident Adjustment data calculation processing for calculating black adjustment data based on the second black data and the first black data in each light receiving element, and the first black data for each light receiving element determined to be incident with external light Third black data calculation processing for calculating third black data based on the black adjustment data, and the third black data is determined as the correction data in each of the light receiving elements determined that the outside light is incident; Correction data determination processing for determining the second black data as the correction data in each light receiving element determined that external light is not incident, reading an image of a document, and performing black correction based on the correction data Including a reading process, the.

請求項2に記載の具体的態様では、前記読取部の前記多数の受光素子が複数のグループに区分けされており、前記判断処理は、前記複数のグループの各グループにおいて、外光が入射したグループを外光有りグループと判断し、外光が入射していないグループを外光無しグループと判断する第1判断処理と、前記外光有りグループの各受光素子において外光が入射した受光素子を外光有り画素として判断する第2判断処理と、を含み、前記調整データ算出処理は、前記外光無しグループの全ての受光素子において前記第2黒データから前記第1黒データを引算し、前記各受光素子において引算して算出された全ての値を平均して前記黒調整データを算出し、前記第3黒データ算出処理は、前記第1黒データに前記黒調整データを加算して前記第3黒データを算出する。   In the specific aspect according to claim 2, the multiple light receiving elements of the reading unit are divided into a plurality of groups, and in the determination processing, the group in which the outside light is incident in each of the plurality of groups And a first determination process of determining a group to which the outside light is not incident as the outside light-free group, and a light receiving element to which the outside light is incident in each light receiving element of the outside light existing group. The adjustment data calculation processing includes subtracting the first black data from the second black data in all the light receiving elements of the non-external light group; The black adjustment data is calculated by averaging all values calculated by subtraction at each light receiving element, and the third black data calculation process adds the black adjustment data to the first black data to calculate the black adjustment data. 3 to calculate the black data.

請求項3に記載の具体的態様では、前記複数のグループの各グループは同一の出力特性を持つ前記受光素子で構成され、前記第1判断処理は、前記複数のグループの各グループにおいて複数の受光素子の前記第2黒データのうち最も大きい値から最も小さい値を引算し、引算した値が予め定められた第1閾値を超えていたら、そのグループを前記外光有りグループと判断する。   In the specific aspect according to claim 3, each group of the plurality of groups is configured by the light receiving element having the same output characteristic, and the first determination process is performed by detecting a plurality of light received in each group of the plurality of groups. The smallest value is subtracted from the largest value of the second black data of the element, and if the subtracted value exceeds a predetermined first threshold, the group is determined to be the outside light present group.

請求項4に記載の具体的態様では、前記判断処理は、前記外光有りグループが隣接している全てのグループのグループ群を連続グループ群として決定する連続グループ群決定処理と、 前記連続グループ群について先頭のグループと最終のグループとを詳細グループとして決定する詳細グループ決定処理と、を含み、前記第2判断処理は、前記詳細グループである前記外光有りグループにおいて前記外光有り画素を判断し、前記詳細グループでない前記外光有りグループにおいて前記外光有り画素を判断しない。   In the specific aspect according to claim 4, the determination processing is a continuous group group determination processing of determining a group group of all the groups to which the outside light present group is adjacent as a continuous group group, and the continuous group group And a detail group determination process of determining the first group and the last group as the detail group, and the second determination process determines the extraneous light presence pixels in the extraneous light group which is the detailed group. The ambient light presence pixel is not determined in the ambient light presence group that is not the detail group.

請求項5に記載の具体的態様では、前記準備処理は、前記複数のグループの各グループの全ての受光素子の第1黒データを平均してグループ黒平均値を算出する平均処理を含み、前記実行処理は、前記グループ黒平均値に前記黒調整データを加算して、加算した値に予め定められた所定値を加算することで第2閾値を算出する第2閾値算出処理を含み、前記第2判断処理は、前記詳細グループの各受光素子において前記第2黒データが前記第2閾値を超えていたら、その受光素子において外光が入射したと判断する。   The specific process according to claim 5, wherein the preparation process includes an averaging process of calculating first group black average values by averaging first black data of all light receiving elements of each of the plurality of groups. The execution process includes a second threshold value calculation process of calculating a second threshold value by adding the black adjustment data to the group black average value and adding a predetermined predetermined value to the added value. In the second judgment process, when the second black data exceeds the second threshold in each light receiving element of the detail group, it is determined that the external light is incident in the light receiving element.

請求項1に記載の発明態様では、準備処理は、カバーが閉状態で、光源を消灯して読取部により読み取ることによって各受光素子の第1黒データを取得する第1黒データ取得処理を含み、実行処理は、カバーが開状態で、光源を消灯して読取部により読み取ることによって各受光素子の第2黒データを取得する第2黒データ取得処理と、第2黒データに基づいて外光が各受光素子に入射したか否かを判断する判断処理と、外光が入射していないと判断された各受光素子において第2黒データと第1黒データとに基づいて黒調整データを算出する調整データ算出処理と、外光が入射したと判断された各受光素子において第1黒データと黒調整データとに基づいて第3黒データを算出する第3黒データ算出処理と、前記外光が入射したと判断された各受光素子において第3黒データを補正データとして決定し、外光が入射していないと判断された各受光素子において第2黒データを補正データとして決定する補正データ決定処理と、原稿の画像を読み取らせ、補正データに基づいて黒補正させる読取処理と、を含む。よって、第2黒データが第1黒データに対して変化した場合でも、正確な第3黒データを用いて黒補正をすることができる。   In the aspect of the invention according to claim 1, the preparation process includes a first black data acquisition process of acquiring the first black data of each light receiving element by turning off the light source and reading by the reading unit when the cover is closed. The execution process includes a second black data acquisition process for acquiring second black data of each light receiving element by turning off the light source and reading by the reading unit with the cover open, and external light based on the second black data. Determination processing for determining whether or not light is incident on each light receiving element, and black adjustment data is calculated based on the second black data and the first black data in each light receiving element determined that external light is not incident Adjustment data calculation processing, third black data calculation processing for calculating third black data based on the first black data and the black adjustment data in each light receiving element determined to have the outside light incident, and the outside light Is judged to be incident Correction data determination processing in which the third black data is determined as correction data in each light receiving element, and the second black data is determined as correction data in each light receiving element determined as having no external light incident, and an image of the document And a reading process for performing black correction based on the correction data. Therefore, even when the second black data changes with respect to the first black data, black correction can be performed using the correct third black data.

請求項2に記載の具体的態様では、判断処理は、複数のグループの各グループにおいて、外光が入射したグループを外光有りグループと判断し、外光が入射していないグループを外光無しグループと判断する第1判断処理と、外光有りグループの各受光素子において外光が入射した受光素子を外光有り画素として判断する第2判断処理と、を含み、調整データ算出処理は、外光無しグループの全ての受光素子において第2黒データから第1黒データを引算し、各受光素子において引算して算出された全ての値を平均して黒調整データを算出し、第3黒データ算出処理は、第1黒データに黒調整データを加算して第3黒データを算出する。よって、全ての受光素子への外光の入射を判断するのに比べて、速く外光の入射を判断することができ、変動しやすい黒データに対しても精度の高い黒調整データを算出することができ、正確な第3黒データを算出することができる。   According to a specific aspect of the present invention, in each of the plurality of groups, the determination processing determines that the group into which the external light is incident is the group with external light, and the group into which the external light is not incident is no external light The adjustment data calculation process includes a first determination process of determining a group and a second determination process of determining a light receiving element on which external light is incident in each light receiving element of an external light group as an external light presence pixel. The black adjustment data is calculated by subtracting the first black data from the second black data in all the light receiving elements of the non-light group and averaging all the values calculated by subtraction at each light receiving element The black data calculation process calculates third black data by adding black adjustment data to the first black data. Therefore, it is possible to judge the incident of the external light faster than the judgment of the incident of the external light to all the light receiving elements, and calculate the black adjustment data with high accuracy even for the black data which is easily fluctuated. And accurate third black data can be calculated.

請求項3に記載の具体的態様では、複数のグループの各グループは同一の出力特性を持つ受光素子で構成され、第1判断処理は、複数のグループの各グループにおいて複数の受光素子の第2黒データのうち最も大きい値から最も小さい値を引算し、引算した値が予め定められた第1閾値を超えていたら、そのグループを外光有りグループと判断する。よって、各グループにおいては黒データの変動が小さくなり、その小さい変動を利用して精度の高い外光の入射を判断することができる。   In the specific aspect according to claim 3, each group of the plurality of groups is configured by the light receiving element having the same output characteristic, and the first determination processing is performed by using the second of the plurality of light receiving elements in each group of the plurality of groups. Among the black data, the smallest value is subtracted from the largest value, and if the subtracted value exceeds a first predetermined threshold, it is determined that the group is a group with external light. Therefore, in each group, the fluctuation of the black data becomes small, and the small fluctuation can be used to judge the incident of the external light with high accuracy.

請求項4に記載の具体的態様では、判断処理は、外光有りグループが隣接している全てのグループのグループ群を連続グループ群として決定する連続グループ群決定処理と、連続グループ群について先頭のグループと最終のグループとを詳細グループとして決定する詳細グループ決定処理と、を含み、第2判断処理は、詳細グループである外光有りグループにおいて外光有り画素を判断し、詳細グループでない外光有りグループにおいて外光有り画素を判断しない。よって、先頭のグループおよび最終のグループのみ外光有り画素を判断するため、より速く外光有り画素を判断することができる。   In the specific aspect according to claim 4, the determination process is a continuous group group determination process of determining the group group of all the groups to which the external light exist group is adjacent as the continuous group group, and the head of the continuous group group. The second determination process includes a detailed group determination process of determining the group and the final group as the detailed group, and the second determination process determines the extraneous light presence pixels in the extraneous light group that is the detailed group, and the extraneous light is not the detailed group Do not judge the pixel with ambient light in the group. Therefore, since only the head group and the final group determine the outside light presence pixels, it is possible to determine the outside light presence pixels faster.

請求項5に記載の具体的態様では、準備処理は、複数のグループの各グループの全ての受光素子の第1黒データを平均してグループ黒平均値を算出する平均処理を含み、実行処理は、グループ黒平均値に黒調整データを加算して、加算した値に予め定められた所定値を加算することで第2閾値を算出する第2閾値算出処理を含み、第2判断処理は、詳細グループの各受光素子において前記第2黒データが前記第2閾値を超えていたら、その受光素子において外光が入射したと判断する。よって、外光の入射のない第1黒データと第1黒データから第2黒データへの黒データの変化である黒調整データとを用いて第2閾値を算出しているため、精度の高い外光の入射を判断することができる。   According to a specific aspect of the present invention, the preparation process includes an averaging process of calculating the group black average value by averaging the first black data of all light receiving elements of each group of a plurality of groups, and the execution process The second determination process includes a second threshold value calculation process of calculating a second threshold value by adding the black adjustment data to the group black average value and adding a predetermined predetermined value to the added value. If the second black data exceeds the second threshold in each light receiving element of the group, it is determined that the external light is incident on the light receiving element. Therefore, since the second threshold is calculated using the first black data without incidence of external light and the black adjustment data which is the change of black data from the first black data to the second black data, the accuracy is high. The incidence of ambient light can be determined.

本発明の実施形態に係る画像読取装置SMの内部構成を示す図面である。It is drawing which shows the internal structure of image reader SM which concerns on embodiment of this invention. 原稿載置台DTの上面図である。FIG. 5 is a top view of a document placement table DT. 読取部20の受光部22の構成を示すブロック図である。FIG. 2 is a block diagram showing a configuration of a light receiving unit 22 of the reading unit 20. 画像読取装置SMの電気的構成を示すブロック図である。FIG. 2 is a block diagram showing an electrical configuration of an image reading device SM. 保守メイン処理を示すフローチャートである。It is a flow chart which shows maintenance main processing. 読取メイン処理を示すフローチャートである。It is a flow chart which shows reading main processing. 第2黒データBK2置換処理R7を示すフローチャートである。It is a flowchart which shows 2nd black data BK2 substitution process R7. 置換黒データRPBK算出処理RA7を示すフローチャートである。It is a flow chart which shows substitution black data RPBK calculation processing RA7. 開始詳細チップSCB、終了詳細チップECBを説明する図面である。It is a figure explaining start detail chip SCB and end detail chip ECB. 開始画素位置SCP、終了画素位置ECPを説明する図面である。It is a figure explaining start pixel position SCP and end pixel position ECP.

<画像読取装置SMの構成>
図1Aは、画像読取装置SMの正面図を示す。画像読取装置SMは、原稿載置台DTと、カバーCVと、を備える。原稿載置台DTは、本体MBと、透明板TPと、を備える。本体MBは、様々な部材(例えば、透明板TP、読取部20等)を収容するための筐体である。透明板TPは、本体MBに収容されており、本体MBに固定されている。透明板TPには、読取対象の原稿が載置される。カバーCVは、本体MBの上部に配置されており、本体MBに対して開閉可能である。カバーCVは、本体MBの奥側(図1Aの紙面に垂直方向の奥側、図1Bの上側)に回転軸を備え、本体MBの前側(図1Aの紙面に垂直方向の手前側、図1Bの下側)から開閉される。
<Configuration of Image Reading Device SM>
FIG. 1A shows a front view of the image reading apparatus SM. The image reading apparatus SM includes a document placement table DT and a cover CV. The document placement table DT includes a main body MB and a transparent plate TP. The main body MB is a housing for housing various members (for example, the transparent plate TP, the reading unit 20, and the like). The transparent plate TP is accommodated in the main body MB and fixed to the main body MB. A document to be read is placed on the transparent plate TP. The cover CV is disposed on the top of the main body MB and can be opened and closed with respect to the main body MB. The cover CV has a rotation axis on the back side of the main body MB (the back side in the direction perpendicular to the sheet of FIG. 1A, the upper side of FIG. 1B), and the front side of the body MB (in the direction perpendicular to the sheet of FIG. Opening and closing).

画像読取装置SMは、さらに、透明板TPの下方で本体MBに収容されている読取部20を備える。読取部20は、本体MBに対して副走査方向(即ち図1Aの左右方向)に沿って移動可能である。読取部20は、透明板TPに載置される原稿の読取を実行する。読取部20は、CIS(Contact Image Sensorの略)で構成され、具体的には、光源21と、ロッドレンズ24と、受光部22と、を備える。光源21は、赤色、青色、および緑色の発光ダイオードなどで構成され、透明板TPに向けて、光を照射する。ロッドレンズ24は、光源21から照射される光の反射光を受光する。   The image reading device SM further includes a reading unit 20 accommodated in the main body MB below the transparent plate TP. The reading unit 20 is movable along the sub scanning direction (that is, the left and right direction in FIG. 1A) with respect to the main body MB. The reading unit 20 reads an original placed on the transparent plate TP. The reading unit 20 is configured by a CIS (abbreviation for Contact Image Sensor), and specifically includes a light source 21, a rod lens 24, and a light receiving unit 22. The light source 21 is composed of red, blue, and green light emitting diodes, and emits light toward the transparent plate TP. The rod lens 24 receives the reflected light of the light emitted from the light source 21.

図2において、受光部22は、主走査方向に直線状に配列される16個のセンサICチップCH1〜CH16を有し、各センサICチップCHは、主走査方向に配列される多数の光電変換素子23を含み、図示しないシフトレジスタ、および増幅器を内蔵する。先頭画素は、センサICチップCH1内のセンサICチップCHと隣接していない側の端部にある画素であり、最終画素は、センサICチップCH16内のセンサICチップCHと隣接していない側の端部にある画素である。即ち、先頭画素は、主走査方向の最も上流に位置する画素であり、最終画素は、主走査方向の最も下流側に位置する画素である。本実施形態では、受光部22は、16個のセンサICチップCH1〜CH16を有していたが、16個より少ない数のセンサICチップCHを有していても良いし、多い数のセンサICチップCHを有していても良い。各センサICチップCH1〜CH16は、出力特性が異なっているが、同一センサICチップCHにおいては、出力特性が同じである。1ラインは、この先頭画素から最終画素までで構成される画素群である。以下、各センサICチップCH1〜CH16をチップCH1〜CH16という。   In FIG. 2, the light receiving unit 22 has 16 sensor IC chips CH1 to CH16 arranged linearly in the main scanning direction, and each sensor IC chip CH has a large number of photoelectric conversions arranged in the main scanning direction. It includes an element 23 and incorporates a shift register and an amplifier (not shown). The top pixel is the pixel at the end not adjacent to the sensor IC chip CH in the sensor IC chip CH1, and the final pixel is the side not adjacent to the sensor IC chip CH in the sensor IC chip CH16. It is a pixel at the end. That is, the head pixel is the pixel located most upstream in the main scanning direction, and the last pixel is the pixel located most downstream in the main scanning direction. In the present embodiment, the light receiving unit 22 includes 16 sensor IC chips CH1 to CH16, but may have less than 16 sensor IC chips CH or a large number of sensor ICs. It may have a chip CH. The sensor IC chips CH1 to CH16 have different output characteristics, but the same sensor IC chip CH has the same output characteristics. One line is a pixel group including the head pixel to the final pixel. The sensor IC chips CH1 to CH16 are hereinafter referred to as chips CH1 to CH16.

図1Bは、原稿載置台DTを上から見た上面図を示す。原稿載置台DTの上面は、本体MBの上面、および透明板TPがカバーCV側に露出した面を有する。本体MBの上面は、カバーセンサ27、および回動軸を有する。透明板TPは、副走査方向に沿って伸びる長辺と、主走査方向に沿って伸びる短辺と、によって構成される矩形形状を有する。以下の説明において、図1Bの下方向を主走査方向の下流、図1Bの右方向を副走査方向の下流として説明する。透明板TPの露出する面のうち主走査方向の上流側、副走査方向の上流側に基準点BPが設けられている。透明板TPには、基準点BPを基点に原稿が載置される。透明板TPは、基準点BPから主走査方向の下流側および副走査方向の下流側に原稿載置領域PRを有する。原稿載置領域PRは、2点鎖線で囲まれる領域である。回動軸は、カバーCVを開閉するときに回動する軸であり、本体MBの主走査方向の上流側に2カ所配置されている。カバーセンサ27は、回動軸の近傍に配置され、カバーCVが開いたときの開状態時にオンし、カバーCVが閉じたときの閉状態時にオフする。   FIG. 1B shows a top view of the document placement table DT as viewed from above. The upper surface of the document placement table DT has the upper surface of the main body MB and a surface where the transparent plate TP is exposed to the cover CV side. The upper surface of the main body MB has a cover sensor 27 and a pivot. The transparent plate TP has a rectangular shape constituted by a long side extending along the sub scanning direction and a short side extending along the main scanning direction. In the following description, the lower direction of FIG. 1B is described as the downstream in the main scanning direction, and the right direction in FIG. 1B is described as the downstream in the sub scanning direction. Among the exposed surfaces of the transparent plate TP, a reference point BP is provided on the upstream side in the main scanning direction and on the upstream side in the sub scanning direction. A document is placed on the transparent plate TP with the reference point BP as a base point. The transparent plate TP has a document placement area PR on the downstream side in the main scanning direction and the downstream side in the sub scanning direction from the reference point BP. The document placement area PR is an area surrounded by a two-dot chain line. The pivoting axis is an axis that pivots when opening and closing the cover CV, and is disposed at two upstream sides in the main scanning direction of the main body MB. The cover sensor 27 is disposed in the vicinity of the pivot shaft, and is turned on when the cover CV is opened and in the open state, and turned off when the cover CV is closed and in the closed state.

画像読取装置SMは、さらに、透明板TPの上面に固定されている基準部材BMを備える。基準部材BMは、透明板TPの副走査方向の上流側(即ち図1Bの左側)の端部に設けられ、横線を付した領域に固定されている。基準部材BMは、主走査方向に沿って伸びる白色の部材であり、後述する白データWHを取得するときや、光源21を調整するときに利用される。以下では、副走査方向において、基準部材BMが設けられている位置を、「ホーム位置HP」と呼ぶ。読取部20は、ホーム位置HPを基準として、副走査方向に移動可能に構成されている。   The image reading device SM further includes a reference member BM fixed to the upper surface of the transparent plate TP. The reference member BM is provided at the end of the transparent plate TP on the upstream side (i.e., the left side in FIG. 1B) in the sub-scanning direction, and is fixed to the area marked with a horizontal line. The reference member BM is a white member extending along the main scanning direction, and is used when acquiring white data WH described later, or when adjusting the light source 21. Hereinafter, the position at which the reference member BM is provided in the sub scanning direction will be referred to as “home position HP”. The reading unit 20 is configured to be movable in the sub-scanning direction based on the home position HP.

<画像読取装置SMの電気的構成>
画像読取装置SMの電気的構成について図3を参照して説明する。図3において、画像読取装置SMは、CPU30、ROM31、RAM32、フラッシュROM33、デバイス制御部34、アナログフロントエンド(以下、AFEという)35、画像処理部36、および駆動回路37を主な構成要素として備える。これらの構成要素は、バス38を介して、操作機構OM、表示機構DM、およびカバーセンサ27に接続される。操作機構OMは、開始ボタンおよび決定ボタン等の複数のキーによって構成される。使用者は、操作機構OMを操作することによって、様々な指示を画像読取装置SMに入力することができる。表示機構DMは、様々な情報を表示するためのディスプレイである。
<Electric Configuration of Image Reading Device SM>
The electrical configuration of the image reading apparatus SM will be described with reference to FIG. In FIG. 3, the image reading apparatus SM includes, as main components, a CPU 30, a ROM 31, a RAM 32, a flash ROM 33, a device control unit 34, an analog front end (hereinafter referred to as AFE) 35, an image processing unit 36 and a drive circuit 37. Prepare. These components are connected to the operation mechanism OM, the display mechanism DM, and the cover sensor 27 via the bus 38. The operating mechanism OM is composed of a plurality of keys such as a start button and an enter button. The user can input various instructions to the image reading device SM by operating the operation mechanism OM. The display mechanism DM is a display for displaying various information.

ROM31は、後述する保守メイン処理、読取メイン処理、各メイン処理中のサブルーチンの処理など、画像読取装置SMの各種動作を実行するためのプログラムを記憶する。CPU30は、ROM31から読み出されたプログラムに従って、各部の制御を行う。フラッシュROM33は、読み書き可能な不揮発性メモリであり、CPU30の制御処理により生成された各種のデータ、たとえば保守メイン処理により取得された各種のデータなどを記憶する。RAM32は、CPU30の制御処理により生成された算出結果などを一時的に記憶する。   The ROM 31 stores programs for executing various operations of the image reading apparatus SM, such as maintenance main processing to be described later, reading main processing, and processing of a subroutine in each main processing. The CPU 30 controls each part in accordance with the program read from the ROM 31. The flash ROM 33 is a readable and writable non-volatile memory, and stores various data generated by control processing of the CPU 30, for example, various data acquired by maintenance main processing. The RAM 32 temporarily stores calculation results and the like generated by control processing of the CPU 30.

デバイス制御部34は、読取部20に接続され、CPU30からの命令に基づいて、光源21の点灯または消灯を制御する信号、および光源21に流れる電流値を制御する信号を読取部20に送信する。また、デバイス制御部34は、CPU30からの命令に基づいて、図2に示すように受光部22のチップCH1〜CH16の多数の光電変換素子23の電気信号を同時にシフトレジスタに転送するためのシリアルイン信号SIおよびシフトレジスタの電気信号を順番に出力させるためのクロック信号CLKを受光部22に送信する。読取部20は、デバイス制御部34からこれらの信号を受け取ると、光源21を点灯させるとともに、受光部22が受光した受光量に応じたアナログ信号をAFE35に送信する。   The device control unit 34 is connected to the reading unit 20, and transmits to the reading unit 20 a signal for controlling turning on / off of the light source 21 and a signal for controlling the current value flowing to the light source 21 based on an instruction from the CPU 30. . In addition, the device control unit 34 is a serial for simultaneously transferring electric signals of many photoelectric conversion elements 23 of the chips CH1 to CH16 of the light receiving unit 22 to the shift register as shown in FIG. 2 based on an instruction from the CPU 30. A clock signal CLK for outputting the in signal SI and the electric signal of the shift register in order is transmitted to the light receiving unit 22. When the reading unit 20 receives these signals from the device control unit 34, the reading unit 20 turns on the light source 21 and transmits an analog signal according to the amount of light received by the light receiving unit 22 to the AFE 35.

AFE35は、読取部20に接続され、CPU30からの命令に基づいて、読取部20から送信されるアナログ信号をデジタルデータに変換する。AFE35は、予め定められた入力レンジおよび分解能を有する。たとえば、分解能は、10ビットであるならば、「0」から「1023」までの階調である。この場合、AFE35は、読取部20から送信されたアナログ信号をデジタルデータとして10ビット(0〜1023)の階調データに変換する。AFE35によって変換されたデジタルデータは、画像処理部36に送信される。画像処理部36は、画像処理用の専用ICであるASICから構成され、デジタルデータに各種の画像処理を施す。画像処理は、シェーディング補正、およびガンマ補正などの各種補正処理などである。画像処理部36は、各種の画像処理を施さないように設定することもできるし、全ての画像処理を施すように設定することもできる。画像処理部36は、設定された画像処理をデジタルデータに施し、デジタル画像データを生成する。このデジタル画像データは、バス38を介してRAM32に記憶される。ここで、シェーディング補正は、白補正および黒補正などである。黒補正は、各画素においてデジタルデータから後述する黒データBK1,BK2を引算する補正である。   The AFE 35 is connected to the reading unit 20, and converts an analog signal transmitted from the reading unit 20 into digital data based on an instruction from the CPU 30. The AFE 35 has a predetermined input range and resolution. For example, if the resolution is 10 bits, it is a gradation from "0" to "1023". In this case, the AFE 35 converts the analog signal transmitted from the reading unit 20 into 10-bit (0 to 1023) gradation data as digital data. The digital data converted by the AFE 35 is transmitted to the image processing unit 36. The image processing unit 36 is composed of an ASIC, which is a dedicated IC for image processing, and performs various types of image processing on digital data. The image processing is various correction processing such as shading correction and gamma correction. The image processing unit 36 can be set not to perform various types of image processing, or can be set to perform all image processing. The image processing unit 36 applies the set image processing to the digital data to generate digital image data. This digital image data is stored in the RAM 32 via the bus 38. Here, shading correction is, for example, white correction and black correction. Black correction is correction that subtracts black data BK1 and BK2 described later from digital data in each pixel.

駆動回路37は、搬送モータMTに接続され、CPU30から送信される駆動指令に基づいて搬送モータMTを駆動する。駆動回路37は、駆動指令により指令された回転量および回転方向に従って搬送モータMTを回転させる。搬送モータMTが所定量だけ回転すると、移動機構MMが所定角度回転し、読取部20が副走査方向に所定距離だけ搬送される。   The drive circuit 37 is connected to the transport motor MT, and drives the transport motor MT based on a drive command transmitted from the CPU 30. The drive circuit 37 rotates the transport motor MT according to the rotation amount and the rotation direction instructed by the drive instruction. When the transport motor MT rotates by a predetermined amount, the moving mechanism MM rotates by a predetermined angle, and the reading unit 20 is transported by a predetermined distance in the sub-scanning direction.

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

(保守メイン処理)
図4に示す保守メイン処理は、画像読取装置SMが工場から出荷される前に、または出荷後にサービスマンが保守点検するときに、サービスマン等の作業者が画像読取装置SMの操作機構OMを特別な操作方法に従って操作することにより開始される。本実施形態では、読取解像度として600DPIが用いられるときについて説明する。
(Maintenance main processing)
In the maintenance main process shown in FIG. 4, a worker such as a service person can operate the operation mechanism OM of the image reading device SM before the image reading device SM is shipped from the factory or when the service person performs maintenance inspection after shipment. It starts by operating according to a special operation method. In the present embodiment, the case where 600 DPI is used as the reading resolution will be described.

保守メイン処理が開始されると、CPU30は、駆動回路37により読取部20をホーム位置HPに移動させ、その後にデバイス制御部34、AFE35、および画像処理部36を初期化する(M1)。具体的には、CPU30は、駆動回路37に駆動指令を送信し、読取部20の読取位置がホーム位置HPとなるように、読取部20を移動させる。さらに、CPU30は、600DPIの読取解像度に応じたクロック信号CLKおよびシリアルイン信号SIの設定をフラッシュROM33から取得し、デバイス制御部34に設定する。CPU30は、カラーモード時に対応する光源21への信号の設定をフラッシュROM33から取得し、デバイス制御部34に設定する。CPU30は、AFE35のオフセット調整値およびゲイン調整値をフラッシュROM33から取得し、AFE35に設定する。ここで、オフセット調整値は、AFE35に入力されるアナログ信号のレベルをシフトする値であり、ゲイン調整値は、AFE35に入力されるアナログ信号の利得を調整する値である。CPU30は、各種画像処理を施さない設定値を画像処理部36に設定する。   When the maintenance main process is started, the CPU 30 causes the drive circuit 37 to move the reading unit 20 to the home position HP, and thereafter initializes the device control unit 34, the AFE 35, and the image processing unit 36 (M1). Specifically, the CPU 30 transmits a drive command to the drive circuit 37, and moves the reading unit 20 so that the reading position of the reading unit 20 becomes the home position HP. Further, the CPU 30 acquires settings of the clock signal CLK and the serial in signal SI corresponding to the reading resolution of 600 DPI from the flash ROM 33 and sets them in the device control unit 34. The CPU 30 acquires the setting of the signal to the light source 21 corresponding to the color mode from the flash ROM 33 and sets it in the device control unit 34. The CPU 30 acquires the offset adjustment value and the gain adjustment value of the AFE 35 from the flash ROM 33 and sets the AFE 35. Here, the offset adjustment value is a value for shifting the level of the analog signal input to the AFE 35, and the gain adjustment value is a value for adjusting the gain of the analog signal input to the AFE 35. The CPU 30 sets, in the image processing unit 36, setting values that are not subjected to various image processing.

CPU30は、カバーCVが閉状態か否かを判断する(M2)。具体的には、CPU30は、カバーセンサ27がオフのとき、カバーCVが閉状態と判断(M2:Yes)し、処理M4へ進む。CPU30は、カバーセンサ27がオンのとき、カバーCVが開状態と判断(M2:No)し、処理M3へ進む。処理M3へ進むと、CPU30は、カバーCVが開状態であり、カバーCVを閉じて再度実行することを表示機構DMに表示させ(M3)、保守メイン処理が終了する。   The CPU 30 determines whether the cover CV is in the closed state (M2). Specifically, when the cover sensor 27 is off, the CPU 30 determines that the cover CV is in the closed state (M2: Yes), and proceeds to processing M4. When the cover sensor 27 is on, the CPU 30 determines that the cover CV is in the open state (M2: No), and proceeds to processing M3. When the process proceeds to the process M3, the CPU 30 causes the display mechanism DM to display that the cover CV is in the open state, close the cover CV, and execute again (M3), and the maintenance main process ends.

処理M2において、カバーCVが閉状態と判断されると、CPU30は、読取部20の第1黒データBK1を取得する(M4)。具体的には、CPU30は、光源21を消灯させ、基準部材BMを読み取る。そして、CPU30は、読み取った1ライン中の1色の各画素のデジタル画像データを第1黒データBK1として取得する。CPU30は、第1黒データBK1をフラッシュROM33に記憶する。第1黒データBK1は、3色の光源21を消灯して取得するため、1色となっている。   In the process M2, when it is determined that the cover CV is in the closed state, the CPU 30 acquires the first black data BK1 of the reading unit 20 (M4). Specifically, the CPU 30 turns off the light source 21 and reads the reference member BM. Then, the CPU 30 acquires digital image data of each pixel of one color in one line read as the first black data BK1. The CPU 30 stores the first black data BK1 in the flash ROM 33. The first black data BK1 is one color because the light sources 21 of three colors are turned off and acquired.

CPU30は、チップ保守黒BBK1を算出する(M5)。具体的には、CPU30は、第1黒データBK1を各チップCHのデータ群に分割し、分割した各データ群の第1黒データBK1を平均することにより1ライン中の各チップCHのチップ保守黒BBK1を算出する。CPU30は、チップ保守黒BBK1をフラッシュROM33に記憶する。処理M5が終了すると、保守メイン処理が終了する。   The CPU 30 calculates a chip maintenance black BBK1 (M5). Specifically, the CPU 30 divides the first black data BK1 into data groups of each chip CH, and averages the first black data BK1 of each divided data group to maintain the chips of each chip CH in one line. Calculate black BBK1. The CPU 30 stores the chip maintenance black BBK1 in the flash ROM 33. When the process M5 ends, the maintenance main process ends.

(読取メイン処理)
図5に示す読取メイン処理は、ユーザが原稿を原稿載置台DTに載置し、操作機構OMの開始ボタンを押下することにより、開始される。本実施形態の読取メイン処理は、読取解像度として600DPIが設定され、カラーモードが設定され、A4サイズの原稿が載置されたときについて説明を行う。
(Reading main processing)
The reading main process shown in FIG. 5 is started by the user placing a document on the document placement table DT and pressing the start button of the operation mechanism OM. The reading main process of the present embodiment will be described when the reading resolution is set to 600 DPI, the color mode is set, and an A4 size document is placed.

読取メイン処理が開始されると、CPU30は、駆動回路37により読取部20をホーム位置HPに移動させ、その後にデバイス制御部34、AFE35、および画像処理部36を初期化する(R1)。具体的には、CPU30は、駆動回路37に駆動指令を送信し、読取部20の読取位置がホーム位置HPとなるように、読取部20を移動させる。さらに、CPU30は、600DPIの読取解像度に応じたクロック信号CLKおよびシリアルイン信号SIの設定をフラッシュROM33から取得し、デバイス制御部34に設定する。CPU30は、AFE35のオフセット調整値およびゲイン調整値をフラッシュROM33から取得し、AFE35に設定する。CPU30は、各種画像処理を施さない設定値を画像処理部36に設定する。   When the reading main process is started, the CPU 30 causes the driving circuit 37 to move the reading unit 20 to the home position HP, and thereafter initializes the device control unit 34, the AFE 35, and the image processing unit 36 (R1). Specifically, the CPU 30 transmits a drive command to the drive circuit 37, and moves the reading unit 20 so that the reading position of the reading unit 20 becomes the home position HP. Further, the CPU 30 acquires settings of the clock signal CLK and the serial in signal SI corresponding to the reading resolution of 600 DPI from the flash ROM 33 and sets them in the device control unit 34. The CPU 30 acquires the offset adjustment value and the gain adjustment value of the AFE 35 from the flash ROM 33 and sets the AFE 35. The CPU 30 sets, in the image processing unit 36, setting values that are not subjected to various image processing.

CPU30は、読取部20の黒データBK2を取得する(R2)。具体的には、CPU30は、光源21を消灯させ、基準部材BMを読み取る。そして、CPU30は、読み取った1ラインの1色の各画素のデジタル画像データを第2黒データBK2として取得する。   The CPU 30 acquires black data BK2 of the reading unit 20 (R2). Specifically, the CPU 30 turns off the light source 21 and reads the reference member BM. Then, the CPU 30 acquires digital image data of each pixel of one color read in one line as the second black data BK2.

CPU30は、カバーCVが閉状態か否かを判断する(R3)。具体的には、CPU30は、カバーセンサ27がオフのとき、カバーCVが閉状態と判断(R3:Yes)し、処理R8へ進む。CPU30は、カバーセンサ27がオンのとき、カバーCVが開状態と判断(R3:No)し、処理R4へ進む。   The CPU 30 determines whether the cover CV is in the closed state (R3). Specifically, when the cover sensor 27 is off, the CPU 30 determines that the cover CV is closed (R3: Yes), and proceeds to processing R8. When the cover sensor 27 is on, the CPU 30 determines that the cover CV is in the open state (R3: No), and proceeds to processing R4.

CPU30は、チップバラツキBFを算出する(R4)。具体的には、CPU30は、第2黒データBK2を各チップCHのデータ群に分割し、分割した各データ群の第2黒データBK2から最大値および最小値を抽出し、抽出した最大値から抽出した最小値を引算することにより1ライン中の各チップCHのチップバラツキBFを算出する。CPU30は、チップバラツキBFをチップCHの位置と関連付けてRAM32に記憶する。   The CPU 30 calculates the chip variation BF (R4). Specifically, the CPU 30 divides the second black data BK2 into data groups of each chip CH, extracts the maximum value and the minimum value from the second black data BK2 of each divided data group, and extracts the extracted maximum values. The chip variation BF of each chip CH in one line is calculated by subtracting the extracted minimum value. The CPU 30 stores the chip variation BF in the RAM 32 in association with the position of the chip CH.

CPU30は、外光が入射したチップCHの位置である外光チップ位置BNを検出する(R5)。具体的には、CPU30は、各チップCHにおいてチップバラツキBFを閾値THAと比較する。CPU30は、閾値THAよりも大きいチップバラツキBFに関連付けられたチップCHの位置を外光チップ位置BNとして検出する。CPU30は、外光チップ位置BNをRAM32に記憶する。ここで、閾値THAは、60mVに相当する60である。60mVは、チップ内の各画素の黒信号のバラツキである黒信号変動量55mVに所定のマージンを加算した電圧値である。図8に示す本実施形態では、斜線を付したチップCH2、チップCH3、チップCH6、チップCH7、チップCH11〜チップCH14が外光チップ位置BNとして検出された。   The CPU 30 detects the outside light chip position BN which is the position of the chip CH on which the outside light is incident (R5). Specifically, the CPU 30 compares the chip variation BF with the threshold value THA in each chip CH. The CPU 30 detects the position of the chip CH associated with the chip variation BF larger than the threshold value THA as the external light chip position BN. The CPU 30 stores the ambient light chip position BN in the RAM 32. Here, the threshold THA is 60 corresponding to 60 mV. The 60 mV is a voltage value obtained by adding a predetermined margin to the black signal fluctuation amount 55 mV which is the fluctuation of the black signal of each pixel in the chip. In the present embodiment shown in FIG. 8, the shaded chips CH2, CH3, CH6, CH7 and CH11 to CH14 are detected as the external light chip position BN.

CPU30は、全てのチップCHに外光が入射していないか否かを判断する(R6)。具体的には、CPU30は、外光チップ位置BNとしてチップCHの位置が記憶されていないとき、全てのチップCHに外光が入射していないと判断(R6:Yes)し、処理R8へ進む。CPU30は、外光チップ位置BNとしてチップCHの位置が記憶されているとき、チップCHに外光が入射したと判断(R6:No)し、処理R7に進む。   The CPU 30 determines whether ambient light is incident on all the chips CH (R6). Specifically, when the position of the chip CH is not stored as the external light chip position BN, the CPU 30 determines that the external light is not incident on all the chips CH (R6: Yes), and proceeds to processing R8. . When the position of the chip CH is stored as the external light chip position BN, the CPU 30 determines that the external light is incident on the chip CH (R6: No), and proceeds to processing R7.

CPU30は、第2黒データBK2を置換する(R7)。詳細は後述するが、CPU30は、外光チップ位置BNとして記憶されたチップCHに含まれる画素の第2黒データBK2を置換する。外光の入射したチップCHに含まれる画素の第2黒データBK2を置換することで、外光の影響が低減された第2黒データBK2を用いて正確な黒補正をすることができる。   The CPU 30 replaces the second black data BK2 (R7). Although the details will be described later, the CPU 30 replaces the second black data BK2 of the pixels included in the chip CH stored as the external light chip position BN. By replacing the second black data BK2 of the pixel included in the chip CH on which the external light is incident, accurate black correction can be performed using the second black data BK2 in which the influence of the external light is reduced.

CPU30は、光源21の光量STを調整する(R8)。具体的には、CPU30は、基準部材BMに向けて、読取部20の光源21から光を照射させ、その反射光を読み取ったときのアナログ信号がAFE35の入力レンジの最大となるように、各色の光量STを調整する。ここで、各色は、カラーモードで用いられる赤色、青色、および緑色の3色を示す。   The CPU 30 adjusts the light amount ST of the light source 21 (R8). Specifically, the CPU 30 irradiates light from the light source 21 of the reading unit 20 toward the reference member BM, and each color so that the analog signal when reading the reflected light becomes the maximum of the input range of the AFE 35. Adjust the light intensity ST of Here, each color indicates three colors of red, blue and green used in the color mode.

CPU30は、読取部20の白データWHを取得する(R9)。具体的には、CPU30は、光源21の各色の光量STで点灯させ、基準部材BMを読み取る。そして、CPU30は、読み取った1ラインの各色の各画素のデジタル画像データを白データWHとして取得する。CPU30は、取得した白データWHをRAM32に記憶する。   The CPU 30 acquires the white data WH of the reading unit 20 (R9). Specifically, the CPU 30 lights the light amount ST of each color of the light source 21 and reads the reference member BM. Then, the CPU 30 acquires digital image data of each pixel of each color of one line read as white data WH. The CPU 30 stores the acquired white data WH in the RAM 32.

CPU30は、読取部20の白黒差分データWBdifを算出する(R10)。具体的には、CPU30は、1ラインの各色の各画素の白データWHから第2黒データBK2を引算し、1ラインの各色の各画素の白黒差分データWBdifとしてフラッシュROM33に記憶する。   The CPU 30 calculates the black-and-white difference data WBdif of the reading unit 20 (R10). Specifically, the CPU 30 subtracts the second black data BK2 from the white data WH of each pixel of each line of one line, and stores the result in the flash ROM 33 as black-and-white difference data WBdif of each pixel of each color of one line.

CPU30は、原稿を読み取る(R11)。具体的には、CPU30は、各種画像処理を施す設定値を画像処理部36に設定し、第2黒データBK2を黒補正データとして設定し、白黒差分WBdifを白補正データとして設定する。CPU30は、駆動回路37に指令を出力し、駆動回路37により読取部20を移動させ、読取部20の光源21を光量STで照射して原稿を読み取る。この様にして、画像読取装置SMは、処理R7で置換された黒データBK2を用いて黒補正でき、正確な黒補正をすることができる。   The CPU 30 reads a document (R11). Specifically, the CPU 30 sets, in the image processing unit 36, set values for performing various image processing, sets the second black data BK2 as black correction data, and sets the black-and-white difference WBdif as white correction data. The CPU 30 outputs a command to the drive circuit 37, moves the reading unit 20 by the drive circuit 37, irradiates the light source 21 of the reading unit 20 with the light amount ST, and reads the document. In this manner, the image reading apparatus SM can perform black correction using the black data BK2 replaced in the process R7, and can perform accurate black correction.

(第2黒データBK2置換処理R7)
図6に示す第2黒データBK2置換処理(R7)が開始されると、CPU30は、全てのチップCHに外光が入射したか否かを判断する(RA1)。具体的には、CPU30は、外光チップ位置BNとして全てのチップCHの位置が記憶されていないとき、全てのチップCHに外光が入射していないと判断(RA1:No)し、処理RA3へ進む。CPU30は、外光チップ位置BNとして全てのチップCHの位置が記憶されているとき、全てのチップCHに外光が入射したと判断(RA1:Yes)し、処理RA2へ進む。
(Second black data BK2 replacement process R7)
When the second black data BK2 substitution process (R7) shown in FIG. 6 is started, the CPU 30 determines whether or not outside light is incident on all the chips CH (RA1). Specifically, when the positions of all the chips CH are not stored as the outside light chip position BN, the CPU 30 determines that the outside light is not incident on all the chips CH (RA1: No), and the process RA3 Go to When the positions of all the chips CH are stored as the outside light chip position BN, the CPU 30 determines that the outside light is incident on all the chips CH (RA1: Yes), and proceeds to processing RA2.

処理RA1においてYesと判断されると、CPU30は、置換黒データRPBK2を記憶する(RA2)。具体的には、CPU30は、処理M4で取得した1ライン中の各画素の第1黒データBK1を置換黒データRPBKとしてRAM32に記憶する。処理RA2が終了すると、処理RA8へ進む。   If it is determined Yes in the process RA1, the CPU 30 stores the substituted black data RPBK2 (RA2). Specifically, the CPU 30 stores the first black data BK1 of each pixel in one line acquired in the process M4 in the RAM 32 as the substituted black data RPBK. When the process RA2 is completed, the process proceeds to the process RA8.

処理RA1においてNoと判断されると、CPU30は、ライン黒差分LBKdifを算出する(RA3)。具体的には、CPU30は、外光チップ位置BNとして記憶されていないチップCHについてその全てのチップCHに含まれる各画素において第2黒データBK2から第1黒データBK1を引算し、各画素において引算して算出された全ての値を平均してライン黒差分LBKdifを算出する。   If it is determined No in the process RA1, the CPU 30 calculates a line black difference LBKdif (RA3). Specifically, the CPU 30 subtracts the first black data BK1 from the second black data BK2 in each pixel included in all the chips CH not stored as the external light chip position BN, The line black difference LBKdif is calculated by averaging all values calculated by subtraction in.

CPU30は、閾値THBを算出する(RA4)。具体的には、CPU30は、処理M5で算出した1ライン中の各チップCHのチップ保守黒BBK1にライン黒差分LBKdifを加算し、加算した値に100を加算することにより1ライン中の各チップの閾値THBを算出する。ここで、最後に加算した100は、100mVに相当する値である。100mVは、チップ内の各画素の黒信号のバラツキである黒信号変動量55mVに想定される全てのマージンを加算した電圧値である。図9に示す本実施形態では、チップCH2の閾値THBは132であり、チップCH3の閾値THBは152である。閾値THBは以下の様に算出される。チップCH2のチップ保守黒BBK1は25であり、ライン黒差分LBKdifは7である。よって、チップCH2の閾値THBは132である。同様に、チップCH3のチップ保守黒BBK1は45であり、ライン黒差分LBKdifは7であるため、チップCH3の閾値THBは152である。   The CPU 30 calculates a threshold value THB (RA4). Specifically, the CPU 30 adds the line black difference LBKdif to the chip maintenance black BBK1 of each chip CH in one line calculated in the process M5, and adds 100 to the added value to add each chip in one line. The threshold THB of is calculated. Here, 100 finally added is a value corresponding to 100 mV. The 100 mV is a voltage value obtained by adding all the margins assumed to the black signal fluctuation amount 55 mV which is the fluctuation of the black signal of each pixel in the chip. In the present embodiment shown in FIG. 9, the threshold value THB of the chip CH2 is 132, and the threshold value THB of the chip CH3 is 152. The threshold value THB is calculated as follows. The chip maintenance black BBK1 of the chip CH2 is 25, and the line black difference LBKdif is 7. Therefore, the threshold THB of the chip CH2 is 132. Similarly, since the chip maintenance black BBK1 of the chip CH3 is 45 and the line black difference LBKdif is 7, the threshold THB of the chip CH3 is 152.

CPU30は、連続チップLCBを検出する(RA5)。具体的には、CPU30は、外光チップ位置BNとして記憶されている先頭画素側にある最初のチップCHを第1連続チップLCB1として検出する。CPU30は、第1連続チップLCB1に最終画素側へ隣接するチップCHを第1連続チップLCB1として検出し続け、外光チップ位置BNとして記憶されていないチップCHの直前のチップCHまでを第1連続チップLCB1として検出する。図8に示す本実施例では、外光チップ位置BNに記憶されている先頭画素側にある最初のチップCHであるチップCH2が第1連続チップLCB1として検出される。チップCH2の最終画素側へ隣接する次のチップCHであるチップCH3が外光チップ位置BNとして記憶されているため、チップCH3が第1連続チップLCB1として検出される。チップCH3の最終画素側へ隣接する次のチップCHであるチップCH4が外光チップ位置BNとして記憶されていないため、チップCH2からチップCH3までが第1連続チップLCB1として検出される。   The CPU 30 detects the continuous chip LCB (RA5). Specifically, the CPU 30 detects the first chip CH on the head pixel side stored as the external light chip position BN as the first continuous chip LCB1. The CPU 30 continues detecting the chip CH adjacent to the final pixel side in the first continuous chip LCB1 as the first continuous chip LCB1, and continues to the first chip CH immediately before the chip CH not stored as the external light chip position BN. It detects as chip LCB1. In the present embodiment shown in FIG. 8, the chip CH2, which is the first chip CH on the head pixel side stored in the external light chip position BN, is detected as the first continuous chip LCB1. Since the chip CH3 which is the next chip CH adjacent to the final pixel side of the chip CH2 is stored as the external light chip position BN, the chip CH3 is detected as the first continuous chip LCB1. Since the chip CH4, which is the next chip CH adjacent to the final pixel side of the chip CH3, is not stored as the external light chip position BN, the chips CH2 to CH3 are detected as the first continuous chip LCB1.

CPU30は、外光チップ位置BNとして記憶されているチップCHのうち第1連続チップLCB1として検出されたチップCH以外で先頭画素側にある最初のチップCHを第2連続チップLCB2として検出する。CPU30は、第2連続チップLCB2に最終画素側へ隣接するチップCHを第2連続チップLCB2として検出し続け、外光チップ位置BNとして記憶されていないチップCHの直前のチップCHまでを第2連続チップLCB2として検出する。図8に示す本実施例では、第1連続チップLCB1と同様に、チップCH6からチップCH7までが第2連続チップLCB2として検出される。   The CPU 30 detects, among the chips CH stored as the external light chip position BN, the first chip CH on the head pixel side other than the chip CH detected as the first continuous chip LCB1 as the second continuous chip LCB2. The CPU 30 continues to detect the chip CH adjacent to the final pixel side in the second continuous chip LCB2 as the second continuous chip LCB2, and continues to the second chip up to the chip CH immediately before the chip CH not stored as the external light chip position BN. It detects as chip LCB2. In the present embodiment shown in FIG. 8, the chips CH6 to CH7 are detected as the second continuous chip LCB2 similarly to the first continuous chip LCB1.

CPU30は、外光チップ位置BNとして記憶されているチップCHのうち第1連続チップLCB1および第2連続チップLCB2として検出されたチップCH以外で先頭画素側にある最初のチップCHを第3連続チップLCB3として検出する。CPU30は、第3連続チップLCB3に最終画素側へ隣接するチップCHを第3連続チップとして検出し続け、外光チップ位置BNとして記憶されていないチップCHの直前のチップCHまでを第3連続チップLCB3として検出する。図8に示す本実施例では、外光チップ位置BNに記憶されているチップCHのうち第1連続チップLCB1および第2連続チップとして検出されたチップ以外の先頭画素側にある最初のチップCHであるチップCH11が第3連続チップLCB1として検出される。チップCH11の最終画素側へ隣接する次のチップCHであるチップCH12が外光チップ位置BNとして記憶されているため、チップCH12が第3連続チップLCB3として検出される。同様に、チップCH13およびチップCH14が第3連続チップLCB3として検出される。チップCH14の最終画素側へ隣接する次のチップCHであるチップCH15が外光チップ位置BNに記憶されていないため、チップCH11からチップCH14までが第3連続チップLCB3として検出される。この様にして、CPU30は、第3連続チップLCB3よりも最終画素側に外光チップ位置BNとして記憶されているチップCHがある場合には第4連続チップLCB4として順に検出し、最終チップであるチップCH16までを順に連続チップLCBとして検出する。   The CPU 30 sets the first chip CH on the head pixel side to the third continuous chip other than the chips CH detected as the first continuous chip LCB1 and the second continuous chip LCB2 among the chips CH stored as the external light chip position BN. Detect as LCB3. The CPU 30 continues to detect the chip CH adjacent to the final pixel side in the third continuous chip LCB3 as the third continuous chip, and continues to the third chip until the chip CH immediately before the chip CH not stored as the external light chip position BN. Detect as LCB3. In the present embodiment shown in FIG. 8, among the chips CH stored in the external light chip position BN, the first chip CH on the leading pixel side other than the chips detected as the first continuous chip LCB1 and the second continuous chip. A certain chip CH11 is detected as a third continuous chip LCB1. Since the chip CH12 which is the next chip CH adjacent to the final pixel side of the chip CH11 is stored as the external light chip position BN, the chip CH12 is detected as the third continuous chip LCB3. Similarly, the chip CH13 and the chip CH14 are detected as the third continuous chip LCB3. Since the chip CH15 which is the next chip CH adjacent to the final pixel side of the chip CH14 is not stored in the external light chip position BN, the chips CH11 to CH14 are detected as the third continuous chip LCB3. In this manner, when there is a chip CH stored as the external light chip position BN on the final pixel side of the third continuous chip LCB3 as described above, the CPU 30 sequentially detects as the fourth continuous chip LCB4 and is the final chip. The chips up to the chip CH16 are sequentially detected as a continuous chip LCB.

CPU30は、開始詳細チップSCBおよび終了詳細チップECBを決定する(RA6)。具体的には、CPU30は、各連続チップLCBにおいて先頭画素側にある最初のチップCHを開始詳細チップSCBとして決定し、1ラインの最終画素側にある最後のチップCHを終了詳細チップECBとして決定する。図8に示す本実施形態では、第1連続チップLCB1において先頭画素側にある最初のチップCHであるチップCH2が開始詳細チップSCBとして決定され、1ラインの最終画素側にある最後のチップCHであるチップCH3が終了詳細チップECBとして決定される。同様に、第2連続チップLCB2の開始詳細チップSCBはチップCH6に決定され、終了詳細チップECBはチップCH7に決定される。第3連続チップLCB3の開始詳細チップSCBはチップCH11に決定され、終了詳細チップECBはチップCH14に決定される。   The CPU 30 determines the start detail chip SCB and the end detail chip ECB (RA6). Specifically, the CPU 30 determines the first chip CH on the top pixel side in each successive chip LCB as the start detail chip SCB, and determines the last chip CH on the last pixel side of one line as the end detail chip ECB. Do. In the present embodiment shown in FIG. 8, the chip CH2, which is the first chip CH on the head pixel side in the first consecutive chip LCB1, is determined as the start detail chip SCB, and the last chip CH on the last pixel side of one line is selected. One chip CH3 is determined as the end detail chip ECB. Similarly, the start detail chip SCB of the second consecutive chip LCB2 is determined to be the chip CH6, and the end detail chip ECB is determined to be the chip CH7. The start detail chip SCB of the third consecutive chip LCB3 is determined to be the chip CH11, and the end detail chip ECB is determined to the chip CH14.

CPU30は、置換黒データRPBKを算出する(RA7)。詳細は後述するが、CPU30は、各連続チップLCBにおいて外光の入射が開始した画素の位置である開始画素位置SCPと外光の入射が終了した画素の位置である終了画素位置ECPとを決定する。CPU30は、各連続チップLCBの開始詳細チップSCBにおいて開始詳細チップSCBの先端画素から開始画素位置SCPの直前の画素までの第2黒データBK2を平均して開始詳細チップSCBの置換黒データRPBKを算出する。CPU30は、各連続チップLCBの終了詳細チップECBにおいて終了画素位置ECPの直後の画素から末端画素までの第2黒データBK2を平均して終了詳細チップECBの置換黒データRPBKを算出する。CPU30は、外光チップ位置BNとして記憶されていない全てのチップCHに含まれる全ての画素の第2黒データBK2を平均して開始詳細チップSCBおよび終了詳細チップECB以外のチップCHの置換黒データRPBKとして算出する。ここで、先端画素は各チップの先頭画素側にある主走査方向の最上流にある画素であり、末端画素は各チップの最終画素側にある主走査方向の最下流にある画素である。   The CPU 30 calculates replacement black data RPBK (RA7). Although details will be described later, the CPU 30 determines the start pixel position SCP which is the position of the pixel at which the incident of external light has started in each successive chip LCB and the end pixel position ECP which is the position of the pixel at which the incident of external light is completed. Do. The CPU 30 averages the second black data BK2 from the tip pixel of the start detail chip SCB to the pixel immediately before the start pixel position SCP in the start detail chip SCB of each successive chip LCB and substitutes the black data RPBK for the start detail chip SCB. calculate. The CPU 30 calculates second black data RPBK of the end detail chip ECB by averaging the second black data BK2 from the pixel immediately after the end pixel position ECP to the end pixel in the end detail chip ECB of each successive chip LCB. The CPU 30 averages the second black data BK2 of all the pixels included in all the chips CH not stored as the external light chip position BN, and substitutes the black data of the chips CH other than the start detail chip SCB and the end detail chip ECB. Calculated as RPBK. Here, the front end pixel is a pixel located on the most upstream side in the main scanning direction on the leading pixel side of each chip, and the end pixel is a pixel located on the most downstream side in the main scanning direction located on the final pixel side of each chip.

CPU30は、第2黒データBK2を置き換える(RA8)。具体的には、CPU30は、処理RA7において置換黒データRPBKが算出されたときは、各連続チップLCBにおいて、開始画素位置SCPから終了画素位置ECPまでの画素の第2黒データBK2を置換黒データRPBKに置き換える。言い換えると、CPU30は、各連続チップLCBにおいて開始詳細チップSCBに含まれる開始画素位置SCPから終了画素位置ECPまでの画素の第2黒データBK2を処理RB3で算出した置換黒データRPBKで置き換え、終了詳細チップECBに含まれる開始画素位置SCPから終了画素位置ECPまでの画素の第2黒データBK2を処理RB5で算出した置換黒データRPBKで置き換え、開始詳細チップSCBおよび終了詳細チップECB以外のチップCHに含まれる開始画素位置SCPから終了画素位置ECPまでの画素の第2黒データBK2を処理RB7で算出した置換黒データRPBKに置き換える。開始詳細チップSCBと終了詳細チップECBとが同一のチップCHの場合は、CPU30は、開始画素位置SCPから終了画素位置ECPまでの画素の第2黒データBK2を処理RB3で算出した置換黒データRPBKで置き換える。CPU30は、処理RA2において置換黒データRPBKが記憶されたときは、1ライン中の各画素の第2黒データBK2を処理RA1で記憶された置換黒データRPBKに置き換える。CPU30は、置き換えた1ライン中の各画素の第2黒データBK2をフラッシュROM33に記憶する。処理RA8が終了すると、第2黒データBK2置換処理(R7)は終了する。   The CPU 30 replaces the second black data BK2 (RA8). Specifically, when the replacement black data RPBK is calculated in process RA7, the CPU 30 replaces the second black data BK2 of the pixels from the start pixel position SCP to the end pixel position ECP in each successive chip LCB. Replace with RPBK. In other words, the CPU 30 replaces the second black data BK2 of the pixels from the start pixel position SCP to the end pixel position ECP included in the start detail chip SCB in each successive chip LCB with the replacement black data RPBK calculated in processing RB3, and ends The second black data BK2 of the pixels from the start pixel position SCP to the end pixel position ECP included in the detail chip ECB is replaced with the replacement black data RPBK calculated in the processing RB5, and the chips CH other than the start detail chip SCB and the end detail chip ECB The second black data BK2 of the pixels from the start pixel position SCP to the end pixel position ECP included in are replaced with the substituted black data RPBK calculated in processing RB7. When the start detail chip SCB and the end detail chip ECB are the same chip CH, the CPU 30 substitutes the second black data BK2 of the pixels from the start pixel position SCP to the end pixel position ECP in processing RB3. Replace with When the replacement black data RPBK is stored in the process RA2, the CPU 30 replaces the second black data BK2 of each pixel in one line with the replacement black data RPBK stored in the process RA1. The CPU 30 stores, in the flash ROM 33, the second black data BK2 of each pixel in one replaced line. When the process RA8 ends, the second black data BK2 substitution process (R7) ends.

(置換黒データRPBK算出)
図7に示す置換黒データRPBK算出処理(RA7)が開始されると、CPU30は、対象連続チップTLCBを設定する(RB1)。具体的には、CPU30は、対象連続チップTLCBが設定されていれば、最終画素側にある次の連続チップLCBを対象連続チップTLCBとして設定し、対象連続チップTLCBが設定されていなければ、第1連続チップLCB1を対象連続チップTLCBとして設定する。
(Replacement black data RPBK calculation)
When the replacement black data RPBK calculation process (RA7) shown in FIG. 7 is started, the CPU 30 sets a target continuous chip TLCB (RB1). Specifically, if the target continuous chip TLCB is set, the CPU 30 sets the next continuous chip LCB on the final pixel side as the target continuous chip TLCB, and if the target continuous chip TLCB is not set, 1) The continuous chip LCB1 is set as a target continuous chip TLCB.

CPU30は、開始画素位置SCPを決定する(RB2)。具体的には、CPU30は、対象連続チップTLCBの開始詳細チップSCBの先端画素から同一チップCHの末端画素へ順に第2黒データBK2が閾値THBよりも大きいか否かを判断する。CPU30は、第2黒データBK2が閾値THBよりも大きいと最初に判断した画素の画素位置を開始画素位置SCPとして決定する。開始画素位置SCPは、対象連続チップTLCBにおいて外光が入射したと推定される先端画素側の最初の画素位置である。図9を用いて本実施形態における第1連続チップLCB1の開始画素位置SCPの決定について説明する。第1連続チップLCB1の開始詳細チップSCBであるチップCH2の閾値THBは132である。チップCH2の先端画素から末端画素へ順に第2黒データBK2が132よりも大きいか否かが判断される。647画素目の画素の第2黒データBK2である420が閾値THBである132よりも大きいと最初に判断されるため、647画素目の画素の画素位置が開始画素位置SCPとして決定される。   The CPU 30 determines the start pixel position SCP (RB2). Specifically, the CPU 30 determines whether the second black data BK2 is larger than the threshold value THB in order from the tip pixel of the start detail chip SCB of the target continuous chip TLCB to the end pixel of the same chip CH. The CPU 30 determines, as the start pixel position SCP, the pixel position of the pixel that is first determined that the second black data BK2 is larger than the threshold value THB. The start pixel position SCP is the first pixel position on the tip pixel side where external light is estimated to be incident on the target consecutive chip TLCB. The determination of the start pixel position SCP of the first continuous chip LCB1 in the present embodiment will be described with reference to FIG. The threshold THB of the chip CH2, which is the start detail chip SCB of the first continuous chip LCB1, is 132. It is determined whether the second black data BK2 is larger than 132 in order from the tip pixel to the end pixel of the chip CH2. Since it is first determined that 420 which is the second black data BK2 of the pixel of the 647th pixel is larger than 132 which is the threshold value THB, the pixel position of the pixel of the 647th pixel is determined as the start pixel position SCP.

CPU30は、対象連続チップTLCBの開始詳細チップSCBの置換黒データRPBKを算出する(RB3)。具体的には、CPU30は、対象連続チップTLCBの先端画素から開始画素位置SCPの直前の画素までの第2黒データBK2の平均値を算出し、その平均値を対象連続チップTLCBの開始詳細チップSCBの置換黒データRPBKとして算出する。対象連続チップTLCBの先端画素から開始画素位置SCPの画素までの画素の数が1つの場合は、対象連続チップTLCBの先端画素の第2黒データBK2を対象連続チップTLCBの開始詳細チップSCBの置換黒データRPBKとする。   The CPU 30 calculates replacement black data RPBK of the start details chip SCB of the target continuous chip TLCB (RB3). Specifically, the CPU 30 calculates the average value of the second black data BK2 from the tip pixel of the target continuous chip TLCB to the pixel immediately before the start pixel position SCP, and the average value is used as the start detail chip of the target continuous chip TLCB. Calculated as SCB replacement black data RPBK. When the number of pixels from the tip pixel of the target continuous chip TLCB to the pixel at the start pixel position SCP is one, replacement of the second black data BK2 of the tip pixel of the target continuous chip TLCB with the start detail chip SCB of the target continuous chip TLCB It is assumed that black data RPBK.

CPU30は、終了画素位置ECPを決定する(RB4)。具体的には、CPU30は、対象連続チップTLCBの終了詳細チップECBの末端画素から同一チップCHの先端画素へ順に第2黒データBK2が閾値THBよりも大きいか否かを判断する。CPU30は、第2黒データBK2が閾値THBよりも大きいと最初に判断した画素位置を終了画素位置ECPとして決定する。終了画素位置ECPは、対象連続チップTLCBにおいて外光が入射したと推定される末端画素側の最初の画素位置である。図9を用いて本実施形態における第1連続チップLCB1の終了画素位置ECPの決定について説明する。第1連続チップLCB1の終了詳細チップECBであるチップCH3の閾値THBは152である。チップCH3の末端画素から先端画素へ順に第2黒データBK2が152よりも大きいか否かが判断される。969画素目の画素の第2黒データBK2である520が閾値THBである152よりも大きいと最初に判断されるため、969画素目の画素の画素位置が終了画素位置ECPとして決定される。   The CPU 30 determines an end pixel position ECP (RB4). Specifically, the CPU 30 determines whether the second black data BK2 is larger than the threshold value THB in order from the end pixel of the end detail chip ECB of the target continuous chip TLCB to the tip pixel of the same chip CH. The CPU 30 determines, as the end pixel position ECP, the pixel position that is first determined that the second black data BK2 is larger than the threshold value THB. The end pixel position ECP is the first pixel position on the terminal pixel side where external light is estimated to be incident on the target consecutive chip TLCB. The determination of the end pixel position ECP of the first continuous chip LCB1 in the present embodiment will be described with reference to FIG. The threshold value THB of the chip CH3, which is the end detail chip ECB of the first continuous chip LCB1, is 152. It is determined whether the second black data BK2 is larger than 152 in order from the end pixel to the end pixel of the chip CH3. Since it is first determined that the second black data BK2 520 of the 969th pixel is larger than the threshold value THB 152, the pixel position of the 969th pixel is determined as the end pixel position ECP.

CPU30は、対象連続チップTLCBの終了詳細チップECBの置換黒データRPBKを算出する(RB5)。具体的には、CPU30は、対象連続チップTLCBの末端画素から終了画素位置ECPの直後の画素までの第2黒データBK2の平均値を算出し、その平均値を対象連続チップTLCBの終了詳細チップECBの置換黒データRPBKとして算出する。対象連続チップTLCBの末端画素から終了画素位置ECPの画素までの画素の数が1つの場合は、対象連続チップTLCBの末端画素の第2黒データBK2を対象連続チップTLCBの終了詳細チップECBの置換黒データRPBKとする。   The CPU 30 calculates replacement black data RPBK of the end details chip ECB of the target continuous chip TLCB (RB5). Specifically, the CPU 30 calculates the average value of the second black data BK2 from the end pixel of the target continuous chip TLCB to the pixel immediately after the end pixel position ECP, and the average value is used as the end detail chip of the target continuous chip TLCB. Calculated as substituted black data RPBK of ECB. When the number of pixels from the end pixel of the target continuous chip TLCB to the pixel at the end pixel position ECP is one, the second black data BK2 of the end pixel of the target continuous chip TLCB is replaced with the end detail chip ECB of the target continuous chip TLCB. It is assumed that black data RPBK.

CPU30は、対象連続チップTLCBの次の連続チップLCBが存在するか否かを判断する(RB6)。具体的には、CPU30は、連続チップLCBが対象連続チップTLCBから最終画素側の位置に存在しないとき、次の連続チップLCBが存在しないと判断(RB6:No)し、対象連続チップTLCBの設定を削除し、処理RB7へ進む。CPU30は、連続チップLCBが対象連続チップTLCBから最終画素側の位置に存在するとき、次の連続チップLCBが存在すると判断(RB6:Yes)し、処理RB1へ進む。   The CPU 30 determines whether or not the next continuous chip LCB next to the target continuous chip TLCB is present (RB6). Specifically, when the continuous chip LCB does not exist at the position on the final pixel side from the target continuous chip TLCB, the CPU 30 determines that the next continuous chip LCB does not exist (RB6: No), and sets the target continuous chip TLCB. Is deleted, and the process proceeds to processing RB7. When the continuous chip LCB is present at a position on the final pixel side from the target continuous chip TLCB, the CPU 30 determines that the next continuous chip LCB is present (RB6: Yes), and proceeds to processing RB1.

CPU30は、開始詳細チップSCBおよび終了詳細チップECB以外のチップCHの置換黒データRPBKを算出する(RB7)。具体的には、CPU30は、1ライン中の各画素において第2黒データBK2にライン黒差分LBKdifを加算することにより開始詳細チップSCBおよび終了詳細チップECB以外のチップCHの置換黒データRPBKとして算出する。処理RB7が終了すると、置換黒データRPBK算出処理(RA7)が終了する。   The CPU 30 calculates replacement black data RPBK of the chips CH other than the start detail chip SCB and the end detail chip ECB (RB7). Specifically, the CPU 30 calculates the substitution black data RPBK of the chip CH other than the start detail chip SCB and the end detail chip ECB by adding the line black difference LBKdif to the second black data BK2 in each pixel in one line. Do. When the process RB7 ends, the replacement black data RPBK calculation process (RA7) ends.

<実施形態の効果>
本実施形態では、保守メイン処理の処理M4は、処理M2においてカバー閉状態と判断された後に、1ライン中の各画素の第1黒データBK1を取得する。読取メイン処理の処理R2は、1ライン中の各画素の第2黒データBK2を取得する。処理R5は、各チップCHにおいてチップバラツキBFを閾値THAと比較し、閾値THAよりも大きいチップバラツキBFに関連付けられたチップCHの位置を外光チップ位置BNとして検出する。置換黒データRPBK算出RA7の処理RB2は、対象連続チップTLCBの開始詳細チップSCBの先端画素から同一チップCHの末端画素へ順に第2黒データBK2が閾値THBよりも大きいか否かを判断し、第2黒データBK2が閾値THBよりも大きいと最初に判断した画素の画素位置を開始画素位置SCPとして決定する。処理RB5は、対象連続チップTLCBの終了詳細チップECBの末端画素から同一チップCHの先端画素へ順に第2黒データBK2が閾値THBよりも大きいか否かを判断し、第2黒データBK2が閾値THBよりも大きいと最初に判断した画素の画素位置を終了画素位置ECPとして決定する。第2黒データBK2置換R7の処理RA3は、外光チップ位置BNに記憶されていない全てのチップCHに含まれる各画素において第2黒データBK2から第1黒データBK1を引算し、各画素において引算して算出された全ての値を平均してライン黒差分LBKdifとして算出する。置換黒データRPBK算出RA7の処理RB3は、対象連続チップTLCBの先端画素から開始画素位置SCPの直前の画素までの第2黒データBK2の平均値を算出し、その平均値を対象連続チップTLCBの開始詳細チップSCBの置換黒データRPBKとして算出する。処理RB5は、対象連続チップTLCBの末端画素から終了画素位置ECPの直後の画素までの第2黒データBK2の平均値を算出し、その平均値を対象連続チップTLCBの終了詳細チップECBの置換黒データRPBKとして算出する。処理RB7は、1ライン中の各画素において第2黒データBK2にライン黒差分LBKdifを加算することにより開始詳細チップSCBおよび終了詳細チップECB以外のチップCHの置換黒データRPBKとして算出する。第2黒データBK2置換R7の処理RA8は、各連続チップLCBにおいて、開始画素位置SCPから終了画素位置ECPまでの画素の第2黒データBK2を置換黒データRPBKに置き換える。よって、置換黒データRPBKを外光の入射していない第2黒データBK2を用いて算出しているため、より精度の高い置換黒データRPBKを算出することができ、精度の高い黒補正をすることができる。
<Effect of the embodiment>
In the present embodiment, after the process M4 of the maintenance main process determines that the cover is closed in the process M2, the first black data BK1 of each pixel in one line is acquired. The process R2 of the reading main process acquires the second black data BK2 of each pixel in one line. The process R5 compares the chip variation BF with the threshold THA in each chip CH, and detects the position of the chip CH associated with the chip variation BF larger than the threshold THA as the external light chip position BN. The processing RB2 of the substituted black data RPBK calculation RA7 determines whether the second black data BK2 is sequentially larger than the threshold THB from the tip pixel of the start detail chip SCB of the target consecutive chip TLCB to the end pixel of the same chip CH, The pixel position of the pixel initially determined to be larger than the threshold value THB is determined as the start pixel position SCP. The processing RB5 determines whether the second black data BK2 is larger than the threshold value THB in order from the end pixel of the end detail chip ECB of the target continuous chip TLCB to the tip pixel of the same chip CH, and the second black data BK2 is a threshold value. The pixel position of the pixel initially determined to be larger than THB is determined as the end pixel position ECP. The process RA3 of the second black data BK2 replacement R7 subtracts the first black data BK1 from the second black data BK2 in each pixel included in all the chips CH not stored at the external light chip position BN, The line black difference LBKdif is calculated by averaging all the values calculated by subtraction in. The processing RB3 of the substituted black data RPBK calculation RA7 calculates the average value of the second black data BK2 from the tip pixel of the target continuous chip TLCB to the pixel immediately before the start pixel position SCP, and the average value is calculated for the target continuous chip TLCB. It is calculated as replacement black data RPBK of the start detail chip SCB. The processing RB5 calculates the average value of the second black data BK2 from the end pixel of the target continuous chip TLCB to the pixel immediately after the end pixel position ECP, and the average value is used as the end detail chip ECB for the target continuous chip TLCB. Calculated as data RPBK. The process RB7 adds the line black difference LBKdif to the second black data BK2 in each pixel in one line to calculate replacement black data RPBK of the chip CH other than the start detail chip SCB and the end detail chip ECB. The process RA8 of the second black data BK2 replacement R7 replaces the second black data BK2 of the pixels from the start pixel position SCP to the end pixel position ECP with the substituted black data RPBK in each successive chip LCB. Therefore, since the substituted black data RPBK is calculated using the second black data BK2 on which no external light is incident, the substituted black data RPBK can be calculated with higher accuracy, and black correction with high accuracy is performed. be able to.

[実施形態と発明との対応関係]
画像読取装置SM、およびカバーCVが、本発明の画像読取装置、およびカバーの一例である。読取部20、およびAFE35が、本発明の読取部の一例である。画像処理部36、およびCPU30が、本発明の補正部、および制御部の一例である。処理M4が、本発明の第1黒データ取得処理の一例である。処理R2が、本発明の第2黒データ取得処理の一例である。処理R4、処理R5、処理RA5、処理RA6、処理RB2、および処理RB4が、本発明の判断処理の一例である。処理RA3が、本発明の調整データ算出処理の一例である。処理RB3、処理RB5、および処理RB7が、本発明の第3黒データ算出処理の一例である。処理RA8が、本発明の補正データ決定処理の一例である。処理R11が、本発明の読取処理の一例である。
[Correspondence between embodiment and invention]
The image reading device SM and the cover CV are an example of the image reading device and the cover of the present invention. The reading unit 20 and the AFE 35 are an example of the reading unit of the present invention. The image processing unit 36 and the CPU 30 are an example of the correction unit and the control unit of the present invention. The process M4 is an example of the first black data acquisition process of the present invention. Process R2 is an example of the second black data acquisition process of the present invention. The process R4, the process R5, the process RA5, the process RA6, the process RB2, and the process RB4 are an example of the determination process of the present invention. Process RA3 is an example of the adjustment data calculation process of the present invention. The processing RB3, the processing RB5, and the processing RB7 are an example of the third black data calculation processing of the present invention. Process RA8 is an example of the correction data determination process of the present invention. Process R11 is an example of the reading process of the present invention.

処理R5が、本発明の第1判断処理の一例である。処理RB2、および処理RB4が、本発明の第2判断処理の一例である。処理RA5が、本発明の連続グループ群決定処理の一例である。処理RA6が、本発明の詳細グループ決定処理の一例である。処理M5が、本発明の平均処理の一例である。処理RA4が、本発明の第2閾値算出処理の一例である。   Process R5 is an example of the first determination process of the present invention. Process RB2 and process RB4 are examples of the 2nd judgment process of this invention. Process RA5 is an example of the continuous group determination process of the present invention. Process RA6 is an example of the detailed group determination process of the present invention. The process M5 is an example of the averaging process of the present invention. Process RA4 is an example of the second threshold value calculation process of the present invention.

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

(1)本実施形態の画像読取装置SMは、プリンタ部を備えた複合機に適用されても良い。本実施形態では、読取部20が1つの場合について説明したが、読取部20が複数の場合でも良い。   (1) The image reading apparatus SM of the present embodiment may be applied to a multifunction peripheral provided with a printer unit. In the present embodiment, the case of one reading unit 20 has been described, but a plurality of reading units 20 may be used.

(2)本実施形態では、図4に示す保守メイン処理、および図5に示す読取メイン処理の全てがCPU30によって実行される構成であるが、この構成に限定されない。例えば、保守メイン処理のM3〜M5の一部、および読取メイン処理のR4〜R7、R10の一部が画像処理部36、デバイス制御部34、またはAFE35により実行されても良い。また、保守メイン処理が、画像読取装置SMから独立した外部装置、たとえばコンピュータなどで実行される構成でも良い。   (2) In the present embodiment, the maintenance main process shown in FIG. 4 and the reading main process shown in FIG. 5 are all executed by the CPU 30, but the present invention is not limited to this configuration. For example, a part of M3 to M5 of the maintenance main process and a part of R4 to R7 and R10 of the reading main process may be executed by the image processing unit 36, the device control unit 34, or the AFE 35. Further, the maintenance main process may be executed by an external device independent of the image reading apparatus SM, such as a computer.

(3)本実施形態では、受光部22が16個のチップCH1〜チップCH16により構成されている場合を説明したが、16個より少ない数のチップCHでも良いし、16個より多い数のチップCHでも良い。   (3) In the present embodiment, although the case where the light receiving unit 22 is configured by 16 chips CH1 to CH16 has been described, the number of chips CH less than 16 may be used, or more than 16 chips may be used. It may be CH.

(4)本実施形態では、受光部22が1ラインの光電変換素子23で構成される場合について説明したが、複数ラインの光電変換素子23で構成される場合でも良い。   (4) In the present embodiment, although the case where the light receiving unit 22 is configured by the photoelectric conversion element 23 of one line is described, the light receiving unit 22 may be configured by the photoelectric conversion element 23 of multiple lines.

(5)本実施形態では、第2黒データBKのチップバラツキBFを算出し、チップCH毎に外光の入射を判断した後に、第2黒データBKを閾値THBと比較して画素毎に外光の入射を判断したが、全ての画素に対して第2黒データBKと閾値THBとを比較して外光の入射を判断しても良いし、第2黒データBKと白データWHとを比較して外光の入射を判断しても良い。   (5) In the present embodiment, after the chip variation BF of the second black data BK is calculated and the incident of the external light is determined for each chip CH, the second black data BK is compared with the threshold value THB to determine the outside for each pixel. Although the incidence of light was determined, the incidence of ambient light may be determined by comparing the second black data BK with the threshold value THB for all pixels, or the second black data BK and the white data WH The incidence of ambient light may be determined by comparison.

(6)本実施形態では、処理RB7の置換黒データRPBKの算出において、第2黒データにライン黒差分LBKdifを加算して置換黒データRPBKを算出したが、第2黒データBK2を第1黒データBK1で割算してライン黒差分LBKdifに相当する値を算出した後に、割算した値を第1黒データBK1に掛算することで置換黒データRPBKを算出しても良い。   (6) In the present embodiment, in the calculation of the replacement black data RPBK of the processing RB7, the line black difference LBKdif is added to the second black data to calculate the replacement black data RPBK, but the second black data BK2 is calculated as the first black After calculating a value corresponding to the line black difference LBKdif by dividing by the data BK1, the substituted black data RPBK may be calculated by multiplying the first black data BK1 by the divided value.

SM…画像読取装置、OM…操作機構、CV…カバー、20…読取部、21…光源、22…受光部、23…光電変換素子、30…CPU、33…フラッシュROM、34…デバイス制御部、35…AFE、36…画像処理部、27…カバーセンサ、37…駆動回路 SM: image reader, OM: operation mechanism, CV: cover, 20: reading unit, 21: light source, 22: light receiving unit, 23: photoelectric conversion element, 30: CPU, 33: flash ROM, 34: device control unit, 35 ... AFE, 36 ... image processing unit, 27 ... cover sensor, 37 ... drive circuit

Claims (5)

光源と1ラインに並んだ多数の受光素子とを有し、前記光源を点灯して読み取る読取部と、
前記読取部を覆う閉状態と前記読取部を開放する開状態とに開閉可能なカバーと、
補正データに基づいて前記読取部が読み取った値を黒補正する補正部と、
準備処理を実行し、前記準備処理を実行した後に実行処理を実行する制御部と、を備え、
前記準備処理は、
前記カバーが閉状態で、前記光源を消灯して前記読取部により読み取ることによって前記複数の受光素子の各受光素子の第1黒データを取得する第1黒データ取得処理を含み、
前記実行処理は、
前記カバーが開状態で、前記光源を消灯して前記読取部により読み取ることによって前記各受光素子の第2黒データを取得する第2黒データ取得処理と、
前記第2黒データに基づいて外光が前記各受光素子に入射したか否かを判断する判断処理と、
外光が入射していないと判断された各受光素子において前記第2黒データと前記第1黒データとに基づいて黒調整データを算出する調整データ算出処理と、
外光が入射したと判断された各受光素子において前記第1黒データと前記黒調整データとに基づいて第3黒データを算出する第3黒データ算出処理と、
前記外光が入射したと判断された各受光素子において前記第3黒データを前記補正データとして決定し、外光が入射していないと判断された各受光素子において前記第2黒データを前記補正データとして決定する補正データ決定処理と、
原稿の画像を読み取らせ、前記補正データに基づいて黒補正させる読取処理と、を含むことを特徴とする画像読取装置。
A reading unit having a light source and a large number of light receiving elements arranged in one line, and lighting the light source to read it;
A cover that can be opened and closed in a closed state covering the reading unit and an open state opening the reading unit;
A correction unit that performs black correction on the value read by the reading unit based on the correction data;
A control unit that executes preparation processing and then executes the preparation processing;
The preparation process is
And a first black data acquisition process of acquiring first black data of each light receiving element of the plurality of light receiving elements by turning off the light source and reading by the reading unit with the cover closed.
The execution process is
Second black data acquisition processing for acquiring second black data of each of the light receiving elements by turning off the light source and reading by the reading unit with the cover in an open state;
A determination process of determining whether external light is incident on each of the light receiving elements based on the second black data;
Adjustment data calculation processing in which black adjustment data is calculated based on the second black data and the first black data in each light receiving element determined that external light is not incident;
Third black data calculation processing for calculating third black data based on the first black data and the black adjustment data in each of the light receiving elements determined to be exposed to external light;
The third black data is determined as the correction data in each of the light receiving elements determined that the outside light is incident, and the second black data is corrected in each of the light receiving elements determined that the outside light is not incident Correction data determination processing determined as data;
An image reading apparatus comprising a reading process for reading an image of a document and performing black correction based on the correction data.
前記読取部の前記多数の受光素子が複数のグループに区分けされており、
前記判断処理は、
前記複数のグループの各グループにおいて、外光が入射したグループを外光有りグループと判断し、外光が入射していないグループを外光無しグループと判断する第1判断処理と、
前記外光有りグループの各受光素子において外光が入射した受光素子を外光有り画素として判断する第2判断処理と、を含み、
前記調整データ算出処理は、前記外光無しグループの全ての受光素子において前記第2黒データから前記第1黒データを引算し、前記各受光素子において引算して算出された全ての値を平均して前記黒調整データを算出し、
前記第3黒データ算出処理は、前記第1黒データに前記黒調整データを加算して前記第3黒データを算出することを特徴とする請求項1に記載の画像読取装置。
The multiple light receiving elements of the reading unit are divided into a plurality of groups,
The determination process is
A first determination process of determining a group into which external light is incident as an external light presence group in each of the plurality of groups, and determining a group into which external light is not incident as an external light non-existence group;
A second determination process of determining the light receiving element on which the outside light is incident in each light receiving element of the outside light present group as an outside light present pixel,
In the adjustment data calculation process, the first black data is subtracted from the second black data in all the light receiving elements of the non-external light group, and all the values calculated by subtracting in the respective light receiving elements are calculated. Calculate the black adjustment data on average
The image reading apparatus according to claim 1, wherein the third black data calculation process calculates the third black data by adding the black adjustment data to the first black data.
前記複数のグループの各グループは同一の出力特性を持つ前記受光素子で構成され、
前記第1判断処理は、前記複数のグループの各グループにおいて複数の受光素子の前記第2黒データのうち最も大きい値から最も小さい値を引算し、引算した値が予め定められた第1閾値を超えていたら、そのグループを前記外光有りグループと判断することを特徴とする請求項2に記載の画像読取装置。
Each group of the plurality of groups is composed of the light receiving element having the same output characteristic,
The first determination process subtracts the smallest value from the largest value of the second black data of the plurality of light receiving elements in each group of the plurality of groups, and the value obtained by subtraction is a first value determined in advance 3. The image reading apparatus according to claim 2, wherein if the threshold is exceeded, the group is determined to be the outside light present group.
前記判断処理は、
前記外光有りグループが隣接している全てのグループのグループ群を連続グループ群として決定する連続グループ群決定処理と、
前記連続グループ群について先頭のグループと最終のグループとを詳細グループとして決定する詳細グループ決定処理と、を含み、
前記第2判断処理は、前記詳細グループである前記外光有りグループにおいて前記外光有り画素を判断し、前記詳細グループでない前記外光有りグループにおいて前記外光有り画素を判断しないことを特徴とする請求項2又は請求項3に記載の画像読取装置。
The determination process is
A continuous group determination process of determining the group group of all the groups to which the extraneous light group is adjacent as the continuous group group;
And a detailed group determination process of determining a leading group and a final group as the detailed group for the continuous group group,
The second determination process is characterized in that the outside light presence pixel is determined in the outside light presence group that is the detail group, and the outside light presence pixel is not determined in the outside light presence group that is not the detail group. An image reading apparatus according to claim 2 or claim 3.
前記準備処理は、
前記複数のグループの各グループの全ての受光素子の第1黒データを平均してグループ黒平均値を算出する平均処理を含み、
前記実行処理は、
前記グループ黒平均値に前記黒調整データを加算して、加算した値に予め定められた所定値を加算することで第2閾値を算出する第2閾値算出処理を含み、
前記第2判断処理は、前記詳細グループの各受光素子において前記第2黒データが前記第2閾値を超えていたら、その受光素子において外光が入射したと判断することを特徴とする請求項2乃至請求項4のいずれか一項に記載の画像読取装置。
The preparation process is
And averaging the first black data of all light receiving elements of each group of the plurality of groups to calculate a group black average value,
The execution process is
Including a second threshold value calculation process of calculating a second threshold value by adding the black adjustment data to the group black average value and adding a predetermined predetermined value to the added value;
The second determination processing is characterized in that, when the second black data exceeds the second threshold in each light receiving element of the detail group, it is determined that outside light is incident in the light receiving element. The image reading apparatus according to any one of claims 1 to 4.
JP2015230371A 2015-11-26 2015-11-26 Image reader Active JP6508573B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015230371A JP6508573B2 (en) 2015-11-26 2015-11-26 Image reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015230371A JP6508573B2 (en) 2015-11-26 2015-11-26 Image reader

Publications (2)

Publication Number Publication Date
JP2017098812A JP2017098812A (en) 2017-06-01
JP6508573B2 true JP6508573B2 (en) 2019-05-08

Family

ID=58817457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015230371A Active JP6508573B2 (en) 2015-11-26 2015-11-26 Image reader

Country Status (1)

Country Link
JP (1) JP6508573B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5134528B2 (en) * 2008-12-25 2013-01-30 ブラザー工業株式会社 Image reading device

Also Published As

Publication number Publication date
JP2017098812A (en) 2017-06-01

Similar Documents

Publication Publication Date Title
JP5991775B2 (en) Measuring apparatus and image forming apparatus
JP6589646B2 (en) Image reading device
JP6156746B2 (en) Image reading device
JP6152819B2 (en) Image reading device
JP6554973B2 (en) Image reading device
JP6578956B2 (en) Image reading device
JP6508573B2 (en) Image reader
US9628650B2 (en) Image reading device selecting reading position on the basis of defective factors
JP6142815B2 (en) Image reading device
JP6874445B2 (en) Image reader
US8824024B2 (en) Image reading device capable of determining whether sheet is present at reading position
JP6152820B2 (en) Image reading device
JP6380197B2 (en) Image reading device
JP6493807B2 (en) Image reading device
JP2009071540A (en) Image input system, image input method, program, and storage medium
JP6892636B2 (en) Image reader
JP6311576B2 (en) Image reading device
JP6337800B2 (en) Image reading device
JP5225035B2 (en) Image forming system
JP6512005B2 (en) Image reader
JP6330636B2 (en) Image reading device
JP6558211B2 (en) Image reading device
JP2020056608A (en) Colorimetric device, colorimetric method, colorimetric program, and image forming apparatus
JP2019161430A (en) Image reading device
JP6962172B2 (en) Image reader

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180529

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190228

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190321

R150 Certificate of patent or registration of utility model

Ref document number: 6508573

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150