JP2012070285A - Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium - Google Patents

Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium Download PDF

Info

Publication number
JP2012070285A
JP2012070285A JP2010214504A JP2010214504A JP2012070285A JP 2012070285 A JP2012070285 A JP 2012070285A JP 2010214504 A JP2010214504 A JP 2010214504A JP 2010214504 A JP2010214504 A JP 2010214504A JP 2012070285 A JP2012070285 A JP 2012070285A
Authority
JP
Japan
Prior art keywords
document
edge
image
size
inclination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010214504A
Other languages
Japanese (ja)
Inventor
Yosuke Konishi
陽介 小西
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2010214504A priority Critical patent/JP2012070285A/en
Publication of JP2012070285A publication Critical patent/JP2012070285A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To enable detection of manuscript size with high accuracy even in the case where the inclination angle of a document image with respect to a regular position is small.SOLUTION: A manuscript area detection section 45 compares the inclination angle of a document image which is calculated by an angle calculation section 42 with a threshold value. If the inclination angle is equal to or greater than the threshold value, it performs first manuscript area detection processing, and if the inclination angle is less than the threshold value, performs second manuscript area detection processing. In the first manuscript area detection processing, it is determined whether each edge of the document image is an effective edge which can be regarded as the edge of the document image or noise, and the size of the manuscript is calculated based only on the effective edge. In the second manuscript area detection processing, it is determined whether each edge of the document image is an effective edge which can be regarded as the edge of the document image or noise under the condition that a manuscript area is detected in a more limited range than said first manuscript area detection processing, and the size of the manuscript is calculated based only on the effective edge.

Description

本発明は、スキャナ等の画像読み取り装置にて原稿の画像を読み取ることにより得た画像データの処理に関し、特に原稿台上に傾いた状態にて配置された原稿の画像を読み取ることにより得た画像データから、原稿の傾きおよび原稿サイズを検知する画像処理方法、画像処理装置、画像読取装置、画像形成装置、コンピュータプログラムおよび記録媒体に関するものである。   The present invention relates to processing of image data obtained by reading an image of an original with an image reading device such as a scanner, and in particular, an image obtained by reading an image of an original placed in an inclined state on an original table. The present invention relates to an image processing method, an image processing apparatus, an image reading apparatus, an image forming apparatus, a computer program, and a recording medium that detect the inclination and original size of an original from data.

従来、スキャナ等の画像読み取り装置に関する技術として、原稿台上に傾いた状態にて配置された原稿の画像を読み取ることにより得た画像データから、原稿の傾き(画像データの傾き)および原稿サイズの検知、並びに原稿(画像データ)の傾き補正を行う技術が知られている。   2. Description of the Related Art Conventionally, as a technique related to an image reading apparatus such as a scanner, a document inclination (image data inclination) and a document size are obtained from image data obtained by reading an image of a document placed on a document table in an inclined state. A technique for detecting and correcting the inclination of a document (image data) is known.

例えば、特開平11−331547では、原稿搬送部の搬送ベルトにより原稿を原稿台上に搬送する構成において、搬送ベルトにおける原稿台と対向する面(搬送ベルトの下面)が橙色に着色されている。これは、搬送ベルトからの露光ランプの光の反射光が、原稿画像を読み取るラインセンサにとっては分光感度が小さい色、すなわち黒色と同じになるようにするためである。これにより、ラインセンサは、通常白色である原稿の地肌と搬送ベルトの下面とを識別することができる。また、原稿の傾きおよび原稿サイズ検知並びに原稿の傾き補正においては、ラインセンサによる読み取り画像データにおいて、黒から白へ変化するエッジ、および白から黒へ変化するエッジを検出する。次に、各原稿エッジの座標データ間の傾きの変化を検出し、傾きが変化する点(エッジ変化点)を求めてエッジ変化点を結ぶ線分を抽出する。次に、抽出された線分の中で、副走査方向に対して45゜以下の線分を選択し、原稿の傾きおよび原稿サイズ検知並びに原稿の傾き補正を行っている。   For example, in Japanese Patent Laid-Open No. 11-331547, in a configuration in which a document is transported onto a document table by a transport belt of a document transport unit, the surface of the transport belt facing the document table (the bottom surface of the transport belt) is colored orange. This is because the reflected light of the light from the exposure lamp from the conveyor belt is the same as a color having a low spectral sensitivity for a line sensor that reads an original image, that is, black. As a result, the line sensor can distinguish the background of the original, which is normally white, from the lower surface of the conveyance belt. Further, in document inclination and document size detection and document inclination correction, edges that change from black to white and edges that change from white to black are detected in the image data read by the line sensor. Next, a change in inclination between the coordinate data of each document edge is detected, a point where the inclination changes (edge change point) is obtained, and a line segment connecting the edge change points is extracted. Next, among the extracted line segments, a line segment of 45 ° or less with respect to the sub-scanning direction is selected, and the document inclination and document size detection and document inclination correction are performed.

特開平11−331547号公報(1999年11月30日公開)Japanese Patent Laid-Open No. 11-331547 (published on November 30, 1999)

しかしながら、上記従来の方法では、傾き補正した後の画像の端に、原稿と接触している面の影響により黒い部分が残ってしまう可能性があり、この場合には、良好な画像(画像データ)を得ることができない。一方、このような問題を回避するために、搬送ベルトの下面を白色にした場合には、ラインセンサが搬送ベルトの下面と原稿との境界を正しく検知できなくなり、原稿サイズを正しく検知することができない。具体的には、搬送ベルトの下面と原稿との境界を検知する場合に、例えば、搬送ベルトの下面における原稿と接触している領域のスキャナノイズ等によって、搬送ベルトの下面と原稿との本来の境界ではない部分を境界として認識してしまい、原稿サイズを誤検知する事態を生じる虞れがある。このような問題は、正規位置に対する原稿画像の傾き角度が小さい場合に顕著となる。   However, in the conventional method, there is a possibility that a black portion may remain at the edge of the image after the inclination correction due to the influence of the surface in contact with the document. In this case, a good image (image data) ) Can not get. On the other hand, in order to avoid such problems, when the lower surface of the conveyor belt is white, the line sensor cannot correctly detect the boundary between the lower surface of the conveyor belt and the document, and the document size can be detected correctly. Can not. Specifically, when detecting the boundary between the lower surface of the conveyance belt and the original, for example, due to scanner noise in an area in contact with the original on the lower surface of the conveyance belt, the original lower surface of the conveyance belt and the original There is a possibility that a part that is not a boundary is recognized as a boundary, and the size of the document is erroneously detected. Such a problem becomes conspicuous when the inclination angle of the document image with respect to the normal position is small.

したがって、本発明は、正規位置に対する原稿画像の傾き角度が小さい場合であっても高精度に原稿サイズを検出することができる画像処理方法、画像処理装置、画像読取装置、画像形成装置、コンピュータプログラムおよび記録媒体の提供を目的としている。   Therefore, the present invention provides an image processing method, an image processing apparatus, an image reading apparatus, an image forming apparatus, and a computer program capable of detecting a document size with high accuracy even when the inclination angle of the document image with respect to the normal position is small. And to provide a recording medium.

上記の課題を解決するために、本発明の画像処理装置は、原稿を読み取って取得された画像データによって示される原稿画像の傾きおよび原稿サイズを検出する原稿傾き・サイズ検出部と、前記原稿傾き・サイズ検出部の検出結果に基づいて、前記画像データにおける原稿画像の傾きおよび原稿サイズを補正する原稿傾き・サイズ補正部とを備える画像処理装置において、前記原稿傾き・サイズ検出部は、前記原稿画像の上下および左右のエッジを検出し、前記エッジの位置を示すエッジ座標を求めるエッジ検出処理部と、前記エッジ座標に基づいて前記原稿画像の傾き角度を算出する角度算出部と、算出された前記原稿画像の傾き角度に基づいて、前記エッジ座標を前記原稿画像の傾きがない状態の補正エッジ座標に変換する座標情報変換部と、原稿領域検出処理により、前記補正エッジ座標から原稿のサイズを示す情報を算出する原稿領域検出部とを備え、前記原稿領域検出部は、前記角度算出部にて算出された前記原稿画像の傾き角度を閾値と比較し、前記原稿画像の傾き角度が閾値以上の場合には第1の原稿領域検出処理を行い、前記原稿画像の傾き角度が閾値未満の場合には第2の原稿領域検出処理を行い、前記第1の原稿領域検出処理では、エッジ検出処理部にて検出された各エッジについて、前記補正エッジ座標を使用して、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出する一方、第2の原稿領域検出処理では、エッジ検出処理部にて検出された各エッジについて、前記補正エッジ座標を使用して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出することを特徴としている。   In order to solve the above problems, an image processing apparatus according to the present invention includes a document inclination / size detection unit that detects an inclination and an original size of an original image indicated by image data obtained by reading an original, and the original inclination. In the image processing apparatus that includes a document inclination / size correction unit that corrects the inclination of the document image and the document size in the image data based on the detection result of the size detection unit, the document inclination / size detection unit An edge detection processing unit that detects upper and lower and left and right edges of the image and obtains edge coordinates indicating the position of the edge; an angle calculation unit that calculates an inclination angle of the document image based on the edge coordinates; Coordinate information conversion for converting the edge coordinates into corrected edge coordinates in a state where there is no inclination of the original image based on the inclination angle of the original image And an original area detecting unit that calculates information indicating the size of the original from the corrected edge coordinates by the original area detecting process, and the original area detecting unit is configured to detect the original image calculated by the angle calculating unit. A tilt angle is compared with a threshold value, and if the tilt angle of the document image is equal to or greater than the threshold value, a first document area detection process is performed. If the tilt angle of the document image is less than the threshold value, a second document area detection is performed. In the first document area detection processing, each edge detected by the edge detection processing unit is an effective edge that can be regarded as an edge of the document image using the corrected edge coordinates, and noise. In the second document area detection process, for each edge detected by the edge detection processing unit, the information indicating the size of the document is calculated based only on the valid edge. Whether the edge is an effective edge or noise that can be regarded as an edge of the document image on the condition that the range of detecting the document region is limited as compared to the first document region detection process using the corrected edge coordinates. This is characterized in that information indicating the size of the original is calculated based on only the valid edge.

また、本発明の画像処理方法は、原稿を読み取って取得された画像データによって示される原稿画像の傾きおよび原稿サイズを検出する原稿傾き・サイズ検出工程と、前記原稿傾き・サイズ検出工程での検出結果に基づいて、前記画像データにおける原稿画像の傾きおよび原稿サイズを補正する原稿傾き・サイズ補正工程とを備える画像処理方法において、
前記原稿傾き・サイズ検出工程は、前記原稿画像の上下および左右のエッジを検出し、前記エッジの位置を示すエッジ座標を求めるエッジ検出処理工程と、前記エッジ座標に基づいて前記原稿画像の傾き角度を算出する角度算出工程と、算出された前記原稿画像の傾き角度に基づいて、前記エッジ座標を前記原稿画像の傾きがない状態の補正エッジ座標に変換する座標情報変換工程と、原稿領域検出処理により、前記補正エッジ座標から原稿のサイズを示す情報を算出する原稿領域検出工程とを備え、前記原稿領域検出工程では、前記角度算出工程にて算出された前記原稿画像の傾き角度を閾値と比較し、前記原稿画像の傾き角度が閾値以上の場合には第1の原稿領域検出処理を行い、前記原稿画像の傾き角度が閾値未満の場合には第2の原稿領域検出処理を行い、前記第1の原稿領域検出処理では、エッジ検出処理工程にて検出された各エッジについて、前記補正エッジ座標を使用して、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出する一方、第2の原稿領域検出処理では、エッジ検出処理工程にて検出された各エッジについて、前記補正エッジ座標を使用して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出することを特徴としている。
The image processing method of the present invention also includes a document inclination / size detection step for detecting a document image inclination and document size indicated by image data obtained by reading the document, and a detection in the document inclination / size detection step. In an image processing method comprising: a document inclination / size correction step for correcting a document image inclination and document size in the image data based on a result;
The document inclination / size detection step detects the upper and lower and left and right edges of the document image and obtains edge coordinates indicating the position of the edge; and the inclination angle of the document image based on the edge coordinates An angle calculating step for calculating the original image, a coordinate information converting step for converting the edge coordinates into a corrected edge coordinate in a state where there is no inclination of the original image, based on the calculated inclination angle of the original image, and an original region detection process The document area detecting step for calculating information indicating the size of the document from the corrected edge coordinates, and in the document area detecting step, the inclination angle of the document image calculated in the angle calculating step is compared with a threshold value. If the document image tilt angle is greater than or equal to a threshold value, a first document area detection process is performed. If the document image tilt angle is less than the threshold value, a second original image is detected. An area detection process is performed, and in the first document area detection process, each edge detected in the edge detection process step is an effective edge that can be regarded as an edge of the document image using the corrected edge coordinates. In the second document area detection process, for each edge detected in the edge detection processing step, the information indicating the size of the document is calculated based only on the effective edge. Whether the edge is an effective edge or noise that can be regarded as an edge of the document image on the condition that the range of detecting the document region is limited as compared to the first document region detection process using the corrected edge coordinates. This is characterized in that information indicating the size of the original is calculated based on only the valid edge.

上記の構成によれば、原稿傾き・サイズ検出部(原稿傾き・サイズ検出工程)では、エッジ検出処理部(エッジ検出処理工程)において、原稿画像の上下および左右のエッジを検出し、エッジの位置を示すエッジ座標を求める。次に、角度算出部(角度算出工程)において、前記エッジ座標に基づいて原稿画像の傾き角度を算出する。次に、座標情報変換部(座標情報変換工程)において、角度算出部(角度算出工程)にて算出された前記原稿画像の傾き角度に基づいて、前記エッジ座標を原稿画像の傾きがない状態の補正エッジ座標に変換する。次に、原稿領域検出部(原稿領域検出工程)において、原稿領域検出処理により、前記補正エッジ座標から原稿のサイズを示す情報を算出する。   According to the above configuration, in the document inclination / size detection unit (document inclination / size detection step), the edge detection processing unit (edge detection processing step) detects the upper and lower and left and right edges of the document image, and the position of the edge Is obtained. Next, in the angle calculation unit (angle calculation step), the inclination angle of the document image is calculated based on the edge coordinates. Next, in the coordinate information conversion unit (coordinate information conversion step), the edge coordinates are set in a state where there is no inclination of the original image based on the inclination angle of the original image calculated by the angle calculation unit (angle calculation step). Convert to corrected edge coordinates. Next, in the document region detection unit (document region detection step), information indicating the document size is calculated from the corrected edge coordinates by document region detection processing.

