[go: up one dir, main page]

JP2025118004A - Reading device - Google Patents

Reading device

Info

Publication number
JP2025118004A
JP2025118004A JP2024013047A JP2024013047A JP2025118004A JP 2025118004 A JP2025118004 A JP 2025118004A JP 2024013047 A JP2024013047 A JP 2024013047A JP 2024013047 A JP2024013047 A JP 2024013047A JP 2025118004 A JP2025118004 A JP 2025118004A
Authority
JP
Japan
Prior art keywords
reading
block
reading device
read
blocks
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
JP2024013047A
Other languages
Japanese (ja)
Inventor
直行 中村
Naoyuki Nakamura
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 JP2024013047A priority Critical patent/JP2025118004A/en
Publication of JP2025118004A publication Critical patent/JP2025118004A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Scanning Arrangements (AREA)

Abstract

To provide a reading device capable of improving detection accuracy of a position and a size of a foreign substance while suppressing an increase in time required to detect the position and the size of the foreign substance.SOLUTION: A first reading range and a second reading range are read while a reading device is reciprocated in a sub-scanning direction. It is determined whether each of first blocks is a block without foreign substance or a block with foreign substance based on a histogram of luminance values created for each of a plurality of first blocks obtained by dividing a read image of the first reading range (S207 to S209). Further, it is determined whether each of second blocks is a block without foreign substance or a block with foreign substance based on a histogram of luminance values created for each of a plurality of second blocks obtained by dividing the read image of a second reading range (S207 to S209). The second reading range is set to be narrower than the first reading range (S213).SELECTED DRAWING: Figure 6A

Description

本発明は、読取装置に関する。 The present invention relates to a reading device.

従来、読取対象物を光学的に読み取って、読取対象物の画像データを生成する読取装置が提供されている。 Traditionally, reading devices have been provided that optically read an object to be read and generate image data of the object.

読取装置の一例では、透明板を挟んで読取対象物と対向する位置に、光源およびイメージセンサを備える読取デバイスが設けられる。イメージセンサは、主走査方向に配列された複数の受光素子を備えている。また、読取対象物を挟んで透明板と対向する位置に、白色の背景部材が配置される。 In one example of a reading device, a reading device equipped with a light source and an image sensor is placed opposite the object to be read across a transparent plate. The image sensor has multiple light-receiving elements arranged in the main scanning direction. In addition, a white background member is placed opposite the transparent plate across the object to be read.

読取デバイスの光源からの光が読取対象物および背景部材で反射し、その反射光が読取デバイスのイメージセンサに入射すると、各受光素子で光電変換が行われて、各受光素子から受光量に応じた電気信号(電圧)が出力される。各受光素子から出力される電気信号がデジタル値である輝度値(画像データ)にA/D変換されることにより、読取デバイスによる主走査方向の1ライン分の読み取りが達成される。読取対象物の読み取り時には、読取デバイスが主走査方向と直交する副走査方向に移動されつつ、主走査方向の1ラインの読み取りが繰り返されることにより、読取対象物の全体を含む読取範囲が読み取られる。そして、その読取範囲の読取画像から読取対象物の読取画像が識別されて、読取対象物の画像データが生成される。 When light from the reading device's light source is reflected by the object to be read and the background material, and this reflected light enters the reading device's image sensor, photoelectric conversion is performed in each light-receiving element, and an electrical signal (voltage) corresponding to the amount of light received is output from each light-receiving element. The electrical signal output from each light-receiving element is A/D converted into a digital brightness value (image data), thereby achieving reading of one line in the main scanning direction by the reading device. When reading the object to be read, the reading device is moved in the sub-scanning direction perpendicular to the main scanning direction, and reading of one line in the main scanning direction is repeated, reading a reading range that includes the entire object to be read. The image of the object to be read is then identified from the read image of the reading range, and image data of the object to be read is generated.

たとえば、透明板における読取対象物と対向する領域にごみなどの異物が付着していると、その異物が読取対象物の読取画像に写り込むという問題が生じる。また、透明板または背景部材における読取対象物と対向しない領域に異物が付着している場合には、異物が背景部材の読取画像に写り込むことにより、読取対象物の読取画像の識別に支障を来すおそれがある。 For example, if dust or other foreign matter is attached to the area of the transparent plate facing the object to be read, the foreign matter may appear in the read image of the object to be read. Furthermore, if foreign matter is attached to an area of the transparent plate or background member that does not face the object to be read, the foreign matter may appear in the read image of the background member, potentially interfering with the identification of the read image of the object to be read.

そこで、読取対象物が透明板に対向していない状態で、所定の読取範囲を読み取り、その読取範囲の読取画像を解析することにより、異物の有無を検知し、また、異物が存在する場合に、異物の位置および大きさを検出する技術が提案されている(たとえば、特許文献1参照)。 In response, a technology has been proposed in which a predetermined reading range is read when the object to be read is not facing a transparent plate, and the read image of that reading range is analyzed to detect the presence or absence of a foreign object, and if a foreign object is present, its position and size are detected (see, for example, Patent Document 1).

特開2015-211307号公報Japanese Patent Application Laid-Open No. 2015-211307

本発明の目的は、異物の位置および大きさの検出に要する時間の増大を抑制しつつ、異物の位置および大きさの検出精度を向上することができる、読取装置を提供することである。 The object of the present invention is to provide a reading device that can improve the accuracy of detecting the position and size of a foreign object while minimizing the increase in the time required to detect the position and size of the foreign object.

前記の目的を達成するため、本発明の一の局面に係る読取装置は、透明板と、透明板に対する一方に設けられ、透明板に向けて光を出射する光源および主走査方向に配列された複数の受光素子を有する読取デバイスと、主走査方向と交差し、かつ透明板に沿った副走査方向に読取デバイスを移動させる移動機構と、透明板に対する他方に設けられ、透明板に対向して配置される白色の背景部材と、制御部とを備え、制御部は、読取デバイスを副走査方向の一方に移動させつつ、読取デバイスの光源から光を出射させて、受光素子から出力される電気信号を輝度値に変換することにより、第1読取範囲を読み取る第1読取処理と、第1読取範囲の読取画像を分割した複数の第1ブロックごとに作成された輝度値のヒストグラムに基づいて、第1ブロックのそれぞれが背景部材の読取画像とは異なる読取画像を含む異物ありブロックであるか否かを判定する第1判定処理と、第1判定処理の判定結果から、第1読取範囲よりも狭い範囲であって、異物ありブロックであると判定された第1ブロックを含む第2読取範囲を設定する設定処理と、読取デバイスを副走査方向の他方に移動させつつ、読取デバイスの光源から光を出射させて、受光素子から出力される電気信号を輝度値に変換することにより、第2読取範囲を読み取る第2読取処理と、第2読取範囲の読取画像を分割した複数の第2ブロックごとに作成された輝度値のヒストグラムに基づいて、第2ブロックのそれぞれが異物ありブロックであるか否かを判定する第2判定処理とを実行する。 In order to achieve the above-mentioned object, a reading device according to one aspect of the present invention comprises a transparent plate, a reading device provided on one side of the transparent plate and having a light source that emits light toward the transparent plate and a plurality of light receiving elements arranged in a main scanning direction, a movement mechanism that moves the reading device in a sub-scanning direction that intersects the main scanning direction and follows the transparent plate, a white background member that is provided on the other side of the transparent plate and is arranged opposite the transparent plate, and a control unit. The control unit performs a first reading process that reads a first reading range by emitting light from the light source of the reading device and converting electrical signals output from the light receiving elements into brightness values while moving the reading device in one side of the sub-scanning direction, and a histogram of brightness values created for each of a plurality of first blocks into which the read image of the first reading range is divided. a first determination process that determines whether each of the first blocks is a foreign substance-containing block that includes a read image different from the read image of the background member based on the result of the first determination process; a setting process that sets a second read range that is narrower than the first read range and includes the first blocks determined to be foreign substance-containing blocks based on the determination result of the first determination process; a second read process that reads the second read range by emitting light from the light source of the read device while moving the read device in the other direction of the sub-scanning direction and converting the electrical signal output from the light receiving element into a brightness value; and a second determination process that determines whether each of the second blocks is a foreign substance-containing block based on a brightness value histogram created for each of the multiple second blocks obtained by dividing the read image of the second read range.

この構成によれば、第1読取範囲が読み取られる。そして、第1読取範囲の読取画像が複数の第1ブロックに分割されて、第1ブロックごとに輝度値のヒストグラムが作成される。そのヒストグラムに基づいて、第1ブロックのそれぞれについて、背景部材の読取画像とは異なる読取画像を含む異物ありブロックであるか否かが判定される。 With this configuration, the first reading range is read. The read image of the first reading range is then divided into multiple first blocks, and a brightness histogram is created for each first block. Based on the histogram, it is determined whether each first block is a foreign object block that contains a read image that differs from the read image of the background member.

その後、第2読取範囲が設定されて、第2読取範囲が読み取られる。そして、第2読取範囲の読取画像が複数の第2ブロックに分割されて、第2ブロックごとに輝度値のヒストグラムが作成される。そのヒストグラムに基づいて、第2ブロックのそれぞれについて、異物ありブロックであるか否かが判定される。 Then, a second reading range is set and the second reading range is read. The read image of the second reading range is then divided into multiple second blocks, and a histogram of brightness values is created for each second block. Based on this histogram, it is determined whether each second block contains a foreign object.

第1読取範囲の読み取りでは、読取デバイスが副走査方向の一方に移動される。第1読取範囲の読み取り後、読取デバイスを元の位置(第1読取範囲の読み取り前の位置)に戻す必要があるが、そのときの読取デバイスの移動を利用して、第2読取範囲が読み取られる。これにより、読取デバイスを副走査方向に往復動させる間に、第1読取範囲の読み取りと第2読取範囲の読み取りとを達成することができる。 To read the first reading range, the reading device is moved to one side in the sub-scanning direction. After reading the first reading range, the reading device must be returned to its original position (the position before reading the first reading range), and the movement of the reading device at that time is used to read the second reading range. This makes it possible to read both the first reading range and the second reading range while the reading device is reciprocated in the sub-scanning direction.

第2読取範囲は、異物ありブロックであると判定された第1ブロックを含む範囲であって、第1読取範囲よりも狭い範囲に設定される。 The second reading range is set to a range that includes the first block determined to be a block containing foreign matter, and is narrower than the first reading range.

これにより、第2ブロックのサイズを第1ブロックのサイズと同じに設定した場合には、第2ブロックの数が第1ブロックの数よりも減るので、第2ブロックのそれぞれが異物ありブロックであるか否かを判定するのに要する時間を第1ブロックのそれぞれが異物ありブロックであるか否かを判定するのに要する時間よりも短縮できる。また、第2読取範囲が第1読取範囲よりも狭いことにより、第2ブロックの位置が第1ブロックの位置からずれるので、異物ありブロックであると判定された第1ブロックの一部と異物ありブロックであると判定された第2ブロックの一部とが重複する場合、その重複する部分の位置およびサイズを異物の位置およびサイズとして検出できる。その結果、異物の位置および大きさを精度よく検出することができる。 As a result, when the size of the second blocks is set to the same as the size of the first blocks, the number of second blocks is reduced compared to the number of first blocks, and the time required to determine whether each second block is a foreign object block can be reduced compared to the time required to determine whether each first block is a foreign object block. Furthermore, because the second read range is narrower than the first read range, the position of the second block is shifted from the position of the first block. Therefore, if a portion of a first block determined to be a foreign object block overlaps with a portion of a second block determined to be a foreign object block, the position and size of the overlapping portion can be detected as the position and size of the foreign object. As a result, the position and size of the foreign object can be detected with high accuracy.

