JP4973701B2 - Image reading device - Google Patents

Image reading device Download PDF

Info

Publication number
JP4973701B2
JP4973701B2 JP2009174377A JP2009174377A JP4973701B2 JP 4973701 B2 JP4973701 B2 JP 4973701B2 JP 2009174377 A JP2009174377 A JP 2009174377A JP 2009174377 A JP2009174377 A JP 2009174377A JP 4973701 B2 JP4973701 B2 JP 4973701B2
Authority
JP
Japan
Prior art keywords
vertex
document
image
distance
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009174377A
Other languages
Japanese (ja)
Other versions
JP2011029997A (en
Inventor
龍也 佐藤
崇史 松海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2009174377A priority Critical patent/JP4973701B2/en
Publication of JP2011029997A publication Critical patent/JP2011029997A/en
Application granted granted Critical
Publication of JP4973701B2 publication Critical patent/JP4973701B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、原稿に記載された画像を読み取り、画像データを生成する画像読取装置に関する。   The present invention relates to an image reading apparatus that reads an image written on a document and generates image data.

スキャナ等の画像読取装置において、原稿のスキャンを終了するタイミングや、スキャンされる原稿のサイズ等を特定するために、スキャン画像における原稿の領域の終端の位置を検出するということが考えられる。ここで、スキャン画像における原稿の領域の終端の位置を特定する方法としては、特許文献1に記載されている方法が知られていた。   In an image reading apparatus such as a scanner, it is conceivable to detect the position of the end of a document area in a scanned image in order to specify the timing of ending scanning of the document, the size of the scanned document, and the like. Here, as a method for specifying the position of the end of the document area in the scanned image, the method described in Patent Document 1 has been known.

すなわち、特許文献1に記載の画像伝送装置では、原稿読取位置に特定のパターンが設けられており、原稿のスキャンを行うと、原稿の背景画像として上記パターンが読み取られる。そして、スキャンにより生成されたスキャン画像データに対し上記パターンの検出処理が行われ、上記パターンの検出結果に基づき原稿の終端の位置が特定される。   That is, in the image transmission apparatus described in Patent Document 1, a specific pattern is provided at a document reading position, and when the document is scanned, the pattern is read as a background image of the document. Then, the pattern detection process is performed on the scanned image data generated by scanning, and the position of the end of the document is specified based on the pattern detection result.

特開平7−21347号公報JP 7-21347 A

しかしながら、特許文献1に記載の画像伝送装置では、原稿全体のスキャンが終了し、原稿全体の画像データが生成された後でないと、原稿の終端の位置を特定することができなかった。従って、原稿の終端の位置を特定するのに時間がかかるという問題があった。   However, in the image transmission apparatus described in Patent Document 1, the position of the end of the document cannot be specified until after the entire document has been scanned and the image data of the entire document has been generated. Therefore, there is a problem that it takes time to specify the position of the end of the document.

本発明は上記課題に鑑みてなされたものであり、原稿のスキャンが終了し、原稿全体の画像データが生成される前に、スキャン画像における原稿の終端の位置をすみやかに特定することができる画像読取装置を提供することを目的とする。   SUMMARY OF THE INVENTION The present invention has been made in view of the above-described problems. An image that can quickly specify the position of the end of an original in a scanned image before the original is scanned and image data of the entire original is generated. An object is to provide a reader.

上記課題を解決するためになされた本発明に係る画像読取装置は、原稿の画像を順次読み取ることにより、該原稿のスキャンを行い、画像データを生成する読取手段と、読取手段により原稿のスキャンが開始された後から、スキャンが終了するまでの間に、読取手段により生成された該原稿の一部についての画像データが示す画像において、該原稿の頂点を検出する頂点検出手段と、読取手段により生成された画像データが示す画像において、原稿の輪郭上の点の位置を検出する第一の位置検出手段と、読取手段により生成された、原稿の一部についての画像データが示す画像において、頂点検出手段により該原稿の3つの頂点が検出されると、該原稿を矩形であるとみなし、該原稿の残りの1つの頂点である4番目の頂点の位置を、第一の位置検出手段により検出された該原稿の輪郭上の点の位置に基づき算出する頂点算出処理を実行する算出手段と、を備えることを特徴とする。 An image reading apparatus according to the present invention, which has been made to solve the above-described problems, scans an original by sequentially reading the image of the original, and generates an image data. The reading means scans the original. In the image indicated by the image data of a part of the document generated by the reading unit from the start to the end of scanning, the vertex detection unit that detects the vertex of the document and the reading unit In the image indicated by the generated image data, the first position detecting means for detecting the position of the point on the outline of the document, and the apex in the image indicated by the image data about a part of the document generated by the reading means When the detection unit detects three vertices of the document, the document is regarded as a rectangle, and the position of the fourth vertex, which is the remaining one vertex of the document, is set to the first vertex. Characterized in that it comprises a calculation means for performing the vertex process for calculating based on the position of a point on 置検 out of the document detected by means contour, the.

こうすることにより、スキャンの対象となる矩形の原稿が走査方向に対して傾いた状態となっている場合には、原稿全体のスキャンが終了する前に、スキャン画像における原稿の終端の位置となる4番目の頂点の位置を予測することができる。これにより、スキャン画像における原稿の終端の位置をすみやかに特定することができる。   In this way, when the rectangular document to be scanned is inclined with respect to the scanning direction, the position of the end of the document in the scanned image is reached before the entire document is scanned. The position of the fourth vertex can be predicted. As a result, the position of the end of the document in the scanned image can be quickly identified.

そして、原稿の終端の位置が予測できると、例えば、スキャンにより原稿の終端の位置に対応する画像データが生成された際に原稿のスキャンが終了したとみなすことが可能となり、原稿のスキャンが無駄に行われてしまうことを防ぐことが可能となる。また、原稿の終端となる4番目の頂点の位置を予測することにより、原稿のサイズを推定することが可能となる。   If the end position of the document can be predicted, for example, when image data corresponding to the position of the end of the document is generated by scanning, it can be considered that the document scan has been completed, and the document scan is wasted. It is possible to prevent this from happening. In addition, the size of the original can be estimated by predicting the position of the fourth vertex that is the end of the original.

尚、具体的には、以下のようにして原稿の終端の位置を予測しても良い。
すなわち、上記画像読取装置において、画像データが示す画像において、読取手段により先に読み取られた画像が存在する側を上流側、後に読み取られた画像が存在する側を下流側とし、原稿の頂点のうち、最上流側に位置する頂点を第一頂点、最上流から2番目,3番目に位置する頂点を第二頂点,第三頂点とし、該画像における原稿が矩形である場合の、第一頂点と第二頂点とを結ぶ辺を前辺、該前辺に対向する辺を後辺、残りの辺を側辺とし、第一の位置検出手段は、読取手段により、原稿の後辺の一部を含む画像についての画像データが生成され、頂点検出手段により3つの頂点が検出されると、該画像における第二頂点を含む側辺上の予め定められた場所に存在する2点の位置と、後辺上の予め定められた場所に存在する2点の位置とを検出し、算出手段は、頂点算出処理において、第一の位置検出手段により検出された第二頂点を含む側辺上の2点の位置に基づき直線を算出すると共に、後辺上の2点の位置に基づき直線を算出し、これらの直線の交点の位置を、4番目の頂点の位置として算出しても良い。
Specifically, the position of the end of the document may be predicted as follows.
That is, in the image reading apparatus, in the image indicated by the image data, the side where the image read first by the reading unit exists is the upstream side, and the side where the image read later is the downstream side. The first vertex when the vertex located on the most upstream side is the first vertex, the second and third vertexes from the most upstream are the second vertex, and the third vertex, and the document in the image is rectangular. The side connecting the first vertex and the second vertex is the front side, the side opposite to the front side is the rear side, and the remaining side is the side side. When image data is generated for an image including, and three vertices are detected by the vertex detection means, the positions of two points present at predetermined locations on the side including the second vertex in the image, The position of two points that exist at a predetermined location on the back side In the vertex calculation process, the calculation means calculates a straight line based on the positions of two points on the side including the second vertex detected by the first position detection means, and calculates 2 on the rear side. A straight line may be calculated based on the position of the point, and the position of the intersection of these straight lines may be calculated as the position of the fourth vertex.

また、上記画像読取装置において、画像データが示す画像において、読取手段により先に読み取られた画像が存在する側を上流側、後に読み取られた画像が存在する側を下流側とし、原稿の頂点のうち、最上流側に位置する頂点を第一頂点、最上流から2番目,3番目に位置する頂点を第二頂点,第三頂点とし、第一の位置検出手段は、画像データが示す画像において、頂点検出手段により検出された3つの頂点の位置を検出し、算出手段は、頂点算出処理において、第一の位置検出手段により特定された3つの頂点の位置に基づき、第一頂点と、第二頂点と第三頂点とのうちの一方とを通過する直線の方向と、第一頂点と該一方の頂点との間の距離と、第二頂点と第三頂点とのうちの他方の位置とを算出し、算出した該方向と、該距離と、該位置とに基づき、4番目の頂点の位置を算出しても良い。 In the image reading apparatus, in the image indicated by the image data, the side where the image read first by the reading unit exists is the upstream side, and the side where the image read later is the downstream side. Among them, the vertex located on the most upstream side is the first vertex, the vertices located second and third from the most upstream are the second vertex, and the third vertex, and the first position detecting means in the image indicated by the image data , Detecting the positions of the three vertices detected by the vertex detecting means, the calculating means, in the vertex calculation processing, based on the positions of the three vertices specified by the first position detecting means, The direction of a straight line passing through one of the two vertices and the third vertex, the distance between the first vertex and the one vertex, and the other position of the second vertex and the third vertex; And the calculated direction, the distance, Based on the position, it may calculate the position of the fourth vertex.

また、画像読取装置は、原稿が矩形でない場合には、原稿の終端の位置を精度良く予測することは困難である。
そこで、上記画像読取装置において、頂点検出手段により画像データが示す画像において原稿の頂点が検出されると、該頂点の角度に基づき、該原稿を矩形であるとみなすことができるかどうかを判定する矩形判定手段をさらに備え、算出手段は、矩形判定手段により肯定判定がなされた場合に、頂点算出処理を実行するのが好ましい。
In addition, when the document is not rectangular, it is difficult for the image reading apparatus to accurately predict the position of the end of the document.
Therefore, in the image reading apparatus, when the vertex detection unit detects the vertex of the document in the image indicated by the image data, it determines whether the document can be regarded as a rectangle based on the angle of the vertex. It is preferable that a rectangle determination unit is further provided, and the calculation unit executes the vertex calculation process when an affirmative determination is made by the rectangle determination unit .

こうすることにより、原稿が矩形である場合のみ終端の位置を予測することができるため、終端の位置を予測する精度が向上する。
また、原稿を搬送させながらスキャンを行うシートフィード型のスキャナでは、スキャンを行う際に、走査方向に対して原稿が傾いた状態となってしまうことが多い。
By doing so, the end position can be predicted only when the document is rectangular, so the accuracy of predicting the end position is improved.
In a sheet feed type scanner that scans while conveying a document, the document is often inclined with respect to the scanning direction when scanning.

そこで、上記画像読取装置において、画像読取装置は、原稿載置部に載置された原稿を搬送経路に沿って搬送させる搬送手段をさらに備え、読取手段は、搬送経路上における読取ポイントに対応する位置に配置されており、該読取ポイントを通過する原稿の画像を読み取ることにより、原稿に対しスキャンを行い、画像データを生成するのが好ましい。 Therefore, in the image reading apparatus, the image reading apparatus further includes a transport unit that transports the document placed on the document placement unit along the transport path, and the reading unit corresponds to a reading point on the transport path. It is preferable to scan the document and generate image data by reading the image of the document that is placed at the position and passes through the reading point .

こうすることにより、シートフィード型のスキャナにて、スキャン画像において原稿の終端の位置を精度良く予測することができる。
また、原稿自動送りにより複数の原稿について連続的にスキャンが行われる場合には、これらの原稿のサイズは同一である場合が多いと考えられる。
By doing so, it is possible to accurately predict the position of the end of the document in the scanned image by the sheet feed type scanner.
In addition, when a plurality of documents are continuously scanned by automatic document feeding, it is considered that the sizes of these documents are often the same.

そこで、上記画像読取装置において、画像データに基づき、スキャンの対象となった原稿のサイズを特定する特定手段と、読取手段により生成された、原稿の一部についての画像データが示す画像において、頂点検出手段により該原稿の第一頂点と第二頂点とが検出されると、該第一頂点の位置と該第二頂点の位置を検出する第二の位置検出手段と、第二の位置検出手段により検出された第一頂点の位置と第二頂点の位置とに基づき、該第一頂点と該第二頂点との間の距離である頂点間距離を算出する距離算出手段と、距離算出手段により算出された原稿についての頂点間距離と、該原稿よりも前に搬送された矩形の原稿である先の原稿について距離算出手段により算出された頂点間距離とが一致するかを判定する距離判定手段と、を備え、算出手段は、距離判定手段により、読取手段により生成された画像データが示す画像における原稿についての頂点間距離と、先の原稿についての頂点間距離が一致すると判定された場合には、該画像における原稿を矩形とみなし、第二の位置検出手段により検出された、該画像における第一頂点の位置と、第二頂点の位置と、特定手段により特定された該先の原稿のサイズとに基づき、4番目の頂点の位置を算出する頂点推定処理を、頂点算出処理に替えて実行するのが好ましいTherefore, in the above image reading apparatus, in the image indicated by the image data about a part of the document generated by the reading unit and the specifying unit for specifying the size of the document to be scanned based on the image data, the apex When the detection means detects the first vertex and the second vertex of the document, the second position detection means for detecting the position of the first vertex and the position of the second vertex, and the second position detection means A distance calculating means for calculating a distance between vertices which is a distance between the first vertex and the second vertex based on the position of the first vertex and the position of the second vertex detected by Distance determination means for determining whether the calculated distance between the vertices of the original matches the distance between the vertices calculated by the distance calculation means for the previous original that is a rectangular original conveyed before the original And comprising When the distance determination unit determines that the distance between the vertices of the document in the image indicated by the image data generated by the reading unit matches the distance between the vertices of the previous document, Considering the document as a rectangle, based on the position of the first vertex in the image, the position of the second vertex detected by the second position detection means, and the size of the previous document specified by the specification means, The vertex estimation process for calculating the position of the fourth vertex is preferably executed instead of the vertex calculation process.

こうすることにより、原稿自動送りにより2番目以降に搬送される原稿については、そのスキャン画像において、より速やかに原稿の終端の位置を予測することができる。
また、原稿自動送りにより複数の原稿について連続的にスキャンが行われる場合であっても、スキャンの対象となる原稿のサイズが全て同一であるとは限らない。そして、サイズが異なる複数の原稿に対し原稿自動送りによるスキャンが行われる場合に上述した頂点推定処理が実行されてしまうと、原稿の終端の位置を精度良く予測することができなくなってしまう。
In this way, the end position of the document can be predicted more quickly in the scanned image of the document conveyed second and later by automatic document feeding.
Further, even when a plurality of documents are continuously scanned by automatic document feeding, the sizes of documents to be scanned are not necessarily the same. If the above-described vertex estimation process is performed when a plurality of documents of different sizes are scanned by automatic document feeding, the position of the end of the document cannot be accurately predicted.

そこで、上記画像読取装置において、頂点算出処理に替えて、頂点推定処理を実行する旨の指示をユーザから受け付ける受付手段をさらに備え、算出手段は、受付手段を介してユーザから指示を受け付けた場合には、頂点算出処理に替えて、頂点推定処理を実行するのが好ましいTherefore, the image reading apparatus further includes a receiving unit that receives from the user an instruction to execute the vertex estimating process instead of the vertex calculating process, and the calculating unit receives the instruction from the user via the receiving unit. In this case, it is preferable to execute a vertex estimation process instead of the vertex calculation process.

こうすることにより、サイズの異なる複数の原稿について原稿自動送りにより連続的にスキャンが行われる場合に頂点推定処理が行われてしまうことを防ぐことができ、原稿の終端の位置を予測する精度が向上する。   By doing this, it is possible to prevent the vertex estimation process from being performed when a plurality of documents of different sizes are continuously scanned by automatic document feeding, and the accuracy of predicting the end position of the document can be improved. improves.

スキャナの構成を示すブロック図である。It is a block diagram which shows the structure of a scanner. 終端位置検出処理のフローチャートである。It is a flowchart of an end position detection process. 終端位置検出処理のフローチャートである。It is a flowchart of an end position detection process. スキャン画像上での原稿のエッジのチェックについての説明図である。It is explanatory drawing about the check of the edge of the original on a scanned image. 原稿の4番目の頂点の位置の算出についての説明図である。It is explanatory drawing about calculation of the position of the 4th vertex of a manuscript.

以下、本発明の実施形態について図面を用いて説明する。尚、本発明の実施の形態は、下記の実施形態に何ら限定されることはなく、本発明の技術的範囲に属する限り種々の形態を採りうる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The embodiments of the present invention are not limited to the following embodiments, and various forms can be adopted as long as they belong to the technical scope of the present invention.

[構成の説明]
まず、本実施形態における、ADF(Auto Document Feeder)を備えるスキャナ1の構成について、図1に記載のブロック図を用いて説明する。スキャナ1は、原稿載置部に載置された複数の原稿を搬送経路に沿って順次搬送して原稿自動送りを行う搬送部10と、搬送経路上の読取ポイントに設けられたCIS(Contact Image Sensor)等から構成される画像読取部20と、画像読取部20により読取ポイントを通過する原稿の前端から後端にかけてスキャンを行わせ、この原稿のスキャン画像データを順次生成する読取制御部30と、ユーザからの各種操作を受け付けると共に、各種情報を表示する表示操作部40と、各種情報を記憶するRAM50及びフラッシュメモリ60と、フラッシュメモリ60に記憶されているプログラムに基づき各種処理を実行しスキャナ1を統括制御するCPU70と、LANに接続され、図示しないPC等と通信を行う通信部80と、を有している。また、これらの構成要素は、バス90により互いに接続されている。
[Description of configuration]
First, the structure of the scanner 1 provided with ADF (Auto Document Feeder) in this embodiment is demonstrated using the block diagram of FIG. The scanner 1 includes a conveyance unit 10 that sequentially conveys a plurality of documents placed on a document placement unit along a conveyance path and automatically feeds the document, and a CIS (Contact Image) provided at a reading point on the conveyance path. An image reading unit 20 including a sensor), and a reading control unit 30 that causes the image reading unit 20 to scan from the front end to the rear end of the document that passes the reading point, and sequentially generates scan image data of the document. The display operation unit 40 that receives various operations from the user and displays various information, the RAM 50 and the flash memory 60 that store various information, and the scanner that executes various processes based on the programs stored in the flash memory 60 1 and a communication unit 80 connected to the LAN and communicating with a PC (not shown). These components are connected to each other by a bus 90.