上記原稿領域検出部(原稿領域検出部工程)では、角度算出部(角度算出工程)にて算出された原稿画像の傾き角度を閾値と比較し、原稿画像の傾き角度が閾値以上の場合には第1の原稿領域検出処理を行い、原稿画像の傾き角度が閾値未満の場合には第2の原稿領域検出処理を行う。   In the document area detection unit (document area detection unit process), the inclination angle of the document image calculated by the angle calculation unit (angle calculation process) is compared with a threshold value. A first document area detection process is performed, and if the inclination angle of the document image is less than a threshold value, a second document area detection process is performed.

第1の原稿領域検出処理では、エッジ検出処理部(エッジ検出処理工程)にて検出された各エッジについて、前記補正エッジ座標を使用して、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出する。一方、第2の原稿領域検出処理では、エッジ検出処理部(エッジ検出処理工程)にて検出された各エッジについて、前記補正エッジ座標を使用して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出する。   In the first document area detection processing, each edge detected by the edge detection processing unit (edge detection processing step) is an effective edge that can be regarded as an edge of the document image using the corrected edge coordinates, or noise. And information indicating the size of the original is calculated based only on the valid edge. On the other hand, in the second document area detection process, the corrected edge coordinates are used for each edge detected by the edge detection processing unit (edge detection process step), and the document is detected more than in the first document area detection process. Whether the edge is a valid edge that can be regarded as an edge of the document image or noise is determined under a condition that limits the area detection range, and information indicating the document size is calculated based only on the valid edge.

上記のように、原稿領域検出部(原稿領域検出部工程)では、画像データに対して一律に原稿領域検出処理を行うのではなく、原稿画像の傾き角度が閾値以上か閾値未満かにより、第1の原稿領域検出処理と第2の原稿領域検出処理とを切り替えている。この場合、原稿画像の傾き角度が閾値未満であるときに選択される第2の原稿領域検出処理は、原稿画像の各エッジに対して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定する。これにより、原稿読取装置において、正規の配置状態に対し傾き角度が小さい状態に原稿が配置された状態にて原稿が読み取られた場合であっても、原稿の読取時に生じる原稿外領域の縦スジ等のノイズによる誤検知を回避して、高い精度にて原稿サイズの検出を行うことができる。   As described above, the document region detection unit (document region detection unit step) does not perform document region detection processing uniformly on image data, but determines whether the document image tilt angle is greater than or less than a threshold value. The first document area detection process and the second document area detection process are switched. In this case, the second document area detection process selected when the inclination angle of the document image is less than the threshold value detects a document area for each edge of the document image more than the first document area detection process. Whether the edge is a valid edge or noise that can be regarded as an edge of the document image is determined under a condition that limits the range to be processed. Thus, even when the original is read with the original reading apparatus in a state in which the inclination angle is small with respect to the normal arrangement state, the vertical streak of the outside area of the original generated when the original is read. Thus, it is possible to detect the document size with high accuracy by avoiding erroneous detection due to noise such as the above.

上記の画像形成装置において、前記原稿領域検出部は、前記第2の原稿領域検出処理として、第1の処理と第2の処理とを含み、前記第1の処理では、前記第2の処理よりも原稿領域を検出する範囲を限定した条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、前記第1の処理を前記第2の処理よりも優先して行い、前記第1の処理にて原稿のサイズを示す情報を算出できない場合に、前記第2の処理を行う構成としてもよい。   In the image forming apparatus, the document area detection unit includes a first process and a second process as the second document area detection process. In the first process, the document process is performed by the second process. Also, it is determined whether the edge is a valid edge or noise that can be regarded as an edge of the document image under the condition that the range for detecting the document area is limited, and the first process is prioritized over the second process. If the information indicating the size of the document cannot be calculated in the first process, the second process may be performed.

上記の構成によれば、原稿領域検出部は、原稿画像の傾き角度が閾値未満であるときに選択される第2の原稿領域検出処理として、第1の処理と第2の処理とを含み、第1の処理では、原稿領域を検出する範囲を限定した条件にて、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、第1の処理を前記第2の処理よりも優先して行い、第1の処理にて原稿のサイズを示す情報を算出できない場合に、前記第2の処理を行う。   According to the above configuration, the document area detection unit includes the first process and the second process as the second document area detection process selected when the inclination angle of the document image is less than the threshold value. In the first process, it is determined whether the edge is an effective edge or noise that can be regarded as an edge of the document image under a condition that limits the range in which the document area is detected, and the first process is compared to the second process. The second process is performed when information indicating the size of the document cannot be calculated in the first process.

これにより、原稿読取装置において、正規の配置状態に対し傾き角度が小さい状態に原稿が配置された状態にて原稿が読み取られた場合における原稿サイズの検出をさらに高い精度にて行うことができる。   As a result, in the document reading apparatus, the document size can be detected with higher accuracy when the document is read in a state in which the document is placed in a state where the inclination angle is small with respect to the normal placement state.

上記の画像形成装置において、前記原稿領域検出部は、前記第2の原稿領域検出処理として、第1の処理と第2の処理とを含み、前記第2の処理では、前記第1の処理よりも、原稿領域が広くなる条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、前記第1の処理を前記第2の処理よりも優先して行い、前記第1の処理にて原稿のサイズを示す情報を算出できない場合に、前記第2の処理を行う構成としてもよい。   In the image forming apparatus, the document area detection unit includes a first process and a second process as the second document area detection process. In the second process, the document process is performed by the first process. Determining whether the edge of the document image is an effective edge or noise under the condition that the document area is widened, and performing the first process with priority over the second process, The second process may be performed when information indicating the size of the document cannot be calculated by the first process.

上記の構成によれば、原稿領域検出部は、原稿画像の傾き角度が閾値未満であるときに選択される第2の原稿領域検出処理として、第1の処理と第2の処理とを含み、第2の処理では、第1の処理よりも、原稿領域が広くなる条件にて、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、第1の処理を前記第2の処理よりも優先して行い、第1の処理にて原稿のサイズを示す情報を算出できない場合に、前記第2の処理を行う。   According to the above configuration, the document area detection unit includes the first process and the second process as the second document area detection process selected when the inclination angle of the document image is less than the threshold value. In the second process, it is determined whether the edge is a valid edge or noise that can be regarded as an edge of the document image under the condition that the document area is wider than in the first process, and the first process is the second process. If the information indicating the size of the document cannot be calculated in the first process, the second process is performed.

これにより、原稿読取装置において、正規の配置状態に対し傾き角度が小さい状態に原稿が配置された状態にて原稿が読み取られた場合における原稿サイズの検出をさらに高い精度にて行うことができる。   As a result, in the document reading apparatus, the document size can be detected with higher accuracy when the document is read in a state in which the document is placed in a state where the inclination angle is small with respect to the normal placement state.

上記の画像形成装置において、前記原稿領域検出部は、前記第2の原稿領域検出処理の前記第1の処理および前記第2の処理にて原稿のサイズを示す情報を算出できない場合に、前記第1の原稿領域検出処理を行う構成としてもよい。   In the image forming apparatus, the document area detection unit may calculate the first document area when the information indicating the document size cannot be calculated in the first process and the second process of the second document area detection process. One document area detection process may be performed.

上記の構成によれば、原稿領域検出部は、原稿画像の傾き角度が閾値未満であるときに第2の原稿領域検出処理を選択し、第1の処理もしくは第2の処理を行う。しかしながら、これら第1の処理および第2の処理にて原稿のサイズを示す情報を算出できない場合には第1の原稿領域検出処理を行う。   According to the above configuration, the document area detection unit selects the second document area detection process when the inclination angle of the document image is less than the threshold value, and performs the first process or the second process. However, when the information indicating the size of the document cannot be calculated by the first process and the second process, the first document area detection process is performed.

これにより、第2の原稿領域検出処理の第1の処理および第2の処理にて原稿のサイズを示す情報を算出できない場合であっても、第1の原稿領域検出処理を行うことにより、原稿のサイズを示す情報を算出することができる。この結果、原稿サイズの検出を高い精度にて行う機能と確実に行う機能とを備えることができる。   Thus, even if information indicating the size of the document cannot be calculated by the first process and the second process of the second document area detection process, the first document area detection process performs the document It is possible to calculate information indicating the size of the. As a result, it is possible to provide a function for detecting the document size with high accuracy and a function for performing it reliably.

以上のように、本発明の構成では、画像データに対して一律に原稿領域検出処理を行うのではなく、原稿画像の傾き角度が閾値以上か閾値未満かにより、第1の原稿領域検出処理と第2の原稿領域検出処理とを切り替えている。この場合、原稿画像の傾き角度が閾値未満であるときに選択される第2の原稿領域検出処理は、原稿画像の各エッジに対して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定する。これにより、原稿読取装置において、正規の配置状態に対し傾き角度が小さい状態に原稿が配置された状態にて原稿が読み取られた場合であっても、原稿の読取時に生じる原稿外領域の縦スジ等のノイズによる誤検知を回避して、高い精度にて原稿サイズの検出を行うことができる。   As described above, in the configuration of the present invention, the document area detection process is not performed uniformly on the image data, but the first document area detection process is performed depending on whether the inclination angle of the document image is greater than or less than a threshold value. The second document area detection process is switched. In this case, the second document area detection process selected when the inclination angle of the document image is less than the threshold value detects a document area for each edge of the document image more than the first document area detection process. Whether the edge is a valid edge or noise that can be regarded as an edge of the document image is determined under a condition that limits the range to be processed. Thus, even when the original is read with the original reading apparatus in a state in which the inclination angle is small with respect to the normal arrangement state, the vertical streak of the outside area of the original generated when the original is read. Thus, it is possible to detect the document size with high accuracy by avoiding erroneous detection due to noise such as the above.

また、原稿の背景が白板であるため、原稿自身と白板の境界部分とにおける原稿画像のエッジを検出し難いような原稿画像に対しても、精度よく原稿サイズを検出することができる。   Further, since the background of the document is a white plate, it is possible to accurately detect the document size even for a document image in which it is difficult to detect the edge of the document image at the boundary between the document itself and the white plate.

本発明の実施の形態の画像形成装置としてのデジタルカラー複写機の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a digital color copying machine as an image forming apparatus according to an embodiment of the present invention. 本発明の実施例2に係る・・・図である。It is ... figure which concerns on Example 2 of this invention. 図1に示した原稿傾き・サイズ検出部の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a document inclination / size detection unit illustrated in FIG. 1. 図1に示したデジタルカラー複写機の操作パネルにおけるLCD表示部に表示される特別機能表示初期メニューを示す説明図である。FIG. 2 is an explanatory diagram showing a special function display initial menu displayed on an LCD display unit in the operation panel of the digital color copying machine shown in FIG. 1. 図1に示した原稿傾き・サイズ検出部による原稿傾き・サイズ検出処理の手順の概要を示すフローチャートである。3 is a flowchart showing an outline of a procedure of original inclination / size detection processing by an original inclination / size detection unit shown in FIG. 図6(a)は、図3に示したエッジ検出処理部にて検出された上部エッジ座標、下部エッジ座標、上部補正エッジ座標および下部補正エッジ座標を格納する第1座標情報テーブルを示す説明図である。図6(b)は、図3に示したエッジ検出処理部にて検出された左部エッジ座標、右部エッジ座標、左部補正エッジ座標および右部補正エッジ座標を格納する第2座標情報テーブルを示す説明図である。FIG. 6A is an explanatory diagram showing a first coordinate information table storing upper edge coordinates, lower edge coordinates, upper correction edge coordinates, and lower correction edge coordinates detected by the edge detection processing unit shown in FIG. It is. FIG. 6B is a second coordinate information table that stores the left edge coordinates, right edge coordinates, left correction edge coordinates, and right correction edge coordinates detected by the edge detection processing unit shown in FIG. It is explanatory drawing which shows. 図4に示した角度算出部が使用する、正接 - 角度テーブルを示す説明図である。FIG. 5 is an explanatory diagram illustrating a tangent-angle table used by the angle calculation unit illustrated in FIG. 4. 図1に示した原稿傾き・サイズ検出部において、求めた原稿サイズを定型サイズに変換する場合に使用する、解像度300dpiの場合の用紙サイズテーブルの一例を示す説明図である。FIG. 3 is an explanatory diagram illustrating an example of a paper size table in the case of a resolution of 300 dpi used when the obtained document size is converted into a standard size in the document inclination / size detection unit illustrated in FIG. 1. 図3に示した原稿領域検出部による原稿領域検出処理の動作を示すフローチャートである。4 is a flowchart illustrating an operation of document area detection processing by a document area detection unit illustrated in FIG. 3. 図10(a)は、図9におけるS14の処理の説明図、図10(b)は、図9におけるS19の処理の説明図、図10(c)は、図9におけるS22の処理の説明図である。10A is an explanatory diagram of the process of S14 in FIG. 9, FIG. 10B is an explanatory diagram of the process of S19 in FIG. 9, and FIG. 10C is an explanatory diagram of the process of S22 in FIG. It is. 図1に示した原稿傾き・サイズ補正部における原稿傾き・サイズ補正処理の概要を示すフローチャートである。3 is a flowchart showing an outline of document skew / size correction processing in a document skew / size corrector shown in FIG. 図1に示した原稿傾き・サイズ補正部の原稿傾き・サイズ補正処理において使用される、回転元座標値の算出例を示す説明図である。FIG. 7 is an explanatory diagram illustrating an example of calculating a rotation source coordinate value used in the document inclination / size correction process of the document inclination / size correction unit illustrated in FIG. 1. 図1に示したデジタルカラー複写機1のLCD表示部において、「原稿傾き・サイズ補正」が選択された場合に、LCD表示部に表示される初期メニューを示す説明図である。FIG. 3 is an explanatory diagram showing an initial menu displayed on the LCD display section when “original skew / size correction” is selected on the LCD display section of the digital color copying machine 1 shown in FIG. 1. 図1に示したデジタルカラー複写機の他の例を示すブロック図である。It is a block diagram which shows the other example of the digital color copying machine shown in FIG. 図1に示した原稿傾き・サイズ検出部および原稿傾き・サイズ補正部を備えた画像読取装置の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of an image reading apparatus including the document inclination / size detection unit and the document inclination / size correction unit illustrated in FIG. 1.