一方、第2ブロックのサイズを第1ブロックのサイズよりも小さく設定した場合には、第2ブロックが異物ありブロックであるか否かの判定結果から異物の位置および大きさをより詳細に検出(精度よく検出)することができる。この場合であっても、第2読取範囲が第1読取範囲よりも狭められることにより、第2ブロックの数の増大を抑制でき、第2ブロックのそれぞれが異物ありブロックであるか否かを判定するのに要する時間の増大を抑制することができる。 On the other hand, if the size of the second blocks is set smaller than the size of the first blocks, the position and size of the foreign object can be detected in more detail (with greater accuracy) from the results of determining whether the second blocks are foreign object blocks. Even in this case, by making the second reading range narrower than the first reading range, an increase in the number of second blocks can be suppressed, and an increase in the time required to determine whether each second block is a foreign object block can be suppressed.

よって、異物の位置および大きさの検出に要する時間の増大を抑制しつつ、異物の位置および大きさの検出精度を向上することができる。 This makes it possible to improve the accuracy of detecting the position and size of a foreign object while minimizing the increase in the time required to detect the position and size of the foreign object.

本発明の他の局面に係る読取装置は、透明板と、透明板に対する一方に設けられ、透明板に向けて光を出射する光源および主走査方向に配列された複数の受光素子を有する読取デバイスと、主走査方向と交差し、かつ透明板に沿った副走査方向に読取デバイスを移動させる移動機構と、透明板に対する他方に設けられ、透明板に対向して配置される白色の背景部材と、制御部とを備え、制御部は、読取デバイスを副走査方向の一方に移動させつつ、読取デバイスの光源から光を出射させて、受光素子から出力される電気信号を輝度値に変換することにより、第1読取範囲を読み取る第1読取処理と、第1読取範囲の読取画像を分割した複数の第1ブロックごとに作成された輝度値のヒストグラムに基づいて、第1ブロックのそれぞれが背景部材の読取画像とは異なる読取画像を含む異物ありブロックであるか否かを判定する第1判定処理と、読取デバイスを副走査方向の他方に移動させつつ、読取デバイスの光源から光を出射させて、受光素子から出力される電気信号を輝度値に変換することにより、第1読取範囲を読み取る第2読取処理と、第1読取範囲の読取画像を分割した複数の第2ブロックごとに作成された輝度値のヒストグラムに基づいて、第2ブロックのそれぞれが異物ありブロックであるか否かを判定する第2判定処理とを実行し、第1ブロックの位置と第2ブロックの位置とをずらして設定する。 A reading device according to another aspect of the present invention includes a transparent plate, a reading device provided on one side of the transparent plate and having a light source that emits light toward the transparent plate and a plurality of light receiving elements arranged in a main scanning direction, a movement mechanism that moves the reading device in a sub-scanning direction that intersects the main scanning direction and follows the transparent plate, a white background member that is provided on the other side of the transparent plate and is arranged opposite the transparent plate, and a control unit. The control unit performs a first reading process that reads a first reading range by emitting light from the light source of the reading device and converting electrical signals output from the light receiving elements into brightness values while moving the reading device in one side of the sub-scanning direction, and a second reading process that reads a first reading range into a plurality of first blocks into which the read image of the first reading range is divided. A first determination process is performed to determine whether each of the first blocks is a foreign substance-containing block containing a read image different from the read image of the background member based on a histogram of brightness values created in the first determination process. A second determination process is performed to read the first read range by moving the reading device in the other direction of the sub-scanning direction, emitting light from the light source of the reading device, and converting the electrical signal output from the light-receiving element into a brightness value. A second determination process is performed to determine whether each of the second blocks is a foreign substance-containing block based on a histogram of brightness values created for each of multiple second blocks obtained by dividing the read image of the first read range, and the positions of the first blocks and the second blocks are shifted and set.

この構成によれば、読取デバイスが副走査方向の一方に移動されて、第1読取範囲が読み取られる。そして、第1読取範囲の読取画像が複数の第1ブロックに分割されて、第1ブロックごとに輝度値のヒストグラムが作成される。そのヒストグラムに基づいて、第1ブロックのそれぞれについて、背景部材の読取画像とは異なる読取画像を含む異物ありブロックであるか否かが判定される。 With this configuration, the reading device is moved to one side in the sub-scanning direction and the first reading range is read. The read image of the first reading range is then divided into multiple first blocks, and a brightness histogram is created for each first block. Based on the histogram, it is determined for each first block whether it is a foreign object block that contains a read image that differs from the read image of the background member.

その後、読取デバイスを元の位置(第1読取範囲の読み取り前の位置)に戻す必要があるが、そのときの読取デバイスの移動を利用して、第1読取範囲が読み取られる。これにより、読取デバイスを副走査方向に往復動させる間に、第1読取範囲を2回読み取ることができる。 The reading device then needs to be returned to its original position (the position before reading the first reading range), and the movement of the reading device at that time is used to read the first reading range. This allows the first reading range to be read twice while the reading device is moved back and forth in the sub-scanning direction.

そして、第1読取範囲の2回目の読み取りによる読取画像が複数の第2ブロックに分割されて、第2ブロックごとに輝度値のヒストグラムが作成される。そのヒストグラムに基づいて、第2ブロックのそれぞれについて、異物ありブロックであるか否かが判定される。 Then, the image read from the second reading of the first reading range is divided into multiple second blocks, and a histogram of brightness values is created for each second block. Based on this histogram, it is determined whether each second block contains a foreign object.

第2ブロックの位置は、第1ブロックの位置からずらして設定される。これにより、異物ありブロックであると判定された第1ブロックの一部と異物ありブロックであると判定された第2ブロックの一部とが重複する場合、その重複する部分の位置およびサイズを異物の位置およびサイズとして検出できる。 The position of the second block is set to be offset from the position of the first block. As a result, if a portion of the first block determined to be a foreign object block overlaps with a portion of the second block determined to be a foreign object block, the position and size of the overlapping portion can be detected as the position and size of the foreign object.

よって、異物の位置および大きさの検出に要する時間の増大を抑制しつつ、異物の位置および大きさの検出精度を向上することができる。 This makes it possible to improve the accuracy of detecting the position and size of a foreign object while minimizing the increase in the time required to detect the position and size of the foreign object.

本発明によれば、異物の位置および大きさの検出に要する時間の増大を抑制しつつ、異物の位置および大きさの検出精度を向上することができる。 This invention makes it possible to improve the accuracy of detecting the position and size of a foreign object while minimizing the increase in the time required to detect the position and size of the foreign object.

本発明の一実施形態に係る読取装置の斜視図である。1 is a perspective view of a reading device according to an embodiment of the present invention; 読取装置の筐体の上面の一部を示す図である。FIG. 2 is a diagram showing a part of the top surface of the housing of the reading device. 読取装置の構成を図解的に示す断面図である。FIG. 2 is a cross-sectional view illustrating the configuration of a reading device. 読取装置の電気的構成を示すブロック図である。FIG. 2 is a block diagram showing the electrical configuration of the reading device. 異物検出処理の実行時機を判断する処理の流れを示すフローチャートである。10 is a flowchart showing the flow of a process for determining when to execute a foreign object detection process. 異物検出処理の流れを示すフローチャート(その1)である。10 is a flowchart (part 1) showing the flow of a foreign object detection process. 異物検出処理の流れを示すフローチャート(その2)である。10 is a flowchart (part 2) illustrating the flow of a foreign object detection process. 第1読取範囲および第1ブロックについて説明するための図である。FIG. 4 is a diagram for explaining a first reading range and a first block. 対象ブロック内の全画素の輝度値のヒストグラムの一例(対象ブロックが異物ありブロックである場合の例)を示す図である。FIG. 10 is a diagram showing an example of a histogram of luminance values of all pixels in a target block (an example in the case where the target block is a block containing a foreign substance); 対象ブロック内の全画素の輝度値のヒストグラムの他の例(対象ブロックが異物なしブロックである場合の例)を示す図である。FIG. 10 is a diagram showing another example of a histogram of luminance values of all pixels in a target block (an example in the case where the target block is a block without a foreign object). 第2読取範囲および第2ブロックについて説明するための図である。FIG. 10 is a diagram for explaining a second reading range and a second block. 異物検出処理の実行時機を判断する処理の他の例を示すフローチャートである。10 is a flowchart illustrating another example of a process for determining when to execute a foreign object detection process. 異物検出処理の他の例を示すフローチャートである。10 is a flowchart illustrating another example of the foreign object detection process. 第1読取範囲および第2ブロックの設定位置について説明するための図である。10A and 10B are diagrams for explaining the setting positions of a first reading range and a second block;

以下では、本発明の実施の形態について、添付図面を参照しつつ詳細に説明する。 The following describes in detail an embodiment of the present invention with reference to the accompanying drawings.

<読取装置>
図1に示される読取装置1は、FB(Flatbed:フラットベッド)方式により読取対象物OB(図2参照)を光学的に読み取って、その読取対象物OBの画像データを生成する装置である。読取対象物OBは、印刷などによる複製のために読み取られる文字原稿や写真原稿などの原稿のほか、OCR(Optical Character Recognition:光学文字認識)技術による電子文書化のために読み取られる書類、デコードのために読み取られるバーコード(1次元バーコード、2次元コード)が表示された紙などの媒体を含む。
<Reading device>
The reading device 1 shown in Fig. 1 is a device that optically reads an object to be read OB (see Fig. 2) using a flatbed (FB) method and generates image data of the object to be read OB. The object to be read OB includes originals such as text documents and photographic documents that are read for reproduction by printing or the like, documents that are read for digital documentation using OCR (Optical Character Recognition) technology, and media such as paper on which a barcode (one-dimensional barcode or two-dimensional code) is displayed that is read for decoding.

なお、読取装置1の前、後、上、下、左および右の各方向を定め、以下の説明では、その方向を適宜使用する。図1には、読取装置1の前、後、上、下、左および右の各方向が矢印で示され、図2には、読取装置1の前、後、左および右の各方向が矢印で示され、図3には、読取装置1の上、下、左および右の各方向が矢印で示されている。 The front, rear, top, bottom, left, and right directions of the reading device 1 have been defined, and these directions will be used appropriately in the following explanation. In Figure 1, the front, rear, top, bottom, left, and right directions of the reading device 1 are indicated by arrows, in Figure 2, the front, rear, left, and right directions of the reading device 1 are indicated by arrows, and in Figure 3, the top, bottom, left, and right directions of the reading device 1 are indicated by arrows.