[動作の説明]
次に、スキャナ1において、原稿載置部に載置された2枚の原稿に対して原稿自動送りによるスキャンを実施する際に行われる終端位置検出処理について、図2,3に記載のフローチャートを用いて説明する。本処理は、搬送部10により1枚目の原稿が搬送経路上の読取ポイントまで搬送され、読取制御部30により、この1枚目の原稿についてのスキャン画像データの生成が開始された際に開始され、読取制御部30によるスキャン画像データの生成と並行して実行される処理である。尚、読取制御部30により生成されるスキャン画像データが示すスキャン画像において、画像読取部20によるスキャンにおける主走査方向に対応する方向を横方向、副走査方向(原稿の搬送方向)に対応する方向を縦方向とし、縦方向において、先に読み取られた画像が存在する側を上側、後に読み取られた画像が存在する側を下側とする。
[Description of operation]
Next, in the scanner 1, the flowcharts shown in FIGS. 2 and 3 are shown for the end position detection processing that is performed when scanning is performed by automatic document feeding on two documents placed on the document placement unit. It explains using. This processing is started when the first original is conveyed to the reading point on the conveyance path by the conveying unit 10 and the generation of scan image data for the first original is started by the reading control unit 30. This process is executed in parallel with the generation of scan image data by the reading control unit 30. In the scan image indicated by the scan image data generated by the reading control unit 30, the direction corresponding to the main scanning direction in the scanning by the image reading unit 20 is the horizontal direction, and the direction corresponding to the sub-scanning direction (document transport direction). Is the vertical direction, and in the vertical direction, the side on which the previously read image exists is the upper side, and the side on which the later read image exists is the lower side.