〔実施の形態1〕
本発明の実施の形態を図面に基づいて以下に説明する。
図1は、本発明の実施の形態の画像形成装置としてのデジタルカラー複写機の構成を示すブロック図である。図1に示すように、デジタルカラー複写機(画像形成装置)1は、カラー画像入力装置2、カラー画像処理装置3、カラー画像出力装置(印刷装置)4および画像メモリ5を備えている。
[Embodiment 1]
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a digital color copying machine as an image forming apparatus according to an embodiment of the present invention. As shown in FIG. 1, a digital color copier (image forming apparatus) 1 includes a color image input device 2, a color image processing device 3, a color image output device (printing device) 4, and an image memory 5.

カラー画像入力装置2は、例えばCCDなどの光学情報を電気信号に変換するデバイスを備えたスキャナ部にて構成され、原稿からの反射光像(反射率の信号)を、RGBのアナログ信号として出力する。   The color image input device 2 is configured by a scanner unit including a device that converts optical information, such as a CCD, into an electrical signal, and outputs a reflected light image (reflectance signal) from an original as an RGB analog signal. To do.

カラー画像処理装置3は、A/D変換部11、シェーディング補正部12、入力階調補正部13、原稿傾き・サイズ補正部14、領域分離処理部15、色補正部16、黒生成下色除去部17、空間フィルタ処理部18、出力階調補正部19、階調再現処理部20および原稿傾き・サイズ検出部21を備えている。   The color image processing apparatus 3 includes an A / D conversion unit 11, a shading correction unit 12, an input tone correction unit 13, a document inclination / size correction unit 14, a region separation processing unit 15, a color correction unit 16, and a black generation under color removal. 17, a spatial filter processing unit 18, an output tone correction unit 19, a tone reproduction processing unit 20, and a document inclination / size detection unit 21.

カラー画像入力装置2にて読み取られ、カラー画像処理装置3へ入力された原稿画像のRGBのナログ信号は、カラー画像処理装置3内を、A/D変換部11、シェーディング補正部12、入力階調補正部13、原稿傾き・サイズ補正部14、領域分離処理部15、色補正部16、黒生成下色除去部17、空間フィルタ処理部18、出力階調補正部19および階調再現処理部20の順に送られ、CMYKのデジタルカラー信号として、カラー画像出力装置4へ出力される。   The RGB analog signal of the original image read by the color image input device 2 and input to the color image processing device 3 passes through the color image processing device 3 through the A / D conversion unit 11, the shading correction unit 12, the input floor. Tone correction unit 13, document skew / size correction unit 14, area separation processing unit 15, color correction unit 16, black generation and under color removal unit 17, spatial filter processing unit 18, output gradation correction unit 19, and gradation reproduction processing unit 20 and are output to the color image output device 4 as CMYK digital color signals.

A/D変換部11は、RGBのアナログ信号をデジタル信号に変換する。シェーディング補正部12では、A/D変換部11より送られてきたデジタルのRGB信号に対して、カラー画像入力装置2の照明系、結像系、撮像系で生じる各種の歪みを取り除く処理を施す。また、カラーバランスを整えると同時に、反射率の信号を濃度(画素値)信号に変換する処理を施す。   The A / D converter 11 converts RGB analog signals into digital signals. In the shading correction unit 12, the digital RGB signal sent from the A / D conversion unit 11 is subjected to processing for removing various distortions generated in the illumination system, imaging system, and imaging system of the color image input device 2. . Further, at the same time as adjusting the color balance, a process of converting the reflectance signal into a density (pixel value) signal is performed.

入力階調補正部13は、シェーディング補正部12にて各種の歪みが取り除かれたRGB信号に対して、下地濃度の除去やコントラストなどの画質調整処理を施す。   The input tone correction unit 13 performs image quality adjustment processing such as background density removal and contrast on the RGB signal from which various distortions have been removed by the shading correction unit 12.

原稿傾き・サイズ検出部21は、シェーディング補正部12にてシェーディング補正され、入力階調補正部13にて処理されたRGB信号から原稿のエッジを抽出し、原稿の傾き角度、傾き補正後の原稿サイズ、および補正処理開始位置に関する補正用パラメータを求める。原稿傾き・サイズ検出部21は、入力階調補正部13からの画像データを用いて処理を実施するものであり、ここでの処理はパイプライン処理ではない。   The document inclination / size detection unit 21 extracts the edge of the document from the RGB signal that has been subjected to the shading correction by the shading correction unit 12 and processed by the input tone correction unit 13, and the document inclination angle and the document after the inclination correction. Correction parameters relating to the size and correction processing start position are obtained. The document inclination / size detection unit 21 performs processing using the image data from the input tone correction unit 13, and the processing here is not pipeline processing.

原稿傾き・サイズ補正部14は、原稿傾き・サイズ検出処理部21にて算出された補正用パラメータを用いて、入力階調補正部13から出力されたRGBデータに対して、原稿の傾きおよび原稿のサイズを補正する。   The document inclination / size correction unit 14 uses the correction parameters calculated by the document inclination / size detection processing unit 21 to correct the document inclination and the document with respect to the RGB data output from the input tone correction unit 13. Correct the size.

原稿傾き・サイズ検出部21および原稿傾き・サイズ補正部14での処理は、図4に示したコピーモードの特別機能において「原稿傾き・サイズ補正」が選択された場合に行われる。なお、図4は、デジタルカラー複写機1の操作パネルにおけるLCD表示部51に表示される特別機能表示初期メニューを示す説明図である。   The processes in the document inclination / size detection unit 21 and the document inclination / size correction unit 14 are performed when “document inclination / size correction” is selected in the special function of the copy mode shown in FIG. FIG. 4 is an explanatory view showing a special function display initial menu displayed on the LCD display unit 51 in the operation panel of the digital color copying machine 1.

領域分離処理部15は、原稿傾き・サイズ補正部14から入力されたRGB信号に基づき、入力画像中の各画素を例えば文字領域、網点領域、あるいは写真領域の何れかに分離する。また、領域分離処理部15は、上記の分離結果に基づき、各画素がどの領域に属しているかを示す領域識別信号を、黒生成下色除去部17、空間フィルタ処理部18、出力階調補正部19および階調再現処理部20へと出力する。   The region separation processing unit 15 separates each pixel in the input image into, for example, a character region, a halftone dot region, or a photographic region based on the RGB signal input from the document inclination / size correction unit 14. In addition, the region separation processing unit 15 generates a region identification signal indicating which region each pixel belongs to based on the above separation result, and generates a black generation and under color removal unit 17, a spatial filter processing unit 18, an output gradation correction. To the unit 19 and the gradation reproduction processing unit 20.

さらに、領域分離処理部15は、入力信号をそのまま後段の色補正部15に出力する。なお、原稿傾き・サイズ検出部21および原稿傾き・サイズ補正部14が処理動作を行わない場合、上記入力信号は入力階調補正部13からの出力信号である。一方、原稿傾き・サイズ検出部21および原稿傾き・サイズ補正部14が処理動作を行う場合、上記入力信号は、原稿傾き・サイズ補正部14にて処理され、画像メモリ5に格納された補正後データである。   Further, the region separation processing unit 15 outputs the input signal as it is to the subsequent color correction unit 15. When the document inclination / size detection unit 21 and the document inclination / size correction unit 14 do not perform the processing operation, the input signal is an output signal from the input gradation correction unit 13. On the other hand, when the document inclination / size detection unit 21 and the document inclination / size correction unit 14 perform processing operations, the input signal is processed by the document inclination / size correction unit 14 and is subjected to correction stored in the image memory 5. It is data.

色補正部16は、色再現の忠実化を図るために、不要吸収成分を含むCMY色材の分光特性に基づいた色濁りを取り除く処理を行う。   The color correction unit 16 performs a process of removing color turbidity based on the spectral characteristics of the CMY color material including unnecessary absorption components in order to achieve faithful color reproduction.

黒生成下色除去部17は、色補正後のCMYの3色信号から黒(K)信号を生成する黒生成、元のCMY信号から黒生成で得たK信号を差し引いて新たなCMY信号を生成する処理を行う。これによりCMYの3色信号はCMYKの4色信号に変換される。   The black generation and under color removal unit 17 generates black (K) signals from the CMY three-color signals after color correction, and subtracts the K signals obtained by black generation from the original CMY signals to generate new CMY signals. Generate the process. As a result, the CMY three-color signal is converted into a CMYK four-color signal.

空間フィルタ処理部18は、黒生成下色除去部17より入力されるCMYK信号の画像データに対して、領域識別信号を基にデジタルフィルタによる空間フィルタ処理を行い、空間周波数特性を補正する。これにより出力画像のぼやけや粒状性劣化を軽減することができる。   The spatial filter processing unit 18 performs spatial filter processing using a digital filter on the image data of the CMYK signal input from the black generation and under color removal unit 17 to correct the spatial frequency characteristics. As a result, blurring of the output image and deterioration of graininess can be reduced.

出力階調補正部19では、濃度信号などの信号をカラー画像出力装置4に出力するための出力γ補正処理を行う。   The output tone correction unit 19 performs output γ correction processing for outputting a signal such as a density signal to the color image output device 4.

階調再現処理部20は、空間フィルタ処理部18と同様に、CMYK信号の画像データに対して、領域識別信号に基づいた処理を行う。   Similar to the spatial filter processing unit 18, the gradation reproduction processing unit 20 performs processing based on the region identification signal on the image data of the CMYK signal.

例えば、領域分離処理部15にて文字に分離された領域に対しては、空間フィルタ処理部18では、文字の再現性を高めるために、空間フィルタとして高周波成分の強調量が大きいフィルタが用いられる。階調再現処理部20では、高域周波成分の再現に適した高解像度のスクリーンによる二値化もしくは多値化処理が実施される。   For example, for a region separated into characters by the region separation processing unit 15, the spatial filter processing unit 18 uses a filter with a high enhancement amount of high frequency components as a spatial filter in order to improve the reproducibility of characters. . In the gradation reproduction processing unit 20, binarization or multilevel conversion processing is performed using a high-resolution screen suitable for reproducing high-frequency components.

領域分離処理部15にて網点に分離された領域に対しては、空間フィルタ処理部18では、入力網点成分を除去するためのローパス・フィルタ処理が施される。出力階調補正部19ではγ補正処理が施され、その後、階調再現処理部20では、最終的に画像を画素に分離してそれぞれの階調を再現できるようにする階調再現処理が施される。   For the region separated into halftone dots by the region separation processing unit 15, the spatial filter processing unit 18 performs low-pass filter processing for removing the input halftone component. The output gradation correction unit 19 performs γ correction processing, and then the gradation reproduction processing unit 20 performs gradation reproduction processing that finally separates the image into pixels so that each gradation can be reproduced. Is done.

領域分離処理部にて写真に分離された領域に対しては、階調再現処理部20では、階調再現性を重視したスクリーンでの二値化または多値化処理が行われる。   For the region separated into photographs by the region separation processing unit, the tone reproduction processing unit 20 performs binarization or multi-value processing on the screen with an emphasis on tone reproducibility.

上述した各処理が施された画像データは、一旦、画像メモリ5に記憶され、所定のタイミングにて画像メモリ5から読み出されてカラー画像出力装置4に出力される。   The image data subjected to the above-described processes is temporarily stored in the image memory 5, read out from the image memory 5 at a predetermined timing, and output to the color image output device 4.

カラー画像出力装置4は、画像データを紙などの記録媒体上に出力するプリンタとして機能を有するものであり、例えば、電子写真方式やインクジェット方式を用いた印刷装置をあげることができる。   The color image output device 4 has a function as a printer that outputs image data onto a recording medium such as paper, and examples thereof include a printing device using an electrophotographic method or an inkjet method.

以上の処理は、デジタルカラー複写機1が備える図示しないCPU(Central Processing Unit)により制御される。また、画像形成装置は、デジタルカラー複写機1に限定されず、例えばコピー機能、プリンタ機能、ファクシミリ送信機能、scan to e-mail機能等を備える複合機であってもよい。   The above processing is controlled by a CPU (Central Processing Unit) (not shown) provided in the digital color copying machine 1. The image forming apparatus is not limited to the digital color copying machine 1, and may be, for example, a multi-function machine having a copy function, a printer function, a facsimile transmission function, a scan to e-mail function, and the like.

次に、原稿を自動的に搬送させて読み取るカラー画像入力装置2について説明する。図2は、図1に示したカラー画像入力装置2の構造の一例を示す縦断面図である。   Next, the color image input apparatus 2 that automatically conveys and reads a document will be described. FIG. 2 is a longitudinal sectional view showing an example of the structure of the color image input device 2 shown in FIG.

カラー画像入力装置2の原稿の読み取りが行われる原稿読取領域には、ラインセンサの方向に延びる所定幅の帯状白板が配置されている。この帯状白板は、原稿台に原稿をおいて読み取る際の原稿マットと同じではないものの、原稿台上に配置され原稿マットにて押さえられた原稿を読み取る場合と同様、原稿の背面は白色となる。これにより、本願発明の構成は、原稿台上に配置され原稿マットにて押さえられた原稿の画像データを処理する場合に加えて、カラー画像入力装置2にて読み取られた原稿の画像データを処理する場合にも、同様に適用可能である。   A strip-shaped white plate having a predetermined width extending in the direction of the line sensor is disposed in the document reading area where the color image input device 2 reads the document. This strip-shaped white plate is not the same as the original mat when the original is placed on the original table and is read, but the rear surface of the original is white as in the case of reading the original placed on the original table and pressed by the original mat. . Thus, the configuration of the present invention processes the image data of the document read by the color image input device 2 in addition to processing the image data of the document placed on the document table and pressed by the document mat. In this case, the same applies.

