JP6047984B2 - Image reading device - Google Patents

Image reading device Download PDF

Info

Publication number
JP6047984B2
JP6047984B2 JP2012169732A JP2012169732A JP6047984B2 JP 6047984 B2 JP6047984 B2 JP 6047984B2 JP 2012169732 A JP2012169732 A JP 2012169732A JP 2012169732 A JP2012169732 A JP 2012169732A JP 6047984 B2 JP6047984 B2 JP 6047984B2
Authority
JP
Japan
Prior art keywords
scanning direction
point
image
searched
main scanning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012169732A
Other languages
Japanese (ja)
Other versions
JP2014030109A (en
Inventor
タイン コン グェン
タイン コン グェン
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2012169732A priority Critical patent/JP6047984B2/en
Publication of JP2014030109A publication Critical patent/JP2014030109A/en
Application granted granted Critical
Publication of JP6047984B2 publication Critical patent/JP6047984B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)
  • Facsimile Scanning Arrangements (AREA)

Description

画像読取装置において、搬送される原稿の傾きを求めて傾き補正を行うための技術に関する。   The present invention relates to a technique for obtaining an inclination of a conveyed document and correcting the inclination in an image reading apparatus.

従来から、搬送される原稿の傾きを求めて傾き補正を行う装置が知られている(例えば、特許文献1)。この装置では、読取ユニットを用いて原稿の先端部を含む範囲に対しプレスキャン動作を実行して画像データを生成し、この画像データから生成した当該範囲のエッジ画像データを用いて原稿推定処理を実行する。原稿推定処理では、原稿の先端側のエッジを意味する下エッジを検出する下エッジ検出処理において、検査位置を主走査方向にエッジ画像データの左端から右端まで移動させてエッジ点の抽出を行う。   2. Description of the Related Art Conventionally, there has been known an apparatus that corrects an inclination by obtaining an inclination of a conveyed document (for example, Patent Document 1). In this apparatus, image data is generated by performing a pre-scan operation on a range including the leading edge of a document using a reading unit, and document estimation processing is performed using edge image data in the range generated from the image data. Run. In the document estimation process, an edge point is extracted by moving the inspection position from the left end to the right end of the edge image data in the main scanning direction in the lower edge detection process for detecting the lower edge that means the leading edge of the document.

特開2009−164807号公報JP 2009-164807 A

上記のように、従来技術では、主走査方向において、エッジ画像データの端から端までエッジ点の検出が行われていた。しかし、エッジ画像データでは、主走査方向の少なくとも一部においてエッジ点が存在しないことがあり、特に、名刺などの小型原稿のエッジ画像データでは、主走査方向の略半分の領域においてエッジ点が存在しないことがあった。そのため、従来技術のエッジ点の検出方法では、必要以上にエッジ点の検出が行われ、原稿の傾きを求めるまでの時間が長期化してしまう問題が生じていた。   As described above, in the prior art, edge points are detected from end to end of the edge image data in the main scanning direction. However, in edge image data, edge points may not exist in at least a part of the main scanning direction. In particular, in edge image data of a small document such as a business card, edge points exist in approximately half of the main scanning direction. I did not. Therefore, the edge point detection method of the prior art has a problem that edge points are detected more than necessary, and it takes a long time to obtain the inclination of the document.

本明細書では、搬送される原稿の傾きを求めて傾き補正を行う画像読取装置において、原稿の傾きを求めるまでの時間を短縮する技術を開示する。   The present specification discloses a technique for shortening the time required to obtain the inclination of an original in an image reading apparatus that obtains the inclination of the conveyed original and corrects the inclination.

本明細書によって開示される画像読取装置は、原稿が載置されるトレイと、前記原稿を搬送経路に沿って搬送する搬送部と、前記搬送経路上の読取位置に配置され、前記搬送部によって搬送される前記原稿の画像を主走査方向に並んで配置される複数の読取素子を用いて読み取る読取部と、前記トレイにおける前記主走査方向の中点である基準位置に対して前記主走査方向の片側に設けられた検知位置で、前記原稿の有無を検知する検知部と、ユーザによる操作入力を受け付ける入力部と、制御部と、を備え、前記制御部は、前記検知部によって前記原稿が検知され、かつ、前記入力部によって読取開始指示の入力が受付けられた合、前記搬送部に前記原稿を搬送させる搬送処理と、前記主走査方向と直交する副走査方向の所定範囲に亘って、前記読取部に、前記搬送処理により搬送される原稿の先端を含めた画像を読み取らせる読取処理と、前記読取処理によって読み取られた前記所定範囲の読取画像を抽出する読取画像抽出処理と、前記所定範囲の読取画像のうち、前記基準位置上に配置された基準読取素子及び前記基準読取素子よりも前記主走査方向において前記検知部側に配置された前記読取素子を用いて読み取られた検知部側読取画像に対して、エッジ点を検索する検知部側エッジ点検索処理と、検索されたエッジ点から前記原稿の主走査方向に対する傾きを求め、前記傾きから前記読取部が読み取った読取画像の傾き補正を行う傾き補正処理と、を実行し、前記傾き補正処理では、前記検知部側エッジ点検索処理において前記基準読取素子を用いて読み取られた基準読取画像でエッジ点が検索されない場合に、前記検知部側エッジ点検索処理によって検索されたエッジ点から前記原稿の主走査方向に対する傾きを求める。 An image reading device disclosed in the present specification is disposed at a tray on which a document is placed, a transport unit that transports the document along a transport path, and a reading position on the transport path. A reading unit that reads the image of the conveyed document using a plurality of reading elements arranged side by side in the main scanning direction, and the main scanning direction with respect to a reference position that is a midpoint of the tray in the main scanning direction the detection position provided for on one side, comprising: a detection unit for detecting the presence or absence of the document, an input unit that receives an operation input by the user, and a control unit, said control unit, said original by the detection unit is detected, and the input unit field input of the reading start instruction is received by the case, a conveying process for conveying the original to the conveyance section, over a predetermined range in the sub-scanning direction orthogonal to the main scanning direction , The reading unit, wherein the reading processing to read an image including the leading edge of the document conveyed by the conveying process, an image extraction processing reading extracts the read image of the predetermined range read by the reading process, the Among the read images in a predetermined range, a reference reading element arranged on the reference position and a detection unit read using the reading element arranged on the detection unit side in the main scanning direction with respect to the reference reading element The detection unit side edge point search process for searching the edge point for the side read image, and the inclination of the original with respect to the main scanning direction of the original is obtained from the searched edge point, and the reading unit reads the read image from the inclination. An inclination correction process for performing an inclination correction, and in the inclination correction process, a reference read using the reference reading element in the detection unit side edge point search process When in preparative image edge point it is not found, seeking an inclination with respect to the main scanning direction of the document from the edge points retrieved by the detection unit side edge point search process.

この画像読取装置では、主走査方向の基準位置の片側に設けられた検知部により原稿が検知され、所定範囲の読取画像が抽出されると、当該読取画像のうち、基準位置の片側に相当する検知部側読取画像に対して検知部側エッジ点検索処理を実行する。そして、当該処理において、基準読取画像でエッジ点が検索されない場合には、検知部側エッジ点検索処理によって検索されたエッジ点から原稿の主走査方向に対する傾きを求める。そのため、開始点を読取画像の主走査方向における端から端まで移動させてエッジ点の検索を行う従来技術に比べて、片側だけでエッジ点の検索が済むため、エッジ点の検索に必要な時間を短縮することができ、原稿の傾きを求めるまでの時間を短縮することができる。   In this image reading apparatus, when a document is detected by a detection unit provided on one side of a reference position in the main scanning direction and a read image in a predetermined range is extracted, the read image corresponds to one side of the reference position. The detection unit side edge point search process is executed on the detection unit side read image. In the process, when the edge point is not searched for in the reference read image, the inclination of the document with respect to the main scanning direction is obtained from the edge point searched by the detection unit side edge point search process. Therefore, compared to the conventional technique in which the start point is moved from end to end in the main scanning direction of the read image and the edge point is searched, the edge point is searched only on one side, so the time required for searching the edge point Can be shortened, and the time required to obtain the inclination of the document can be shortened.

また、上記の画像読取装置では、前記制御部は、更に、前記検知部側エッジ点検索処理において前記基準読取画像でエッジ点が検索された場合に、前記所定範囲の読取画像のうち、前記基準読取素子よりも前記主走査方向において前記検知部側と逆側に配置された前記読取素子を用いて読み取られた逆側読取画像に対して、エッジ点を検索する逆側エッジ点検索処理、を実行し、前記傾き補正処理では、前記検知部側エッジ点検索処理において前記基準読取画像でエッジ点が検索される場合に、前記検知部側エッジ点検索処理及び前記逆側エッジ点検索処理によって検索されたエッジ点から前記原稿の主走査方向に対する傾きを求める構成としても良い。   In the image reading apparatus, the control unit may further include the reference in the read image in the predetermined range when an edge point is searched for in the reference read image in the detection-side edge point search process. A reverse edge point search process for searching for an edge point with respect to a reverse side read image read using the reading element arranged on the side opposite to the detection unit side in the main scanning direction than the reading element. In the inclination correction process, when an edge point is searched for in the reference read image in the detection unit side edge point search process, the detection is performed by the detection unit side edge point search process and the reverse side edge point search process. A configuration may be used in which the inclination of the document with respect to the main scanning direction is obtained from the edge points.

この画像読取装置によれば、検知部側エッジ点検索処理において、基準読取画像でエッジ点が検索されない場合には、検知部側エッジ点検索処理のみを行い、基準読取画像でエッジ点が検索される場合には、検知部側エッジ点検索処理及び逆側エッジ点検索処理を行うので、片側だけでなく両側の探索が必要であっても適切にエッジ点を探索することができる。   According to this image reading apparatus, in the detection unit side edge point search process, when the edge point is not searched in the reference read image, only the detection unit side edge point search process is performed, and the edge point is searched in the reference read image. In this case, since the detection unit side edge point search process and the reverse side edge point search process are performed, it is possible to search for an edge point appropriately even if both sides need to be searched.

また、上記の画像読取装置では、前記制御部は、前記検知部側エッジ点検索処理において、前記基準読取画像のうち、前記読取部によって前記副走査方向に先に読み取られた側の端である先読取端を開始点とし、前記開始点から前記副走査方向へエッジ点を検索し、前記基準読取画像でエッジ点が検索されない場合に、エッジ点が検索されるまで前記開始点を前記検知部側に移動させて該開始点から前記副走査方向へのエッジ点の検索を繰り返す構成としても良い。   In the image reading apparatus, the control unit is an end of the reference read image that is first read in the sub-scanning direction by the reading unit in the detection unit side edge point search process. If the edge point is searched from the start point in the sub-scanning direction using the first reading end as a start point, and the edge point is not searched in the reference read image, the start point is detected until the edge point is searched for. The edge point search from the start point to the sub-scanning direction may be repeated.

この画像読取装置では、検知部側エッジ点検索処理において、開始点を基準読取画像から検知部側に移動させてエッジ点を検索する。そのため、エッジ点が存在しない読取画像の主走査方向における端部においてエッジ点を検索することが抑制され、エッジ点の検索に必要な時間を短縮することができる。また、基準読取画像でエッジ点が検索されない場合でも、エッジ点が検索されるまでエッジ点の検索を繰り返すので、基準読取画像でエッジ点が検索されない場合に、エッジ点の検索が終了され、エッジ点が検索できない事態が発生することが抑制される。   In this image reading apparatus, in the detection unit side edge point search process, the start point is moved from the reference read image to the detection unit side to search for an edge point. For this reason, searching for an edge point at the end portion in the main scanning direction of the read image where no edge point exists is suppressed, and the time required for searching for the edge point can be shortened. Even if the edge point is not searched for in the reference read image, the search for the edge point is repeated until the edge point is searched. Therefore, if the edge point is not searched for in the reference read image, the search for the edge point is terminated and the edge is searched. Occurrence of a situation where points cannot be searched is suppressed.

また、上記の画像読取装置では、前記所定範囲の読取画像は、前記主走査方向及び前記副走査方向に単位画像を示す読取データが複数個並んで配置されて構成されており、前記制御部は、前記検知部側エッジ点検索処理において、前記開始点を前記主走査方向に基準データ数毎に移動させて前記エッジ点の検索を繰り返す構成としても良い。   In the image reading apparatus, the read image in the predetermined range is configured by arranging a plurality of read data indicating unit images in the main scanning direction and the sub-scanning direction. In the detection-side edge point search process, the start point may be moved for each reference data number in the main scanning direction to repeat the edge point search.

この画像読取装置によれば、主走査方向に並んだ全てのデータに対してエッジ点を検索する場合に比べて、エッジ点の検索に必要な時間を短縮することができ、原稿の傾きを求めるまでの時間を短縮することができる。   According to this image reading apparatus, the time required for searching for edge points can be shortened and the inclination of the document can be obtained compared to searching for edge points for all data arranged in the main scanning direction. Can be shortened.

また、上記の画像読取装置では、前記制御部は、前記読取画像抽出処理において、前記所定範囲の読取画像を、前記読取画像において閾値よりも低い輝度を有する前記読取データを第1データとし、前記読取画像において前記閾値よりも高い輝度を有する前記読取データを第2データとした2値化されたデータであるエッジ画像として抽出し、前記検知部側エッジ点検索処理において、前記開始点から前記副走査方向に前記エッジ画像を検索し、前記副走査方向に連続した第1データを検索した場合に、エッジ点が検索されたと判断する構成としても良い。   In the image reading apparatus, in the read image extraction process, the control unit uses the read image in the predetermined range as the first data, and the read data having luminance lower than a threshold in the read image as the first data. In the read image, the read data having brightness higher than the threshold value is extracted as an edge image that is binarized data as second data, and in the detection unit side edge point search processing, the sub data is extracted from the start point. A configuration may be adopted in which it is determined that an edge point has been searched when the edge image is searched in the scanning direction and the first data continuous in the sub-scanning direction is searched.