S105では、スキャナ1のCPU70は、読取制御部30により順次生成される1枚目の原稿のスキャン画像データに対しての原稿のエッジ検出を開始する。具体的には、図4の説明図に記載されているように、このスキャン画像において、横方向に並ぶ画素列に対し、上側から順に横方向の両端から並行してチェックを行い、原稿のエッジを検出する。エッジが検出されると、CPU70はS110に処理を移行する。   In step S <b> 105, the CPU 70 of the scanner 1 starts document edge detection for the scan image data of the first document sequentially generated by the reading control unit 30. Specifically, as described in the explanatory diagram of FIG. 4, in this scanned image, the pixel rows arranged in the horizontal direction are checked in parallel from both ends in the horizontal direction in order from the upper side, and the edge of the document Is detected. When the edge is detected, the CPU 70 proceeds to S110.

S110では、CPU70は、スキャン画像に向かって右端からのチェックにより検出された右エッジの位置と、左端からのチェックにより検出された左エッジの位置が同じであるかどうかを判定する。位置が同じである場合には(S110:Yes)、図4の説明図に記載されているように原稿が傾いているとみなし、CPU70はS115に処理を移行する。また、位置が同じでない場合には(S110:No)、CPU70はS175に処理を移行する。   In S110, the CPU 70 determines whether or not the position of the right edge detected by the check from the right end toward the scan image is the same as the position of the left edge detected by the check from the left end. If the positions are the same (S110: Yes), the CPU 70 considers that the document is tilted as described in the explanatory diagram of FIG. 4, and the CPU 70 shifts the processing to S115. When the positions are not the same (S110: No), the CPU 70 shifts the process to S175.

S115では、CPU70は、S110で検出された左右のエッジが重なる位置を1番目の頂点(A点)とし、A点の座標を、横方向をX軸方向、縦方向をY軸方向とするXY座標系の原点(0,0)として特定する(図5の説明図参照)。そして、S120に処理を移行する。   In S115, the CPU 70 uses the position where the left and right edges detected in S110 overlap as the first vertex (A point), and the coordinates of the A point are the X-axis direction in the horizontal direction and the Y-axis direction in the vertical direction. It is specified as the origin (0, 0) of the coordinate system (see the explanatory diagram of FIG. 5). Then, the process proceeds to S120.

S120では、CPU70は、A点よりも下側における、それぞれの上記画素列における左右エッジ間の距離の特定を開始し、S125に処理を移行する。
S125では、CPU70は、1枚目の原稿のスキャン開始後、制限時間内にエッジ間距離が一定となったかどうか判定し、肯定判定がなされた場合には(S125:Yes)S130に、否定判定がなされた場合には(S125:No)S180に処理を移行する。尚、上記制限時間とは、傾いた矩形の原稿の前端部分のスキャンに必要と考えられる時間であり、スキャンの解像度や、搬送中の原稿において想定される原稿の傾きの最大値等に基づき設定される時間である。
In S120, the CPU 70 starts identifying the distance between the left and right edges in each of the pixel columns below the point A, and proceeds to S125.
In S125, the CPU 70 determines whether or not the distance between edges has become constant within the time limit after the start of scanning of the first document. If an affirmative determination is made (S125: Yes), a negative determination is made in S130. If the process is performed (S125: No), the process proceeds to S180. The time limit is a time that is considered necessary for scanning the front edge of a tilted rectangular document, and is set based on the scanning resolution, the maximum value of the document tilt assumed for the document being transported, etc. It is time to be.