図2に示すように、カラー画像入力装置2は、上部筐体510にて覆われた原稿搬送部31、および下部筐体560にて覆われたスキャナ部32を備えている。   As shown in FIG. 2, the color image input apparatus 2 includes a document transport unit 31 covered with an upper housing 510 and a scanner unit 32 covered with a lower housing 560.

原稿搬送部31は、原稿トレイ511、原稿セットセンサ514、呼込みローラ512、搬送ローラ513a,513b、給送タイミングセンサ515、原稿排出ローラ516および原稿排出センサ567を備えている。原稿セットセンサ514は、原稿トレイ511に載置された原稿の有無を検知する。呼込みローラ512は、原稿トレイ511上の原稿を1枚ずつ搬送する。   The document transport unit 31 includes a document tray 511, a document set sensor 514, a drawing roller 512, transport rollers 513 a and 513 b, a feeding timing sensor 515, a document discharge roller 516, and a document discharge sensor 567. Document set sensor 514 detects the presence or absence of a document placed on document tray 511. The attracting roller 512 conveys the documents on the document tray 511 one by one.

搬送ローラ513a,513bは、原稿を読み取り位置に搬送する。搬送ローラ513bは、具体的には、駆動軸に電磁クラッチ(図示せず)を備えており、駆動モータ(図示せず)からの駆動力の伝達が制御され、原稿のない状態では停止している。一方、原稿の先端が給送タイミングセンサ515にて検出されると、原稿を下流側に搬送する方向に回転する。搬送ローラ513bは、停止した状態で、上流側より搬送された原稿の先端が、搬送ローラ513bのニップ部に付き当たり、原稿に所定の撓みを形成した後に、下流側に原稿を搬送する。この際に、搬送ローラ513bのニップ部により、原稿の先端が搬送方向に直角となるように整合される。   The conveyance rollers 513a and 513b convey the document to the reading position. Specifically, the conveyance roller 513b includes an electromagnetic clutch (not shown) on the drive shaft, and the transmission of the driving force from the drive motor (not shown) is controlled, and stops when there is no document. Yes. On the other hand, when the leading edge of the document is detected by the feeding timing sensor 515, the document rotates in the direction in which the document is conveyed downstream. The transport roller 513b is stopped and the leading edge of the document transported from the upstream side contacts the nip portion of the transport roller 513b to form a predetermined deflection, and then transports the document downstream. At this time, the leading edge of the document is aligned by the nip portion of the conveying roller 513b so as to be perpendicular to the conveying direction.

原稿排出ローラ516は原稿を読み取り位置から原稿排出トレイ566上に排出する。原稿排出センサ567は、原稿排出トレイ566上に排出される原稿を検知する。   The document discharge roller 516 discharges the document from the reading position onto the document discharge tray 566. The document discharge sensor 567 detects a document discharged on the document discharge tray 566.

スキャナ部32は、走査ユニット562,563、結像レンズ564、光電変換素子であるCCDラインセンサ565および排出トレイ566を備えている。走査ユニット562は、光源562aおよびミラー562bを備えている。走査ユニット563は、ミラー563aおよび563bを備えている。   The scanner unit 32 includes scanning units 562 and 563, an imaging lens 564, a CCD line sensor 565 that is a photoelectric conversion element, and a discharge tray 566. The scanning unit 562 includes a light source 562a and a mirror 562b. The scanning unit 563 includes mirrors 563a and 563b.

走査ユニット562,563は、原稿載置台561の下面に沿って平行に往復移動する。走査ユニット562の光源562aは、例えばハロゲンランプからなり、原稿トレイ511から搬送される原稿、あるいは原稿載置台561に載置された原稿に光を照射する。ミラー562bは、原稿で反射された光を走査ユニット563に導く。走査ユニット563のミラー563aおよび563bは、ミラー562bにて反射された光を結像レンズ564に導く。   The scanning units 562 and 563 reciprocate in parallel along the lower surface of the document table 561. The light source 562a of the scanning unit 562 is made of, for example, a halogen lamp, and irradiates light on a document conveyed from the document tray 511 or a document placed on the document placing table 561. The mirror 562b guides the light reflected by the document to the scanning unit 563. The mirrors 563a and 563b of the scanning unit 563 guide the light reflected by the mirror 562b to the imaging lens 564.

結像レンズ564は、走査ユニット563から導かれた反射光をCCDラインセンサ565上の所定の位置に結像させる。CCDラインセンサ565は、結像された光像を光電変換して電気信号を出力する。すなわち、原稿(例えば、原稿の表面)から読み取ったカラー画像に基づいて、R(赤)、G(緑)、B(青)の各色成分に色分解したデータをカラー画像処理装置へ出力する。   The imaging lens 564 images the reflected light guided from the scanning unit 563 at a predetermined position on the CCD line sensor 565. The CCD line sensor 565 photoelectrically converts the formed optical image and outputs an electrical signal. That is, based on a color image read from an original (for example, the surface of the original), data separated into R (red), G (green), and B (blue) color components is output to the color image processing apparatus.

次に、原稿傾き・サイズ検出部21、および原稿傾き・サイズ補正部14について説明する。図3は、図1に示した原稿傾き・サイズ検出部21の構成を示すブロック図である。原稿傾き・サイズ検出部21は、図3に示すように、エッジ検出処理部41、角度算出部42および原稿領域抽出部43を備えている。原稿領域抽出部43は、座標情報変換部44および原稿領域検出部45を備えている。   Next, the document inclination / size detection unit 21 and the document inclination / size correction unit 14 will be described. FIG. 3 is a block diagram showing a configuration of the document inclination / size detection unit 21 shown in FIG. As illustrated in FIG. 3, the document inclination / size detection unit 21 includes an edge detection processing unit 41, an angle calculation unit 42, and a document region extraction unit 43. The document area extraction unit 43 includes a coordinate information conversion unit 44 and a document area detection unit 45.

図5は、原稿傾き・サイズ検出部21による原稿傾き・サイズ検出処理の手順の概要を示すフローチャートである。   FIG. 5 is a flowchart showing an outline of the procedure of document skew / size detection processing by the document skew / size detector 21.

図5において、エッジ検出処理部41は、入力画像データから原稿のエッジを検出する。すなわち、原稿の最外接エッジ(エッジ座標)を検出する(S1)。   In FIG. 5, an edge detection processing unit 41 detects an edge of a document from input image data. That is, the outermost circumscribed edge (edge coordinate) of the document is detected (S1).

この処理を行う際に、エッジ検出処理部41は、下式のように、RGB信号を輝度Y信号に変換する。   When performing this processing, the edge detection processing unit 41 converts the RGB signal into a luminance Y signal as shown in the following equation.

Figure 2012070285
Figure 2012070285

なお、RGB信号は、CIE1976L***信号(CIE:Commission International de l'Eclairage、L*:明度、a*,b*:色度)に変換してもよい。あるいは、原稿傾き・サイズ補正処理において、G信号を用いてもよい。 The RGB signal may be converted into a CIE 1976 L * a * b * signal (CIE: Commission International de l'Eclairage, L * : brightness, a * , b * : chromaticity). Alternatively, the G signal may be used in the document inclination / size correction processing.

この処理において、エッジ検出処理部41は、入力画像データに対して、原稿のエッジ検出のための所定の解像度(検出用解像度)となるように縮小処理を行う。さらに、前記検出用解像度に変換された画像データ(検知用画像データ)の各ライン単位において、隣接画素同士の画素値の差が所定の閾値よりも大きくなる画素位置をエッジとして抽出する。   In this process, the edge detection processing unit 41 performs a reduction process on the input image data so as to have a predetermined resolution (detection resolution) for detecting the edge of the document. Further, in each line unit of the image data (detection image data) converted to the detection resolution, a pixel position where the difference in pixel value between adjacent pixels is larger than a predetermined threshold is extracted as an edge.

上記入力画像データは、例えばA3サイズの原稿において、カラー画像入力装置2にて読み取られた領域の画像データである。原稿傾き・サイズ補正部14による「原稿傾き・サイズ補正」(図4参照)が選択されている場合、原稿は原稿台の所定位置に載置されているとは限らず、また傾いて置かれている可能性がある。この場合、カラー画像入力装置2では、読み取り可能な最大サイズの領域にて原稿の読み取りを行う。   The input image data is, for example, image data of an area read by the color image input device 2 in an A3 size document. When “original inclination / size correction” (see FIG. 4) by the original inclination / size correction unit 14 is selected, the original is not necessarily placed at a predetermined position on the original table, and is also inclined. There is a possibility. In this case, the color image input apparatus 2 reads the document in the maximum readable area.

上記の所定の解像度(検出用解像度)は、例えば、75dpiなど、原稿傾き・サイズ検出処理に最適な予め設定されている解像度である。   The predetermined resolution (detection resolution) is a preset resolution that is optimal for document inclination / size detection processing, such as 75 dpi.

上記の所定の閾値は、例えば「3」等の数値に設定され、原稿載置台561上の原稿を押さえる部材(原稿押え部材)の下面の画像である原稿背景と原稿との境界を検出可能な値である。   The predetermined threshold is set to a numerical value such as “3”, for example, and the boundary between the document background and the document, which is an image on the lower surface of the document pressing member (document pressing member) on the document placing table 561, can be detected. Value.

次に、エッジ検出処理部41は、入力画像データから抽出した原稿のエッジ座標を図6(a)(b)に示す座標情報テーブルに格納する。図6(a)は、エッジ検出処理部41にて検出された上部エッジ座標、下部エッジ座標、上部補正エッジ座標および下部補正エッジ座標を格納する第1座標情報テーブルを示す説明図である。図6(b)は、エッジ検出処理部41にて検出された左部エッジ座標、右部エッジ座標、左部補正エッジ座標および右部補正エッジ座標を格納する第2座標情報テーブルを示す説明図である。   Next, the edge detection processing unit 41 stores the edge coordinates of the document extracted from the input image data in the coordinate information table shown in FIGS. FIG. 6A is an explanatory diagram illustrating a first coordinate information table that stores the upper edge coordinates, the lower edge coordinates, the upper correction edge coordinates, and the lower correction edge coordinates detected by the edge detection processing unit 41. FIG. 6B is an explanatory diagram illustrating a second coordinate information table that stores the left edge coordinate, the right edge coordinate, the left correction edge coordinate, and the right correction edge coordinate detected by the edge detection processing unit 41. It is.

エッジ検出処理部41は、入力画像データから抽出した原稿のエッジの画像において、x軸方向に走査した際の最も左側の画素座標を左部エッジ座標として算出し、最も右側の画素座標を右部エッジ座標として算出する。この処理にて算出される座標数M(図6(b))は、検出用解像度に変換された画像の縦方向のサイズに依存する。同様に、エッジ検出処理部41は、y軸方向に走査した際の最も上側の画素座標を上部エッジ座標として算出し、最も下側の画素座標を下部エッジ座標として算出する。算出される座標数N(図6(a))は、検出用解像度に変換された画像の横方向のサイズに依存する。   The edge detection processing unit 41 calculates the leftmost pixel coordinate when scanning in the x-axis direction as the left edge coordinate in the image of the document edge extracted from the input image data, and the rightmost pixel coordinate as the right part. Calculated as edge coordinates. The number of coordinates M (FIG. 6B) calculated in this process depends on the vertical size of the image converted to the detection resolution. Similarly, the edge detection processing unit 41 calculates the uppermost pixel coordinates when scanned in the y-axis direction as upper edge coordinates, and calculates the lowermost pixel coordinates as lower edge coordinates. The calculated coordinate number N (FIG. 6A) depends on the horizontal size of the image converted to the detection resolution.

次に、角度算出部42は、エッジ検出処理部41にて検出された、入力画像データのエッジ座標から、原稿の傾き角度を算出する(S2)。この処理には、特許文献1に述べられている傾き検知方法を利用することができる。   Next, the angle calculation unit 42 calculates the inclination angle of the document from the edge coordinates of the input image data detected by the edge detection processing unit 41 (S2). For this process, the tilt detection method described in Patent Document 1 can be used.

具体的には、まず、検出されたエッジ座標より、各原稿エッジの座標データ間の傾きの変化を検出し、傾きの変化する点(エッジ変化点)を求め、それらエッジ変化点を結ぶ線分を抽出する。   Specifically, first, a change in inclination between coordinate data of each document edge is detected from the detected edge coordinates, a point (edge change point) at which the inclination changes is obtained, and a line segment connecting these edge change points is obtained. To extract.

次に、抽出された線分のうちで、X方向(副走査方向)に対して傾斜角度が45゜以下の線分であって、一番長い線分を選択し、選択した線分の開始座標(StartEdgeX, StartEdgeY)と終端座標(EndEdgeX, EndEdgeY)とから原稿の傾きを算出する。   Next, among the extracted line segments, the longest line segment having an inclination angle of 45 ° or less with respect to the X direction (sub-scanning direction) is selected, and the selected line segment is started. The document inclination is calculated from the coordinates (StartEdgeX, StartEdgeY) and the end coordinates (EndEdgeX, EndEdgeY).

この場合、原稿の傾き角度をαとすると、   In this case, if the document tilt angle is α,

Figure 2012070285
Figure 2012070285

である。この値に相当する角度αをあらかじめ作成済みのテーブル、例えば図7に示すテーブル(正接 - 角度テーブル)から読み取る。 It is. The angle α corresponding to this value is read from a previously prepared table, for example, the table (tangent-angle table) shown in FIG.

次に、原稿領域抽出部43の座標情報変換部44は、エッジ検出処理部41にて検出されたエッジ座標に対して座標変換処理を行う(S3)。この座標変換処理では、エッジ検出処理部41にて検出されたエッジ座標を角度算出部42にて算出された原稿の傾き角度αにて補正する。   Next, the coordinate information conversion unit 44 of the document area extraction unit 43 performs coordinate conversion processing on the edge coordinates detected by the edge detection processing unit 41 (S3). In this coordinate conversion processing, the edge coordinates detected by the edge detection processing unit 41 are corrected by the document inclination angle α calculated by the angle calculation unit 42.

具体的には、座標情報変換部44は、エッジ検出処理部41により検出された全てのエッジ座標(EdgeX, EdgeY)を角度算出部42にて算出された原稿の傾き角度αにて補正した場合の座標情報を下式によって算出し、これを補正エッジ座標(CorrEdgeX, CorrEdgeY)とする。   Specifically, the coordinate information conversion unit 44 corrects all the edge coordinates (EdgeX, EdgeY) detected by the edge detection processing unit 41 with the document inclination angle α calculated by the angle calculation unit 42. Is calculated by the following equation, and this is used as corrected edge coordinates (CorrEdgeX, CorrEdgeY).