画像読取装置では、通常、原稿が存在しない領域におけるエッジ画像は第2データとなり、原稿が存在する領域と原稿が存在しない領域の境界部分におけるエッジ画像は第1データとなることから、この違いを利用して境界部分、つまりエッジ点を検索することができる。しかし、原稿が存在しない領域におけるエッジ画像においても、ノイズ等により第1データが含まれることがあり、ノイズ等により第1データとなったエッジ画像を境界部分を読み取ったエッジ画像と誤検索してしまうと、原稿の傾きを正確に求めることができない。この画像読取装置によれば、副走査方向に連続した第1データを検索した場合に、エッジ点を検索するので、境界部分を誤検索してしまうことが抑制され、原稿の傾きを正確に求めることができる。   In the image reading apparatus, normally, the edge image in the area where the document does not exist becomes the second data, and the edge image in the boundary portion between the area where the document exists and the area where the document does not exist becomes the first data. The boundary part, that is, the edge point can be searched by using this. However, even in an edge image in an area where no document exists, the first data may be included due to noise or the like, and the edge image that becomes the first data due to noise or the like is erroneously searched as an edge image obtained by reading the boundary portion. If this happens, the inclination of the document cannot be obtained accurately. According to this image reading apparatus, since the edge point is searched when the first data continuous in the sub-scanning direction is searched, it is possible to prevent the boundary portion from being erroneously searched, and to accurately determine the inclination of the document. be able to.

また、上記の画像読取装置では、前記制御部は、前記検知部側エッジ点検索処理において、エッジ点が検索された後、前記開始点を前記検知部側に移動させて前記開始点から前記副走査方向に前記所定範囲に亘って検索してもエッジ点が検索されないことが連続して生じた場合に、エッジ点が検索されないと判断し、エッジ点の検索を終了する構成としても良い。   In the image reading apparatus, the control unit moves the start point to the detection unit side after the edge point is searched in the detection unit side edge point search process, and moves the start point to the sub point from the start point. A configuration may be adopted in which it is determined that the edge point is not searched when the edge point is not searched even if the search is performed over the predetermined range in the scanning direction, and the edge point search is terminated.

この画像読取装置によれば、検知部側に開始点を移動させてエッジ点が検索されないことが連続して生じた場合に、エッジ点の検索を終了するので、ノイズ等により1回だけエッジ点が検索されなかった場合にエッジ点の検索を終了してしまうことが抑制され、エッジ点の検索を終了するか否かを正確に判断することができる。   According to this image reading apparatus, when the start point is moved to the detection unit side and the edge point is not searched continuously, the search for the edge point is terminated. Therefore, the edge point is detected only once due to noise or the like. If the search for the edge point is not completed, the search for the edge point is suppressed, and it is possible to accurately determine whether or not the search for the edge point is terminated.

また、上記の画像読取装置では、前記制御部は、前記検知部側エッジ点検索処理において、前記基準読取画像でエッジ点が検索されない場合に、前記エッジ点が初めて検索された際の開始点へ移動する前の開始点の前記主走査方向の位置である第1位置を記憶するとともに、前記エッジ点の探索を終了した際の前記開始点の前記主走査方向の位置である第2位置を記憶し、前記制御部は、更に、前記読取画像のうち、前記主走査方向が前記第1位置となる点を開始点とし、前記開始点から前記主走査方向において前記検知部側にエッジ点を検索する基準位置側エッジ点検索処理と、前記読取画像のうち、前記主走査方向が前記第2位置となる点を開始点とし、前記開始点から前記主走査方向において前記検知部側と逆側にエッジ点を検索する端部側エッジ点検索処理と、前記傾き補正処理によって求められた傾きと、前記準位置側エッジ点検索処理及び前記端部側エッジ点検索処理によってそれぞれ求められたエッジ点とから、前記原稿の先端側の角位置を検出する原稿角位置検出処理と、前記原稿角位置検出処理によって求められた前記原稿の角位置から前記原稿の幅を求め、該幅から原稿のサイズを検出する原稿サイズ検出処理と、を実行する構成としても良い。   In the image reading apparatus, the control unit may return to a start point when the edge point is searched for the first time when an edge point is not searched in the reference read image in the detection unit side edge point search process. The first position that is the position in the main scanning direction of the start point before moving is stored, and the second position that is the position in the main scanning direction of the start point when the search for the edge point is completed is stored. The control unit further searches the edge of the read image from the point where the main scanning direction is the first position to the detection unit side in the main scanning direction from the start point. A reference position side edge point search process and a point in the read image where the main scanning direction is the second position as a starting point, and from the starting point to the side opposite to the detection unit side in the main scanning direction Search for edge points A leading edge of the original from the inclination obtained by the part side edge point search process, the inclination correction process, and the edge point obtained by the quasi-position side edge point search process and the end part side edge point search process, respectively. Document corner position detection processing for detecting the corner position on the side, and document size detection processing for obtaining the document width from the corner position of the document obtained by the document corner position detection processing, and detecting the document size from the width It is good also as a structure which performs.

この画像読取装置では、基準位置側エッジ点検索処理において主走査方向が第1位置となる点を開始点とし、読取画像の検知部側の端位置を開始点としない。また、端部側エッジ点検索処理において主走査方向が第2位置となる点を開始点とし、読取画像の検知部側と逆側の端位置を開始点としない。この画像読取装置では、読取画像の検知部側または検知部側と逆側における端位置を開始点としないことで、エッジ点の検索に必要な時間を短縮することができ、原稿のサイズを検出するまでの時間を短縮することができる。   In this image reading apparatus, a point at which the main scanning direction is the first position in the reference position side edge point search process is set as a start point, and an end position on the detection unit side of the read image is not set as a start point. Further, in the edge side edge point search process, the point at which the main scanning direction is the second position is set as the starting point, and the edge position on the opposite side to the detection unit side of the read image is not set as the starting point. In this image reading apparatus, the end position of the read image on the detection unit side or on the opposite side of the detection unit side is not used as a starting point, so that the time required for searching for the edge point can be shortened and the size of the document is detected. The time until it can be shortened.

また、上記の画像読取装置では、前記主走査方向の基準位置は、前記主走査方向の中点である構成としても良い。   In the image reading apparatus, the reference position in the main scanning direction may be a midpoint in the main scanning direction.

この画像読取装置では、主走査方向の基準位置を主走査方向の中点とするので、主走査方向の基準位置が主走査方向の中点よりも主走査方向の検知部側の逆側に存在する場合に比べて、検知部側エッジ点検索処理においてエッジ点の検索に必要な時間を短縮することができる。   In this image reading apparatus, since the reference position in the main scanning direction is set as the midpoint in the main scanning direction, the reference position in the main scanning direction exists on the opposite side of the detection unit side in the main scanning direction from the midpoint in the main scanning direction. Compared with the case where it does, in detection part side edge point search processing, the time required for search of an edge point can be shortened.

また、上記の画像読取装置では、更に、前記原稿が前記主走査方向の前記検知部側に載置される載置台を備え、前記検知部は、前記載置台に位置し、前記搬送部は、載置台に前記原稿が載置されたことを前記検知部が検知すると、前記載置台に載置された前記原稿を順に搬送する構成としても良い。   The image reading apparatus further includes a mounting table on which the document is mounted on the detection unit side in the main scanning direction, the detection unit is positioned on the mounting table, and the transport unit is When the detection unit detects that the document is placed on the placement table, the document placed on the placement table may be sequentially conveyed.

この画像読取装置では、搬送台の主走査方向の検知部側に原稿が載置され、載置台に位置する検知部によって、載置台に原稿が載置されたことが検知されると、当該原稿が搬送部により搬送され、読取部を用いて読み取られる。この画像読取装置によれば、名刺サイズなどの小さい原稿が搬送台の主走査方向の検知部側に載置され、読取部において原稿が載置されていない領域が比較的広い場合に、原稿の傾きを求めるまでの時間を短縮することができる。   In this image reading apparatus, when a document is placed on the detection unit side in the main scanning direction of the transport table, and the detection unit located on the placement table detects that the document is placed on the placement table, the document Is transported by the transport unit and read by the reading unit. According to this image reading apparatus, when a small document having a business card size or the like is placed on the detection unit side of the main scanning direction of the conveyance table, and the area where the document is not placed in the reading unit is relatively wide, The time until the inclination is obtained can be shortened.

本明細書によって開示される画像読取装置では、搬送される原稿の傾きを求めて傾き補正を行う場合に、原稿の傾きを求めるまでの時間を短縮することができる。   In the image reading apparatus disclosed in this specification, when the inclination of the conveyed document is obtained and the inclination correction is performed, the time until the inclination of the document is obtained can be shortened.

画像読取装置の断面図及び上面図Cross section and top view of image reading apparatus 画像読取装置の電気的構成を概略的に示すブロック図Block diagram schematically showing the electrical configuration of the image reading apparatus 読取処理を示すフローチャートFlow chart showing the reading process 傾き/原稿サイズ検出処理を示すフローチャートFlowchart showing skew / original size detection processing 右側先端エッジデータ検索処理を示すフローチャートFlow chart showing right end edge data search processing 副走査方向検索処理を示すフローチャートFlowchart showing sub-scanning direction search processing 原稿サイズ検出処理を示すフローチャートFlowchart showing document size detection processing 左側先端エッジデータ検索処理を示すフローチャートFlow chart showing left edge data search processing 主走査方向検索処理を示すフローチャートFlowchart showing main scanning direction search processing 右側先端エッジデータ検索処理を説明する図The figure explaining right front edge data search processing 右側先端エッジ画像を示す図Diagram showing right edge image 左側エッジデータ検索処理及び右側エッジデータ検索処理を説明する図The figure explaining left edge data search processing and right edge data search processing

<実施形態>
本発明の一実施形態を、図1ないし図12を用いて説明する。
<Embodiment>
An embodiment of the present invention will be described with reference to FIGS.

1.画像読取装置の機械的構成
図1に示すように、画像読取装置1は、ユーザにより給紙トレイ2に載置された複数の原稿Gを排紙トレイ4A、4Bに搬送するとともに、搬送中の原稿Gを本体部3に含まれるCIS30を用いて読み取るシートフィードスキャナである。給紙トレイ2は、載置台の一例である。
1. As shown in FIG. 1, the image reading apparatus 1 transports a plurality of documents G placed on a paper feed tray 2 by a user to paper discharge trays 4A and 4B, This is a sheet feed scanner that reads the original G using the CIS 30 included in the main body 3. The paper feed tray 2 is an example of a mounting table.

画像読取装置1の本体部3には、給紙トレイ2と排紙トレイ4を接続する搬送経路22が設けられており、この搬送経路22の周辺に、給紙ローラ40と、分離パッド42と、搬送ローラ44と、CIS30と、フロントセンサ(以下、Fセンサ)13と、リアセンサ(以下、Rセンサ)14と、排紙ローラ46と、切換板48と、を備える。CIS30は、読取部の一例であり、Fセンサ13は、検知部の一例である。   The main body 3 of the image reading apparatus 1 is provided with a conveyance path 22 that connects the paper feed tray 2 and the paper discharge tray 4. A paper feed roller 40, a separation pad 42, and the periphery of the conveyance path 22 are provided. , A transport roller 44, a CIS 30, a front sensor (hereinafter referred to as F sensor) 13, a rear sensor (hereinafter referred to as R sensor) 14, a paper discharge roller 46, and a switching plate 48. The CIS 30 is an example of a reading unit, and the F sensor 13 is an example of a detection unit.

給紙ローラ40は、給紙トレイ2に載置された原稿Gに当接し、摩擦力により、給紙トレイ2に載置された原稿Gを本体部3の内部へと引き込む。この際、原稿Gは、分離パッド42の摩擦力により各原稿G毎に分離され、搬送経路22へと送り出される。   The paper feed roller 40 abuts on the original G placed on the paper feed tray 2 and draws the original G placed on the paper feed tray 2 into the main body 3 by a frictional force. At this time, the document G is separated for each document G by the frictional force of the separation pad 42 and sent out to the conveyance path 22.

搬送ローラ44は、モータM(図2参照)により駆動され、本体部3の内部へと引き込まれた原稿Gを搬送経路22に沿って搬送する。CIS30は、その主走査方向D1が搬送経路22に沿った搬送方向D2に直交する姿勢で搬送経路22上の読取位置L1に配置され、読取位置L1を通過する原稿Gを読み取る。図1に上面視して示すように、CIS30の原稿Gと対向する上面に複数の読取素子31が主走査方向D1に並んで配置されており、これらの読取素子31を用いて原稿Gを読み取る。   The conveyance roller 44 is driven by a motor M (see FIG. 2) and conveys the original G drawn into the main body 3 along the conveyance path 22. The CIS 30 reads the document G that is disposed at the reading position L1 on the conveyance path 22 with the main scanning direction D1 orthogonal to the conveyance direction D2 along the conveyance path 22 and passes through the reading position L1. As shown in the top view in FIG. 1, a plurality of reading elements 31 are arranged in the main scanning direction D <b> 1 on the upper surface facing the original G of the CIS 30, and the original G is read using these reading elements 31. .