読取装置1は、略直方体形状の筐体11と、筐体11の上面を開閉するカバー12とを備えている。カバー12の後端部は、筐体11の上後端部に、左右方向に延びる軸線を中心に揺動可能に結合されている。カバー12は、筐体11の上面に対して前端が持ち上がって筐体11の上面を開放する開位置と、筐体11の上面に対して倒伏して筐体11の上面を覆う閉位置との間で揺動する。 The reading device 1 comprises a housing 11 having a substantially rectangular parallelepiped shape and a cover 12 that opens and closes the top surface of the housing 11. The rear end of the cover 12 is connected to the upper rear end of the housing 11 so that it can swing about an axis extending in the left-right direction. The cover 12 swings between an open position in which the front end is raised relative to the top surface of the housing 11, exposing the top surface of the housing 11, and a closed position in which it is folded down relative to the top surface of the housing 11, covering the top surface of the housing 11.

筐体11の上面には、左右方向に長い矩形状の開口13が形成されている。開口13は、透明板14により下方から閉塞されている。透明板14は、透明なガラス板または樹脂板などの透明板からなる。 A rectangular opening 13 that is long in the left-right direction is formed on the top surface of the housing 11. The opening 13 is closed from below by a transparent plate 14. The transparent plate 14 is made of a transparent plate such as a transparent glass plate or resin plate.

読取対象物OBは、読取対象の面を下方に向けて透明板14上の規定位置に配置される。規定位置は、開口13の後端縁15と左端縁16とが交わる左後角を基準とする位置であり、たとえば、図2に示されるように、読取対象物OBが矩形状である場合、読取対象物OBの1つの角が開口13の左後角に突き合わされて、読取対象物OBの2つの端縁が開口13の後端縁15および左端縁16に当接する位置である。読取対象物OBが透明板14上の規定位置に配置された後、カバー12が閉じられて、カバー12により、読取対象物OBが上方から覆われる。 The object to be read OB is placed at a specified position on the transparent plate 14 with the surface to be read facing downward. The specified position is based on the left rear corner where the rear edge 15 and left edge 16 of the opening 13 intersect. For example, as shown in FIG. 2, if the object to be read OB is rectangular, this is the position where one corner of the object to be read OB abuts the left rear corner of the opening 13 and the two edges of the object to be read OB abut against the rear edge 15 and left edge 16 of the opening 13. After the object to be read OB has been placed at the specified position on the transparent plate 14, the cover 12 is closed, and the object to be read OB is covered from above by the cover 12.

カバー12の内面には、図3に示されるように、シート状の白色樹脂からなる背景部材17が弾性的に支持されている。背景部材17は、開口13よりも小さいサイズの略矩形状に形成されている。背景部材17は、カバー12が閉じられたときに、筐体11の開口13の周縁部に乗り上げず、開口13内に開口13の各端縁と間隔を空けて配置されて、読取対象物OBを透明板14に押圧する。 As shown in Figure 3, a background member 17 made of a sheet of white resin is elastically supported on the inner surface of the cover 12. The background member 17 is formed in a roughly rectangular shape that is smaller than the opening 13. When the cover 12 is closed, the background member 17 does not rest on the peripheral edge of the opening 13 in the housing 11, but is positioned within the opening 13 with a gap between it and each edge of the opening 13, pressing the object to be read OB against the transparent plate 14.

透明板14の下側には、読取デバイス18および移動機構19が設けられている。 A reading device 18 and a moving mechanism 19 are provided below the transparent plate 14.

読取デバイス18は、CIS(Contact Image Sensor)ユニットの形態をなし、光源21、ロッドレンズアレイ22およびイメージセンサ23を備えている。光源21は、R(赤色)、G(緑色)およびB(青色)の3色のLED(Light Emitting Diode)を含む。ロッドレンズアレイ22は、主走査方向に整列して並べられた多数のロッドレンズを備えている。主走査方向は、読取装置1の左右方向と一致している。ロッドレンズは、成立等倍の屈折率分布型レンズである。イメージセンサ23は、複数の受光素子が主走査方向に等ピッチで配列された構成のリニアイメージセンサである。各受光素子は、たとえば、R(赤)、G(緑)およびB(青)のカラーフィルタおよびフォトダイオードを備え、受光した光に含まれるRGBの各色成分の強度に応じた電気信号(電圧)を出力する。 The reading device 18 is in the form of a CIS (Contact Image Sensor) unit and includes a light source 21, a rod lens array 22, and an image sensor 23. The light source 21 includes three LEDs (Light Emitting Diodes): R (red), G (green), and B (blue). The rod lens array 22 includes a large number of rod lenses aligned in the main scanning direction, which coincides with the left-right direction of the reading device 1. The rod lenses are gradient index lenses with a fixed magnification. The image sensor 23 is a linear image sensor configured with multiple light-receiving elements arranged at equal intervals in the main scanning direction. Each light-receiving element includes, for example, R (red), G (green), and B (blue) color filters and photodiodes, and outputs an electrical signal (voltage) corresponding to the intensity of each RGB color component contained in the received light.

移動機構19は、読取デバイス18を主走査方向と直交する副走査方向に移動させる機構である。副走査方向は、読取装置1の左右方向と一致している。移動機構19には、読取デバイス18を担持するCISキャリッジ24と、CISキャリッジ24を左右方向に往復移動させる駆動力を発生するスキャナモータ25とが含まれる。 The movement mechanism 19 moves the reading device 18 in a sub-scanning direction that is perpendicular to the main scanning direction. The sub-scanning direction coincides with the left-right direction of the reading device 1. The movement mechanism 19 includes a CIS carriage 24 that carries the reading device 18, and a scanner motor 25 that generates a driving force to move the CIS carriage 24 back and forth in the left-right direction.

なお、読取装置1は、読取方式に等倍光学方式であるCIS方式を採用した構成に限らず、縮小光学方式、つまりCCD(Charge Coupled Devices)方式を採用した構成であってもよい。 Note that the reading device 1 is not limited to a configuration that uses a CIS system, which is a 1x optical system, as its reading method, but may also use a reduced optical system, i.e., a CCD (Charge Coupled Devices) system.

<電気的構成>
読取装置1は、図4に示されるように、ASIC(Application Specific Integrated Circuit)31を備えている。ASIC31は、CPU(Central Processing Unit)32およびメモリ33を内蔵している。メモリ33には、フラッシュメモリやE2PROMなどのデータの書き換えが可能な不揮発性メモリと、DRAM(Dynamic Random Access Memory)などの揮発性メモリとが含まれる。
<Electrical configuration>
4, the reading device 1 includes an ASIC (Application Specific Integrated Circuit) 31. The ASIC 31 incorporates a CPU (Central Processing Unit) 32 and a memory 33. The memory 33 includes a nonvolatile memory that allows data to be rewritten, such as a flash memory or an E2PROM, and a volatile memory, such as a DRAM (Dynamic Random Access Memory).

ASIC31は、データ通信のためのバス34に接続されている。バス34には、読取デバイス18および移動機構19が接続されている。 The ASIC 31 is connected to a bus 34 for data communication. The reading device 18 and the movement mechanism 19 are also connected to the bus 34.

ASIC31のCPU32(制御部の一例)は、メモリ33の不揮発性メモリに記憶されているプログラムを実行し、読取デバイス18および移動機構19の動作を制御する。プログラムの実行時には、CPU32により、メモリ33の揮発性メモリがワークエリアとして使用される。 The CPU 32 (an example of a control unit) of the ASIC 31 executes a program stored in the non-volatile memory of the memory 33 and controls the operation of the reading device 18 and the movement mechanism 19. When executing the program, the CPU 32 uses the volatile memory of the memory 33 as a work area.

たとえば、読取装置1と通信可能に接続されたPC(Personal Computer)などの外部端末が操作されて、その外部端末から読取装置1に読み取りの開始が指示される。読み取りの開始が指示されると、CPU32により、読取範囲が設定されて、その読取範囲を読み取る読取処理が開始される。 For example, an external terminal such as a PC (Personal Computer) connected to the reading device 1 so that it can communicate with the reading device 1 is operated, and the external terminal instructs the reading device 1 to start reading. When the instruction to start reading is given, the CPU 32 sets a reading range and starts the reading process to read that reading range.

読取処理では、読取デバイス18がホームポジションから読取開始位置に移動される。読取開始位置は、たとえば、読取デバイス18による最大読取範囲における最左端の位置に設定されている。そして、読取デバイス18が読取開始位置から副走査方向の一方、つまり右方に一定速度で移動される。 During the reading process, the reading device 18 is moved from its home position to a reading start position. The reading start position is set, for example, to the leftmost position of the maximum reading range of the reading device 18. The reading device 18 is then moved from the reading start position in one direction in the sub-scanning direction, i.e., to the right, at a constant speed.

その一方で、読取デバイス18の光源21が点灯されて、光源21からの光が透明板14を透過する。透明板14上に読取対象物OBが配置されている状態では、透明板14を透過する光が主に読取対象物OBまたは背景部材17で反射し、透明板14上に読取対象物OBが配置されていない状態では、透明板14を透過する光が主に背景部材17で反射する。その反射光がロッドレンズアレイ22を通過してイメージセンサ23に入射すると、イメージセンサ23の各受光素子で光電変換が行われて、各受光素子から受光量に応じた電圧(電気信号)が出力される。 Meanwhile, the light source 21 of the reading device 18 is turned on, and light from the light source 21 passes through the transparent plate 14. When an object to be read OB is placed on the transparent plate 14, the light passing through the transparent plate 14 is mainly reflected by the object to be read OB or the background member 17. When an object to be read OB is not placed on the transparent plate 14, the light passing through the transparent plate 14 is mainly reflected by the background member 17. When this reflected light passes through the rod lens array 22 and enters the image sensor 23, photoelectric conversion is performed in each light-receiving element of the image sensor 23, and a voltage (electrical signal) corresponding to the amount of light received is output from each light-receiving element.

ASIC31は、A/D変換回路を備えている。A/D変換回路は、たとえば、8ビット(0~255)の分解能を有しており、RGBの各色について、イメージセンサ23から出力される電圧(電気信号)をデジタル値である輝度値(画像データ)に変換する。たとえば、下限側の基準電圧(下限値)未満の電圧については一律に輝度値「0」に変換され、上限側の基準電圧(上限値)を超える電圧については一律に輝度値「255」に変換され、下限値から上限値の範囲の電圧についてはその電圧の大小に応じた輝度値に変換される。各受光素子から出力される電圧が輝度値に変換されることにより、読取デバイス18による主走査方向の1ライン分の読み取りが達成される。 The ASIC 31 is equipped with an A/D conversion circuit. The A/D conversion circuit has, for example, 8-bit (0-255) resolution and converts the voltage (electrical signal) output from the image sensor 23 for each RGB color into a digital brightness value (image data). For example, voltages below the lower limit reference voltage (lower limit value) are uniformly converted to a brightness value of "0," voltages above the upper limit reference voltage (upper limit value) are uniformly converted to a brightness value of "255," and voltages between the lower limit and upper limit values are converted to a brightness value corresponding to the magnitude of the voltage. By converting the voltage output from each light-receiving element into a brightness value, the reading device 18 can read one line in the main scanning direction.