Figure 2012070285
Figure 2012070285

座標情報変換部44にて算出された各補正エッジ座標は、図6(a)および図6(b)の座標情報テーブルに格納される。   The corrected edge coordinates calculated by the coordinate information conversion unit 44 are stored in the coordinate information tables of FIGS. 6 (a) and 6 (b).

次に、原稿領域抽出部43の原稿領域検出部45は、原稿領域検出処理を行う(S4)。この原稿領域検出処理において、原稿領域検出部45は、角度算出部42にて検出された原稿の傾き角度αと処理切り替えのための閾値角度とを比較し、その比較結果に応じて、原稿領域検出処理を第1の原稿領域検出処理または第2の原稿領域検出処理に切り替える。なお、上記閾値角度は、正規の配置状態(原稿の傾き角度0度)に対する原稿の傾き角度の閾値であり、例えば2度〜3度など、原稿領域検出処理を切り替える上での適宜設定される最適な角度である。第1および第2の原稿領域検出処理については、後に詳述する。   Next, the document area detection unit 45 of the document area extraction unit 43 performs document area detection processing (S4). In this document area detection process, the document area detection unit 45 compares the document inclination angle α detected by the angle calculation unit 42 with a threshold angle for process switching, and determines the document area according to the comparison result. The detection process is switched to the first document area detection process or the second document area detection process. The threshold angle is a threshold value of the document inclination angle with respect to the normal arrangement state (document inclination angle 0 degree), and is appropriately set when switching the document area detection process, such as 2 degrees to 3 degrees. The optimal angle. The first and second document area detection processes will be described in detail later.

次に、原稿領域検出部45は、有効エッジとして判断された補正エッジ座標から、第1または第2の原稿領域検出処理において、補正処理開始座標(StartX,StartY)、補正後の原稿の高さおよび幅を以下の方法により算出する。   Next, the document area detection unit 45 determines the correction process start coordinates (StartX, StartY) and the corrected document height in the first or second document area detection process from the corrected edge coordinates determined as the valid edges. And the width are calculated by the following method.

補正処理開始座標(StartX,StartY):
有効補正エッジ座標内のx座標の最小値(CorrEdgeMinX)、およびy座標の最小値(CorrEdgeMinY)を次の変換式にて実際の座標系の座標値に戻し、その座標値を補正処理開始座標のStartX, StartYとして設定する。
Correction processing start coordinates (StartX, StartY):
The minimum value of the x coordinate (CorrEdgeMinX) and the minimum value of the y coordinate (CorrEdgeMinY) in the effective correction edge coordinate are returned to the coordinate value of the actual coordinate system by the following conversion formula, and the coordinate value is the correction processing start coordinate Set as StartX, StartY.

Figure 2012070285
Figure 2012070285

補正後原稿高さ:
(補正エッジ座標内のy座標の最大値)−(補正エッジ座標内のy座標の最小値)により求める。
Corrected document height:
(Maximum value of y coordinates in corrected edge coordinates) − (Minimum value of y coordinates in corrected edge coordinates).

補正後原稿幅:
(補正エッジ座標内のx座標の最大値)−(補正エッジ座標内のx座標の最小値)により求める。
Corrected document width:
(Maximum value of x coordinates in corrected edge coordinates) − (Minimum value of x coordinates in corrected edge coordinates)

原稿領域検出部45は、上記の補正処理開始座標(StartX,StartY)、補正後の原稿の高さおよび幅、並びに角度算出部42にて検出された角度情報を補正用パラメータとし、これらを補正用画像データの解像度(入力画像データの解像度)に合わせた値に変換した後、検知情報として出力する(S5)。   The document area detection unit 45 uses the correction processing start coordinates (StartX, StartY), the corrected document height and width, and the angle information detected by the angle calculation unit 42 as correction parameters, and corrects them. After being converted into a value that matches the resolution of the image data for use (resolution of the input image data), it is output as detection information (S5).

本実施の形態において、原稿サイズは、定型サイズではなく、上記処理により算出された補正後の原稿の高さ、幅を用いて表す。なお、算出された補正後の原稿の高さ、幅としては、定型サイズの用紙との対応関係を有するように、出力解像度別の用紙サイズテーブルを用いて、定型サイズに変換した値を用いてもよい。図8は、原稿傾き・サイズ検出部21において、求めた原稿サイズを定型サイズに変換する場合に使用する、解像度300dpiの場合の用紙サイズテーブルの一例を示す説明図である。   In the present embodiment, the document size is not represented by a standard size but is expressed using the height and width of the document after correction calculated by the above processing. As the calculated height and width of the original after correction, values converted to the standard size using the paper size table for each output resolution so as to have a correspondence with the standard size paper are used. Also good. FIG. 8 is an explanatory diagram showing an example of a paper size table for a resolution of 300 dpi used when the document inclination / size detection unit 21 converts the obtained document size into a standard size.

原稿サイズの決定方法としては、まず、算出された補正後原稿幅を用紙サイズテーブルに示されている各用紙サイズの用紙幅と比較し、用紙サイズの範囲を、補正後原稿幅以上の用紙幅の用紙サイズのうち、最小の用紙幅の範囲の用紙サイズに絞り込む。次に、算出された補正後原稿高さを用紙サイズテーブルに示されている各用紙サイズの用紙高さと比較し、補正後原稿高さ以上の用紙高さの用紙サイズのうち、最小の用紙高さの用紙サイズを出力用紙サイズとして設定する。   To determine the document size, first, compare the calculated corrected document width with the paper width of each paper size shown in the paper size table, and set the paper size range to a paper width greater than or equal to the corrected document width. The paper size is narrowed down to the minimum paper width range. Next, the corrected original height is compared with the paper height of each paper size shown in the paper size table, and the smallest paper height among the paper sizes with the paper height higher than the corrected original height is compared. Set the paper size as the output paper size.

例えば、300dpiに換算した場合の算出された補正後原稿幅が2480、補正後原稿高さ3500であった場合、まず、補正後原稿幅に基づき、用紙サイズの範囲を、用紙幅が2480以上の用紙サイズのうち、最小の用紙幅の範囲の用紙サイズであるA4またはA5Rに絞り込む。次に、補正後原稿高さに基づき、用紙高さが3500以上の用紙サイズのうち、最小の用紙高さの用紙サイズであるA4を出力用紙サイズとして設定する。   For example, when the corrected document width when converted to 300 dpi is 2480 and the corrected document height is 3500, first, based on the corrected document width, the paper size range is set to a sheet width of 2480 or more. The paper size is narrowed down to A4 or A5R which is the paper size in the minimum paper width range. Next, based on the corrected document height, A4 which is the smallest paper height among paper sizes of 3500 or more is set as the output paper size.

なお、出力用紙サイズテーブルの設定値は、サイズ検知結果の誤差を考慮して、実際のサイズよりも約10mm程度大きくなる画素数に設定されている。   Note that the set value of the output paper size table is set to the number of pixels that is about 10 mm larger than the actual size in consideration of the error of the size detection result.

次に、原稿領域検出部45による原稿領域検出処理を図9および図10(a)〜図10(c)に基づいて詳細に説明する。図9は、原稿領域検出部45による原稿領域検出処理の動作を示すフローチャートである。図10(a)は、図9におけるS14の処理の説明図、図10(b)は、図9におけるS19の処理の説明図、図10(c)は、図9におけるS22の処理の説明図である。   Next, document area detection processing by the document area detection unit 45 will be described in detail with reference to FIGS. 9 and 10A to 10C. FIG. 9 is a flowchart showing the operation of document area detection processing by the document area detection unit 45. 10A is an explanatory diagram of the process of S14 in FIG. 9, FIG. 10B is an explanatory diagram of the process of S19 in FIG. 9, and FIG. 10C is an explanatory diagram of the process of S22 in FIG. It is.

上記のように、エッジ検出処理部41にて原稿サイズ検知用に抽出された、原稿(入力画像データ)のエッジ座標情報(左部エッジ座標、右部エッジ座標、上部エッジ座標、下部エッジ座標)は、角度算出部42にて検出された、原稿(入力画像データ)の傾き角度を示す角度情報を用いて、座標情報変換部44にて傾き補正が施されることにより、補正エッジ座標情報(左部補正エッジ座標、右部補正エッジ座標、上部補正エッジ座標、下部補正エッジ座標)に変換される。原稿領域検出部45は、これら補正エッジ座標情報に基づき、下記処理によって有効な原稿エッジ(有効エッジ)を抽出する。   As described above, the edge coordinate information (left edge coordinates, right edge coordinates, upper edge coordinates, lower edge coordinates) of the document (input image data) extracted by the edge detection processing unit 41 for detecting the document size. Is corrected by using the angle information indicating the inclination angle of the document (input image data) detected by the angle calculation unit 42 and the coordinate information conversion unit 44 performs the inclination correction, thereby correcting the corrected edge coordinate information ( Left correction edge coordinates, right correction edge coordinates, upper correction edge coordinates, lower correction edge coordinates). The document area detection unit 45 extracts an effective document edge (effective edge) by the following processing based on the corrected edge coordinate information.

まず、各上部および下部補正エッジ座標に対して、最も端に位置する補正エッジ座標を注目座標とし、その注目座標の位置から数えて2(1,2,4,8,…)番目の位置の補正エッジ座標と注目座標とのy座標の差分値をそれぞれ求める。あるいは、その注目画素に近接する位置の画素を除いて、その注目座標の位置から数えて2(4,8,…)番目の位置の補正エッジ座標と注目座標とのy座標の差分値をそれぞれ求める。そして、それら差分値が閾値(例えば「2画素」)以下となる場合をカウントし、このカウント値を該当エッジに対する有効カウントとする。以下、注目座標を順次隣の補正エッジ座標に移していき、全ての補正エッジ座標について同様の処理が完了するまで、処理を繰り返す。これにより、各エッジ座標に対して、有効カウント値を求める(S11)。 First, for each of the upper and lower corrected edge coordinates, the corrected edge coordinate located at the end is set as the target coordinate, and the 2 n (1, 2, 4, 8,...) Position counted from the position of the target coordinate. The difference value of the y coordinate between the corrected edge coordinate and the target coordinate is obtained. Alternatively, the difference value of the y coordinate between the corrected edge coordinate of the 2 n (4, 8,...) Position and the target coordinate is counted from the position of the target coordinate excluding the pixel at the position close to the target pixel. Ask for each. Then, a case where the difference value is equal to or less than a threshold value (for example, “2 pixels”) is counted, and this count value is set as an effective count for the corresponding edge. Hereinafter, the attention coordinate is sequentially moved to the adjacent correction edge coordinate, and the processing is repeated until the same processing is completed for all the correction edge coordinates. Thus, an effective count value is obtained for each edge coordinate (S11).

次に、上部補正エッジ、下部補正エッジ別に、各補正エッジ座標の有効カウントに対して、あらかじめ設定されている抽出有効カウントパラメータ(例えば「2」)よりも大きい有効カウント値をもつエッジの有効カウント値の平均値(上部補正エッジ有効カウント平均値:AveEdgeCountT, 下部補正エッジ有効カウント平均値:AveEdgeCountB)と、最も大きな有効カウント値(上部補正エッジ最大有効カウント値:MaxEdgeCountT, 下部補正エッジ最大有効カウント値:MaxEdgeCountB)とを算出する(S12)。   Next, for each of the upper correction edge and the lower correction edge, an effective count of an edge having an effective count value larger than a preset extraction effective count parameter (for example, “2”) with respect to the effective count of each correction edge coordinate. Average value (upper correction edge effective count average value: AveEdgeCountT, lower correction edge effective count average value: AveEdgeCountB) and the largest effective count value (upper correction edge maximum effective count value: MaxEdgeCountT, lower correction edge maximum effective count value) : MaxEdgeCountB) is calculated (S12).

次に、上部補正エッジ有効カウント平均値(AveEdgeCountT)以上の有効カウント値を持つ上部補正エッジ情報のうち、y座標が最も小さいエッジを上部最大有効エッジとして設定する。また、下部補正エッジ有効カウント平均値(AveEdgeCountB)以上の有効カウント値を持つ下部補正エッジ情報のうち、y座標が最も大きいエッジを下部最大有効エッジとして設定する(S13)。   Next, of the upper correction edge information having an effective count value equal to or higher than the upper correction edge effective count average value (AveEdgeCountT), the edge having the smallest y coordinate is set as the upper maximum effective edge. Further, among the lower correction edge information having an effective count value equal to or higher than the lower correction edge effective count average value (AveEdgeCountB), the edge having the largest y coordinate is set as the lower maximum effective edge (S13).

次に、上部最大有効エッジの補正エッジ座標のy座標と、各上部補正エッジ座標のy座標との差分を求め、差分が設定範囲以下(例えば「2画素」以下)となる上部エッジは、最大有効エッジの延長線上に存在すると判断し、有効エッジとする。それ以外のエッジを無効エッジとする(図10(a)参照)。下部エッジに対しても、同様にして有効エッジと無効エッジの判定を行う(S14)。   Next, the difference between the y coordinate of the correction edge coordinate of the upper maximum effective edge and the y coordinate of each upper correction edge coordinate is obtained, and the upper edge where the difference is below the set range (for example, “two pixels” or less) It is determined that it exists on the extension line of the effective edge, and is set as the effective edge. The other edges are set as invalid edges (see FIG. 10A). The valid edge and invalid edge are similarly determined for the lower edge (S14).

次に、左部および右部補正エッジ情報に関して、x座標に対して、S11と同様の処理を実施し、各エッジ座標に対して、有効カウントを生成する(S15)。   Next, regarding the left and right corrected edge information, the same processing as S11 is performed on the x coordinate, and an effective count is generated for each edge coordinate (S15).