排紙ローラ46は、搬送ローラ44と同様にモータMにより駆動され、搬送経路22上に搬送された原稿Gを排紙トレイ4に送り出す。排紙ローラ46の搬送経路22を挟んで対向する位置に、切換板48が配置されている。切換板48は、切換部19(図2参照)により制御されており、排紙トレイ4Aへと続く第1搬送経路22Aに沿った第1姿勢F1と、排紙トレイ4Bへと続く第2搬送経路22Bに沿った第2姿勢F2と、のいずれか一方の姿勢となるように制御される。   The paper discharge roller 46 is driven by the motor M in the same manner as the transport roller 44, and sends the document G transported on the transport path 22 to the paper discharge tray 4. A switching plate 48 is disposed at a position facing the paper discharge roller 46 across the conveyance path 22. The switching plate 48 is controlled by the switching unit 19 (see FIG. 2), and the first posture F1 along the first transport path 22A continuing to the paper discharge tray 4A and the second transport continuing to the paper discharge tray 4B. The second posture F2 along the path 22B is controlled to be one of the postures.

第1搬送経路22Aと第2搬送経路22Bは、給紙トレイ2から排紙ローラ46に至る範囲において共通している。つまり、読取位置L1を共通するとともに、後述する検知位置L2を共通する。   The first transport path 22A and the second transport path 22B are common in the range from the paper feed tray 2 to the paper discharge roller 46. That is, the reading position L1 is shared and the detection position L2 described later is shared.

その一方、第1搬送経路22Aと第2搬送経路22Bは、排紙ローラ46から排紙トレイ4A、4Bに至る範囲において異なる。この範囲において、第1搬送経路22Aは、略直線状に設けられており、名刺などの比較的小型の原稿の搬送に用いられる。また、第2搬送経路22Bは、その一部が排紙ローラ46に沿って曲線状に設けられており、A4サイズなどの比較的大型の原稿の搬送に用いられる。   On the other hand, the first transport path 22A and the second transport path 22B are different in the range from the discharge roller 46 to the discharge trays 4A and 4B. In this range, the first transport path 22A is provided in a substantially straight line and is used for transporting a relatively small document such as a business card. Further, a part of the second transport path 22B is provided in a curved shape along the paper discharge roller 46, and is used for transporting a relatively large document such as A4 size.

切換板48が図1に実線で示す第1姿勢F1である場合、原稿Gは第1搬送経路22Aに沿って搬送され、排紙トレイ4Aに排紙される。一方、切換板48が図1に点線で示す第2姿勢F2である場合、原稿Gは第2搬送経路22Bに沿って搬送され、排紙トレイ4Bに排紙される。つまり、給紙ローラ40と搬送ローラ44と排紙ローラ46とによって、給紙トレイ2に載置された複数の原稿Gを搬送経路22に沿って搬送する搬送部15が形成されている。   When the switching plate 48 is in the first posture F1 indicated by the solid line in FIG. 1, the document G is transported along the first transport path 22A and discharged onto the discharge tray 4A. On the other hand, when the switching plate 48 is in the second posture F2 indicated by the dotted line in FIG. 1, the document G is transported along the second transport path 22B and discharged onto the paper discharge tray 4B. That is, the paper feed roller 40, the transport roller 44, and the paper discharge roller 46 form a transport unit 15 that transports a plurality of documents G placed on the paper feed tray 2 along the transport path 22.

Fセンサ13は、給紙トレイ2に配置され、給紙トレイ2に原稿Gが載置された場合にオンし、給紙トレイ2に原稿Gが載置されていない場合にオフする。つまり、Fセンサ13は、搬送経路22において読取位置L1よりも上流側の検知位置L2に配置され、給紙トレイ2に原稿Gが有るか否かを検知する。Rセンサ14は、搬送経路22において読取位置L1よりも上流側であり、検知位置L2よりも下流側の検知位置L3に配置され、原稿Gが搬送経路22上の検知位置L3を通過する場合にオンし、原稿Gが検知位置L3を通過していない場合にオフする。   The F sensor 13 is disposed in the paper feed tray 2 and is turned on when the original G is placed on the paper feed tray 2, and is turned off when the original G is not placed on the paper feed tray 2. That is, the F sensor 13 is disposed at the detection position L2 upstream of the reading position L1 in the transport path 22 and detects whether or not the document G is present on the paper feed tray 2. The R sensor 14 is disposed at a detection position L3 upstream of the reading position L1 and downstream of the detection position L2 in the transport path 22 and when the document G passes the detection position L3 on the transport path 22. Turns on and turns off when the document G has not passed the detection position L3.

図1に上面視して示すように、本実施形態では、原稿Gは給紙トレイ2に対して主走査方向の右側基準で載置され、主走査方向D1において、一点鎖線で示す中心線Pよりも右側に配置されたFセンサ13によって原稿Gの有無が検知される。そして、Fセンサ13により原稿Gが検知されると、搬送部15により原稿Gが搬送され、CIS30が有する複数の読取素子31によって原稿Gが読み取られる。中心線Pが配された主走査方向D1の中点が、基準位置の一例である。また、中心線Pよりも右側が、主走査方向D1の基準位置の片側の一例であり、主走査方向D1の検知部側の一例である。本実施形態において、主走査方向D1の検知部側は、主走査方向D1と等しい。   As shown in the top view in FIG. 1, in the present embodiment, the document G is placed on the paper feed tray 2 on the right reference in the main scanning direction, and the center line P indicated by a one-dot chain line in the main scanning direction D1. Further, the presence or absence of the document G is detected by the F sensor 13 arranged on the right side. When the document G is detected by the F sensor 13, the document G is transported by the transport unit 15, and the document G is read by the plurality of reading elements 31 included in the CIS 30. The midpoint of the main scanning direction D1 in which the center line P is arranged is an example of the reference position. The right side of the center line P is an example of one side of the reference position in the main scanning direction D1, and an example of the detection unit side in the main scanning direction D1. In the present embodiment, the detection unit side in the main scanning direction D1 is equal to the main scanning direction D1.

そのため、図2に実線で示すように、原稿Gが名刺などの小型の原稿である場合、原稿Gは中心線Pよりも右側に載置される。この場合、原稿Gの画像は、CIS30の複数の読取素子31のうち、中心線P上の基準読取素子31Kよりも右側に配置された右側読取素子31Rにより読み取られる。   Therefore, as shown by a solid line in FIG. 2, when the document G is a small document such as a business card, the document G is placed on the right side of the center line P. In this case, the image of the original G is read by the right reading element 31R arranged on the right side of the reference reading element 31K on the center line P among the plurality of reading elements 31 of the CIS 30.

一方、図2に二点鎖線で示すように、原稿GがA4サイズなどの大型の原稿である場合、原稿Gは中心線Pを亘って両側に載置される。この場合、原稿Gの画像は、基準読取素子31K、右側読取素子31Rに加えて、基準読取素子31Kよりも左側に配置された左側読取素子31Lにより読み取られる。基準読取素子31Kよりも左側は、主走査方向D1の検知部側と逆側の一例である。本実施形態において、主走査方向D1の検知部側と逆側は、主走査方向D1の逆側と等しい。   On the other hand, as shown by a two-dot chain line in FIG. 2, when the document G is a large document such as an A4 size, the document G is placed on both sides across the center line P. In this case, the image of the original G is read by the left side reading element 31L disposed on the left side of the reference reading element 31K in addition to the reference reading element 31K and the right side reading element 31R. The left side of the reference reading element 31K is an example opposite to the detection unit side in the main scanning direction D1. In the present embodiment, the detection unit side and the opposite side in the main scanning direction D1 are equal to the opposite side in the main scanning direction D1.

さらに、画像読取装置1には、各種のボタンからなり、ユーザからの操作入力を受け付ける入力部11、画像読取装置1の状態を表示する液晶ディスプレイからなる表示部12が設けられている(図2参照)。   Furthermore, the image reading apparatus 1 includes an input unit 11 that includes various buttons and receives an operation input from a user, and a display unit 12 that includes a liquid crystal display that displays the state of the image reading apparatus 1 (FIG. 2). reference).

2.画像読取装置の電気的構成
図3に示すように、画像読取装置1は、中央処理装置(以下、CPU)20、ROM26、RAM27、画像処理部28、デバイス制御部16、アナログフロントエンド(以下、AFE)17、駆動回路18を備え、これらにバス29を介して、入力部11、表示部12、切換部19、Fセンサ13、Rセンサ14、などが接続されている。図3に点線21で示すように、CPU20と、ROM26と、RAM27と、画像処理部28を含めたものが、制御部の一例である。
2. As shown in FIG. 3, the image reading apparatus 1 includes a central processing unit (hereinafter referred to as “CPU”) 20, a ROM 26, a RAM 27, an image processing unit 28, a device control unit 16, an analog front end (hereinafter referred to as “CPU”). AFE) 17 and a drive circuit 18, to which an input unit 11, a display unit 12, a switching unit 19, an F sensor 13, an R sensor 14, and the like are connected via a bus 29. As shown by a dotted line 21 in FIG. 3, the control unit includes the CPU 20, the ROM 26, the RAM 27, and the image processing unit 28.

ROM26には、画像読取装置1の動作を制御するための各種のプログラムが記憶されており、CPU20は、ROM26から読み出したプログラムに従って各部の制御を行う。デバイス制御部16は、CIS30に接続されており、CPU20からの命令に基づいて読取制御信号をCIS30に送信する。CIS30は、デバイス制御部16からの読取制御信号に基づいて、予め定められた読取領域H(図10参照)に亘って原稿Gを読み取る。   The ROM 26 stores various programs for controlling the operation of the image reading apparatus 1, and the CPU 20 controls each unit according to the program read from the ROM 26. The device control unit 16 is connected to the CIS 30 and transmits a read control signal to the CIS 30 based on a command from the CPU 20. The CIS 30 reads the document G over a predetermined reading area H (see FIG. 10) based on the reading control signal from the device control unit 16.

CIS30は、搬送経路22の読取位置L1を搬送される原稿Gに対して、各読取素子31を用いて読取領域Hに亘って繰り返し読取データを取得する。これにより、CIS30は、主走査方向D1及び主走査方向D1と直交する副走査方向D3に複数の読取データが並んで配置されて構成される読取画像G1(図10参照)を読み取ると、読取画像G1をAFE15に出力する。図10に示すように、読取画像G1の各読取データには、当該読取データが読み取られた受光素子及びタイミングに基づいて、主走査方向D1に延びるX軸方向のX座標、及び副走査方向D3に延びるY軸方向のY座標が設定される。   The CIS 30 repeatedly obtains read data over the reading region H using the reading elements 31 for the document G conveyed on the reading position L1 of the conveying path 22. Accordingly, when the CIS 30 reads a read image G1 (see FIG. 10) configured by arranging a plurality of read data in the main scanning direction D1 and the sub-scanning direction D3 orthogonal to the main scanning direction D1, the read image is read. G1 is output to AFE15. As shown in FIG. 10, each read data of the read image G1 includes an X coordinate in the X-axis direction extending in the main scanning direction D1 and a sub-scanning direction D3 based on the light receiving element and the timing at which the read data is read. The Y coordinate in the Y-axis direction extending in the direction is set.

AFE17は、CIS30に接続されており、CPU20からの命令に基づいて、CIS30から出力されるアナログ信号である読取データをデジタル信号である階調データに変換する。AFE15は、変換した階調データを、バス29を介してRAM27に記憶する。   The AFE 17 is connected to the CIS 30 and converts read data that is an analog signal output from the CIS 30 into gradation data that is a digital signal based on a command from the CPU 20. The AFE 15 stores the converted gradation data in the RAM 27 via the bus 29.

画像処理部28は、RAM27に記憶された階調データに2値化処理やエンハンス処理等のエッジ抽出処理を行い、エッジ画像G2に変換する。画像処理部28は、2値化処理において、予め記憶された閾値と各読取データを比較し、閾値よりも低い輝度を有する読取データを「1」に変換し、閾値よりも高い輝度を有する読取データを「0」に変換する。そのため、エッジ画像G2は、「0」と「1」で表される2値化データとなる。「1」は、第1データの一例であり、「0」は、第2データの一例である。また、画像処理部28は、RAM27に記憶された階調データに傾き補正やトリミング処理等の補正処理を行う。画像処理部28により変換されたエッジ画像G2は、RAM27に記憶される。   The image processing unit 28 performs edge extraction processing such as binarization processing and enhancement processing on the gradation data stored in the RAM 27 and converts it into an edge image G2. In the binarization process, the image processing unit 28 compares each reading data with a threshold value stored in advance, converts the reading data having a luminance lower than the threshold value to “1”, and reads the reading data having a luminance higher than the threshold value. Convert data to “0”. Therefore, the edge image G2 is binarized data represented by “0” and “1”. “1” is an example of the first data, and “0” is an example of the second data. Further, the image processing unit 28 performs correction processing such as tilt correction and trimming processing on the gradation data stored in the RAM 27. The edge image G2 converted by the image processing unit 28 is stored in the RAM 27.

駆動回路18は、モータMに接続されており、CPU20からの命令に基づいてパルス信号をモータMに送信する。モータMは、パルス信号の1パルスで、1ステップの回転角度分、回転駆動する。モータMが1ステップ分駆動すると、搬送ローラ44及び排紙ローラ46が駆動し、搬送経路22上を原稿Gが所定距離の分だけ搬送される。CPU20は、原稿Gを搬送する際に、駆動回路18を介してパルス信号をモータMに送信し、これに従って搬送部15は、そのパルス信号のパルスの数に規定距離を掛けた距離だけ原稿Gを搬送する。以後、駆動回路18がモータMに送信するパルス信号のパルスの数を、ステップ数と呼ぶ。   The drive circuit 18 is connected to the motor M and transmits a pulse signal to the motor M based on a command from the CPU 20. The motor M is driven to rotate by one rotation angle with one pulse of the pulse signal. When the motor M is driven by one step, the transport roller 44 and the paper discharge roller 46 are driven, and the original G is transported on the transport path 22 by a predetermined distance. When conveying the original G, the CPU 20 transmits a pulse signal to the motor M via the drive circuit 18, and the conveying unit 15 accordingly follows the original G by a distance obtained by multiplying the number of pulses of the pulse signal by a specified distance. Transport. Hereinafter, the number of pulses of the pulse signal that the drive circuit 18 transmits to the motor M is referred to as a step number.