読取デバイス18が右方に一定速度で移動されつつ、読取デバイス18による1ラインの読み取りが繰り返されることにより、読取範囲の全体が読み取られて、読取範囲の画像データが生成される。透明板14上に読取対象物OBが配置されている状態では、読取範囲が読取対象物OBのサイズに応じた範囲に設定されて、読取対象物OBの画像データが生成される。読取範囲の読み取りが終了すると、読取デバイス18の移動方向が反転されて、読取デバイス18がホームポジションに向けて副走査方向の他方、つまり左方に移動(リターン動作)される。 While the reading device 18 is moved to the right at a constant speed, the reading device 18 repeatedly reads one line at a time, thereby reading the entire reading range and generating image data of the reading range. When the object to be read OB is placed on the transparent plate 14, the reading range is set to a range corresponding to the size of the object to be read OB, and image data of the object to be read OB is generated. Once reading of the reading range is complete, the direction of movement of the reading device 18 is reversed, and the reading device 18 moves in the other direction in the sub-scanning direction, i.e., to the left, toward the home position (return operation).

<異物検出処理>
読取装置1では、透明板14および背景部材17にごみなどの異物が付着することがある。たとえば、透明板14上における読取対象物OBが配置される領域に異物が付着していると、読取対象物OBが読み取られたときに、その異物が読取対象物OBの読取画像に写り込む。そのため、読取装置1では、ASIC31のCPU32により、透明板14または背景部材17に付着した異物の有無の検知ならびに異物の位置および大きさの検出のための異物検出処理が実行される。
<Foreign object detection processing>
In the reading device 1, foreign matter such as dust may adhere to the transparent plate 14 and the background member 17. For example, if foreign matter adheres to an area on the transparent plate 14 where the object to be read OB is placed, the foreign matter will appear in the read image of the object to be read OB when the object to be read OB is read. Therefore, in the reading device 1, the CPU 32 of the ASIC 31 executes foreign matter detection processing to detect the presence or absence of foreign matter attached to the transparent plate 14 or the background member 17 and to detect the position and size of the foreign matter.

異物検出処理を実行するか否かを決定するため、CPU32は、図5に示されるように、現時点が異物検出処理の実行時機であるか否かを判断する(S1)。 To determine whether to execute the foreign object detection process, the CPU 32 determines whether it is currently time to execute the foreign object detection process (S1), as shown in FIG. 5.

異物検出処理は、異物の有無を精度よく検知し、また、異物の位置および大きさを精度よく検出するため、カバー12が閉位置に位置して、透明板14と背景部材17との間に読取対象物OBが存在しない状態、言い換えれば、透明板14と背景部材17とが読取対象物OBを挟まずに対向する状態で実行されることが好ましい。読取装置1の電源は、透明板14と背景部材17とが読取対象物OBを挟まずに対向している状態でオンされることが多いので、CPU32は、たとえば、読取装置1の電源のオンに応じて、現時点が異物検出処理の実行時機であると判断する。 To accurately detect the presence or absence of a foreign object, as well as the position and size of the foreign object, the foreign object detection process is preferably performed when the cover 12 is in the closed position and no object to be read OB is present between the transparent plate 14 and the background member 17; in other words, when the transparent plate 14 and the background member 17 are facing each other without the object to be read OB sandwiched between them. Since the power to the reading device 1 is often turned on when the transparent plate 14 and the background member 17 are facing each other without the object to be read OB sandwiched between them, the CPU 32 determines, for example, when the power to the reading device 1 is turned on that it is now time to perform the foreign object detection process.

また、読取装置1と通信可能に接続された外部端末がユーザにより操作されて、読取装置1に異物検出モードが設定されるときには、通常、読取対象物OBを透明板14上に配置するといった行為が行われない。したがって、CPU32は、外部端末から読取装置1に異物検出モードの設定が通知されたことに応じて、現時点が異物検出処理の実行時機であると判断してもよい。読取装置1に操作キーが備えられている構成では、CPU32は、操作キーの操作により異物検出モードが設定(選択)されたことに応じて、現時点が異物検出処理の実行時機であると判断してもよい。 Furthermore, when a user operates an external terminal communicatively connected to the reading device 1 to set the reading device 1 to foreign object detection mode, the reading object OB is not usually placed on the transparent plate 14. Therefore, the CPU 32 may determine that it is now time to perform the foreign object detection process in response to the reading device 1 being notified by the external terminal that the foreign object detection mode has been set. In a configuration in which the reading device 1 is equipped with operation keys, the CPU 32 may determine that it is now time to perform the foreign object detection process in response to the foreign object detection mode being set (selected) by operating the operation keys.

CPU32は、現時点が異物検出処理の実行時機であると判断した場合(S1:YES)、異物検出処理を実行する(S2)。一方、CPU32は、原時点が異物検出処理の実行時機でないと判断した場合(S1:NO)、異物検出処理を実行せず、所定時間を空けてから、その時点が異物検出処理の実行時機であるか否かを再び判断する(S1)。 If the CPU 32 determines that the current time is the time to execute the foreign object detection process (S1: YES), it executes the foreign object detection process (S2). On the other hand, if the CPU 32 determines that the original time is not the time to execute the foreign object detection process (S1: NO), it does not execute the foreign object detection process, waits a predetermined time, and then again determines whether the current time is the time to execute the foreign object detection process (S1).

異物検出処理の流れは、図6Aおよび図6Bに示されている。異物検出処理では、CPU32は、図7に示されるように、後述する第1読取処理で読み取られた読取画像(読取処理で得られる画像データに係る画像)がその読取画像の左後端を基準に複数の第1ブロックに分割されるよう、第1ブロックの主走査方向の長さX1と副走査方向の長さY1とにより定まるサイズX1×Y1を設定する(S201)。サイズX1×Y1は、予め決められた固定値に設定されてもよいし、たとえば、次に述べる第1読取範囲に応じた値に都度設定されてもよい。 The flow of the foreign object detection process is shown in Figures 6A and 6B. In the foreign object detection process, as shown in Figure 7, the CPU 32 sets a size X1 x Y1 determined by the length X1 in the main scanning direction and the length Y1 in the sub-scanning direction of the first block so that the read image read in the first reading process described below (an image related to the image data obtained in the reading process) is divided into multiple first blocks based on the left rear edge of the read image (S201). The size X1 x Y1 may be set to a predetermined fixed value, or may be set each time to a value corresponding to the first reading range described below, for example.

CPU32は、第1読取範囲を設定する(S202)。第1読取範囲は、たとえば、図7に二点鎖線で示されるように、読取装置1で読み取り可能な最大サイズの矩形状のシートが配置される範囲に設定される。 The CPU 32 sets the first reading range (S202). The first reading range is set, for example, to the range in which a rectangular sheet of the largest size that can be read by the reading device 1 can be placed, as shown by the two-dot chain line in Figure 7.

その後、CPU32は、読取デバイス18および移動機構19の動作を制御して、第1読取範囲を読み取る第1読取処理を開始する(S203)。第1読取処理では、読取デバイス18が読取開始位置から副走査方向の右方に一定速度で移動されつつ、読取デバイス18による主走査方向の1ライン分の読み取りが繰り返されて、第1読取範囲の全域が読み取られる。第1読取範囲の全域の読み取りが終了すると、CPU32は、第1読取処理を終了する。 Then, the CPU 32 controls the operation of the reading device 18 and the movement mechanism 19 to start the first reading process, which reads the first reading range (S203). In the first reading process, the reading device 18 is moved at a constant speed from the reading start position to the right in the sub-scanning direction, while repeatedly reading one line in the main scanning direction by the reading device 18, until the entire first reading range is read. When reading of the entire first reading range has been completed, the CPU 32 ends the first reading process.

第1読取処理の開始後、CPU32は、複数の第1ブロックの中から、異物ありブロックであるか異物なしブロックであるかの属性判定の対象となる対象ブロックを指定する(S204)。異物ありブロックは、たとえば、透明板14または背景部材17に付着した異物の読取画像など、背景部材17の読取画像とは異なる読取画像を含むブロックである。一方、異物なしブロックは、背景部材17の読取画像とは異なる読取画像を含まないブロック、または、背景部材17の読取画像とは異なる読取画像をほとんど含まないブロックである。最初の対象ブロックは、開口13内で透明板14の左後端部に対向する領域の読取画像を含む第1ブロックに指定される。 After the first reading process begins, the CPU 32 designates a target block from among the multiple first blocks as the target for attribute determination as to whether it is a block with foreign matter or a block without foreign matter (S204). A block with foreign matter is a block that includes a read image that differs from the read image of the background member 17, such as a read image of foreign matter attached to the transparent plate 14 or the background member 17. On the other hand, a block without foreign matter is a block that does not include a read image that differs from the read image of the background member 17, or a block that includes almost no read image that differs from the read image of the background member 17. The first target block is designated as the first block that includes a read image of the area facing the left rear end of the transparent plate 14 within the opening 13.

そして、CPU32は、たとえば、ASIC31に備えられたヒストグラム作成回路から、対象ブロック内の全画素の輝度値のヒストグラムを取得する(S205)。ASIC31では、対象ブロック内の各画素について、公知の変換手法により、RGB各色の輝度値からグレースケールの輝度値(たとえば、256階調)への変換が行われ、ヒストグラム作成回路では、図8および図9に示されるように、その輝度値のヒストグラム(横軸:輝度値、縦軸:頻度)が作成される。 Then, the CPU 32 obtains a histogram of the luminance values of all pixels in the target block, for example, from a histogram creation circuit provided in the ASIC 31 (S205). The ASIC 31 converts the luminance values of each RGB color into grayscale luminance values (e.g., 256 levels) for each pixel in the target block using a known conversion method, and the histogram creation circuit creates a histogram of the luminance values (horizontal axis: luminance value, vertical axis: frequency) as shown in Figures 8 and 9.

CPU32は、対象ブロック内の全画素の輝度値のヒストグラムに基づいて、予め定められた輝度閾値THL以上の輝度値の頻度の総和Aを算出する(S206)。背景部材17が読み取られたとき、背景部材17の読取画像の各画素の輝度値は、「255」付近の値を示す。輝度閾値THLは、背景部材17に対応する輝度値(背景部材17での反射光を受光した受光素子から出力される電圧に応じた輝度値)の下限として定められる。 The CPU 32 calculates the sum A of the frequency of brightness values equal to or greater than a predetermined brightness threshold THL based on a histogram of the brightness values of all pixels in the target block (S206). When the background member 17 is read, the brightness value of each pixel in the read image of the background member 17 indicates a value near "255." The brightness threshold THL is defined as the lower limit of the brightness value corresponding to the background member 17 (the brightness value corresponding to the voltage output from the light receiving element that receives light reflected from the background member 17).