S130では、CPU70は、エッジ間距離が一定である上記画素列のうち、最も上に位置する画素列を特定する。そして、A点を原点とするXY座標系において、この画素列におけるエッジのうち、A点からより離れた場所に存在するエッジの座標を2番目の頂点(B点)の座標として特定し、S135に処理を移行する。尚、図5の説明図に記載されているように、B点の座標を(Bx,By)と記載する。   In S <b> 130, the CPU 70 identifies the pixel row located at the top among the pixel rows having a constant edge distance. Then, in the XY coordinate system with the point A as the origin, the coordinates of the edge that is further away from the point A among the edges in this pixel row are specified as the coordinates of the second vertex (point B), and S135. The process is transferred to. As described in the explanatory diagram of FIG. 5, the coordinates of the point B are described as (Bx, By).

S135では、CPU70は、1枚目の原稿のスキャン開始後、制限時間内にエッジ間距離が減少し始めたかどうか判定し、肯定判定がなされた場合には(S135:Yes)S140に、否定判定がなされた場合には(S135:No)S180に処理を移行する。尚、上記制限時間とは、矩形の原稿の前端から後端にかけてのスキャンに必要と考えられる時間であり、スキャンの解像度や、スキャンが可能な最大の原稿サイズ等に基づき設定される時間である。   In S135, the CPU 70 determines whether or not the edge-to-edge distance has started to decrease within the time limit after scanning of the first document. If an affirmative determination is made (S135: Yes), a negative determination is made in S140. If the process is performed (S135: No), the process proceeds to S180. The time limit is a time that is considered necessary for scanning from the front edge to the rear edge of a rectangular document, and is a time that is set based on the scanning resolution, the maximum document size that can be scanned, and the like. .

S140では、CPU70は、エッジ間距離が一定である上記画素列のうち、最も下に位置する画素列を特定する。そして、A点を原点とするXY座標系において、この画素列におけるエッジのうち、B点についてのチェックとは反対方向のチェックにより検出されたエッジの座標を3番目の頂点(C点)の座標として特定し、S145に処理を移行する。尚、図5の説明図に記載されているように、C点の座標を(Cx,Cy)と記載する。   In S <b> 140, the CPU 70 specifies the lowest pixel column among the pixel columns having a constant edge-to-edge distance. Then, in the XY coordinate system with point A as the origin, the coordinates of the edge detected by the check in the direction opposite to the check for point B among the edges in this pixel row are the coordinates of the third vertex (point C). And the process proceeds to S145. As described in the explanatory diagram of FIG. 5, the coordinates of the point C are described as (Cx, Cy).

S145では、CPU70は、C点の下側に位置する上記画素列において検出された左右エッジの位置を特定する。このとき、A点を原点とするXY座標系において、C点と同じ方向(本実施形態の場合は右側)のチェックにより検出されたエッジの座標をD点の座標として、B点と同じ方向(本実施形態の場合は左側)のチェックにより検出されたエッジの座標をE点の座標として特定する。そして、CPU70は、S150に処理を移行する。尚、図5の説明図に記載されているように、D点の座標を(Dx,Dy)、E点の座標を(Ex,Ey)と記載する。   In S145, the CPU 70 specifies the positions of the left and right edges detected in the pixel row located below the point C. At this time, in the XY coordinate system with the point A as the origin, the edge coordinates detected by checking the same direction as the C point (right side in this embodiment) are the same direction as the B point (the coordinates of the D point). In this embodiment, the coordinates of the edge detected by the left check) are specified as the coordinates of the point E. Then, the CPU 70 shifts the process to S150. As shown in the explanatory diagram of FIG. 5, the coordinates of the point D are described as (Dx, Dy) and the coordinates of the point E are described as (Ex, Ey).

S150では、CPU70は、A〜E点の位置に基づき、A,B点を通過する直線ABと、B,E点を通過する直線BEと、A,C点を通過する直線ACと、C,D点を通過する直線CDとを算出する。具体的には、直線ABは、y=(By/Bx)×x,直線BEは、y=[(By−Ey)/(Bx−Ex)]×x+By−[(By−Ey)/(Bx−Ex)]×Bx,直線ACは、y=(Cy/Cx)×x,直線CDは、y=[(Cy−Dy)/(Cx−Dx)]×x+Cy−[(Cy−Dy)/(Cx−Dx)]×Cxとして算出される。これらの直線を算出すると、CPU70は、S155に処理を移行する。   In S150, the CPU 70, based on the positions of the points A to E, the straight line AB passing through the points A and B, the straight line BE passing through the points B and E, the straight line AC passing through the points A and C, C, A straight line CD passing through point D is calculated. Specifically, the straight line AB is y = (By / Bx) × x, and the straight line BE is y = [(By−Ey) / (Bx−Ex)] × x + By − [(By−Ey) / (Bx −Ex)] × Bx, straight line AC is y = (Cy / Cx) × x, straight line CD is y = [(Cy−Dy) / (Cx−Dx)] × x + Cy − [(Cy−Dy) / (Cx−Dx)] × Cx. After calculating these straight lines, the CPU 70 shifts the processing to S155.

S155では、CPU70は、直線AB,BE,AC,CDの傾きに基づき、1〜3番目の頂点の角度が直角であるか判定し、これらの頂点が全て直角である場合には(S155:Yes)、原稿が矩形であると判定してS160に処理を移行する。これらの頂点が全て直角でない場合(S155:No)、S180に処理を移行する。尚、例えば、これらの頂点のうちの一つ或いは二つを選択し、選択した頂点の角度が直角である場合には原稿を矩形であると判定しても良い。   In S155, the CPU 70 determines whether the angles of the first to third vertices are right angles based on the slopes of the straight lines AB, BE, AC, and CD, and when these vertices are all right angles (S155: Yes). ), It is determined that the document is rectangular, and the process proceeds to S160. If these vertices are not all right angles (S155: No), the process proceeds to S180. For example, one or two of these vertices may be selected, and if the selected vertex has a right angle, the document may be determined to be rectangular.

S160では、CPU70は、AB間の長さを算出し、S165に処理を移行する。尚、AB間の長さは、|AB|=(Bx^2+By^2)^(1/2)として算出される。ここで、“Bx^2”とはBxの2乗を意味し、本実施形態では、“^”は、累乗を表す演算子として用いられている。   In S160, the CPU 70 calculates the length between AB, and proceeds to S165. The length between AB is calculated as | AB | = (Bx ^ 2 + By ^ 2) ^ (1/2). Here, “Bx ^ 2” means the square of Bx, and in this embodiment, “^” is used as an operator representing a power.

S165では、CPU70は、原稿が矩形である場合の4番目の頂点(F点)の座標(Fx,Fy)を、直線CDと直線BEの交点の座標として算出する。すなわち、直線BEの式y=[(By−Ey)/(Bx−Ex)]×x+By−[(By−Ey)/(Bx−Ex)]×Bxと、直線CDの式y=[(Cy−Dy)/(Cx−Dx)]×x+Cy−[(Cy−Dy)/(Cx−Dx)]×Cxとの連立方程式の解であるx,yがそれぞれFxとFyに相当する。   In S165, the CPU 70 calculates the coordinates (Fx, Fy) of the fourth vertex (F point) when the document is rectangular as the coordinates of the intersection of the straight line CD and the straight line BE. That is, the equation y = [(By−Ey) / (Bx−Ex)] × x + By − [(By−Ey) / (Bx−Ex)] × Bx of the straight line BE and the equation y = [(Cy -Dy) / (Cx-Dx)]. Times.x + Cy-[(Cy-Dy) / (Cx-Dx)]. Times.Cx, x and y correspond to Fx and Fy, respectively.