3.読取処理
次に、図3ないし図12を参照して、画像読取装置1における原稿Gの読取処理について説明する。本実施形態では、原稿Gとして、図10に実線で示す名刺を読み取る処理について主に説明する。
3. Reading Process Next, the reading process of the document G in the image reading apparatus 1 will be described with reference to FIGS. In the present embodiment, a process of reading a business card indicated by a solid line in FIG.

図3は、CPU20が所定のプログラムに従って実行する読取処理のフローチャートを示す。CPU20は、給紙トレイ2に原稿Gが載置されたことがFセンサ13により検知され、入力部11を介して使用者から原稿Gの読取指示が入力されると、処理を開始する。   FIG. 3 shows a flowchart of a reading process executed by the CPU 20 according to a predetermined program. The CPU 20 starts processing when the F sensor 13 detects that the original G is placed on the paper feed tray 2 and an instruction to read the original G is input from the user via the input unit 11.

CPU20は、読取処理を開始すると、駆動回路18を用いてモータMにパルス信号を送信して原稿Gの搬送を開始する(S2)とともに、ステップ数をカウントする。CPU20は、Rセンサ14を用いて搬送中の原稿Gの位置を検知し(S4:NO)、Rセンサ14がオン(S4:YES)すると、搬送経路22上の検知位置L3に原稿Gの搬送方向D2の先端が到達したことを検知する。CPU20は、Rセンサ14がオンしてから第1ステップ数ST1がカウントされた後に原稿Gの読み取りを開始する(S6)。   When the reading process is started, the CPU 20 transmits a pulse signal to the motor M using the drive circuit 18 to start conveying the original G (S2) and counts the number of steps. The CPU 20 detects the position of the document G being conveyed using the R sensor 14 (S4: NO), and when the R sensor 14 is turned on (S4: YES), the document G is conveyed to the detection position L3 on the conveyance path 22. It is detected that the tip in the direction D2 has arrived. The CPU 20 starts reading the document G after the first step number ST1 is counted after the R sensor 14 is turned on (S6).

CPU20は、原稿Gの読み取りを開始すると、まず、読取領域Hの先端側に設定された先端読取領域SHの先端読取画像SG1を読み取る読取画像抽出処理を実行する。図10に示すように、先端読取領域SHは、副走査方向D3における幅Wが、原稿Gの搬送方向D2の先端を含む範囲に設定されている。そのため、先端読取画像SG1には、原稿Gの先端エッジ、つまり原稿Gの搬送方向D2における先端辺を読み取った画像が含まれる。先端読取領域SHは、所定範囲の一例である。   When the reading of the document G is started, the CPU 20 first executes a read image extraction process for reading the front end read image SG1 of the front end read area SH set on the front end side of the read area H. As shown in FIG. 10, in the leading edge reading area SH, the width W in the sub-scanning direction D3 is set in a range including the leading edge in the conveyance direction D2 of the document G. For this reason, the leading edge read image SG1 includes an image obtained by reading the leading edge of the document G, that is, the leading edge in the conveyance direction D2 of the document G. The leading edge reading area SH is an example of a predetermined range.

また、CPU20は、画像処理部28を用いて先端読取画像SG1にエッジ抽出処理を実行する(S8)。CPU20は、先端読取領域SHの幅Wに相当する第2ステップ数ST2がカウントされるまで、先端読取画像SG1の読み取り及びエッジ抽出処理を繰り返す(S10:NO)。CPU20は、第2ステップ数ST2がカウントされると(S10:YES)、先端読取画像SG1をエッジ抽出処理した先端エッジ画像SG2をRAM27に記憶し、原稿Gの傾きθ及び原稿サイズZを検出する傾き/原稿サイズ検出処理(S12)を実行する。CPU20は、当該処理を、先端読取領域SHの読取後、読取領域Hの読取完了前に実行する。   Further, the CPU 20 executes an edge extraction process on the leading edge read image SG1 using the image processing unit 28 (S8). The CPU 20 repeats the reading of the leading edge reading image SG1 and the edge extraction processing until the second step number ST2 corresponding to the width W of the leading edge reading region SH is counted (S10: NO). When the second step number ST2 is counted (S10: YES), the CPU 20 stores the leading edge image SG2 obtained by performing edge extraction processing on the leading edge read image SG1 in the RAM 27, and detects the inclination θ of the document G and the document size Z. An inclination / original size detection process (S12) is executed. The CPU 20 executes the processing after reading the leading edge reading area SH and before reading of the reading area H is completed.

(傾き/原稿サイズ検出処理)
図4に、傾き/原稿サイズ検出処理のフローチャートを示す。傾き/原稿サイズ検出処理において、CPU20は、RAM27から先端エッジ画像SG2を読み出し(S32)、画像処理部28を用いて原稿Gの先端エッジに当たる読取データである先端エッジデータを検索する処理を実行する。先端エッジデータは、エッジ点の一例である。
(Tilt / document size detection processing)
FIG. 4 shows a flowchart of the tilt / original size detection process. In the inclination / document size detection process, the CPU 20 reads the leading edge image SG2 from the RAM 27 (S32), and executes processing for searching for leading edge data that is read data corresponding to the leading edge of the document G using the image processing unit 28. . The leading edge data is an example of an edge point.

当該処理において、CPU20は、まず、先端エッジ画像SG2のうち、基準読取素子31K及び右側読取素子31Rを用いて読み取られた右側先端エッジ画像SGR(図11参照)に対して先端エッジデータを検索する右側先端エッジデータ検索処理を実行する(S34)。右側先端エッジ画像SGRには、基準読取素子31Kを用いて読み取られた基準先端エッジ画像SGKが含まれる。右側先端エッジ画像SGRは、検知部側読取画像の一例であり、基準先端エッジ画像SGKは、基準読取画像の一例である。また、右側先端エッジデータ検索処理は、検知部側エッジ点検索処理の一例である。   In this processing, the CPU 20 first searches for the leading edge data for the right leading edge image SGR (see FIG. 11) read using the reference reading element 31K and the right reading element 31R in the leading edge image SG2. A right edge data search process is executed (S34). The right leading edge image SGR includes a reference leading edge image SGK read using the reference reading element 31K. The right front edge image SGR is an example of a detection unit side read image, and the reference front edge image SGK is an example of a reference read image. The right tip edge data search process is an example of a detection unit side edge point search process.

(右側先端エッジデータ検索処理)
図5に、右側先端エッジデータ検索処理のフローチャートを示す。右側原稿先端エッジ探索処理において、CPU20は、検索された先端エッジデータの数を示す検索データ数B、及び検索を失敗した回数を示す失敗カウンタNをゼロにし(S52、S54)、当該処理の開始時における開始点を(XM、Y0)に設定する(S56)。図10に示すように、先端読取画像SG1及び先端エッジ画像SG2では、図面右上角の座標は(X0、Y0)で表され、図面左下角の座標は(XMAX、YT)で表される。XMは、X0とXMAXの中点を意味しており、Y0は、CIS30によって副走査方向D3に先に読み取られた側の端における読取データのY座標を意味する。先端エッジデータ検索処理では、開始点のY座標はY0に設定される。
(Right edge data search process)
FIG. 5 shows a flowchart of the right edge data search process. In the right document front edge search process, the CPU 20 sets the search data number B indicating the number of searched front edge data and the failure counter N indicating the number of search failures to zero (S52, S54), and starts the process. The starting point at the time is set to (XM, Y0) (S56). As shown in FIG. 10, in the leading edge read image SG1 and the leading edge image SG2, the coordinates of the upper right corner of the drawing are represented by (X0, Y0), and the coordinates of the lower left corner of the drawing are represented by (XMAX, YT). XM means the midpoint between X0 and XMAX, and Y0 means the Y coordinate of the read data at the end that was previously read by the CIS 30 in the sub-scanning direction D3. In the leading edge data search process, the Y coordinate of the start point is set to Y0.

CPU20は、現在の開始点のX座標がXMAX以下であるかを確認し(S58)、現在の開始点のX座標がXMAXよりも大きい場合(S58:NO)、右側先端エッジデータ検索処理を終了する。一方、現在の開始点のX座標がXMAX以下である場合(S58:YES)、開始点から副走査方向D3に検索点を移動させて先端エッジデータを検索する副走査方向検索処理を実行する(S60)。   The CPU 20 confirms whether or not the X coordinate of the current start point is less than or equal to XMAX (S58). If the X coordinate of the current start point is greater than XMAX (S58: NO), the right end edge data search process ends. To do. On the other hand, when the X coordinate of the current start point is equal to or less than XMAX (S58: YES), a sub-scan direction search process is performed in which the search point is moved from the start point to the sub-scan direction D3 to search for the leading edge data ( S60).

(副走査方向検索処理)
図6に、副走査方向検索処理のフローチャートを示す。副走査方向検索処理の開始時において、検索点は開始点に等しい。副走査方向検索処理において、CPU20は、今回の検索点における読取データを確認する(S82)。
(Sub-scan direction search process)
FIG. 6 shows a flowchart of the sub-scanning direction search process. At the start of the sub-scanning direction search process, the search point is equal to the start point. In the sub-scanning direction search process, the CPU 20 checks the read data at the current search point (S82).

図11は、図10に示す先端エッジ画像SG2を、各読取データが視認できる程度に拡大した拡大図である。図11に示すように、先端エッジ画像SG2では、通常、原稿Gが存在しない領域を読み取った読取データは「0」の2値化データで表され、先端エッジデータは「1」の2値化データで表される。図11では、「0」の2値化データについては表示を省略し、「1」の2値化データを黒点で表示している。また、先端エッジデータなどのエッジデータは、主走査方向及び副走査方向において連続した2個の「1」の2値化データによって表され、主走査方向及び副走査方向に連続して発生することがない孤立点Bと区別される。   FIG. 11 is an enlarged view in which the leading edge image SG2 shown in FIG. 10 is enlarged to such an extent that each read data can be visually recognized. As shown in FIG. 11, in the leading edge image SG2, the read data obtained by reading a region where the document G does not exist is normally represented by binary data “0”, and the leading edge data is binarized by “1”. Represented by data. In FIG. 11, the display of the binarized data “0” is omitted, and the binarized data “1” is displayed as a black dot. Also, edge data such as leading edge edge data is represented by two binary data “1” that are continuous in the main scanning direction and the sub-scanning direction, and is generated continuously in the main scanning direction and the sub-scanning direction. It is distinguished from an isolated point B that has no.

CPU20は、今回の検索点が「0」である場合(S84:NO)、今回の検索点のY座標に1を加え、次回の検索点とする(S96)。CPU20は、次回の検索点のY座標がYTよりも大きいかを確認し(S98)、次回の検索点のY座標がYTよりも大きい場合(S98:YES)、検索成功フラグFをオフし(S100)、副走査方向検索処理を終了する。これにより、現在の開始点からの副走査方向検索処理において、先端エッジデータが検索されなかったことが示される。一方、次回の検索点のY座標がYT以下である場合(S98:NO)、S82からの処理を繰り返す。   When the current search point is “0” (S84: NO), the CPU 20 adds 1 to the Y coordinate of the current search point and sets it as the next search point (S96). The CPU 20 checks whether or not the Y coordinate of the next search point is larger than YT (S98), and when the Y coordinate of the next search point is larger than YT (S98: YES), the search success flag F is turned off ( S100), the sub-scanning direction search process is terminated. This indicates that the leading edge data has not been searched in the sub-scanning direction search process from the current start point. On the other hand, when the Y coordinate of the next search point is YT or less (S98: NO), the processing from S82 is repeated.

また、CPU20は、今回の検索点が「1」である場合(S84:YES)、今回の検索点の座標をRAM27に一時的に記憶する(S86)。次に、CPU20は、今回の検索点のY座標がY0よりも大きいかを確認する(S88)。CPU20は、今回の検索点のY座標がY0である場合(S88:NO)、現在の開始点からの副走査方向検索処理において、複数の検索が行われておらず、先端エッジデータの正確な検索が困難なことから、S96からの処理を繰り返す。   If the current search point is “1” (S84: YES), the CPU 20 temporarily stores the coordinates of the current search point in the RAM 27 (S86). Next, the CPU 20 checks whether or not the Y coordinate of the current search point is larger than Y0 (S88). If the Y coordinate of the current search point is Y0 (S88: NO), the CPU 20 has not performed a plurality of searches in the sub-scanning direction search process from the current start point, and the leading edge data is accurate. Since the search is difficult, the processing from S96 is repeated.

一方、CPU20は、今回の検索点のY座標がY0よりも大きい場合(S88:YES)、前回の検索点が「1」であったかを確認する(S90)。具体的には、CPU20は、RAM27に前回の検索点の座標が記憶されているかを確認する。CPU20は、前回の検索点が「0」であった場合(S90:NO)、先端エッジデータか孤立点Bかの区別が困難なことから、S96からの処理を繰り返す。   On the other hand, when the Y coordinate of the current search point is larger than Y0 (S88: YES), the CPU 20 checks whether the previous search point was “1” (S90). Specifically, the CPU 20 checks whether or not the coordinates of the previous search point are stored in the RAM 27. When the previous search point is “0” (S90: NO), the CPU 20 repeats the processing from S96 because it is difficult to distinguish the tip edge data from the isolated point B.

