JP2009164807A - Image reader - Google Patents

Image reader Download PDF

Info

Publication number
JP2009164807A
JP2009164807A JP2007340771A JP2007340771A JP2009164807A JP 2009164807 A JP2009164807 A JP 2009164807A JP 2007340771 A JP2007340771 A JP 2007340771A JP 2007340771 A JP2007340771 A JP 2007340771A JP 2009164807 A JP2009164807 A JP 2009164807A
Authority
JP
Japan
Prior art keywords
document
edge
reading
original
image
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.)
Granted
Application number
JP2007340771A
Other languages
Japanese (ja)
Other versions
JP5205963B2 (en
Inventor
Tetsuya Kato
哲也 加藤
Noriko Sugimoto
典子 杉本
Hiroaki Fujii
博章 藤井
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 JP2007340771A priority Critical patent/JP5205963B2/en
Priority to US12/341,963 priority patent/US8284463B2/en
Priority to US12/343,110 priority patent/US8174737B2/en
Publication of JP2009164807A publication Critical patent/JP2009164807A/en
Application granted granted Critical
Publication of JP5205963B2 publication Critical patent/JP5205963B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently and accurately estimate the size, inclination, installation region, and the like of an original in an image reader for reading the original on an original platen by conveying a read unit. <P>SOLUTION: A composite machine, namely the image reader, executes prescan operation to the tip of a readable region to generate image data, and allows the data to pass through an image filter to generate edge image data. Also, the edge image data are used to execute original estimation processing. In the original estimation processing, a group of edge points indicating the right end of the original, a group of edge points indicating the left end of the original, and a group of edge points indicating the lower end of the original are extracted (S420, S450, S460), approximate straight lines of respective groups of edge points are obtained (S437, S455, SS465), and the lower-left and lower-right corner positions of the original are estimated from the intersection point of the approximate straight lines (S480). The size of the original is estimated by estimating that a distance between lower-left and lower-right corners is the short-side length of the original and length √2 times longer than that of a short side is the long-side length of the original (S490), and the placement region of the original is estimated from these pieces of information (S497). <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、読取ユニットに、原稿台に載置された原稿を読み取らせることにより、原稿台に載置された原稿の読取画像を表す画像データを生成する画像読取装置に関する。   The present invention relates to an image reading apparatus that generates image data representing a read image of a document placed on a document table by causing a reading unit to read the document placed on the document table.

従来、画像読取装置としては、読取ガラス下に読取ユニットを備え、読取ガラス下で読取ユニットを搬送しつつ、その搬送時に読取ユニットに読取動作を実行させることにより、読取ガラス上に配置された原稿を読み取り、原稿の読取画像を表す画像データを生成する画像読取装置が知られている。   2. Description of the Related Art Conventionally, an image reading apparatus includes a reading unit below a reading glass, and conveys the reading unit under the reading glass, and causes the reading unit to perform a reading operation when the reading unit is transported, whereby the document placed on the reading glass. An image reading apparatus that generates image data representing a read image of a document is known.

画像読取装置がコピー機能を有するものである場合、上記生成された画像データは、例えば、印刷処理に供される。即ち、読取画像を表す画像データが印刷処理に供されることで、記録紙には、読み取られた原稿のコピー画像が印刷される。このような、コピー機能を有する画像読取装置としては、コピー機能の他、プリンタ機能やファックス機能などを有したディジタル複合機が知られている。   When the image reading apparatus has a copy function, the generated image data is used for, for example, a printing process. That is, the image data representing the read image is subjected to a printing process, whereby a copy image of the read original is printed on the recording paper. As such an image reading apparatus having a copy function, a digital multifunction peripheral having a printer function, a fax function, and the like in addition to a copy function is known.

また、画像読取装置としては、プレスキャンにより、読取ガラス上における原稿が載置された領域を把握し、本スキャン時には、読取領域を、読取ガラス下全域ではなく、原稿が載置された領域に限定し、この読取領域において、読取ユニットを搬送し、原稿を読み取るものが知られている。   In addition, the image reading device grasps the area where the document is placed on the reading glass by pre-scanning, and at the time of the main scanning, the reading area is not the entire area under the reading glass but the area where the document is placed. In this reading area, a reading unit that conveys a reading unit and reads a document is known.

この他、画像読取装置としては、読取ユニットによる原稿の読取結果に基づき、原稿のサイズや傾きを検出するものが知られている(特許文献1,2参照)。また、この画像読取装置としては、原稿サイズや傾きの検出結果を、本スキャン時の読取領域の自動設定動作や、コピー時の変倍率の自動設定動作・傾き補正動作に用いるものが知られている。   In addition, an image reading apparatus that detects the size and inclination of a document based on a document reading result by a reading unit is known (see Patent Documents 1 and 2). Also, as this image reading apparatus, an apparatus that uses the detection result of the document size or inclination for the automatic setting operation of the reading area at the time of the main scan, the automatic setting operation of the scaling factor at the time of copying, or the inclination correction operation is known. Yes.

例えば、検出した原稿サイズと記録紙サイズとから、原稿サイズと記録紙サイズの比に合わせて、変倍率を設定すると共に、原稿の傾きから回転量を設定して、読取結果としての画像データを回転処理して傾き補正すると共に、設定した変倍率に合わせて拡大縮小し、読み取った原稿の画像を、記録紙に、その記録紙サイズに合わせた倍率で印刷するといった具合である。
特開平11−252351号公報 特開2007−082047号公報
For example, based on the detected document size and recording paper size, the magnification ratio is set according to the ratio of the document size to the recording paper size, and the rotation amount is set based on the inclination of the document. For example, the rotation processing is performed to correct the inclination, the image is enlarged / reduced in accordance with the set variable magnification, and the read original image is printed on the recording paper at a magnification corresponding to the recording paper size.
Japanese Patent Laid-Open No. 11-252351 JP 2007-082047 A

しかしながら、従来の画像読取装置では、次のような問題があった。例えば、原稿全体を読み取り、その全体像から原稿のサイズ・傾き・載置領域等を求める手法では、読取動作前に、どのようなサイズの原稿がどういった状態で載置されているか不明であるため、読取ガラス下の読取可能領域全体に渡って読取ユニットを搬送し、読取動作を実行しなければならず、原稿の読取動作に時間がかかるといった問題があった。即ち、原稿の存在しない領域に対して無駄に読取動作を実行しなければならないといった問題があった。   However, the conventional image reading apparatus has the following problems. For example, in the method of reading the entire document and obtaining the size, inclination, placement area, etc. of the document from the entire image, it is unclear what size document is placed in what state before the scanning operation. For this reason, there has been a problem in that it takes time for the document reading operation because the reading unit must be transported over the entire readable area under the reading glass and the reading operation must be executed. That is, there has been a problem that a reading operation has to be performed unnecessarily for an area where no document exists.

また、特許文献2には、原稿の一部領域の読取結果に基づき、原稿サイズを推定する手法が開示されているが、この手法は、読取対象の原稿を搬送して、原稿通過前後の読取データの変化から原稿範囲及び原稿範囲外を決定し、原稿サイズを推定するものであり、原稿を搬送することを前提とした技術であるため、この技術を、原稿を読取ガラス上に静止させた状態で読取ユニットを搬送して読み取る画像読取装置に転用しても、上記の問題を解決することは、できなかった。   Patent Document 2 discloses a technique for estimating a document size based on a reading result of a partial area of a document. This method, however, conveys a document to be scanned and reads the document before and after passing through the document. The document size is determined by determining the document range and the document range from the data change, and is based on the assumption that the document is transported. Even if the reading unit is conveyed to be read and used as an image reading apparatus, the above problem cannot be solved.

即ち、この技術を、原稿を読取ガラス上に静止させた状態で読取ユニットを搬送して読み取る画像読取装置に転用する場合には、読取ガラス上に原稿が載置されていない状態の画像を読み取る必要があり、原稿の存在しない領域に対して無駄に読取動作を実行しなければならないといった問題があった。   That is, when this technique is applied to an image reading apparatus that transports and reads a reading unit while the original is stationary on the reading glass, an image in which no original is placed on the reading glass is read. There is a problem that it is necessary to perform a reading operation unnecessarily on an area where a document does not exist.

本発明は、こうした問題に鑑みなされたものであり、原稿台に載置された原稿を、読取ユニットを搬送して読み取る画像読取装置において、効率的且つ正確に、原稿のサイズ・傾き・載置領域等を推定可能な技術を提供することを目的とする。   The present invention has been made in view of these problems, and in an image reading apparatus that reads a document placed on a document table by conveying a reading unit, the size, inclination, and placement of the document are efficiently and accurately detected. An object is to provide a technique capable of estimating a region or the like.

かかる目的を達成するためになされた請求項1記載の発明は、読取対象の原稿が載置される原稿台と、原稿台に沿って搬送される読取ユニットと、を備え、読取ユニットに、原稿台に載置された原稿を読み取らせることにより、原稿台に載置された原稿の読取画像を表す画像データを生成する画像読取装置であって、読取ユニットが読取可能な原稿台の領域である読取可能領域の内、一部領域において読取ユニットを搬送し、当該一部領域において読取ユニットに読取動作を実行させる一部プレスキャン手段と、一部プレスキャン手段の動作により得られた読取ユニットの読取結果としての画像データを、エッジ画像を表すエッジ画像データに変換し、このエッジ画像データに基づき、原稿台に載置された原稿が四角形であるとの仮定の下で、当該原稿が有する四つ角の内、二つの各角に対応する原稿台上の位置座標を推定する角推定手段と、角推定手段の推定結果に基づき、原稿台に載置された原稿の状態を推定する原稿推定手段と、を備えるものである。   In order to achieve this object, the invention according to claim 1 comprises a document table on which a document to be read is placed and a reading unit conveyed along the document table. An image reading apparatus that generates image data representing a read image of a document placed on the document table by reading the document placed on the table, and is an area of the document table that can be read by the reading unit. Among the readable areas, a partial pre-scan unit that conveys the reading unit in a partial area and causes the reading unit to perform a reading operation in the partial area, and a reading unit obtained by the operation of the partial pre-scan unit The image data as the read result is converted into edge image data representing an edge image, and based on the edge image data, the assumption is that the document placed on the document table is square. Estimates the state of the document placed on the document table based on the angle estimation means for estimating the position coordinates on the document table corresponding to each of the two corners of the document, and the estimation result of the angle estimation means Document estimation means.

本発明の画像読取装置によれば、従来のように読取可能領域全体をプレスキャンして、その読取結果である画像データに基づき、原稿の状態(原稿サイズ・原稿の傾き・原稿の載置領域等)を推定するのではなく、読取可能領域の一部をプレスキャンして、その読取結果に基づき、原稿の状態を推定する。従って、この発明によれば、読取可能領域全体をプレスキャンする手法よりも高速にプレスキャン動作を終了することができて、効率的に原稿の状態を推定することができる。   According to the image reading apparatus of the present invention, the entire readable area is pre-scanned as in the prior art, and based on the image data as a result of the reading, the state of the original (original size, original inclination, original placement area) Etc.), a part of the readable area is pre-scanned, and the state of the document is estimated based on the reading result. Therefore, according to the present invention, the prescan operation can be completed at a higher speed than the method of prescanning the entire readable area, and the state of the document can be estimated efficiently.

但し、読取可能領域の全体をプレスキャンせずに、読取可能領域の一部のみをプレスキャンする場合には、原稿の全体像をプレスキャンにより読み取ることができない。このため、本発明では、原稿台に載置されている原稿が四角形状の原稿であると仮定して、原稿台に載置された原稿の二角の各位置座標を推定し、この推定結果に基づいて、原稿の状態を推定するようにしている。   However, when only a part of the readable area is pre-scanned without pre-scanning the entire readable area, the entire image of the document cannot be read by pre-scanning. For this reason, in the present invention, assuming that the document placed on the platen is a quadrilateral document, the respective position coordinates of the two corners of the document placed on the platen are estimated, and this estimation result Based on the above, the state of the document is estimated.

読取対象の原稿は、多くの場合、四角形状で縦横比が一定の定型用紙であり、定型用紙外の原稿が読取対象となるケースは、少ない。更に、読取対象の原稿が、定型用紙外の原稿である場合でも、読取対象の原稿が、定型用紙の形状と大きく相違する場合も、まれである。   In many cases, a document to be read is a standard paper having a rectangular shape and a constant aspect ratio, and there are few cases where a document outside the standard paper is to be read. Further, even when the document to be read is a document outside the standard paper, it is rare that the document to be read is greatly different from the shape of the standard paper.

一方、読取対象の原稿については、原稿台に載せる過程で角が折れてしまう場合などがあるが、本発明のように読取対象の全体像を読み取ることができない状態で、読取対象の原稿が四角形状ではない場合も考慮して、原稿の状態を推定しようとすると、折れた角に惑わされて正確な原稿の大きさや傾き等を推定することができなくなる。   On the other hand, for a document to be read, corners may be broken during the process of placing on the document table. However, when the entire image to be read cannot be read as in the present invention, the document to be read is square. If an attempt is made to estimate the state of a document in consideration of a case where the shape is not a shape, it will be confused by broken corners, and it will not be possible to estimate the exact size or inclination of the document.

そこで、本発明では、原稿台に載置されている原稿が四角形状の原稿であると仮定して、角位置を推定し、この推定結果に基づき、原稿の状態を推定するようにしている。このように、原稿台に載置されている原稿が四角形状の原稿であるとの仮定の下で、原稿の角位置を推定するようにすれば、原稿台に載置されている原稿が実際に四角形状のものである限り、その角が折れている場合でも、推定した角位置の情報から、原稿の傾きや原稿の一辺の長さを導出することができ、原稿台におけるプレスキャン領域外の領域に載置された部分を含む原稿の全体像を正確に推定することができる。   Therefore, in the present invention, assuming that the document placed on the document table is a rectangular document, the angular position is estimated, and the state of the document is estimated based on the estimation result. In this way, if the angular position of the document is estimated under the assumption that the document placed on the platen is a rectangular document, the document placed on the platen is actually Can be derived from the estimated corner position information, even if the corner is broken, the document tilt and the length of one side of the document can be derived from the prescan area on the document table. It is possible to accurately estimate the entire image of the document including the portion placed in the area.

従って、この発明によれば、原稿台に載置された原稿を、読取ユニットを搬送して読み取る画像読取装置において、効率的且つ正確に、原稿の状態(原稿のサイズ・傾き・載置領域等)を推定することができる。   Therefore, according to the present invention, in an image reading apparatus that reads a document placed on a document table by conveying a reading unit, the state of the document (size, inclination, placement region, etc. of the document) can be efficiently and accurately. ) Can be estimated.

尚、具体的に、原稿推定手段は、角推定手段により推定された二つの角の各位置座標間の長さから原稿台に載置された原稿の一辺の長さを推定すると共に、原稿台に載置された原稿が定型用紙であるとの仮定の下で、推定した辺の長さから、この辺に直交する原稿の辺の長さを推定することにより、原稿台に載置された原稿の状態として、原稿台に載置された原稿のサイズを推定する構成にすることができる(請求項2)。   Specifically, the document estimation means estimates the length of one side of the document placed on the document table from the length between the position coordinates of the two corners estimated by the angle estimation means, and the document table The document placed on the platen is estimated by estimating the length of the side of the document perpendicular to this side from the estimated side length under the assumption that the document placed on the standard paper. In this state, the size of the document placed on the document table can be estimated (claim 2).

このように原稿推定手段を構成すれば、原稿台に載置されている原稿が定型用紙である限り、一部領域のプレスキャンで正確に、原稿の角位置及び原稿サイズを推定することができ、これらの情報から、原稿の傾きや原稿の載置領域についても、正確に導出することができる。   If the document estimation unit is configured in this way, as long as the document placed on the document table is a standard sheet, the corner position and document size of the document can be accurately estimated by pre-scanning of a partial area. From these pieces of information, the tilt of the document and the document placement area can be accurately derived.

勿論、この発明では、原稿台に載置されている原稿が定型用紙外である場合、その原稿の状態の推定動作について、確度が低くなるが、一般的に読取対象の原稿は、定型用紙であるため、誤推定による影響は少ない。従って、この発明によれば、従来よりも、効率的且つ正確に、原稿の状態(原稿のサイズ・傾き・載置領域等)を推定することができる。   Of course, in the present invention, when the document placed on the document table is out of the standard paper, the accuracy of the operation for estimating the state of the original document is lowered, but generally, the original to be read is a standard paper. As a result, there is little impact from erroneous estimation. Therefore, according to the present invention, it is possible to estimate the document state (document size, inclination, placement area, etc.) more efficiently and accurately than in the past.

また、角推定手段は、エッジ画像データが示すエッジ点群の中から、原稿台に載置された原稿の三辺に対応するエッジ点群を抽出し、当該抽出した各辺に対応するエッジ点群を直線近似して得られる三本の直線が交わる二つの交点の各位置座標を、原稿台に載置された原稿の角に対応する位置座標であると推定する構成にすることができる(請求項3)。   Further, the angle estimation means extracts edge point groups corresponding to three sides of the document placed on the document table from the edge point groups indicated by the edge image data, and edge points corresponding to the extracted sides. Each position coordinate of two intersection points where three straight lines obtained by linearly approximating the group intersect can be estimated to be a position coordinate corresponding to the corner of the document placed on the document table ( Claim 3).

このように角推定手段を構成すれば、原稿台に載置されている原稿の角が折れている場合等にも、原稿の角が折れていない場合と同様に、原稿の角位置を正確に推定することができ、その結果として、正確に、原稿のサイズや傾き等を推定することができる。   If the corner estimation means is configured in this way, the corner position of the document can be accurately determined even when the corner of the document placed on the document table is folded, as in the case where the corner of the document is not folded. As a result, the size and inclination of the document can be estimated accurately.

また、原稿台の読取可能領域の内、一部領域について読取動作を実行して得られる画像データに基づき、原稿の状態を正確に推定するためには、その一部領域において原稿の像が多く写っているのが好ましい。   Further, in order to accurately estimate the state of the document based on the image data obtained by executing the reading operation on a part of the readable area of the document table, there are many images of the document in the part area. It is preferable that it is reflected.

従って、上述の画像読取装置においては、原稿台を原稿の形状に合わせて四角形状とし、原稿台の四つ角の内、一つの特定の角を、原稿の角を合わせるべき位置として定め、この特定の角を基準にして上記一部領域を定めるのが好ましい。   Therefore, in the above-described image reading apparatus, the document table is formed into a quadrangular shape in accordance with the shape of the document, and one specific corner among the four corners of the document table is determined as a position where the corner of the document is to be aligned. It is preferable that the partial area is determined based on the corner.

即ち、一部プレスキャン手段は、原稿台における上記特定の角から延びる原稿台の端縁(原稿台の第一辺)から、原稿台内側に所定距離離れた位置までの領域であって読取可能領域に該当する部位を、上記一部領域として、当該領域において、読取ユニットを搬送し読取ユニットに読取動作を実行させる構成にされるとよい(請求項4)。   That is, a part of the pre-scan means can read a region from the edge of the document table (first side of the document table) extending from the specific corner on the document table to a position a predetermined distance away from the inside of the document table. The part corresponding to the area may be set as the partial area, and the reading unit may be transported in the area and the reading unit may perform a reading operation.

また、角推定手段は、エッジ画像データが示すエッジ点群の中から、原稿台に載置された原稿の三辺に対応するエッジ点群として、原稿台の上記第一辺に沿って配置されるべき原稿の第一辺に対応するエッジ点群、及び、原稿台における上記特定の角から延びる辺であって上記第一辺とは垂直な第二辺に沿って配置されるべき原稿の第二辺に対応するエッジ点群、及び、原稿の上記第二辺に平行な原稿の第三辺に対応するエッジ点群を抽出する構成にすることができる(請求項5)。   The angle estimation means is arranged along the first side of the document table as an edge point group corresponding to three sides of the document placed on the document table from among the edge point groups indicated by the edge image data. A group of edge points corresponding to the first side of the document to be scanned, and a side of the document to be arranged along the second side that extends from the specific corner on the document table and is perpendicular to the first side. An edge point group corresponding to two sides and an edge point group corresponding to the third side of the document parallel to the second side of the document can be extracted.

このように構成された画像読取装置においては、原稿の二角が写るように上記一部領域を定めて、プレスキャン動作を実現することができるので、角推定手段にて正確に角を推定することができ、結果として、正確に、原稿の状態を推定することができる。   In the image reading apparatus configured as described above, the pre-scan operation can be realized by defining the partial area so that two corners of the document can be captured, so that the angle is accurately estimated by the angle estimation means. As a result, the state of the original can be accurately estimated.