尚、CPU70は、直線ABと、AB間の長さと、点Cの座標とに基づきF点の座標を算出しても良い。すなわち、原稿が矩形である場合、直線AFと平行な直線がC点およびF点を通ること、直線ABの長さが直線AFの長さと等しくなること、を利用して、F点を求める。このとき、F点の座標(Fx,Fy)は、Fx=Cx±Bx,Fy=Cy±Byとして算出される。ここで、FxおよびFyは2つの解が求められるが、本実施形態のように原稿が右上に傾いている場合と、原稿が左上に傾いている場合のそれぞれについて使用する式を使い分ければよい。また、CPU70は、直線ACと、AC間の長さと、点Bの座標とに基づき、同様にしてF点の座標を算出しても良い。また、直線ABと直線CFの傾きが等しくなることを利用してF点の座標を算出しても良い。F点を算出すると、CPU70は、S170に処理を移行する。   Note that the CPU 70 may calculate the coordinates of the point F based on the straight line AB, the length between the ABs, and the coordinates of the point C. That is, when the document is a rectangle, the F point is obtained by utilizing the fact that a straight line parallel to the straight line AF passes through the C point and the F point and that the length of the straight line AB is equal to the length of the straight line AF. At this time, the coordinates (Fx, Fy) of the point F are calculated as Fx = Cx ± Bx and Fy = Cy ± By. Here, two solutions are required for Fx and Fy, but the equations used for each of the case where the document is tilted to the upper right and the case where the document is tilted to the upper left as in the present embodiment may be properly used. . Further, the CPU 70 may calculate the coordinates of the F point in the same manner based on the straight line AC, the length between the ACs, and the coordinates of the point B. Further, the coordinates of the point F may be calculated using the fact that the slopes of the straight line AB and the straight line CF are equal. After calculating the point F, the CPU 70 proceeds to S170.

S170では、CPU70は、A点及びC点の座標に基づきAC間の長さを算出し、AB間、及びAC間の長さを、1枚目の原稿のサイズとして記憶する。そして、1枚目の原稿のスキャンが終了すると、図3のS205に処理を移行する。   In S170, the CPU 70 calculates the length between ACs based on the coordinates of the points A and C, and stores the lengths between AB and AC as the size of the first original. When the scanning of the first document is completed, the process proceeds to S205 in FIG.

S175では、CPU70は、スキャンの対象となる原稿を斜行していない矩形の原稿とみなし、S185に処理を移行する。また、S180では、CPU70は、スキャンの対象となる原稿を矩形ではない異型の原稿とみなし、S185に処理を移行する。   In S175, the CPU 70 regards the document to be scanned as a rectangular document that is not skewed, and shifts the processing to S185. In S180, the CPU 70 regards the document to be scanned as a non-rectangular original and shifts the process to S185.

S185では、S105の処理と同様、1枚目のスキャン画像に対してエッジの検出を続け、4番目の頂点(F点)の位置を求める。そして、1枚目の原稿のスキャンが終了すると、図3のS205に処理を移行する。   In S185, as in S105, edge detection is continued for the first scanned image, and the position of the fourth vertex (point F) is obtained. When the scanning of the first document is completed, the process proceeds to S205 in FIG.

S205では、CPU70は、読取制御部30により順次生成される2枚目の原稿のスキャン画像データにおける横方向に並ぶ画素列に対し、1枚目の原稿と同様に原稿のエッジ検出を開始する。エッジが検出されると、CPU70は、S210に処理を移行する。   In S <b> 205, the CPU 70 starts edge detection of the document in the same manner as the first document for pixel rows arranged in the horizontal direction in the scan image data of the second document sequentially generated by the reading control unit 30. When the edge is detected, the CPU 70 proceeds to S210.

S210では、CPU70は、右エッジの位置と左エッジの位置が同じであるかどうかを判定する。位置が同じである場合には(S210:Yes)、原稿が傾いているとみなし、CPU70はS215に処理を移行する。また、位置が同じでない場合には(S210:No)、CPU70はS285に処理を移行する。   In S210, the CPU 70 determines whether or not the position of the right edge is the same as the position of the left edge. If the positions are the same (S210: Yes), it is considered that the document is tilted, and the CPU 70 shifts the process to S215. If the positions are not the same (S210: No), the CPU 70 shifts the process to S285.

S215では、CPU70は、検出されたエッジの位置を1番目の頂点(A点)とし、A点の座標を、横方向をX軸方向、縦方向をY軸方向とするXY座標系の原点(0,0)として特定する。そして、S220に処理を移行する。   In S215, the CPU 70 uses the detected edge position as the first vertex (point A), and coordinates of the point A are the origin of the XY coordinate system with the horizontal direction as the X-axis direction and the vertical direction as the Y-axis direction ( 0,0). Then, the process proceeds to S220.

S220では、CPU70は、A点よりも下側における、それぞれの上記画素列における左右エッジ間の距離の特定を開始し、S225に処理を移行する。
S225では、CPU70は、2枚目の原稿のスキャン開始後、1枚目の原稿のスキャンと同様に制限時間内にエッジ間距離が一定となったかどうか判定し、肯定判定がなされた場合には(S225:Yes)S230に、否定判定がなされた場合には(S225:No)S290に処理を移行する。
In S220, the CPU 70 starts identifying the distance between the left and right edges in each of the pixel columns below the point A, and proceeds to S225.
In S225, after starting the scan of the second document, the CPU 70 determines whether the distance between edges has become constant within the time limit as in the scan of the first document, and if an affirmative determination is made. (S225: Yes) If a negative determination is made in S230 (S225: No), the process proceeds to S290.

S230では、CPU70は、エッジ間距離が一定である上記画素列のうち、最も上に位置する画素列を特定する。そして、1枚目の原稿のスキャンの際と同様に、A点を原点とするXY座標系において、この画素列におけるエッジのうち、A点からより離れた場所に存在するエッジの座標を2番目の頂点(B点)の座標として特定し、S235に処理を移行する。   In S <b> 230, the CPU 70 specifies the pixel row located at the top among the pixel rows having a constant edge distance. As in the case of scanning the first document, in the XY coordinate system with point A as the origin, the coordinates of the edge that is located farther from point A among the edges in this pixel row are the second. Is specified as the coordinates of the vertex (point B), and the process proceeds to S235.

S235では、CPU70は、A点とB点との間の長さに基づき4番目の頂点の位置を推定するみなし算出モードがON状態であるか判定する。表示操作部40を介してユーザから受け付けた操作によりみなし算出モードがON状態となっている場合には(S235:Yes)、CPU70はS240に処理を移行する。また、みなし算出モードがOFF状態である場合には(S235:No)、S255に処理を移行する。   In S235, the CPU 70 determines whether or not the assumed calculation mode for estimating the position of the fourth vertex based on the length between the points A and B is ON. When the deemed calculation mode is in the ON state by an operation received from the user via the display operation unit 40 (S235: Yes), the CPU 70 shifts the process to S240. If the deemed calculation mode is in the OFF state (S235: No), the process proceeds to S255.

S240では、CPU70は、AB間の長さを算出し、S245に処理を移行する。尚、AB間の長さは、|AB|=(Bx^2+By^2)^(1/2)として算出される。
S245では、CPU70は、2枚目の原稿についてのAB間の長さが、1枚目の原稿についてのAB間の長さと等しいかどうかを判定する。長さが等しい場合には(S245:Yes)、CPU70は、S250に処理を移行し、長さが等しくない場合には(S245:No)、S255に処理を移行する。
In S240, the CPU 70 calculates the length between AB, and proceeds to S245. The length between AB is calculated as | AB | = (Bx ^ 2 + By ^ 2) ^ (1/2).
In S245, the CPU 70 determines whether or not the length between AB for the second original is equal to the length between AB for the first original. When the lengths are equal (S245: Yes), the CPU 70 shifts the process to S250, and when the lengths are not equal (S245: No), the CPU 70 shifts the process to S255.

S250では、CPU70は、A点及びB点の座標と1枚目の原稿のサイズに基づき、4番目の頂点(F点)の座標を推定する。具体的には、A点及びB点の座標に基づき直線ABを算出し、B点を通過して直線ABに直交する直線を算出する。そして、算出した直線上の点であって、B点の下側に位置し、B点からの長さが、1枚目の原稿におけるAC間の長さと等しくなる点の座標を、F点の座標として算出する。F点の座標を算出した後、2枚目の原稿のスキャンが終了すると、CPU70は、本処理を終了する。   In S250, the CPU 70 estimates the coordinates of the fourth vertex (F point) based on the coordinates of the points A and B and the size of the first document. Specifically, a straight line AB is calculated based on the coordinates of the points A and B, and a straight line that passes through the point B and is orthogonal to the straight line AB is calculated. Then, the coordinates of a point on the calculated straight line that is located below the point B and whose length from the point B is equal to the length between the ACs of the first document are represented by points F Calculate as coordinates. After the calculation of the coordinates of the point F, when the scanning of the second original is completed, the CPU 70 ends the present process.