そして、CPU32は、総和Aが予め定められた頻度閾値THFよりも大きいか否かを判定する(S207)。透明板14または背景部材17に付着した異物など、背景部材17以外の物体に対応する輝度値(背景部材17以外の物体での反射光を受光した受光素子から出力される電圧に応じた輝度値)は、背景部材17に対応する輝度値よりも低い値を示す傾向がある。そのため、対象ブロックが背景部材17の読取画像とは異なる読取画像を含む場合、図8に示されるように、輝度閾値THLよりも低い輝度値の頻度(画素の数)が相対的に多くなり、輝度閾値THL以上の輝度値の頻度が相対的に少なくなる。逆に、対象ブロックが背景部材17の読取画像とは異なる読取画像を含まない場合、図9に示されるように、輝度閾値THL以上の輝度値の頻度が相対的に多くなり、輝度閾値THLよりも低い輝度値の頻度が相対的に少なくなる。そこで、総和Aが頻度閾値THFよりも大きい場合(S207:YES)、CPU32は、対象ブロックを背景部材17の読取画像とは異なる読取画像を含まない異物なしブロックであると判定する(S208)。一方、総和Aが頻度閾値THF以下である場合(S207:NO)、CPU32は、対象ブロックを背景部材17の読取画像とは異なる読取画像を含む異物ありブロックであると判定する(S209)。 The CPU 32 then determines whether the sum A is greater than a predetermined frequency threshold THF (S207). Brightness values corresponding to objects other than the background member 17, such as foreign matter adhering to the transparent plate 14 or the background member 17, (brightness values corresponding to the voltage output from the light-receiving element receiving the light reflected by the object other than the background member 17) tend to be lower than brightness values corresponding to the background member 17. Therefore, if the target block includes a scanned image different from the scanned image of the background member 17, as shown in FIG. 8, the frequency (number of pixels) of brightness values lower than the brightness threshold THL will be relatively high, and the frequency of brightness values equal to or greater than the brightness threshold THL will be relatively low. Conversely, if the target block does not include a scanned image different from the scanned image of the background member 17, the frequency of brightness values equal to or greater than the brightness threshold THL will be relatively high, and the frequency of brightness values lower than the brightness threshold THL will be relatively low, as shown in FIG. 9. Therefore, if the sum A is greater than the frequency threshold THF (S207: YES), the CPU 32 determines that the target block is a foreign substance-free block that does not contain a scanned image different from the scanned image of the background member 17 (S208). On the other hand, if the sum A is equal to or less than the frequency threshold THF (S207: NO), the CPU 32 determines that the target block is a foreign substance-containing block that contains a scanned image different from the scanned image of the background member 17 (S209).

その後、CPU32は、すべての第1ブロックの属性判定を行ったか否かを判断する(S210)。 The CPU 32 then determines whether attribute determination has been performed for all first blocks (S210).

属性判定を行っていない第1ブロックが残っていて、CPU32は、すべての第1ブロックの属性判定を行っていないと判断した場合(S201:NO)、対象ブロックを他の第1ブロックに更新する(S204)。直前の属性判定の対象ブロックに対して前側に隣接する第1ブロックが存在する場合には、その第1ブロックが対象ブロックに指定されることにより、対象ブロックが更新される。直前の属性判定の対象ブロックに対して前方に隣接する第1ブロックが存在しない場合には、直前の属性判定の対象ブロックに対して右側に隣接して主走査方向の列をなす第1ブロックのうち、後端の第1ブロックが対象ブロックに指定されることにより、対象ブロックが更新される。 If there are any remaining first blocks for which attribute determination has not been performed and the CPU 32 determines that attribute determination has not been performed for all first blocks (S201: NO), it updates the target block to another first block (S204). If there is a first block adjacent to the previous target block for attribute determination on the front side, that first block is designated as the target block, and the target block is updated. If there is no first block adjacent to the previous target block for attribute determination on the front side, the rearmost first block of the first blocks adjacent to the previous target block for attribute determination on the right side and forming a row in the main scanning direction is designated as the target block, and the target block is updated.

そして、上述したように、CPU32により、対象ブロック内の全画素の輝度値のヒストグラムが取得されて(S205)、輝度閾値THL以上の輝度値の頻度の総和Aが算出され(S206)、総和Aと頻度閾値THFとの大小関係から、対象ブロックが異物なしブロックであるか異物ありブロックであるかが判定される(S207,S208,S209)。その後、CPU32により、すべての第1ブロックの属性判定を行ったか否かが判断される(S210)。 As described above, the CPU 32 then obtains a histogram of the brightness values of all pixels in the target block (S205), calculates the sum A of the frequencies of brightness values equal to or greater than the brightness threshold THL (S206), and determines whether the target block is a block without a foreign object or a block with a foreign object based on the magnitude relationship between the sum A and the frequency threshold THF (S207, S208, S209). The CPU 32 then determines whether attribute determination has been performed for all first blocks (S210).

すべての第1ブロックの属性判定が終了するまで、ステップS204~S210が繰り返される。すべての第1ブロックの属性判定が終了すると、CPU32は、すべての第1ブロックの属性判定を行ったと判断する(S210:YES)。そして、CPU32は、その終了した属性判定が1週目の属性判定であったか否か、つまり第1ブロックの属性判定であったか否かを判断する(S211)。 Steps S204 to S210 are repeated until attribute determination for all first blocks is complete. When attribute determination for all first blocks is complete, the CPU 32 determines that attribute determination for all first blocks has been performed (S210: YES). The CPU 32 then determines whether the completed attribute determination was the first week's attribute determination, i.e., whether it was the attribute determination for the first block (S211).

CPU32は、終了した属性判定が1週目の属性判定であったと判断した場合(S211:YES)、その1週目の属性判定で異物ありブロックであると判定した第1ブロックの数(異物ありブロックの数)が1以上であるか否かを判定する(S212)。 If the CPU 32 determines that the completed attribute determination was the first week's attribute determination (S211: YES), it determines whether the number of first blocks determined to be blocks containing foreign matter in the first week's attribute determination (the number of blocks containing foreign matter) is 1 or greater (S212).

CPU32は、異物ありブロックの数が1以上であると判定した場合(S212:YES)、異物ありブロックを含む第2読取範囲を設定する(S213)。図7および図10では、異物が「×」で示されている。たとえば、図7に示されるように、主走査方向の後端の行から2行目かつ副走査方向の左端の列から2列目の第1ブロック、主走査方向の後端の行から3行目かつ副走査方向の左端の列から4列目の第1ブロック、主走査方向の後端の行から2行目かつ副走査方向の左端の列から5列目の第1ブロック、および、主走査方向の後端の行から4行目かつ副走査方向の左端の列から5列目の第1ブロックがそれぞれ異物ありブロックであった場合、第2読取範囲は、主走査方向の後端の行から2~4行目かつ副走査方向の左端から2~5列目の第1ブロックのすべてを含む範囲に設定される。図10には、その設定された第2読取範囲が二点鎖線で示されている。 If the CPU 32 determines that the number of blocks containing foreign matter is one or more (S212: YES), it sets a second read range that includes the blocks containing foreign matter (S213). In Figures 7 and 10, foreign matter is indicated by an "x." For example, as shown in Figure 7, if the first block in the second row from the rear end in the main scanning direction and the second column from the leftmost column in the sub-scanning direction, the first block in the third row from the rear end in the main scanning direction and the fourth column from the leftmost column in the sub-scanning direction, the first block in the second row from the rear end in the main scanning direction and the fifth column from the leftmost column in the sub-scanning direction, and the first block in the fourth row from the rear end in the main scanning direction and the fifth column from the leftmost column in the sub-scanning direction are all blocks containing foreign matter, the second read range is set to include all of the first blocks in the second to fourth rows from the rear end in the main scanning direction and the second to fifth columns from the leftmost column in the sub-scanning direction. In Figure 10, the set second reading range is shown by a two-dot chain line.

その後、CPU32は、後述する第2読取処理で読み取られた読取画像がその読取画像の右後端を基準に複数の第2ブロックに分割されるよう、第2ブロックの主走査方向の長さX2と副走査方向の長さY2とにより定まるサイズX2×Y2を設定する(S214)。サイズX2×Y2は、たとえば、第1読取範囲に対する第2読取範囲の縮小率に応じて、第1ブロックのサイズX1×Y1に対して縮小して設定されてもよいし、X2<X1かつY2<Y1の関係を満たす固定値に設定されてもよい。
CPU32は、読取デバイス18および移動機構19の動作を制御して、第2読取範囲を読み取る第2読取処理を開始する(S215)。第2読取処理では、読取デバイス18が1読取処理の終了時の位置から副走査方向の左方に一定速度で移動(リターン)されつつ、読取デバイス18による主走査方向の1ライン分の読み取りが繰り返されて、第2読取範囲の全域が読み取られる。第2読取範囲の全域の読み取りが終了すると、CPU32は、第2読取処理を終了する。
Thereafter, the CPU 32 sets a size X2×Y2, which is determined by the length X2 in the main scanning direction and the length Y2 in the sub-scanning direction of each second block, so that the image read in the second reading process (described later) is divided into a plurality of second blocks based on the right rear edge of the read image (S214). The size X2×Y2 may be set by reducing the size X1×Y1 of the first block in accordance with the reduction ratio of the second reading range relative to the first reading range, or may be set to a fixed value that satisfies the relationships X2<X1 and Y2<Y1.
The CPU 32 controls the operation of the reading device 18 and the moving mechanism 19 to start a second reading process for reading the second reading range (S215). In the second reading process, the reading device 18 moves (returns) at a constant speed to the left in the sub-scanning direction from the position at the end of one reading process, while repeatedly reading one line in the main scanning direction by the reading device 18, until the entire second reading range is read. When reading of the entire second reading range is completed, the CPU 32 ends the second reading process.

第2読取処理の開始後、CPU32は、複数の第2ブロックの中から、異物ありブロックであるか異物なしブロックであるかの属性判定の対象となる対象ブロックを指定する(S204)。最初の対象ブロックは、第2読取範囲の読取画像の右後端部に位置する第2ブロックに指定される。 After the second reading process begins, the CPU 32 designates a target block from among the multiple second blocks to be subjected to attribute determination as to whether it is a block with foreign matter or a block without foreign matter (S204). The first target block is designated as the second block located at the rear right edge of the read image in the second reading range.

そして、CPU32は、第1ブロックの属性判定の場合と同様に、対象ブロック内の全画素の輝度値のヒストグラムを取得して(S205)、そのヒストグラムに基づいて、予め定められた輝度閾値THL以上の輝度値の頻度の総和Aを算出し(S206)、総和Aが頻度閾値THFよりも大きい場合(S207:YES)、対象ブロックを異物なしブロックであると判定し(S208)、総和Aが頻度閾値THF以下である場合(S207:NO)、対象ブロックを異物ありブロックであると判定する(S209)。 Then, as in the case of determining the attributes of the first block, the CPU 32 obtains a histogram of the brightness values of all pixels in the target block (S205), and calculates the sum A of the frequencies of brightness values equal to or greater than a predetermined brightness threshold THL based on that histogram (S206). If the sum A is greater than the frequency threshold THF (S207: YES), the CPU 32 determines that the target block is a block without foreign matter (S208). If the sum A is equal to or less than the frequency threshold THF (S207: NO), the CPU 32 determines that the target block is a block with foreign matter (S209).

その後、CPU32は、すべての第2ブロックの属性判定を行ったか否かを判断する(S210)。 The CPU 32 then determines whether attribute determination has been performed for all second blocks (S210).