次に、左部および右部補正エッジ情報に関して、S12と同様の処理を行い、抽出有効カウントパラメータ(例えば「2」)よりも大きい有効カウント値をもつエッジの有効カウントの平均値(左部補正エッジ有効カウント平均値:AveEdgeCountL, 右部補正エッジ有効カウント平均値:AveEdgeCountR)と、最も大きな有効カウント値(左部補正エッジ最大有効カウント値:MaxEdgeCountL, 右部補正エッジ最大有効カウント値:MaxEdgeCountR)を算出する(S16)。   Next, with respect to the left and right corrected edge information, the same processing as in S12 is performed, and the average value of the effective counts of the edges having an effective count value larger than the extracted effective count parameter (eg, “2”) Edge effective count average value: AveEdgeCountL, right correction edge effective count average value: AveEdgeCountR) and the largest effective count value (left correction edge maximum effective count value: MaxEdgeCountL, right correction edge maximum effective count value: MaxEdgeCountR) Calculate (S16).

次に、検知角度が閾値以上であるか否かを判定し(S17)、検知角度が閾値以上の場合にはS18の第1の原稿領域検出処理を行い、検知角度が閾値未満の場合にはS19〜S20の第2の原稿領域検出処理を行う。   Next, it is determined whether or not the detection angle is greater than or equal to a threshold value (S17). If the detection angle is greater than or equal to the threshold value, the first document area detection process of S18 is performed, and if the detection angle is less than the threshold value. The second document area detection process of S19 to S20 is performed.

第1の原稿領域検出処理では、S18において、左部補正エッジ情報および右部補正エッジ情報に関して、S13と同様の処理を実施し、左部最大有効エッジおよび右部最大有効エッジを設定する。   In the first document area detection process, in S18, the same process as in S13 is performed on the left correction edge information and the right correction edge information, and the left maximum effective edge and the right maximum effective edge are set.

第2の原稿領域検出処理では、S19において、図10(b)に示すように、左部補正エッジ情報および右部補正エッジ情報に関して、3種類の最大有効エッジ候補(第1から第3の最大有効エッジ候補)を設定する。   In the second document area detection process, as shown in FIG. 10B, in S19, three types of maximum valid edge candidates (first to third maximum edges) are associated with the left correction edge information and the right correction edge information. Effective edge candidate) is set.

第1の最大有効エッジ候補は、S18の第1の原稿領域検出処理と同様の処理により設定する。   The first maximum valid edge candidate is set by the same process as the first document area detection process of S18.

第2の最大有効エッジ候補(第2の処理)は、上部有効補正エッジ(座標変換後の有効エッジ(有効補正エッジ))の端部および下部有効補正エッジ(座標変換後の有効エッジ(有効補正エッジ))の端部よりも外側のエッジ、かつ左部補正エッジ有効カウント平均値(AveEdgeCountL)および右部補正エッジ有効カウント平均値(AveEdgeCountR)以上のカウント値を持つ補正エッジ情報のうち、最も外側のエッジを設定する。   The second maximum valid edge candidate (second process) includes an upper effective correction edge (effective edge after coordinate conversion (effective correction edge)) and a lower effective correction edge (effective edge after coordinate conversion (effective correction). Edge)) and the outermost edge of the corrected edge information that has a count value greater than or equal to the left edge correction edge effective count average value (AveEdgeCountL) and right edge correction edge effective count average value (AveEdgeCountR) Set the edge.

第3の最大有効エッジ候補(第1の処理)は、上部有効補正エッジおよび下部有効補正エッジの端部を中心とする特定範囲内のエッジ、かつ左部補正エッジ有効カウント平均値(AveEdgeCountL)および右部補正エッジ有効カウント平均値(AveEdgeCountR)以上のカウント値を持つ補正エッジ情報のうち、最も外側のエッジを設定する。   The third maximum valid edge candidate (first processing) is an edge within a specific range centered on the ends of the upper valid correction edge and the lower valid correction edge, and the left corrected edge valid count average value (AveEdgeCountL) and Out of the corrected edge information having a count value equal to or greater than the right correction edge effective count average value (AveEdgeCountR), the outermost edge is set.

次に、S20において、第1から第3の最大有効エッジ候補(第1から第3の左部および右部最大有効エッジ候補)より、いずれか一つの最大有効エッジ候補(左部および右部最大有効エッジ候補)を選択する。   Next, in S20, from the first to third maximum effective edge candidates (first to third left and right maximum effective edge candidates), any one maximum effective edge candidate (left and right maximum) Effective edge candidate) is selected.

この選択において、第3の最大有効エッジ候補(第1の処理)は、上部下部エッジの情報も利用し、範囲を限定して抽出されるため、最も信頼度の高い情報となる。したがって、第3の最大有効エッジ候補が存在する場合は、このエッジを最大有効エッジとする。すなわち、第3の最大有効エッジ候補による処理(第1の処理)は、上記前記第1の原稿領域検出処理、および第2の最大有効エッジ候補による処理(第2の処理)よりも原稿領域を検出する範囲を限定した条件にて、検出された各エッジについて原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定するものである。   In this selection, the third maximum valid edge candidate (first process) is extracted with a limited range using the information of the upper and lower edges, and therefore has the highest reliability. Therefore, when the third maximum effective edge candidate exists, this edge is set as the maximum effective edge. In other words, the process using the third maximum effective edge candidate (first process) is performed using a document area more than the first document area detecting process and the process using the second maximum effective edge candidate (second process). It is determined whether each detected edge is an effective edge that can be regarded as an edge of a document image or noise under conditions that limit the detection range.

第2の最大有効エッジ候補は、極力コンテンツの欠けを無くすために、なるべく外側のエッジまで含むように抽出される。したがって、第3の最大有効エッジ候補が存在しない場合は、このエッジを最大有効エッジとする。   The second maximum valid edge candidate is extracted so as to include the outer edge as much as possible in order to eliminate content missing as much as possible. Therefore, when there is no third maximum effective edge candidate, this edge is set as the maximum effective edge.

第1の最大有効エッジ候補は、実際の原稿エッジを抽出できなかった場合でも、原稿内のコンテンツの欠けが発生しないように抽出される。したがって、第3および第2の最大有効エッジ候補がともに存在しない場合のみ、このエッジを最大有効エッジとする。   The first maximum valid edge candidate is extracted so as not to cause missing content in the document even if the actual document edge cannot be extracted. Therefore, this edge is set as the maximum effective edge only when both the third and second maximum effective edge candidates do not exist.

以上のように、第1から第3の最大有効エッジ候補の選択優先度は、第3の最大有効エッジ候補→第2の最大有効エッジ候補→第1の最大有効エッジ候補の順番となる。   As described above, the selection priority of the first to third maximum effective edge candidates is in the order of the third maximum effective edge candidate → the second maximum effective edge candidate → the first maximum effective edge candidate.

次に、第1または第2の原稿領域検出処理によって決定された左部補正エッジ情報および右部補正エッジ情報に関して、S14と同様の処理を実施し、有効エッジおよび無効エッジを判定する(S21)。   Next, the left edge correction edge information and the right edge correction edge information determined by the first or second document area detection process are subjected to the same processing as S14 to determine the valid edge and the invalid edge (S21). .

次に、図10(c)に示すように、S21において有効エッジと判定されたもののなかにも、孤立点ノイズが含まれている場合がある。そこで、ここでは、S21において有効エッジと判定されたものを、有効エッジと孤立点ノイズとに切り分ける処理を行う(S22)。   Next, as shown in FIG. 10C, isolated point noise may be included in those determined as valid edges in S21. Therefore, here, a process of separating the edge determined as the effective edge in S21 into the effective edge and the isolated point noise is performed (S22).

この処理では、S21において有効エッジと判定されたもののうち、原稿の上部エッジおよび下部エッジよりも外側に存在する左部エッジおよび右部エッジ、並びに原稿の左部エッジおよび右部エッジよりも外側に存在する上部エッジおよび下部エッジに対して、そのエッジ(処理対象エッジ)の周辺の有効エッジ情報を用いて、すなわちそのエッジ(処理対象エッジ)の周辺の有効エッジ数に応じて、その処理対象エッジが有効エッジか孤立ノイズかを判定する。   In this process, among those determined as valid edges in S21, the left and right edges existing outside the upper and lower edges of the document, and the outer edges of the left and right edges of the document. For the existing upper edge and lower edge, using the effective edge information around the edge (processing target edge), that is, depending on the number of effective edges around the edge (processing target edge), the processing target edge Is a valid edge or isolated noise.

上記判定では、たとえば処理対象エッジの周辺の有効エッジ数が所定以上の場合には、その処理対象エッジを有効エッジと判定する。一方、処理対象エッジの周辺の有効エッジ数が所定未満の場合には、その処理対象エッジを孤立率ノイズと判定する。   In the above determination, for example, when the number of effective edges around the processing target edge is greater than or equal to a predetermined value, the processing target edge is determined as an effective edge. On the other hand, when the number of effective edges around the processing target edge is less than a predetermined value, the processing target edge is determined as isolation rate noise.

上記のようにして、原稿傾き・サイズ検出部21に生成された原稿傾き・サイズ補正パラメータは、原稿傾き・サイズ補正部14に入力される。原稿傾き・サイズ補正部14では、原稿傾き・サイズ補正パラメータに基づいて、入力階調補正部13から入力されたRGBデータ(入力画像データ)に対して、原稿の傾きおよびサイズを補正する。図11は、原稿傾き・サイズ補正部14における原稿傾き・サイズ補正処理の概要を示すフローチャートである。   The document skew / size correction parameter generated in the document skew / size detection unit 21 as described above is input to the document skew / size correction unit 14. The document inclination / size correction unit 14 corrects the inclination and size of the document with respect to the RGB data (input image data) input from the input gradation correction unit 13 based on the document inclination / size correction parameter. FIG. 11 is a flowchart showing an outline of document skew / size correction processing in the document skew / size corrector 14.

原稿傾き・サイズ補正部14は、原稿傾き・サイズ補正処理において、画像メモリ5かから、RGB信号からなる入力画像データ(スキャンデータ)、すなわち入力階調補正部13から出力され、画像メモリ5に格納されている画像データを読み出す(S101)。   The document inclination / size correction unit 14 outputs, from the image memory 5, input image data (scan data) including RGB signals, that is, the input gradation correction unit 13, to the image memory 5 in the document inclination / size correction processing. The stored image data is read (S101).

次に、読み出した入力画像データに対して原稿傾き・サイズ補正処理を行う(S102)。   Next, document skew / size correction processing is performed on the read input image data (S102).

原稿傾き・サイズ補正処理としては、回転行列を用いたアフィン変換処理などが一般的である。   As document skew / size correction processing, affine transformation processing using a rotation matrix is generally used.

一般的に座標(x,y)をθ回転させた座標(x’,y’)は、下式に示す回転行列式にて表される。   In general, coordinates (x ′, y ′) obtained by rotating coordinates (x, y) by θ are expressed by a rotation determinant represented by the following equation.

Figure 2012070285
Figure 2012070285

したがって、画像の画素値として出力する場合には、整数値(x’,y’)に対して、小数値(xs,ys)を導いて、これをバイリニア等で補間演算する。上記(5)式の逆変換式は下記(6)式である。   Therefore, when outputting as the pixel value of the image, the decimal value (xs, ys) is derived from the integer value (x ′, y ′), and this is interpolated by bilinear or the like. The inverse transformation formula of the above formula (5) is the following formula (6).

Figure 2012070285
Figure 2012070285

この(6)式により、(x’,y’)を求めるにあたり必要となる(xs,ys)がわかる。 From this equation (6), (xs, ys) necessary for obtaining (x ′, y ′) can be found.

回転補正前のx-y座標系において、(xs+StartX,ys+StartY)を含む4点の画素の値は入力される。今、xi≦xs+StartX<xi+1、yi≦ys+StartY<yi+1で、その距離の比が、u:1-u、v:1-v(ただしu,vは共に0以上1未満の数値)であり、周辺4点の各画素の値が、(xi,yi):Z1、(xi+1,yi):Z2、(xi,yi+1):Z3、(xi+1,yi+1):Z4のとき、バイリニアによる補間後の座標値Zは、下記(7)式により求められる(図12参照)。なお、図12は、原稿傾き・サイズ補正部14の原稿傾き・サイズ補正処理において使用される、回転元座標値の算出例を示す説明図である。 In the xy coordinate system before rotation correction, four pixel values including (xs + StartX, ys + StartY) are input. Now, x i ≦ xs + StartX <x i + 1 , y i ≦ ys + StartY <y i + 1 , and the distance ratio is u: 1-u, v: 1-v (where u and v are Both are numerical values of 0 or more and less than 1), and the values of each of the surrounding four pixels are (x i , y i ): Z 1 , (x i + 1 , y i ): Z 2 , (x i , y When i + 1 ): Z 3 and (x i + 1 , y i + 1 ): Z 4 , the coordinate value Z after bilinear interpolation is obtained by the following equation (7) (see FIG. 12). FIG. 12 is an explanatory diagram illustrating an example of calculating the rotation source coordinate value used in the document tilt / size correction process of the document tilt / size correction unit 14.

Figure 2012070285
Figure 2012070285

ここで用いられる三角比の値は、図7に示したようなテーブルを使用すれば、高速に演算可能である。回転補正後の(x’,y’)は、
0≦x’ <補正後原稿幅、0≦y’ <補正後原稿高さ
となる。
The trigonometric ratio value used here can be calculated at high speed by using a table as shown in FIG. (X ', y') after rotation correction is
0 ≦ x ′ <corrected document width, 0 ≦ y ′ <corrected document height.

本実施の形態のデジタルカラー複写機1において、原稿傾き・サイズ検出部21による原稿傾き・サイズ検出処理および原稿傾き・サイズ補正部14による原稿傾き・サイズ補正処理は、原稿傾き・サイズ補正モードが設定されることにより行われる。原稿傾き・サイズ補正モードの設定は、図4に示したように、デジタルカラー複写機1の操作パネルにおけるLCD表示部51に表示される特別機能表示初期メニューにおいて、「原稿傾き・サイズ補正」が選択されることにより行われる。   In the digital color copying machine 1 according to the present embodiment, the original inclination / size correction processing by the original inclination / size detection unit 21 and the original inclination / size correction processing by the original inclination / size correction unit 14 are performed in the original inclination / size correction mode. This is done by setting. As shown in FIG. 4, the original skew / size correction mode is set to “original skew / size correction” in the special function display initial menu displayed on the LCD display unit 51 of the operation panel of the digital color copying machine 1. It is done by being selected.