S255では、CPU70は、2枚目の原稿のスキャン開始後、1枚目の原稿のスキャンと同様に制限時間内にエッジ間距離が減少し始めたかどうか判定し、肯定判定がなされた場合には(S255:Yes)S260に、否定判定がなされた場合には(S255:No)S290に処理を移行する。   In S255, after starting the scan of the second document, the CPU 70 determines whether the distance between the edges has started to decrease within the time limit as in the case of the scan of the first document, and when an affirmative determination is made. (S255: Yes) If a negative determination is made in S260 (S255: No), the process proceeds to S290.

S260では、CPU70は、エッジ間距離が一定である上記画素列のうち、最も下に位置する画素列を特定する。そして、1枚目の原稿のスキャンの際と同様に、A点を原点とするXY座標系において、この画素列におけるエッジのうち、B点についてのチェックとは反対方向のチェックにより検出されたエッジの座標を3番目の頂点(C点)の座標として特定し、S265に処理を移行する。   In S <b> 260, the CPU 70 identifies the lowest pixel column among the pixel columns having a constant edge distance. Similarly to the scanning of the first document, in the XY coordinate system with the point A as the origin, the edge detected by the check in the direction opposite to the check for the point B among the edges in this pixel row Is specified as the coordinate of the third vertex (point C), and the process proceeds to S265.

S265では、CPU70は、C点の下側に位置する上記画素列において検出された左右エッジの位置を特定する。このとき、1枚目の原稿のスキャンの際と同様に、A点を原点とするXY座標系において、C点と同じ方向のチェックにより検出されたエッジの座標をD点の座標として、B点と同じ方向のチェックにより検出されたエッジの座標をE点の座標として特定する。そして、CPU70は、S270に処理を移行する。   In S <b> 265, the CPU 70 specifies the positions of the left and right edges detected in the pixel row located below the point C. At this time, as in the case of scanning the first document, in the XY coordinate system having the point A as the origin, the coordinates of the edge detected by the check in the same direction as the point C are set as the coordinates of the point B. The coordinates of the edge detected by the same direction check are specified as the coordinates of the point E. And CPU70 transfers a process to S270.

S270では、CPU70は、1枚目の原稿のスキャンの際と同様に、A〜E点の位置に基づき、A,B点を通過する直線ABと、B,E点を通過する直線BEと、A,C点を通過する直線ACと、C,D点を通過する直線CDとを算出する。そして、これらの直線を算出すると、CPU70は、S275に処理を移行する。   In S270, the CPU 70, based on the positions of the points A to E, and the straight line AB passing through the points A and B and the straight line BE passing through the points B and E, as in the case of scanning the first original, A straight line AC passing through points A and C and a straight line CD passing through points C and D are calculated. Then, after calculating these straight lines, the CPU 70 shifts the processing to S275.

S275では、CPU70は、直線AB,BE,AC,CDの傾きに基づき、1〜3番目の頂点の角度が直角であるか判定し、これらの頂点が全て直角である場合には(S275:Yes)、原稿が矩形であると判定してS280に処理を移行する。これらの頂点が全て直角でない場合(S275:No)、S290に処理を移行する。   In S275, the CPU 70 determines whether the angles of the first to third vertices are right angles based on the slopes of the straight lines AB, BE, AC, and CD, and when these vertices are all right angles (S275: Yes). ), It is determined that the document is rectangular, and the process proceeds to S280. If these vertices are not all right angles (S275: No), the process proceeds to S290.

S280では、CPU70は、1枚目の原稿のスキャンの際と同様に、原稿が矩形である場合の4番目の頂点(F点)の座標(Fx,Fy)を算出する。そして、2枚目の原稿のスキャンが終了すると、本処理を終了する。   In S280, the CPU 70 calculates the coordinates (Fx, Fy) of the fourth vertex (point F) when the original is rectangular, as in the case of scanning the first original. Then, when the scanning of the second original is finished, this processing is finished.

S285では、CPU70は、スキャンの対象となる原稿を斜行していない矩形の原稿とみなし、S295に処理を移行する。また、S290では、CPU70は、スキャンの対象となる原稿を矩形でない原稿とみなし、S295に処理を移行する。   In S285, the CPU 70 regards the document to be scanned as a rectangular document that is not skewed, and shifts the processing to S295. In S290, the CPU 70 regards the document to be scanned as a non-rectangular document, and proceeds to S295.

S295では、S205の処理と同様、2枚目のスキャン画像に対してエッジの検出を続け、4番目の頂点(F点)の位置を求める。そして、2枚目の原稿のスキャンが終了すると、本処理を終了する。   In S295, as in the case of S205, edge detection is continued for the second scanned image, and the position of the fourth vertex (point F) is obtained. Then, when the scanning of the second original is finished, this processing is finished.

尚、言うまでも無いことではあるが、3枚以上の原稿に対して原稿自動送りによるスキャンを実施する際にも、同様にして、原稿の終端の位置を算出することができる。このとき、みなし算出モードがON状態となっている場合には、必ずしも1枚目の原稿のサイズを基に原稿の終端の位置を算出する必要は無く、例えば、直前に搬送された原稿のサイズを基に原稿の終端の位置を算出しても良い。   Needless to say, the end position of the document can be calculated in the same manner when scanning is performed by automatically feeding three or more documents. At this time, when the deemed calculation mode is ON, it is not always necessary to calculate the position of the end of the document based on the size of the first document. For example, the size of the document conveyed immediately before The end position of the document may be calculated based on the above.

[効果]
本実施形態のスキャナ1によれば、スキャンの対象となる原稿が矩形であり、なおかつ、この原稿が走査方向に対して傾いている場合には、原稿全体のスキャンが終了する前に、原稿の4番目の頂点の位置、すなわち、原稿の終端の位置を算出することができる。したがって、スキャナ1によれば、スキャン画像における原稿の終端の位置をすみやかに予測することができる。
[effect]
According to the scanner 1 of the present embodiment, when the document to be scanned is a rectangle and the document is inclined with respect to the scanning direction, the document is scanned before the entire document is scanned. The position of the fourth vertex, that is, the position of the end of the document can be calculated. Therefore, the scanner 1 can quickly predict the position of the end of the document in the scanned image.

また、スキャナ1では、1〜3番目の頂点の角度に基づき、原稿が矩形であるかどうか判定する。そして、原稿が矩形である場合に限り、4番目の頂点の位置を算出する。このため、原稿が矩形でない場合に4番目の頂点の算出が行われてしまうことを防ぐことができ、原稿の終端の位置を算出する精度を向上させることができる。   The scanner 1 determines whether the document is rectangular based on the angles of the first to third vertices. Only when the document is rectangular, the position of the fourth vertex is calculated. Therefore, it is possible to prevent the fourth vertex from being calculated when the document is not rectangular, and to improve the accuracy of calculating the position of the end of the document.

また、スキャナ1では、1番目に搬送される原稿と2番目に搬送される原稿の、1番目の頂点(A点)の2番目の頂点(B点)の間の長さが等しい場合には、直線ABと1番目の原稿のサイズとに基づき、2番目の原稿における4番目の頂点の算出が行われる。このため、2番目の原稿については、より速やかに原稿の終端の位置を予測できる。   In the scanner 1, when the length between the first vertex (point A) and the second vertex (point B) of the first transported document and the second transported document is equal. Based on the straight line AB and the size of the first document, the fourth vertex of the second document is calculated. Therefore, the position of the end of the original can be predicted more quickly for the second original.

[他の実施形態]
(1)本実施形態におけるスキャナ1は、原稿を搬送しながらスキャンを行うシートフィード型として構成されている。しかし、フラットベット型のスキャナに対して本発明を適用した場合にも、本実施形態と同様、原稿の終端の位置を速やかに予測できる。
[Other Embodiments]
(1) The scanner 1 in the present embodiment is configured as a sheet feed type that performs scanning while conveying a document. However, even when the present invention is applied to a flat-bed scanner, the position of the end of the document can be quickly predicted as in the present embodiment.