属性判定を行っていない第2ブロックが残っていて、CPU32は、すべての第2ブロックの属性判定を行っていないと判断した場合(S201:NO)、対象ブロックを他の第2ブロックに更新する(S204)。直前の属性判定の対象ブロックに対して前側に隣接する第2ブロックが存在する場合には、その第2ブロックが対象ブロックに指定されることにより、対象ブロックが更新される。直前の属性判定の対象ブロックに対して前方に隣接する第2ブロックが存在しない場合には、直前の属性判定の対象ブロックに対して左側に隣接して主走査方向の列をなす第2ブロックのうち、後端の第2ブロックが対象ブロックに指定されることにより、対象ブロックが更新される。 If there are remaining second blocks for which attribute determination has not been performed and the CPU 32 determines that attribute determination has not been performed for all second blocks (S201: NO), it updates the target block to another second block (S204). If there is a second block adjacent to the previous target block for attribute determination on the front side, that second block is designated as the target block, and the target block is updated. If there is no second block adjacent to the previous target block for attribute determination on the front side, the rearmost second block of the second blocks adjacent to the previous target block for attribute determination on the left side and forming a row in the main scanning direction is designated as the target block, and the target block is updated.

そして、第1ブロックの属性判定の場合と同様に、すべての第2ブロックの属性判定が終了するまで、ステップS204~S210が繰り返される。すべての第2ブロックの属性判定が終了すると、CPU32は、すべての第2ブロックの属性判定を行ったと判断する(S210:YES)。そして、CPU32は、その終了した属性判定が1週目の属性判定であったか否か、つまり第1ブロックの属性判定であったか否かを判断する(S211)。 Then, as with the attribute determination for the first block, steps S204 to S210 are repeated until attribute determination for all second blocks is completed. When attribute determination for all second blocks is completed, the CPU 32 determines that attribute determination for all second blocks has been completed (S210: YES). The CPU 32 then determines whether the completed attribute determination was the attribute determination for the first week, that is, whether it was the attribute determination for the first block (S211).

CPU32は、終了した属性判定が1週目の属性判定でないと判断した場合(S211:NO)、第2ブロックの属性判定の結果を異物検出処理の結果として確定し(S216)、異物検出処理を終了する。この場合、CPU32は、異物ありブロックであると確定された第2ブロックの位置およびサイズX2×Y2をそれぞれ透明板14または背景部材17に付着した異物の位置および大きさとして検出する。 If the CPU 32 determines that the completed attribute determination is not the first-week attribute determination (S211: NO), it confirms the result of the attribute determination for the second block as the result of the foreign object detection process (S216) and ends the foreign object detection process. In this case, the CPU 32 detects the position and size X2 x Y2 of the second block that has been confirmed to be a block containing a foreign object as the position and size of a foreign object attached to the transparent plate 14 or background member 17, respectively.

また、CPU32は、1週目の属性判定で異物ありブロックであると判定した第1ブロックの数(異物ありブロックの数)が1以上でない、つまり0であると判定した場合(S211:NO)、第1ブロックの属性判定の結果を異物検出処理の結果として確定し(S216)、異物検出処理を終了する。この場合、CPU32は、透明板14または背景部材17に付着した異物がないことを検知する。 Furthermore, if the CPU 32 determines that the number of first blocks determined to be foreign object blocks in the first week's attribute determination (number of foreign object blocks) is not 1 or greater, i.e., is 0 (S211: NO), it confirms the result of the attribute determination of the first blocks as the result of the foreign object detection process (S216) and terminates the foreign object detection process. In this case, the CPU 32 detects that no foreign object is attached to the transparent plate 14 or background member 17.

<作用効果>
以上のように、異物検出処理では、第1読取範囲が読み取られる。そして、第1読取範囲の読取画像が複数の第1ブロックに分割されて、第1ブロックごとに輝度値のヒストグラムが作成される。そのヒストグラムに基づいて、第1ブロックのそれぞれについて、読取対象物OB以外の異物の読取画像を含む異物ありブロックであるか否かが判定される。
<Action and effect>
As described above, in the foreign object detection process, the first read range is read. Then, the read image of the first read range is divided into a plurality of first blocks, and a brightness histogram is created for each first block. Based on the histogram, it is determined whether each first block is a foreign object block containing a read image of a foreign object other than the read object OB.

その後、第2読取範囲が設定されて、第2読取範囲が読み取られる。そして、第2読取範囲の読取画像が複数の第2ブロックに分割されて、第2ブロックごとに輝度値のヒストグラムが作成される。そのヒストグラムに基づいて、第2ブロックのそれぞれについて、異物ありブロックであるか否かが判定される。 Then, a second reading range is set and the second reading range is read. The read image of the second reading range is then divided into multiple second blocks, and a histogram of brightness values is created for each second block. Based on this histogram, it is determined whether each second block contains a foreign object.

第1読取範囲の読み取りでは、読取デバイス18が副走査方向の一方、つまり右方に移動される。第1読取範囲の読み取り後、読取デバイス18をホームポジションに戻す必要があるが、そのときの読取デバイス18の移動を利用して、第2読取範囲が読み取られる。これにより、読取デバイス18を副走査方向に往復動させる間に、第1読取範囲の読み取りと第2読取範囲の読み取りとを達成することができる。 To read the first reading range, the reading device 18 is moved to one side in the sub-scanning direction, i.e., to the right. After reading the first reading range, the reading device 18 must be returned to its home position, and this movement of the reading device 18 is used to read the second reading range. This makes it possible to read both the first reading range and the second reading range while the reading device 18 is reciprocated in the sub-scanning direction.

第2読取範囲は、異物ありブロックであると判定された第1ブロックを含む範囲であって、第1読取範囲よりも狭い範囲に設定される。また、第2ブロックのサイズは、第1ブロックよりも小さいサイズに設定される。これにより、第2ブロックが異物ありブロックであるか否かの判定結果に基づいて、異物の位置および大きさをより詳細に検出(精度よく検出)することができる。第2ブロックのサイズが第1ブロックのサイズよりも小さく設定されても、第2読取範囲が第1読取範囲よりも狭められることにより、第2ブロックの数の増大を抑制でき、第2ブロックのそれぞれが異物ありブロックであるか否かを判定するのに要する時間の増大を抑制することができる。 The second read range is a range that includes the first block determined to be a foreign substance block, and is set to be narrower than the first read range. The size of the second block is also set to be smaller than the first block. This allows the position and size of the foreign substance to be detected in more detail (detected with greater accuracy) based on the determination result of whether the second block is a foreign substance block. Even if the size of the second block is set smaller than the size of the first block, by making the second read range narrower than the first read range, an increase in the number of second blocks can be suppressed, and an increase in the time required to determine whether each second block is a foreign substance block can be suppressed.

よって、異物の位置および大きさの検出に要する時間の増大を抑制しつつ、異物の位置および大きさの検出の精度を向上することができる。 This makes it possible to improve the accuracy of detecting the position and size of a foreign object while minimizing the increase in the time required to detect the position and size of the foreign object.

また、1週目の属性判定で異物ありブロックであると判定された第1ブロックの数が0であった場合、第1ブロックの属性判定の結果が異物検出処理の結果として確定されて、第2ブロックの属性判定が実行されない。これにより、異物判定処理に要する時間を短縮することができる。 Furthermore, if the number of first blocks determined to be foreign object blocks in the first week's attribute determination is zero, the result of the attribute determination for the first blocks is determined as the result of the foreign object detection process, and attribute determination for the second blocks is not performed. This reduces the time required for the foreign object determination process.

<異物検出処理の実行時機を判断する処理の他の例>
図5に示される処理に代えて、図11に示される処理が実行されてもよい。
<Another Example of Processing for Determining Timing for Executing Foreign Object Detection Processing>
Instead of the process shown in FIG. 5, the process shown in FIG. 11 may be executed.