また、原稿推定手段は、原稿の状態として、原稿台に載置された原稿の当該原稿台における載置領域を推定する構成にすることができ、画像読取装置は、この原稿推定手段の推定結果を用いて、次のように動作する構成にすることができる。   Further, the document estimation means can be configured to estimate the placement area of the document placed on the document table as the document state, and the image reading apparatus can estimate the result of the document estimation means. Can be configured to operate as follows.

即ち、画像読取装置は、原稿推定手段により推定された原稿の載置領域に対応する原稿台上の領域を、読取ユニットによる読取領域に決定し、決定した読取領域において、読取ユニットを搬送し、当該読取領域において読取ユニットに読取動作を実行させることにより、原稿台に載置された原稿の読取画像を表す画像データを生成する構成にすることができる(請求項6)。   That is, the image reading apparatus determines an area on the document table corresponding to the document placement area estimated by the document estimation unit as a reading area by the reading unit, and conveys the reading unit in the determined reading area. By causing the reading unit to perform a reading operation in the reading area, image data representing a read image of the document placed on the document table can be generated.

このように構成された画像読取装置によれば、効率的なプレスキャン動作により、迅速に本スキャンに移行することができると共に、本スキャン時には、原稿の載置領域に対応する読取領域のみについて読取動作を実行するため、迅速に原稿台に載置された原稿に対応する画像データを生成することができる。即ち、本発明によれば、高速に、原稿台に載置された原稿の読取結果を表す画像データを生成することができる。   According to the image reading apparatus configured as described above, it is possible to quickly shift to the main scan by an efficient pre-scan operation, and at the time of the main scan, only the reading area corresponding to the document placement area is read. Since the operation is executed, it is possible to quickly generate image data corresponding to the document placed on the document table. That is, according to the present invention, it is possible to generate image data representing the reading result of the document placed on the document table at high speed.

また、原稿推定手段は、原稿の状態として、角推定手段の推定結果に基づき、原稿台に載置された原稿のサイズを推定すると共に、原稿の各辺に対応するエッジ点群を直線近似して得られる三本の直線の少なくとも一つの傾きに基づき、原稿台に載置された原稿の原稿台に対する傾きを推定する構成にすることができる。この他、当該画像読取装置は、原稿推定手段により推定された傾きの情報に基づき、読取ユニットの読取結果である画像データを傾き補正して、原稿台に載置された原稿の読取画像を表す画像データを生成する構成にすることができる(請求項7)。   Further, the document estimation means estimates the size of the document placed on the document table based on the estimation result of the angle estimation means as the document state, and linearly approximates the edge point group corresponding to each side of the document. Based on at least one inclination of the three straight lines obtained in this way, the inclination of the original placed on the original table with respect to the original table can be estimated. In addition, the image reading apparatus represents the read image of the original placed on the original table by correcting the inclination of the image data as the reading result of the reading unit based on the inclination information estimated by the original estimation means. The image data can be generated (claim 7).

このように構成された画像読取装置によれば、効率的なプレスキャン動作により、迅速に本スキャンに移行することができると共に、原稿が傾いて配置されている場合においても、本スキャン時には、読み取った画像データを傾き補正して、まっすぐで綺麗な画像データを生成することができる。   According to the image reading apparatus configured as described above, it is possible to quickly shift to the main scan by an efficient pre-scan operation, and even when the document is arranged at an inclination, the image is read during the main scan. It is possible to correct the tilt of the image data and generate straight and beautiful image data.

この他、原稿推定手段は、原稿の状態として、角推定手段により推定された二つの角の各位置座標から、原稿の傾きを推定する構成にされてもよい(請求項8)。
また、読取可能領域の一部領域のみをプレスキャンして原稿の状態を推定する手法では、読取可能領域の全体をプレスキャンして原稿の状態を推定する手法よりも、その推定動作の正確性が劣るため、上述の画像読取装置は、必要に応じて、読取可能領域全体をプレスキャンして原稿の状態を推定できる構成にされると一層好ましい。
In addition, the document estimation means may be configured to estimate the inclination of the document from the position coordinates of the two corners estimated by the angle estimation means as the state of the document (claim 8).
In addition, the method of estimating the original state by pre-scanning only a part of the readable area is more accurate than the method of pre-scanning the entire readable area and estimating the original state. Therefore, it is more preferable that the above-described image reading apparatus is configured to be able to estimate the state of the document by pre-scanning the entire readable area as necessary.

即ち、上述の画像読取装置は、原稿台の読取可能領域全体において読取ユニットを搬送し、原稿台の読取可能領域全体において読取ユニットに読取動作を実行させる全体プレスキャン手段と、全体プレスキャン手段の動作により得られた読取ユニットの読取結果に基づき、原稿台に載置された原稿の状態を推定する副原稿推定手段と、
外部からの指令に従って、一部プレスキャン手段及び全体プレスキャン手段のいずれか一方を作動させる切替手段と、を備える構成にされると一層好ましい(請求項9)。
That is, the above-described image reading apparatus includes an entire prescan unit that conveys the reading unit in the entire readable area of the document table, and causes the reading unit to perform a reading operation in the entire readable area of the document table. Sub-document estimation means for estimating the state of the document placed on the document table based on the reading result of the reading unit obtained by the operation;
It is more preferable that the apparatus includes a switching unit that operates either one of the partial prescan unit and the entire prescan unit in accordance with a command from the outside.

このように構成された画像読取装置によれば、必要に応じて読取可能領域全体をプレスキャンして、原稿の状態を推定することができるので、ユーザの要求に応じて適切なモードで動作し、原稿の読取画像を表す画像データを生成することができる。   According to the image reading apparatus configured as described above, the entire readable area can be pre-scanned as necessary to estimate the state of the document, and thus operates in an appropriate mode according to the user's request. Image data representing the read image of the document can be generated.

以下に本発明の実施例について、図面と共に説明する。
図1(a)は、本実施例のディジタル複合機1の構成を表すブロック図である。図1(a)に示すように、本実施例のディジタル複合機1は、画像読取部10、読取制御部20、印刷部30、印刷制御部40、表示操作部50、通信部60、CPU70、RAM80及びフラッシュメモリ90を備え、フラッシュメモリ90に記録されたプログラムに基づきCPU70にて各種処理を実行し、装置全体を統括制御する構成にされている。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1A is a block diagram illustrating the configuration of the digital multifunction peripheral 1 according to the present embodiment. As shown in FIG. 1A, the digital multifunction peripheral 1 of this embodiment includes an image reading unit 10, a reading control unit 20, a printing unit 30, a printing control unit 40, a display operation unit 50, a communication unit 60, a CPU 70, A RAM 80 and a flash memory 90 are provided, and various processes are executed by the CPU 70 based on a program recorded in the flash memory 90 to control the entire apparatus.

具体的に、画像読取部10は、図1(b)(c)に示す構成にされている。図1(b)(c)は、画像読取部10の構成を示した説明図である。画像読取部10は、読取対象の原稿Pが載置される透明な板状の読取ガラス11が筐体13に支持された構成にされており、筐体13内の読取ガラス11下に、読取ガラス11に写る画像を主走査方向において光学的に読み取る読取ユニット15と、読取ユニット15を副走査方向に搬送する搬送機構16と、搬送機構16を駆動するモータ17とを備える。   Specifically, the image reading unit 10 is configured as shown in FIGS. FIGS. 1B and 1C are explanatory diagrams showing the configuration of the image reading unit 10. The image reading unit 10 is configured such that a transparent plate-shaped reading glass 11 on which a document P to be read is placed is supported by a housing 13, and the reading is performed below the reading glass 11 in the housing 13. A reading unit 15 that optically reads an image reflected on the glass 11 in the main scanning direction, a conveying mechanism 16 that conveys the reading unit 15 in the sub-scanning direction, and a motor 17 that drives the conveying mechanism 16 are provided.

この画像読取部10は、読取制御部20から入力される制御信号に従って、モータ17の回転力により搬送機構16を駆動し、これにより読取ユニット15を読取ガラス11下で副走査方向(図1(b)(c)に示す点線矢印方向)に搬送すると共に、搬送時において、読取ユニット15に読取動作を実行させる。   The image reading unit 10 drives the transport mechanism 16 by the rotational force of the motor 17 in accordance with a control signal input from the reading control unit 20, thereby causing the reading unit 15 to move under the reading glass 11 in the sub-scanning direction (FIG. 1 ( b) While being conveyed in the direction of the dotted arrow shown in (c), the reading unit 15 is caused to perform a reading operation during conveyance.

尚、読取ユニット15は、読取制御部20に制御されて、副走査方向への移動と共に、読取ガラス11に写る画像をライン毎に読み取り、その読取画像を表すライン画像信号を出力するコンタクトイメージセンサ(CIS)である。この読取ユニット15から出力されるライン画像信号は、図示しないA/D変換器にてディジタルデータ(ライン画像データ)に変換され、読取制御部20に入力される。   The reading unit 15 is controlled by the reading control unit 20 to read an image on the reading glass 11 for each line as it moves in the sub-scanning direction, and outputs a line image signal representing the read image. (CIS). The line image signal output from the reading unit 15 is converted into digital data (line image data) by an A / D converter (not shown) and input to the reading control unit 20.

また、画像読取部10には、周知のスキャナと同様、読取ガラス11を被覆可能な蓋が開閉自在に設けられており(図示せず)、読取ユニット15による読取動作の実行時には、ユーザによる手動操作により、読取ガラス11に載置された原稿の上にかぶせられるようにして蓋が閉められる。尚、読取ガラス11と対向する蓋の内側は、原稿の読取画像に蓋の画像が写らないよう白色部材で構成されている。   The image reading unit 10 is provided with a lid (not shown) that can cover the reading glass 11 so as to be openable and closable similarly to a known scanner. When the reading operation by the reading unit 15 is performed, a manual operation by the user is performed. By the operation, the lid is closed so as to be placed on the document placed on the reading glass 11. The inner side of the lid facing the reading glass 11 is made of a white member so that the image of the lid does not appear in the read image of the document.

一方、読取制御部20は、CPU70からの指令に従って読取制御処理を実行し、当該読取制御処理にて、読取ユニット15の副走査方向への移動を制御すると共に、読取ユニット15の読取動作を制御する。   On the other hand, the reading control unit 20 executes a reading control process in accordance with an instruction from the CPU 70, and controls the movement of the reading unit 15 in the sub-scanning direction and controls the reading operation of the reading unit 15 in the reading control process. To do.

この制御により、読取制御部20は、読取ユニット15を読取ガラス11下で副走査方向に搬送しつつ、CPU70から指定された読取ガラス11の読取領域に写る画像を、読取ユニット15に読み取らせ、読取ガラスの読取領域に写る画像を表す画像データを、RAM80に記録する。このような動作により、RAM80には、読取ガラス11の読取領域に載置された原稿Pの読取画像を表す画像データが記録される。   With this control, the reading control unit 20 causes the reading unit 15 to read an image reflected in the reading area of the reading glass 11 designated by the CPU 70 while conveying the reading unit 15 under the reading glass 11 in the sub-scanning direction. Image data representing an image shown in the reading area of the reading glass is recorded in the RAM 80. By such an operation, image data representing a read image of the document P placed in the reading area of the reading glass 11 is recorded in the RAM 80.

尚、読取制御部20は、画像読取部10から入力される各ライン画像データを、一旦内蔵のバッファに蓄積し、各ライン画像データに対してシェーディング補正等の画像処理を実行した後、各ライン画像データを、RAM80に記録する。   The reading control unit 20 temporarily stores each line image data input from the image reading unit 10 in a built-in buffer, performs image processing such as shading correction on each line image data, and then executes each line image data. Image data is recorded in the RAM 80.

この他、印刷部30は、印刷制御部40から入力される制御信号に従い、トレイ(図示せず)に載置された記録紙を、記録位置に搬送し、インクジェット方式やレーザプリンタ方式等の周知の記録方式で、記録紙に、制御信号に対応した画像を形成するものである。   In addition, the printing unit 30 conveys a recording sheet placed on a tray (not shown) to a recording position in accordance with a control signal input from the printing control unit 40, and is well-known such as an ink jet method or a laser printer method. In this recording method, an image corresponding to the control signal is formed on the recording paper.

また、印刷制御部40は、印刷部30を制御して記録紙に画像を形成するものであり、CPU70からの指令に従って、CPU70から指定された印刷対象データに基づく画像を、印刷部30を通じて、記録紙に印刷する。   The print control unit 40 controls the printing unit 30 to form an image on recording paper. In accordance with a command from the CPU 70, an image based on the print target data designated by the CPU 70 is transmitted through the printing unit 30. Print on recording paper.

また、通信部60は、外部機器と通信するためのインタフェース群からなり、USBインタフェース、LANインタフェース、FAXモデム等から構成されている。即ち、複合機1は、通信部60が備えるFAXモデムを通じて外部のFAX装置とFAX通信可能な構成にされ、USBインタフェース又はLANインタフェースを通じて外部のパーソナルコンピュータと通信可能な構成にされている。   The communication unit 60 includes a group of interfaces for communicating with an external device, and includes a USB interface, a LAN interface, a FAX modem, and the like. That is, the multi-function device 1 is configured to be capable of performing FAX communication with an external FAX device through a FAX modem provided in the communication unit 60, and configured to be capable of communicating with an external personal computer through a USB interface or a LAN interface.

この他、表示操作部50は、情報表示用の液晶ディスプレイ(図示せず)と、各種操作キーとを備え、CPU70に制御されて、液晶ディスプレイに、ユーザ向けの情報を表示すると共に、操作キーを通じて入力されたユーザからの指令を、CPU70に入力する。   In addition, the display operation unit 50 includes a liquid crystal display (not shown) for displaying information and various operation keys, and is controlled by the CPU 70 to display information for the user on the liquid crystal display. The command from the user input through is input to the CPU 70.

また、CPU70は、プログラムの実行により、操作キーを通じて入力される指令や通信部60を通じて外部のパーソナルコンピュータ等から入力される指令に従い、コピー機能、FAX機能、スキャナ機能、及び、プリンタ機能等を実現する。   Further, the CPU 70 realizes a copy function, a FAX function, a scanner function, a printer function, and the like according to a command input through an operation key or a command input from an external personal computer or the like through the communication unit 60 by executing a program. To do.

例えば、CPU70は、表示操作部50に設けられた操作キーを通じてユーザからコピー指令が入力されると、複写制御処理(図3参照)を実行して装置内各部を制御し、読取ガラス11上に載置された原稿Pの読取画像を、記録紙に印刷する。詳細には、読取ユニット15による読取結果に基づいて読取ガラス11上に載置された原稿Pのサイズを推定し、推定した原稿サイズと記録紙サイズとから変倍率を設定して、原稿Pの読取画像を、記録紙サイズに適合する大きさに拡大又は縮小し、これを、印刷部30を通じて記録紙に印刷する。   For example, when a copy command is input from the user through an operation key provided on the display operation unit 50, the CPU 70 executes a copy control process (see FIG. 3) to control each unit in the apparatus, and on the reading glass 11. The read image of the placed document P is printed on a recording sheet. More specifically, the size of the document P placed on the reading glass 11 is estimated based on the reading result by the reading unit 15, and the scaling ratio is set from the estimated document size and the recording paper size, and the document P The read image is enlarged or reduced to a size suitable for the recording paper size, and this is printed on the recording paper through the printing unit 30.

以下、この複写制御処理の内容について具体的に説明するが、それに先駆けては、図2を用いて本実施例の画像読取部10の特徴について説明する。
図2は、読取ガラス11の読取可能領域R0を示した説明図である。当該複合機1においては、一面が開口された長方体状の筐体13の当該開口部において、長方形状のガラス板である読取ガラス11が当該開口部を閉塞するように設けられており、読取ガラス11の周囲が筐体13により支持された構成にされている。
The contents of the copy control process will be specifically described below. Prior to that, the characteristics of the image reading unit 10 of this embodiment will be described with reference to FIG.
FIG. 2 is an explanatory view showing the readable region R0 of the reading glass 11. As shown in FIG. In the multifunction device 1, a reading glass 11 that is a rectangular glass plate is provided so as to close the opening portion in the opening portion of the rectangular housing 13 whose one surface is opened. The periphery of the reading glass 11 is supported by a housing 13.

この読取ガラス11は、筐体13の上面よりも若干筐体13の下側に設けられており、筐体13から露出する読取ガラス11の領域11a(以下、「原稿台」と表現する。)と筐体13との境界BDには、原稿Pを突き当て可能に段差が形成されている(以下、筐体13の読取ガラス11より上方に位置する部位(上記段差を形成する部位)13aを「フレーム」と表現する。)
また、画像読取部10においては、読取ユニット15のライン幅と、原稿台11aの大きさとの関係から、四角形状の原稿台11aの全領域よりも若干狭い四角形状の領域R0が、読取ユニット15により原稿を読取可能な読取可能領域R0に定められている。具体的に、読取可能領域R0は、図2において点線で示すように、フレーム13aと読取ガラス11との境界BDから微小量(本実施例では3mm)離れた位置に外周を有した領域となっている。
The reading glass 11 is provided slightly below the upper surface of the housing 13 from the upper surface of the housing 13, and an area 11 a of the reading glass 11 exposed from the housing 13 (hereinafter, referred to as “original table”). A step is formed at the boundary BD between the casing 13 and the casing 13 so that the original P can be abutted (hereinafter referred to as a portion 13a above the reading glass 11 of the casing 13 (the portion forming the step)). (Represented as “frame”.)
Further, in the image reading unit 10, due to the relationship between the line width of the reading unit 15 and the size of the document table 11 a, a rectangular region R 0 that is slightly narrower than the entire region of the rectangular document table 11 a is the reading unit 15. Is defined as a readable area R0 where the original can be read. Specifically, the readable area R0 is an area having an outer periphery at a position away from the boundary BD between the frame 13a and the reading glass 11 by a minute amount (3 mm in this embodiment), as indicated by a dotted line in FIG. ing.

また、この画像読取部10においては、フレーム13aの左下部分に、原稿Pの角を突き当てるように指示するマークMKが記されている。尚、本実施例では、マークMKが付された原稿台11aの角を、「左下角」と定義して、この左下角より、主走査方向に離れた地点に位置する原稿台11aの角を「右下角」と定義し、左下角より、副走査方向に離れた地点に位置する原稿台11aの角を「左上角」と定義する。   In the image reading unit 10, a mark MK is instructed in the lower left part of the frame 13a to instruct the corner of the document P to abut. In this embodiment, the corner of the document table 11a to which the mark MK is attached is defined as “lower left corner”, and the corner of the document table 11a located at a point farther in the main scanning direction than the lower left corner is defined. The “lower right corner” is defined, and the corner of the document table 11a located at a point away from the lower left corner in the sub-scanning direction is defined as the “upper left corner”.

即ち、複合機1においては、原稿台11aの左下角(換言すれば、フレーム13aの内側左下角)が、原稿Pの角を合わせるべき位置として定められており、複合機1は、ユーザが概ね、このマークMKに合わせて原稿Pを載置しているとの仮定の下で、原稿サイズの推定等を行い、原稿のコピー動作を実現する。   That is, in the multi-function device 1, the lower left corner of the document table 11a (in other words, the lower left corner inside the frame 13a) is determined as a position where the corner of the document P should be aligned. Under the assumption that the document P is placed in accordance with the mark MK, the document size is estimated and the document copy operation is realized.

この他、本実施例の複合機1においては、このマークMKが付されたフレーム13aの内側左下角に対応する読取可能領域R0の左下角を原点、主走査方向をX軸、副走査方向をY軸としたXY座標系(図2(b)参照)が導入されており、CPU70は、このXY座標系を用いて図3に示す複写制御処理を実行する。   In addition, in the multifunction machine 1 of this embodiment, the lower left corner of the readable area R0 corresponding to the inner lower left corner of the frame 13a with the mark MK is the origin, the main scanning direction is the X axis, and the sub scanning direction is An XY coordinate system (see FIG. 2B) with the Y axis is introduced, and the CPU 70 executes the copy control process shown in FIG. 3 using this XY coordinate system.

続いて、CPU70が実行する複写制御処理について説明する。図3は、操作キーを通じてコピー指令が入力されると、CPU70が実行する複写制御処理を表すフローチャートである。   Next, a copy control process executed by the CPU 70 will be described. FIG. 3 is a flowchart showing a copy control process executed by the CPU 70 when a copy command is input through the operation keys.

複写制御処理を開始すると、CPU70は、操作キーを通じて入力されたコピー指令が「縁無し」コピー指令であるか否かを判断し(S110)、「縁無し」コピー指令であると判断すると(S110でYes)、S120に移行して、図4(a)に示す第一複写処理を実行する。   When the copy control process is started, the CPU 70 determines whether or not the copy command input through the operation key is a “marginless” copy command (S110), and determines that it is a “marginless” copy command (S110). Yes), the process proceeds to S120, and the first copying process shown in FIG.