なお、「原稿傾き・サイズ補正」が選択された場合、LCD表示部51には最初に、図13に示すメニュー画面が表示され、この画面において、ユーザは、「原稿傾き・サイズ補正」について「常に設定する」か「スキャンの度に確認する」かを選択することができる。「常に設定する」が選択されると、コピーするとき、原稿を読み取って送信するとき、原稿画像のファイリングを行うときに、必ず原稿傾き・サイズ検出処理および原稿傾き・サイズ補正処理が行われる。   When “original skew / size correction” is selected, a menu screen shown in FIG. 13 is first displayed on the LCD display unit 51. In this screen, the user selects “original skew / size correction” with “ You can select “Always set” or “Confirm every scan”. When “Always set” is selected, document skew / size detection processing and document tilt / size correction processing are always performed when copying, when reading and transmitting a document, and when filing a document image.

上記のように、デジタルカラー複写機1では、画像データに対して一律に原稿領域検出処理を行うのではなく、原稿画像の傾き角度が閾値以上か閾値未満かにより、第1の原稿領域検出処理と第2の原稿領域検出処理とを切り替えている。この場合、原稿画像の傾き角度が閾値未満であるときに選択される第2の原稿領域検出処理は、原稿画像の各エッジに対して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定する。これにより、原稿読取装置において、正規の配置状態に対し傾き角度が小さい状態に原稿が配置された状態にて原稿が読み取られた場合であっても、原稿の読取時に生じる原稿外領域の縦スジ等のノイズによる誤検知を回避して、高い精度にて原稿サイズの検出を行うことができる。また、原稿の背景が白板であるため、原稿自身と白板の境界部分とにおける原稿画像のエッジを検出し難いような原稿画像に対しても、精度よく原稿サイズを検出することができる。   As described above, the digital color copying machine 1 does not perform document area detection processing uniformly on image data, but performs first document area detection processing depending on whether the inclination angle of the document image is greater than or less than a threshold value. And the second document area detection process. In this case, the second document area detection process selected when the inclination angle of the document image is less than the threshold value detects a document area for each edge of the document image more than the first document area detection process. Whether the edge is a valid edge or noise that can be regarded as an edge of the document image is determined under a condition that limits the range to be processed. Thus, even when the original is read with the original reading apparatus in a state in which the inclination angle is small with respect to the normal arrangement state, the vertical streak of the outside area of the original generated when the original is read. Thus, it is possible to detect the document size with high accuracy by avoiding erroneous detection due to noise such as the above. Further, since the background of the document is a white plate, it is possible to accurately detect the document size even for a document image in which it is difficult to detect the edge of the document image at the boundary between the document itself and the white plate.

〔実施の形態2〕
本発明の他の実施の形態を図面に基づいて以下に説明する。図14は図1に示したデジタルカラー複写機1の他の例を示すブロック図である。
[Embodiment 2]
Another embodiment of the present invention will be described below with reference to the drawings. FIG. 14 is a block diagram showing another example of the digital color copying machine 1 shown in FIG.

図2に示すデジタルカラー複写機(画像形成装置)7では、図1に示したカラー画像処理装置3がカラー画像処理装置前段部3aとカラー画像処理装置後段部3bとに分割されている。カラー画像処理装置前段部3aは、A/D変換部11、シェーディング補正部12、入力階調補正部13および原稿傾き・サイズ検出部21を備え、カラー画像処理装置後段部3bは、原稿傾き・サイズ補正部14、領域分離処理部15、色補正部16、黒生成下色除去部17、空間フィルタ処理部18、出力階調補正部19、階調再現処理部20を含んでいる。   In the digital color copying machine (image forming apparatus) 7 shown in FIG. 2, the color image processing apparatus 3 shown in FIG. 1 is divided into a color image processing apparatus front part 3a and a color image processing apparatus rear part 3b. The pre-stage unit 3a of the color image processing apparatus includes an A / D conversion unit 11, a shading correction unit 12, an input tone correction unit 13, and a document inclination / size detection unit 21. A size correction unit 14, a region separation processing unit 15, a color correction unit 16, a black generation and under color removal unit 17, a spatial filter processing unit 18, an output gradation correction unit 19, and a gradation reproduction processing unit 20 are included.

さらに、カラー画像処理装置前段部3aとカラー画像処理装置後段部3bとの間、具体的には、カラー画像処理装置前段部3aの入力階調補正部13および原稿傾き・サイズ検出部21とカラー画像処理装置後段部3bの原稿傾き・サイズ補正部14との間には、画像記憶装置(HDD)35が設けられている。   Further, between the color image processing apparatus front-stage unit 3a and the color image processing apparatus rear-stage unit 3b, specifically, the input tone correction unit 13 and the document inclination / size detection unit 21 of the color image processing apparatus front-stage unit 3a and the color. An image storage device (HDD) 35 is provided between the image processing apparatus rear stage unit 3 b and the document inclination / size correction unit 14.

カラー画像処理装置前段部3aは、処理したデータを画像記憶装置35に格納する。カラー画像処理装置後段部3bは、カラー画像処理装置前段部3aにて処理されたデータを画像記憶装置35から読み出して処理する。これらカラー画像処理装置前段部3aとカラー画像処理装置後段部3bとは非同期にて動作することができる。   The color image processing device front-stage unit 3 a stores the processed data in the image storage device 35. The color image processing apparatus post-stage unit 3b reads the data processed by the color image processing apparatus pre-stage unit 3a from the image storage device 35 and processes the data. The color image processing apparatus front stage unit 3a and the color image processing apparatus rear stage unit 3b can operate asynchronously.

原稿傾き・サイズ補正処理が選択されている場合、カラー画像処理装置前段部3aの原稿傾き・サイズ検出部21は、検知情報として、原稿傾き・サイズ補正パラメータα、および原稿サイズ補正パラメータ(補正後原稿サイズ、補正処理開始座標)を求め、画像記憶装置35に格納されている、対応する画像データと関連付けて、画像記憶装置35に格納する。   When the document skew / size correction process is selected, the document skew / size detection unit 21 of the pre-stage unit 3a of the color image processing apparatus uses the document skew / size correction parameter α and the document size correction parameter (after correction) as detection information. A document size and correction processing start coordinates) are obtained and stored in the image storage device 35 in association with the corresponding image data stored in the image storage device 35.

一方、カラー画像処理装置後段部3bは、画像記憶装置35に格納されている入力階調補正後の画像データと、それと関連付けて格納されている検知情報の原稿傾き補正角度パラメータα、および原稿サイズ補正パラメータ(補正後原稿サイズ、補正処理開始座標)とを読み出し、原稿傾き・サイズ補正部14にて前述の座標変換を行い、その結果を、順次画像メモリ6に格納して行く。   On the other hand, the post-stage unit 3b of the color image processing apparatus 3a, the image data after the input tone correction stored in the image storage device 35, the document inclination correction angle parameter α of the detection information stored in association therewith, and the document size The correction parameters (corrected document size and correction processing start coordinates) are read out, the above-described coordinate conversion is performed by the document inclination / size correction unit 14, and the results are sequentially stored in the image memory 6.

領域分離処理部15では、画像メモリ6に格納されている傾き・サイズ補正後のデータに対して領域分離処理を実施する。それ以降の各処理部は、パイプライン方式にて処理を進めていく。これらの動作により、カラー画像処理装置前段部3aとカラー画像処理装置後段部3bとは、非同期にて処理を行うことができる。   The region separation processing unit 15 performs region separation processing on the data after inclination / size correction stored in the image memory 6. Subsequent processing units proceed with the pipeline method. By these operations, the color image processing apparatus front stage unit 3a and the color image processing apparatus back stage unit 3b can perform processing asynchronously.

〔実施の形態3〕
本発明のさらに他の実施の形態を図面に基づいて以下に説明する。図15は図1に示した原稿傾き・サイズ検出部21および原稿傾き・サイズ補正部14を備えた画像読取装置(スキャナ)8の構成を示すブロック図である。
[Embodiment 3]
Still another embodiment of the present invention will be described below with reference to the drawings. FIG. 15 is a block diagram showing a configuration of an image reading apparatus (scanner) 8 including the document inclination / size detection unit 21 and the document inclination / size correction unit 14 shown in FIG.

画像読取装置8は、カラー画像入力装置2、カラー画像処理装置9、画像メモリ5および画像記憶装置35を備えている。   The image reading device 8 includes a color image input device 2, a color image processing device 9, an image memory 5, and an image storage device 35.

カラー画像処理装置9は、A/D変換部11、シェーディング補正部12、入力階調補正部13、原稿傾き・サイズ検出部21、原稿傾き・サイズ補正部14およびセレクタ36を備えている。   The color image processing apparatus 9 includes an A / D conversion unit 11, a shading correction unit 12, an input tone correction unit 13, a document inclination / size detection unit 21, a document inclination / size correction unit 14, and a selector 36.

カラー画像処理装置9において、「原稿傾き・サイズ補正」が選択されている場合、原稿傾き・サイズ検出部21は、前述の検知情報を算出し、その検知情報を一旦画像メモリ5に格納する。その後、原稿傾き・サイズ補正部14は、画像メモリ5から上記検知情報および画像データを読み出し、画像データの傾き・サイズ補正を行い、補正後の画像データを、画像メモリ5に格納する。このようにして、1ページ分の画像データの処理が終了すると、その画像データは画像メモリ5から読み出され、セレクタ36を介して画像記憶装置35に格納される。   When “original skew / size correction” is selected in the color image processing apparatus 9, the original skew / size detection unit 21 calculates the detection information described above and temporarily stores the detection information in the image memory 5. Thereafter, the document inclination / size correction unit 14 reads the detection information and the image data from the image memory 5, corrects the inclination / size of the image data, and stores the corrected image data in the image memory 5. When the processing of the image data for one page is completed in this way, the image data is read from the image memory 5 and stored in the image storage device 35 via the selector 36.

一方、「原稿傾き・サイズ補正」が選択されていない場合、入力階調補正部13による入力階調処理補正後のRGBデータがセレクタ32を介して画像記憶装置35に格納される。   On the other hand, when “original skew / size correction” is not selected, the RGB data after the input gradation processing correction by the input gradation correction unit 13 is stored in the image storage device 35 via the selector 32.

上記のように、セレクタ36は、「原稿傾き・サイズ補正」が選択されている場合、原稿傾き・サイズ検出部21および原稿傾き・サイズ補正部14での処理後の画像データを画像記憶装置35へ出力する。一方、「原稿傾き・サイズ補正」が選択されていない場合、
入力階調補正部13での処理後の画像データを画像記憶装置35へ出力する。
As described above, when “original skew / size correction” is selected, the selector 36 stores the image data processed by the original skew / size detector 21 and the original skew / size corrector 14 in the image storage device 35. Output to. On the other hand, if “Original skew / size correction” is not selected,
The image data processed by the input tone correction unit 13 is output to the image storage device 35.

なお、カラー画像処理装置9では、原稿傾き・サイズ補正部14での処理後の画像データを、画像記憶装置35に出力するのではなく、ネットワークで接続されたコンピュータ、サーバ、デジタル複合機、プリンタ等に送信するようにしてもよい。   The color image processing device 9 does not output the image data processed by the document skew / size correction unit 14 to the image storage device 35, but a computer, server, digital multifunction peripheral, printer connected via a network. Or the like.

また、「原稿傾き・サイズ補正」の選択は、操作パネルにおいて選択されるのではなく、画像読取装置8と接続されたコンピュータのスキャナドライバの設定画面(スキャナの読取条件の設定画面)において、マウスやキーボードを用いて行うようにしてもよい。   Also, the selection of “original skew / size correction” is not selected on the operation panel, but on the scanner driver setting screen (scanner reading condition setting screen) of the computer connected to the image reading device 8, the mouse is selected. Or using a keyboard.

本発明はコンピュータに実行させるためのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)を記録したコンピュータ読み取り可能な記録媒体に、上記した原稿の傾き・サイズ判定を行い原稿に回転処理を行う画像処理方法を記録するものとすることもできる。   The present invention performs the above-described document inclination / size determination on a computer-readable recording medium on which program code (executable program, intermediate code program, source program) to be executed by a computer is recorded, and performs rotation processing on the document. An image processing method may be recorded.

この結果、原稿の傾き・サイズ判定を行い原稿に回転処理を行う画像処理方法を行うプログラムを記録した記録媒体を持ち運び自在に提供することができる。   As a result, it is possible to provide a portable recording medium on which a program for performing an image processing method for determining the inclination and size of the document and performing rotation processing on the document is carried.

なお、本実施の形態では、この記録媒体としては、マイクロコンピュータで処理が行われるために図示していないメモリ、例えばROMのようなものそのものがプログラムメディアであってもよいし、また、図示していないが外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであってもよい。   In the present embodiment, the recording medium may be a program medium such as a memory (not shown) such as a ROM itself because processing is performed by a microcomputer. However, it may be a program medium provided with a program reading device as an external storage device and readable by inserting a recording medium therein.

いずれの場合においても、格納されているプログラムコードはマイクロプロセッサがアクセスして実行させる構成であってもよいし、あるいは、いずれの場合もプログラムコードを読み出し、読み出されたプログラムコードは、マイクロコンピュータの図示されていないプログラム記憶エリアにダウンロードされて、そのプログラムコードが実行される方式であってもよい。このダウンロード用のプログラムは予め本体装置に格納されているものとする。   In any case, the stored program code may be configured to be accessed and executed by a microprocessor, or in any case, the program code is read and the read program code is a microcomputer. The program code may be downloaded to a program storage area (not shown) and executed. It is assumed that this download program is stored in the main device in advance.

ここで、上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フロッピーディスク(登録商標)やハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等による半導体メモリを含めた固定的にプログラムコードを担持する媒体であってもよい。   Here, the program medium is a recording medium configured to be separable from the main body, such as a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy disk (registered trademark) or a hard disk, or a CD-ROM / MO /. MD / DVD optical discs, IC cards (including memory cards) / optical cards, etc. Mask ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash It may be a medium that carries a fixed program code including a semiconductor memory such as a ROM.