(2)本実施形態では、原稿の頂点であるA〜C点等の座標に基づき直線AB,BE,AC,CDを算出しているが、頂点の座標に限らず、原稿の前端或いは側端上のエッジの座標に基づき、直線AB等を算出しても良い。   (2) In this embodiment, the straight lines AB, BE, AC, and CD are calculated based on the coordinates of points A to C that are the vertices of the document. However, the present invention is not limited to the coordinates of the vertices. A straight line AB or the like may be calculated based on the coordinates of the upper edge.

[特許請求の範囲との対応]
上記実施形態の説明で用いた用語と、特許請求の範囲の記載に用いた用語との対応を示す。スキャナ1が画像読取装置に、画像読取部20及び読取制御部30が読取手段に、搬送部10が搬送手段に、表示操作部40が受付手段に相当する。また、後端位置検出処理におけるS105〜S140、及び、S205〜S230,S255,S260が、頂点検出手段に相当する。また、S115,S130,S140、及び、S215,S230,S260が、第一の位置検出手段に相当する。また、S115,S130、及び、S215,S230が、第二の位置検出手段に相当する。また、S165,S250,S280が算出手段に相当し、S165,S280が頂点算出処理に、S250が頂点推定処理に相当する。また、S155,S275が矩形判定手段に、S170が特定手段に、S245が距離判定手段に、S160,S240が距離算出手段に相当する。また、AB間の長さが頂点間距離に相当し、1〜3番目の頂点が、それぞれ、第一〜三頂点に相当する。
[Correspondence with Claims]
The correspondence between the terms used in the description of the above embodiment and the terms used in the description of the claims is shown. The scanner 1 corresponds to an image reading device, the image reading unit 20 and the reading control unit 30 correspond to a reading unit, the conveyance unit 10 corresponds to a conveyance unit, and the display operation unit 40 corresponds to a reception unit. In addition, S105 to S140 and S205 to S230, S255, and S260 in the rear end position detection process correspond to the vertex detection means. S115, S130, S140 and S215, S230, S260 correspond to the first position detecting means. S115, S130, and S215, S230 correspond to the second position detecting means. Further, S165, S250, and S280 correspond to calculation means, S165 and S280 correspond to vertex calculation processing, and S250 corresponds to vertex estimation processing. Further, S155 and S275 correspond to the rectangle determining means, S170 corresponds to the specifying means, S245 corresponds to the distance determining means, and S160 and S240 correspond to the distance calculating means. Moreover, the length between AB corresponds to the distance between vertices, and the first to third vertices correspond to the first to third vertices, respectively.

1…スキャナ、10…搬送部、20…画像読取部、30…読取制御部、40…表示操作部、50…RAM、60…フラッシュメモリ、70…CPU、80…通信部、90…バス。 DESCRIPTION OF SYMBOLS 1 ... Scanner, 10 ... Conveyance part, 20 ... Image reading part, 30 ... Reading control part, 40 ... Display operation part, 50 ... RAM, 60 ... Flash memory, 70 ... CPU, 80 ... Communication part, 90 ... Bus.

Claims (5)