詳しくは後述するが、第一複写処理では、読取可能領域R0全体に渡ってプレスキャン動作を画像読取部10に実行させ、プレスキャン結果として、読取可能領域R0全体の読取結果である画像データを画像読取部10から取得し、この画像データに基づいて原稿サイズや原稿の傾き角を推定して、変倍率及び傾き補正量を設定し、その後、本スキャン動作を画像読取部10に実行させて、これにより得られる画像データを、拡大・縮小・回転処理し、印刷部30を通じて、記録紙に「縁なし」で原稿のコピー画像を印刷する。CPU70は、この第一複写処理を終了すると、複写制御処理を終了する。   As will be described in detail later, in the first copying process, the image reading unit 10 is caused to perform a prescan operation over the entire readable area R0, and image data that is the read result of the entire readable area R0 is obtained as a prescan result. Obtained from the image reading unit 10, estimates the document size and document inclination angle based on the image data, sets the scaling factor and the inclination correction amount, and then causes the image reading unit 10 to execute the main scanning operation. The image data obtained thereby is enlarged, reduced, and rotated, and a copy image of the original is printed on the recording paper through the printing unit 30 with “no border”. When the CPU 70 ends the first copy process, the copy control process ends.

一方、操作キーを通じて入力されたコピー指令が「縁無し」コピー指令ではないと判断すると(S110でNo)、CPU70は、当該コピー指令が「自動変倍/傾き補正」コピー指令であるか否かを判断し(S130)、入力されたコピー指令が「自動変倍/傾き補正」コピー指令であると判断すると(S130でYes)、図4(b)に示す第二複写処理を実行する(S140)。   On the other hand, if it is determined that the copy command input through the operation key is not a “marginless” copy command (No in S110), the CPU 70 determines whether or not the copy command is an “automatic scaling / tilt correction” copy command. (S130), and if the input copy command is determined to be an “automatic scaling / tilt correction” copy command (Yes in S130), the second copy process shown in FIG. 4B is executed (S140). ).

詳しくは後述するが、第二複写処理では、読取可能領域R0の一部領域においてプレスキャン動作を画像読取部10に実行させ、プレスキャン結果として、当該一部領域に載置された原稿の読取結果である画像データを画像読取部10から取得し、この画像データに基づいて原稿サイズや原稿の傾き角を推定して、変倍率及び傾き補正量を設定し、その後、本スキャン動作を画像読取部10に実行させ、これにより得られる画像データを、拡大・縮小・回転処理し、印刷部30を通じて、記録紙に、傾き補正した原稿のコピー画像を、記録紙サイズに対応する大きさで印刷する。CPU70は、この第二複写処理を終了すると、複写制御処理を終了する。   As will be described in detail later, in the second copying process, the image reading unit 10 is caused to execute a prescan operation in a partial area of the readable area R0, and a document placed in the partial area is read as a prescan result. The resulting image data is acquired from the image reading unit 10, the document size and the document tilt angle are estimated based on the image data, the scaling factor and the tilt correction amount are set, and then the main scanning operation is performed. The image data obtained thereby is enlarged, reduced, and rotated, and a copy image of the skew-corrected original is printed on the recording paper through the printing unit 30 in a size corresponding to the recording paper size. To do. When the second copying process is completed, the CPU 70 ends the copying control process.

また、操作キーを通じて入力されたコピー指令が「自動変倍/傾き補正」コピー指令ではないと判断すると(S130でNo)、CPU70は、入力されたコピー指令が「ノーマル」コピー指令であるか否かを判断する(S150)。そして、「ノーマル」コピー指令であると判断すると(S150でYes)、S160に移行し、「ノーマル」コピー指令ではないと判断すると(S150でNo)、入力されたコピー指令に対応した処理を実行した後(S155)、当該複写制御処理を終了する。   If the CPU 70 determines that the copy command input through the operation key is not the “automatic scaling / tilt correction” copy command (No in S130), the CPU 70 determines whether or not the input copy command is the “normal” copy command. Is determined (S150). If it is determined that the command is a “normal” copy command (Yes in S150), the process proceeds to S160. If it is determined that the command is not a “normal” copy command (No in S150), processing corresponding to the input copy command is executed. (S155), the copy control process is terminated.

また、S160に移行すると、CPU70は、印刷制御部40を通じて、印刷部30に給紙動作を実行させると共に、給紙動作の対象となった記録紙のサイズを検出する(S165)。尚、記録紙のサイズは、例えば、記録紙の搬送路に設けられたセンサを用いて周知の手法で検出することができる。   In step S160, the CPU 70 causes the printing unit 30 to execute a paper feeding operation through the print control unit 40, and detects the size of the recording paper subjected to the paper feeding operation (S165). The size of the recording paper can be detected by a well-known method using, for example, a sensor provided in the recording paper conveyance path.

また、この処理を終えると、CPU70は、S165での検出結果に基づき、読取ガラス11上において、記録紙サイズと同サイズの原稿が正しく規定の位置に載置されていると仮定して、原稿読取開始位置を読取可能領域R0の下端(Y=0)に設定し、原稿読取終了位置を、原稿の上端に対応する位置に設定する(S170)。このようにして、上記原稿読取開始位置から原稿読取終了位置までを読取領域に設定する。   When this processing is completed, the CPU 70 assumes that a document of the same size as the recording paper size is correctly placed on the reading glass 11 on the reading glass 11 based on the detection result in S165. The reading start position is set to the lower end (Y = 0) of the readable area R0, and the original reading end position is set to a position corresponding to the upper end of the original (S170). In this way, the reading area is set from the original reading start position to the original reading end position.

その後、CPU70は、読取制御部20を通じて画像読取部10を制御し、画像読取部10に、読取ユニット15を原稿読取開始位置から原稿読取終了位置まで副走査方向に搬送させると共に、当該搬送中にはライン毎の読取動作を読取ユニット15に実行させて、読取ガラス11上の読取領域に写る画像を、読取ユニット15に読み取らせ、当該読取領域の読取結果を表す画像データが、RAM80に記録されるようにする(S180)。   Thereafter, the CPU 70 controls the image reading unit 10 through the reading control unit 20 to cause the image reading unit 10 to convey the reading unit 15 in the sub scanning direction from the document reading start position to the document reading end position, and during the conveyance. Causes the reading unit 15 to execute a reading operation for each line, causes the reading unit 15 to read an image shown in the reading area on the reading glass 11, and image data representing the reading result of the reading area is recorded in the RAM 80. (S180).

また、この処理を終えると、CPU70は、RAM80に記録された上記読取結果を表す画像データを、印刷対象データに設定して、当該印刷対象データについての印刷処理を実行する(S190)。即ち、印刷制御部40を通じて、印刷部30に印刷対象データに基づく画像を、給紙した記録紙に印刷させる。このようにして、原稿のコピー画像を、拡大・縮小や傾き補正無しで記録紙に印刷する。その後、当該複写制御処理を終了する。   When this process is finished, the CPU 70 sets the image data representing the read result recorded in the RAM 80 as the print target data, and executes the print process for the print target data (S190). That is, the printing unit 30 causes the printing unit 30 to print an image based on the print target data on the fed recording paper. In this way, a copy image of the original is printed on the recording paper without enlarging / reducing or correcting the inclination. Thereafter, the copy control process ends.

続いて、CPU70が、S120で実行する第一複写処理について説明する。図4(a)は、CPU70が実行する第一複写処理を表すフローチャートである。
第一複写処理を開始すると、CPU70は、原稿読取開始位置を、読取可能領域R0の下端(Y=0)に設定し、原稿読取終了位置を、読取可能領域R0の上端(Y=YMAX)に設定することにより、読取可能領域R0全域を読取領域に設定し、読取制御部20を通じて、画像読取部10に、プレスキャン動作を実行させる(S210:全体プレスキャン処理)。
Next, the first copying process executed by the CPU 70 in S120 will be described. FIG. 4A is a flowchart showing the first copying process executed by the CPU 70.
When the first copying process is started, the CPU 70 sets the document reading start position to the lower end (Y = 0) of the readable area R0, and sets the document reading end position to the upper end (Y = YMAX) of the readable area R0. By setting, the entire readable region R0 is set as a reading region, and the image reading unit 10 is caused to execute a pre-scan operation through the reading control unit 20 (S210: whole pre-scan process).

尚、画像読取部10は、プレスキャン動作として、設定された読取領域の端から端まで、プレスキャン用の解像度に対応する速度で、読取ユニット15を副走査方向に搬送し、その読取領域の画像を読取ユニット15に読み取らせ、プレスキャン結果として、低解像度の画像データ(以下、「プレスキャン画像データ」という。)を、読取制御部20を通じて、RAM80に記録する動作を実行する。   As a pre-scan operation, the image reading unit 10 conveys the reading unit 15 in the sub-scanning direction at a speed corresponding to the pre-scan resolution from the end of the set reading area to the end of the reading area. The image is read by the reading unit 15 and, as a prescan result, low resolution image data (hereinafter referred to as “prescan image data”) is recorded in the RAM 80 through the read control unit 20.

S210での処理を終えると、CPU70は、RAM80に記録されたプレスキャン画像データに対してエッジ検出処理を実行し、この画像データに対応するエッジ画像データを生成する(S215)。即ち、RAM80に記録されたプレスキャン画像データを、エッジ検出用の画像フィルタ(周知の微分フィルタ)に通して、この画像データに対応するエッジ画像を表すエッジ画像データを生成する。   When the processing in S210 is completed, the CPU 70 performs edge detection processing on the pre-scan image data recorded in the RAM 80, and generates edge image data corresponding to the image data (S215). That is, the prescan image data recorded in the RAM 80 is passed through an image filter for edge detection (a well-known differential filter), and edge image data representing an edge image corresponding to the image data is generated.

また、この処理を終えると、CPU70は、生成したエッジ画像データを解析して、原稿台11aに載置された原稿のサイズ(縦幅及び横幅)、及び、原稿の傾き角θ、及び、原稿台11aにおける原稿の載置領域を推定する(S220)。但し、ここでは、X軸に対して原稿の下辺がなす角度を、原稿の傾き角θ(図9参照)とする。   When this processing is completed, the CPU 70 analyzes the generated edge image data, and the size (vertical width and horizontal width) of the document placed on the document table 11a, the inclination angle θ of the document, and the document. The document placement area on the table 11a is estimated (S220). However, here, the angle formed by the lower side of the document with respect to the X axis is the document inclination angle θ (see FIG. 9).

また、S220での処理を終えると、CPU70は、印刷制御部40を通じて、印刷部30に給紙動作を実行させると共に(S230)、給紙動作の対象となった記録紙のサイズを検出する(S235)。更に、S220で推定した原稿サイズ及びS235で検出した記録紙サイズに基づき、予め定められた計算式で(具体的には、原稿のコピー画像が記録紙の縁まで最大限広がって印刷されるように)変倍率を設定する(S240)。   When the processing in S220 is completed, the CPU 70 causes the printing unit 30 to execute a paper feeding operation through the print control unit 40 (S230), and detects the size of the recording paper that is the target of the paper feeding operation (S230). S235). Further, based on the document size estimated in S220 and the recording paper size detected in S235, a predetermined calculation formula is used (specifically, a copy image of the document is printed to spread to the edge of the recording paper to the maximum extent). (Ii) A scaling factor is set (S240).

この他、CPU70は、S220で推定した原稿の傾き角θから、画像データの傾き補正量を設定する(S250)。具体的には、原稿のコピー画像が、傾きのない状態でまっすぐ、記録紙に印刷されるように、傾き補正量を設定する。但し、推定した原稿の傾き角θが微小量(本実施例では−0.5度≦θ≦0.5度)である場合には、誤差も考慮して、傾き補正量をゼロに設定する。   In addition, the CPU 70 sets the inclination correction amount of the image data from the document inclination angle θ estimated in S220 (S250). Specifically, the tilt correction amount is set so that the copy image of the document is printed straight on the recording paper without tilting. However, when the estimated document inclination angle θ is a very small amount (in this embodiment, −0.5 degrees ≦ θ ≦ 0.5 degrees), the inclination correction amount is set to zero in consideration of errors. .

また、S250での処理を終えると、CPU70は、S220で推定した原稿の載置領域の情報に基づいて、原稿読取開始位置及び原稿読取終了位置を設定し、原稿読取開始位置及び原稿読取終了位置で定められる読取領域を、原稿台11aにおける原稿の載置領域に対応させる(S260)。   When the processing in S250 is completed, the CPU 70 sets the document reading start position and the document reading end position based on the information of the document placement area estimated in S220, and the document reading start position and the document reading end position. The reading area determined in step S2 is made to correspond to the document placement area on the document table 11a (S260).

具体的には、原稿の載置領域全体を読取ユニット15が読み取ることができるように、原稿読取開始位置を、副走査方向において最も下側に位置する原稿の端点に対応した位置に設定し、原稿読取終了位置を、副走査方向において最も上側に位置する原稿の端点に対応した位置に設定して、読取領域を原稿台11aにおける原稿の載置領域に対応させる。   Specifically, the document reading start position is set to a position corresponding to the end point of the document located on the lowermost side in the sub-scanning direction so that the reading unit 15 can read the entire document placement area. The document reading end position is set to a position corresponding to the end point of the document located on the uppermost side in the sub-scanning direction, and the reading area is made to correspond to the document placement area on the document table 11a.

また、S260での処理を終えると、CPU70は、読取制御部20を通じて画像読取部10を制御することで、画像読取部10に、読取ユニット15を原稿読取開始位置から原稿読取終了位置まで副走査方向に搬送させると共に、当該搬送中にはライン毎の読取動作を読取ユニット15に実行させて、上記設定した読取領域の画像を、読取ユニット15に読み取らせ、当該読取領域の読取結果を表す画像データが、RAM80に記録されるようにする(S270)。   When the processing in S260 is completed, the CPU 70 controls the image reading unit 10 through the reading control unit 20 to cause the image reading unit 10 to subscan the reading unit 15 from the document reading start position to the document reading end position. An image representing a reading result of the reading area by causing the reading unit 15 to perform a reading operation for each line during the conveyance and causing the reading unit 15 to read the image of the set reading area. Data is recorded in the RAM 80 (S270).

また、この処理を終えると、CPU70は、RAM80に記録された上記読取結果を表す画像データを、予め設定した変倍率で拡大又は縮小処理すると共に、予め設定した傾き補正量分、回転処理して、上記読取結果を表す画像データを、印刷用の画像データに変換し、変換後の画像データを、印刷対象データに設定する(S280)。但し、傾き補正量がゼロに設定されている場合には、S280において、回転処理を、実行しないものとする。   When this processing is completed, the CPU 70 enlarges or reduces the image data representing the read result recorded in the RAM 80 at a preset scaling factor, and rotates the image data by a preset inclination correction amount. Then, the image data representing the read result is converted into image data for printing, and the converted image data is set as print target data (S280). However, if the tilt correction amount is set to zero, the rotation process is not executed in S280.

そして、S280での処理を終えると、CPU70は、当該印刷対象データについての印刷処理を実行する(S290)。即ち、印刷制御部40を通じて、印刷部30に印刷対象データに基づく画像を、給紙した記録紙に印刷させる。その後、当該複写制御処理を終了する。   When the process in S280 is completed, the CPU 70 executes a printing process for the print target data (S290). That is, the printing unit 30 causes the printing unit 30 to print an image based on the print target data on the fed recording paper. Thereafter, the copy control process ends.

続いて、S140でCPU70が実行する第二複写処理について説明する。図4(b)は、CPU70が実行する第二複写処理を表すフローチャートである。
第二複写処理を開始すると、CPU70は、原稿読取開始位置を、読取可能領域R0の下端(Y=0)に設定し、原稿読取終了位置を、設計段階で予め定められた読取可能領域R0の下端から所定距離離れた位置(Y=YPRE)に設定することにより、読取可能領域R0の一部を読取領域に設定し、読取制御部20を通じて、画像読取部10に、当該読取領域に対するプレスキャン動作を実行させる(S310:先端部プレスキャン処理)。
Next, the second copy process executed by the CPU 70 in S140 will be described. FIG. 4B is a flowchart showing the second copying process executed by the CPU 70.
When the second copying process is started, the CPU 70 sets the document reading start position at the lower end (Y = 0) of the readable area R0, and sets the document reading end position in the readable area R0 that is predetermined in the design stage. A part of the readable area R0 is set as a reading area by setting the position at a predetermined distance from the lower end (Y = YPRE), and a pre-scan for the reading area is performed in the image reading unit 10 through the reading control unit 20. The operation is executed (S310: tip pre-scan process).

図5は、第一複写処理で実行される全体プレスキャン処理の読取領域と、第二複写処理で実行される先端部プレスキャン処理の読取領域と、の相違を表した説明図である。図5に示すように、第二複写処理では、第一複写処理のように読取可能領域R0全体に対してプレスキャン動作を画像読取部10に実行させるのではなく、読取可能領域R0の下端から読取可能領域R0内側へ所定距離離れた地点まで(本実施例では、読取可能領域R0の下端から30mm離れた地点まで)に対して、プレスキャン動作を画像読取部10に実行させる。   FIG. 5 is an explanatory diagram showing the difference between the reading area of the entire prescan process executed in the first copying process and the reading area of the leading edge prescan process executed in the second copying process. As shown in FIG. 5, in the second copying process, the pre-scanning operation is not performed on the entire readable area R0 as in the first copying process, but from the lower end of the readable area R0. The image reading unit 10 is caused to perform a pre-scan operation up to a point that is a predetermined distance away from the inside of the readable region R0 (in this embodiment, to a point that is 30 mm away from the lower end of the readable region R0).

このようにして、S310での処理を終えると、CPU70は、RAM80に記録されたプレスキャン画像データ(プレスキャン結果)に対してエッジ検出処理を実行し、この画像データに対応するエッジ画像データを生成する(S315)。即ち、RAM80に記録されたプレスキャン画像データを、エッジ検出用の画像フィルタ(周知の微分フィルタ)に通して、エッジ画像データに変換する。   In this way, when the processing in S310 is completed, the CPU 70 performs edge detection processing on the prescan image data (prescan result) recorded in the RAM 80, and obtains the edge image data corresponding to this image data. Generate (S315). That is, the prescan image data recorded in the RAM 80 is passed through an image filter for edge detection (a well-known differential filter) and converted into edge image data.

また、この処理を終えると、CPU70は、S315で生成したエッジ画像データを検査対象データに設定し、S320にて、図6に示す原稿推定処理を実行する。これにより、上記エッジ画像データを解析して、原稿台11aに載置された原稿のサイズ(縦幅及び横幅)、及び、原稿の傾き角θ、及び、原稿台11aにおける原稿の載置領域を推定する。具体的には、原稿台11aに載置された原稿が四角形状で縦横比が一定の定型用紙であるとの仮定の下で、原稿台11aに載置された原稿のエッジを検出すると共に、その検出結果から原稿の左下角位置及び右下角位置を推定し、この推定結果に基づいて、原稿台11aに載置された原稿のサイズ、及び、原稿の傾き角θ、及び、原稿の載置領域を推定する(詳細後述)。   When this process is finished, the CPU 70 sets the edge image data generated in S315 as inspection target data, and executes the document estimation process shown in FIG. 6 in S320. Accordingly, the edge image data is analyzed, and the size (vertical width and horizontal width) of the document placed on the document table 11a, the inclination angle θ of the document, and the document placement area on the document table 11a are determined. presume. Specifically, the edge of the document placed on the document table 11a is detected under the assumption that the document placed on the document table 11a is a standard paper having a rectangular shape and a constant aspect ratio. Based on the detection result, the lower left corner position and the lower right corner position of the document are estimated. Based on the estimation result, the size of the document placed on the document table 11a, the inclination angle θ of the document, and the placement of the document. An area is estimated (details will be described later).