また、本実施の形態においては、インターネットを含む通信ネットワークを接続可能なシステム構成であることから、通信ネットワークからプログラムコードをダウンロードするように流動的にプログラムコードを担持する媒体であってもよい。なお、このように通信ネットワークからプログラムコードをダウンロードする場合には、そのダウンロード用のプログラムは予め本体装置に格納しておくか、あるいは別な記録媒体からインストールされるものであってもよい。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   In the present embodiment, since the system configuration is capable of connecting to a communication network including the Internet, the medium may be a medium that dynamically carries the program code so as to download the program code from the communication network. When the program code is downloaded from the communication network in this way, the program for downloading may be stored in the main device in advance or installed from another recording medium. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

上記記録媒体は、デジタルカラー画像形成装置やコンピュータシステムに備えられるプログラム読み取り装置により読み取られることで上述した画像処理方法が実行される。   The recording medium is read by a program reading device provided in a digital color image forming apparatus or a computer system, whereby the above-described image processing method is executed.

コンピュータシステムは、フラットベッドスキャナ・フィルムスキャナ・デジタルカメラなどの画像入力装置、所定のプログラムがロードされることにより上記画像処理方法など様々な処理が行われるコンピュータ、コンピュータの処理結果を表示するCRTディスプレイ・液晶ディスプレイなどの画像表示装置およびコンピュータの処理結果を紙などに出力するプリンタより構成される。さらには、ネットワークを介してサーバなどに接続するための通信手段としてのネットワークカードやモデムなどが備えられる。   The computer system includes an image input device such as a flatbed scanner, a film scanner, and a digital camera, a computer that performs various processes such as the above image processing method by loading a predetermined program, and a CRT display that displays the processing results of the computer. An image display device such as a liquid crystal display and a printer that outputs the processing results of the computer to paper or the like. Furthermore, a network card, a modem, and the like are provided as communication means for connecting to a server or the like via a network.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention.

1 デジタルカラー複写機(画像形成装置)
2 カラー画像入力装置(画像読取装置)
3 カラー画像処理装置
3a カラー画像処理装置前段部
3b カラー画像処理装置後段部
4 カラー画像出力装置(印刷装置)
7 デジタルカラー複写機(画像形成装置)
8 画像読取装置
14 原稿傾き・サイズ補正部
21 原稿傾き・サイズ検出部
31 原稿搬送部
41 エッジ検出処理部
42 角度算出部
43 原稿領域抽出部
44 座標情報変換部
45 原稿領域検出部
51 LCD表示部
1 Digital color copier (image forming device)
2 Color image input device (image reading device)
DESCRIPTION OF SYMBOLS 3 Color image processing apparatus 3a Color image processing apparatus front | former part 3b Color image processing apparatus back | latter stage part 4 Color image output apparatus (printing apparatus)
7 Digital color copier (image forming device)
8 Image Reading Device 14 Document Inclination / Size Correction Unit 21 Document Inclination / Size Detection Unit 31 Document Conveying Unit 41 Edge Detection Processing Unit 42 Angle Calculation Unit 43 Document Area Extraction Unit 44 Coordinate Information Conversion Unit 45 Document Area Detection Unit 51 LCD Display Unit

Claims (8)

原稿を読み取って取得された画像データによって示される原稿画像の傾きおよび原稿サイズを検出する原稿傾き・サイズ検出部と、前記原稿傾き・サイズ検出部の検出結果に基づいて、前記画像データにおける原稿画像の傾きおよび原稿サイズを補正する原稿傾き・サイズ補正部とを備える画像処理装置において、
前記原稿傾き・サイズ検出部は、前記原稿画像の上下および左右のエッジを検出し、前記エッジの位置を示すエッジ座標を求めるエッジ検出処理部と、
前記エッジ座標に基づいて前記原稿画像の傾き角度を算出する角度算出部と、
算出された前記原稿画像の傾き角度に基づいて、前記エッジ座標を前記原稿画像の傾きがない状態の補正エッジ座標に変換する座標情報変換部と、
原稿領域検出処理により、前記補正エッジ座標から原稿のサイズを示す情報を算出する原稿領域検出部とを備え、
前記原稿領域検出部は、前記角度算出部にて算出された前記原稿画像の傾き角度を閾値と比較し、前記原稿画像の傾き角度が閾値以上の場合には第1の原稿領域検出処理を行い、前記原稿画像の傾き角度が閾値未満の場合には第2の原稿領域検出処理を行い、
前記第1の原稿領域検出処理では、エッジ検出処理部にて検出された各エッジについて、前記補正エッジ座標を使用して、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出する一方、第2の原稿領域検出処理では、エッジ検出処理部にて検出された各エッジについて、前記補正エッジ座標を使用して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出することを特徴とする画像処理装置。
A document inclination / size detection unit that detects the inclination and size of the document image indicated by the image data obtained by reading the document, and a document image in the image data based on the detection result of the document inclination / size detection unit In an image processing apparatus comprising an original inclination / size correction unit for correcting the inclination and original size of
The document inclination / size detection unit detects the upper and lower and left and right edges of the document image, and obtains edge coordinates indicating the position of the edge;
An angle calculation unit that calculates an inclination angle of the document image based on the edge coordinates;
A coordinate information conversion unit that converts the edge coordinates into corrected edge coordinates in a state where there is no inclination of the original image, based on the calculated inclination angle of the original image;
A document area detection unit that calculates information indicating the size of the document from the corrected edge coordinates by document area detection processing;
The document area detection unit compares the inclination angle of the document image calculated by the angle calculation unit with a threshold value, and performs a first document area detection process when the inclination angle of the document image is equal to or greater than the threshold value. When the inclination angle of the original image is less than the threshold value, a second original area detection process is performed.
In the first document area detection processing, whether each edge detected by the edge detection processing unit is an effective edge that can be regarded as an edge of the document image or noise using the corrected edge coordinates is determined. In the second document area detection process, the corrected edge coordinates are used for each edge detected by the edge detection processing unit, while determining and calculating information indicating the document size based only on the valid edge. Then, it is determined whether the edge is a valid edge or noise that can be regarded as an edge of the document image on the condition that the range for detecting the document region is limited as compared with the first document region detection process, and only the valid edge is determined. An image processing apparatus that calculates information indicating the size of the document based on the information.
前記原稿領域検出部は、前記第2の原稿領域検出処理として、第1の処理と第2の処理とを含み、前記第1の処理では、前記第2の処理よりも原稿領域を検出する範囲を限定した条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、前記第1の処理を前記第2の処理よりも優先して行い、前記第1の処理にて原稿のサイズを示す情報を算出できない場合に、前記第2の処理を行うことを特徴とする請求項1に記載の画像処理装置。   The document area detection unit includes a first process and a second process as the second document area detection process. In the first process, a range in which the document area is detected more than the second process. Is determined as a valid edge that can be regarded as an edge of the document image or noise, the first process is performed with priority over the second process, and the first process is performed. The image processing apparatus according to claim 1, wherein the second process is performed when information indicating the size of the document cannot be calculated by the process. 前記原稿領域検出部は、前記第2の原稿領域検出処理として、第1の処理と第2の処理とを含み、前記第2の処理では、前記第1の処理よりも、原稿領域が広くなる条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、前記第1の処理を前記第2の処理よりも優先して行い、前記第1の処理にて原稿のサイズを示す情報を算出できない場合に、前記第2の処理を行うことを特徴とする請求項1または2に記載の画像処理装置。   The document area detection unit includes a first process and a second process as the second document area detection process, and the document process is wider in the second process than in the first process. It is determined whether the edge is an effective edge that can be regarded as an edge of the document image or noise, and the first process is prioritized over the second process. In the first process, The image processing apparatus according to claim 1, wherein the second process is performed when information indicating the size of the document cannot be calculated. 前記原稿領域検出部は、前記第2の原稿領域検出処理の前記第1の処理および前記第2の処理にて原稿のサイズを示す情報を算出できない場合に、前記第1の原稿領域検出処理を行うことを特徴とする請求項2または3に記載の画像処理装置。   The document area detection unit performs the first document area detection process when the first process of the second document area detection process and the information indicating the size of the document cannot be calculated by the second process. The image processing apparatus according to claim 2, wherein the image processing apparatus performs the processing. 請求項1から4のいずれか1項に記載の画像処理装置と、前記画像処理装置から出力された画像データを印刷する印刷装置とを備えていることを特徴とする画像形成装置。   An image forming apparatus comprising: the image processing apparatus according to claim 1; and a printing apparatus that prints image data output from the image processing apparatus. 原稿を読み取って取得された画像データによって示される原稿画像の傾きおよび原稿サイズを検出する原稿傾き・サイズ検出工程と、前記原稿傾き・サイズ検出工程での検出結果に基づいて、前記画像データにおける原稿画像の傾きおよび原稿サイズを補正する原稿傾き・サイズ補正工程とを備える画像処理方法において、
前記原稿傾き・サイズ検出工程は、前記原稿画像の上下および左右のエッジを検出し、前記エッジの位置を示すエッジ座標を求めるエッジ検出処理工程と、
前記エッジ座標に基づいて前記原稿画像の傾き角度を算出する角度算出工程と、
算出された前記原稿画像の傾き角度に基づいて、前記エッジ座標を前記原稿画像の傾きがない状態の補正エッジ座標に変換する座標情報変換工程と、
原稿領域検出処理により、前記補正エッジ座標から原稿のサイズを示す情報を算出する原稿領域検出工程とを備え、
前記原稿領域検出工程では、前記角度算出工程にて算出された前記原稿画像の傾き角度を閾値と比較し、前記原稿画像の傾き角度が閾値以上の場合には第1の原稿領域検出処理を行い、前記原稿画像の傾き角度が閾値未満の場合には第2の原稿領域検出処理を行い、
前記第1の原稿領域検出処理では、エッジ検出処理工程にて検出された各エッジについて、前記補正エッジ座標を使用して、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出する一方、第2の原稿領域検出処理では、エッジ検出処理工程にて検出された各エッジについて、前記補正エッジ座標を使用して、前記第1の原稿領域検出処理よりも原稿領域を検出する範囲を限定した条件にて、前記原稿画像のエッジと見なし得る有効エッジであるかノイズであるかを判定し、有効エッジのみに基づいて前記の原稿のサイズを示す情報を算出することを特徴とする画像処理方法。
An original in the image data based on the original inclination / size detection step for detecting the inclination and original size of the original image indicated by the image data obtained by reading the original, and the detection result in the original inclination / size detection step In an image processing method comprising an original inclination / size correction step for correcting an inclination and original size of an image,
The document inclination / size detection step detects the upper and lower and left and right edges of the document image, and obtains edge coordinates indicating the position of the edge;
An angle calculating step of calculating an inclination angle of the document image based on the edge coordinates;
A coordinate information conversion step for converting the edge coordinates into corrected edge coordinates in a state in which there is no inclination of the original image, based on the calculated inclination angle of the original image;
A document area detection step of calculating information indicating the size of the document from the corrected edge coordinates by a document area detection process;
In the document area detection step, the inclination angle of the document image calculated in the angle calculation step is compared with a threshold value, and if the inclination angle of the document image is equal to or greater than the threshold value, a first document area detection process is performed. When the inclination angle of the original image is less than the threshold value, a second original area detection process is performed.
In the first document area detection processing, whether each edge detected in the edge detection processing step is an effective edge or noise that can be regarded as an edge of the document image using the corrected edge coordinates. In the second document area detection process, the corrected edge coordinates are used for each edge detected in the edge detection process while determining and calculating information indicating the size of the document based only on the valid edge. Then, it is determined whether the edge is a valid edge or noise that can be regarded as an edge of the document image on the condition that the range for detecting the document region is limited as compared with the first document region detection process, and only the valid edge is determined. And calculating information indicating the size of the document based on the image processing method.
請求項1から4のいずれか1項に記載の画像処理装置の前記の各手部としてコンピュータを機能させるためのプログラム。   The program for functioning a computer as each said hand part of the image processing apparatus of any one of Claim 1 to 4. 請求項7に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the program according to claim 7 is recorded.
JP2010214504A 2010-09-24 2010-09-24 Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium Pending JP2012070285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010214504A JP2012070285A (en) 2010-09-24 2010-09-24 Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010214504A JP2012070285A (en) 2010-09-24 2010-09-24 Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium

Publications (1)

Publication Number Publication Date
JP2012070285A true JP2012070285A (en) 2012-04-05

Family

ID=46166996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010214504A Pending JP2012070285A (en) 2010-09-24 2010-09-24 Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium

Country Status (1)

Country Link
JP (1) JP2012070285A (en)

Similar Documents

Publication Publication Date Title
JP4570670B2 (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP4495201B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium for recording image processing program
US20100141991A1 (en) Image processing apparatus, image forming apparatus, and image processing method
JP4855458B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium for recording image processing program
US8976414B2 (en) Image processing method, image processing apparatus and image forming apparatus including the same, image reading apparatus, and recording medium
JP4465377B2 (en) Image processing method, image processing apparatus, image forming apparatus, image reading apparatus, computer program, and recording medium
JP2022129816A (en) Image reading apparatus and image forming apparatus
JP2011010033A (en) Image processing apparatus, image forming apparatus, image processing method, computer program and recording medium
JP4808281B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium for recording image processing program
JP5290360B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and recording medium
JP5531464B2 (en) Image processing program, image processing apparatus, and image processing method
JP2012227569A (en) Image processing apparatus, image forming apparatus, computer program, recording medium and image processing method
JP2009017208A (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and computer readable recording medium
JP4024737B2 (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, and program
JP5542380B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP4931897B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP4188039B2 (en) Image processing apparatus, image processing method, and image reading apparatus, image forming apparatus, program, and recording medium including the same
JP2010011359A (en) Image processing apparatus, image forming apparatus, method of controlling the image processing apparatus, control program, and recording medium
JP2012070285A (en) Image processing method, image processing apparatus, image reading apparatus, image forming device, computer program, and recording medium
JP6105134B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP5970582B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2010103808A (en) Image processor, image reader, image forming apparatus, image processing method, image processing program and computer readable recording medium
JP2010087826A (en) Image processing device, image reader, image forming apparatus, image processing method, program and recording medium therefor
JP5736068B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2015226264A (en) Image processing apparatus, image formation apparatus with the same, image processing program, and recording medium with recorded program