CPU20は、前回の検索点が「1」であった場合(S90:YES)、副走査方向D3に連続した「1」の2値化データが検索されたことから、先端エッジデータが検索されたと判断する。CPU20は、今回の検索点の座標を先端エッジデータの座標としてRAM27に記憶し(S92)、検索成功フラグFをオンして(S94)、副走査方向検索処理を終了する。これにより、現在の開始点からの副走査方向検索処理において、先端エッジデータが検索されたことが示される。   When the previous search point is “1” (S90: YES), the CPU 20 searches for binary data of “1” continuous in the sub-scanning direction D3, so that the edge data is searched. to decide. The CPU 20 stores the coordinates of the current search point in the RAM 27 as the coordinates of the leading edge data (S92), turns on the search success flag F (S94), and ends the sub-scanning direction search process. This indicates that the leading edge data has been searched in the sub-scanning direction search processing from the current start point.

CPU20は、副走査方向検索処理を終了すると、図5に示す右側先端エッジデータ検索処理に戻り、終了した副走査方向検索処理において先端エッジデータが検索されたかを確認する(S62)。CPU20は、検索成功フラグFがオンされており、先端エッジデータが検索された場合(S62:YES)、検索データ数Bに1を加えるとともに失敗カウンタNをゼロにする(S64)。   When the sub-scanning direction search process is completed, the CPU 20 returns to the right front-end edge data search process shown in FIG. 5, and confirms whether the front-end edge data has been searched in the completed sub-scan direction search process (S62). When the search success flag F is turned on and the leading edge data is searched (S62: YES), the CPU 20 adds 1 to the search data number B and sets the failure counter N to zero (S64).

また、CPU20は、現在の開始点のX座標に15を加え、次回の開始点とし(S66)、S58からの処理を繰り返す。つまり、CPU20は、開始点を主走査方向D1に15毎に移動させて、先端エッジデータの検索を繰り返す。開始点のX座標に加える15は、基準データ数の一例である。   Further, the CPU 20 adds 15 to the X coordinate of the current start point, sets it as the next start point (S66), and repeats the processing from S58. That is, the CPU 20 moves the start point every 15 in the main scanning direction D1, and repeats the search for the leading edge data. 15 added to the X coordinate of the start point is an example of the number of reference data.

一方、CPU20は、検索成功フラグFがオフされており、先端エッジデータが検索されなかった場合(S62:NO)、更に検索データ数Bを確認する(S68)。CPU20は、検索データ数Bがゼロであり(S68:YES)、右側先端エッジデータ検索処理において未だに先端エッジデータが検索されていない場合、失敗カウンタNを増加させることなく、処理を続行する。これによって、先端エッジデータが検索される前に、失敗カウンタNの増加により右側先端エッジデータ検索処理が終了してしまうことが防止され、先端エッジデータが検索されるまで副走査方向検索処理が繰り返される。   On the other hand, when the search success flag F is off and the leading edge data is not searched (S62: NO), the CPU 20 further checks the search data number B (S68). If the number of search data B is zero (S68: YES) and the tip edge data has not been searched yet in the right tip edge data search process, the CPU 20 continues the process without increasing the failure counter N. As a result, the right edge data search process is prevented from ending due to an increase in the failure counter N before the edge data is searched, and the sub-scanning direction search process is repeated until the edge data is searched. It is.

CPU20は、現在の開始点のX座標を左側外部座標T1としてRAM27に記憶し(S70)、S66からの処理を繰り返す。ここで、左側外部座標T1は先端エッジデータが初めて検索された開始点へ移動する前の開始点のX座標を意味する。つまり、次のS66からの処理において、先端エッジデータが初めて検索された場合、左側外部座標T1は先端エッジデータが初めて検索された開始点へ移動する前の開始点のX座標となる。また、次のS66からの処理においても先端エッジデータが初めて検索されなかった場合、左側外部座標T1が順次更新されることで、左側外部座標T1は先端エッジデータが初めて検索された開始点へ移動する前の開始点のX座標となる。左側外部座標T1は、第1位置の一例である。   The CPU 20 stores the X coordinate of the current start point in the RAM 27 as the left external coordinate T1 (S70), and repeats the processing from S66. Here, the left external coordinate T1 means the X coordinate of the start point before the tip edge data is moved to the start point searched for the first time. That is, in the next processing from S66, when the leading edge data is searched for the first time, the left external coordinate T1 becomes the X coordinate of the starting point before moving to the starting point where the leading edge data is searched for the first time. Also, in the next processing from S66, if the tip edge data is not searched for the first time, the left external coordinate T1 is sequentially updated, so that the left external coordinate T1 moves to the starting point where the tip edge data is searched for the first time. This is the X coordinate of the starting point before starting. The left external coordinate T1 is an example of a first position.

一方、CPU20は、検索データ数Bがゼロでなく(S68:YES)、右側先端エッジデータ検索処理において既に先端エッジデータが検索されている場合、失敗カウンタNに1を加え(S72)、失敗カウンタNを確認する(S74)。CPU20は、失敗カウンタNが1である場合(S74:NO)、つまり先端エッジデータが検索されないことが連続して生じていない場合には、検索されない原因がノイズ等である可能性があることから、S66からの処理を繰り返す。   On the other hand, when the search data number B is not zero (S68: YES) and the leading edge data has already been searched in the right edge data search process, the CPU 20 adds 1 to the failure counter N (S72), and the failure counter N is confirmed (S74). When the failure counter N is 1 (S74: NO), that is, when the leading edge data is not continuously searched for, the CPU 20 may be caused by noise or the like. , The process from S66 is repeated.

また、CPU20は、失敗カウンタNが2である場合(S74:YES)、つまり先端エッジデータが検索されないことが連続して生じている場合には、これ以上検索を繰り返しても先端エッジデータが検索されないと判断する。CPU20は、現在の開始点のX座標を右側外部座標T2としてRAM27に記憶し(S76)、右側先端エッジデータ検索処理を終了する。   Further, when the failure counter N is 2 (S74: YES), that is, when it is continuously occurring that the leading edge data is not retrieved, the leading edge data is retrieved even if the retrieval is repeated further. Judge that it is not. The CPU 20 stores the X coordinate of the current start point as the right external coordinate T2 in the RAM 27 (S76), and ends the right tip edge data search process.

CPU20は、右側先端エッジデータ検索処理を終了すると、図4に示す傾き/原稿サイズ検出処理に戻り、終了した右側先端エッジデータ検索処理において基準先端エッジ画像SGKで先端エッジデータが検索されたかを確認する(S36)。具体的には、CPU20は、RAM27にX座標がXMとなる先端エッジデータの座標が記憶されているかを確認する。   When the right front edge data search process is completed, the CPU 20 returns to the inclination / document size detection process shown in FIG. 4 and confirms whether the front edge data has been searched from the reference front edge image SGK in the completed right front edge data search process. (S36). Specifically, the CPU 20 checks whether or not the coordinates of the leading edge data whose X coordinate is XM are stored in the RAM 27.

CPU20は、図10に二点鎖線で示すように、基準先端エッジ画像SGKで先端エッジデータが検索された場合(S36:YES)、左側読取素子31Lを用いて読み取られた左側先端エッジ画像SGL(図11参照)に対して先端エッジデータを検索する左側先端エッジデータ検索処理を実行する(S38)。   As shown by a two-dot chain line in FIG. 10, when the leading edge data is searched for in the reference leading edge image SGK (S36: YES), the CPU 20 reads the left leading edge image SGL (using the left reading element 31L) 11), the left edge data search process for searching for the edge data is executed (S38).

(左側先端エッジデータ検索処理)
左側先端エッジデータ検索処理は、開始点を(XM−15、Y0)に設定する点(S56)、現在の開始点のX座標がX0以上であるかを確認する点(S58)、及び現在の開始点のX座標から15を減じ、次回の開始点とする点(S66)を除いて右側先端エッジデータ検索処理と同一であり、重複した説明を省略する。左側先端エッジデータ検索処理を実行する場合、右側先端エッジデータ検索処理において左側外部座標T1がRAM27に記憶されない。この場合、CPU20は、左側先端エッジデータ検索処理で検索された外部座標Tを左側外部座標T1としてRAM27に記憶する(S76)。
(Left edge data search processing)
The left edge data search processing includes a point (S56) for setting the start point to (XM-15, Y0), a point for checking whether the X coordinate of the current start point is equal to or greater than X0 (S58), and the current point Subtract 15 from the X coordinate of the start point, and is the same as the right end edge data search processing except for the next start point (S66), and redundant description is omitted. When the left tip edge data search process is executed, the left external coordinate T1 is not stored in the RAM 27 in the right tip edge data search process. In this case, the CPU 20 stores the external coordinate T searched in the left end edge data search process as the left external coordinate T1 in the RAM 27 (S76).

CPU20は、左側先端エッジデータ検索処理を実行した場合、右側先端エッジデータ検索処理及び左側先端エッジデータ検索処理の両方の先端エッジデータ検索処理において検索された先端エッジデータを用いて、後述する原稿Gの傾きθを求める処理を実行する(S42)。   When the CPU 20 executes the left front edge data search process, the CPU 20 uses the front edge data searched in both the right front edge data search process and the left front edge data search process to use a document G, which will be described later. A process for obtaining the inclination θ of is performed (S42).

一方、CPU20は、図10に実線で示すように、基準先端エッジ画像SGKで先端エッジデータが検索されない場合(S36:NO)、左側先端エッジデータ検索処理を実行することなく、右側先端エッジデータ検索処理において検索された先端エッジデータを用いて、後述する原稿Gの傾きθを求める処理を実行する(S42)。   On the other hand, as shown by the solid line in FIG. 10, when the tip edge data is not searched for in the reference tip edge image SGK (S36: NO), the CPU 20 searches for the right tip edge data without executing the left tip edge data search process. Using the leading edge data retrieved in the process, a process for obtaining the inclination θ of the document G, which will be described later, is executed (S42).

CPU20は、原稿Gの主走査方向D1に対する傾きθを求める処理において、RAM27から先端エッジデータの座標を読み出す(S40)。CPU20は、左側先端エッジデータ検索処理が実行されている場合、右側先端エッジデータ検索処理及び左側先端エッジデータ検索処理において検索された先端エッジデータの座標を読み出し、左側先端エッジデータ検索処理が実行されていない場合、右側先端エッジデータ検索処理において検索された先端エッジデータの座標を読み出す。   The CPU 20 reads the coordinates of the leading edge data from the RAM 27 in the process of obtaining the inclination θ of the document G with respect to the main scanning direction D1 (S40). When the left front edge data search process is being executed, the CPU 20 reads the coordinates of the front edge data searched in the right front edge data search process and the left front edge data search process, and the left front edge data search process is executed. If not, the coordinates of the leading edge data retrieved in the right leading edge data retrieval process are read out.

CPU20は、読み出した先端エッジデータの座標を直線近似し、算出された直線式をRAM27に記憶する。算出された直線式は、X軸及びY軸を用いて表わされ、直線式の傾きは、X軸方向、つまり主走査方向D1に対する傾きを表す。CPU20は、算出された直線式の傾きを、原稿Gの主走査方向D1に対する傾きθとして検出し(S42)、次に、原稿サイズZを検出する原稿サイズ検出処理を実行する(S44)。   The CPU 20 linearly approximates the coordinates of the read leading edge data and stores the calculated linear equation in the RAM 27. The calculated linear expression is expressed using the X axis and the Y axis, and the inclination of the linear expression indicates the inclination with respect to the X axis direction, that is, the main scanning direction D1. The CPU 20 detects the calculated linear inclination as the inclination θ of the document G with respect to the main scanning direction D1 (S42), and then executes document size detection processing for detecting the document size Z (S44).

(原稿サイズ検出処理)
図7に、原稿サイズ検出処理のフローチャートを示す。原稿サイズ検出処理において、CPU20は、RAM27から先端エッジ画像SG2を読み出し(S102)、画像処理部28を用いて原稿サイズZを検出する処理を実行する。CPU20は、まず、原稿Gの先端エッジの左側頂点の読取データに当たる左側頂点データを検出するために、原稿Gの左側端点に当たる左側エッジデータを検索する左側エッジデータ検索処理を実行する(S104)。
(Original size detection process)
FIG. 7 shows a flowchart of the document size detection process. In the document size detection process, the CPU 20 reads the leading edge image SG2 from the RAM 27 (S102), and executes a process of detecting the document size Z using the image processing unit 28. First, the CPU 20 executes left edge data search processing for searching left edge data corresponding to the left end point of the document G in order to detect left vertex data corresponding to the read data of the left vertex of the leading edge of the document G (S104).

(左側エッジデータ検索処理)
図8に、左側エッジデータ検索処理のフローチャートを示す。左側エッジデータ検索処理において、CPU20は、失敗カウンタNをゼロにし(S122)、RAM27から左側外部座標T1を読み出す(S124)。CPU20は、読み出した左側外部座標T1を用いて、当該処理の開始時における開始点を(T1、YT)に設定する(S126)。左側エッジデータ検索処理では、開始点のX座標はT1に設定される。
(Left edge data search processing)
FIG. 8 shows a flowchart of the left edge data search process. In the left edge data search process, the CPU 20 sets the failure counter N to zero (S122), and reads the left external coordinate T1 from the RAM 27 (S124). The CPU 20 sets the start point at the start of the process to (T1, YT) using the read left external coordinate T1 (S126). In the left edge data search process, the X coordinate of the start point is set to T1.