また、S320での処理を終えると、CPU70は、S230〜S290の処理と同様に、S330〜S390の処理を実行する。
但し、S340では、S320で推定した原稿サイズ及びS335で検出した記録紙サイズに基づき、変倍率を、予め定められた計算式に従って、原稿サイズと記録紙サイズとの比(例えば、記録紙短辺長さ÷原稿短辺長さ)に対応した倍率に設定し、後続の処理で、原稿のコピー画像が、原稿サイズとの記録紙サイズの比に対応した倍率で拡大(倍率が1未満の場合には縮小)されて記録紙に印刷されるようにする。
When the process in S320 is completed, the CPU 70 executes the processes in S330 to S390 as in the processes in S230 to S290.
However, in S340, based on the document size estimated in S320 and the recording paper size detected in S335, the scaling factor is set to a ratio between the document size and the recording paper size according to a predetermined calculation formula (for example, the short side of the recording paper). When the magnification is set to a length corresponding to the length divided by the original document's short side length, and in subsequent processing, the copy image of the original is enlarged at a magnification corresponding to the ratio of the recording paper size to the original size (when the magnification is less than 1) Is reduced to be printed on the recording paper.

また、S350では、S320で推定した原稿の傾き角θから、原稿のコピー画像が、まっすぐ記録紙に印刷されるように、読取結果である画像データの傾き補正量を設定し、S360では、S320で推定した原稿の載置領域の情報に基づいて、原稿読取開始位置及び原稿読取終了位置を設定し、原稿読取開始位置及び原稿読取終了位置で定められる読取領域を、原稿台11aにおける原稿の載置領域に対応させる。   In S350, the inclination correction amount of the image data that is the read result is set so that the copy image of the original is printed straight on the recording paper from the inclination angle θ of the original estimated in S320. The document reading start position and the document reading end position are set based on the information of the document placement area estimated in step S1, and the reading area defined by the document reading start position and the document reading end position is set on the document table 11a. It corresponds to the placement area.

このようにして、第二複写処理では、読取可能領域R0における一部領域のプレスキャン結果に基づき、原稿サイズ、原稿の傾き角、及び、原稿の載置領域を推定し、その結果から、本スキャン時(S370実行時)の読取領域を決定すると共に、変倍率及び傾き補正量を決定して、原稿のコピー画像を、記録紙サイズに対応する大きさで、記録紙に印刷する。   In this way, in the second copying process, the document size, the document inclination angle, and the document placement area are estimated based on the prescan result of the partial area in the readable area R0, and the result is A reading area at the time of scanning (at the time of execution of S370) is determined, a scaling factor and an inclination correction amount are determined, and a copy image of an original is printed on a recording sheet with a size corresponding to the recording sheet size.

続いて、図6を用いて、CPU70が、S320で実行する原稿推定処理について説明する。図6は、CPU70が実行する原稿推定処理を表すフローチャートである。
この原稿推定処理を開始すると、CPU70は、変数Sを上述のプレスキャン領域上端のY座標であるYPREに設定することにより(S=YPRE)、Y軸方向の検査範囲を、Y=0からY=S=YPREに設定する(S410)。また、この処理を終えると、S420に移行し、右エッジ検出処理を実行する。図7は、CPU70が実行する右エッジ検出処理を表すフローチャートである。
Next, the document estimation process executed by the CPU 70 in S320 will be described with reference to FIG. FIG. 6 is a flowchart showing document estimation processing executed by CPU 70.
When this document estimation process is started, the CPU 70 sets the variable S to YPRE which is the Y coordinate of the upper end of the pre-scan area (S = YPRE), thereby changing the inspection range in the Y-axis direction from Y = 0 to Y = S = YPRE is set (S410). When this process ends, the process proceeds to S420, and a right edge detection process is executed. FIG. 7 is a flowchart showing the right edge detection process executed by the CPU 70.

右エッジ検出処理を開始すると、CPU70は、まずS610にて、副走査方向検査位置Yeを、読取可能領域R0の下端Y座標に設定し(Ye=0)、S615にて、主走査方向検査位置Xeを、読取可能領域R0の右端X座標に設定する(Xe=XMAX)。また、S615では、変数Cを値ゼロに初期化する(C=0)。その後、副走査方向検査位置Yeが検査範囲を超えているか否かを判断する(S620)。具体的には、Ye>Sであるか否かを判断する。   When the right edge detection process is started, the CPU 70 first sets the sub-scanning direction inspection position Ye to the lower end Y coordinate of the readable area R0 (Ye = 0) in S610, and the main scanning direction inspection position in S615. Xe is set to the right end X coordinate of the readable region R0 (Xe = XMAX). In S615, the variable C is initialized to zero (C = 0). Thereafter, it is determined whether or not the sub-scanning direction inspection position Ye exceeds the inspection range (S620). Specifically, it is determined whether or not Ye> S.

そして、副走査方向検査位置Yeが検査範囲を超えていないと判断すると(S620でNo)、CPU70は、主走査方向検査位置Xe及び副走査方向検査位置Yeで定まる検査位置(X,Y)=(Xe,Ye)に対応する検査対象データの画素値を参照することにより、検査位置(Xe,Ye)がエッジ点であるか否かを判断する(S625)。尚、図8は、エッジ画像データの構成を抜粋して示し、更に、右エッジ検出処理により追跡するエッジ点の軌跡を表した説明図である。図8に示す例では、画素値「1」の地点がエッジ点に該当する。   When determining that the sub-scanning direction inspection position Ye does not exceed the inspection range (No in S620), the CPU 70 determines the inspection position (X, Y) = determined by the main scanning direction inspection position Xe and the sub-scanning direction inspection position Ye = It is determined whether or not the inspection position (Xe, Ye) is an edge point by referring to the pixel value of the inspection target data corresponding to (Xe, Ye) (S625). FIG. 8 is an explanatory view showing the configuration of the edge image data, and further showing the locus of the edge point tracked by the right edge detection process. In the example illustrated in FIG. 8, a point with a pixel value “1” corresponds to an edge point.

そして、検査位置(Xe,Ye)がエッジ点ではないと判断すると(S625でNo)、CPU70は、S640に移行して、主走査方向検査位置Xeを、X軸マイナス方向に1画素移動した位置に更新し(Xe←Xe−1)、更新後の主走査方向検査位置Xeが読取可能領域R0の左端を、はみ出ていないかどうかを判断する。具体的には、Xe<0であるか否かを判断する(S643)。   If the CPU 70 determines that the inspection position (Xe, Ye) is not an edge point (No in S625), the CPU 70 proceeds to S640 and moves the main scanning direction inspection position Xe by one pixel in the X axis minus direction. (Xe ← Xe−1), and it is determined whether or not the updated main scanning direction inspection position Xe protrudes from the left end of the readable area R0. Specifically, it is determined whether or not Xe <0 (S643).

そして、主走査方向検査位置Xeが、読取可能領域R0の左端をはみ出ていないと判断すると(S643でNo)、CPU70は、S620に移行して、副走査方向検査位置Yeが検査範囲を超えているか否か(Ye>Sであるか否か)を判断し、副走査方向検査位置Yeが検査範囲を超えていないと判断すると(S620でNo)、S625に移行し、副走査方向検査位置Yeが検査範囲を超えていると判断すると(S620でYes)、S690に移行する。   If the CPU 70 determines that the main scanning direction inspection position Xe does not protrude from the left end of the readable area R0 (No in S643), the CPU 70 proceeds to S620, and the sub scanning direction inspection position Ye exceeds the inspection range. If it is determined whether or not (Ye> S) and the sub-scanning direction inspection position Ye does not exceed the inspection range (No in S620), the process proceeds to S625, and the sub-scanning direction inspection position Ye. If it is determined that the value exceeds the inspection range (Yes in S620), the process proceeds to S690.

一方、S643において、主走査方向検査位置Xeが読取可能領域R0の左端をはみ出ていると判断すると(Xe<0であると判断すると)、CPU70は、S647に移行し、主走査方向検査位置Xeを、読取可能領域R0の右端(XMAX)に設定すると共に(Xe=XMAX)、副走査方向検査位置Yeを、現在値Yeに8加えた値に更新する(Ye←Ye+8)。即ち、副走査方向検査位置Yeを、Y軸方向に8画素進んだ位置に設定する。その後、S620に移行して、上述の処理を実行する。   On the other hand, if it is determined in S643 that the main scanning direction inspection position Xe protrudes from the left end of the readable region R0 (when it is determined that Xe <0), the CPU 70 proceeds to S647 and performs the main scanning direction inspection position Xe. Is set to the right end (XMAX) of the readable region R0 (Xe = XMAX), and the sub-scanning direction inspection position Ye is updated to a value obtained by adding 8 to the current value Ye (Ye ← Ye + 8). That is, the sub-scanning direction inspection position Ye is set to a position advanced by 8 pixels in the Y-axis direction. Thereafter, the process proceeds to S620, and the above-described processing is executed.

また、検査位置(Xe,Ye)がエッジ点であると判断すると(S625でYes)、CPU70は、S630に移行し、変数(X0,Y0)に、現在の検査位置(Xe,Ye)の座標値を、設定する(X0←Xe,Y0←Ye)。また、変数Y1を、座標Y=Y0からY軸方向に8画素進んだ座標値Y1(=Y0+8)に更新する(S633)。   If the CPU 70 determines that the inspection position (Xe, Ye) is an edge point (Yes in S625), the CPU 70 proceeds to S630, and the coordinates of the current inspection position (Xe, Ye) are set in the variable (X0, Y0). The value is set (X0 ← Xe, Y0 ← Ye). Further, the variable Y1 is updated to a coordinate value Y1 (= Y0 + 8) advanced by 8 pixels in the Y-axis direction from the coordinate Y = Y0 (S633).

その後、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点の少なくとも一つが、エッジ点であるか否かを判断し(S637)、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点のいずれもがエッジ点でない場合には(S637でNo)、S640に移行して、主走査方向検査位置Xeを、X軸マイナス方向に1画素移動した位置に更新する(Xe←Xe−1)。   Thereafter, it is determined whether at least one of the point of coordinates (X0-1, Y1), the point of coordinates (X0, Y1), and the point of coordinates (X0 + 1, Y1) is an edge point (S637). If none of the point of (X0-1, Y1), the point of coordinates (X0, Y1), and the point of coordinates (X0 + 1, Y1) is an edge point (No in S637), the process proceeds to S640. The scanning direction inspection position Xe is updated to a position moved by one pixel in the X axis minus direction (Xe ← Xe−1).

一方、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点の少なくとも一つがエッジ点であると判断した場合には(S637でYes)、S650に移行して、座標(X0,Y0)の地点が連続性のあるエッジ点であると判定し、この座標(X0,Y0)を、連続性のあるエッジ点の座標データとして、一時記憶する。   On the other hand, when it is determined that at least one of the coordinates (X0-1, Y1), the coordinates (X0, Y1), and the coordinates (X0 + 1, Y1) is an edge point (Yes in S637), The process proceeds to S650, where it is determined that the point of coordinates (X0, Y0) is a continuous edge point, and this coordinate (X0, Y0) is temporarily stored as coordinate data of the continuous edge point. .

また、この処理を終えると、CPU70は、S660に移行し、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点の内、エッジ点である地点の一つを、予め定められた優先度に従って選択する。   When this process is finished, the CPU 70 proceeds to S660, where the coordinates (X0-1, Y1), the coordinates (X0, Y1), and the coordinates (X0 + 1, Y1) are the edge points. One of the points is selected according to a predetermined priority.

具体的に、右エッジ検出処理においては、読取可能領域R0右端側に近い座標ほど高い優先度が設定されている。即ち、読取可能領域R0右端側に近い座標(X0+1,Y1)の地点が優先度「大」に設定され、座標(X0,Y1)の地点が優先度「中」に設定され、座標(X0−1,Y1)の地点が優先度「小」に設定されている。   Specifically, in the right edge detection process, higher priority is set for coordinates closer to the right end side of the readable area R0. That is, the point of the coordinate (X0 + 1, Y1) close to the right end side of the readable area R0 is set to the priority “high”, the point of the coordinate (X0, Y1) is set to the priority “medium”, and the coordinate (X0− 1, Y1) is set to the priority “small”.

このように優先度が設定されているのは、原稿の右端より右側においては、原稿台11aに何も存在せず、エッジ点は存在しないはずであり、読取可能領域R0右端側に近いエッジ点であるほど、そのエッジ点が原稿の右端に対応するエッジ点である可能性が高いためである。   The priority is set in this way because nothing exists on the platen 11a on the right side from the right end of the document, and there should be no edge point, and an edge point close to the right end side of the readable area R0. This is because there is a higher possibility that the edge point corresponds to the right edge of the document.

即ち、S660では、上記優先度に従って、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点、及び、座標(X0+1,Y1)の地点の内、エッジ点である地点であって優先度の最も高い地点を選択する。そして、変数X0を、選択した地点のX座標に更新し、変数Y0を、選択した地点のY座標に更新する。その後、変数Cを1加算した値に更新する(S663)。   That is, in S660, according to the priority, the point of the coordinate (X0-1, Y1), the point of the coordinate (X0, Y1), and the point of the coordinate (X0 + 1, Y1) is a point that is an edge point. To select the point with the highest priority. Then, the variable X0 is updated to the X coordinate of the selected point, and the variable Y0 is updated to the Y coordinate of the selected point. Thereafter, the variable C is updated to a value obtained by adding 1 (S663).

そして、この処理を終えると、CPU70は、更新後の変数Cの値がC=8であるか否かを判断し、C=8でないと判断すると(S667でNo)、S633に移行して、変数Y1を、座標Y=Y0からY軸方向に8画素進んだ地点のY座標に更新する(Y1=Y0+8)。その後、S637以降の処理を実行する。   When this process is completed, the CPU 70 determines whether or not the value of the updated variable C is C = 8. If the CPU 70 determines that C = 8 is not satisfied (No in S667), the process proceeds to S633. The variable Y1 is updated to the Y coordinate of the point advanced by 8 pixels in the Y-axis direction from the coordinate Y = Y0 (Y1 = Y0 + 8). Thereafter, the processing after S637 is executed.

CPU70は、このような処理を実行することにより、図8に示すように、Y軸方向に8画素おきに、エッジ点がY軸方向に連続するものであるか否かを検査する。そして、C=8であると判断すると(S667でYes)、8回に及ぶS650の処理で連続性のあるエッジ点として判定した計8地点の各座標データを、原稿右エッジデータとしてRAM80に記憶する(S670)。   By executing such processing, the CPU 70 checks whether the edge points are continuous in the Y-axis direction every 8 pixels in the Y-axis direction, as shown in FIG. If it is determined that C = 8 (Yes in S667), the coordinate data of a total of 8 points determined as continuous edge points in the process of S650 that has been repeated 8 times are stored in the RAM 80 as the document right edge data. (S670).

また、この処理を終えると、CPU70は、S680に移行して、副走査方向検査位置Yeが検査範囲を超えているか否か(Ye>Sであるか否か)を判断し、副走査方向検査位置Yeが検査範囲を超えていないと判断すると(S680でNo)、副走査方向検査位置Yeを64画素進んだ位置に更新して(S685)、S615に移行する。   When this process is completed, the CPU 70 proceeds to S680, determines whether or not the sub-scanning direction inspection position Ye exceeds the inspection range (whether or not Ye> S), and performs the sub-scanning direction inspection. If it is determined that the position Ye does not exceed the inspection range (No in S680), the sub-scanning direction inspection position Ye is updated to a position advanced by 64 pixels (S685), and the process proceeds to S615.

このようにして、CPU70は、連続するエッジ点を、8つを1組として、繰返し検出する。そして、副走査方向検出位置Yeが検査範囲を超えると(S620でYes又はS680でYes)、S690に移行し、S670で原稿右エッジデータとして記憶された座標データ群の中から、右エッジ(原稿の右端を表すエッジ点)として確度の低い座標データ群を削除して、原稿右エッジデータを確定する。   In this way, the CPU 70 repeatedly detects eight consecutive edge points as one set. When the sub-scanning direction detection position Ye exceeds the inspection range (Yes in S620 or Yes in S680), the process proceeds to S690, and the right edge (original document) is selected from the coordinate data group stored as original right edge data in S670. The edge data representing the right edge of the document) is deleted as a low-accuracy coordinate data group, and the document right edge data is determined.

具体的には、図9に示すように、原稿右エッジデータとして記憶された座標データ群の内、連続性のある座標データ群に対して原稿内側領域に大きくずれた位置にある、明白に連続性のない座標データ群を、原稿右エッジデータから除去し、原稿右エッジデータを確定する。その後、当該右エッジ検出処理を終了する。但し、S690の処理は原稿エッジの検出精度を高めるための処理であるので、S690の処理については、実行しないように、右エッジ検出処理を構成してもよい。   Specifically, as shown in FIG. 9, the coordinate data group stored as the document right edge data is clearly continuously located at a position greatly shifted to the document inner area with respect to the coordinate data group having continuity. The inconsistent coordinate data group is removed from the document right edge data, and the document right edge data is determined. Thereafter, the right edge detection process ends. However, since the process of S690 is a process for increasing the detection accuracy of the document edge, the right edge detection process may be configured not to execute the process of S690.

このようにして、右エッジ検出処理を終えると、CPU70は、S430に移行し、直前の右エッジ検出処理で右エッジの検出に失敗したか否かを判断する。具体的には、直前の右エッジ検出処理で原稿右エッジデータとして登録された座標データがない場合、右エッジの検出に失敗したと判断し、原稿右エッジデータとして登録された座標データがある場合には、右エッジの検出に成功したと判断する。   In this way, when the right edge detection process is completed, the CPU 70 proceeds to S430, and determines whether or not the right edge detection has failed in the immediately preceding right edge detection process. Specifically, when there is no coordinate data registered as document right edge data in the immediately preceding right edge detection process, it is determined that detection of the right edge has failed, and there is coordinate data registered as document right edge data It is determined that the right edge has been successfully detected.

但し、例外的に、原稿右エッジデータとして登録された座標データが読取可能領域R0の左端(Y=0)近傍にある場合には、左エッジ(原稿の左端を表すエッジ点)の座標データが間違って原稿右エッジデータとして登録されているとみなして、原稿右エッジデータとして登録された座標データがある場合でも、右エッジの検出に失敗したと判断してもよい。   However, exceptionally, when the coordinate data registered as the document right edge data is in the vicinity of the left end (Y = 0) of the readable region R0, the coordinate data of the left edge (the edge point representing the left end of the document) is It may be determined that the detection of the right edge has failed even when there is coordinate data registered as the right edge data of the document, assuming that it is erroneously registered as the right edge data of the document.

尚、右エッジの検出に失敗するケースとしては、原稿サイズが原稿台11aのサイズより大きく、原稿の右端が原稿台11aからはみ出しているケースなどを挙げることができる。   Examples of cases where the detection of the right edge fails include a case where the document size is larger than the size of the document table 11a and the right edge of the document protrudes from the document table 11a.

そして、右エッジの検出に失敗したと判断すると(S430でYes)、CPU70は、S431に移行し、原稿台11aに載置されている原稿のサイズ(縦幅及び横幅)が、原稿台11aに載置可能な最大サイズ(読取可能領域R0に対応するサイズ)であると推定すると共に(S431)、原稿の傾き角θがゼロ(θ=0)であると推定し(S433)、読取可能領域R0全体を、原稿の載置領域と推定する(S435)。そして、この処理を終えると、当該原稿推定処理を終了する。   If it is determined that the detection of the right edge has failed (Yes in S430), the CPU 70 proceeds to S431, and the size (vertical width and horizontal width) of the document placed on the document table 11a is set in the document table 11a. The maximum size that can be placed (size corresponding to the readable area R0) is estimated (S431), and the inclination angle θ of the document is estimated to be zero (θ = 0) (S433). The entire R0 is estimated as the document placement area (S435). Then, when this process is finished, the document estimation process is finished.

一方、S430において右エッジの検出に成功したと判断すると(S430でNo)、CPU70は、S437に移行し、右エッジ検出処理で確定された原稿右エッジデータが示す各点を直線近似して、原稿右エッジデータが示す点群の近似直線(以下、「右エッジ近似直線」と表現する。)を算出する。   On the other hand, if it is determined in S430 that the right edge has been successfully detected (No in S430), the CPU 70 proceeds to S437 and linearly approximates each point indicated by the document right edge data determined in the right edge detection process. An approximate straight line of the point group indicated by the original right edge data (hereinafter referred to as “right edge approximate straight line”) is calculated.

また、この処理を終えると、CPU70は、S440に移行して、右エッジ近似直線がY軸に対し所定角度より大きく傾いているか否かを判断する。本実施例では、具体的に、右エッジ近似直線がY軸に対し0.5度より大きく傾いているか否かを判断する。   When this process is finished, the CPU 70 proceeds to S440 and determines whether or not the right edge approximate straight line is inclined more than a predetermined angle with respect to the Y axis. In this embodiment, specifically, it is determined whether or not the right edge approximate straight line is inclined more than 0.5 degrees with respect to the Y axis.

