JP2015211308A - Reading device - Google Patents

Reading device Download PDF

Info

Publication number
JP2015211308A
JP2015211308A JP2014091064A JP2014091064A JP2015211308A JP 2015211308 A JP2015211308 A JP 2015211308A JP 2014091064 A JP2014091064 A JP 2014091064A JP 2014091064 A JP2014091064 A JP 2014091064A JP 2015211308 A JP2015211308 A JP 2015211308A
Authority
JP
Japan
Prior art keywords
reading
pixel
document
foreign matter
foreign
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014091064A
Other languages
Japanese (ja)
Inventor
貴文 水野
Takafumi Mizuno
貴文 水野
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 JP2014091064A priority Critical patent/JP2015211308A/en
Publication of JP2015211308A publication Critical patent/JP2015211308A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Scanning Arrangements (AREA)
  • Optical Systems Of Projection Type Copiers (AREA)
  • Image Input (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technology to improve noise detection accuracy on the basis of read image data.SOLUTION: A compound machine includes an image reading function and an image forming function, and when performing a document reading job using an ADF function for a predetermined number of documents or more, if a read pixel value (brightness or color component) is within a foreign substance determination threshold, sets a foreign substance flag, and in a plurality of documents, if pixels are determined to be the same as above, determines that the pixels have foreign substances. A determination standard includes the case where a predetermined ratio of the plurality of documents is determined to be the same as above.

Description

本発明は,原稿の画像を読み取る読取装置に関する。さらに詳細には,読み取った画像データに含まれるゴミ等の異物に基づくノイズを検知する技術に関するものである。   The present invention relates to a reading device that reads an image of a document. More specifically, the present invention relates to a technique for detecting noise based on foreign matters such as dust contained in read image data.

従来から,原稿の画像を読み取り,読み取った画像データに基づいて,読み取った画像データに含まれるゴミ等の異物に基づくノイズを検知する技術が知られている。例えば,特許文献1には,原稿を所定角度に傾けて搬送しながら読み取り,読み取った画像データに含まれる筋状のノイズ成分を検知する技術が開示されている。   2. Description of the Related Art Conventionally, a technique is known in which an image of a document is read and noise based on foreign matter such as dust contained in the read image data is detected based on the read image data. For example, Patent Document 1 discloses a technique for reading a manuscript while tilting it at a predetermined angle and detecting streak noise components included in the read image data.

特開2006−33530号公報JP 2006-33530 A

しかしながら,前記した従来の技術には,次のような問題があった。すなわち,実際に読み取った画像データには,筋状のノイズ成分に類似する直線の画像が含まれることもあるため,検知される筋が異物によるものか画像によるものかの正確な判断は難しい。   However, the conventional technique described above has the following problems. That is, since the actually read image data may include a straight line image similar to a streak noise component, it is difficult to accurately determine whether the detected streak is due to a foreign object or an image.

本発明は,前記した従来の技術が有する問題点を解決するためになされたものである。すなわちその課題とするところは,読み取った画像データに基づく,ノイズの検知精度を向上させる技術を提供することにある。   The present invention has been made to solve the above-described problems of the prior art. That is, the problem is to provide a technique for improving the noise detection accuracy based on the read image data.

この課題の解決を目的としてなされた読取装置は,画像を読み取る読取部と,制御部とを備え,前記制御部は,原稿の画像を,前記読取部に読み取らせる読取処理と,前記読取処理による複数の原稿の読取結果を通じて,画素値が黒色の範囲内に有る画素があれば,異物があると判定する異物判定処理とを実行することを特徴としている。   A reading apparatus for solving this problem includes a reading unit that reads an image and a control unit, and the control unit is configured to perform reading processing that causes the reading unit to read an image of a document, and the reading processing. If there is a pixel whose pixel value is in a black range through the reading results of a plurality of documents, a foreign substance determination process for determining that there is a foreign substance is performed.

すなわち,読取位置に異物が有る場合には,複数の原稿を読み取ったとしても異物が有る画素では同じように読み取られるため,黒色の範囲内で読取結果に殆ど変化が生じない。一方で異物が無い画素では複数の原稿を読み取ると読取結果に変化が生じる可能性が高い。そこで,本明細書に開示される読取装置では,複数の読取結果が黒色の範囲に有る画素について,画像ではなく異物と判断することで,一回の読取結果に基づいて異物を判断する場合と比較して,高精度に異物の判断を行うことが期待できる。   In other words, when there is a foreign substance at the reading position, even if a plurality of documents are read, the pixels having the foreign substance are read in the same manner, so that the reading result hardly changes within the black range. On the other hand, when a plurality of originals are read at a pixel having no foreign matter, there is a high possibility that the reading result will change. Therefore, in the reading device disclosed in the present specification, a pixel having a plurality of reading results in the black range is determined to be a foreign object instead of an image, thereby determining a foreign object based on a single reading result. Compared to this, it can be expected that foreign matter is judged with high accuracy.

また,前記制御部は,前記異物判定処理では,前記画素値として,輝度成分あるいは特定色成分に基づいて判定するとよい。異物があれば輝度成分あるいは特定色成分の変化が極めて小さい。そのため,これらの成分に基づく判定が好適である。   The controller may determine the pixel value based on a luminance component or a specific color component as the pixel value. If there is a foreign substance, the change in luminance component or specific color component is extremely small. Therefore, determination based on these components is preferable.

さらに,前記制御部は,前記異物判定処理では,ある画素について輝度成分あるいは特定色成分の値が,前記複数の原稿の読取結果の全てで前記黒色の範囲内に収まる場合に,当該画素について異物が有ると判定するとよい。異物があればその画素については毎回同じような輝度ないし色となる。そのため,ある画素の読取結果が全て異物と見做す黒色の範囲内に収まる場合は,その画素について異物が有ると判定する方が好ましい。   Further, in the foreign matter determination process, the control unit determines that a foreign matter is detected for a pixel when a luminance component value or a specific color component value is within the black range in all of the reading results of the plurality of documents. It is good to determine that there is. If there is a foreign object, the pixel has the same brightness or color every time. For this reason, when the reading result of a certain pixel is all within the black range that is regarded as a foreign object, it is preferable to determine that the pixel has a foreign object.

さらに,前記制御部は,前記異物判定処理では,ある画素について輝度成分あるいは特定色成分の値が,前記複数の原稿の読取結果の全てで前記黒色の範囲内に収まる場合であって,さらに輝度成分あるいは特定色成分の最大値と最小値との差が閾値以下の場合に,当該画素について異物が有ると判定するとよい。輝度成分あるいは特定色成分の最大値と最小値との差が閾値以下であれば,つまり判断対象となる成分のばらつきが小さければ,異物を読み取っていると,より確実に判定できる。   Further, in the foreign matter determination process, the control unit is a case where a luminance component value or a specific color component value for a certain pixel falls within the black range in all of the reading results of the plurality of documents. When the difference between the maximum value and the minimum value of the component or the specific color component is equal to or smaller than the threshold value, it may be determined that there is a foreign object for the pixel. If the difference between the maximum value and the minimum value of the luminance component or the specific color component is equal to or smaller than the threshold value, that is, if the variation of the component to be determined is small, the determination can be made more reliably by reading the foreign object.

また,前記制御部は,前記異物判定処理では,ある画素について複数の原稿の読取結果のうち輝度成分あるいは特定色成分の値が前記黒色の範囲内に収まる結果が所定数以上あるいは所定割合以上の場合に,当該画素について異物が有ると判定するとよい。複数の原稿を読み取る間に異物が移動することもある。そのため,複数の原稿の読取結果のうち,所定数以上あるいは所定割合以上で異物と見做すことができる場合に,異物が有ると判定する方が好ましい。   In the foreign matter determination process, the control unit may determine that a result of a luminance component or a specific color component within a black range among a plurality of document reading results for a certain pixel is a predetermined number or more or a predetermined ratio or more. In this case, it may be determined that there is a foreign object for the pixel. Foreign matter may move while scanning a plurality of documents. Therefore, it is preferable to determine that there is a foreign object when it can be regarded as a foreign object in a predetermined number or more or a predetermined ratio or more among the reading results of a plurality of documents.

また,前記制御部は,原稿の傾きを検出する検出処理を実行し,前記異物判定処理では,先行の原稿と後続の原稿とで傾きが変化していない場合に,当該後続の原稿の読取結果を異物の判定に利用しないとよい。原稿の傾きが同じで,同じ位置の画素の画素値が黒色の範囲内に有る場合,それが模様等の画像である可能性がある。そのため,原稿の傾きが変化していない場合には,異物の有無を判定しない方が好ましい。なお,この構成は,後続する原稿の読取結果を異物の判定に利用しないものであって,後続する原稿に後続する原稿の読取結果を異物の判定に利用してもよい。   The control unit executes a detection process for detecting the inclination of the document. In the foreign matter determination process, if the inclination does not change between the preceding document and the subsequent document, the reading result of the subsequent document is detected. Should not be used for foreign object determination. If the document has the same inclination and the pixel value of the pixel at the same position is in the black range, it may be an image such as a pattern. For this reason, it is preferable not to determine the presence or absence of foreign matter when the inclination of the document has not changed. In this configuration, the reading result of the subsequent document is not used for foreign object determination, and the reading result of the document subsequent to the subsequent document may be used for foreign object determination.

また,前記制御部は,前記異物判定処理にて異物が有ると判定された画素があった場合に,前記読取部の読取位置に原稿が無い状態で,前記読取部に読み取らせる第2読取処理と,前記第2読取処理の読取結果に基づいて,異物が有るか否かを画素ごとに判定する第2異物判定処理とを実行し,前記異物判定処理では,複数の原稿の読取結果を通じて画素値が黒色の範囲内に有る画素について,さらに前記第2異物判定処理にて異物が有ると判定された場合に,当該画素について異物があると判定するとよい。紙間やジョブ間等,原稿が読取位置に無い状態で読み取り,複数の原稿の読取結果を通じて,画素値が黒色の範囲内に有る画素についてさらにその読取結果に基づいて異物の有無を判断することで,異物が有るか否かをより確実に判断できる。   In addition, the control unit may cause the reading unit to read in a state where there is no document at the reading position of the reading unit when there is a pixel determined to have a foreign object in the foreign object determination processing. And a second foreign substance determination process for determining whether or not there is a foreign substance on the basis of the reading result of the second reading process. In the foreign substance determination process, the pixel is obtained through the reading results of a plurality of documents. For a pixel whose value is in the black range, if it is determined in the second foreign matter determination process that there is a foreign matter, it may be determined that there is a foreign matter for the pixel. Reading with no original at the reading position, such as between papers or between jobs, and judging the presence or absence of foreign matter based on the reading results for pixels whose pixel values are in the black range through the reading results of multiple originals Thus, it can be more reliably determined whether or not there is a foreign object.

さらに,前記制御部は,前記第2異物判定処理では,複数の原稿の読取結果を通じて画素値が黒色の範囲内に有る画素を含む一部の領域について,異物が有るか否かを画素ごとに判定するとよい。一部の領域としては,複数の原稿の読取結果を通じて画素値が黒色の範囲内に有る画素のみの領域であってもよい。一部の領域を判定することで,全ての画素を判定する場合と比較して,第2異物判定処理にかかる時間を短縮できる。   Further, in the second foreign matter determination process, the control unit determines, for each pixel, whether or not there is foreign matter in a partial area including pixels whose pixel values are within a black range through a plurality of document reading results. It is good to judge. The partial area may be an area of only pixels whose pixel values are within a black range through the reading results of a plurality of documents. By determining a part of the area, it is possible to reduce the time required for the second foreign object determination process as compared with the case of determining all the pixels.

また,前記制御部は,前記異物判定処理にて異物があると判定された場合に,前記読取処理の実行を停止する停止処理を実行するとよい。読取部による読み取りを停止することで,不適切な読み取りを抑制できる。   Further, the control unit may execute a stop process for stopping the reading process when it is determined that there is a foreign object in the foreign object determination process. Improper reading can be suppressed by stopping reading by the reading unit.

また,前記制御部は,前記異物判定処理にて異物があると判定された場合に,異物が有ることを通知する通知処理を実行するとよい。異物があることを通知することで,ユーザによる異物の除去が期待できる。   In addition, the control unit may execute a notification process for notifying that there is a foreign object when it is determined in the foreign object determination process that there is a foreign object. By notifying that there is a foreign object, the user can expect the removal of the foreign object.

また,本明細書に開示される読取装置は,原稿を搬送する搬送部を備え,前記制御部は,前記読取処理では,前記搬送部にて搬送された原稿の画像を,前記読取部に読み取らせるとよい。原稿を搬送しつつ読み取る構成では,異物があると副走査方向に縦筋となって表れる。このことから,原稿の種類の判定に与える影響が大きい。そのため,本願の構成がより好適に作用する。   Further, the reading device disclosed in this specification includes a transport unit that transports a document, and the control unit reads the image of the document transported by the transport unit into the read unit in the reading process. It is good to make it. In a configuration in which a document is read while being conveyed, if there is a foreign object, it appears as a vertical line in the sub-scanning direction. Therefore, the influence on the determination of the type of document is large. Therefore, the configuration of the present application works more suitably.

上記画像形成装置の機能を実現するための制御方法,コンピュータプログラム,および当該コンピュータプログラムを格納するコンピュータ読取可能な記憶媒体も,新規で有用である。   A control method for realizing the functions of the image forming apparatus, a computer program, and a computer-readable storage medium storing the computer program are also novel and useful.

本発明によれば,読み取った画像データに基づく,ノイズの検知精度を向上させる技術が実現される。   According to the present invention, a technique for improving noise detection accuracy based on read image data is realized.

実施の形態にかかるMFPの外観を示す図である。1 is a diagram illustrating an appearance of an MFP according to an embodiment. 実施の形態にかかるMFPの内部構成の概略を示す図である。FIG. 2 is a diagram illustrating an outline of an internal configuration of an MFP according to an embodiment. 実施の形態にかかるMFPの電気的構成を示すブロック図である。1 is a block diagram showing an electrical configuration of an MFP according to an embodiment. 第1の形態にかかる読取処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading process concerning a 1st form. 第1の形態にかかるADF読取処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the ADF reading process concerning a 1st form. 第1の形態にかかる傾き判定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the inclination determination process concerning a 1st form. 第1の形態にかかる異物検知処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the foreign material detection process concerning a 1st form. 第1の形態にかかる原稿無読取処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the original non-reading process concerning a 1st form. 第2の形態にかかるADF読取処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the ADF reading process concerning a 2nd form. 第2の形態にかかる異物検知処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the foreign material detection process concerning a 2nd form. 第3の形態にかかる読取処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading process concerning a 3rd form.

以下,本発明にかかる画像読取装置を具体化した実施の形態について,添付図面を参照しつつ詳細に説明する。本形態は,画像読取機能および画像形成機能を備えた複合機(MFP:Multi Function Peripheral )に本発明を適用したものである。   DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments embodying an image reading apparatus according to the present invention will be described below in detail with reference to the accompanying drawings. In the present embodiment, the present invention is applied to a multi function peripheral (MFP) having an image reading function and an image forming function.

本形態のMFP100は,図1に示すように,装置の下方に位置し,シートに画像を印刷する画像形成部1と,装置の上方に位置し,原稿の画像を読み取る画像読取部2とを備えている。画像形成部1の画像形成方式は,電子写真方式であっても,インクジェット方式であってもよい。また,カラー画像の形成が可能であっても,モノクロ画像専用であってもよい。   As shown in FIG. 1, an MFP 100 according to the present embodiment includes an image forming unit 1 that prints an image on a sheet and an image reading unit 2 that is positioned above the device and reads an image of a document. I have. The image forming method of the image forming unit 1 may be an electrophotographic method or an ink jet method. Further, even if a color image can be formed, it may be dedicated to a monochrome image.

画像読取部2は,画像の読み取りを行う本体部10と,原稿の自動搬送を行う自動原稿供給装置(ADF:Auto Document Feeder)20とを備えている。ADF20は,搬送部の一例である。ADF20は,本体部10よりも上方に位置するとともに一辺が本体部10と接続し,本体部10に対して回動自在に設けられている。そのため,画像読取部2は,ADF20によって本体部10の上面を開閉することができる。つまり,ADF20は,本体部10の上面を覆うカバーを兼ねる。なお,図1は,ADF20を閉じた状態を示している。   The image reading unit 2 includes a main body unit 10 that reads an image and an automatic document feeder (ADF) 20 that automatically conveys a document. The ADF 20 is an example of a transport unit. The ADF 20 is located above the main body 10 and has one side connected to the main body 10 so as to be rotatable with respect to the main body 10. Therefore, the image reading unit 2 can open and close the upper surface of the main body unit 10 by the ADF 20. That is, the ADF 20 also serves as a cover that covers the upper surface of the main body 10. FIG. 1 shows a state in which the ADF 20 is closed.

また,MFP100は,その前面側に,各種のボタン(例えば,スタートキー,ストップキー,テンキーの各ボタン)によって構成されるボタン群41,液晶ディスプレイからなる表示部42を備えた操作パネル40を備えている。このボタン群41や表示部42により,動作状況の表示やユーザによる操作の入力が可能になっている。   The MFP 100 further includes, on the front side thereof, an operation panel 40 including a button group 41 including various buttons (for example, buttons for a start key, a stop key, and a numeric keypad) and a display unit 42 including a liquid crystal display. ing. The button group 41 and the display unit 42 allow the operation status to be displayed and the operation input by the user to be performed.

続いて,画像読取部2の内部構成について,図2を参照しつつ説明する。なお,図2は,ADF20を閉じた状態での,画像読取部2の断面構成(図1のA−A断面)を示しており,本体部10上にADF20が載置された状態になっている。   Next, the internal configuration of the image reading unit 2 will be described with reference to FIG. 2 shows a cross-sectional configuration of the image reading section 2 (cross section AA in FIG. 1) in a state where the ADF 20 is closed, and the ADF 20 is placed on the main body section 10. Yes.

本体部10は,その上面に,コンタクトガラス11,12を備えている。さらに,本体部10の内部であってコンタクトガラス11,12の下方には,原稿の画像を読み取るイメージセンサ15(読取部の一例)が設けられている。イメージセンサ15は,主走査方向(図2の奥行き方向)に光学素子が一列に並んで配置されており,原稿に向けて光を照射し,その原稿からの反射光を電気信号に変換して出力する。イメージセンサ15としては,例えば,CIS(Contact Image Sensor)やCCD(Charge Coupled Device)が適用可能である。   The main body 10 includes contact glasses 11 and 12 on the upper surface thereof. Further, an image sensor 15 (an example of a reading unit) that reads an image of a document is provided inside the main body 10 and below the contact glasses 11 and 12. The image sensor 15 has optical elements arranged in a line in the main scanning direction (depth direction in FIG. 2), irradiates light toward the document, and converts the reflected light from the document into an electrical signal. Output. As the image sensor 15, for example, a CIS (Contact Image Sensor) or a CCD (Charge Coupled Device) is applicable.

イメージセンサ15は,スライド軸13に対してスライド自在に支持されている。このスライド軸13は,副走査方向(図2中の左右方向)に延び,両端部が本体部10の筐体に固定されている。そのため,イメージセンサ15は,図2中の左右方向に移動可能に設けられている。   The image sensor 15 is slidably supported with respect to the slide shaft 13. The slide shaft 13 extends in the sub-scanning direction (left-right direction in FIG. 2), and both ends are fixed to the housing of the main body unit 10. Therefore, the image sensor 15 is provided so as to be movable in the left-right direction in FIG.

ADF20は,読み取り前の原稿を載置する原稿トレイ21と,原稿トレイ21上の原稿を給紙する給紙ローラ26と,読み取り後の原稿を載置する排出トレイ22と,読み取り後の原稿を排出トレイ22に排紙する排紙ローラ27とを備えている。原稿トレイ21は,排出トレイ22の上方に設けられている。また,ADF20の内部には,原稿が搬送される経路として,原稿トレイ21と排出トレイ22とを連結する略U字状の搬送路25が設けられている。また,ADF20は,その下面に開口部23が設けられ,その開口部23から原稿押さえ板24が露出するように配置されている。この原稿押さえ板24は,ADF20を閉じた状態でコンタクトガラス12と対向している。   The ADF 20 includes a document tray 21 for placing a document before reading, a paper feed roller 26 for feeding a document on the document tray 21, a discharge tray 22 for placing a document after reading, and a document after reading. A paper discharge roller 27 for discharging paper to the discharge tray 22 is provided. The document tray 21 is provided above the discharge tray 22. In addition, a substantially U-shaped transport path 25 that connects the document tray 21 and the discharge tray 22 is provided inside the ADF 20 as a path for transporting the document. Further, the ADF 20 is provided with an opening 23 on the lower surface thereof so that the document pressing plate 24 is exposed from the opening 23. The document pressing plate 24 faces the contact glass 12 with the ADF 20 closed.

また,ADF20は,原稿の有無を検知するためのセンサとして,フロントセンサ71とリアセンサ72とを備えている。フロントセンサ71は,搬送路25のうち,原稿の搬送方向の,給紙ローラ26の直後に配置される。リアセンサ72は,搬送路25のうち,原稿の搬送方向の,原稿押さえ板24の直前に配置される。フロントセンサ71およびリアセンサ72は,例えば,揺動片付きの光透過センサであり,それぞれの位置に原稿が有るか否かに応じて,出力レベルの異なる信号を出力する。本形態では,原稿が有る場合にはオンレベルとなり,原稿が無い場合にはオフレベルとなる信号を出力するセンサを用いる。MFP100は,フロントセンサ71ないしリアセンサ72から出力される信号に基づいて,搬送路25内の原稿の位置を推測できる。   The ADF 20 includes a front sensor 71 and a rear sensor 72 as sensors for detecting the presence or absence of a document. The front sensor 71 is disposed in the transport path 25 immediately after the paper feed roller 26 in the document transport direction. The rear sensor 72 is disposed in the transport path 25 immediately before the document pressing plate 24 in the document transport direction. The front sensor 71 and the rear sensor 72 are, for example, light transmission sensors with swing pieces, and output signals having different output levels depending on whether or not there is a document at each position. In this embodiment, a sensor is used that outputs a signal that is on-level when there is a document and off-level when there is no document. The MFP 100 can estimate the position of the document in the conveyance path 25 based on signals output from the front sensor 71 or the rear sensor 72.

また,イメージセンサ15を利用した原稿の読取方式としては,フラットベッド(原稿固定走査)方式と,ADF(原稿移動走査)方式とがある。フラットベッド方式の場合,原稿がコンタクトガラス11上に載置される。その状態で,MFP100は,イメージセンサ15を副走査方向に移動させ,その際に主走査方向に1ラインずつ原稿の画像を読み取る。すなわち,フラットベッド方式では,イメージセンサ15がコンタクトガラス11の下を移動する範囲全体がイメージセンサ15の読取位置となる。   Further, as a document reading method using the image sensor 15, there are a flat bed (document fixed scanning) method and an ADF (document moving scanning) method. In the case of the flat bed system, the document is placed on the contact glass 11. In this state, the MFP 100 moves the image sensor 15 in the sub-scanning direction, and reads an image of the document line by line in the main scanning direction. That is, in the flat bed system, the entire range in which the image sensor 15 moves under the contact glass 11 is the reading position of the image sensor 15.

一方,ADF方式の場合,複数の原稿が纏めて原稿トレイ21に載置される。そして,MFP100は,前述したようにイメージセンサ15を原稿押さえ板24に対向する位置に移動させ,固定する。その状態で,原稿トレイ21に載置された原稿を1枚ずつ給紙し,その原稿を本体部10のコンタクトガラス12に対向する位置に搬送する。具体的には,原稿を原稿押さえ板24とコンタクトガラス12との間を通過させる。MFP100は,イメージセンサ15を原稿押さえ板24と対向する位置に配置し,原稿が原稿押さえ板24とコンタクトガラス12との間を通過する際に,原稿の画像をイメージセンサ15に読み取らせる。その後,その原稿を排出トレイ22上に排出する。すなわち,ADF方式では,原稿押さえ板24と対向する位置がイメージセンサ15の読取位置となる。   On the other hand, in the case of the ADF method, a plurality of documents are collectively placed on the document tray 21. Then, the MFP 100 moves and fixes the image sensor 15 to a position facing the document pressing plate 24 as described above. In this state, the originals placed on the original tray 21 are fed one by one, and the originals are conveyed to a position facing the contact glass 12 of the main body 10. Specifically, the document is passed between the document pressing plate 24 and the contact glass 12. The MFP 100 arranges the image sensor 15 at a position facing the document pressing plate 24, and causes the image sensor 15 to read the image of the document when the document passes between the document pressing plate 24 and the contact glass 12. Thereafter, the document is discharged onto the discharge tray 22. That is, in the ADF method, the position facing the document pressing plate 24 is the reading position of the image sensor 15.

続いて,本形態のMFP100の電気的構成について説明する。本形態のMFP100は,図3に示すように,CPU31と,ROM32と,RAM33と,NVRAM(Non Volatile RAM)34と,ASIC35とを有するコントローラ30を備えている。また,MFP100は,前述した画像形成部1および画像読取部2と,ユーザからの入力操作を受け付ける操作パネル40と,外部デバイスと接続するための通信インターフェース37とを備え,これらがCPU31によって制御される。なお,図3中のコントローラ30は,CPU31等,MFP100の制御に利用されるハードウェアを纏めた総称であって,実際にMFP100に存在する単一のハードウェアを表すとは限らない。   Next, an electrical configuration of the MFP 100 according to the present embodiment will be described. As shown in FIG. 3, the MFP 100 of this embodiment includes a controller 30 having a CPU 31, a ROM 32, a RAM 33, an NVRAM (Non Volatile RAM) 34, and an ASIC 35. The MFP 100 includes the image forming unit 1 and the image reading unit 2 described above, an operation panel 40 that receives an input operation from a user, and a communication interface 37 for connecting to an external device, which are controlled by the CPU 31. The Note that the controller 30 in FIG. 3 is a collective term for the hardware used for controlling the MFP 100 such as the CPU 31, and does not necessarily represent a single piece of hardware that actually exists in the MFP 100.

ROM32には,MFP100を制御するための制御プログラムであるファームウェアや各種設定,初期値等が記憶されている。RAM33は,各種制御プログラムが読み出される作業領域として,あるいは画像データを一時的に記憶する記憶領域として利用される。   The ROM 32 stores firmware, which is a control program for controlling the MFP 100, various settings, initial values, and the like. The RAM 33 is used as a work area from which various control programs are read or as a storage area for temporarily storing image data.

CPU31は,ROM32から読み出した制御プログラムや各種センサから送られる信号に従って,その処理結果をRAM33またはNVRAM34に記憶させながら,MFP100の各構成要素を制御する。CPU31は,制御部の一例である。なお,コントローラ30が制御部であってもよいし,ASIC35が制御部であってもよい。   The CPU 31 controls each component of the MFP 100 while storing the processing result in the RAM 33 or the NVRAM 34 according to a control program read from the ROM 32 and signals sent from various sensors. The CPU 31 is an example of a control unit. The controller 30 may be a control unit, and the ASIC 35 may be a control unit.

通信インターフェース37は,他の装置との通信を可能にするハードウェアである。具体的な通信インターフェース37としては,例えば,有線LANインターフェース,無線LANインターフェース,シリアル通信インターフェースが該当する。MFP100は,画像読取部2にて読み取られた画像データを,通信インターフェース37を介して外部デバイスに送信できる。   The communication interface 37 is hardware that enables communication with other devices. Specific examples of the communication interface 37 include a wired LAN interface, a wireless LAN interface, and a serial communication interface. The MFP 100 can transmit the image data read by the image reading unit 2 to an external device via the communication interface 37.

続いて,MFP100の制御の第1の形態について説明する。始めに,画像読取部2に原稿の画像の読み取りを行わせる読取処理について,図4のフローチャートを参照しつつ説明する。読取処理は,操作パネル40への入力操作によって読取指示が入力されたことや,通信インターフェース37を介して外部デバイスからの読取指示を受信したこと等の,読取指示を受け付けたことを契機に,CPU31によって実行される。   Next, a first form of control of MFP 100 will be described. First, reading processing for causing the image reading unit 2 to read an image of a document will be described with reference to a flowchart of FIG. The reading process is triggered when a reading instruction is received by an input operation on the operation panel 40 or when a reading instruction is received from an external device via the communication interface 37. It is executed by the CPU 31.

第1の形態の読取処理では,先ずMFP100は,ADF20の原稿トレイ21に原稿が有るか否かを判断する(S100)。ADF20の原稿トレイ21に原稿が無ければ(S100:NO),MFP100はコンタクトガラス11に原稿がセットされているものと見做し,フラットベッド方式での原稿の読み取りを行う(S111)。フラットベッド方式での原稿の読み取りの詳細については省略する。S111の後は,MFP100は読取処理を終了する。   In the reading process of the first form, the MFP 100 first determines whether or not there is a document on the document tray 21 of the ADF 20 (S100). If there is no document on the document tray 21 of the ADF 20 (S100: NO), the MFP 100 assumes that the document is set on the contact glass 11, and reads the document by the flat bed method (S111). Details of reading a document in the flat bed method are omitted. After S111, the MFP 100 ends the reading process.

ADF20の原稿トレイ21に原稿が有れば(S100:YES),MFP100はイメージセンサ15についての準備動作を行う(S101)。具体的にS101では,光量調整や,シェーディング補正を,必要に応じて実行する。準備動作は,イメージセンサ15をコンタクトガラス11に移動させて行ってもよいし,イメージセンサ15を原稿押さえ板24と対向する位置に移動させて行ってもよい。   If there is a document on the document tray 21 of the ADF 20 (S100: YES), the MFP 100 performs a preparation operation for the image sensor 15 (S101). Specifically, in S101, light amount adjustment and shading correction are executed as necessary. The preparatory operation may be performed by moving the image sensor 15 to the contact glass 11 or may be performed by moving the image sensor 15 to a position facing the document pressing plate 24.

また,MFP100は,異物フラグを全てオンにする(S102)。異物フラグは,1ライン分の画素ごとに異物の有無を記憶する情報であり,オンが異物有りを意味し,オフが異物無しを意味する。S101とS102とは,逆順であっても同時であってもよい。   In addition, the MFP 100 turns on all the foreign object flags (S102). The foreign matter flag is information for storing the presence or absence of foreign matter for each pixel of one line. On means that there is a foreign matter, and off means that there is no foreign matter. S101 and S102 may be in reverse order or simultaneously.

S102の後,MFP100は原稿トレイ21に載置された原稿を1枚給紙し,原稿の搬送を開始する(S103)。そして,その1枚の原稿の画像を搬送しながら読み取るADF読取処理を実行する(S104)。   After S102, the MFP 100 feeds one document placed on the document tray 21 and starts conveying the document (S103). Then, an ADF reading process for reading the image of the one original while conveying it is executed (S104).

図5は,S104のADF読取処理の手順を示している。ADF読取処理では,先ずMFP100は,画素情報のバックアップを作成する(S121)。画素情報には,異物フラグの他,画素ごとに異物の可能性がある画素の画素値の最大値および最小値が含まれる。その後,MFP100は,搬送される原稿についてイメージセンサ15による読み取りを開始する(S122)。   FIG. 5 shows the procedure of the ADF reading process in S104. In the ADF reading process, first, the MFP 100 creates a backup of pixel information (S121). The pixel information includes the maximum value and the minimum value of the pixel value of a pixel that may be a foreign object for each pixel, in addition to the foreign object flag. Thereafter, the MFP 100 starts reading the conveyed document by the image sensor 15 (S122).

S122では,具体的にMFP100は,リアセンサ72がオフからオンになった時点から,原稿の先端がリアセンサ72の位置から読取位置までの移動にかかる時間を待って,イメージセンサ15による読み取りを開始させる。その後,リアセンサ72がオンからオフになった時点から,原稿の後端がリアセンサ72の位置から読取位置までの移動にかかる時間を待って,イメージセンサ15による読み取りを終了させる。S122は,読取処理の一例である。   In S122, specifically, the MFP 100 waits for the time required for the leading edge of the document to move from the position of the rear sensor 72 to the reading position from the time when the rear sensor 72 is turned on, and starts reading by the image sensor 15. . Thereafter, after the rear sensor 72 is turned from on to off, the image sensor 15 finishes reading after waiting for the time required for the trailing edge of the document to move from the position of the rear sensor 72 to the reading position. S122 is an example of a reading process.

次に,MFP100は,読み取った画像データのうち先頭1ライン分の画像データを抽出する(S123)。さらに抽出した画像データのうち先頭画素の画素値を抽出する(S124)。画素値としては,異物か否かを判断できる情報であればよく,本形態ではRGBデータのうちのG(グリーン)成分の情報を画素値として抽出する。なお,異物の判断に用いる画素値は,G成分の値に限らず,R(レッド)やB(ブルー)の成分でもよく,変換式や変換テーブルを利用して画像データから変換して得られる輝度の成分であってもよい。G成分の値は,読み取った画素が白色に近いほど255に近く,黒色に近いほど0に近い。なお,輝度を用いる方がRGBデータよりも高精度に異物を判断できる。   Next, the MFP 100 extracts image data for the first line from the read image data (S123). Further, the pixel value of the first pixel is extracted from the extracted image data (S124). The pixel value may be any information that can determine whether or not it is a foreign object. In this embodiment, information on the G (green) component in the RGB data is extracted as the pixel value. Note that the pixel value used for foreign object determination is not limited to the G component value, but may be an R (red) or B (blue) component, which is obtained by conversion from image data using a conversion equation or conversion table. It may be a luminance component. The value of the G component is closer to 255 as the read pixel is closer to white, and closer to 0 as it is closer to black. It should be noted that the use of luminance can determine foreign matters with higher accuracy than RGB data.

そこで,MFP100は,抽出した画素値が異物閾値よりも大きいか否かを判断する(S125)。異物閾値は,黒色か否かを判断するための値である。なお,異物閾値は,厳密な意味での黒色を判断するための閾値ではなく,異物の可能性がある黒色に近い色も黒色と見做すことができる閾値である。例えば,異物閾値を30とすると,0から30が黒色の範囲の一例となる。すなわち,S125では,抽出した画素値が,異物以外を読み取ったか否かを判断する。なお,異物閾値は,比較する成分によって異なる。例えば,R成分やB成分は視認し難い。そのため,異物閾値を,G成分のときよりも0に近い値とする。   Therefore, the MFP 100 determines whether or not the extracted pixel value is larger than the foreign object threshold (S125). The foreign object threshold is a value for determining whether or not the color is black. Note that the foreign substance threshold is not a threshold for judging black in a strict sense, but is a threshold at which a color close to black that may be a foreign substance can be regarded as black. For example, if the foreign substance threshold is 30, 0 to 30 is an example of a black range. That is, in S125, it is determined whether or not the extracted pixel value has read anything other than a foreign object. The foreign object threshold value varies depending on the components to be compared. For example, the R component and the B component are difficult to visually recognize. For this reason, the foreign substance threshold is set to a value closer to 0 than in the case of the G component.

抽出した画素値が異物閾値よりも大きい場合(S125:YES),すなわち異物以外を読み取ったと判断できる場合,MFP100は当該画素に対応する異物フラグをオフにする(S126)。   If the extracted pixel value is larger than the foreign object threshold value (S125: YES), that is, if it can be determined that other than the foreign object has been read, the MFP 100 turns off the foreign object flag corresponding to the pixel (S126).

一方,抽出した画素値が異物閾値よりも大きくない場合(S125:NO),すなわち異物を読み取った可能性がある場合,MFP100は当該画素値に基づいて,画素ごとの最大値と最小値とを設定する。   On the other hand, when the extracted pixel value is not larger than the foreign object threshold (S125: NO), that is, when there is a possibility that the foreign object has been read, the MFP 100 calculates the maximum value and the minimum value for each pixel based on the pixel value. Set.

すなわち,MFP100は,画素ごとに,読み取ったライン分の画素値に基づいて,黒色と判断された画素値のばらつきを取得する。そのため,MFP100は,画素ごとに,異物閾値よりも小さい画素値のうちの,最大値と最小値とを記憶する。なお,最大値の初期値としては0がセットされ,最小値の初期値には異物閾値がセットされており,黒色の画素として抽出された最初の画素値が最大値および最小値に設定される。そして,黒色の画素値が抽出される度に,必要に応じて最大値および最小値が更新される。   That is, for each pixel, MFP 100 obtains the variation in the pixel value determined to be black based on the pixel value of the read line. Therefore, MFP 100 stores, for each pixel, a maximum value and a minimum value among pixel values smaller than the foreign object threshold value. Note that 0 is set as the initial value of the maximum value, the foreign substance threshold is set as the initial value of the minimum value, and the first pixel value extracted as a black pixel is set as the maximum value and the minimum value. . Each time a black pixel value is extracted, the maximum value and the minimum value are updated as necessary.

前述の動作を実現するため,MFP100は抽出した画素値が最大値よりも大きいか否かを判断する(S131)。抽出した画素値が最大値よりも大きい場合(S131:YES),MFP100は当該画素値を最大値とする(S132)。S132の後,あるいは抽出した画素値が最大値よりも大きくない場合(S131:NO),MFP100は抽出した画素値が最小値よりも小さいか否かを判断する(S133)。抽出した画素値が最小値よりも小さい場合(S133:YES),MFP100は当該画素値を最小値とする(S134)。   In order to realize the above-described operation, the MFP 100 determines whether or not the extracted pixel value is larger than the maximum value (S131). When the extracted pixel value is larger than the maximum value (S131: YES), the MFP 100 sets the pixel value as the maximum value (S132). After S132 or when the extracted pixel value is not larger than the maximum value (S131: NO), the MFP 100 determines whether or not the extracted pixel value is smaller than the minimum value (S133). When the extracted pixel value is smaller than the minimum value (S133: YES), the MFP 100 sets the pixel value as the minimum value (S134).

S134の後,あるいは抽出した画素値が最小値よりも小さくない場合(S133:NO),あるいはS126の後,MFP100は1ライン分の全画素の抽出が終了したか否かを判断する(S127)。未抽出の画素があれば(S127:NO),S124に移行し,MFP100は未抽出の画素の1つを抽出してS125以降の処理を繰り返す。これにより,1ライン分の画素情報が得られる。   After S134, or when the extracted pixel value is not smaller than the minimum value (S133: NO), or after S126, the MFP 100 determines whether or not extraction of all pixels for one line has been completed (S127). . If there is an unextracted pixel (S127: NO), the process proceeds to S124, and the MFP 100 extracts one of the unextracted pixels and repeats the processing from S125 onward. Thereby, pixel information for one line is obtained.

全画素の抽出が終了した場合には(S127:YES),MFP100は原稿の画像データの全ライン分の抽出が終了したか否かを判断する(S128)。未抽出のラインがあれば(S128:NO),S123に移行し,MFP100は未抽出のラインの1つを抽出してS124以降の処理を繰り返す。これにより,読取位置の主走査方向の画素ごとに,副走査方向に1つでも異物閾値よりも大きい画素値があれば当該画素の異物フラグはオフとなり,副走査方向の全てで画素値が0から異物閾値までの範囲内であれば異物フラグはオンのままとなり,1ページ分の画素情報が得られる。   When extraction of all pixels is completed (S127: YES), the MFP 100 determines whether extraction of all lines of the image data of the document has been completed (S128). If there is an unextracted line (S128: NO), the process proceeds to S123, and the MFP 100 extracts one of the unextracted lines and repeats the processes after S124. Thus, for every pixel in the main scanning direction at the reading position, if there is at least one pixel value in the sub-scanning direction that is larger than the foreign substance threshold, the foreign matter flag for that pixel is turned off, and the pixel value is 0 in all of the sub-scanning directions. If it is within the range from to the foreign object threshold, the foreign object flag remains on and pixel information for one page is obtained.

全ラインの抽出が終了した場合(S128:YES),すなわち1枚分の原稿についての抽出が終了した場合には,MFP100は原稿の傾きに応じて,読み取った原稿の情報を異物の有無の判断に用いるか否かを判定する傾き判定処理を実行する(S129)。   When the extraction of all lines is completed (S128: YES), that is, when the extraction of one original is completed, the MFP 100 determines whether or not there is a foreign object according to the inclination of the original. An inclination determination process for determining whether or not to use is performed (S129).

図6は,S129の傾き判定処理の手順を示している。傾き判定処理では,先ずMFP100は,原稿の傾きを取得する(S141)。原稿の傾きは,例えば原稿の先端のエッジを検出することによって取得できる。S141は,検出処理の一例である。   FIG. 6 shows the procedure of the inclination determination process in S129. In the inclination determination process, first, the MFP 100 acquires the inclination of the document (S141). The inclination of the original can be acquired by detecting the edge of the front end of the original, for example. S141 is an example of detection processing.

S141の後,MFP100は,取得した傾きが,直前に搬送された原稿の傾きと同じであるか否かを判断する(S142)。なお,先頭の原稿については直前に搬送された原稿が無いため,傾きが同じでないと判断される。また,S141にて傾きを取得できなかった場合も,傾きが同じでないと判断される。また,原稿の傾きが同じとは,厳密な同じを意味するものではなく,同じと見做すことができる,予め決められた範囲内であったことを意味する。   After S141, the MFP 100 determines whether or not the obtained inclination is the same as the inclination of the document conveyed immediately before (S142). It should be noted that the leading document is determined not to have the same inclination because there is no document conveyed immediately before. Also, if the inclination cannot be acquired in S141, it is determined that the inclinations are not the same. Further, the same inclination of the original does not mean exactly the same, but means that it is within a predetermined range that can be regarded as the same.

連続して搬送された原稿の傾きが同じで,異物フラグがオンの場合,縦筋と類似する模様が入った原稿を連続して読み取った可能性がある。そのような原稿は,異物の有無の判断を誤らせる可能性が高い。そのため,傾きが同じである場合(S142:YES),S121で作成した画素情報のバックアップに基づいて,異物フラグの状態および異物の可能性がある画素の画素値の最大値と最小値を,原稿を読み取る前の状態に戻す(S143)。これにより,今回読み取った原稿の情報が,異物の有無の判断に用いられない。   If the documents conveyed continuously have the same inclination and the foreign object flag is on, there is a possibility that documents having patterns similar to vertical stripes have been read continuously. Such a manuscript is likely to misjudg the presence or absence of foreign matter. Therefore, when the inclinations are the same (S142: YES), based on the backup of the pixel information created in S121, the maximum value and the minimum value of the pixel value of the pixel having the possibility of the foreign matter flag and the foreign matter are obtained. Is returned to the state before reading (S143). As a result, the information of the original read this time is not used to determine the presence or absence of foreign matter.

S143の後,あるいは傾きが同じでない場合(S142:NO),S141で取得した傾きをRAM33あるいはNVRAM34に記憶する(S144)。なお,最初の1枚目の読み取りでは,直前に搬送された原稿の傾きが記憶されていないため,S142では傾きが同じでないと判断される。S144の後,傾き判定処理を終了する。   After S143 or when the slopes are not the same (S142: NO), the slope acquired in S141 is stored in the RAM 33 or NVRAM 34 (S144). Note that in the first reading of the first sheet, since the inclination of the document conveyed immediately before is not stored, it is determined in S142 that the inclinations are not the same. After S144, the inclination determination process ends.

図5の説明に戻り,S129の傾き判定処理の後は,MFP100はS121で生成した異物情報のバックアップを破棄する(S130)。S130の後は,ADF読取処理を終了する。   Returning to the description of FIG. 5, after the inclination determination process in S <b> 129, the MFP 100 discards the backup of the foreign substance information generated in S <b> 121 (S <b> 130). After S130, the ADF reading process is terminated.

図4の説明に戻り,S104のADF読取処理の後は,MFP100は次の原稿が搬送されたか否かを判断する(S105)。S105では,具体的にMFP100は,フロントセンサ71がオンからオフとなったタイミングから規定時間が経過するまでに再びフロントセンサ71がオンになれば次の原稿が搬送されたと判断する。次の原稿が有る場合には(S105:YES),S103に移行し,次の原稿を搬送し,S104以降の処理を行う。   Returning to the description of FIG. 4, after the ADF reading process in S <b> 104, the MFP 100 determines whether or not the next document has been conveyed (S <b> 105). In S105, specifically, the MFP 100 determines that the next document has been conveyed if the front sensor 71 is turned on again before the specified time elapses from the timing when the front sensor 71 is turned off. If there is a next original (S105: YES), the process proceeds to S103, the next original is conveyed, and the processes after S104 are performed.

次の原稿が搬送されなかった場合には(S105:NO),MFP100は異物の有無の判断を行う。S105までの処理により,主走査方向の各画素に対応する異物フラグの状態は,全ての原稿を通じて,副走査方向に1つでも異物以外の情報が読み取られれば当該画素に対応する異物フラグはオフとなり,全ての原稿を通じて,副走査方向の全てで異物の可能性があれば当該画素に対応する異物フラグはオンのままとなっている。   When the next original is not conveyed (S105: NO), MFP 100 determines whether there is a foreign object. By the processing up to S105, the state of the foreign matter flag corresponding to each pixel in the main scanning direction is set to OFF if any information other than foreign matter is read in the sub scanning direction through all the originals. If there is a possibility of foreign matter in all of the originals in all of the sub-scanning directions, the foreign matter flag corresponding to the pixel remains on.

そこで,MFP100は,所定枚数以上の原稿の読み取りを行ったか否かを判断する(S106)。所定枚数は,2枚以上であって,異物判定の要求精度によって異なる。すなわち,高精度が要求されるほど多い枚数が設定される。   Therefore, the MFP 100 determines whether or not a predetermined number of originals have been read (S106). The predetermined number is two or more and depends on the required accuracy of foreign object determination. That is, a larger number of sheets is set as high accuracy is required.

所定枚数以上の原稿の読み取りを行っていない場合には(S106:NO),異物によるノイズか画像かの区別がつき難いため,MFP100は異物の検知を行うことなく,読取処理を終了する。一方,所定枚数以上の原稿の読み取りを行っている場合には(S106:YES),MFP100は異物を検知する異物検知処理を行う(S107)。   If the document of a predetermined number or more has not been read (S106: NO), the MFP 100 ends the reading process without detecting the foreign matter because it is difficult to distinguish between noise and image due to the foreign matter. On the other hand, when the document of a predetermined number or more is being read (S106: YES), the MFP 100 performs a foreign object detection process for detecting a foreign object (S107).

図7は,S107の異物検知処理の手順を示している。異物検知処理では,先ずMFP100は,先頭画素に対応する画素情報を抽出する(S161)。そして,抽出した画素情報の異物フラグがオンか否かを判断する(S162)。   FIG. 7 shows the procedure of foreign object detection processing in S107. In the foreign object detection process, first, the MFP 100 extracts pixel information corresponding to the first pixel (S161). Then, it is determined whether or not the foreign matter flag of the extracted pixel information is on (S162).

異物フラグがオンの場合(S162:YES),MFP100は抽出した画素情報に含まれる画素値の最大値と最小値とを読み出し,その差である画素値差を算出する(S171)。そして,画素値差が,画素の変化の有無を判断するための変化閾値よりも小さいか否かを判断する(S172)。変化閾値は,黒色に近い色と判定された画素が異物か否かを判断するための値であり,例えば3が設定される。   When the foreign object flag is on (S162: YES), the MFP 100 reads the maximum value and the minimum value of the pixel values included in the extracted pixel information, and calculates the pixel value difference that is the difference (S171). Then, it is determined whether or not the pixel value difference is smaller than a change threshold value for determining whether or not the pixel has changed (S172). The change threshold is a value for determining whether or not the pixel determined to be a color close to black is a foreign object, and is set to 3 for example.

すなわち,異物を読み取った場合には,個々の異物によって濃淡が異なるが,複数枚の原稿を通じても同じような画素値となる。そのため,複数枚の原稿を読み取った場合であっても,画素値差は小さくなる。そこで,画素値差が変化閾値よりも小さい場合(S172:YES),MFP100は,読取位置に異物が有ると判断し,異物情報を記憶する(S173)。異物情報は,1ライン分の画素ごとに異物の有無を記憶する情報である。すなわち,異物情報には,異物が有る画素の情報が当該画素の位置情報と関連付けられて記憶される。S173では,異物情報のうち,S161にて抽出された画素に対応する情報に,異物が有ることが記憶される。   In other words, when a foreign object is read, the pixel value is the same for a plurality of documents, although the density varies depending on the individual foreign object. Therefore, even when a plurality of originals are read, the pixel value difference is small. Therefore, when the pixel value difference is smaller than the change threshold (S172: YES), the MFP 100 determines that there is a foreign object at the reading position, and stores the foreign object information (S173). The foreign matter information is information for storing the presence or absence of foreign matter for each pixel of one line. That is, in the foreign object information, information on a pixel having a foreign object is stored in association with the position information of the pixel. In S173, the fact that there is a foreign object is stored in the information corresponding to the pixel extracted in S161 among the foreign object information.

一方,異物フラグがオンであったとしても,画素値差が変化閾値よりも小さくない場合(S172:NO),異物以外を読み取った可能性がある。そのため,MFP100は異物情報に異物が有る旨を記憶しない。また,異物フラグがオフであった場合(S162:NO),読取位置に異物が無いと判断できることから,MFP100は異物が有る旨である異物情報を記憶しない。   On the other hand, even if the foreign object flag is on, if the pixel value difference is not smaller than the change threshold value (S172: NO), there is a possibility that other than the foreign object has been read. For this reason, the MFP 100 does not store that there is a foreign object in the foreign object information. If the foreign object flag is off (S162: NO), since it can be determined that there is no foreign object at the reading position, MFP 100 does not store foreign object information indicating that there is a foreign object.

S173の後,あるいは画素値差が変化閾値よりも小さくない場合(S172:NO),あるいは異物フラグがオフであった場合(S162:NO),MFP100は全画素情報の抽出が終了したか否かを判断する(S163)。未抽出の画素情報があれば(S163:NO),S161に移行し,MFP100は未抽出の画素情報の1つを抽出してS162以降の処理を繰り返す。これにより,各読取位置での異物の有無が判断される。S125,S162およびS172は,異物判定処理の一例である。   After S173, or when the pixel value difference is not smaller than the change threshold value (S172: NO), or when the foreign object flag is off (S162: NO), the MFP 100 determines whether all pixel information has been extracted. Is determined (S163). If there is unextracted pixel information (S163: NO), the process proceeds to S161, and the MFP 100 extracts one of the unextracted pixel information and repeats the processing from S162 onward. Thereby, the presence or absence of foreign matter at each reading position is determined. S125, S162, and S172 are an example of a foreign matter determination process.

全画素情報の抽出が終了した場合には(S163:YES),MFP100は原稿が無い状態でイメージセンサ15に読み取らせ,さらに異物の有無を判断する原稿無読取処理を行う(S164)。   When the extraction of all pixel information is completed (S163: YES), the MFP 100 causes the image sensor 15 to read in the absence of a document, and further performs a document non-reading process for determining the presence or absence of foreign matter (S164).

図8は,S164の原稿無読取処理の手順を示している。原稿無読取処理では,先ずMFP100は,異物情報として,異物が有ることが記憶されているか否かを判断する(S181)。異物が有ることが記憶されていない場合には(S181:NO),これ以上の異物の判断は不要であることから,MFP100は原稿無読取処理を終了する。   FIG. 8 shows the procedure of the non-document reading process in S164. In the original non-reading process, first, the MFP 100 determines whether or not foreign matter is stored as foreign matter information (S181). If it is not stored that there is a foreign object (S181: NO), since no further foreign object determination is necessary, the MFP 100 ends the original non-reading process.

異物が有ることが記憶されている場合には(S181:YES),MFP100は原稿が無い状態でイメージセンサ15による1ライン分の読み取りを行う(S182)。S182では,原稿が無い状態であることから,原稿押さえ板24が読み取られることになる。原稿押さえ板24は,白板であり,コンタクトガラス12は透明板であることから,イメージセンサ15と原稿押さえ板24との間にゴミや塵等の異物が無ければ,1ライン分の白色の画像データが得られる。一方で,読取位置に異物が有る場合には,その異物が読み取られ,黒色の範囲内の画像データが得られる。S182は,第2読取処理の一例である。   If it is stored that there is a foreign object (S181: YES), the MFP 100 reads one line by the image sensor 15 without a document (S182). In S182, since there is no document, the document pressing plate 24 is read. Since the document pressing plate 24 is a white plate and the contact glass 12 is a transparent plate, if there is no foreign matter such as dust or dust between the image sensor 15 and the document pressing plate 24, a white image for one line is obtained. Data is obtained. On the other hand, if there is a foreign substance at the reading position, the foreign substance is read, and image data in the black range is obtained. S182 is an example of a second reading process.

S182の後,MFP100は,読み取った1ライン分の画素情報のうち,異物情報に異物が有ることが記憶されている画素の1つを抽出する(S183)。そして,抽出された画素の画素値が異物閾値よりも大きいか否かを判断する(S184)。S184で用いられる異物閾値は,S125で用いられる異物閾値と同様である。S184は,第2異物判定処理の一例である。   After S182, the MFP 100 extracts one of the read pixel information for one line, one of the pixels stored as having foreign matter in the foreign matter information (S183). Then, it is determined whether or not the pixel value of the extracted pixel is larger than the foreign substance threshold value (S184). The foreign substance threshold value used in S184 is the same as the foreign substance threshold value used in S125. S184 is an example of a second foreign matter determination process.

抽出された画素値が異物閾値よりも大きい場合(S184:YES),すなわち異物以外を読み取ったと判断できる場合,MFP100は当該画素について異物が有ることを取り消す(S185)。すなわち,MFP100は異物情報から当該画素についての情報を異物が無いことを記憶する。原稿が無い状態で読み取った時の情報と照合することで,黒色が連続する原稿の画像を読み取った場合の誤判断を抑制できる。一方,異物が有る場合には,原稿が無い状態であっても,これまでと同様に黒色の範囲内の画素値が得られる。そのため,抽出された画素値が異物閾値よりも大きくない場合(S184:NO),MFP100は異物が有ることを取り消さない。   If the extracted pixel value is larger than the foreign object threshold value (S184: YES), that is, if it can be determined that an object other than the foreign object has been read, the MFP 100 cancels the presence of the foreign object for the pixel (S185). That is, the MFP 100 stores information about the pixel from the foreign matter information that there is no foreign matter. By collating it with information obtained when the document is read without a document, it is possible to suppress misjudgment when a black continuous document image is scanned. On the other hand, when there is a foreign object, a pixel value within the black range is obtained as before, even if there is no document. Therefore, when the extracted pixel value is not larger than the foreign object threshold (S184: NO), MFP 100 does not cancel the presence of the foreign object.

S185の後,あるいは抽出した画素値が異物閾値よりも大きくない場合(S184:NO),異物が有ることが記憶されている画素を全て抽出したか否かを判断する(S186)。未抽出の画素が有る場合には(S186:NO),S183に移行し,MFP100は未抽出の画素の1つを抽出し,S184以降の処理を繰り返す。これにより,各画素の異物の有無が確定される。   After S185, or when the extracted pixel value is not larger than the foreign object threshold value (S184: NO), it is determined whether or not all the pixels that are stored as having a foreign object are extracted (S186). If there is an unextracted pixel (S186: NO), the process proceeds to S183, where the MFP 100 extracts one of the unextracted pixels, and repeats the processing from S184 onward. As a result, the presence or absence of foreign matter in each pixel is determined.

異物が有ることが記憶されている画素を全て抽出した場合には(S186:YES),MFP100は原稿無読取処理を終了する。そして,図7の説明に戻り,S164の原稿無読取処理の後,MFP100は異物が有ることが記憶されている画素が有るか否かを判断する(S165)。   When all the pixels in which it is stored that there is a foreign object are extracted (S186: YES), the MFP 100 ends the document non-reading process. Returning to the description of FIG. 7, after the original non-reading process in S <b> 164, the MFP 100 determines whether there is a pixel in which it is stored that there is a foreign object (S <b> 165).

異物が有ることが記憶されている画素が有る場合(S165:YES),MFP100は原稿の搬送動作を停止する(S175)。すなわち,新たに原稿トレイ21にセットされた原稿の搬送を開始しない。S175は,停止処理の一例である。   If there is a pixel in which it is stored that there is a foreign object (S165: YES), the MFP 100 stops the document transport operation (S175). That is, the conveyance of the original newly set on the original tray 21 is not started. S175 is an example of a stop process.

S175の後,MFP100は,読取位置に異物が有る旨のメッセージを操作パネル40に通知させる(S176)。例えば,タッチパネル等の表示部にメッセージを表示する。また,音声ガイダンスを流してもよい。メッセージには,異物が有る位置の情報も通知するとよい。S175とS176とは,逆順であっても同時であってもよい。S176は,通知処理の一例である。   After S175, the MFP 100 notifies the operation panel 40 of a message indicating that there is a foreign object at the reading position (S176). For example, a message is displayed on a display unit such as a touch panel. In addition, voice guidance may be played. The message should also be notified of information on the position where the foreign object is present. S175 and S176 may be in reverse order or simultaneously. S176 is an example of a notification process.

S176の後,あるいは異物が有ることが記憶されている画素が無ければ(S165:NO),MFP100は異物検知処理を終了する。さらに,図4の説明に戻り,S107の異物検知処理の後,MFP100は読取処理を終了する。   After S176, or if there is no pixel that stores the presence of foreign matter (S165: NO), MFP 100 ends the foreign matter detection process. Furthermore, returning to the description of FIG. 4, after the foreign object detection process in S <b> 107, the MFP 100 ends the reading process.

すなわち,読取位置に異物が有る場合には,複数の原稿を読み取ったとしても,異物が有る画素ではどのラインでも同じような黒色の範囲内での画素値が得られる。そのため,読取結果に変化が生じない。一方で異物が無い画素では,複数の原稿を読み取ると,読取結果に変化が生じる。そこで,第1の形態のMFP100では,複数の読取結果を通じて,下地色を含まない黒色の範囲で変化が無い画素について,画像ではなく異物と判断する。そのため,原稿の読み取り前に原稿の無い状態を読み取った読取結果や最初の1枚目の原稿の読取結果に基づいて異物を判断する場合と比較して,高精度に異物の判断が行われる。   That is, when there is a foreign object at the reading position, even if a plurality of originals are read, a pixel value within the same black range is obtained for any line with a foreign object. For this reason, the reading result does not change. On the other hand, in a pixel having no foreign matter, when a plurality of originals are read, the reading result changes. Therefore, in the MFP 100 according to the first embodiment, through a plurality of reading results, a pixel that does not change in a black range that does not include the background color is determined to be a foreign object, not an image. For this reason, foreign matter determination is performed with higher accuracy than when a foreign matter is determined based on a reading result obtained by reading a state where there is no document before reading a document or a reading result of the first original document.

また,原稿搬送中に異物が除去された場合に,MFP100は異物が無いと判断できる。その結果,MFP100は原稿搬送の停止等の無駄な動作を行わなくて済む。一方で,原稿搬送中に異物が混入した場合に,MFP100は異物が有ると判断できる。その結果,MFP100は原稿搬送の停止等の有益な動作を行うことができる。そのため,読取位置の状態に適した動作が期待できる。   In addition, when a foreign object is removed during document conveyance, MFP 100 can determine that there is no foreign object. As a result, the MFP 100 does not need to perform useless operations such as stopping document conveyance. On the other hand, if a foreign object is mixed during document conveyance, MFP 100 can determine that there is a foreign object. As a result, the MFP 100 can perform a beneficial operation such as stopping document conveyance. Therefore, an operation suitable for the reading position can be expected.

続いて,MFP100の制御の第2の形態について説明する。第2の形態では,複数の原稿の読取結果のうち異物の可能性がある読取結果の割合に応じて,画素ごとの変化の有無を判断する。この点,複数の原稿の読取結果のうち異物ではない読取結果の有無に応じて,画素ごとの変化の有無を判断する第1の形態と異なる。   Next, a second form of control of MFP 100 will be described. In the second embodiment, whether or not there is a change for each pixel is determined according to the ratio of reading results that may be a foreign substance among the reading results of a plurality of documents. This is different from the first embodiment in which the presence / absence of a change for each pixel is determined according to the presence / absence of a non-foreign reading result among a plurality of original reading results.

第2の形態では,異物の可能性がある読取結果の割合を取得するため,MFP100は,読取結果の全ライン数をカウントするラインカウンタを有している。さらに,主走査方向の画素ごとに,異物の可能性がある画素をカウントする異物カウンタを有している。そして,各カウンタは,S102での異物フラグを初期化するタイミングで0に初期化される。   In the second embodiment, the MFP 100 has a line counter that counts the total number of lines of the read result in order to acquire the ratio of the read result that may be a foreign object. In addition, each pixel in the main scanning direction has a foreign matter counter that counts pixels that may be foreign matter. Each counter is initialized to 0 at the timing of initializing the foreign object flag in S102.

図9は,第2の形態のADF読取処理の手順を示している。図9のフローチャート中,第1の形態(図5参照)と同じ処理については同じ符号を付して説明を省略する。   FIG. 9 shows the procedure of the ADF reading process of the second embodiment. In the flowchart of FIG. 9, the same processes as those of the first embodiment (see FIG. 5) are denoted by the same reference numerals, and the description thereof is omitted.

第2の形態のADF読取処理では,S123にて1ライン抽出した後,MFP100はラインカウンタを1つ加算する(S223)。このラインカウンタのカウントアップを,原稿1枚分の全ラインで行い,さらに複数の原稿の読み取りにおいて継続してカウントアップする。これにより,複数の原稿の読取結果の総ライン数が得られる。なお,S121にて記憶される画像情報のバックアップには,ラインカウンタの値と,各画素の異物カウンタの値も含まれる。   In the second form of ADF reading processing, after extracting one line in S123, the MFP 100 adds one line counter (S223). The line counter is counted up for all the lines of one original, and further counted up for reading a plurality of originals. Thereby, the total number of lines of the read results of a plurality of documents can be obtained. Note that the backup of the image information stored in S121 includes the value of the line counter and the value of the foreign matter counter of each pixel.

そして,画素値を抽出し,当該画素値が異物閾値よりも大きくない場合(S125:NO),すなわち異物の可能性がある場合,MFP100は異物カウンタを1つ加算する(S231)。この異物カウンタのカウントアップを,異物の可能性がある度に行い,さらに複数の原稿の読み取りにおいて継続してカウントアップする。これにより,画素ごとに,副走査方向の読取結果について,異物の可能性がある画素の総画素数が得られる。   Then, the pixel value is extracted, and when the pixel value is not larger than the foreign object threshold (S125: NO), that is, when there is a possibility of the foreign object, the MFP 100 adds one foreign object counter (S231). This foreign matter counter is counted up every time there is a possibility of foreign matter, and further counted up when reading a plurality of documents. As a result, the total number of pixels that may be a foreign object is obtained for each pixel in the reading result in the sub-scanning direction.

図10は,第2の形態の異物検知処理の手順を示している。図10のフローチャート中,第1の形態(図7参照)と同じ処理については同じ符号を付して説明を省略する。   FIG. 10 shows the procedure of the foreign matter detection process of the second embodiment. In the flowchart of FIG. 10, the same processes as those of the first embodiment (see FIG. 7) are denoted by the same reference numerals and description thereof is omitted.

第2の形態の異物検知処理では,1つの画素の画素情報を抽出し(S161),その抽出した画素に対応する異物フラグがオンであった場合(S162:YES),MFP100はラインカウンタの値と,抽出した画素に対応する異物カウンタの値とを読み出し,全ライン中の異物画素の割合である異物割合を算出する(S271)。そして,異物割合が,画素の変化の有無を判断するための第2変化閾値よりも大きいか否かを判断する(S272)。第2変化閾値は,黒色に近い色と判定された割合が多い画素が異物か否かを判断するための値であり,例えば95%が設定される。   In the foreign object detection process of the second form, pixel information of one pixel is extracted (S161), and when the foreign object flag corresponding to the extracted pixel is on (S162: YES), the MFP 100 determines the value of the line counter. Then, the foreign substance counter value corresponding to the extracted pixel is read, and the foreign substance ratio which is the ratio of the foreign substance pixel in all lines is calculated (S271). Then, it is determined whether or not the foreign matter ratio is larger than a second change threshold value for determining whether or not there is a change in pixels (S272). The second change threshold value is a value for determining whether or not a pixel having a high ratio determined to be close to black is a foreign object, and is set to 95%, for example.

異物割合が第2変化閾値よりも大きい場合(S272:YES),該当画素について変化が殆ど無く,MFP100は複数枚の原稿を通じて同じ情報を読み取ったことになる。そのため,MFP100は,読取位置に異物が有ると判断し,異物が有る旨である異物情報を記憶する(S173)。   When the foreign matter ratio is larger than the second change threshold (S272: YES), there is almost no change in the corresponding pixel, and the MFP 100 has read the same information through a plurality of originals. Therefore, the MFP 100 determines that there is a foreign object at the reading position, and stores foreign object information indicating that there is a foreign object (S173).

一方,異物割合が第2変化閾値よりも大きくない場合(S272:NO),画像の情報を読み取った可能性がある。そのため,MFP100は異物が有る旨である異物情報を記憶しない。これにより,MFP100は,複数の原稿の読取結果のうち異物の可能性がある読取結果の割合に応じて,画素ごとの異物の有無を判断できる。   On the other hand, if the foreign matter ratio is not greater than the second change threshold (S272: NO), there is a possibility that the image information has been read. Therefore, MFP 100 does not store foreign object information indicating that there is a foreign object. As a result, the MFP 100 can determine the presence or absence of foreign matter for each pixel according to the ratio of read results that may be foreign matter among the reading results of a plurality of documents.

なお,第2の形態では,複数の原稿の読取結果のうち異物の可能性がある読取結果の割合に応じて,画素ごとの異物の有無を判断しているが,割合に限るものではない。すなわち,異物カウンタの値をそのまま利用し,異物カウンタの値と,原稿の読取量に応じて設定される閾値との比較によって,画素ごとの異物の有無を判断してもよい。   In the second embodiment, the presence / absence of foreign matter for each pixel is determined according to the proportion of read results that may be foreign matter among the reading results of a plurality of documents. However, the present invention is not limited to this proportion. That is, the value of the foreign matter counter may be used as it is, and the presence or absence of foreign matter may be determined for each pixel by comparing the value of the foreign matter counter with a threshold value set according to the reading amount of the document.

すなわち,MFP100が複数の原稿を読み取る間に,異物が移動することもある。そこで,第2の形態のように,複数の原稿の読取結果のうち,所定数以上あるいは所定割合以上で画素ごとの異物の有無を判断することで,より正確に異物の有無を判断できる。   That is, the foreign object may move while the MFP 100 reads a plurality of documents. Therefore, as in the second embodiment, it is possible to more accurately determine the presence / absence of a foreign substance by determining the presence / absence of a foreign substance for each pixel at a predetermined number or more or a predetermined ratio among a plurality of document reading results.

例えば,第2変化閾値を85%とした場合に,10枚の原稿の搬送中,9枚目の原稿と10枚目の原稿との間に異物が除去されたとしても,MFP100は異物が有ると判断できる。その結果,MFP100はノイズ画像の除去等の画像処理を行うことができる。そのため,MFP100は読取位置の状態に適した動作を行うことが期待できる。   For example, when the second change threshold is set to 85%, even if a foreign object is removed between the ninth document and the tenth document during conveyance of the tenth document, the MFP 100 has a foreign object. It can be judged. As a result, the MFP 100 can perform image processing such as noise image removal. Therefore, the MFP 100 can be expected to perform an operation suitable for the state of the reading position.

続いて,MFP100の制御の第3の形態について説明する。第3の形態では,原稿トレイ21にセットされた複数枚の原稿を順次読み取る際,所定枚数以上の原稿を読み終えた後は,1枚の原稿を読み終える度に異物検知処理を実行する。この点,原稿トレイ21にセットされた複数枚の原稿を全て読み終えた後に異物検知処理を行う第1の形態と異なる。   Subsequently, a third form of control of the MFP 100 will be described. In the third embodiment, when a plurality of documents set on the document tray 21 are sequentially read, a foreign object detection process is executed every time one document is read after reading a predetermined number of documents or more. This is different from the first embodiment in which the foreign object detection process is performed after all the plurality of documents set on the document tray 21 have been read.

図11は,第3の形態の読取処理の手順を示している。図11のフローチャート中,第1の形態(図5参照)と同じ処理については同じ符号を付して説明を省略する。   FIG. 11 shows the procedure of the reading process of the third embodiment. In the flowchart of FIG. 11, the same processes as those of the first embodiment (see FIG. 5) are denoted by the same reference numerals and description thereof is omitted.

第3の読取処理では,S104のADF読取処理にて1枚分の原稿の読み取りが完了した後,MFP100は,所定枚数以上の原稿の読み取りを行ったか否かを判断する(S106)。所定枚数以上の原稿の読み取りを行っていない場合には(S106:NO),MFP100は異物の検知を行うことなく,次の原稿が有るか否かを判断し(S105),次の原稿が有れば(S105:YES),S103に移行して次の原稿の搬送を行い,次の原稿が無ければ(S105:NO),読取処理を終了する。   In the third reading process, after the reading of one original is completed in the ADF reading process of S104, the MFP 100 determines whether or not a predetermined number of originals have been read (S106). If a predetermined number of originals have not been read (S106: NO), the MFP 100 determines whether there is a next original without detecting a foreign object (S105), and the next original is present. If so (S105: YES), the process proceeds to S103 to carry the next document. If there is no next document (S105: NO), the reading process is terminated.

一方,所定枚数以上の原稿の読み取りを行っている場合には(S106:YES),MFP100は異物を検知する異物検知処理を行う(S107)。そして,S107の異物検知処理の中で,異物が有ると判定されれば,原稿搬送を停止し(S175),異物が有る旨を報知する(S176)。   On the other hand, when the document of a predetermined number or more is being read (S106: YES), the MFP 100 performs a foreign object detection process for detecting a foreign object (S107). If it is determined in step S107 that there is a foreign object, the conveyance of the document is stopped (S175), and a notification is made that there is a foreign object (S176).

すなわち,第3の形態では,原稿トレイ21にセットされた複数枚の原稿を全て読み終える前であっても,異物が有ると判定されれば原稿の搬送停止や報知が行われる。そのため,異物が有る可能性が高い状態で読み取りを行うことを回避でき,低画質の読み取りを低減できる。   In other words, in the third embodiment, even before all the plurality of documents set on the document tray 21 have been read, if it is determined that there is a foreign object, the conveyance of the document is stopped and notification is performed. Therefore, it is possible to avoid reading in a state where there is a high possibility that there is a foreign object, and it is possible to reduce reading with low image quality.

なお,本実施の形態は単なる例示にすぎず,本発明を何ら限定するものではない。したがって本発明は当然に,その要旨を逸脱しない範囲内で種々の改良,変形が可能である。例えば,MFPに限らず,複写機,スキャナ,FAX等,読取機能を備えるものであれば適用可能である。また,実施の形態に記載された数値は,一例であり,これに限るものではない。   Note that this embodiment is merely an example, and does not limit the present invention. Therefore, the present invention can naturally be improved and modified in various ways without departing from the gist thereof. For example, the present invention is not limited to the MFP, and can be applied to any apparatus having a reading function such as a copying machine, a scanner, and a FAX. The numerical values described in the embodiments are merely examples, and the present invention is not limited to these.

また,実施の形態では,読取指示を受け付けたタイミングで,毎回,異物の検知を実行しているが,実行タイミングはこれに限るものではない。例えば,前回異物の検知を行ったときから所定時間が経過していることを実行条件に含めてもよいし,読取指示の複数回に1回のタイミングで実行してもよい。また,電源投入や,ユーザ指定のタイミング等,読取指示とは別のタイミングで実行してもよい。なお,実施の形態のように,読取指示を受け付けたタイミングで毎回行うことで,読取位置の異物をより早期に検知できる。   In the embodiment, the foreign object detection is executed every time when the reading instruction is received, but the execution timing is not limited to this. For example, it may be included in the execution condition that a predetermined time has elapsed since the last detection of foreign matter, or may be executed at a timing once for a plurality of reading instructions. Alternatively, it may be executed at a timing different from the reading instruction such as power-on or user-specified timing. As in the embodiment, the foreign matter at the reading position can be detected earlier by performing it every time when the reading instruction is received.

また,実施の形態では,ADF方式の読み取りに本発明を適用しているが,フラットベッド方式の読み取りにも適用可能である。この場合,MFP100は,フラットベッド方式で複数の原稿を読み取り,各画素について変化の有無を判断して異物を検知する。   In the embodiment, the present invention is applied to the ADF system reading, but the present invention is also applicable to the flat bed system reading. In this case, the MFP 100 reads a plurality of originals by the flat bed method, determines the presence / absence of a change for each pixel, and detects a foreign object.

また,実施の形態では,ADF読取処理にて複数の原稿を読み取る際の各読取条件は同じであるが,原稿ごとに異なっていてもよい。すなわち,解像度やカラー設定が異なっていたとしても,その条件を把握していれば,異物の有無を判断できる。   In the embodiment, the reading conditions for reading a plurality of documents in the ADF reading process are the same, but may be different for each document. That is, even if the resolution and color setting are different, if the conditions are grasped, the presence or absence of foreign matter can be determined.

また,実施の形態では,異物閾値よりも大きい場合の画素値の最大値と最小値とを記憶し,その画素値差が変化閾値よりも小さい場合に異物が有ると判定しているが,画素値差にかかわらず異物フラグがオンであれば異物が有ると判定してもよい。この場合,S131からS134までの処理,およびS171とS172の処理は不要である。なお,黒色に近い色の模様が副走査方向に連続する場合もあるため,実施の形態のように画素値差を判断する方が,異物の有無をより確実に判断できる。   Further, in the embodiment, the maximum value and the minimum value of the pixel value when it is larger than the foreign substance threshold value are stored, and it is determined that there is a foreign substance when the pixel value difference is smaller than the change threshold value. If the foreign object flag is on regardless of the value difference, it may be determined that there is a foreign object. In this case, the processing from S131 to S134 and the processing of S171 and S172 are unnecessary. Since a pattern with a color close to black may continue in the sub-scanning direction, it is possible to more reliably determine the presence or absence of foreign matter by determining the pixel value difference as in the embodiment.

また,実施の形態では,原稿の傾きを取得し,先行原稿の傾きと同じであれば,現原稿に基づく画素情報を利用していないが,原稿の傾きにかかわらず全原稿の画像情報を利用してもよい。この場合,S129の傾き判定処理,およびS121とS130の処理は不要である。なお,副走査方向に直線が入る模様の場合もあるため,実施の形態のように原稿の傾きを判断する方が,より誤判断を防止できる。   In the embodiment, if the inclination of the original is acquired and the same as the inclination of the preceding original, the pixel information based on the current original is not used, but the image information of all originals is used regardless of the inclination of the original. May be. In this case, the inclination determination process of S129 and the processes of S121 and S130 are unnecessary. Since there may be a pattern in which a straight line is inserted in the sub-scanning direction, it is possible to prevent misjudgment more by judging the inclination of the document as in the embodiment.

また,実施の形態では,複数の原稿の読取結果に基づいて異物が有ると判断された場合に,原稿が無い状態でもう一度読み取り,異物の有無を再判断しているが,異物の有無の再判断は行わなくてもよい。この場合,S164の原稿無読取処理は不要である。なお,実施の形態のように異物の判断を2回行うことで,異物の有無をより確実に判断できる。また,実施の形態では,異物が有ると判断された画素について,異物の判断を2回行っているが,全ての画素について異物の判断を2回行ってもよい。ただし,異物が有ると判断された画素を判定することで,全ての画素を判定する場合と比較して,原稿無読取処理にかかる時間を短縮できる。   Further, in the embodiment, when it is determined that there is a foreign object based on the reading results of a plurality of originals, the document is read again in the absence of the original and the presence / absence of the foreign object is determined again. It is not necessary to make a judgment. In this case, the document non-reading process of S164 is unnecessary. Note that the presence or absence of a foreign object can be more reliably determined by performing the foreign object determination twice as in the embodiment. Further, in the embodiment, foreign matter determination is performed twice for pixels that are determined to have foreign matters, but foreign matter determination may be performed twice for all pixels. However, by determining the pixels that are determined to have foreign matter, it is possible to reduce the time required for the document non-reading process as compared to the case of determining all the pixels.

また,実施の形態では,異物が有ると判断された場合に,S175の原稿搬送の停止とS176の異物有りの通知とを行っているが,これらに限るものではない。例えば,読み取った画像データのうち異物が検知された位置に対応する縦筋の画像を地色に変換する画像処理を行ってもよい。また,S175とS176とは必ずしも行う必要はなく,いずれか一方のみを行ってもよいし,両方とも行わなくてもよい。   In the embodiment, when it is determined that there is a foreign object, the document conveyance stop in S175 and the notification of the presence of a foreign object in S176 are performed. However, the present invention is not limited to these. For example, image processing for converting a vertical stripe image corresponding to a position where a foreign object is detected in the read image data into a ground color may be performed. Further, S175 and S176 are not necessarily performed, and only one of them may be performed, or both may not be performed.

また,実施の形態に開示されている処理は,単一のCPU,複数のCPU,ASICなどのハードウェア,またはそれらの組み合わせで実行されてもよい。また,実施の形態に開示されている処理は,その処理を実行するためのプログラムを記録した記録媒体,または方法等の種々の態様で実現することができる。   The processing disclosed in the embodiments may be executed by a single CPU, a plurality of CPUs, hardware such as an ASIC, or a combination thereof. Further, the processing disclosed in the embodiment can be realized in various modes such as a recording medium or a method recording a program for executing the processing.

2 画像読取部
15 イメージセンサ
20 ADF
31 CPU
100 MFP
2 Image reading unit 15 Image sensor 20 ADF
31 CPU
100 MFP

Claims (11)

画像を読み取る読取部と,
制御部と,
を備え,
前記制御部は,
原稿の画像を,前記読取部に読み取らせる読取処理と,
前記読取処理による複数の原稿の読取結果を通じて,画素値が黒色の範囲内に有る画素があれば,異物があると判定する異物判定処理と,
を実行することを特徴とする読取装置。
A reading unit for reading an image;
A control unit;
With
The controller is
A reading process for causing the reading unit to read an image of a document;
A foreign substance determination process for determining that there is a foreign substance if there is a pixel whose pixel value is in a black range through the reading results of a plurality of documents by the reading process;
The reading apparatus characterized by performing.
請求項1に記載する読取装置において,
前記制御部は,
前記異物判定処理では,前記画素値として,輝度成分あるいは特定色成分に基づいて判定することを特徴とする読取装置。
The reading device according to claim 1,
The controller is
In the foreign matter determination process, the pixel value is determined based on a luminance component or a specific color component.
請求項2に記載する読取装置において,
前記制御部は,
前記異物判定処理では,ある画素について輝度成分あるいは特定色成分の値が,前記複数の原稿の読取結果の全てで前記黒色の範囲内に収まる場合に,当該画素について異物が有ると判定することを特徴とする読取装置。
The reading device according to claim 2,
The controller is
In the foreign matter determination process, when the value of the luminance component or specific color component for a certain pixel falls within the black range in all the reading results of the plurality of documents, it is determined that there is foreign matter for the pixel. Characteristic reading device.
請求項3に記載する読取装置において,
前記制御部は,
前記異物判定処理では,ある画素について輝度成分あるいは特定色成分の値が,前記複数の原稿の読取結果の全てで前記黒色の範囲内に収まる場合であって,さらに輝度成分あるいは特定色成分の最大値と最小値との差が閾値以下の場合に,当該画素について異物が有ると判定することを特徴とする読取装置。
The reading device according to claim 3,
The controller is
In the foreign matter determination process, the value of the luminance component or specific color component for a certain pixel falls within the black range in all of the reading results of the plurality of documents, and the maximum luminance component or specific color component is further increased. A reading apparatus, wherein when a difference between a value and a minimum value is equal to or smaller than a threshold value, it is determined that there is a foreign substance for the pixel.
請求項2に記載する読取装置において,
前記制御部は,
前記異物判定処理では,ある画素について複数の原稿の読取結果のうち輝度成分あるいは特定色成分の値が前記黒色の範囲内に収まる結果が所定数以上あるいは所定割合以上の場合に,当該画素について異物が有ると判定することを特徴とする読取装置。
The reading device according to claim 2,
The controller is
In the foreign matter determination process, when the result of the luminance component or the specific color component being within the black range among a plurality of document reading results for a certain pixel is a predetermined number or more or a predetermined ratio, the foreign matter is determined for the pixel. It is determined that there is a reader.
請求項1から請求項5のいずれか1つに記載する読取装置において,
前記制御部は,
原稿の傾きを検出する検出処理を実行し,
前記異物判定処理では,先行の原稿と後続の原稿とで傾きが変化していない場合に,当該後続の原稿の読取結果を異物の判定に利用しないことを特徴とする読取装置。
In the reading device according to any one of claims 1 to 5,
The controller is
Execute detection processing to detect the skew of the document,
In the foreign matter determination process, when the inclination of the preceding document and the subsequent document is not changed, the reading result of the subsequent document is not used for foreign matter determination.
請求項1から請求項6のいずれか1つに記載する読取装置において,
前記制御部は,
前記異物判定処理にて異物が有ると判定された画素があった場合に,前記読取部の読取位置に原稿が無い状態で,前記読取部に読み取らせる第2読取処理と,
前記第2読取処理の読取結果に基づいて,異物が有るか否かを画素ごとに判定する第2異物判定処理と,
を実行し,
前記異物判定処理では,複数の原稿の読取結果を通じて画素値が黒色の範囲内に有る画素について,さらに前記第2異物判定処理にて異物が有ると判定された場合に,当該画素について異物があると判定することを特徴とする読取装置。
In the reading device according to any one of claims 1 to 6,
The controller is
A second reading process for causing the reading unit to read in a state where there is no document at the reading position of the reading unit when there is a pixel determined to have a foreign object in the foreign object determination process;
A second foreign matter determination process for determining for each pixel whether there is a foreign matter based on the reading result of the second reading process;
And
In the foreign matter determination process, if a pixel whose pixel value is within a black range through the reading results of a plurality of originals is further determined as having a foreign matter in the second foreign matter determination process, the pixel has a foreign matter. A reading device characterized by the above.
請求項7に記載する読取装置において,
前記制御部は,
前記第2異物判定処理では,複数の原稿の読取結果を通じて画素値が黒色の範囲内に有る画素を含む一部の領域について,異物が有るか否かを画素ごとに判定することを特徴とする読取装置。
The reading device according to claim 7,
The controller is
In the second foreign matter determination process, it is determined for each pixel whether or not there is foreign matter in a part of the region including pixels whose pixel values are in a black range through a plurality of document reading results. Reader.
請求項1から請求項8のいずれか1つに記載する読取装置において,
前記制御部は,
前記異物判定処理にて異物があると判定された場合に,前記読取処理の実行を停止する停止処理を実行することを特徴とする読取装置。
The reading device according to any one of claims 1 to 8,
The controller is
A reading apparatus that executes stop processing for stopping execution of the reading processing when it is determined in the foreign matter determination processing that there is a foreign material.
請求項1から請求項9のいずれか1つに記載する読取装置において,
前記制御部は,
前記異物判定処理にて異物があると判定された場合に,異物が有ることを通知する通知処理を実行することを特徴とする読取装置。
In the reading device according to any one of claims 1 to 9,
The controller is
A reading apparatus that performs notification processing for notifying that there is a foreign object when it is determined in the foreign object determination processing that there is a foreign object.
請求項1から請求項10のいずれか1つに記載する読取装置において,
原稿を搬送する搬送部を備え,
前記制御部は,
前記読取処理では,前記搬送部にて搬送された原稿の画像を,前記読取部に読み取らせることを特徴とする読取装置。
The reading device according to any one of claims 1 to 10,
It has a transport section that transports the document,
The controller is
In the reading process, the reading unit causes the reading unit to read an image of a document transported by the transport unit.
JP2014091064A 2014-04-25 2014-04-25 Reading device Pending JP2015211308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014091064A JP2015211308A (en) 2014-04-25 2014-04-25 Reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014091064A JP2015211308A (en) 2014-04-25 2014-04-25 Reading device

Publications (1)

Publication Number Publication Date
JP2015211308A true JP2015211308A (en) 2015-11-24

Family

ID=54613222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014091064A Pending JP2015211308A (en) 2014-04-25 2014-04-25 Reading device

Country Status (1)

Country Link
JP (1) JP2015211308A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7505269B2 (en) 2020-05-27 2024-06-25 株式会社リコー Image reading device, image forming device, and foreign object detection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7505269B2 (en) 2020-05-27 2024-06-25 株式会社リコー Image reading device, image forming device, and foreign object detection method

Similar Documents

Publication Publication Date Title
JP7211238B2 (en) Edge detection device, tilt correction device, reading device, image processing device, and edge detection method
US20180160008A1 (en) Image reading apparatus, control method for image reading apparatus, and storage medium
US10038801B2 (en) Image reading apparatus and image forming apparatus
US12041206B2 (en) Image reading apparatus having sensor for detecting shape of fed documents, control method for controlling image reading apparatus, and storage medium having stored therein control method
EP2610678A2 (en) Image scanning apparatus scanning document image and image forming apparatus including image scanning apparatus
US20160187826A1 (en) Sheet Type Detection Device That Ensures Reduced Trouble for Unexecuted Sheet Type Setting, Sheet Type Detection Method, Image Forming Apparatus, and Recording Medium
JP2015198390A (en) Image reading device and image forming apparatus
US11582362B2 (en) Image reading apparatus comprising a processor that detects an abnormal pixel, and outputs an image obtained by a first processing or second processing based on if character recognition processing of a character obtained by first processing is the same as the character obtained by the second processing
JP2015198327A (en) Image reading device, image reading method, and computer program
JP2017073627A (en) Image reading device and image forming apparatus
JP7331492B2 (en) Image reader
JP2016048840A (en) Image reading device and image forming apparatus
JP5481435B2 (en) Image reading apparatus and image forming apparatus
US8717646B2 (en) Image reading device capable of performing rotation process on read image appropriately
US11575797B2 (en) Image reading and forming apparatus with streak correction based on image reading mode
JP4591532B2 (en) Image reading apparatus and image reading method
JP2015211308A (en) Reading device
US11196898B2 (en) Image reading apparatus, method of controlling image reading apparatus, and storage medium
US20180131828A1 (en) Reading apparatus, determination method, and storage medium storing program
JP4609542B2 (en) Image reading apparatus and program
JP6439273B2 (en) Reader and program
JP6809501B2 (en) Image reader, image forming device
JP5306077B2 (en) Image reading device
JP6561732B2 (en) Reader and program
JP6501125B2 (en) Image reading apparatus, image reading method, image forming apparatus, and image reading program