原稿載置部に載置された原稿を搬送経路に沿って搬送させる搬送手段と、
前記搬送経路上における読取ポイントに対応する位置に配置されており、該読取ポイントを通過する前記原稿の画像を順次読み取ることにより、該原稿のスキャンを行い、画像データを生成する読取手段と、
前記読取手段により前記原稿の前記スキャンが開始された後から、前記スキャンが終了するまでの間に、前記読取手段により生成された該原稿の一部についての前記画像データが示す画像において、該原稿の頂点を検出する頂点検出手段と、
前記読取手段により生成された前記画像データが示す画像において、前記原稿の輪郭上の点の位置を検出する第一の位置検出手段と、
前記読取手段により生成された、前記原稿の一部についての前記画像データが示す画像において、前記頂点検出手段により該原稿の3つの頂点が検出されると、該原稿を矩形であるとみなし、該原稿の残りの1つの頂点である4番目の頂点の位置を、前記第一の位置検出手段により検出された該原稿の輪郭上の点の位置に基づき算出する頂点算出処理を実行する算出手段と、
前記画像データに基づき、前記スキャンの対象となった前記原稿のサイズを特定する特定手段と、
前記画像データが示す画像において、前記読取手段により先に読み取られた画像が存在する側を上流側、後に読み取られた画像が存在する側を下流側とし、前記原稿の頂点のうち、最上流側に位置する頂点を第一頂点、最上流から2番目に位置する頂点を第二頂点とし、前記読取手段により生成された、前記原稿の一部についての前記画像データが示す画像において、前記頂点検出手段により該原稿の前記第一頂点と前記第二頂点とが検出されると、該第一頂点の位置と該第二頂点の位置を検出する第二の位置検出手段と、
前記第二の位置検出手段により検出された前記第一頂点の位置と前記第二頂点の位置とに基づき、該第一頂点と該第二頂点との間の距離である頂点間距離を算出する距離算出手段と、
前記距離算出手段により算出された前記原稿についての前記頂点間距離と、該原稿よりも前に搬送された矩形の前記原稿である先の原稿について前記距離算出手段により算出された前記頂点間距離とが一致するかを判定する距離判定手段と、
を備え、
前記算出手段は、前記距離判定手段により、前記読取手段により生成された前記画像データが示す画像における前記原稿についての前記頂点間距離と、前記先の原稿についての前記頂点間距離が一致すると判定された場合には、該画像における前記原稿を矩形とみなし、前記第二の位置検出手段により検出された、該画像における前記第一頂点の位置と、前記第二頂点の位置と、前記特定手段により特定された該先の原稿のサイズとに基づき、前記4番目の頂点の位置を算出する頂点推定処理を、前記頂点算出処理に替えて実行すること、
を特徴とする画像読取装置。
Transport means for transporting the document placed on the document placement section along the transport path;
A reading unit that is arranged at a position corresponding to a reading point on the conveyance path , scans the document by sequentially reading images of the document passing through the reading point, and generates image data;
In the image indicated by the image data for a part of the document generated by the reading unit, after the scanning of the document is started by the reading unit and before the end of the scanning, the document Vertex detection means for detecting the vertex of
First position detection means for detecting the position of a point on the contour of the document in the image indicated by the image data generated by the reading means;
In the image indicated by the image data for a part of the document generated by the reading unit, when the three vertexes of the document are detected by the vertex detection unit, the document is regarded as a rectangle, Calculation means for executing a vertex calculation process for calculating the position of the fourth vertex, which is the remaining one vertex of the document, based on the position of the point on the contour of the document detected by the first position detection means; ,
A specifying means for specifying the size of the document that is the object of scanning based on the image data;
In the image indicated by the image data, the upstream side is the side where the image read first by the reading unit is present, and the downstream side is the side where the image read later is the upstream side. In the image indicated by the image data for the part of the document generated by the reading unit, the vertex detected at the top is the first vertex and the vertex located second from the most upstream is the second vertex. A second position detecting means for detecting the position of the first vertex and the position of the second vertex when the means detects the first vertex and the second vertex of the document;
Based on the position of the first vertex and the position of the second vertex detected by the second position detecting means, a distance between the vertices, which is a distance between the first vertex and the second vertex, is calculated. A distance calculating means;
The inter-vertex distance for the original calculated by the distance calculating means, and the inter-vertex distance calculated by the distance calculating means for the previous original that is the rectangular original conveyed before the original Distance determining means for determining whether or not match,
With
The calculating means determines that the distance between the vertices for the document in the image indicated by the image data generated by the reading means matches the distance between the vertices for the previous document by the distance determining means. The original in the image is regarded as a rectangle, the position of the first vertex in the image, the position of the second vertex detected by the second position detecting means, and the specifying means Executing a vertex estimation process for calculating the position of the fourth vertex based on the specified size of the original document instead of the vertex calculation process;
An image reading apparatus.
請求項1に記載の画像読取装置において、
前記画像データが示す画像において、前記読取手段により先に読み取られた画像が存在する側を上流側、後に読み取られた画像が存在する側を下流側とし、前記原稿の頂点のうち、最上流側に位置する頂点を第一頂点、最上流から2番目,3番目に位置する頂点を第二頂点,第三頂点とし、該画像における前記原稿が矩形である場合の、前記第一頂点と前記第二頂点とを結ぶ辺を前辺、該前辺に対向する辺を後辺、残りの辺を側辺とし、
前記第一の位置検出手段は、前記読取手段により、前記原稿の前記後辺の一部を含む画像についての前記画像データが生成され、前記頂点検出手段により前記3つの頂点が検出されると、該画像における前記第二頂点を含む前記側辺上の予め定められた場所に存在する2点の位置と、前記後辺上の予め定められた場所に存在する2点の位置とを検出し、
前記算出手段は、前記頂点算出処理において、前記第一の位置検出手段により検出された前記第二頂点を含む前記側辺上の2点の位置に基づき直線を算出すると共に、前記後辺上の2点の位置に基づき直線を算出し、これらの直線の交点の位置を、前記4番目の頂点の位置として算出すること、
を特徴とする画像読取装置。
The image reading apparatus according to claim 1,
In the image indicated by the image data, the upstream side is the side where the image read first by the reading unit is present, and the downstream side is the side where the image read later is the upstream side. The first vertex and the second and third vertices from the most upstream are the second and third vertices, and the document in the image is rectangular, the first vertex and the first vertex The side connecting the two vertices is the front side, the side facing the front side is the rear side, and the remaining side is the side side,
The first position detection unit generates the image data for an image including a part of the rear side of the document by the reading unit, and the vertex detection unit detects the three vertices. Detecting the position of two points existing at a predetermined location on the side side including the second vertex in the image and the position of two points existing at a predetermined location on the rear side;
In the vertex calculation process, the calculation unit calculates a straight line based on the positions of two points on the side including the second vertex detected by the first position detection unit, and on the rear side. Calculating a straight line based on the position of the two points, and calculating the position of the intersection of these straight lines as the position of the fourth vertex;
An image reading apparatus.
請求項1に記載の画像読取装置において、
前記画像データが示す画像において、前記読取手段により先に読み取られた画像が存在する側を上流側、後に読み取られた画像が存在する側を下流側とし、前記原稿の頂点のうち、最上流側に位置する頂点を第一頂点、最上流から2番目,3番目に位置する頂点を第二頂点,第三頂点とし、
前記第一の位置検出手段は、前記画像データが示す画像において、前記頂点検出手段により検出された前記3つの頂点の位置を検出し、
前記算出手段は、前記頂点算出処理において、前記第一の位置検出手段により特定された前記3つの頂点の位置に基づき、前記第一頂点と、前記第二頂点と前記第三頂点とのうちの一方とを通過する直線の方向と、前記第一頂点と該一方の頂点との間の距離と、前記第二頂点と前記第三頂点とのうちの他方の位置とを算出し、算出した該方向と、該距離と、該位置とに基づき、前記4番目の頂点の位置を算出すること、
を特徴とする画像読取装置。
The image reading apparatus according to claim 1,
In the image indicated by the image data, the upstream side is the side where the image read first by the reading unit is present, and the downstream side is the side where the image read later is the upstream side. The vertex located at is the first vertex, the vertex located second and third from the most upstream is the second vertex, the third vertex,
The first position detecting means detects the positions of the three vertices detected by the vertex detecting means in the image indicated by the image data;
In the vertex calculation process, the calculating means is based on the positions of the three vertices specified by the first position detecting means, and is selected from the first vertex, the second vertex, and the third vertex. Calculating the direction of a straight line passing through one side, the distance between the first vertex and the one vertex, and the other position of the second vertex and the third vertex, Calculating the position of the fourth vertex based on the direction, the distance, and the position;
An image reading apparatus.
請求項1から請求項3のいずれかに記載の画像読取装置において、
前記頂点検出手段により前記画像データが示す画像において前記原稿の頂点が検出されると、該頂点の角度に基づき、該原稿を矩形であるとみなすことができるかどうかを判定する矩形判定手段をさらに備え、
前記算出手段は、前記矩形判定手段により肯定判定がなされた場合に、前記頂点算出処理を実行すること、
を特徴とする画像読取装置。
The image reading apparatus according to any one of claims 1 to 3,
When a vertex of the document is detected in the image indicated by the image data by the vertex detection unit, a rectangle determination unit that determines whether the document can be regarded as a rectangle based on an angle of the vertex Prepared,
The calculation means executes the vertex calculation processing when an affirmative determination is made by the rectangle determination means;
An image reading apparatus.
請求項1から請求項4のうちのいずれか1項に記載の画像読取装置において、
前記頂点算出処理に替えて、前記頂点推定処理を実行する旨の指示をユーザから受け付ける受付手段をさらに備え、
前記算出手段は、前記受付手段を介してユーザから前記指示を受け付けた場合には、前記頂点算出処理に替えて、前記頂点推定処理を実行すること、
を特徴とする画像読取装置。
The image reading apparatus according to any one of claims 1 to 4 ,
In addition to the vertex calculation process, the apparatus further comprises a receiving unit that receives an instruction to execute the vertex estimation process from a user,
When the calculation unit receives the instruction from the user via the reception unit, the calculation unit executes the vertex estimation process instead of the vertex calculation process;
An image reading apparatus.
JP2009174377A 2009-07-27 2009-07-27 Image reading device Active JP4973701B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009174377A JP4973701B2 (en) 2009-07-27 2009-07-27 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009174377A JP4973701B2 (en) 2009-07-27 2009-07-27 Image reading device

Publications (2)

Publication Number Publication Date
JP2011029997A JP2011029997A (en) 2011-02-10
JP4973701B2 true JP4973701B2 (en) 2012-07-11

Family

ID=43638188

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009174377A Active JP4973701B2 (en) 2009-07-27 2009-07-27 Image reading device

Country Status (1)

Country Link
JP (1) JP4973701B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09238251A (en) * 1995-12-26 1997-09-09 Canon Inc Image processing unit and its method
JP2002010059A (en) * 2000-06-20 2002-01-11 Sharp Corp Image processing device
JP3670571B2 (en) * 2000-10-31 2005-07-13 株式会社Pfu Image reading device
JP2005210493A (en) * 2004-01-23 2005-08-04 Konica Minolta Business Technologies Inc Draft reader, draft reading method, and image forming apparatus
JP4574503B2 (en) * 2005-09-09 2010-11-04 キヤノン株式会社 Image processing apparatus, image processing method, and program

Also Published As

Publication number Publication date
JP2011029997A (en) 2011-02-10

Similar Documents

Publication Publication Date Title
JP4853555B2 (en) Image reading device
KR101657162B1 (en) Image forming apparatus and method for deskewing thereof
JP4856672B2 (en) Image processing apparatus, image processing method, and image processing program
US20150256696A1 (en) Image-reading apparatus, image-reading method, program, and recording medium
US9581951B2 (en) Image forming apparatus
JP6885111B2 (en) Image processing equipment and image forming equipment
JP2002142084A (en) Image reader
JP6459384B2 (en) Image reading apparatus, program, and read image correction method
CN110115020B (en) Image reading apparatus
US9654661B1 (en) Image scanning device and method, image reading apparatus, and non-transitory computer readable medium that set a scanning area based on a detected location of a code image
JP4973701B2 (en) Image reading device
US11399108B2 (en) Image reading apparatus capable of determining whether missing part of document image occurs based on edge shape of at least one of leading and trailing edges of document image
JP2009284190A (en) Image reading apparatus and image reading system
US10530939B2 (en) Correcting captured images using a reference image
JP7199511B2 (en) Information processing device, method and program
JP2017201755A (en) Reading device
JP2018146454A (en) Inspection device and inspection program
JP5006250B2 (en) Image correction apparatus, image correction method, image correction program, and recording medium
JP2021184518A (en) Image reading device
JP2021184516A (en) Image reading device
JP2021184515A (en) Image reading device
JP2021184514A (en) Image reading device
CN102377895B (en) Image cropping method
JP2021184517A (en) Image reading device
JP4361457B2 (en) Image forming apparatus and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110928

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111004

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111122

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120313

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120326

R150 Certificate of patent or registration of utility model

Ref document number: 4973701

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150420

Year of fee payment: 3