そして、右エッジ近似直線の傾きが上記所定角度以下であると判断すると(S440でNo)、CPU70は、原稿がフレーム13aの内側左下角に突き当てられて原稿台11aに正しく載置されていると見なして、図6右図に示すように、右エッジ近似直線と原稿台11a下端縁(換言すると、フレーム13aの下辺(以下、「下フレーム」と表現する。)内側)との交点を、原稿の右下角位置であると推定する(S441)。   If it is determined that the slope of the right edge approximate straight line is equal to or smaller than the predetermined angle (No in S440), the CPU 70 is placed on the document table 11a by being abutted against the inner left lower corner of the frame 13a. 6, the intersection of the right edge approximate straight line and the lower edge of the document table 11a (in other words, the inner side of the lower side of the frame 13a (hereinafter referred to as the “lower frame”)) It is estimated that the position is the lower right corner position of the document (S441).

また、この処理を終えると、CPU70は、原稿の左下角位置が原稿台11aの左下角(換言すると、フレーム13aの内側左下角)の地点であるとみなして、原稿サイズを推定する。具体的には、原稿台11aに載置されている原稿が、長方形状の定型用紙であると仮定の下で、上記原稿の左下角位置からS441で推定した原稿の右下角位置までの長さを、原稿の短辺長さ(横幅)と推定し、この短辺長さの√2倍を、原稿の長辺長さ(縦幅)と推定する(S443)。尚、ここで原稿短辺長さの√2倍を、原稿の長辺長さとして推定しているのは、定型用紙の短辺長さ:長辺長さの比が1:√2となっているためである。   When this processing is completed, the CPU 70 estimates the document size by regarding the lower left corner position of the document as the position of the lower left corner of the document table 11a (in other words, the lower left corner inside the frame 13a). Specifically, the length from the lower left corner position of the original document to the lower right corner position of the original document estimated in S441 is assumed on the assumption that the original document placed on the document table 11a is a rectangular standard paper. Is estimated as the short side length (horizontal width) of the document, and √2 times the short side length is estimated as the long side length (vertical width) of the document (S443). Here, the reason why √2 times the original short side length is estimated as the long side length of the original is that the ratio of the short side length to the long side length of the standard paper is 1: √2. This is because.

そして、S443での処理を終えると、CPU70は、S445に移行し、原稿台11aに載置されている原稿の傾き角θをゼロであると推定し(換言すると、原稿が傾いていないと推定し)、上記左下角位置及び推定した右下角位置、及び、原稿サイズ、及び、傾き角θの関係から、原稿の左上角及び右上角が位置する座標を導出する。これにより、これら4つの角を結んでできる四角形の辺を原稿の外縁であると推定し、その外縁で囲まれる領域を、原稿の載置領域であると推定する(S447)。   When the processing in S443 is completed, the CPU 70 proceeds to S445 and estimates that the inclination angle θ of the document placed on the document table 11a is zero (in other words, estimates that the document is not inclined). From the relationship between the lower left corner position, the estimated lower right corner position, the document size, and the inclination angle θ, the coordinates at which the upper left corner and the upper right corner of the document are located are derived. As a result, a quadrangular side formed by connecting these four corners is estimated to be the outer edge of the document, and the area surrounded by the outer edge is estimated to be the document placement area (S447).

即ち、原稿の左下角がフレーム13a内側左下角に突き当てられ、この状態で上記推定したサイズの原稿の長辺がY軸に平行に配置され、原稿の短辺がX軸に平行に配置されている場合に、原稿によって読取ガラス11が被覆される領域を、原稿の載置領域であると推定する(S447)。そして、この処理を終えると、当該原稿推定処理を終了する。   That is, the lower left corner of the document is abutted against the lower left corner inside the frame 13a, and in this state, the long side of the document of the estimated size is arranged parallel to the Y axis, and the short side of the document is arranged parallel to the X axis. In this case, the area where the reading glass 11 is covered with the original is estimated to be the original placement area (S447). Then, when this process is finished, the document estimation process is finished.

一方、右エッジ近似直線がY軸に対し所定角度より大きく傾いていると判断すると(S440でYes)、CPU70は、S450に移行し、図10に示す左エッジ検出処理を実行する。図10は、CPU70が実行する左エッジ検出処理を表すフローチャートである。   On the other hand, when determining that the right edge approximate straight line is inclined more than a predetermined angle with respect to the Y axis (Yes in S440), the CPU 70 proceeds to S450 and executes the left edge detection process shown in FIG. FIG. 10 is a flowchart showing the left edge detection process executed by the CPU 70.

左エッジ検出処理を開始すると、CPU70は、S710にて、副走査方向検査位置Ye=0に設定し、S715にて、主走査方向検査位置Xeを、読取可能領域R0の左端X座標に設定する(Xe=0)。また、S715では、変数Cを値ゼロに初期化する(C=0)。   When the left edge detection process is started, the CPU 70 sets the sub-scanning direction inspection position Ye = 0 in S710, and sets the main scanning direction inspection position Xe to the left end X coordinate of the readable area R0 in S715. (Xe = 0). In S715, the variable C is initialized to zero (C = 0).

その後、CPU70は、副走査方向検査位置Yeが検査範囲を超えているか否か(即ち、Ye>Sであるか否か)を判断し(S720)、副走査方向検査位置Yeが検査範囲を超えていないと判断すると(S720でNo)、検査位置(X,Y)=(Xe,Ye)に対応する検査対象データの画素値を参照して、検査位置(Xe,Ye)がエッジ点であるか否かを判断する(S725)。   Thereafter, the CPU 70 determines whether or not the sub-scanning direction inspection position Ye exceeds the inspection range (that is, whether or not Ye> S) (S720), and the sub-scanning direction inspection position Ye exceeds the inspection range. If it is determined that it is not (No in S720), the inspection position (Xe, Ye) is an edge point with reference to the pixel value of the inspection target data corresponding to the inspection position (X, Y) = (Xe, Ye). Whether or not (S725).

そして、検査位置(Xe,Ye)がエッジ点ではないと判断すると(S725でNo)、S740に移行し、主走査方向検査位置Xeを、X軸プラス方向に1画素移動した地点に更新し(Xe←Xe+1)、更新した主走査方向検査位置Xeが、読取可能領域R0の右端を、はみ出ていないかどうかを判断する。具体的には、Xe>XMAXであるか否かを判断する(S743)。そして、主走査方向検査位置Xeが、読取可能領域R0の右端をはみ出ていないと判断すると(S743でNo)、S720に移行する。   If it is determined that the inspection position (Xe, Ye) is not an edge point (No in S725), the process proceeds to S740, and the main scanning direction inspection position Xe is updated to a point moved by one pixel in the X axis plus direction ( Xe ← Xe + 1), it is determined whether or not the updated main scanning direction inspection position Xe protrudes from the right end of the readable region R0. Specifically, it is determined whether Xe> XMAX (S743). If it is determined that the main scanning direction inspection position Xe does not protrude from the right end of the readable area R0 (No in S743), the process proceeds to S720.

一方、S743で主走査方向検査位置Xeが読取可能領域R0の右端をはみ出ていると判断すると(Xe>XMAXであると判断すると)、CPU70は、S747に移行し、主走査方向検査位置Xeを、読取可能領域R0の左端に設定すると共に(Xe=0)、副走査方向検査位置Yeを、Y軸方向に8画素進んだ位置に設定する(Ye←Ye+8)。その後、S720に移行する。   On the other hand, when it is determined in S743 that the main scanning direction inspection position Xe protrudes from the right end of the readable area R0 (when it is determined that Xe> XMAX), the CPU 70 proceeds to S747 and sets the main scanning direction inspection position Xe. The sub scanning direction inspection position Ye is set to a position advanced by 8 pixels in the Y-axis direction (Y ← Ye + 8) while being set to the left end of the readable region R0 (Xe = 0). Thereafter, the process proceeds to S720.

また、検査位置(Xe,Ye)がエッジ点であると判断すると(S725でYes)、CPU70は、S730に移行して、変数(X0,Y0)に、現在の検査位置(Xe,Ye)の座標値を設定する(X0←Xe,Y0←Ye)と共に、変数Y1を、値Y1=Y0+8に更新する(S733)。   If the CPU 70 determines that the inspection position (Xe, Ye) is an edge point (Yes in S725), the CPU 70 proceeds to S730 and sets the variable (X0, Y0) to the current inspection position (Xe, Ye). The coordinate value is set (X0 ← Xe, Y0 ← Ye), and the variable Y1 is updated to the value Y1 = Y0 + 8 (S733).

その後、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点の少なくとも一つが、エッジ点であるか否かを判断し(S737)、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点のいずれもがエッジ点でない場合には(S737でNo)、S740に移行する。   Thereafter, it is determined whether at least one of the point of coordinates (X0-1, Y1), the point of coordinates (X0, Y1), and the point of coordinates (X0 + 1, Y1) is an edge point (S737). If none of the point of (X0-1, Y1), the point of coordinates (X0, Y1), and the point of coordinates (X0 + 1, Y1) is an edge point (No in S737), the process proceeds to S740.

一方、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点の少なくとも一つがエッジ点であると判断した場合には(S737でYes)、S750に移行して、座標(X0,Y0)の地点が連続性のあるエッジ点であると判定し、この座標(X0,Y0)を、連続性のあるエッジ点の座標データとして、一時記憶する。   On the other hand, when it is determined that at least one of the point of coordinates (X0-1, Y1), the point of coordinates (X0, Y1), and the point of coordinates (X0 + 1, Y1) is an edge point (Yes in S737), Moving to S750, it is determined that the point of coordinates (X0, Y0) is a continuous edge point, and the coordinates (X0, Y0) are temporarily stored as coordinate data of the continuous edge point. .

また、この処理を終えると、CPU70は、S760に移行し、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点及び座標(X0+1,Y1)の地点の内、エッジ点である地点の一つを、予め定められた優先度に従って選択する。   When this process is finished, the CPU 70 proceeds to S760, where the coordinates (X0-1, Y1), the coordinates (X0, Y1), and the coordinates (X0 + 1, Y1) are the edge points. One of the points is selected according to a predetermined priority.

具体的に、左エッジ検出処理においては、読取可能領域R0左端側に近い座標ほど高い優先度が設定されているものとする。即ち、読取可能領域R0左端側に近い座標(X0−1,Y1)の地点が優先度「大」に設定され、座標(X0,Y1)の地点が優先度「中」に設定され、座標(X0+1,Y1)の地点が優先度「小」に設定されている。このように優先度が設定されているのは、原稿の左端より左側においては、原稿台11aに何も存在せず、エッジ点は存在しないはずであり、読取可能領域R0左端側に近いエッジ点であるほど、そのエッジ点が原稿の左端に対応するエッジ点である可能性が高いためである。   Specifically, in the left edge detection process, it is assumed that a higher priority is set for coordinates closer to the left end side of the readable area R0. That is, the point of the coordinates (X0-1, Y1) close to the left end side of the readable area R0 is set to the priority “large”, the point of the coordinates (X0, Y1) is set to the priority “medium”, and the coordinates ( The point of X0 + 1, Y1) is set to the priority “small”. The priority is set in this way because there is nothing on the document table 11a on the left side of the left edge of the document, and there should be no edge point, and the edge point close to the left edge side of the readable area R0. This is because there is a high possibility that the edge point is an edge point corresponding to the left end of the document.

従って、S760では、この優先度に従って、座標(X0−1,Y1)の地点、座標(X0,Y1)の地点、及び、座標(X0+1,Y1)の地点の内、エッジ点である地点であって優先度の最も高い地点を選択する。そして、変数X0を、選択した地点のX座標に更新し、変数Y0を、選択した地点のY座標に更新する。その後、変数Cを1加算した値に更新する(S763)。   Therefore, in S760, according to the priority, the point of the coordinate (X0-1, Y1), the point of the coordinate (X0, Y1), and the point of the coordinate (X0 + 1, Y1) are points that are edge points. To select the point with the highest priority. Then, the variable X0 is updated to the X coordinate of the selected point, and the variable Y0 is updated to the Y coordinate of the selected point. Thereafter, the variable C is updated to a value obtained by adding 1 (S763).

また、この処理を終えると、CPU70は、更新後の変数Cの値がC=8であるか否かを判断し、C=8でないと判断すると(S767でNo)、S733に移行して、変数Y1を、Y1=Y0+8に更新する。その後、S737以降の処理を実行する。   When this process is finished, the CPU 70 determines whether or not the value of the updated variable C is C = 8. If the CPU 70 determines that C = 8 is not satisfied (No in S767), the process proceeds to S733. The variable Y1 is updated to Y1 = Y0 + 8. Thereafter, the processing after S737 is executed.

このような処理手順により、CPU70は、右エッジ検出処理と同様(図8参照)、Y軸方向に8画素おきに、エッジ点がY軸方向に連続するものであるか否かを検査する。そして、C=8であると判断すると(S767でYes)、S750で連続性のあるエッジ点として判定した計8地点の各座標データを、原稿左エッジデータとしてRAM80に記憶する(S770)。   With such a processing procedure, the CPU 70 checks whether or not the edge points are continuous in the Y-axis direction every eight pixels in the Y-axis direction, as in the right edge detection process (see FIG. 8). If it is determined that C = 8 (Yes in S767), the coordinate data of a total of eight points determined as continuous edge points in S750 are stored in the RAM 80 as document left edge data (S770).

また、この処理を終えると、CPU70は、S780に移行して、副走査方向検査位置Yeが検査範囲を超えているか否か(Ye>Sであるか否か)を判断し、副走査方向検査位置Yeが検査範囲を超えていないと判断すると(S780でNo)、副走査方向検査位置Yeを64画素進んだ地点に更新して(S785)、S715に移行する。   When this process is finished, the CPU 70 proceeds to S780, determines whether or not the sub-scanning direction inspection position Ye exceeds the inspection range (whether or not Ye> S), and performs the sub-scanning direction inspection. If it is determined that the position Ye does not exceed the inspection range (No in S780), the sub-scanning direction inspection position Ye is updated to a point advanced by 64 pixels (S785), and the process proceeds to S715.

このようにして、CPU70は、連続するエッジ点を、8つずつ、繰返し検出する。そして、副走査方向検出位置Yeが検査範囲を超えると(S720でYes又はS780でYes)、S790に移行し、S770で原稿左エッジデータとして記憶された座標データ群の中から、左エッジ(原稿の左端を表すエッジ点)として確度の低い座標データ群を削除して、原稿左エッジデータを確定する。   In this way, the CPU 70 repeatedly detects eight consecutive edge points. When the sub-scanning direction detection position Ye exceeds the inspection range (Yes in S720 or Yes in S780), the process proceeds to S790, and the left edge (original document) is selected from the coordinate data group stored as the original left edge data in S770. The edge data representing the left edge of the document) is deleted as a low-accuracy coordinate data group, and the document left edge data is determined.

具体的には、S690での処理と同様、原稿左エッジデータとして記憶された座標データ群の内、連続性のある座標データ群に対して原稿内側領域に大きくずれた位置にある、明白に連続性のない座標データ群を、原稿左エッジデータから除去し、原稿左エッジデータを確定する。その後、当該左エッジ検出処理を終了する。但し、S790の処理については、実行しないように、左エッジ検出処理を構成してもよい。   Specifically, in the same manner as the processing in S690, the coordinate data group stored as the document left edge data is clearly continuously located at a position greatly deviated to the inner area of the document with respect to the coordinate data group having continuity. The inconsistent coordinate data group is removed from the document left edge data, and the document left edge data is determined. Thereafter, the left edge detection process ends. However, the left edge detection process may be configured not to execute the process of S790.

また、このようにして、左エッジ検出処理を終えると、CPU70は、S455に移行し、左エッジ検出処理で確定された原稿左エッジデータが示す各点を直線近似して、原稿左エッジデータが示す点群の近似直線(以下、「左エッジ近似直線」という。)を算出する。その後、S460に移行する。   In addition, when the left edge detection process is completed in this way, the CPU 70 proceeds to S455, linearly approximates each point indicated by the document left edge data determined by the left edge detection process, and the document left edge data is obtained. An approximate straight line (hereinafter referred to as “left edge approximate straight line”) of the point group shown is calculated. Thereafter, the process proceeds to S460.

但し、直前の左エッジ検出処理で原稿左エッジデータとして登録された座標データがない場合には、左エッジの検出に失敗したと判断して、左エッジ近似直線を算出することなく、S460に移行するものとする。この他、原稿左エッジデータとして登録されている座標データの全て又は一部が原稿右エッジデータにも登録されている場合には、右エッジ(原稿の右端を表すエッジ点)の座標データが間違って原稿左エッジデータとして登録されているとみなして、原稿左エッジデータとして登録された座標データがある場合でも、左エッジの検出に失敗したと判断し、左エッジ近似直線を算出することなく、S460に移行するようにしてもよい。   However, if there is no coordinate data registered as document left edge data in the immediately preceding left edge detection process, it is determined that detection of the left edge has failed, and the process proceeds to S460 without calculating the left edge approximate straight line. It shall be. In addition, when all or part of the coordinate data registered as the document left edge data is also registered in the document right edge data, the coordinate data of the right edge (the edge point representing the right edge of the document) is incorrect. Even if there is coordinate data registered as document left edge data, it is determined that detection of the left edge has failed, and without calculating the left edge approximate straight line, You may make it transfer to S460.

また、S460に移行すると、CPU70は、図11に示す下エッジ検出処理を実行する。図11は、CPU70が実行する下エッジ検出処理を表すフローチャートである。
下エッジ検出処理を開始すると、CPU70は、S810にて、主走査方向検査位置Xeを、読取可能領域R0の左端X座標に設定し(Xe=0)、S815にて、副走査方向検査位置Yeを、読取可能領域R0の下端Y座標に設定する(Ye=0)。また、S815では、変数Cを値ゼロに初期化する(C=0)。
In S460, the CPU 70 executes the lower edge detection process shown in FIG. FIG. 11 is a flowchart showing the lower edge detection process executed by the CPU 70.
When the lower edge detection process is started, the CPU 70 sets the main scanning direction inspection position Xe to the left end X coordinate of the readable area R0 (Xe = 0) in S810, and the sub scanning direction inspection position Ye in S815. Is set to the lower end Y coordinate of the readable area R0 (Ye = 0). In S815, the variable C is initialized to zero (C = 0).

また、この処理を終えると、CPU70は、主走査方向検査位置Xeが読取可能領域R0の右端を超えているか否か(即ち、Xe>XMAXであるか否か)を判断し(S820)、主走査方向検査位置Xeが読取可能領域R0の右端を超えていないと判断すると(S820でNo)、検査位置(X,Y)=(Xe,Ye)に対応する検査対象データの画素値を参照し、検査位置(Xe,Ye)がエッジ点であるか否かを判断する(S825)。   When this process is finished, the CPU 70 determines whether or not the main scanning direction inspection position Xe exceeds the right end of the readable area R0 (that is, whether Xe> XMAX) (S820). If it is determined that the scanning direction inspection position Xe does not exceed the right end of the readable region R0 (No in S820), the pixel value of the inspection target data corresponding to the inspection position (X, Y) = (Xe, Ye) is referred to. Then, it is determined whether or not the inspection position (Xe, Ye) is an edge point (S825).

そして、検査位置(Xe,Ye)がエッジ点ではないと判断すると(S825でNo)、S840に移行して、副走査方向検査位置Yeを、Y軸プラス方向に1画素移動した位置に更新し(Ye←Ye+1)、更新後の副走査方向検査位置Yeが検査範囲を超えているか否か(Ye>Sであるか否か)を判断する(S843)。   If it is determined that the inspection position (Xe, Ye) is not an edge point (No in S825), the process proceeds to S840, and the sub-scanning inspection position Ye is updated to a position moved by one pixel in the Y-axis plus direction. (Ye ← Ye + 1), it is determined whether or not the updated sub-scanning direction inspection position Ye exceeds the inspection range (whether or not Ye> S) (S843).

そして、副走査方向検査位置Yeが検査範囲を超えていないと判断すると(S843でNo)、S820に移行する。
一方、S843で副走査方向検査位置Yeが検査範囲を超えていると判断すると(Ye>Sであると判断すると)、CPU70は、S847に移行し、副走査方向検査位置Yeを、読取可能領域R0の下端に設定すると共に(Ye=0)、主走査方向検査位置Xeを、X軸方向に8画素進んだ位置に設定する(Xe←Xe+8)。その後、S820に移行する。
If it is determined that the sub-scanning direction inspection position Ye does not exceed the inspection range (No in S843), the process proceeds to S820.
On the other hand, when it is determined in S843 that the sub-scanning direction inspection position Ye exceeds the inspection range (when it is determined that Ye> S), the CPU 70 proceeds to S847, and the sub-scanning direction inspection position Ye is set in the readable area. While setting at the lower end of R0 (Ye = 0), the main scanning direction inspection position Xe is set to a position advanced by 8 pixels in the X-axis direction (Xe ← Xe + 8). Thereafter, the process proceeds to S820.