図11に示される処理では、CPU32は、透明板14と背景部材17との間における読取対象物OBの有無が判断される(S1’)。CPU32は、読取デバイス18および移動機構19の動作を制御して、たとえば、読取デバイス18を読取開始位置から副走査方向の右方に一定距離だけ移動させつつ、読取デバイス18による読み取りが行われて、その読取画像の解析により、読取対象物OBのエッジを検出した場合、透明板14と背景部材17との間に読取対象物OBがあると判断し、読取対象物OBのエッジを検出しない場合、透明板14と背景部材17との間に読取対象物OBがないと判断する。読取対象物OBのエッジを検出する手法は、公知であるから、その説明を省略する。 In the process shown in FIG. 11, the CPU 32 determines whether or not a read object OB is present between the transparent plate 14 and the background member 17 (S1'). The CPU 32 controls the operation of the reading device 18 and the movement mechanism 19, for example, by moving the reading device 18 a fixed distance to the right in the sub-scanning direction from the reading start position while the reading device 18 performs a reading. If the edge of the read object OB is detected by analyzing the read image, it is determined that the read object OB is present between the transparent plate 14 and the background member 17. If the edge of the read object OB is not detected, it is determined that the read object OB is not present between the transparent plate 14 and the background member 17. Techniques for detecting the edge of the read object OB are well known, so their description will be omitted.

なお、読取装置1と通信可能に接続された外部端末または読取装置1に備えられた操作キーの操作により、読取装置1に異物検出モードが設定される構成では、異物検出モードが設定されたことに応じて、外部端末のディスプレイまたは読取装置1に備えられた表示器に「読取対象物が透明板上から取り除かれているか?」というような問い合わせが表示されてもよい。そして、その問い合わせに対して、ユーザが「YES」を選択した場合、CPU32は、透明板14と背景部材17との間に読取対象物OBがないと判断し、ユーザが「NO」を選択した場合、CPU32は、透明板14と背景部材17との間に読取対象物OBがないと判断してもよい。 In a configuration in which the foreign object detection mode is set in the reading device 1 by operating an external terminal communicatively connected to the reading device 1 or an operation key provided on the reading device 1, a query such as "Has the object to be read been removed from the transparent plate?" may be displayed on the display of the external terminal or on an indicator provided on the reading device 1 in response to the setting of the foreign object detection mode. If the user selects "YES" in response to the query, the CPU 32 may determine that there is no object to be read OB between the transparent plate 14 and the background member 17, and if the user selects "NO", the CPU 32 may determine that there is no object to be read OB between the transparent plate 14 and the background member 17.

CPU32は、透明板14と背景部材17との間に読取対象物OBがないと判断した場合(S1’:YES)、異物検出処理を実行する(S2)。一方、CPU32は、透明板14と背景部材17との間に読取対象物OBがあると判断した場合(S1’:NO)、異物検出処理を実行せず、読取対象物OBを読み取る読取処理の終了後、透明板14と背景部材17との間における読取対象物OBの有無を再び判断する(S1’)。 If the CPU 32 determines that there is no object to be read OB between the transparent plate 14 and the background member 17 (S1': YES), it executes a foreign object detection process (S2). On the other hand, if the CPU 32 determines that there is an object to be read OB between the transparent plate 14 and the background member 17 (S1': NO), it does not execute a foreign object detection process, and after completing the reading process to read the object to be read OB, it again determines whether there is an object to be read OB between the transparent plate 14 and the background member 17 (S1').

また、図4に二点鎖線で示されるように、たとえば、開口13内で透明板14の左後端部に対向する位置に、透過型センサからなる原稿センサ41の発光部と受光部が透明板14を挟んで配置されて、原稿センサ41により読取対象物OBが検知される場合に、CPU32は、透明板14と背景部材17との間に読取対象物OBがあると判断し、原稿センサ41により読取対象物OBが検知されない場合に、透明板14と背景部材17との間に読取対象物OBがないと判断してもよい。 Furthermore, as shown by the two-dot chain line in Figure 4, for example, if the light-emitting unit and light-receiving unit of the document sensor 41, which is a transmission sensor, are positioned opposite the left rear end of the transparent plate 14 within the opening 13, with the transparent plate 14 sandwiched between them, and if the document sensor 41 detects the object to be read OB, the CPU 32 may determine that the object to be read OB is between the transparent plate 14 and the background member 17, and if the document sensor 41 does not detect the object to be read OB, it may determine that the object to be read OB is not between the transparent plate 14 and the background member 17.

図11に示される処理が実行されることにより、透明板14と背景部材17との間に読取対象物OBが確実に存在しない状態で、異物検出処理を実行することができる。 By performing the process shown in Figure 11, the foreign object detection process can be performed while ensuring that the object to be read OB is not present between the transparent plate 14 and the background member 17.

<異物検出処理の他の例>
図6Bに示される処理に代えて、図12に示される処理が実行されてもよい。図12に示される処理について、図6Bに示される処理との相違点を取り上げて説明する。
<Another Example of Foreign Object Detection Processing>
Instead of the process shown in Fig. 6B, the process shown in Fig. 12 may be executed. The process shown in Fig. 12 will be described by focusing on the differences from the process shown in Fig. 6B.

図6Bに示される処理では、1週目の属性判定で異物ありブロックと判定された第1ブロックの数が1以上である場合(S212:YES)、異物ありブロックを含む第2読取範囲が設定される(S212)。これに対し、図12に示される処理では、CPU32は、1週目の属性判定で異物ありブロックと判定した第1ブロックの数が1以上である場合(S212:YES)、第2読取範囲を設定せず、第2読取処理による読取範囲を第1読取処理での第1読取範囲に維持する。 In the process shown in FIG. 6B, if the number of first blocks determined to be foreign substance blocks in the attribute determination in the first week is one or more (S212: YES), a second read range is set that includes the foreign substance blocks (S212). In contrast, in the process shown in FIG. 12, if the number of first blocks determined to be foreign substance blocks in the attribute determination in the first week is one or more (S212: YES), the CPU 32 does not set a second read range, and maintains the read range for the second read process as the first read range for the first read process.

そして、CPU32は、第2読取処理で読み取られた読取画像が複数の第2ブロックに分割されるよう、第2ブロックの主走査方向の長さX2と副走査方向の長さY2とにより定まるサイズX2×Y2を設定する(S214)。サイズX2×Y2は、たとえば、X2<X1かつY2<Y1の関係を満たす固定値に設定されてもよいし、X2=X1かつY2=Y1を満たす値に設定されてもよい。ただし、後者の場合、第1ブロックと第2ブロックとが主走査方向および副走査方向の少なくともいずれかの方向にずれるように、第2ブロックの分割の基準が設定される。たとえば、図13に示されるように、第2読取処理で読み取られた読取画像がその読取画像の右後端を基準に複数の第2ブロックに分割されるように、第2ブロックの位置が設定される。 The CPU 32 then sets a size X2 x Y2, determined by the length X2 in the main scanning direction and the length Y2 in the sub-scanning direction of the second block, so that the image read in the second reading process is divided into multiple second blocks (S214). The size X2 x Y2 may be set to a fixed value that satisfies the relationships X2 < X1 and Y2 < Y1, or may be set to a value that satisfies X2 = X1 and Y2 = Y1. In the latter case, however, the basis for dividing the second blocks is set so that the first and second blocks are shifted in at least one of the main scanning direction and the sub-scanning direction. For example, as shown in FIG. 13, the positions of the second blocks are set so that the image read in the second reading process is divided into multiple second blocks based on the right rear edge of the image.

また、図6Bに示される処理では、1週目の属性判定で異物ありブロックであると判定された第1ブロックの数(異物ありブロックの数)が0であった場合(S212:NO)、第2ブロックの属性判定が実行されない。これに対し、図12に示される処理では、CPU32は、1週目の属性判定で異物ありブロックと判定した第1ブロックの数が1以上でないと判定した場合(S212:NO)、第1読取処理よりも読取解像度をアップして(S217)、第2読取処理を実行する。たとえば、第1読取処理における読取解像度が300dpi×300dpiに設定されるのに対し、第2読取処理における読取解像度が600dpi×600dpiに設定される。 Furthermore, in the process shown in FIG. 6B, if the number of first blocks determined to be foreign substance blocks in the attribute determination in the first week (number of blocks with foreign substance) is 0 (S212: NO), attribute determination of the second blocks is not performed. In contrast, in the process shown in FIG. 12, if the CPU 32 determines that the number of first blocks determined to be foreign substance blocks in the attribute determination in the first week is not 1 or more (S212: NO), the reading resolution is increased from that of the first reading process (S217) and the second reading process is performed. For example, the reading resolution in the first reading process is set to 300 dpi x 300 dpi, while the reading resolution in the second reading process is set to 600 dpi x 600 dpi.

そして、CPU32は、終了した属性判定が1週目の属性判定でないと判断した場合(S211:NO)、第1ブロックの属性判定の結果および第2ブロックの属性判定の結果を異物検出処理の結果として確定し(S216)、異物検出処理を終了する。この場合、CPU32は、異物ありブロックであると判定された第1ブロックの一部と異物ありブロックであると判定された第2ブロックの一部とが重複する場合、その重複する部分の位置およびサイズを異物の位置およびサイズとして検出する。 If the CPU 32 determines that the completed attribute determination is not the first week's attribute determination (S211: NO), it confirms the result of the attribute determination for the first block and the result of the attribute determination for the second block as the result of the foreign object detection process (S216), and ends the foreign object detection process. In this case, if a portion of the first block determined to be a foreign object block overlaps with a portion of the second block determined to be a foreign object block, the CPU 32 detects the position and size of the overlapping portion as the position and size of the foreign object.

図12に示される処理が実行されることにより、図6Bに示される処理が実行される場合と同様に、第1読取処理による第1読取範囲の読み取り後、読取デバイス18をホームポジションに戻すための読取デバイス18の移動を利用して、第2読取処理により第1読取範囲が再び読み取られるので、読取デバイス18を副走査方向に往復動させる間に、第1読取範囲を2回読み取ることができる。 By executing the process shown in FIG. 12, similar to when the process shown in FIG. 6B is executed, after the first reading range is read by the first reading process, the movement of the reading device 18 to return the reading device 18 to its home position is utilized to read the first reading range again by the second reading process, so that the first reading range can be read twice while the reading device 18 is moved back and forth in the sub-scanning direction.

また、異物ありブロックであると判定された第1ブロックの一部と異物ありブロックであると判定された第2ブロックの一部とが重複する場合、その重複する部分の位置およびサイズが異物の位置およびサイズとして検出される。 Furthermore, if a portion of a first block determined to be a foreign object block overlaps with a portion of a second block determined to be a foreign object block, the position and size of the overlapping portion are detected as the position and size of the foreign object.

よって、異物の位置および大きさの検出に要する時間の増大を抑制しつつ、異物の位置および大きさの検出精度を向上することができる。 This makes it possible to improve the accuracy of detecting the position and size of a foreign object while minimizing the increase in the time required to detect the position and size of the foreign object.

<変形例>
以上、本発明の実施の形態について説明したが、本発明は、他の形態で実施することもできる。
<Modification>
Although the embodiment of the present invention has been described above, the present invention can be embodied in other forms.

たとえば、図6Bに示される処理において、CPU32は、終了した属性判定が1週目の属性判定でないと判断した場合に(S211:NO)、第1ブロックの属性判定の結果および第2ブロックの属性判定の結果を異物検出処理の結果として確定し(S216)、異物検出処理を終了してもよい。この場合、CPU32は、異物ありブロックであると判定された第1ブロックの一部と異物ありブロックであると判定された第2ブロックの一部とが重複する場合、その重複する部分の位置およびサイズを異物の位置およびサイズとして検出することが好ましい。これにより、異物の位置および大きさの検出精度を一層向上することができる。 For example, in the process shown in FIG. 6B, if the CPU 32 determines that the completed attribute determination is not the first week's attribute determination (S211: NO), it may confirm the result of the attribute determination for the first block and the result of the attribute determination for the second block as the result of the foreign object detection process (S216), and terminate the foreign object detection process. In this case, if a portion of the first block determined to be a foreign object block overlaps with a portion of the second block determined to be a foreign object block, the CPU 32 preferably detects the position and size of the overlapping portion as the position and size of the foreign object. This can further improve the accuracy of detecting the position and size of the foreign object.

前述の実施形態では、たとえば、256階調(8ビット)に量子化した輝度値のヒストグラムが作成されるとしたが、64階調(4ビット)に量子化した輝度値のヒストグラムが作成されてもよい。 In the above-described embodiment, for example, a histogram of brightness values quantized to 256 levels (8 bits) is created, but a histogram of brightness values quantized to 64 levels (4 bits) may also be created.

また、図6Aに示される処理では、対象ブロック内の全画素の輝度値のヒストグラムに基づいて、輝度閾値THL以上の輝度値の頻度の総和Aが算出され(S206)、総和Aが頻度閾値THFよりも大きい場合(S207:YES)、対象ブロックが異物なしブロックであると判定される(S208)。これに代えて、対象ブロック内の全画素の輝度値のヒストグラムに基づいて、所定の輝度閾値THL’未満の輝度値の頻度の総和が算出され、その総和が頻度閾値THF’よりも小さい場合、対象ブロックが異物なしブロックであると判定され、その総和が頻度閾値THF’以上である場合、対象ブロックが異物ありブロックであると判定されてもよい。 In the process shown in FIG. 6A, the sum A of the frequency of brightness values equal to or greater than the brightness threshold THL is calculated based on a histogram of the brightness values of all pixels in the target block (S206). If the sum A is greater than the frequency threshold THF (S207: YES), the target block is determined to be a block without a foreign object (S208). Alternatively, the sum of the frequency of brightness values less than a predetermined brightness threshold THL' is calculated based on a histogram of the brightness values of all pixels in the target block. If this sum is less than the frequency threshold THF', the target block is determined to be a block without a foreign object, and if this sum is greater than or equal to the frequency threshold THF', the target block is determined to be a block with a foreign object.

なお、背景部材17以外の物体に対応する輝度値(背景部材17以外の物体での反射光を受光した受光素子から出力される電圧に応じた輝度値)は、背景部材17に対応する輝度値よりも低い値を示す傾向があり、輝度閾値THL’は、背景部材17以外の物体に対応する輝度値の上限として定められる。 Note that brightness values corresponding to objects other than the background member 17 (brightness values corresponding to the voltage output from the light-receiving element that receives light reflected from an object other than the background member 17) tend to be lower than the brightness values corresponding to the background member 17, and the brightness threshold THL' is defined as the upper limit of brightness values corresponding to objects other than the background member 17.

前述の実施形態では、CPU32が各処理を実行するとしたが、読取装置1に複数のCPUが設けられて、複数のCPUが協働して各処理を実行してもよい。 In the above embodiment, the CPU 32 executes each process, but the reading device 1 may be provided with multiple CPUs, and the multiple CPUs may cooperate to execute each process.

また、読取装置1は、単独であってもよいが、画像データに係る画像を用紙に印刷する印刷装置(図示せず)とともに、読取機能および印刷機能などの複数の機能を有する複合機(MFP:Multi-Function Peripheral)に用いられてもよい。 The reading device 1 may be used alone, or together with a printing device (not shown) that prints an image based on image data on paper, it may also be used in a multi-function peripheral (MFP) that has multiple functions, such as reading and printing.

その他、前述の構成には、特許請求の範囲に記載された事項の範囲で種々の設計変更を施すことが可能である。 In addition, various design modifications may be made to the above-described configuration within the scope of the claims.

1:読取装置
14:透明板
17:背景部材
18:読取デバイス
19:移動機構
32:CPU
OB:読取対象物
1: Reading device 14: Transparent plate 17: Background member 18: Reading device 19: Moving mechanism 32: CPU
OB: Object to be read

Claims (8)

透明板と、
前記透明板に対する一方に設けられ、前記透明板に向けて光を出射する光源および主走査方向に配列された複数の受光素子を有する読取デバイスと、
前記主走査方向と交差し、かつ前記透明板に沿った副走査方向に前記読取デバイスを移動させる移動機構と、
前記透明板に対する他方に設けられ、前記透明板に対向して配置される白色の背景部材と、
制御部と、を備え、
前記制御部は、
前記読取デバイスを前記副走査方向の一方に移動させつつ、前記読取デバイスの前記光源から光を出射させて、前記受光素子から出力される電気信号を輝度値に変換することにより、第1読取範囲を読み取る第1読取処理と、
前記第1読取範囲の読取画像を分割した複数の第1ブロックごとに作成された前記輝度値のヒストグラムに基づいて、前記第1ブロックのそれぞれが前記背景部材の読取画像とは異なる読取画像を含む異物ありブロックであるか否かを判定する第1判定処理と、
前記第1判定処理の判定結果から、前記第1読取範囲よりも狭い範囲であって、前記異物ありブロックであると判定された前記第1ブロックを含む第2読取範囲を設定する設定処理と、
前記読取デバイスを前記副走査方向の他方に移動させつつ、前記読取デバイスの前記光源から光を出射させて、前記受光素子から出力される電気信号を輝度値に変換することにより、前記第2読取範囲を読み取る第2読取処理と、
前記第2読取範囲の読取画像を分割した複数の第2ブロックごとに作成された前記輝度値のヒストグラムに基づいて、前記第2ブロックのそれぞれが前記異物ありブロックであるか否かを判定する第2判定処理と、を実行する、読取装置。
A transparent plate and
a reading device provided on one side of the transparent plate, the reading device having a light source that emits light toward the transparent plate and a plurality of light receiving elements arranged in a main scanning direction;
a moving mechanism that moves the reading device in a sub-scanning direction that intersects with the main scanning direction and that is along the transparent plate;
a white background member provided on the other side of the transparent plate and arranged opposite the transparent plate;
a control unit,
The control unit
a first reading process in which the reading device is moved in one direction of the sub-scanning direction, the light source of the reading device is caused to emit light, and an electrical signal output from the light receiving element is converted into a luminance value, thereby reading a first reading range;
a first determination process for determining whether each of the first blocks is a foreign substance block including a read image different from the read image of the background member, based on the histogram of the luminance values created for each of a plurality of first blocks obtained by dividing the read image of the first read range;
a setting process for setting a second read range that is narrower than the first read range and includes the first block determined to be the foreign substance block based on the determination result of the first determination process;
a second reading process in which the reading device is moved in the other direction in the sub-scanning direction, the light source of the reading device is caused to emit light, and the electrical signal output from the light receiving element is converted into a luminance value, thereby reading the second reading range;
and a second determination process for determining whether each of the second blocks is a foreign matter block based on a histogram of the brightness values created for each of a plurality of second blocks obtained by dividing the read image of the second reading range.
請求項1に記載の読取装置であって、
前記制御部は、前記第2ブロックのサイズを前記第1ブロックのサイズよりも小さく設定する、読取装置。
2. The reading device according to claim 1,
The control unit sets the size of the second block to be smaller than the size of the first block.
請求項2に記載の読取装置であって、
前記制御部は、前記第1ブロックのサイズおよび前記第2ブロックのサイズをそれぞれ固定値に設定している、読取装置。
3. The reading device according to claim 2,
The control unit sets the size of the first block and the size of the second block to fixed values.
請求項2に記載の読取装置であって、
前記制御部は、第1読取範囲に対する第2読取範囲の縮小率に応じて、前記第2ブロックのサイズを前記第1ブロックのサイズに対して縮小して設定する、読取装置。
3. The reading device according to claim 2,
The control unit sets a size of the second block reduced relative to a size of the first block in accordance with a reduction ratio of the second read range to the first read range.
透明板と、
前記透明板に対する一方に設けられ、前記透明板に向けて光を出射する光源および主走査方向に配列された複数の受光素子を有する読取デバイスと、
前記主走査方向と交差し、かつ前記透明板に沿った副走査方向に前記読取デバイスを移動させる移動機構と、
前記透明板に対する他方に設けられ、前記透明板に対向して配置される白色の背景部材と、
制御部と、を備え、
前記制御部は、
前記読取デバイスを前記副走査方向の一方に移動させつつ、前記読取デバイスの前記光源から光を出射させて、前記受光素子から出力される電気信号を輝度値に変換することにより、第1読取範囲を読み取る第1読取処理と、
前記第1読取範囲の読取画像を分割した複数の第1ブロックごとに作成された前記輝度値のヒストグラムに基づいて、前記第1ブロックのそれぞれが前記背景部材の読取画像とは異なる読取画像を含む異物ありブロックであるか否かを判定する第1判定処理と、
前記読取デバイスを前記副走査方向の他方に移動させつつ、前記読取デバイスの前記光源から光を出射させて、前記受光素子から出力される電気信号を輝度値に変換することにより、前記第1読取範囲を読み取る第2読取処理と、
前記第1読取範囲の読取画像を分割した複数の第2ブロックごとに作成された前記輝度値のヒストグラムに基づいて、前記第2ブロックのそれぞれが前記異物ありブロックであるか否かを判定する第2判定処理と、を実行し、
前記第1ブロックの位置と前記第2ブロックの位置とをずらして設定する、読取装置。
A transparent plate and
a reading device provided on one side of the transparent plate, the reading device having a light source that emits light toward the transparent plate and a plurality of light receiving elements arranged in a main scanning direction;
a moving mechanism that moves the reading device in a sub-scanning direction that intersects with the main scanning direction and that is along the transparent plate;
a white background member provided on the other side of the transparent plate and arranged opposite the transparent plate;
a control unit,
The control unit
a first reading process in which the reading device is moved in one direction of the sub-scanning direction, the light source of the reading device is caused to emit light, and an electrical signal output from the light receiving element is converted into a luminance value, thereby reading a first reading range;
a first determination process for determining whether each of the first blocks is a foreign substance block including a read image different from the read image of the background member, based on the histogram of the luminance values created for each of a plurality of first blocks obtained by dividing the read image of the first read range;
a second reading process in which the reading device is moved in the other direction in the sub-scanning direction, the light source of the reading device is caused to emit light, and the electrical signal output from the light receiving element is converted into a luminance value, thereby reading the first reading range;
a second determination process for determining whether each of the second blocks is a foreign substance-containing block based on the histogram of brightness values created for each of the second blocks obtained by dividing the read image of the first read range;
A reading device that sets the position of the first block and the position of the second block to be shifted from each other.
請求項1~5のいずれか一項に記載の読取装置であって、
前記制御部は、前記第1判定処理ですべての前記第1ブロックが前記異物ありブロックでないと判定した場合、前記第2読取処理および前記第2判定処理の実行を省略する、読取装置。
The reading device according to any one of claims 1 to 5,
When the control unit determines in the first determination process that none of the first blocks are blocks containing foreign matter, the control unit omits execution of the second reading process and the second determination process.
請求項1~5のいずれか一項に記載の読取装置であって、
前記制御部は、前記第1判定処理ですべての前記第1ブロックが前記異物ありブロックでないと判定した場合、前記第1読取処理における読取解像度よりも高い読取解像度で前記第2読取処理を実行する、読取装置。
The reading device according to any one of claims 1 to 5,
A reading device in which, when the control unit determines in the first determination process that all of the first blocks are not foreign substance blocks, the control unit executes the second reading process at a reading resolution higher than the reading resolution in the first reading process.
請求項1~5のいずれか一項に記載の読取装置であって、
前記透明板と前記背景部材との間に前記読取対象物が配置されているか否かを検知するセンサ、をさらに備え、
前記制御部は、前記センサにより前記読取対象物が配置されていないことが検知されるときに、前記第1読取処理を実行する、読取装置。
The reading device according to any one of claims 1 to 5,
a sensor that detects whether the object to be read is placed between the transparent plate and the background member,
The control unit executes the first reading process when the sensor detects that the object to be read is not placed.
JP2024013047A 2024-01-31 2024-01-31 Reading device Pending JP2025118004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2024013047A JP2025118004A (en) 2024-01-31 2024-01-31 Reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2024013047A JP2025118004A (en) 2024-01-31 2024-01-31 Reading device

Publications (1)

Publication Number Publication Date
JP2025118004A true JP2025118004A (en) 2025-08-13

Family

ID=96701461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2024013047A Pending JP2025118004A (en) 2024-01-31 2024-01-31 Reading device

Country Status (1)

Country Link
JP (1) JP2025118004A (en)

Similar Documents

Publication Publication Date Title
US8300277B2 (en) Image processing apparatus and method for determining document scanning area from an apex position and a reading reference position
JP4653194B2 (en) Image processing apparatus, image processing apparatus control method, program, and computer-readable storage medium
US5796876A (en) Apparatus for reading image and method therefor
US7554704B2 (en) Image scanning apparatus having a scanning position adjustment capability
US8345331B2 (en) Image reading apparatus, multifunction printer apparatus, and image processing method
JP5222126B2 (en) Image processing method, image processing apparatus, and program
JP2003259088A (en) Image reading device
JP2025118004A (en) Reading device
JP5462522B2 (en) Image processing apparatus, image processing method, and program for causing computer to realize the image processing method
CN101340507B (en) Image scanning apparatus
JPH0670097A (en) Picture reader
US8422785B2 (en) Image processing apparatus, image processing method, and program
US6009195A (en) Image processor with marker edition mode
JP3637592B2 (en) Image reading device and image input / output device
JP2003037713A (en) Image reading device
JP2009272675A (en) Image processor, image processing method, program, and storage medium
JP2004221729A (en) Contact image sensor and contact image reading device using the same
JP2003270731A (en) Image reading device with pre-scan function
JP2021118412A (en) Image reader, image forming device, document size detection method
JP2010010839A (en) Image reading device, its processing method, and program
JP2009194762A (en) Image processing apparatus
JP2003037712A (en) Image reading device
JP2019114917A (en) Image processing apparatus and program
JP2023097660A (en) reader
JP2009296229A (en) Image reader, control method of image reader, and control program of image reader