CPU20は、現在の開始点のY座標がY0以上であるかを確認し(S128)、現在の開始点のY座標がY0よりも小さい場合(S128:NO)、左側エッジデータ検索処理を終了する。一方、現在の開始点のY座標がY0以上である場合(S128:YES)、図12に示すように、開始点から主走査方向D1に検索点を移動させて左側エッジデータを検索する主走査方向検索処理を実行する(S130)。   The CPU 20 checks whether the Y coordinate of the current start point is equal to or greater than Y0 (S128). If the Y coordinate of the current start point is smaller than Y0 (S128: NO), the left edge data search process is terminated. . On the other hand, if the Y coordinate of the current start point is equal to or greater than Y0 (S128: YES), as shown in FIG. 12, the main scanning is performed by moving the search point from the start point in the main scanning direction D1 and searching for the left edge data. A direction search process is executed (S130).

(主走査方向検索処理)
図9に、主走査方向検索処理のフローチャートを示す。主走査方向検索処理において、CPU20は、今回の検索点における読取データを確認する(S152)。CPU20は、今回の検索点が「0」である場合(S154:NO)、今回の検索点のX座標に1を加え、次回の検索点とする(S166)。CPU20は、次回の検索点のX座標がXMAXよりも大きいかを確認し(S168)、次回の検索点のX座標がXMAXよりも大きい場合(S168:YES)、検索成功フラグFをオフし(S100)、主走査方向検索処理を終了する。一方、次回の検索点のX座標がXMAX以下である場合(S168:NO)、S152からの処理を繰り返す。
(Main scanning direction search processing)
FIG. 9 shows a flowchart of the main scanning direction search process. In the main scanning direction search process, the CPU 20 confirms the read data at the current search point (S152). When the current search point is “0” (S154: NO), the CPU 20 adds 1 to the X coordinate of the current search point and sets it as the next search point (S166). The CPU 20 confirms whether the X coordinate of the next search point is larger than XMAX (S168), and when the X coordinate of the next search point is larger than XMAX (S168: YES), the search success flag F is turned off (S168). S100), the main scanning direction search process is terminated. On the other hand, when the X coordinate of the next search point is XMAX or less (S168: NO), the processing from S152 is repeated.

また、CPU20は、今回の検索点が「1」である場合(S154:YES)、今回の検索点の座標をRAM27に一時的に記憶する(S156)。次に、CPU20は、今回の検索点のX座標がT1よりも大きいかを確認する(S158)。CPU20は、今回の検索点のX座標がT1である場合(S158:YES)、S166からの処理を繰り返す。   If the current search point is “1” (S154: YES), the CPU 20 temporarily stores the coordinates of the current search point in the RAM 27 (S156). Next, the CPU 20 checks whether or not the X coordinate of the current search point is larger than T1 (S158). When the X coordinate of the current search point is T1 (S158: YES), the CPU 20 repeats the processing from S166.

一方、CPU20は、今回の検索点のX座標がT1よりも大きい場合(S158:YES)、前回の検索点が「1」であったかを確認する(S160)。CPU20は、前回の検索点が「0」であった場合(S160:NO)、左側エッジデータか孤立点Bかの区別が困難なことから、S166からの処理を繰り返す。   On the other hand, when the X coordinate of the current search point is larger than T1 (S158: YES), the CPU 20 checks whether the previous search point was “1” (S160). When the previous search point is “0” (S160: NO), the CPU 20 repeats the processing from S166 because it is difficult to distinguish the left edge data from the isolated point B.

CPU20は、前回の検索点が「1」であった場合(S160:YES)、左側エッジデータが検索されたと判断し、今回の検索点の座標を左側エッジデータの座標としてRAM27に記憶するとともに(S162)、検索成功フラグFをオンして(S164)、主走査方向検索処理を終了する。   When the previous search point is “1” (S160: YES), the CPU 20 determines that the left edge data has been searched and stores the coordinates of the current search point in the RAM 27 as the coordinates of the left edge data ( S162) The search success flag F is turned on (S164), and the main scanning direction search process is terminated.

CPU20は、主走査方向検索処理を終了すると、図8に示す左側エッジデータ検索処理に戻り、終了した主走査方向検索処理において左側エッジデータが検索されたかを確認する(S132)。CPU20は、検索成功フラグFがオンされており、左側エッジデータが検索された場合(S132:YES)、失敗カウンタNをゼロにする(S134)。CPU20は、現在の開始点のY座標から15を減じて次回の開始点とし(S136)、S128からの処理を繰り返す。   When the CPU 20 completes the main scanning direction search process, the CPU 20 returns to the left edge data search process shown in FIG. 8, and confirms whether left edge data has been searched in the completed main scanning direction search process (S132). When the search success flag F is turned on and the left edge data is searched (S132: YES), the CPU 20 sets the failure counter N to zero (S134). The CPU 20 subtracts 15 from the Y coordinate of the current start point to obtain the next start point (S136), and repeats the processing from S128.

一方、CPU20は、検索成功フラグFがオフされており、左側エッジデータが検索されなかった場合(S132:NO)、失敗カウンタNに1を加え(S138)、失敗カウンタNを確認する(S140)。CPU20は、失敗カウンタNが1である場合(S140:NO)、S136からの処理を繰り返す。CPU20は、失敗カウンタNが2である場合(S140:YES)、これ以上検索を繰り返しても左側エッジデータが検索されないと判断し、左側エッジデータ検索処理を終了する。   On the other hand, when the search success flag F is off and the left edge data is not searched (S132: NO), the CPU 20 adds 1 to the failure counter N (S138) and confirms the failure counter N (S140). . When the failure counter N is 1 (S140: NO), the CPU 20 repeats the processing from S136. When the failure counter N is 2 (S140: YES), the CPU 20 determines that the left edge data is not searched even if the search is repeated further, and ends the left edge data search process.

CPU20は、左側エッジデータ検索処理を終了すると、図7に示す原稿サイズ検出処理に戻り、終了した左側エッジデータ検索処理において検索された左側エッジデータから代表左側エッジデータを選出する(S106)。CPU20は、左側エッジデータ検索処理において1つの左側エッジデータが検索された場合、その左側エッジデータを代表左側エッジデータとして選出する。また、左側エッジデータ検索処理において複数の左側エッジデータが検索された場合、その平均や中点等を代表左側エッジデータとして選出する。   When the left edge data search process is completed, the CPU 20 returns to the document size detection process shown in FIG. 7, and selects representative left edge data from the left edge data searched in the completed left edge data search process (S106). When one left edge data is searched in the left edge data search process, the CPU 20 selects the left edge data as representative left edge data. Further, when a plurality of left edge data are searched in the left edge data search process, the average or midpoint is selected as representative left edge data.

(右側エッジデータ検索処理)
次に、CPU20は、原稿Gの先端エッジの右側頂点の読取データに当たる右側頂点データを検出するために、原稿Gの右側端点に当たる右側エッジデータを検索する右側エッジデータ検索処理を実行する(S108)。
(Right edge data search processing)
Next, the CPU 20 executes right edge data search processing for searching for right edge data corresponding to the right end point of the document G in order to detect right vertex data corresponding to the read data of the right vertex of the leading edge of the document G (S108). .

右側先端エッジデータ検索処理では、開始点のX座標はT2に設定され、CPU20は、図12に示すように、開始点から主走査方向D1と逆側に検索点を移動させて原稿Gの右側エッジに当たる読取データである右側エッジデータを検索する。右側先端エッジデータ検索処理は、開始点を(T2、YT)に設定する点(S126)、主走査方向検索処理において今回の検索点のX座標がT2よりも小さいかを確認する点(S158)、主走査方向検索処理において今回の検索点のX座標から1を減じて次回の検索点とする点(S166)、次回の検索点のX座標がX0よりも小さいかを確認する点(S168)、を除いて左側エッジデータ検索処理と同一であり、重複した説明を省略する。   In the right front edge data search process, the X coordinate of the start point is set to T2, and the CPU 20 moves the search point from the start point to the opposite side to the main scanning direction D1, as shown in FIG. The right edge data that is the read data that hits the edge is searched. In the right edge data search processing, the start point is set to (T2, YT) (S126), and in the main scanning direction search processing, it is confirmed whether the X coordinate of the current search point is smaller than T2 (S158). In the main scanning direction search process, a point is obtained by subtracting 1 from the X coordinate of the current search point as the next search point (S166), and a check is made as to whether the X coordinate of the next search point is smaller than X0 (S168). Are the same as the left edge data search processing except for, and redundant description is omitted.

CPU20は、右側エッジデータ検索処理を終了すると、終了した右側エッジデータ検索処理において検索された右側エッジデータから代表右側エッジデータを選出する(S110)。CPU20は、先端エッジデータから算出された直線式をRAM27から読み出し(S112)、当該直線式で示される直線と、当該直線に対する垂線であって代表左側エッジデータを通過する垂線との交点を、左側頂点データとして検出する(S114)。同様に、代表右側エッジデータを通過する垂線との交点を、右側頂点データとして検出する(S116)。   When completing the right edge data search process, the CPU 20 selects representative right edge data from the right edge data searched in the completed right edge data search process (S110). The CPU 20 reads the straight line equation calculated from the leading edge data from the RAM 27 (S112), and sets the intersection of the straight line indicated by the straight line equation and the perpendicular line passing through the representative left edge data to the left side. It is detected as vertex data (S114). Similarly, an intersection with a perpendicular passing through the representative right edge data is detected as right vertex data (S116).

CPU20は、左側頂点データと右側頂点データの座標から、原稿Gの先端エッジにおける頂点間距離、つまり原稿Gの先端辺の幅Dを算出する(S118)。ROM26には、予め原稿Gの幅Dと原稿サイズZとが対応付けられた対応表が記憶されている。CPU20は、算出された原稿Gの先端辺の幅DとROM26に記憶された対応表から原稿サイズZを検出し(S120)、原稿サイズ検出処理を終了するとともに、傾き/原稿サイズ検出処理を終了する。   The CPU 20 calculates the distance between vertices at the leading edge of the document G, that is, the width D of the leading edge of the document G, from the coordinates of the left vertex data and the right vertex data (S118). The ROM 26 stores a correspondence table in which the width D of the document G and the document size Z are associated with each other in advance. The CPU 20 detects the document size Z from the calculated width D of the leading edge of the document G and the correspondence table stored in the ROM 26 (S120), ends the document size detection process, and ends the inclination / document size detection process. To do.

上述したように、CPU20は、読取領域Hの読取中に傾き/原稿サイズ検出処理を実行している。そして、CPU20は、、傾き/原稿サイズ検出処理において原稿Gの傾きθ及び原稿サイズZが検出されると、読取領域Hの読取中に読取画像G1の傾き補正を開始する。つまり、読取画像G1を読み取りながら読取画像G1の傾き補正を実行する。   As described above, the CPU 20 executes the tilt / original size detection process while the reading area H is being read. Then, when the inclination θ of the original G and the original size Z are detected in the inclination / original size detection process, the CPU 20 starts correcting the inclination of the read image G1 during reading of the reading area H. That is, the inclination correction of the read image G1 is executed while reading the read image G1.

CPU20は、検出された原稿Gの傾きθと基準角度θKとを比較し(S14)、原稿Gの傾きθが基準角度θK以内である場合(S14:YES)、画像処理部28を用いてRAM27に記憶されている読取画像G1に対して、トリミング及び傾き補正処理を実行する(S16)。CPU20は、検出された原稿サイズZから出力用データのサイズを決定し、RAM27に記憶されている読取画像G1から原稿Gの傾きθに沿った方向に読取データを読み出し、出力用データを完成させる。   The CPU 20 compares the detected inclination θ of the original G with the reference angle θK (S14). If the inclination θ of the original G is within the reference angle θK (S14: YES), the CPU 27 uses the image processing unit 28 to make the RAM 27. Trimming and tilt correction processing is executed on the read image G1 stored in (S16). The CPU 20 determines the size of the output data from the detected document size Z, reads the read data in the direction along the inclination θ of the document G from the read image G1 stored in the RAM 27, and completes the output data. .

一方、CPU20は、原稿Gの傾きθが基準角度θKよりも大きい場合(S14:NO)、RAM27に記憶されている読取画像G1に対して、トリミング処理を実行する(S18)。CPU20は、検出された原稿サイズZから出力用データのサイズを決定し、RAM27に記憶されている読取画像G1から主走査方向に沿った方向に読取データを読み出し、出力用データを完成させる。   On the other hand, when the inclination θ of the document G is larger than the reference angle θK (S14: NO), the CPU 20 executes a trimming process on the read image G1 stored in the RAM 27 (S18). The CPU 20 determines the size of the output data from the detected document size Z, reads the read data in the direction along the main scanning direction from the read image G1 stored in the RAM 27, and completes the output data.

CPU20は、Rセンサ14がオフするまでS14〜S18の処理を繰り返す(S20:NO)。CPU20は、Rセンサ14がオフすると(S20:YES)、Rセンサ14がオフしてから第3ステップ数ST3がカウントされた後に原稿Gの読み取りを終了する(S22)とともに原稿Gの搬送を終了し(S24)、読取処理を終了する。   The CPU 20 repeats the processes of S14 to S18 until the R sensor 14 is turned off (S20: NO). When the R sensor 14 is turned off (S20: YES), the CPU 20 ends the reading of the original G after the third step number ST3 is counted after the R sensor 14 is turned off (S22) and ends the conveyance of the original G. (S24), and the reading process is terminated.