この他、CPU70は、S825において、検査位置(Xe,Ye)がエッジ点であると判断すると(S825でYes)、S830に移行し、変数(X0,Y0)に、現在の検査位置(Xe,Ye)の座標値を、設定する(X0←Xe,Y0←Ye)。また、変数X1を、値X1=X0+8に更新する(S833)。   In addition, when the CPU 70 determines in S825 that the inspection position (Xe, Ye) is an edge point (Yes in S825), the CPU 70 proceeds to S830 and sets the current inspection position (Xe, Y0) in the variable (X0, Y0). The coordinate value of (Ye) is set (X0 ← Xe, Y0 ← Ye). Also, the variable X1 is updated to the value X1 = X0 + 8 (S833).

その後、CPU70は、座標(X1,Y0−1)の地点、座標(X1,Y0)の地点及び座標(X1,Y0+1)の地点の少なくとも一つが、エッジ点であるか否かを判断し(S837)、座標(X1,Y0−1)の地点、座標(X1,Y0)の地点及び座標(X1,Y0+1)の地点のいずれもがエッジ点でない場合には(S837でNo)、S840に移行する。   Thereafter, the CPU 70 determines whether or not at least one of the coordinates (X1, Y0-1), the coordinates (X1, Y0), and the coordinates (X1, Y0 + 1) is an edge point (S837). ), If any of the point of coordinates (X1, Y0-1), the point of coordinates (X1, Y0), and the point of coordinates (X1, Y0 + 1) is not an edge point (No in S837), the process proceeds to S840. .

一方、座標(X1,Y0−1)の地点、座標(X1,Y0)の地点及び座標(X1,Y0+1)の地点の少なくとも一つがエッジ点であると判断すると(S837でYes)、CPU70は、S850に移行して、座標(X0,Y0)の地点が連続性のあるエッジ点であると判定し、この座標(X0,Y0)を、連続性のあるエッジ点の座標データとして、一時記憶する。   On the other hand, if it is determined that at least one of the coordinates (X1, Y0-1), the coordinates (X1, Y0), and the coordinates (X1, Y0 + 1) is an edge point (Yes in S837), the CPU 70 Moving to S850, it is determined that the point of coordinates (X0, Y0) is a continuous edge point, and this coordinate (X0, Y0) is temporarily stored as coordinate data of a continuous edge point. .

また、この処理を終えると、CPU70は、S860に移行し、座標(X1,Y0−1)の地点、座標(X1,Y0)の地点及び座標(X1,Y0+1)の地点の内、エッジ点である地点の一つを、予め定められた優先度に従って選択する。   When this process is finished, the CPU 70 proceeds to S860, where the coordinates (X1, Y0-1), the coordinates (X1, Y0), and the coordinates (X1, Y0 + 1) are the edge points. One of the points is selected according to a predetermined priority.

具体的に、下エッジ検出処理においては、読取可能領域R0下端側に近い座標ほど高い優先度が設定されている。即ち、読取可能領域R0下端側に近い座標(X1,Y0−1)の地点が優先度「大」に設定され、座標(X1,Y0)の地点が優先度「中」に設定され、座標(X1,Y0+1)の地点が優先度「小」に設定されている。このように優先度が設定されているのは、原稿の下端より下側においては、原稿台11aに何も存在せず、エッジ点は存在しないはずであり、読取可能領域R0下端側に近いエッジ点であるほど、そのエッジ点が原稿の下端に対応するエッジ点である可能性が高いためである。   Specifically, in the lower edge detection process, a higher priority is set for coordinates closer to the lower end side of the readable area R0. That is, the point of the coordinates (X1, Y0-1) close to the lower end side of the readable area R0 is set to the priority “large”, the point of the coordinates (X1, Y0) is set to the priority “medium”, and the coordinates ( The point of (X1, Y0 + 1) is set to the priority “small”. The priority is set in this way because there is nothing on the document table 11a below the lower end of the original, there should be no edge point, and the edge close to the lower end of the readable area R0. This is because the point is more likely to be the edge point corresponding to the lower end of the document.

従って、S860では、この優先度に従って、座標(X1,Y0−1)の地点、座標(X1,Y0)の地点及び座標(X1,Y0+1)の地点の内、エッジ点である地点であって優先度の最も高い地点を選択する。そして、変数X0を、選択した地点のX座標に更新し、変数Y0を、選択した地点のY座標に更新する。その後、変数Cを1加算した値に更新する(S863)。   Therefore, in S860, according to this priority, the point that is the edge point among the point of the coordinate (X1, Y0-1), the point of the coordinate (X1, Y0), and the point of the coordinate (X1, Y0 + 1) is preferred. Select the point with the highest degree. Then, the variable X0 is updated to the X coordinate of the selected point, and the variable Y0 is updated to the Y coordinate of the selected point. Thereafter, the variable C is updated to a value obtained by adding 1 (S863).

また、この処理を終えると、CPU70は、更新後の変数Cの値がC=8であるか否かを判断し(S867)、C=8でないと判断すると(S867でNo)、S833に移行して、変数X1を、X1=X0+8に更新する。その後、S837以降の処理を実行する。   When this process is finished, the CPU 70 determines whether or not the value of the updated variable C is C = 8 (S867). If it is determined that C = 8 is not satisfied (No in S867), the process proceeds to S833. Then, the variable X1 is updated to X1 = X0 + 8. Thereafter, the processing after S837 is executed.

このような処理を実行することにより、CPU70は、X軸方向に8画素おきに、エッジ点がX軸方向に連続するものであるか否かを検査する。そして、C=8であると判断すると(S867でYes)、S850で連続性のあるエッジ点として判定した計8地点の各座標データを、原稿下エッジデータとしてRAM80に記憶する(S870)。   By executing such processing, the CPU 70 checks whether the edge points are continuous in the X-axis direction every 8 pixels in the X-axis direction. If it is determined that C = 8 (Yes in S867), the coordinate data of a total of eight points determined as continuous edge points in S850 are stored in the RAM 80 as document lower edge data (S870).

また、この処理を終えると、CPU70は、S880に移行して、主走査方向検査位置Xeが読取可能領域R0右端を超えているか否か(Xe>XMAXであるか否か)を判断し、主走査方向検査位置Xeが読取可能領域R0右端を超えていないと判断すると(S880でNo)、主走査方向検査位置Xeを64画素進んだ地点に更新して(S885)、S815に移行する。   When this process is finished, the CPU 70 proceeds to S880 to determine whether the main scanning direction inspection position Xe exceeds the right end of the readable area R0 (whether Xe> XMAX). If it is determined that the scanning direction inspection position Xe does not exceed the right end of the readable region R0 (No in S880), the main scanning direction inspection position Xe is updated to a point advanced by 64 pixels (S885), and the process proceeds to S815.

このようにして、CPU70は、連続するエッジ点を、8つずつ、繰返し検出する。そして、主走査方向検出位置Xeが読取可能領域R0右端を超えると(S820でYes又はS880でYes)、S890に移行し、S870で原稿下エッジデータとして記憶された座標データ群の中から、下エッジ(原稿の下端を表すエッジ点)として確度の低い座標データ群を削除して、原稿下エッジデータを確定する。   In this way, the CPU 70 repeatedly detects eight consecutive edge points. When the main scanning direction detection position Xe exceeds the right end of the readable area R0 (Yes in S820 or Yes in S880), the process proceeds to S890, and the coordinate data group stored as the document lower edge data in S870 is The coordinate data group with low accuracy is deleted as an edge (edge point representing the lower end of the document), and the document lower edge data is determined.

具体的には、S690での処理と同様、原稿下エッジデータとして記憶された座標データ群の内、連続性のある座標データ群に対して原稿内側領域に大きくずれた位置にある、明白に連続性のない座標データ群を、原稿下エッジデータから除去し、原稿下エッジデータを確定する。その後、当該下エッジ検出処理を終了する。但し、S890の処理については、実行しないように、下エッジ検出処理を構成してもよい。   Specifically, like the processing in S690, the coordinate data group stored as the document lower edge data is clearly continuously located at a position that is greatly shifted to the inner area of the document with respect to the coordinate data group having continuity. The inferior coordinate data group is removed from the document lower edge data to determine the document lower edge data. Thereafter, the lower edge detection process ends. However, the lower edge detection process may be configured not to execute the process of S890.

また、このようにして、下エッジ検出処理を終えると、CPU70は、S465に移行し、下エッジ検出処理で確定された原稿下エッジデータが示す各点を直線近似して、原稿下エッジデータが示す点群の近似直線(以下、「下エッジ近似直線」という。)を算出する。その後、S470に移行する。但し、直前の下エッジ検出処理で原稿下エッジデータとして登録された座標データがない場合には、下エッジの検出に失敗したと判断して、下エッジ近似直線を算出することなく、S470に移行するものとする。   In addition, when the lower edge detection process is completed in this way, the CPU 70 proceeds to S465, linearly approximates each point indicated by the document lower edge data determined by the lower edge detection process, and the document lower edge data is obtained. An approximate straight line (hereinafter referred to as a “lower edge approximate straight line”) of the indicated point group is calculated. Thereafter, the process proceeds to S470. However, if there is no coordinate data registered as the document lower edge data in the immediately preceding lower edge detection process, it is determined that the lower edge detection has failed, and the process proceeds to S470 without calculating the lower edge approximate straight line. It shall be.

また、S470に移行すると、CPU70は、右エッジ近似直線Y=A・X+Bの傾きAが負(A<0)であるか否かを判断する。そして、右エッジ近似直線の傾きAが負であると判断すると(S470でYes)、図12に示す第一角位置推定処理を実行し(S480)、右エッジ近似直線の傾きAが負ではないと判断すると(S470でNo)、図15に示す第二角位置推定処理を実行する(S485)。   In S470, the CPU 70 determines whether or not the slope A of the right edge approximate straight line Y = A · X + B is negative (A <0). If it is determined that the slope A of the right edge approximate line is negative (Yes in S470), the first angle position estimation process shown in FIG. 12 is executed (S480), and the slope A of the right edge approximate line is not negative. (No in S470), the second angular position estimation process shown in FIG. 15 is executed (S485).

図12は、CPU70が実行する第一角位置推定処理を表すフローチャートである。S480において、第一角位置推定処理を開始すると、CPU70は、S420、S450及びS460において右エッジ、左エッジ及び下エッジの全てが正常に検出されたか否かを判断する(S910)。   FIG. 12 is a flowchart showing a first angular position estimation process executed by the CPU 70. When the first angular position estimation process is started in S480, the CPU 70 determines whether or not all of the right edge, the left edge, and the lower edge are normally detected in S420, S450, and S460 (S910).

具体的に、S910では、右エッジ、左エッジ及び下エッジのいずれか一つでも、その検出に失敗している場合、Noと判断する。また、右エッジ、左エッジ及び下エッジの全てについて検出に成功している場合でも、直交関係にあるはずの右エッジ近似直線と下エッジ近似直線とが直交関係にない場合には、右エッジ、左エッジ及び下エッジの全てが正常に検出されていないと判断する。   Specifically, in S910, if any one of the right edge, the left edge, and the lower edge fails to be detected, it is determined as No. Further, even when the detection is successful for all of the right edge, the left edge, and the lower edge, if the right edge approximate straight line and the lower edge approximate straight line that should be in an orthogonal relationship are not in an orthogonal relationship, the right edge, It is determined that all of the left edge and the lower edge are not normally detected.

同様に、平行関係にあるはずの右エッジ近似直線と左エッジ近似直線とが平行関係にない場合にも、右エッジ、左エッジ及び下エッジの全てが正常に検出されていないと判断する。そして、上記以外の場合には、S910でYesと判断する。   Similarly, when the right edge approximate straight line and the left edge approximate straight line that should be in parallel relation are not in parallel relation, it is determined that all of the right edge, left edge, and lower edge are not normally detected. In cases other than the above, it is determined Yes in S910.

このような判断手法にてS910の処理を実行し、S910にて、右エッジ、左エッジ及び下エッジの全てが正常に検出されていると判断すると(S910でYes)、CPU70は、原稿の左下角位置を、左エッジ近似直線と下エッジ近似直線との交点であると推定して、その座標値を算出し(S920)、更に、原稿の右下角位置を、右エッジ近似直線と下エッジ近似直線との交点であると推定して、その座標値を算出する(S930)。その後、当該第一角位置推定処理を終了する。尚、図13は、S910でYesと判断したときの原稿左下角位置Ka及び原稿右下角位置Kbの推定方法を示した説明図である。図中、白丸がエッジ点を表し、黒丸が角位置Ka,Kbを表す。   When the process of S910 is executed by such a determination method and it is determined in S910 that all of the right edge, the left edge, and the lower edge are normally detected (Yes in S910), the CPU 70 determines the lower left side of the document. The corner position is estimated to be the intersection of the left edge approximate line and the lower edge approximate line, and its coordinate value is calculated (S920). Further, the lower right corner position of the document is determined as the right edge approximate line and the lower edge approximation. It is estimated that the intersection is with the straight line, and the coordinate value is calculated (S930). Thereafter, the first angular position estimation process ends. FIG. 13 is an explanatory diagram showing an estimation method of the document lower left corner position Ka and the document lower right corner position Kb when it is determined Yes in S910. In the figure, white circles represent edge points, and black circles represent the corner positions Ka and Kb.

一方、S910にて、右エッジ、左エッジ及び下エッジの全てが正常に検出されていないと判断すると(S910でNo)、CPU70は、S940に移行して、右エッジ及び左エッジの全てが正常に検出されているか否かを判断する。   On the other hand, if it is determined in S910 that all of the right edge, the left edge, and the lower edge are not normally detected (No in S910), the CPU 70 proceeds to S940 and all of the right edge and the left edge are normal. It is determined whether or not it has been detected.

具体的に、S940では、右エッジ又は左エッジの検出に失敗している場合、Noと判断する。また、右エッジ及び左エッジの検出に成功している場合でも、平行関係にあるはずの右エッジ近似直線と左エッジ近似直線とが平行関係にない場合には、右エッジ及び左エッジの全てが正常に検出されていないと判断する。そして、上記以外の場合には、S940でYesと判断する。   Specifically, in S940, if the detection of the right edge or the left edge fails, it is determined No. Even if the right edge and the left edge are successfully detected, if the right edge approximate straight line and the left edge approximate straight line that should be in parallel relation are not in parallel relation, all of the right edge and left edge are Judge that it is not detected normally. In cases other than the above, it is determined Yes in S940.

このような判断手法にてS940の処理を実行し、S940にて、右エッジ及び左エッジの全てが正常に検出されていると判断すると(S940でYes)、CPU70は、S950に移行して、原稿の左下角位置を、左エッジ近似直線と原稿台11aの下端縁(即ち、下フレーム内側)との交点であると推定して、その座標値を算出すると共に、原稿の右下角位置を、右エッジ近似直線に垂直な直線であって推定した左下角位置を通る直線と、右エッジ近似直線との交点であると推定して、その座標値を算出する(S960)。   When the processing of S940 is executed by such a determination method, and it is determined that all of the right edge and the left edge are normally detected in S940 (Yes in S940), the CPU 70 proceeds to S950, The lower left corner position of the document is estimated to be the intersection of the left edge approximate straight line and the lower edge of the document table 11a (that is, the lower frame inner side), its coordinate value is calculated, and the lower right corner position of the document is A straight line that is perpendicular to the right edge approximate straight line and passes through the estimated lower left corner position is estimated to be an intersection of the right edge approximate straight line, and its coordinate value is calculated (S960).

尚、図14(a)は、S940でYesと判断したときの原稿左下角位置Ka及び原稿右下角位置Kbの推定方法を示した説明図である。S960で、原稿の左下角位置を、左エッジ近似直線と原稿台11aの下端縁(即ち、下フレーム内側)との交点であると推定するのは、原稿が左側に傾いている場合には、原稿の左下角が、原稿台11aの下端縁と下フレームの内側との境界にある段差に、突き当たっている可能性が高いためである。このような理由から、本実施例では、下エッジを正常検出することができなかったとき、原稿の左下角が、原稿台11aの下端縁と下フレームの内側との境界にある段差に、突き当たっていると仮定して、原稿の左下角位置を推定する。   FIG. 14A is an explanatory diagram showing a method for estimating the document lower left corner position Ka and the document lower right corner position Kb when it is determined Yes in S940. In S960, the lower left corner position of the document is estimated to be the intersection of the left edge approximate straight line and the lower edge of the document table 11a (that is, the lower frame inner side) when the document is inclined to the left side. This is because there is a high possibility that the lower left corner of the document hits a step at the boundary between the lower edge of the document table 11a and the inside of the lower frame. For this reason, in this embodiment, when the lower edge cannot be detected normally, the lower left corner of the document hits the step at the boundary between the lower edge of the document table 11a and the inner side of the lower frame. The lower left corner position of the document is estimated.

また、このようにしてS960での処理を終えると、CPU70は、当該第一角位置推定処理を終了する。
一方、S940にて、右エッジ及び左エッジの全てが正常に検出されていないと判断すると(S940でNo)、CPU70は、S970に移行して、原稿右エッジデータが示すエッジ点群の内、原稿台11a上で最も右下寄りのエッジ点に対応する右エッジ近似直線上の点を、原稿の右下角位置であると推定し、その座標値を算出する。尚、S970では、原稿右エッジデータが示すエッジ点であってエッジ点から右エッジ近似直線へ伸ばした右エッジ近似直線に直交する直線が右エッジ近似直線と交わる交点が、右エッジ近似直線上において最も右側にあるエッジ点の当該交点を、「最も右下寄りのエッジ点に対応する右エッジ近似直線上の点」と取り扱えばよい。
In addition, when the process in S960 is finished in this way, the CPU 70 ends the first angular position estimation process.
On the other hand, if it is determined in S940 that all of the right edge and the left edge are not normally detected (No in S940), the CPU 70 proceeds to S970, and among the edge point groups indicated by the document right edge data, A point on the right edge approximate straight line corresponding to the edge point closest to the lower right on the document table 11a is estimated as the lower right corner position of the document, and the coordinate value is calculated. In S970, an intersection point, which is an edge point indicated by the document right edge data and is orthogonal to the right edge approximate line that extends from the edge point to the right edge approximate line, intersects the right edge approximate line on the right edge approximate line. The intersection of the rightmost edge points may be handled as “a point on the right edge approximate straight line corresponding to the edge point closest to the lower right”.

また、S970での処理を終えると、CPU70は、原稿の左下角位置を、上記推定した右下角位置を通る直線であって右エッジ近似直線に垂直な直線と、原稿台11a端縁(フレーム内側)との交点であると推定して、その座標値を算出する。その後、当該第一角位置推定処理を終了する。   When the processing in S970 is completed, the CPU 70 determines the position of the lower left corner of the document as a straight line that passes through the estimated lower right corner position and is perpendicular to the right edge approximate straight line, and the edge of the document table 11a (the frame inner side). ) And the coordinate value is calculated. Thereafter, the first angular position estimation process ends.

尚、図14(b)は、S940でNoと判断したときの原稿左下角位置Ka及び原稿右下角位置Kbの推定方法を示した説明図である。S970,S980で、原稿右エッジデータを用いて原稿の左下角位置及び右下角位置を推定するのは、原稿の突き当て位置が、フレーム13aの内側左下角に設定され、原稿台11aの端縁近傍では読取不可能な領域がある関係上、右エッジ、左エッジ及び下エッジの中では、右エッジを一番正しく検出することができ、原稿右エッジデータ、原稿左エッジデータ、原稿下エッジデータの中で一番信用できる確度の高いデータが、原稿右エッジデータであるためである。本実施例では、このような理由から、原稿右エッジデータを一番信用して、この原稿右エッジデータ及び右エッジ近似直線を拠所に、原稿サイズ及び原稿の傾き角θを推定する。   FIG. 14B is an explanatory view showing a method for estimating the document lower left corner position Ka and the document lower right corner position Kb when it is determined No in S940. In S970 and S980, the lower left corner position and the lower right corner position of the document are estimated using the document right edge data. The document abutment position is set to the inner lower left corner of the frame 13a, and the edge of the document table 11a. Because there is an unreadable area in the vicinity, the right edge can be detected most correctly among the right edge, left edge, and lower edge. Document right edge data, document left edge data, document lower edge data This is because the most reliable data with the highest reliability is the document right edge data. In this embodiment, for this reason, the document right edge data is most trusted, and the document size and the document inclination angle θ are estimated based on the document right edge data and the right edge approximate straight line.

続いて、CPU70が、S485で実行する第二角位置推定処理について説明する。図15は、CPU70が実行する第二角位置推定処理を表すフローチャートである。第二角位置推定処理を開始すると、CPU70は、まず、S420及びS460において右エッジ及び下エッジの全てが正常に検出されたか否かを判断する(S1010)。   Subsequently, the second angular position estimation process executed by the CPU 70 in S485 will be described. FIG. 15 is a flowchart showing the second corner position estimation process executed by the CPU 70. When the second corner position estimation process is started, the CPU 70 first determines whether all of the right edge and the lower edge are normally detected in S420 and S460 (S1010).

具体的に、S1010では、右エッジ又は下エッジの検出に失敗している場合、Noと判断する。また、右エッジ及び下エッジの全てについて検出に成功している場合でも、直交関係にあるはずの右エッジ近似直線と下エッジ近似直線が直交関係にない場合には、右エッジ及び下エッジの全てが正常に検出されていないと判断する。そして、上記以外の場合には、S1010でYesと判断する。   Specifically, in S1010, if the detection of the right edge or the lower edge has failed, it is determined No. In addition, even when the right edge and the lower edge are all successfully detected, if the right edge approximate straight line and the lower edge approximate straight line that should be in an orthogonal relationship are not in an orthogonal relationship, all of the right edge and the lower edge are detected. Is determined not to be detected normally. In cases other than the above, “Yes” is determined in S1010.

尚、第二角位置推定処理では、左エッジの検出結果を使用せずに、原稿の左下角位置及び右下角位置を推定するが、このような手法で原稿の角位置を推定する理由は、原稿が右側に傾いている場合には、図16(a)に示すように原稿右端がプレスキャン領域に十分な長さ納まっている可能性が高く、原稿右エッジデータの確度が非常に高い一方で、原稿左端についてはプレスキャン領域に十分な長さ納まっていない可能性が高く、原稿左エッジデータの確度が、原稿右エッジデータや原稿下エッジデータと比較して低いためである。   In the second corner position estimation process, the lower left corner position and the lower right corner position of the document are estimated without using the detection result of the left edge. The reason for estimating the corner position of the document by such a method is as follows. When the document is inclined to the right side, it is highly possible that the right edge of the document is sufficiently long in the pre-scan area as shown in FIG. 16A, and the accuracy of the document right edge data is very high. This is because there is a high possibility that the document left edge is not sufficiently long in the pre-scan area, and the accuracy of the document left edge data is lower than the document right edge data and the document lower edge data.

このような判断手法にてS1010の処理を実行し、S1010にて、右エッジ及び下エッジの全てが正常に検出されていると判断すると(S1010でYes)、CPU70は、原稿の左下角位置を、下エッジ近似直線と原稿台11aの左端縁(左フレーム内側)との交点であると推定して、その座標値を算出し(S1020)、更に、原稿の右下角位置を、右エッジ近似直線と下エッジ近似直線との交点であると推定して、その座標値を算出する(S1030)。その後、当該第二角位置推定処理を終了する。尚、図16(a)は、S1010でYesと判断したときの原稿左下角位置Ka及び原稿右下角位置Kbの推定方法を示した説明図である。   When the processing of S1010 is executed by such a determination method, and it is determined in S1010 that all of the right edge and the lower edge are detected normally (Yes in S1010), the CPU 70 determines the position of the lower left corner of the document. The lower edge approximate straight line is estimated to be the intersection of the left edge of the document table 11a (the left frame inner side), and its coordinate value is calculated (S1020). Further, the lower right corner position of the original is determined as the right edge approximate straight line. And the coordinate value is calculated (S1030). Thereafter, the second angular position estimation process ends. FIG. 16A is an explanatory diagram showing a method of estimating the document lower left corner position Ka and the document lower right corner position Kb when it is determined Yes in S1010.

一方、S1010にて、右エッジ及び下エッジの全てが正常に検出されていないと判断すると(S1010でNo)、CPU70は、S1040に移行して、原稿の右下角位置を、右エッジ近似直線と原稿台11aの下端縁(下フレーム内側)との交点であると推定し、その座標値を算出すると共に、原稿の左下角位置を、上記推定した右下角位置を通る直線であって右エッジ近似直線に垂直な直線と原稿台11a端縁(フレーム内側)との交点であると推定し、その座標値を算出する(S1050)。その後、当該第二角位置推定処理を終了する。   On the other hand, if it is determined in S1010 that all of the right edge and the lower edge have not been detected normally (No in S1010), the CPU 70 proceeds to S1040 and sets the lower right corner position of the document as the right edge approximate straight line. It is estimated that this is the intersection with the lower edge of the document table 11a (inside the lower frame), the coordinate value is calculated, and the lower left corner position of the document is a straight line passing through the estimated lower right corner position and approximated to the right edge. It is estimated that this is the intersection of a straight line perpendicular to the straight line and the edge of the document table 11a (inside the frame), and its coordinate value is calculated (S1050). Thereafter, the second angular position estimation process ends.

尚、図16(b)は、S1010でNoと判断したときの原稿左下角位置Ka及び原稿右下角位置Kbの推定方法を示した説明図である。原稿が右側に傾いている場合には、原稿の右下角が、原稿台11aの下端縁と下フレームの内側との境界BDにある段差に、突き当たっている可能性が高いため、本実施例では、下エッジを正常検出することができなかったとき、原稿の右下角が、原稿台11aの下端縁と下フレームの内側との境界BDにある段差に、突き当たっていると仮定して、原稿の右下角位置を推定する。   FIG. 16B is an explanatory diagram showing a method for estimating the document lower left corner position Ka and the document lower right corner position Kb when it is determined No in S1010. When the document is inclined to the right side, the lower right corner of the document is likely to hit a step at the boundary BD between the lower edge of the document table 11a and the inside of the lower frame. When the lower edge cannot be detected normally, it is assumed that the lower right corner of the document hits a step at the boundary BD between the lower edge of the document table 11a and the inner side of the lower frame. Estimate the lower right corner position.

また、このようにして第一又は第二角位置推定処理(S480,S485)を終了すると、CPU70は、S490に移行して、S480又はS485で推定した角位置の情報に基づき、原稿サイズを推定する。即ち、原稿台11aに載置されている原稿が、長方形状の定型用紙であると仮定の下で、上記推定した原稿の左下角位置から原稿の右下角位置までの長さを、原稿の短辺長さ(横幅)と推定し、この短辺長さの√2倍を、原稿の長辺長さ(縦幅)と推定する。   When the first or second angular position estimation process (S480, S485) is completed in this way, the CPU 70 proceeds to S490 and estimates the document size based on the angular position information estimated in S480 or S485. To do. That is, on the assumption that the document placed on the document table 11a is a rectangular standard sheet, the length from the estimated lower left corner position of the document to the lower right corner position of the document is set to the short document length. The side length (horizontal width) is estimated, and √2 times the short side length is estimated as the long side length (vertical width) of the document.

また、この処理を終えると、右エッジ近似直線を基準にして、原稿の傾き角θを推定する。即ち、Y軸に対して右エッジ近似直線がなす角度を、原稿の傾き角θと推定する(S493)。   When this process is finished, the inclination angle θ of the document is estimated based on the right edge approximate straight line. That is, the angle formed by the right edge approximate straight line with respect to the Y axis is estimated as the document inclination angle θ (S493).

その後、CPU70は、S497に移行し、上記推定した角位置、原稿サイズ、原稿の傾き角θの情報に基づき、原稿の載置領域を推定する。具体的には、上記推定した左下角位置、右下角位置、原稿の傾き角θ、及び、原稿サイズの情報から、原稿の左上角位置、原稿の右上角位置を導出することにより、原稿の外縁を推定し、この原稿の外縁により囲まれる領域を、原稿の載置領域であると推定する。そして、この処理を終えると、当該原稿推定処理を終了して、S330以降の処理を実行する。   Thereafter, the CPU 70 proceeds to S497, and estimates the document placement area based on the estimated angular position, document size, and document tilt angle θ. Specifically, by deriving the upper left corner position of the document and the upper right corner position of the document from the estimated lower left corner position, lower right corner position, document tilt angle θ, and document size information, the outer edge of the document is derived. And the area surrounded by the outer edge of the document is estimated to be the document placement area. When this process ends, the document estimation process ends, and the processes after S330 are executed.

即ち、推定した原稿サイズ及び原稿の傾き角θの情報に基づき、変倍率及び傾き補正量を設定すると共に(S340,S350)、推定した原稿載置領域の情報に基づき、原稿読取開始位置及び原稿読取終了位置を設定することで、原稿の載置領域に対応する読取領域を設定し(S360)、この読取領域内で、読取ユニットを搬送して、読取ユニットに読取領域に写る画像を読み取らせ、その読取結果としてRAM80に記録された画像データを、予め設定した変倍率及び傾き補正量に合わせて、拡大/縮小及び回転処理することにより印刷用の画像データを生成し(S380)、この画像データを、印刷対象データとして、当該印刷対象データについての印刷処理を実行することで(S390)、原稿のコピー画像を記録紙に印刷する。その後、第二複写処理及び複写制御処理を終えて、外部から入力されたコピー指令に対応する処理を完了する。   That is, based on the information on the estimated document size and the document inclination angle θ, the scaling factor and the inclination correction amount are set (S340, S350), and the document reading start position and the document are determined based on the estimated document placement area information. By setting the reading end position, a reading area corresponding to the document placement area is set (S360), and within this reading area, the reading unit is transported so that the image displayed in the reading area is read by the reading unit. Then, the image data recorded in the RAM 80 as the read result is subjected to enlargement / reduction and rotation processing in accordance with a preset scaling factor and inclination correction amount to generate image data for printing (S380). By executing the printing process for the data to be printed as the data to be printed (S390), a copy image of the document is printed on the recording paper. Thereafter, the second copy process and the copy control process are finished, and the process corresponding to the copy command input from the outside is completed.

以上、本実施例の複合機1の構成について説明したが、この複合機1によれば、「自動変倍/傾き補正」コピー指令が入力された場合、読取可能領域R0の一部をプレスキャンして、その読取結果に基づき、原稿の状態(原稿サイズ・原稿の傾き・原稿の載置領域)を推定する。   The configuration of the multifunction device 1 of the present embodiment has been described above. According to the multifunction device 1, when an “automatic scaling / tilt correction” copy command is input, a part of the readable area R0 is pre-scanned. Then, based on the reading result, the state of the original (original size, original inclination, original placement area) is estimated.

従って、本実施例によれば、「自動変倍/傾き補正」コピー指令が入力された場合、「縁無し」コピーのように、読取可能領域R0全体をプレスキャンする手法よりも高速にプレスキャン動作を終了することができて、効率的に原稿の状態を推定することができる。   Therefore, according to the present embodiment, when an “automatic scaling / tilt correction” copy command is input, prescanning is faster than the method of prescanning the entire readable area R0, such as “marginless” copying. The operation can be completed, and the state of the original can be estimated efficiently.

尚、本実施例においては、「縁無し」コピー指令が入力された場合、読取可能領域R0全体をプレスキャンして、その結果に基づき、原稿の状態を推定するようにしているが、このようにしているのは、コピー指令の目的から、処理の高速性よりも「縁無し」コピーを適切に実現するために、原稿の状態を可能な限り正確に推定するのが好ましいためである。   In this embodiment, when a “marginless” copy command is input, the entire readable area R0 is pre-scanned, and based on the result, the state of the document is estimated. This is because, for the purpose of the copy command, it is preferable to estimate the state of the document as accurately as possible in order to appropriately realize “marginless” copying rather than high-speed processing.

即ち、本実施例においては、ユーザの要求に応じて動作モードを切り替え、正確な状態推定が必要な場合には、全体プレスキャン処理を実行して原稿の状態推定を行い、そうでない場合には、先端部プレスキャン処理を実行して原稿の状態推定を行うことで、処理の正確性と迅速性の調和を図るようにした。従って、このディジタル複合機1によれば、ユーザの利便性を、従来よりも高めることができる。   That is, in this embodiment, the operation mode is switched according to the user's request, and when the accurate state estimation is necessary, the entire pre-scan process is executed to estimate the state of the original. The leading edge pre-scan process is executed to estimate the state of the original so that the accuracy and speed of the process are harmonized. Therefore, according to the digital multi-function peripheral 1, the convenience for the user can be enhanced as compared with the conventional case.

また、本実施例では、原稿推定処理にて原稿の状態を推定する際、原稿台11aに載置された原稿Pが定型用紙であると仮定して、原稿台11aに載置された原稿の状態を推定するようにした。従って、定型用紙が原稿台11aに載置されている場合には、読取可能領域R0の一部をプレスキャンをする程度でも、正確に原稿サイズや原稿の傾き、原稿の載置領域を推定することができ、この推定結果に基づき、適切に読取領域や変倍率、傾き補正量を設定して、記録紙に、適切なコピー画像を印刷することができる。   Further, in this embodiment, when estimating the state of the document in the document estimation process, it is assumed that the document P placed on the document table 11a is a standard sheet, and the document placed on the document table 11a. The state was estimated. Therefore, when the standard sheet is placed on the document table 11a, the document size, the document inclination, and the document placement area are accurately estimated even when a part of the readable area R0 is pre-scanned. Based on this estimation result, an appropriate copy image can be printed on a recording sheet by appropriately setting a reading area, a variable magnification, and an inclination correction amount.

特に、本実施例では、先端部プレスキャン処理により得られたプレスキャン画像データを、エッジ画像データに変換して、このエッジ画像データから、右エッジ、左エッジ及び下エッジに対応するエッジ点を抽出し、これらの近似直線から原稿の角位置を推定するようにした。   In particular, in the present embodiment, the prescan image data obtained by the tip prescan process is converted into edge image data, and edge points corresponding to the right edge, the left edge, and the lower edge are converted from the edge image data. Extracted and estimated the angular position of the document from these approximate lines.

具体的に、本実施例では、右エッジ近似直線が傾いており原稿が正確に載置されていないと考えられるときであって、右エッジ近似直線、左エッジ近似直線、下エッジ近似直線の確度が高いと考えられるとき、右エッジ近似直線と下エッジ近似直線との交点を右下角位置と推定し、左エッジ近似直線と下エッジ近似直線との交点を左下角位置と推定するようにした。   Specifically, in the present embodiment, the right edge approximate straight line is inclined and the document is considered not accurately placed, and the accuracy of the right edge approximate straight line, the left edge approximate straight line, and the lower edge approximate straight line is determined. Is considered high, the intersection of the right edge approximate line and the lower edge approximate line is estimated as the lower right corner position, and the intersection of the left edge approximate line and the lower edge approximate line is estimated as the lower left corner position.

従って、本実施例によれば、プレスキャン画像データに原稿の全体像が現れていない場合もさることながら、原稿が正確に載置されておらず、原稿の角が折れていたり、原稿の角が読取可能領域外にある場合等のように原稿の角がプレスキャン結果には現れていない場合にも、適切に原稿の角位置を推定して、原稿の状態(サイズ等)を推定することができる。   Therefore, according to the present embodiment, the entire image of the document does not appear in the pre-scan image data, and the document is not placed correctly, the corner of the document is broken, the corner of the document is Even when the corner of the document does not appear in the prescan result, such as when the image is outside the readable area, the document corner (size, etc.) is estimated by appropriately estimating the corner position of the document. Can do.

尚、本実施例では、原稿台11aの端部が読取可能領域外となっているため、フレーム13aの内側左下角に原稿Pの左下角が正確に突き当てられると、原稿の左エッジ及び下エッジを検出することができない。従って、本実施例では、原稿の傾きが微小量である場合には、右エッジ近似直線のみで、原稿のサイズ等を推定しているが、原稿の傾きがある程度の大きさある場合でも、左エッジや下エッジを正確に検出することができない場合がある。   In this embodiment, since the end portion of the document table 11a is outside the readable area, when the lower left corner of the document P is accurately abutted against the inner lower left corner of the frame 13a, the left edge and the lower edge of the document An edge cannot be detected. Therefore, in this embodiment, when the document has a very small amount of inclination, the size of the document is estimated using only the right edge approximate line, but even if the document has a certain amount of inclination, the left In some cases, the edge and the lower edge cannot be accurately detected.

一方、本実施例では、マークMKで原稿の突き当てを指示しているので、原稿が傾いているとしても、原稿の載置状態が、正しい原稿の載置状態から大きくずれていることは考えにくく、原稿が左側に傾いている場合には、原稿の左下角が原稿台11aとフレーム13aとの境界BDの段差に突き当たっている可能性が高く、原稿が右側に傾いている場合には、原稿の右下角が上記段差に突き当たっている可能性が高い。   On the other hand, in this embodiment, since the mark MK instructs the abutment of the document, it is considered that the document placement state is greatly deviated from the correct document placement state even if the document is tilted. When the original is inclined to the left side, the lower left corner of the original is likely to have hit the step of the boundary BD between the original table 11a and the frame 13a, and when the original is inclined to the right, There is a high possibility that the lower right corner of the document hits the step.

このため、本実施例では、原稿が傾いているときであって、右エッジ、左エッジ及び下エッジを正確に検出することができなかったとき、右エッジの検出結果が一番正しいと取り扱うと共に、原稿が左側に傾いている場合には、原稿の左下角が原稿台11aとフレーム13aとの境界の段差に突き当たっているとして、原稿が右側に傾いている場合には、原稿の右下角が上記段差に突き当たっているとして、原稿の左下角位置及び右下角位置を推定するようにした。   For this reason, in this embodiment, when the original is tilted and the right edge, the left edge, and the lower edge cannot be accurately detected, the right edge detection result is treated as the most correct. When the document is tilted to the left, the lower left corner of the document is in contact with the step at the boundary between the document table 11a and the frame 13a. When the document is tilted to the right, the lower right corner of the document is The lower left corner position and the lower right corner position of the document are estimated assuming that they are in contact with the step.

従って、本実施例によれば、右エッジ、左エッジ及び下エッジを正確に検出することができない場合においても、概ね正しく原稿のサイズや傾き・原稿の載置領域を推定することができる。   Therefore, according to the present embodiment, even when the right edge, the left edge, and the lower edge cannot be accurately detected, it is possible to estimate the document size, inclination, and document placement area almost correctly.

尚、本発明の一部プレスキャン手段は、CPU70が実行するS310の処理及び読取制御部20の処理により実現され、角推定手段は、CPU70が実行するS315の処理及び原稿推定処理(S320)におけるS410〜S485の処理により実現されている。この他、原稿推定手段は、S490〜S497の処理により実現され、読取領域決定手段は、CPU70が実行するS360の処理により実現されている。   The partial pre-scanning means of the present invention is realized by the processing of S310 executed by the CPU 70 and the processing of the reading control unit 20, and the angle estimation means is the processing of S315 executed by the CPU 70 and the document estimation processing (S320). This is realized by the processing of S410 to S485. In addition, the document estimation means is realized by the processing of S490 to S497, and the reading area determination means is realized by the processing of S360 executed by the CPU 70.

また、本発明の全体プレスキャン手段は、CPU70が実行するS210の処理及び読取制御部20の処理により実現され、副原稿推定手段は、S215,S220の処理により実現され、切替手段は、S110,S130の処理により実現されている。   Further, the whole pre-scanning means of the present invention is realized by the processing of S210 executed by the CPU 70 and the processing of the reading control unit 20, the sub-document estimating means is realized by the processing of S215 and S220, and the switching means is S110, This is realized by the process of S130.

また、本発明は、上記実施例に限定されるものではなく、種々の態様を採ることができる。例えば、上記実施例では、コンタクトイメージセンサを読取ユニットとして備えるディジタル複合機1に、本発明を適用した例を説明したが、本発明は、コンタクトイメージセンサを読取ユニットとして備える画像読取装置に限定されるものではないことは言うまでもない。   Further, the present invention is not limited to the above-described embodiments, and can take various forms. For example, in the above-described embodiment, the example in which the present invention is applied to the digital multifunction peripheral 1 including the contact image sensor as a reading unit has been described. However, the present invention is limited to an image reading apparatus including the contact image sensor as a reading unit. Needless to say, it is not something.