4.本実施形態の効果
(1)本実施形態の画像読取装置1では、先端エッジ画像SG2の先端エッジデータを検索する際に、まず右側先端エッジ画像SGRに対して右側先端エッジデータ検索処理を実行し、当該右側先端エッジデータ検索処理において、基準先端エッジ画像SGKで先端エッジデータが検索されない場合には、左側先端エッジ画像SGLに対して先端エッジデータを検索することなく、右側先端エッジデータ検索処理において検索された先端エッジデータから原稿Gの傾きθを求める。そのため、開始点を先端エッジ画像SG2の主走査方向における端から端まで移動させて検索を行う従来技術に比べて、中心線Pに対して片側だけで先端エッジデータの検索が済むため、先端エッジデータの検索に必要な時間を短縮することができ、原稿Gの傾きθを求めるまでの時間を短縮することができる。
4). Advantages of the present embodiment (1) In the image reading apparatus 1 of the present embodiment, when searching for the leading edge data of the leading edge image SG2, the right leading edge data search process is first executed on the right leading edge image SGR. In the right tip edge data search process, if the tip edge data is not searched in the reference tip edge image SGK, the tip edge data is not searched for the left tip edge image SGL, and the right tip edge data search process. The inclination θ of the document G is obtained from the retrieved leading edge data. Therefore, compared to the prior art in which the start point is moved from end to end in the main scanning direction of the front end edge image SG2 and search is performed, the end edge data can be searched only on one side with respect to the center line P. The time required for data retrieval can be shortened, and the time required to obtain the inclination θ of the original G can be shortened.

(2)一方、本実施形態の画像読取装置1では、右側先端エッジデータ検索処理において、基準先端エッジ画像SGKで先端エッジデータが検索された場合、左側先端エッジ画像SGLに対して左側先端エッジデータ検索処理を実行し、右側先端エッジデータ検索処理及び左側先端エッジデータ検索処理において検索された先端エッジデータから原稿Gの傾きθを求める。そのため、中心線Pに対して両側で検索された先端エッジデータを用いて、原稿Gの傾きθを精度良く求めることができる。 (2) On the other hand, in the image reading apparatus 1 according to the present embodiment, when the leading edge data is retrieved from the reference leading edge image SGK in the right leading edge data retrieval process, the left leading edge data with respect to the left leading edge image SGL. A search process is executed, and the inclination θ of the document G is obtained from the front edge data searched in the right front edge data search process and the left front edge data search process. Therefore, the inclination θ of the document G can be obtained with high accuracy using the leading edge data searched on both sides with respect to the center line P.

(3)本実施形態の画像読取装置1では、右側(左側)先端エッジデータ検索処理の開始時において開始点のX座標をXM(XM−15)に設定し、その後、開始点を主走査方向D1(主走査方向D1と逆側)に移動させて先端エッジデータを検索する。そのため、先端エッジ画像SG2の主走査方向D1における両端部など、先端エッジデータが存在しない部分において先端エッジデータを検索する必要がなく、先端エッジデータの検索に必要な時間を短縮することができる。 (3) In the image reading apparatus 1 of the present embodiment, the X coordinate of the start point is set to XM (XM-15) at the start of the right (left) tip edge data search process, and then the start point is set in the main scanning direction. The leading edge data is searched by moving it to D1 (opposite to the main scanning direction D1). Therefore, it is not necessary to search for the tip edge data in a portion where the tip edge data does not exist, such as both end portions in the main scanning direction D1 of the tip edge image SG2, and the time required for searching the tip edge data can be shortened.

(4)本実施形態の画像読取装置1では、右側先端エッジデータ検索処理において、基準先端エッジ画像SGKで先端エッジデータが検索されない場合でも、先端エッジデータが検索されるまで先端エッジデータの検索を繰り返すので、先端エッジデータが検索される前に先端エッジデータの検索が終了され、右側先端エッジデータ検索処理において先端エッジデータが1つも検索されない事態が発生することが抑制される。 (4) In the image reading apparatus 1 of the present embodiment, in the right tip edge data search process, the tip edge data is searched until the tip edge data is searched even if the tip edge data is not searched in the reference tip edge image SGK. Since the process is repeated, the search for the tip edge data is terminated before the tip edge data is searched, and the situation where no tip edge data is searched in the right tip edge data search process is suppressed.

(5)本実施形態の画像読取装置1では、右側(左側)先端エッジデータ検索処理において、開始点のX座標を15づつ移動して先端エッジデータを検索する。また、右側(左側)エッジデータ検索処理において、開始点のY座標を15づつ移動して右側(左側)エッジデータを検索する。そのため、開始点のX座標及び又はY座標を1づつ移動してエッジデータを検索する場合に比べて、先端エッジデータの検索に必要な時間を短縮することができ、原稿Gの傾きθを求めるまでの時間を短縮することができる。 (5) In the image reading apparatus 1 of the present embodiment, in the right (left) tip edge data search process, the X coordinate of the start point is moved by 15 to search for tip edge data. Also, in the right (left) edge data search process, the Y coordinate of the start point is moved by 15 to search for the right (left) edge data. Therefore, the time required for searching for the leading edge data can be shortened and the inclination θ of the original G can be obtained as compared with the case of searching for edge data by moving the X coordinate or Y coordinate of the starting point one by one. Can be shortened.

(6)本実施形態の画像読取装置1では、右側(左側)先端エッジデータ検索処理及び右側(左側)エッジデータ検索処理において、主走査方向D1または副走査方向D3に連続した検索点がいずれも「1」である場合にエッジデータが検索されたと判断する。そのため、副走査方向に連続して発生することがない孤立点Bをエッジデータと誤検索してしまうことが抑制され、原稿Gの傾きθを正確に求めることができる。 (6) In the image reading apparatus 1 of this embodiment, in the right side (left side) leading edge data search process and the right side (left side) edge data search process, all search points continuous in the main scanning direction D1 or the sub-scanning direction D3 are all. If it is “1”, it is determined that the edge data has been searched. For this reason, it is possible to prevent the isolated point B, which does not continuously occur in the sub-scanning direction, from being erroneously searched as edge data, and to accurately determine the inclination θ of the original G.

(7)本実施形態の画像読取装置1では、右側(左側)先端エッジデータ検索処理及び右側(左側)エッジデータ検索処理において、主走査方向D1または副走査方向D3に開始点を移動させてエッジデータを検索し、先端エッジデータ検索されないことが連続して生じた場合に、先端エッジデータの検索を終了する。そのため、ノイズ等により1回だけエッジデータが検索されなかった場合にエッジデータの検索を終了してしまうことが抑制され、エッジデータの検索終了タイミングを正確に判断することができる。 (7) In the image reading apparatus 1 according to the present embodiment, in the right side (left side) leading edge data search process and the right side (left side) edge data search process, the start point is moved in the main scanning direction D1 or the sub-scanning direction D3. When the data is searched and the leading edge data is not continuously searched, the searching for the leading edge data is terminated. Therefore, when edge data is not searched only once due to noise or the like, the edge data search is prevented from being completed, and the edge data search end timing can be accurately determined.

(8)本実施形態の画像読取装置1では、左側エッジデータ検索処理において、開始点のX座標をT1に設定し、先端エッジ画像SG2の主走査方向D1の逆側における端位置、つまりX0を開始点としない。また、右側エッジデータ検索処理において、開始点のX座標をT2に設定し、先端エッジ画像SG2の主走査方向D1における端位置、つまりXMAXを開始点としない。そのため、右側(左側)エッジデータ検索処理に必要な時間を短縮することができ、原稿サイズZを求めるまでの時間を短縮することができる。 (8) In the image reading apparatus 1 of the present embodiment, in the left edge data search process, the X coordinate of the start point is set to T1, and the end position on the opposite side of the leading edge image SG2 in the main scanning direction D1, that is, X0 is set. Not a starting point. In the right edge data search process, the X coordinate of the start point is set to T2, and the end position in the main scanning direction D1 of the leading edge image SG2, that is, XMAX is not set as the start point. Therefore, the time required for the right (left) edge data search process can be shortened, and the time required to obtain the document size Z can be shortened.

(9)本実施形態の画像読取装置1では、中心線Pを主走査方向D1の基準位置とするので、主走査方向D1の基準位置が主走査方向D1におけるFセンサ13の位置と逆側に配置される場合に比べて、右側先端エッジデータ検索処理に必要な時間を短縮することができる。 (9) In the image reading apparatus 1 of the present embodiment, since the center line P is set as the reference position in the main scanning direction D1, the reference position in the main scanning direction D1 is opposite to the position of the F sensor 13 in the main scanning direction D1. Compared to the arrangement, the time required for the right edge data search process can be shortened.

<他の実施形態>
本発明は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば次のような種々の態様も本発明の技術的範囲に含まれる。
(1)上記実施形態では、スキャナ機能を備えた画像読取装置1を用いて説明を行ったが、本発明はこれに限られず、プリンタ機能、コピー機能、ファクシミリ機能などを備えた複合機であっても良い。
<Other embodiments>
The present invention is not limited to the embodiments described with reference to the above description and the drawings, and for example, the following various aspects are also included in the technical scope of the present invention.
(1) In the above embodiment, the image reading apparatus 1 having the scanner function has been described. However, the present invention is not limited to this, and the present invention is a multifunction device having a printer function, a copy function, a facsimile function, and the like. May be.

(2)上記実施形態では、画像読取装置1が1つのCPU20を有し、この1つのCPU20によって読取処理等の各種処理が実行される例を用いて説明を行ったが、本発明はこれに限られない。例えば、複数のCPUにより各部が構成されてもよければ、ASIC(Application Specific Integrated Circuit)などのハード回路のみにより各部が構成されてもよい。さらには、単数又は複数のCPU及びASICによって、各部が構成されてもよい。 (2) In the above-described embodiment, the image reading apparatus 1 has one CPU 20 and an example in which various processes such as a reading process are executed by the one CPU 20 has been described. Not limited. For example, if each unit may be configured by a plurality of CPUs, each unit may be configured only by a hardware circuit such as an ASIC (Application Specific Integrated Circuit). Furthermore, each part may be comprised by one or several CPU and ASIC.

(3)また、CPU20が実行するプログラムは必ずしもROM26に記憶されている必要はなく、CPU20自身に記憶されていてもよければ、他の記憶装置に記憶されていても良い。 (3) Further, the program executed by the CPU 20 does not necessarily have to be stored in the ROM 26, and may be stored in the CPU 20 itself or in another storage device.

(4)上記実施形態では、検知部が給紙トレイ2に載置されたFセンサ13である例を用いて説明を行ったが、検知部は必ずしもFセンサ13である必要はなく、また、検知部は必ずしも給紙トレイ2に載置されている必要もない。 (4) In the above embodiment, the example in which the detection unit is the F sensor 13 placed on the paper feed tray 2 has been described. However, the detection unit is not necessarily the F sensor 13, and The detection unit does not necessarily have to be placed on the paper feed tray 2.

(5)上記実施形態では、主走査方向D1の基準位置が、主走査方向D1の中点である例を用いて説明を行ったが、基準位置は主走査方向D1において適宜変更することができる。 (5) Although the above embodiment has been described using an example in which the reference position in the main scanning direction D1 is the midpoint of the main scanning direction D1, the reference position can be changed as appropriate in the main scanning direction D1. .

(6)上記実施形態では、右側(左側)エッジデータ検索処理において、複数回の主走査方向検索処理を実行する例を用いて説明を行ったが、右側(左側)エッジデータ検索処理では、必ずしも複数個の右側(左側)エッジデータを検索する必要がなく、右側(左側)エッジデータを1つ検索した場合に右側(左側)エッジデータ検索処理を終了してもよい。 (6) In the above embodiment, the description has been given using the example in which the main scanning direction search process is executed a plurality of times in the right (left) edge data search process. However, in the right (left) edge data search process, It is not necessary to search a plurality of right (left) edge data, and the right (left) edge data search processing may be terminated when one right (left) edge data is searched.

(7)上記実施形態では、右側(左側)先端エッジデータ検索処理及び右側(左側)エッジデータ検索処理において、開始点のX座標またはY座標を15づつ移動して検索を行う例を用いて説明を行ったが、15は一例であり、2以上の整数であれば、特に限定されるものではない。 (7) In the above embodiment, in the right (left) tip edge data search process and the right (left) edge data search process, the X coordinate or the Y coordinate of the start point is moved 15 by 15 and the search is performed. However, 15 is an example, and is not particularly limited as long as it is an integer of 2 or more.

1:画像読取装置、2:給紙トレイ、4A、4B:排紙トレイ、13:Fセンサ、14:Rセンサ、15:搬送部、20:CPU、22:搬送経路、30:CIS、31:読取素子、31K:基準読取素子、31L:左側読取素子、31R:右側読取素子、D1:主走査方向、D2:搬送方向、D3:副走査方向、SG1:先端読取画像、SG2:先端エッジ画像、SGK:基準先端エッジ画像、SGL:左側先端エッジ画像、SGR:右側先端エッジ画像 1: image reading device, 2: paper feed tray, 4A, 4B: paper discharge tray, 13: F sensor, 14: R sensor, 15: transport unit, 20: CPU, 22: transport path, 30: CIS, 31: Reading element, 31K: reference reading element, 31L: left reading element, 31R: right reading element, D1: main scanning direction, D2: transport direction, D3: sub-scanning direction, SG1: leading edge reading image, SG2: leading edge image, SGK: Reference tip edge image, SGL: Left tip edge image, SGR: Right tip edge image

Claims (9)