この他、上記実施例では、右エッジ近似直線から、原稿の傾き角θを求めるようにしたが(S493)、S493では、第一又は第二角位置推定処理にて推定した原稿の左下角と右下角の位置座標に基づき、当該左下角と右下角を結ぶ線分がX軸となす角度を、原稿の傾き角θとして求めても良い。   In addition, in the above-described embodiment, the document inclination angle θ is obtained from the right edge approximate straight line (S493). In S493, the lower left corner of the document estimated by the first or second angle position estimation process is calculated. Based on the position coordinates of the lower right corner, the angle formed by the line connecting the lower left corner and the lower right corner with the X axis may be obtained as the document inclination angle θ.

ディジタル複合機1の構成を表す説明図である。2 is an explanatory diagram illustrating a configuration of a digital multi-function peripheral 1. FIG. 読取ガラス11の読取可能領域R0を示した説明図である。It is explanatory drawing which showed readable area | region R0 of the reading glass. CPU70が実行する複写制御処理を表すフローチャートである。6 is a flowchart illustrating a copy control process executed by a CPU. CPU70が実行する第一複写処理を表すフローチャート(a)及び第二複写処理を表すフローチャート(b)である。6 is a flowchart (a) representing a first copy process executed by the CPU 70 and a flowchart (b) representing a second copy process. 全体プレスキャン処理の読取領域及び先端部プレスキャン処理の読取領域を表した説明図である。It is explanatory drawing showing the reading area of the whole prescan process, and the reading area of the front-end | tip part prescan process. CPU70が実行する原稿推定処理を表すフローチャートである。6 is a flowchart showing document estimation processing executed by CPU. CPU70が実行する右エッジ検出処理を表すフローチャートである。It is a flowchart showing the right edge detection process which CPU70 performs. エッジ画像データの構成を示した説明図である。It is explanatory drawing which showed the structure of edge image data. 原稿右エッジデータの確定手法を説明した説明図である。FIG. 6 is an explanatory diagram illustrating a method for determining original right edge data. CPU70が実行する左エッジ検出処理を表すフローチャートである。It is a flowchart showing the left edge detection process which CPU70 performs. CPU70が実行する下エッジ検出処理を表すフローチャートである。It is a flowchart showing the lower edge detection process which CPU70 performs. CPU70が実行する第一角位置推定処理を表すフローチャートである。It is a flowchart showing the 1st angle position estimation process which CPU70 performs. 原稿左下角位置及び原稿右下角位置の推定方法を示した説明図である。FIG. 5 is an explanatory diagram showing a method for estimating a document lower left corner position and a document lower right corner position. 原稿左下角位置及び原稿右下角位置の推定方法を示した説明図である。FIG. 5 is an explanatory diagram showing a method for estimating a document lower left corner position and a document lower right corner position. CPU70が実行する第二角位置推定処理を表すフローチャートである。It is a flowchart showing the 2nd angle position estimation process which CPU70 performs. 原稿左下角位置及び原稿右下角位置の推定方法を示した説明図である。FIG. 5 is an explanatory diagram showing a method for estimating a document lower left corner position and a document lower right corner position.

符号の説明Explanation of symbols

1…ディジタル複合機、10…画像読取部、11…読取ガラス、11a…原稿台、13…筐体、13a…フレーム、15…読取ユニット、16…搬送機構、17…モータ、20…読取制御部、30…印刷部、40…印刷制御部、50…表示操作部、60…通信部、70…CPU、80…RAM、90…フラッシュメモリ、MK…マーク、P…原稿、R0…読取可能領域 DESCRIPTION OF SYMBOLS 1 ... Digital compound machine, 10 ... Image reading part, 11 ... Reading glass, 11a ... Original plate, 13 ... Housing | casing, 13a ... Frame, 15 ... Reading unit, 16 ... Conveyance mechanism, 17 ... Motor, 20 ... Reading control part , 30 ... printing section, 40 ... print control section, 50 ... display operation section, 60 ... communication section, 70 ... CPU, 80 ... RAM, 90 ... flash memory, MK ... mark, P ... original, R0 ... readable area

Claims (9)

読取対象の原稿が載置される原稿台と、
前記原稿台に沿って搬送される読取ユニットと、
を備え、
前記読取ユニットに、前記原稿台に載置された原稿を読み取らせることにより、前記原稿台に載置された原稿の読取画像を表す画像データを生成する画像読取装置であって、
前記読取ユニットが読取可能な前記原稿台の領域である読取可能領域の内、一部領域において前記読取ユニットを搬送し、前記一部領域において前記読取ユニットに読取動作を実行させる一部プレスキャン手段と、
前記一部プレスキャン手段の動作により得られた前記読取ユニットの読取結果である画像データを、エッジ画像を表すエッジ画像データに変換し、当該エッジ画像データに基づき、前記原稿台に載置された原稿が四角形状であるとの仮定の下で、当該原稿が有する四つ角の内、二つの各角に対応する前記原稿台上の位置座標を推定する角推定手段と、
前記角推定手段の推定結果に基づき、前記原稿台に載置された原稿の状態を推定する原稿推定手段と、
を備えることを特徴とする画像読取装置。
A document table on which a document to be read is placed;
A reading unit conveyed along the document table;
With
An image reading apparatus for generating image data representing a read image of a document placed on the document table by causing the reading unit to read the document placed on the document table,
Partial pre-scanning means for transporting the reading unit in a partial area of the readable area that is an area of the original platen that can be read by the reading unit, and causing the reading unit to perform a reading operation in the partial area. When,
The image data, which is the reading result of the reading unit obtained by the operation of the partial pre-scanning means, is converted into edge image data representing an edge image, and placed on the document table based on the edge image data. Under the assumption that the document has a quadrangular shape, angle estimation means for estimating position coordinates on the document table corresponding to each of two corners of the four corners of the document;
Document estimation means for estimating the state of the document placed on the document table based on the estimation result of the angle estimation means;
An image reading apparatus comprising:
前記原稿推定手段は、前記角推定手段により推定された二つの角の各位置座標間の長さから前記原稿台に載置された原稿の一辺の長さを推定すると共に、前記原稿台に載置された原稿が定型用紙であるとの仮定の下で、前記推定した辺の長さから、この辺に直交する原稿の辺の長さを推定することにより、前記原稿台に載置された原稿の状態として、前記原稿台に載置された原稿のサイズを推定する構成にされていることを特徴とする請求項1記載の画像読取装置。   The document estimation unit estimates the length of one side of the document placed on the document table from the length between the position coordinates of the two corners estimated by the angle estimation unit, and places the document on the document table. Under the assumption that the placed document is a standard sheet, the document placed on the document table is estimated from the estimated length of the side by estimating the length of the side of the document perpendicular to the side. The image reading apparatus according to claim 1, wherein the image reading apparatus is configured to estimate a size of a document placed on the document table. 前記角推定手段は、前記エッジ画像データが示すエッジ点群の中から、前記原稿台に載置された原稿の三辺に対応するエッジ点群を抽出し、当該抽出した各辺に対応するエッジ点群を直線近似して得られる三本の直線が交わる二つの交点の各位置座標を、前記原稿台に載置された原稿の角に対応する位置座標であると推定する構成にされていることを特徴とする請求項1又は請求項2記載の画像読取装置。   The corner estimation means extracts edge point groups corresponding to the three sides of the document placed on the document table from the edge point groups indicated by the edge image data, and the edges corresponding to the extracted sides Each position coordinate of two intersecting points where three straight lines obtained by linearly approximating the point group are estimated to be position coordinates corresponding to the corners of the document placed on the document table. The image reading apparatus according to claim 1, wherein the image reading apparatus is an image reading apparatus. 前記原稿台は、四角形状にされ、四つ角の内、一つの特定の角が、原稿の角を合わせるべき位置として定められたものであり、
前記一部プレスキャン手段は、前記原稿台における前記特定の角から延びる前記原稿台の一辺を構成する前記原稿台の端縁から、前記原稿台内側に所定距離離れた位置までの領域であって前記読取可能領域に該当する部位を、前記一部領域として、当該領域において、前記読取ユニットを搬送し、前記読取ユニットに読取動作を実行させる構成にされていることを特徴とする請求項1〜請求項3のいずれかに記載の画像読取装置。
The document table has a quadrangular shape, and one specific corner among the four corners is defined as a position where the corners of the document should be aligned,
The partial pre-scanning means is a region from an edge of the document table constituting one side of the document table extending from the specific corner of the document table to a position separated by a predetermined distance on the inside of the document table. The part corresponding to the readable area is defined as the partial area, and the reading unit is transported in the area and the reading unit is configured to perform a reading operation. The image reading apparatus according to claim 3.
前記原稿台は、四角形状にされ、四つ角の内、一つの特定の角が、原稿の角を合わせるべき位置として定められたものであり、
前記一部プレスキャン手段は、前記原稿台における前記特定の角から延びる前記原稿台の第一辺を構成する前記原稿台の端縁から、前記原稿台内側に所定距離離れた位置までの領域であって前記読取可能領域に該当する部位を、前記一部領域として、当該領域において、前記読取ユニットを搬送し、前記読取ユニットに読取動作を実行させる構成にされ、
前記角推定手段は、前記前記エッジ画像データが示すエッジ点群の中から、前記原稿台に載置された原稿の三辺に対応するエッジ点群として、前記原稿台の第一辺に沿って配置されるべき前記原稿の第一辺に対応するエッジ点群、及び、前記原稿台における前記特定の角から延びる辺であって前記第一辺とは垂直な第二辺に沿って配置されるべき前記原稿の第二辺に対応するエッジ点群、及び、前記原稿の第二辺に平行な前記原稿の第三辺に対応するエッジ点群を抽出する構成にされていることを特徴とする請求項4記載の画像読取装置。
The document table has a quadrangular shape, and one specific corner among the four corners is defined as a position where the corners of the document should be aligned,
The partial pre-scanning means is a region from the edge of the document table constituting the first side of the document table extending from the specific corner of the document table to a position separated by a predetermined distance inside the document table. The portion corresponding to the readable area is defined as the partial area, the reading unit is transported in the area, and the reading unit is configured to perform a reading operation.
The corner estimation unit is configured to follow the first side of the document table as an edge point group corresponding to three sides of the document placed on the document table from among the edge point groups indicated by the edge image data. The edge point group corresponding to the first side of the original to be arranged, and the side extending from the specific corner on the original table and arranged along the second side perpendicular to the first side The edge point group corresponding to the second side of the original and the edge point group corresponding to the third side of the original parallel to the second side of the original are extracted. The image reading apparatus according to claim 4.
前記原稿推定手段は、前記原稿の状態として、前記原稿台に載置された原稿の当該原稿台における載置領域を推定する構成にされ、
更に、当該画像読取装置は、
前記原稿推定手段により推定された前記原稿の載置領域に対応する前記原稿台上の領域を、前記読取ユニットによる読取領域に決定する読取領域決定手段
を備え、前記読取対象領域決定手段により決定された前記読取領域において、前記読取ユニットを搬送し、前記読取ユニットに読取動作を実行させることにより、前記原稿台に載置された原稿の読取画像を表す画像データを生成することを特徴とする請求項1〜請求項5のいずれかに記載の画像読取装置。
The document estimation means is configured to estimate a placement area of the document placed on the document table on the document table as the state of the document.
Furthermore, the image reading apparatus
A reading area determining means for determining an area on the document table corresponding to the document placement area estimated by the document estimating means as a reading area by the reading unit; In the reading area, image data representing a read image of a document placed on the document table is generated by conveying the reading unit and causing the reading unit to perform a reading operation. The image reading apparatus according to claim 1.
前記原稿推定手段は、前記原稿の状態として、前記角推定手段の推定結果に基づき、前記原稿台に載置された原稿のサイズを推定すると共に、前記原稿の各辺に対応するエッジ点群を直線近似して得られる三本の直線の少なくとも一つの傾きに基づき、前記原稿台に載置された原稿の前記原稿台に対する傾きを推定する構成にされ、
当該画像読取装置は、前記原稿推定手段により推定された傾きの情報に基づき、前記読取ユニットの読取結果である画像データを傾き補正して、前記原稿台に載置された原稿の読取画像を表す画像データを生成することを特徴とする請求項3記載の画像読取装置。
The document estimation unit estimates the size of the document placed on the document table based on the estimation result of the angle estimation unit as the state of the document, and sets edge point groups corresponding to each side of the document. Based on at least one inclination of three straight lines obtained by linear approximation, the inclination of the original placed on the original table with respect to the original table is estimated,
The image reading apparatus represents the read image of the original placed on the original table by correcting the inclination of the image data as the reading result of the reading unit based on the inclination information estimated by the original estimation means. The image reading apparatus according to claim 3, wherein the image data is generated.
前記原稿推定手段は、前記原稿の状態として、前記角推定手段により推定された二つの角の各位置座標から、原稿の傾きを推定する構成にされていることを特徴とする請求項1〜請求項6のいずれかに記載の画像読取装置。   The document estimation unit is configured to estimate the inclination of the document from the position coordinates of two corners estimated by the angle estimation unit as the state of the document. Item 7. The image reading apparatus according to any one of Items 6 to 6. 前記原稿台の読取可能領域全体において前記読取ユニットを搬送し、前記原稿台の前記読取可能領域全体において前記読取ユニットに読取動作を実行させる全体プレスキャン手段と、
前記全体プレスキャン手段の動作により得られた前記読取ユニットの読取結果に基づき、前記原稿台に載置された原稿の状態を推定する副原稿推定手段と、
外部からの指令に従って、前記一部プレスキャン手段及び前記全体プレスキャン手段のいずれか一方を作動させる切替手段と、
を備えることを特徴とする請求項1〜請求項8のいずれかに記載の画像読取装置。
Whole pre-scanning means for transporting the reading unit in the entire readable area of the document table and causing the reading unit to perform a reading operation in the entire readable area of the document table;
Sub-document estimation means for estimating the state of the document placed on the document table based on the reading result of the reading unit obtained by the operation of the overall pre-scanning means;
Switching means for operating one of the partial pre-scan means and the whole pre-scan means in accordance with an external command;
The image reading apparatus according to claim 1, further comprising:
JP2007340771A 2007-12-28 2007-12-28 Image reading device Active JP5205963B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2007340771A JP5205963B2 (en) 2007-12-28 2007-12-28 Image reading device
US12/341,963 US8284463B2 (en) 2007-12-28 2008-12-22 Image reading apparatus
US12/343,110 US8174737B2 (en) 2007-12-28 2008-12-23 Image reading apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007340771A JP5205963B2 (en) 2007-12-28 2007-12-28 Image reading device

Publications (2)

Publication Number Publication Date
JP2009164807A true JP2009164807A (en) 2009-07-23
JP5205963B2 JP5205963B2 (en) 2013-06-05

Family

ID=40966916

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007340771A Active JP5205963B2 (en) 2007-12-28 2007-12-28 Image reading device

Country Status (1)

Country Link
JP (1) JP5205963B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8427714B2 (en) 2009-07-30 2013-04-23 Brother Kogyo Kabushiki Kaisha Image-reading device
JP2013098720A (en) * 2011-10-31 2013-05-20 Brother Ind Ltd Image reader
JP2013115617A (en) * 2011-11-29 2013-06-10 Brother Ind Ltd Image processing device
JP2013232834A (en) * 2012-05-01 2013-11-14 Shimoda Oa System Corp Image processing program, image processing apparatus and image reading apparatus
JP2014030109A (en) * 2012-07-31 2014-02-13 Brother Ind Ltd Image reader
US8861040B2 (en) 2011-09-30 2014-10-14 Brother Kogyo Kabushiki Kaisha Image-reading device and computer-readable storage medium configured to determine document edge from plurality of candidate edge points
JP2017059990A (en) * 2015-09-16 2017-03-23 富士ゼロックス株式会社 Image reading device and image forming apparatus
US20220021779A1 (en) * 2020-07-14 2022-01-20 Canon Kabushiki Kaisha Image processing apparatus, control method, and storage medium
US11330115B2 (en) 2019-11-29 2022-05-10 Brother Kogyo Kabushiki Kaisha Image scanning device
US11665296B2 (en) 2021-06-24 2023-05-30 Brother Kogyo Kabushiki Kaisha Image reading device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63280569A (en) * 1987-05-13 1988-11-17 Ricoh Co Ltd Original position detector
JPH05145710A (en) * 1991-11-18 1993-06-11 Sharp Corp Copying machine
JPH11122433A (en) * 1997-10-09 1999-04-30 Ricoh Co Ltd Picture reading device
JPH11177774A (en) * 1997-12-15 1999-07-02 Minolta Co Ltd Detector for original
JPH11187207A (en) * 1997-12-19 1999-07-09 Ricoh Co Ltd Image reader
JP2001268367A (en) * 2000-03-22 2001-09-28 Minolta Co Ltd Image scanning apparatus
JP2002142084A (en) * 2000-10-31 2002-05-17 Pfu Ltd Image reader
JP2003283766A (en) * 2002-03-22 2003-10-03 Ricoh Co Ltd Image input apparatus
JP2004282517A (en) * 2003-03-17 2004-10-07 Sharp Corp Original reader

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63280569A (en) * 1987-05-13 1988-11-17 Ricoh Co Ltd Original position detector
JPH05145710A (en) * 1991-11-18 1993-06-11 Sharp Corp Copying machine
JPH11122433A (en) * 1997-10-09 1999-04-30 Ricoh Co Ltd Picture reading device
JPH11177774A (en) * 1997-12-15 1999-07-02 Minolta Co Ltd Detector for original
JPH11187207A (en) * 1997-12-19 1999-07-09 Ricoh Co Ltd Image reader
JP2001268367A (en) * 2000-03-22 2001-09-28 Minolta Co Ltd Image scanning apparatus
JP2002142084A (en) * 2000-10-31 2002-05-17 Pfu Ltd Image reader
JP2003283766A (en) * 2002-03-22 2003-10-03 Ricoh Co Ltd Image input apparatus
JP2004282517A (en) * 2003-03-17 2004-10-07 Sharp Corp Original reader

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8427714B2 (en) 2009-07-30 2013-04-23 Brother Kogyo Kabushiki Kaisha Image-reading device
US8861040B2 (en) 2011-09-30 2014-10-14 Brother Kogyo Kabushiki Kaisha Image-reading device and computer-readable storage medium configured to determine document edge from plurality of candidate edge points
JP2013098720A (en) * 2011-10-31 2013-05-20 Brother Ind Ltd Image reader
JP2013115617A (en) * 2011-11-29 2013-06-10 Brother Ind Ltd Image processing device
JP2013232834A (en) * 2012-05-01 2013-11-14 Shimoda Oa System Corp Image processing program, image processing apparatus and image reading apparatus
JP2014030109A (en) * 2012-07-31 2014-02-13 Brother Ind Ltd Image reader
JP2017059990A (en) * 2015-09-16 2017-03-23 富士ゼロックス株式会社 Image reading device and image forming apparatus
US11330115B2 (en) 2019-11-29 2022-05-10 Brother Kogyo Kabushiki Kaisha Image scanning device
US20220021779A1 (en) * 2020-07-14 2022-01-20 Canon Kabushiki Kaisha Image processing apparatus, control method, and storage medium
US11665296B2 (en) 2021-06-24 2023-05-30 Brother Kogyo Kabushiki Kaisha Image reading device

Also Published As

Publication number Publication date
JP5205963B2 (en) 2013-06-05

Similar Documents

Publication Publication Date Title
JP5205963B2 (en) Image reading device
US8174737B2 (en) Image reading apparatus
JP4678278B2 (en) Double-sided simultaneous reading device
JP4952576B2 (en) Image reading device
US8284463B2 (en) Image reading apparatus
JPH04313958A (en) Picture processor
JP4941316B2 (en) Image reading device
JP4888439B2 (en) Image reading apparatus and original size determination program
JP6885111B2 (en) Image processing equipment and image forming equipment
JP2010074753A (en) Image reading apparatus
JP4924416B2 (en) Image reading device
JP4858437B2 (en) Image reading device
WO2017056799A1 (en) Image-reading device and image-forming device
JP4924417B2 (en) Image analysis device
JP4998257B2 (en) Image reading device
JP4952575B2 (en) Image reading device
US7545524B2 (en) Method of controlling operation of image sensor
JP4941317B2 (en) Image reading device
JP2012142712A (en) Printing device and printing method
JP4016774B2 (en) Document reader
JP7211118B2 (en) Reading system and reading method
JP4507923B2 (en) Translation device
JP6606957B2 (en) Copy machine and control program
JP2023116052A (en) Image reading apparatus
JP6327225B2 (en) Facsimile device and facsimile system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110722

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110823

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111024

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120228

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120501

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121002

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121203

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130204

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

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5205963

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150