原稿が載置されるトレイと、
前記原稿を搬送経路に沿って搬送する搬送部と、
前記搬送経路上の読取位置に配置され、前記搬送部によって搬送される前記原稿の画像を主走査方向に並んで配置される複数の読取素子を用いて読み取る読取部と、
前記トレイにおける前記主走査方向の中点である基準位置に対して前記主走査方向の片側に設けられた検知位置で、前記原稿の有無を検知する検知部と、
ユーザによる操作入力を受け付ける入力部と、
制御部と、
を備え、
前記制御部は、
前記検知部によって前記原稿が検知され、かつ、前記入力部によって読取開始指示の入力が受付けられた合、前記搬送部に前記原稿を搬送させる搬送処理と、
前記主走査方向と直交する副走査方向の所定範囲に亘って、前記読取部に、前記搬送処理により搬送される原稿の先端を含めた画像を読み取らせる読取処理と、
前記読取処理によって読み取られた前記所定範囲の読取画像を抽出する読取画像抽出処理と、
前記所定範囲の読取画像のうち、前記基準位置上に配置された基準読取素子及び前記基準読取素子よりも前記主走査方向において前記検知部側に配置された前記読取素子を用いて読み取られた検知部側読取画像に対して、エッジ点を検索する検知部側エッジ点検索処理と、
検索されたエッジ点から前記原稿の主走査方向に対する傾きを求め、前記傾きから前記読取部が読み取った読取画像の傾き補正を行う傾き補正処理と、
を実行し、
前記傾き補正処理では、前記検知部側エッジ点検索処理において前記基準読取素子を用いて読み取られた基準読取画像でエッジ点が検索されない場合に、前記検知部側エッジ点検索処理によって検索されたエッジ点から前記原稿の主走査方向に対する傾きを求める、画像読取装置。
A tray on which the document is placed;
A conveying unit for conveying along a conveyance path of the document,
A reading unit that is arranged at a reading position on the conveyance path and reads an image of the document conveyed by the conveyance unit using a plurality of reading elements arranged in a main scanning direction;
A detection unit that detects the presence or absence of the document at a detection position provided on one side of the main scanning direction with respect to a reference position that is a midpoint of the main scanning direction of the tray ;
An input unit for receiving an operation input by a user;
A control unit;
With
The controller is
Said being the original is detected by the detection unit, and the input unit field input of the reading start instruction is received by the case, the conveyance process to convey the document to the transport unit,
A reading process for causing the reading unit to read an image including a leading edge of the document conveyed by the conveyance process over a predetermined range in the sub-scanning direction orthogonal to the main scanning direction;
A read image extraction process for extracting the read image in the predetermined range read by the read process;
Of the read image in the predetermined range, a reference reading element arranged on the reference position and a detection read using the reading element arranged on the detection unit side in the main scanning direction with respect to the reference reading element. A detection unit side edge point search process for searching for an edge point for the partial side read image;
An inclination correction process for obtaining an inclination of the original with respect to the main scanning direction from the searched edge point and correcting an inclination of a read image read by the reading unit from the inclination;
Run
In the inclination correction process, when an edge point is not searched in the reference read image read using the reference reading element in the detection unit side edge point search process, the edge searched by the detection unit side edge point search process An image reading apparatus for obtaining an inclination of the original with respect to a main scanning direction from a point.
請求項1に記載の画像読取装置であって、
前記制御部は、更に、
前記検知部側エッジ点検索処理において前記基準読取画像でエッジ点が検索された場合に、前記所定範囲の読取画像のうち、前記基準読取素子よりも前記主走査方向において前記検知部側と逆側に配置された前記読取素子を用いて読み取られた逆側読取画像に対して、エッジ点を検索する逆側エッジ点検索処理、
を実行し、
前記傾き補正処理では、前記検知部側エッジ点検索処理において前記基準読取画像でエッジ点が検索される場合に、前記検知部側エッジ点検索処理及び前記逆側エッジ点検索処理によって検索されたエッジ点から前記原稿の主走査方向に対する傾きを求める、画像読取装置。
The image reading apparatus according to claim 1,
The control unit further includes:
When an edge point is searched for in the reference read image in the detection unit side edge point search process, out of the read image in the predetermined range, the side opposite to the detection unit in the main scanning direction with respect to the reference reading element A reverse edge point search process for searching for an edge point with respect to a reverse side read image read using the reading element arranged in
Run
In the tilt correction process, when an edge point is searched for in the reference read image in the detection unit side edge point search process, the edge searched by the detection unit side edge point search process and the reverse side edge point search process An image reading apparatus for obtaining an inclination of the original with respect to a main scanning direction from a point.
請求項1または請求項2に記載の画像読取装置であって、
前記制御部は、
前記検知部側エッジ点検索処理において、前記基準読取画像のうち、前記読取部によって前記副走査方向に先に読み取られた側の端である先読取端を開始点とし、前記開始点から前記副走査方向へエッジ点を検索し、前記基準読取画像でエッジ点が検索されない場合に、エッジ点が検索されるまで前記開始点を前記検知部側に移動させて該開始点から前記副走査方向へのエッジ点の検索を繰り返す、画像読取装置。
The image reading apparatus according to claim 1, wherein:
The controller is
In the detection unit side edge point search process, a start reading end that is an end of the reference read image that has been read first in the sub scanning direction by the reading unit is set as a start point, and the sub read from the start point. When an edge point is searched in the scanning direction and no edge point is searched in the reference read image, the start point is moved to the detection unit side until the edge point is searched and the start point is moved in the sub-scanning direction. An image reading device that repeatedly searches for edge points.
請求項3に記載の画像読取装置であって、
前記所定範囲の読取画像は、前記主走査方向及び前記副走査方向に単位画像を示す読取データが複数個並んで配置されて構成されており、
前記制御部は、
前記検知部側エッジ点検索処理において、前記開始点を前記主走査方向に基準データ数毎に移動させて前記エッジ点の検索を繰り返す、画像読取装置。
The image reading apparatus according to claim 3,
The read image of the predetermined range is configured by arranging a plurality of read data indicating unit images in the main scanning direction and the sub-scanning direction,
The controller is
In the detection unit side edge point search process, the image reading apparatus repeats the search for the edge point by moving the start point in the main scanning direction for each reference data number.
請求項4に記載の画像読取装置であって、
前記制御部は、
前記読取画像抽出処理において、前記所定範囲の読取画像を、前記読取画像において閾値よりも低い輝度を有する前記読取データを第1データとし、前記読取画像において前記閾値よりも高い輝度を有する前記読取データを第2データとした2値化されたデータであるエッジ画像として抽出し、
前記検知部側エッジ点検索処理において、前記開始点から前記副走査方向に前記エッジ画像を検索し、前記副走査方向に連続した第1データを検索した場合に、エッジ点が検索されたと判断する、画像読読取装置。
The image reading apparatus according to claim 4,
The controller is
In the read image extraction process, the read image in the predetermined range is the read data having luminance lower than a threshold in the read image as first data, and the read data having luminance higher than the threshold in the read image. Is extracted as an edge image which is binarized data with the second data,
In the detection unit side edge point search process, when the edge image is searched from the start point in the sub-scanning direction and the first data continuous in the sub-scanning direction is searched, it is determined that the edge point has been searched. Image reading and reading device.
請求項4または請求項5に記載の画像読取装置であって、
前記制御部は、
前記検知部側エッジ点検索処理において、エッジ点が検索された後、前記開始点を前記検知部側に移動させて前記開始点から前記副走査方向に前記所定範囲に亘って検索してもエッジ点が検索されないことが連続して生じた場合に、エッジ点が検索されないと判断し、エッジ点の検索を終了する、画像読取装置。
The image reading apparatus according to claim 4 or 5, wherein
The controller is
In the detection part side edge point search process, after the edge point is searched, the start point is moved to the detection part side and the search is performed over the predetermined range from the start point in the sub-scanning direction. An image reading apparatus that determines that an edge point is not searched when the point is not searched continuously and ends the search for the edge point.
請求項3ないし請求項6のいずれか一項に記載の画像読取装置であって、
前記制御部は、
前記検知部側エッジ点検索処理において、前記基準読取画像でエッジ点が検索されない場合に、前記エッジ点が初めて検索された際の開始点へ移動する前の開始点の前記主走査方向の位置である第1位置を記憶するとともに、前記エッジ点の探索を終了した際の前記開始点の前記主走査方向の位置である第2位置を記憶し、
前記制御部は、更に、
前記読取画像のうち、前記主走査方向が前記第1位置となる点を開始点とし、前記開始点から前記主走査方向において前記検知部側にエッジ点を検索する基準位置側エッジ点検索処理と、
前記読取画像のうち、前記主走査方向が前記第2位置となる点を開始点とし、前記開始点から前記主走査方向において前記検知部側と逆側にエッジ点を検索する端部側エッジ点検索処理と、
前記傾き補正処理によって求められた傾きと、前記準位置側エッジ点検索処理及び前記端部側エッジ点検索処理によってそれぞれ求められたエッジ点とから、前記原稿の先端側の角位置を検出する原稿角位置検出処理と、
前記原稿角位置検出処理によって求められた前記原稿の角位置から前記原稿の幅を求め、該幅から原稿のサイズを検出する原稿サイズ検出処理と、
を実行する、画像読取装置。
An image reading apparatus according to any one of claims 3 to 6,
The controller is
In the detection unit side edge point search process, when an edge point is not searched in the reference read image, the position in the main scanning direction of the start point before moving to the start point when the edge point is searched for the first time A first position is stored, and a second position that is a position in the main scanning direction of the start point when the search for the edge point is completed is stored,
The control unit further includes:
A reference position side edge point search process in which, in the read image, a point where the main scanning direction is the first position is set as a starting point, and an edge point is searched from the starting point to the detection unit side in the main scanning direction; ,
Of the scanned image, an end-side edge point that starts from the point where the main scanning direction is the second position and searches for an edge point on the opposite side of the detection unit in the main scanning direction from the starting point. The search process,
The inclination determined by the inclination correction processing, the edge point obtained respectively by the standards position side edge point search process and the end-side edge point search process, to detect the angular position of the tip end of the original Document corner position detection processing,
A document size detection process for obtaining a width of the document from a corner position of the document obtained by the document corner position detection process, and detecting a size of the document from the width;
An image reading apparatus that executes
請求項1ないし請求項7のいずれか一項に記載の画像読取装置であって、
前記主走査方向の基準位置は、前記主走査方向の中点である、画像読取装置。
An image reading apparatus according to any one of claims 1 to 7,
The image reading apparatus, wherein the reference position in the main scanning direction is a midpoint in the main scanning direction.
請求項1ないし請求項8のいずれか一項に記載の画像読取装置であって、
更に、
前記原稿が前記主走査方向の前記検知部側に載置される載置台を備え、
前記検知部は、前記載置台に位置し、
前記搬送部は、載置台に前記原稿が載置されたことを前記検知部が検知すると、前記載置台に載置された前記原稿を順に搬送する、画像読取装置。
An image reading apparatus according to any one of claims 1 to 8,
Furthermore,
A placement table on which the document is placed on the detection unit side in the main scanning direction;
The detection unit is located on the mounting table,
When the detection unit detects that the document is placed on a placement table, the conveyance unit sequentially conveys the document placed on the placement table.
JP2012169732A 2012-07-31 2012-07-31 Image reading device Active JP6047984B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012169732A JP6047984B2 (en) 2012-07-31 2012-07-31 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012169732A JP6047984B2 (en) 2012-07-31 2012-07-31 Image reading device

Publications (2)

Publication Number Publication Date
JP2014030109A JP2014030109A (en) 2014-02-13
JP6047984B2 true JP6047984B2 (en) 2016-12-21

Family

ID=50202419

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012169732A Active JP6047984B2 (en) 2012-07-31 2012-07-31 Image reading device

Country Status (1)

Country Link
JP (1) JP6047984B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005057813A (en) * 2004-11-29 2005-03-03 Pfu Ltd Image scanner
JP5205963B2 (en) * 2007-12-28 2013-06-05 ブラザー工業株式会社 Image reading device
JP4853555B2 (en) * 2009-07-30 2012-01-11 ブラザー工業株式会社 Image reading device

Also Published As

Publication number Publication date
JP2014030109A (en) 2014-02-13

Similar Documents

Publication Publication Date Title
US10951791B2 (en) Image processing apparatus, method for processing image, and recording medium for noise removal and skew correction
JP5783418B2 (en) Image processing device
US11115561B2 (en) Inclination detecting device, reading device, image processing apparatus, and method of detecting inclination
JP6671927B2 (en) Image reading apparatus and image reading method
JP4853555B2 (en) Image reading device
US9531897B2 (en) Scanner and scanning method
US9124746B2 (en) Image-reading device and computer-readable storage medium
JP2020178192A (en) Edge detection device, tilt correction device, read device, image processing device, and edge detection method
JPH11252351A (en) Image reader
JP6459384B2 (en) Image reading apparatus, program, and read image correction method
JP5811773B2 (en) Image reading device
JP2015198390A (en) Image reading device and image forming apparatus
JP6330505B2 (en) Image reading device
JP2015198327A (en) Image reading device, image reading method, and computer program
JP5683099B2 (en) Image reading apparatus, image reading apparatus control method, and program
US9811767B2 (en) Image processing apparatus, image processing method and program
JP6047984B2 (en) Image reading device
JP6330506B2 (en) Image reading device
JP5516539B2 (en) Reading apparatus and program
US10887488B2 (en) Reading apparatus and non-transitory computer-readable storage medium storing program for inclination correction of document image
JP6135190B2 (en) Image reading device
JP5780064B2 (en) Image reading device
JP6632335B2 (en) Image reading apparatus and image reading method
JP7392429B2 (en) Image forming apparatus and transport control method for image forming apparatus
JP6164137B2 (en) Reader

Legal Events

Date Code Title Description
RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20140408

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150724

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160809

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161006

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161107

R150 Certificate of patent or registration of utility model

Ref document number: 6047984

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150