JP2017147592A - Image reading apparatus - Google Patents

Image reading apparatus Download PDF

Info

Publication number
JP2017147592A
JP2017147592A JP2016027832A JP2016027832A JP2017147592A JP 2017147592 A JP2017147592 A JP 2017147592A JP 2016027832 A JP2016027832 A JP 2016027832A JP 2016027832 A JP2016027832 A JP 2016027832A JP 2017147592 A JP2017147592 A JP 2017147592A
Authority
JP
Japan
Prior art keywords
unit
pixel
image data
line number
division unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016027832A
Other languages
Japanese (ja)
Other versions
JP6668806B2 (en
Inventor
哲嗣 松谷
Tetsuji Matsutani
哲嗣 松谷
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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2016027832A priority Critical patent/JP6668806B2/en
Publication of JP2017147592A publication Critical patent/JP2017147592A/en
Application granted granted Critical
Publication of JP6668806B2 publication Critical patent/JP6668806B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image reading apparatus capable of suitably performing an inclination correction.SOLUTION: An image reading apparatus comprises: an image data acquisition part that acquires image data of an original; a first inclination detection part that detects inclination of the image data to a first direction; a first division unit number setting part that sets a division unit for dividing the image data on the basis of the detected inclination toward the first direction; and a first shift part that shifts the image data in every division unit to the first direction. The first division unit number setting part includes: a first line number calculation part that calculates the number of a pixel lines in a second direction in which the image data indicating a boundary line of the original is changed by one pixel to the first direction; a first line number setting part that, when fraction figure occurs in the number of pixel lines, sets the fractional figure of a calculation result to the division unit of the pixel line of an integer number by round-up or round-down of the fractional figure; and a first line number adjustment part that integrates the fractional figure of the pixel number of the division unit in accordance with the setting, and adjusts the pixel line number of the integer number of the division unit when an integrated value exceeds a predetermined value.SELECTED DRAWING: Figure 4

Description

本発明は、画像読取装置に関し、特に、原稿の画像データの傾き補正に関する。   The present invention relates to an image reading apparatus, and more particularly, to inclination correction of image data of a document.

画像読取装置では、イメージスキャナの原稿台に傾いて載置された原稿に対し、従来より種々の方式で傾き補正が行なわれている(特許文献1)。   2. Description of the Related Art In an image reading apparatus, tilt correction is conventionally performed by various methods on a document placed on a document table of an image scanner (Patent Document 1).

例えば、特許文献1には、原稿の傾きからシフトする単位を求め、所定のライン数毎に主走査方向にシフトさせる。そして、シフト後に所定のライン数毎に副走査方向にシフトさせる。そして、倍率誤差を補正するスキュー補正の方式が提案されている。   For example, in Patent Document 1, a unit for shifting is obtained from the inclination of the document, and is shifted in the main scanning direction every predetermined number of lines. Then, the shift is performed in the sub-scanning direction every predetermined number of lines after the shift. A skew correction method for correcting a magnification error has been proposed.

特開2000−188678号公報JP 2000-188678 A

しかしながら、所定のライン数毎にピクセル単位でシフトさせる場合に、画像データの連続性が維持されず形状が歪むという問題がある。   However, when shifting in units of pixels every predetermined number of lines, there is a problem that the continuity of the image data is not maintained and the shape is distorted.

本発明は、上記の課題を解決するためになされたものであって、適切な傾き補正が可能な画像読取装置を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an image reading apparatus capable of performing appropriate inclination correction.

ある局面に従う画像読取装置は、原稿の画像データを取得する画像データ取得部と、第1の方向に対する原稿の画像データの傾きを検出する第1傾き検出部と、第1傾き検出部で検出した傾きに基づいて原稿の画像データを第1の方向に沿って分割する分割単位を設定する第1分割単位数設定部と、分割した分割単位毎の画像データを第1の方向にシフトする第1シフト部とを備える。第1分割単位数設定部は、原稿の境界線を示す画像データが第1の方向に1ピクセル変化する第2の方向に沿って配置されたピクセルライン数を算出する第1ライン数算出部と、ピクセルライン数に端数が生じる場合に、第1ライン数算出部の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する第1ライン数設定部と、第1ライン数設定部の設定に従って分割単位のピクセルライン数の端数を積算して、積算値が所定値を超えた場合に、分割単位の整数のピクセルライン数を調節する第1ライン数調節部とを含む。   An image reading apparatus according to a certain aspect is detected by an image data acquisition unit that acquires image data of a document, a first tilt detection unit that detects a tilt of document image data with respect to a first direction, and a first tilt detection unit. A first division unit number setting unit for setting a division unit for dividing the image data of the document along the first direction based on the inclination, and a first for shifting the image data for each divided division unit in the first direction. And a shift unit. The first division unit number setting unit includes a first line number calculation unit that calculates the number of pixel lines arranged along a second direction in which image data indicating a document boundary line changes by one pixel in the first direction; A first line number setting unit for setting a unit of division of an integer pixel line number by rounding up or down the fraction of the calculation result of the first line number calculation unit when a fraction occurs in the number of pixel lines; A first line number adjusting unit that integrates a fraction of the number of pixel lines in the division unit according to the setting of the setting unit and adjusts the integer number of pixel lines in the division unit when the integrated value exceeds a predetermined value.

好ましくは、ライン数調節部は、分割単位の整数のピクセルライン数を調節した際に積算値をリセットする。   Preferably, the line number adjustment unit resets the integrated value when an integer number of pixel lines in the division unit is adjusted.

好ましくは、第1シフト部による第1の方向へのシフト後に、第1の方向とは異なる第2の方向に対する原稿の画像データの傾きを検出する第2傾き検出部と、第2傾き検出部で検出した傾きに基づいて原稿の画像データを第2の方向に沿って分割する分割単位を設定する第2分割単位数設定部と、分割した分割単位毎の画像データを第2の方向にシフトする第2シフト部とをさらに備える。   Preferably, after the shift in the first direction by the first shift unit, a second tilt detection unit that detects the tilt of the image data of the document with respect to a second direction different from the first direction, and a second tilt detection unit And a second division unit number setting unit for setting a division unit for dividing the image data of the original along the second direction based on the inclination detected in step B, and shifting the image data for each divided division unit in the second direction. And a second shift unit.

好ましくは、第2分割単位数設定部は、シフトした原稿の境界線を示す画像データが第2の方向に1ピクセル変化する第1の方向に沿って配置されたピクセルライン数を算出する第2ライン数算出部と、ピクセルライン数に端数が生じる場合に、第2ライン数算出部の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する第2ライン数設定部と、第2ライン数設定部の設定に従って分割単位のピクセルライン数の端数を積算して、積算値が所定値を超えた場合に、分割単位の整数のピクセルライン数を調節する第2ライン数調節部とを含む。   Preferably, the second division unit number setting unit calculates the number of pixel lines arranged along the first direction in which the image data indicating the boundary line of the shifted document changes by one pixel in the second direction. A line number calculation unit, and a second line number setting unit configured to set a unit of division of an integer pixel line number by rounding up or down the fraction of the calculation result of the second line number calculation unit when a fraction occurs in the pixel line number The second line number adjustment is performed to integrate the fraction of the pixel line number in the division unit according to the setting of the second line number setting unit and adjust the integer pixel line number in the division unit when the integrated value exceeds a predetermined value. Part.

好ましくは、第1の方向は副走査方向、第2の方向は主走査方向である。
好ましくは、各画素の階調値と第1の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する補間部をさらに備える。
Preferably, the first direction is the sub-scanning direction, and the second direction is the main scanning direction.
Preferably, the image processing apparatus further includes an interpolation unit that executes a gradation interpolation process that weights and adds the gradation value of each pixel and the gradation value of a pixel adjacent to the first direction.

好ましくは、補間部は、分割単位に含まれる基準画素から注目画素への距離に応じて重み付けの値を調整する。   Preferably, the interpolation unit adjusts the weighting value according to the distance from the reference pixel included in the division unit to the target pixel.

好ましくは、各画素の階調値と第2の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する補間部をさらに備える。   Preferably, the image processing apparatus further includes an interpolation unit that executes a gradation interpolation process that adds the gradation value of each pixel and the gradation value of a pixel adjacent to the second direction by weighting.

好ましくは、補間部は、分割単位に含まれる基準画素から注目画素への距離に応じて重み付けの値を調整する。   Preferably, the interpolation unit adjusts the weighting value according to the distance from the reference pixel included in the division unit to the target pixel.

好ましくは、シフトした原稿の画像データに対してアスペクト比を調整する解像度変換部をさらに備える。   Preferably, a resolution conversion unit that adjusts the aspect ratio of the image data of the shifted document is further provided.

実施形態に基づく画像読取装置1の全体構成を概略的に示す図である。1 is a diagram schematically showing an overall configuration of an image reading apparatus 1 based on an embodiment. 実施形態に基づく画像読取部7の内部構造の一例を示す図である。It is a figure which shows an example of the internal structure of the image reading part 7 based on embodiment. 実施形態に基づく画像読取装置1のブロック構成の一例を示す図である。It is a figure which shows an example of the block configuration of the image reading apparatus 1 based on embodiment. 実施形態に基づく制御部28の機能ブロックについて説明する図である。It is a figure explaining the functional block of the control part 28 based on embodiment. 実施形態に基づくスキュー補正の概略の流れを説明する図である。It is a figure explaining the outline flow of skew correction based on an embodiment. 実施形態に基づく原稿の画像データの傾きを検出する図である。It is a figure which detects the inclination of the image data of the document based on Embodiment. 実施形態に基づく画像データの分割単位の設定を説明する図である。It is a figure explaining the setting of the division unit of the image data based on embodiment. 実施形態に基づく分割単位毎の画像データを副走査方向(第1の方向)にシフトする場合を模式的に説明する図である。It is a figure which illustrates typically the case where the image data for every division | segmentation unit based on embodiment is shifted to a subscanning direction (1st direction). 実施形態に基づくシフトした原稿の画像データの傾きを検出する図である。It is a figure which detects the inclination of the image data of the shifted original based on embodiment. 実施形態に基づく制御部28のスキュー補正処理を実行するフロー図である。It is a flowchart which performs the skew correction process of the control part 28 based on embodiment. 実施形態に基づく分割単位数の設定のサブルーチン処理を説明する図である。It is a figure explaining the subroutine processing of the setting of the number of division units based on an embodiment. 実施形態に基づく第1ライン数調節部40の処理の具体例について説明する図である。It is a figure explaining the specific example of the process of the 1st line number adjustment part 40 based on embodiment. 実施形態に基づくシフト処理と従来のシフト処理とを比較する場合を説明する図である。It is a figure explaining the case where the shift process based on embodiment and the conventional shift process are compared. 実施形態に基づく補間部54における補間処理を説明する図である。It is a figure explaining the interpolation process in the interpolation part 54 based on embodiment. 実施形態に基づく補間部54における重み付けの調整を説明する図である。It is a figure explaining adjustment of the weighting in the interpolation part 54 based on embodiment.

実施形態について図面を参照しながら詳細に説明する。なお、図中同一または相当部分には同一符号を付し、その説明は繰り返さない。   Embodiments will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals, and description thereof will not be repeated.

<A.全体構成の概略>
図1は、実施形態に基づく画像読取装置1の全体構成を概略的に示す図である。
<A. Overview of overall configuration>
FIG. 1 is a diagram schematically showing an overall configuration of an image reading apparatus 1 based on the embodiment.

本実施形態に係る画像読取装置1は、コピー、スキャナ、プリンタ、FAXなどの機能を有する複合機であり、他の通信機器との間でネットワークを介した画像データの送受信が可能である。   The image reading apparatus 1 according to the present embodiment is a multifunction device having functions such as a copy, a scanner, a printer, and a FAX, and can transmit and receive image data to and from other communication devices via a network.

図1に示すように、画像読取装置1は、最上部に設けられた原稿画像読取部2と、中央部に設けられた画像形成部3と、最下部に設けられた給紙部4とを備えている。また、原稿画像読取部2と画像形成部3との間には出力トレイ5が設けられており、プリンタ機能によって出力される出力用紙が出力トレイ5上に排出されるようになっている。   As shown in FIG. 1, the image reading apparatus 1 includes a document image reading unit 2 provided at the top, an image forming unit 3 provided at the center, and a paper feeding unit 4 provided at the bottom. I have. An output tray 5 is provided between the document image reading unit 2 and the image forming unit 3, and output paper output by the printer function is discharged onto the output tray 5.

原稿画像読取部2は、自動原稿搬送部6と画像読取部7とを有している。自動原稿搬送部6は、原稿トレイ8と、搬送ユニット9と、排紙トレイ10とを有し、原稿トレイ8に載置された原稿を搬送ユニット9によって上から順に1枚ずつ搬送していき、画像読取部7によって画像読み取りが行われた原稿を排紙トレイ10に排出するように構成されている。   The document image reading unit 2 includes an automatic document transport unit 6 and an image reading unit 7. The automatic document transport unit 6 includes a document tray 8, a transport unit 9, and a paper discharge tray 10. The document placed on the document tray 8 is transported one by one by the transport unit 9 in order from the top. The document whose image has been read by the image reading unit 7 is discharged to the discharge tray 10.

画像読取部7は、原稿の画像を光学的に読み取って画像データを取得する。自動原稿搬送部6を使用して原稿の画像読み取りを行う場合、画像読取部7は、自動原稿搬送部6と同期した動作を行い、原稿が所定の画像読取位置を通過する際に画像の読み取りを行う。複数枚の原稿が原稿トレイ8にセットされた状態でそれら複数枚の原稿の連続自動読み取りを行う場合、本実施形態では、例えば画像読取部7が1枚の原稿の画像読み取り動作を終了した後に自動原稿搬送部6が次の原稿の搬送を開始する。   The image reading unit 7 optically reads an image of a document and acquires image data. When reading an image of a document using the automatic document feeder 6, the image reading unit 7 operates in synchronization with the automatic document feeder 6 and reads an image when the document passes a predetermined image reading position. I do. When performing continuous automatic reading of a plurality of documents in a state where a plurality of documents are set on the document tray 8, in this embodiment, for example, after the image reading unit 7 finishes the image reading operation of one document. The automatic document feeder 6 starts conveying the next document.

このような原稿画像読取部2の正面側にはユーザーが操作可能な操作パネル11が設けられている。操作パネル11は、複数の操作キーから成る操作部12と、操作パネル11を操作するユーザーに対して各種情報を表示する表示部13とを有している。操作部12は、ジョブに関する各種設定やジョブの実行などに関するユーザーの操作を受け付け、画像読取装置1に入力する。表示部13は、ユーザーに対して表示するためのメニューや、ジョブの実行状況、取得した画像に関する情報などを表示する。また、トナー消耗や出力用紙の紙詰まり、或いは給紙用カセットトレイに出力用紙を補給する必要などが生じた場合、表示部13にはユーザーに各種作業を促すための案内情報なども表示される。   An operation panel 11 that can be operated by the user is provided on the front side of the document image reading unit 2. The operation panel 11 includes an operation unit 12 including a plurality of operation keys and a display unit 13 that displays various types of information to a user who operates the operation panel 11. The operation unit 12 receives user operations related to various settings related to jobs, job execution, and the like and inputs them to the image reading apparatus 1. The display unit 13 displays a menu to be displayed to the user, a job execution status, information on the acquired image, and the like. In addition, when the toner is consumed, the output paper is jammed, or the output paper needs to be replenished to the paper feeding cassette tray, the display unit 13 displays guidance information for prompting the user to perform various operations. .

給紙部4は、給紙用カセットトレイ14,15,16を備えており、それぞれの給紙用カセットトレイに対して複数枚の出力用紙を収容しておくことができるようになっている。給紙部4は、装置内部に設けられた搬送機構によって、各給紙用カセットトレイ14,15,16に収容された出力用紙を1枚ずつ取り出して画像形成部3に供給する。   The paper feed unit 4 includes paper feed cassette trays 14, 15, and 16, and can store a plurality of output sheets in each paper feed cassette tray. The sheet feeding unit 4 takes out the output sheets stored in the sheet feeding cassette trays 14, 15, and 16 one by one by a transport mechanism provided inside the apparatus and supplies the output sheets to the image forming unit 3.

画像形成部3は、例えば入力する画像データに基づいてトナー像を形成し、給紙部4から供給される出力用紙にそのトナー像を転写・定着させることにより画像形成を行う。この画像形成部3は反転機構を備えており、出力用紙に対して両面印刷を行うことが可能である。画像形成部3において画像形成が行われた出力用紙は、装置内部の搬送機構により、上述した出力トレイ5に排出される。画像形成部3は、画像読取部7による画像読み取り動作と並行して、画像を出力用紙に記録可能であり、画像読取装置1において例えばスキャンジョブとプリントジョブとを同時に行うことができるようになっている。   The image forming unit 3 forms a toner image based on, for example, input image data, and forms the image by transferring and fixing the toner image on the output paper supplied from the paper feeding unit 4. The image forming unit 3 includes a reversing mechanism, and can perform duplex printing on output paper. The output paper on which image formation has been performed in the image forming unit 3 is discharged to the output tray 5 described above by a transport mechanism inside the apparatus. The image forming unit 3 can record an image on output paper in parallel with the image reading operation by the image reading unit 7, and can perform, for example, a scan job and a print job at the same time in the image reading apparatus 1. ing.

図2は、実施形態に基づく画像読取部7の内部構造の一例を示す図である。
図2に示されるように、画像読取部7は、原稿の画像を読み取る画像読取モジュール17と、画像読取モジュール17を移動させるためのモータ18と、モータ18の駆動力を画像読取モジュール17に伝達するために設けられたベルトやワイヤなどの駆動伝達部19とを備えている。また画像読取モジュール17は、原稿の読取対象面を照明するランプ20と、原稿の読取対象面からの反射光を受光して光電変換を行うことにより画像データを生成するイメージセンサ21とを備えている。
FIG. 2 is a diagram illustrating an example of an internal structure of the image reading unit 7 based on the embodiment.
As shown in FIG. 2, the image reading unit 7 transmits an image reading module 17 that reads an image of a document, a motor 18 that moves the image reading module 17, and a driving force of the motor 18 to the image reading module 17. And a drive transmission unit 19 such as a belt or a wire provided for this purpose. The image reading module 17 also includes a lamp 20 that illuminates the surface to be read of the document, and an image sensor 21 that receives the reflected light from the surface to be read of the document and performs photoelectric conversion to generate image data. Yes.

本実施形態におけるイメージセンサ21は、複数の受光素子(画素)が一方向(X軸方向)に配列されたラインセンサとされている。そして、イメージセンサ21は、該受光素子の配列方向である主走査方向(X軸方向)に直交する副走査方向(Y軸方向)に移動可能に構成されている。   The image sensor 21 in the present embodiment is a line sensor in which a plurality of light receiving elements (pixels) are arranged in one direction (X-axis direction). The image sensor 21 is configured to be movable in the sub-scanning direction (Y-axis direction) orthogonal to the main scanning direction (X-axis direction) that is the arrangement direction of the light receiving elements.

原稿画像読取部2は、自動原稿搬送部6の原稿トレイ8にセットされた原稿を自動搬送しつつ該原稿の画像を読み取ることができる。また、原稿画像読取部2は、画像読取部7の原稿面ガラス22上に載置された原稿に対して、画像読取部7の内部で画像読取モジュール17を走査させることで、原稿の画像を読み取ることができる。   The document image reading unit 2 can read an image of the document while automatically conveying the document set on the document tray 8 of the automatic document conveying unit 6. Further, the document image reading unit 2 scans the document placed on the document surface glass 22 of the image reading unit 7 by scanning the image reading module 17 inside the image reading unit 7, thereby obtaining an image of the document. Can be read.

画像読み取りを行う場合、画像読取部7の内部で画像読取モジュール17を所定の画像読取位置P1の直下に移動させ、その位置で静止状態とする。そして、自動原稿搬送部6によって搬送される原稿が画像読取位置P1を通過する際、読取ガラス23を介して原稿の読取対象面(原稿下面)をランプ20で照明しつつ、イメージセンサ21が主走査方向の1ラインごとに原稿の画像を読み取る。そして、原稿後端が画像読取位置P1を通過すれば読み取り動作が終了し、画像データが生成される。   When performing image reading, the image reading module 17 is moved directly below the predetermined image reading position P1 inside the image reading unit 7 and is brought into a stationary state at that position. When the document conveyed by the automatic document conveyance unit 6 passes through the image reading position P1, the image sensor 21 mainly illuminates the reading target surface (lower surface of the document) with the lamp 20 through the reading glass 23. The original image is read for each line in the scanning direction. When the trailing edge of the document passes the image reading position P1, the reading operation is finished and image data is generated.

画像読み取りを行う場合、画像読取部7の内部で画像読取モジュール17をY軸方向(副走査方向)に走査させながら、原稿面ガラス22上に載置された原稿の読取対象面(原稿下面)をランプ20で照明しつつ、イメージセンサ21が主走査方向の1ラインごとに原稿の画像を読み取る。そして、原稿の読取対象面全体の読み取りが完了すれば、画像データが生成される。   When image reading is performed, the image reading module 17 scans the image reading module 17 in the Y-axis direction (sub-scanning direction) inside the image reading unit 7 while reading the surface of the document placed on the document surface glass 22 (document lower surface). The image sensor 21 reads the image of the document for each line in the main scanning direction. Then, when the reading of the entire reading target surface of the document is completed, image data is generated.

図3は、実施形態に基づく画像読取装置1のブロック構成の一例を示す図である。
図3に示すように、画像読取装置1は、自動原稿搬送部6、画像読取部7、画像形成部3および操作パネル11を備えている。また、画像読取装置1は、ネットワークを介して他の通信機器と通信を行うための通信インタフェース(I/F)部26と、ソリッドステートドライブ(SSD)等の不揮発性記憶手段で構成される記憶部27と、CPU及びメモリを有する制御部28とを備えている。
FIG. 3 is a diagram illustrating an example of a block configuration of the image reading apparatus 1 based on the embodiment.
As shown in FIG. 3, the image reading apparatus 1 includes an automatic document feeder 6, an image reading unit 7, an image forming unit 3, and an operation panel 11. The image reading apparatus 1 also includes a communication interface (I / F) unit 26 for communicating with other communication devices via a network, and a non-volatile storage unit such as a solid state drive (SSD). And a control unit 28 having a CPU and a memory.

記憶部27は、スキャン動作により得られた画像を記憶する画像記憶部29を有する。画像読取装置1は、これらの構成要素がデータバスDBを介して相互にデータの入出力を行うことができる構成とされている。   The storage unit 27 includes an image storage unit 29 that stores an image obtained by the scanning operation. The image reading apparatus 1 is configured such that these components can mutually input and output data via the data bus DB.

制御部28は、CPUがメモリに記憶されているプログラムを実行することにより、スキュー補正処理を実行する。   The control unit 28 executes skew correction processing by the CPU executing a program stored in the memory.

図4は、実施形態に基づく制御部28の機能ブロックについて説明する図である。
図4を参照して、制御部28は、第1傾き検出部30と、第1シフト部32と、第1分割単位数設定部34と、第2傾き検出部42と、第2シフト部44と、第2分割単位数設定部46と、補間部54と、解像度変換部56とを含む。
FIG. 4 is a diagram illustrating functional blocks of the control unit 28 based on the embodiment.
Referring to FIG. 4, the control unit 28 includes a first inclination detection unit 30, a first shift unit 32, a first division unit number setting unit 34, a second inclination detection unit 42, and a second shift unit 44. A second division unit number setting unit 46, an interpolation unit 54, and a resolution conversion unit 56.

第1傾き検出部30は、副走査方向(第1の方向)に対する原稿の画像データの傾き角度を検出する。副走査方向(第1の方向)と垂直な線と原稿の画像データの境界線の一辺との角度θ1を検出する。   The first inclination detection unit 30 detects an inclination angle of document image data with respect to the sub-scanning direction (first direction). An angle θ1 between a line perpendicular to the sub-scanning direction (first direction) and one side of the boundary line of the document image data is detected.

第1分割単位数設定部34は、第1傾き検出部30で検出した傾き角度θ1に基づいて原稿の画像データを副走査方向(第1の方向)に沿って分割する分割単位を設定する。第1シフト部32は、分割した分割単位毎の画像データを副走査方向(第1の方向)にシフトする。   The first division unit number setting unit 34 sets a division unit for dividing the image data of the document along the sub-scanning direction (first direction) based on the inclination angle θ1 detected by the first inclination detection unit 30. The first shift unit 32 shifts the divided image data for each division unit in the sub-scanning direction (first direction).

第2傾き検出部42は、主走査方向(第2の方向)に対する原稿の画像データの傾きを検出する。主走査方向(第2の方向)と垂直な線と原稿の画像データの境界線の他辺との角度θ2を検出する。   The second inclination detector 42 detects the inclination of the document image data with respect to the main scanning direction (second direction). An angle θ2 between a line perpendicular to the main scanning direction (second direction) and the other side of the boundary line of the document image data is detected.

第2分割単位数設定部46は、第2傾き検出部42で検出した傾き角度θ2に基づいて原稿の画像データを主走査方向(第2の方向)に沿って分割する分割単位を設定する。第2シフト部44は、分割した分割単位毎の画像データを主走査方向(第2の方向)にシフトする。   The second division unit number setting unit 46 sets a division unit for dividing the image data of the document along the main scanning direction (second direction) based on the inclination angle θ2 detected by the second inclination detection unit 42. The second shift unit 44 shifts the divided image data for each division unit in the main scanning direction (second direction).

第1分割単位数設定部34は、第1ライン数算出部36と、第1ライン数設定部38と、第1ライン数分割部39と、第1ライン数調節部40とを含む。   The first division unit number setting unit 34 includes a first line number calculation unit 36, a first line number setting unit 38, a first line number division unit 39, and a first line number adjustment unit 40.

第1ライン数算出部36は、原稿の境界線を示す画像データが副走査方向(第1の方向)に1ピクセル変化する第2の方向に沿って配置されたピクセルライン数を算出する。   The first line number calculation unit 36 calculates the number of pixel lines arranged along the second direction in which the image data indicating the boundary line of the document changes by one pixel in the sub-scanning direction (first direction).

第1ライン数設定部38は、ピクセルライン数に端数が生じる場合に、第1ライン数算出部36の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する。   The first line number setting unit 38, when a fraction occurs in the number of pixel lines, rounds up or down the fraction of the calculation result of the first line number calculation unit 36 and sets it as a division unit of an integer number of pixel lines.

第1ライン数分割部39は、設定された分割単位に従って画像データを分割する。
第1ライン数調節部40は、第1ライン数分割部39の分割に従って分割単位のピクセルライン数の端数を積算して、積算値が所定値以上である場合に、分割単位の整数のピクセルライン数を調節する。
The first line number dividing unit 39 divides the image data according to the set division unit.
The first line number adjustment unit 40 integrates the fraction of the pixel line number of the division unit according to the division of the first line number division unit 39, and when the integrated value is equal to or greater than a predetermined value, the integer pixel line of the division unit Adjust the number.

第2分割単位数設定部46は、第2ライン数算出部48と、第2ライン数設定部50と、第2ライン数分割部51と、第2ライン数調節部52とを含む。   The second division unit number setting unit 46 includes a second line number calculation unit 48, a second line number setting unit 50, a second line number division unit 51, and a second line number adjustment unit 52.

第2ライン数算出部48は、原稿の境界線を示す画像データが主走査方向(第2の方向)に1ピクセル変化する第1の方向に沿って配置されたピクセルライン数を算出する。   The second line number calculation unit 48 calculates the number of pixel lines arranged along the first direction in which the image data indicating the boundary line of the document changes by one pixel in the main scanning direction (second direction).

第2ライン数設定部50は、ピクセルライン数に端数が生じる場合に、第2ライン数算出部48の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する。   The second line number setting unit 50, when a fraction occurs in the number of pixel lines, rounds up or down the fraction of the calculation result of the second line number calculation unit 48 and sets it as a division unit of an integer number of pixel lines.

第2ライン数分割部51は、設定された分割単位に従って画像データを分割する。
第2ライン数調節部52は、第2ライン数分割部51の分割に従って分割単位のピクセルライン数の端数を積算して、積算値が所定値以上である場合に、分割単位の整数のピクセルライン数を調節する。
The second line number dividing unit 51 divides the image data according to the set division unit.
The second line number adjusting unit 52 integrates the fractional number of pixel lines in accordance with the division of the second line number dividing unit 51, and when the integrated value is greater than or equal to a predetermined value, the integer number of pixel lines in the division unit Adjust the number.

補間部54は、シフトした各画素の階調値と第1の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する。また、シフトした各画素の階調値と第2の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する。   The interpolating unit 54 executes a gradation interpolation process in which the gradation value of each shifted pixel and the gradation value of the pixel adjacent to the first direction are weighted and added. Further, a gradation interpolation process is performed in which the gradation value of each shifted pixel and the gradation value of a pixel adjacent to the second direction are added with weighting.

解像度変換部56は、シフトした原稿の画像データに対してアスペクト比を調整する。
<B.スキュー補正の概略>
図5は、実施形態に基づくスキュー補正の概略の流れを説明する図である。
The resolution conversion unit 56 adjusts the aspect ratio of the shifted document image data.
<B. Outline of deskew>
FIG. 5 is a diagram illustrating a schematic flow of skew correction based on the embodiment.

図5を参照して、(1)原稿の画像データを取得する。(2)副走査方向に沿って画像データを所定のピクセルライン数で分割する分割単位を設定する。一例として分割単位をピクセルライン数Xに設定した場合が示されている。(3)副走査方向へ分割単位毎にシフトさせる。(4)主走査方向に沿ってシフトした画像データを所定のピクセルライン数で分割する分割単位を設定する。一例として分割単位をピクセルライン数Yに設定した場合が示されている。(5)主走査方向へ分割単位毎にシフトさせる。(6)画像データに対して階調補間処理を実行する。(7)画像データに対してアスペクト比を調整する。   Referring to FIG. 5, (1) image data of a document is acquired. (2) A division unit for dividing the image data by a predetermined number of pixel lines along the sub-scanning direction is set. As an example, the case where the division unit is set to the number X of pixel lines is shown. (3) Shift each division unit in the sub-scanning direction. (4) A division unit for dividing the image data shifted along the main scanning direction by a predetermined number of pixel lines is set. As an example, the case where the division unit is set to the number of pixel lines Y is shown. (5) Shift in units of division in the main scanning direction. (6) A gradation interpolation process is executed on the image data. (7) Adjust the aspect ratio for the image data.

図6は、実施形態に基づく原稿の画像データの傾きを検出する図である。
図6に示されるように、原稿の画像データの屈曲点を検出する。本例においては、屈曲点A、B、C、Dを検出する。これにより原稿の画像データの屈曲点A→B→C→D→A結んだ原稿の境界線も検出される。
FIG. 6 is a diagram for detecting the inclination of image data of a document based on the embodiment.
As shown in FIG. 6, the bending point of the image data of the document is detected. In this example, bending points A, B, C, and D are detected. As a result, the inflection points A → B → C → D → A of the original image data are also detected.

そして、検出された境界線に基づいて画像データの副走査方向(第1の方向)に対する原稿の画像データの傾き角度θ1を検出する。   Based on the detected boundary line, the inclination angle θ1 of the document image data with respect to the sub-scanning direction (first direction) of the image data is detected.

図7は、実施形態に基づく画像データの分割単位の設定を説明する図である。
図7に示されるようには、画像データの境界線が示されている。また、シフトする第1の方向に境界線が1ピクセル変化する第2の方向に沿って配置されたピクセルライン数が示されている。
FIG. 7 is a diagram illustrating setting of the division unit of image data based on the embodiment.
As shown in FIG. 7, the boundary line of the image data is shown. Further, the number of pixel lines arranged along the second direction in which the boundary line changes by one pixel in the first direction to be shifted is shown.

ここで、傾き角度θ1に基づいて第1の方向に境界線が1ピクセル変化する第2の方向に沿って配置されたピクセルライン数Xを算出する。ピクセルライン数Xは、次式で表わされる。   Here, the number X of pixel lines arranged along the second direction in which the boundary line changes by one pixel in the first direction is calculated based on the tilt angle θ1. The number X of pixel lines is expressed by the following equation.

1/X=tanθ1・・・(式1)
X=cosθ1/sinθ1・・・(式2)
本例においては、画像データの傾き角度θ1に基づいて画像データの境界線が第1の方向に1ピクセル変化する、第2の方向に沿って配置されたピクセルライン数Xは端数を切り下げて6の場合が示されている。
1 / X = tan θ1 (Formula 1)
X = cos θ1 / sin θ1 (Formula 2)
In this example, the boundary line of the image data changes by 1 pixel in the first direction based on the inclination angle θ1 of the image data. The number X of pixel lines arranged along the second direction is rounded down to 6 The case of is shown.

したがって、分割単位は6ピクセルライン毎に設定される。
図8は、実施形態に基づく分割単位毎の画像データを副走査方向(第1の方向)にシフトする場合を模式的に説明する図である。
Therefore, the division unit is set every 6 pixel lines.
FIG. 8 is a diagram schematically illustrating a case where image data for each division unit based on the embodiment is shifted in the sub-scanning direction (first direction).

図8に示されるように、分割単位毎の画像データを副走査方向(第1の方向)にシフトさせた場合の画像データの長さは、R/cosθ1として表わされる。   As shown in FIG. 8, the length of the image data when the image data for each division unit is shifted in the sub-scanning direction (first direction) is expressed as R / cos θ1.

図9は、実施形態に基づくシフトした原稿の画像データの傾きを検出する図である。
図9に示されるように、シフトした原稿の画像データの屈曲点を検出する。本例においては、屈曲点E、F、G、Hを検出する。これにより原稿の画像データの屈曲点E→F→G→H→Eを結んだシフトした原稿の画像データの境界線も検出される。
FIG. 9 is a diagram for detecting the inclination of image data of a shifted document based on the embodiment.
As shown in FIG. 9, the bending point of the image data of the shifted document is detected. In this example, bending points E, F, G, and H are detected. As a result, the boundary line of the image data of the shifted document connecting the bending points E → F → G → H → E of the image data of the document is also detected.

そして、検出された境界線に基づいて画像データの主走査方向(第2の方向)に対する原稿の画像データの傾き角度θ2を検出する。具体的には、主走査方向(第2の方向)と垂直な線とシフトした原稿の画像データの境界線の他辺との角度θ2を検出する。   Then, an inclination angle θ2 of the image data of the document with respect to the main scanning direction (second direction) of the image data is detected based on the detected boundary line. Specifically, an angle θ2 between the line perpendicular to the main scanning direction (second direction) and the other side of the boundary line of the shifted document image data is detected.

ここで、傾き角度θ2に基づいて第2の方向に境界線が1ピクセル変化する第1の方向に沿って配置されたピクセルライン数Yを算出する。ピクセルライン数Yは、次式で表わされる。   Here, the number Y of pixel lines arranged along the first direction in which the boundary line changes by one pixel in the second direction is calculated based on the tilt angle θ2. The pixel line number Y is expressed by the following equation.

1/Y=tanθ2・・・(式3)
Y=cosθ2/sinθ2・・・(式4)
傾き角度θ1,θ2については、次式の関係が成り立つ。
1 / Y = tan θ2 (Equation 3)
Y = cos θ2 / sin θ2 (Formula 4)
Regarding the inclination angles θ1 and θ2, the relationship of the following equation is established.

tanθ2=Rsinθ1/(R/cosθ1)=cosθ1×sinθ1・・・(式5)
式(2)、(4)、(5)に基づけばY=X+1/X・・・(式6)として表わされる。
tanθ2 = Rsinθ1 / (R / cosθ1) = cosθ1 × sinθ1 (Formula 5)
Based on the formulas (2), (4), and (5), Y = X + 1 / X (Expression 6).

したがって、仮にXが6に設定される場合、画像データの傾き角度θ2に基づいて画像データの境界線が第2の方向に1ピクセル変化する、第1の方向に沿って配置されたピクセルライン数Yは端数を切り下げて6となる。   Therefore, if X is set to 6, the number of pixel lines arranged along the first direction in which the boundary line of the image data changes by one pixel in the second direction based on the inclination angle θ2 of the image data Y is rounded down to 6.

<C.フロー>
図10は、実施形態に基づく制御部28のスキュー補正処理を実行するフロー図である。
<C. Flow>
FIG. 10 is a flowchart for executing the skew correction processing of the control unit 28 based on the embodiment.

図10を参照して、制御部28は、画像データを取得する(ステップS2)。具体的には、画像読取部7で読み取った画像データを取得する。   Referring to FIG. 10, control unit 28 acquires image data (step S2). Specifically, the image data read by the image reading unit 7 is acquired.

次に、制御部28は、副走査方向(第1の方向)に対する傾き角度θ1を検出する(ステップS4)。第1傾き検出部30は、図6で説明したように屈曲点を検出し、検出された境界線に基づいて副走査方向(第1の方向)に対する原稿の画像データの傾き角度θ1を検出する。   Next, the control unit 28 detects an inclination angle θ1 with respect to the sub-scanning direction (first direction) (step S4). As described with reference to FIG. 6, the first inclination detection unit 30 detects the bending point, and detects the inclination angle θ1 of the document image data with respect to the sub-scanning direction (first direction) based on the detected boundary line. .

次に、制御部28は、第1の方向に沿って画像データを分割する分割単位数を設定する(ステップS6)。第1分割単位数設定部34は、第1の方向に沿って画像データを分割する分割単位数を設定する。分割単位数の設定の詳細については後述する。   Next, the control unit 28 sets the number of division units for dividing the image data along the first direction (step S6). The first division unit number setting unit 34 sets the division unit number for dividing the image data along the first direction. Details of setting the number of division units will be described later.

次に、制御部28は、第1の方向にシフトする処理を実行する(ステップS8)。第1シフト部32は、分割した分割単位毎に副走査方向(第1の方向)にシフトする。   Next, the control unit 28 executes a process of shifting in the first direction (step S8). The first shift unit 32 shifts in the sub-scanning direction (first direction) for each divided unit.

次に、制御部28は、主走査方向(第2の方向)に対する傾き角度θ2を検出する(ステップS10)。第2傾き検出部42は、図9で説明したように屈曲点を検出し、検出された境界線に基づいて主走査方向(第2の方向)に対する原稿の画像データの傾き角度θ2を検出する。   Next, the control unit 28 detects an inclination angle θ2 with respect to the main scanning direction (second direction) (step S10). As described with reference to FIG. 9, the second inclination detection unit 42 detects the bending point, and detects the inclination angle θ2 of the document image data with respect to the main scanning direction (second direction) based on the detected boundary line. .

次に、制御部28は、第2の方向に沿って画像データを分割する分割単位数を設定する(ステップS12)。第2分割単位数設定部46は、第2の方向に沿って画像データを分割する分割単位数を設定する。分割単位数の設定の詳細については後述する。   Next, the control unit 28 sets the number of division units for dividing the image data along the second direction (step S12). The second division unit number setting unit 46 sets the number of division units for dividing the image data along the second direction. Details of setting the number of division units will be described later.

次に、制御部28は、第2の方向にシフトする処理を実行する(ステップS14)。第2シフト部44は、分割した分割単位毎に主走査方向(第2の方向)にシフトする。   Next, the control unit 28 executes a process of shifting in the second direction (step S14). The second shift unit 44 shifts in the main scanning direction (second direction) for each divided unit.

次に、制御部28は、補間処理を実行する(ステップS16)。補間部54は、シフトした各画素の階調値と第1の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する。また、シフトした各画素の階調値と第2の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する。補間処理の詳細については後述する。   Next, the control part 28 performs an interpolation process (step S16). The interpolating unit 54 executes a gradation interpolation process in which the gradation value of each shifted pixel and the gradation value of the pixel adjacent to the first direction are weighted and added. Further, a gradation interpolation process is performed in which the gradation value of each shifted pixel and the gradation value of a pixel adjacent to the second direction are added with weighting. Details of the interpolation processing will be described later.

次に、制御部28は、解像度変換処理を実行する(ステップS18)。解像度変換部56は、シフトした原稿の画像データに対してアスペクト比を調整する。   Next, the control unit 28 executes resolution conversion processing (step S18). The resolution conversion unit 56 adjusts the aspect ratio of the shifted document image data.

そして、処理を終了する(エンド)。
図11は、実施形態に基づく分割単位数の設定のサブルーチン処理を説明する図である。第1分割単位数設定部34および第2分割単位数設定部46における処理である。一例として第1分割単位数設定部34について説明する。
Then, the process ends (END).
FIG. 11 is a diagram for explaining the subroutine processing for setting the number of division units based on the embodiment. This is processing in the first division unit number setting unit 34 and the second division unit number setting unit 46. As an example, the first division unit number setting unit 34 will be described.

図11に示されるように、第1分割単位数設定部34は、ライン数を算出する(ステップS20)。   As shown in FIG. 11, the first division unit number setting unit 34 calculates the number of lines (step S20).

具体的には、第1ライン数算出部36は、原稿の境界線を示す画像データが副走査方向(第1の方向)に1ピクセル変化する第2の方向に沿って配置されたピクセルライン数を算出する。   Specifically, the first line number calculation unit 36 sets the number of pixel lines arranged along a second direction in which image data indicating a document boundary line changes by one pixel in the sub-scanning direction (first direction). Is calculated.

次に、第1分割単位数設定部34は、算出結果に基づいてライン数を設定する(ステップS22)。第1ライン数設定部38は、算出結果に基づいて、ピクセルライン数に端数が生じる場合に、第1ライン数算出部36の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する。   Next, the first division unit number setting unit 34 sets the number of lines based on the calculation result (step S22). The first line number setting unit 38 divides the calculation result of the first line number calculation unit 36 by rounding up or down to a whole number of pixel line division units when the pixel line number has a fraction based on the calculation result Set to.

次に、第1分割単位数設定部34は、設定されたライン数に従って画像データを分割する(ステップS24)。第1ライン数分割部39は、設定された分割単位に従って画像データを分割する。   Next, the first division unit number setting unit 34 divides the image data according to the set number of lines (step S24). The first line number dividing unit 39 divides the image data according to the set division unit.

次に、第1分割単位数設定部34は、端数を積算する(ステップS28)。第1ライン数調節部40は、第1ライン数分割部39の分割に従って分割単位のピクセルライン数の端数を積算する。   Next, the 1st division | segmentation unit number setting part 34 integrates a fraction (step S28). The first line number adjustment unit 40 integrates the fraction of the pixel line number in the division unit according to the division of the first line number division unit 39.

次に、第1分割単位数設定部34は、積算した端数が所定値以上か否かを判断する(ステップS30)。第1ライン数調節部40は、端数の積算が所定値以上か否かを判断する。   Next, the first division unit number setting unit 34 determines whether or not the integrated fraction is greater than or equal to a predetermined value (step S30). The first line number adjustment unit 40 determines whether or not the integral of the fraction is equal to or greater than a predetermined value.

具体的には、端数を切り下げて整数のピクセルライン数の分割単位に設定した場合には、端数は正の小数の値となる。本例においては、正の小数の値を積算して所定値1以上となるか否かを判断する。   Specifically, when the fraction is rounded down and set as a division unit of an integer number of pixel lines, the fraction is a positive decimal value. In this example, it is determined whether or not a positive decimal value is accumulated to become a predetermined value 1 or more.

一方、端数を切り上げて整数のピクセルライン数の分割単位に設定した場合には、端数は負の小数の値となる。本例においては、負の小数の値を積算して所定値−1以下となるか否かを判断する。   On the other hand, when the fraction is rounded up and set as a division unit of an integer number of pixel lines, the fraction is a negative decimal value. In this example, it is determined whether or not the negative decimal values are integrated and become a predetermined value −1 or less.

ステップS30において、第1分割単位数設定部34は、積算した端数が所定値以上と判断した場合(ステップS30においてYES)には、ライン数を調整する(ステップS32)。第1ライン数調節部40は、端数の積算が所定値以上と判断した場合に、分割単位に設定されたライン数の数を調整する。具体的には、端数を切り下げて整数のピクセルライン数の分割単位に設定した場合には、ライン数の数に1を足す。   In step S30, the first division unit number setting unit 34 adjusts the number of lines (step S32) when it determines that the integrated fraction is greater than or equal to a predetermined value (YES in step S30). The first line number adjustment unit 40 adjusts the number of lines set as a division unit when it is determined that the integral of the fraction is equal to or greater than a predetermined value. Specifically, when the fraction is rounded down and set as a division unit of an integer number of pixel lines, 1 is added to the number of lines.

一方、端数を切り上げて整数のピクセルライン数の分割単位に設定した場合には、ライン数の数に1を引く。   On the other hand, when the fraction is rounded up and set to the division unit of the integer number of pixel lines, 1 is subtracted from the number of lines.

そして、第1分割単位数設定部34は、積算リセットして、ステップS24に戻る。第1ライン数調節部40は、端数の積算をリセットする。   Then, the first division unit number setting unit 34 resets the integration, and returns to step S24. The first line number adjustment unit 40 resets the fractional integration.

ステップS24に戻った後、第1分割単位数設定部34は、調整されたライン数で分割する。第1ライン数分割部39は、調整されたライン数に従って画像データを分割する。なお、第1ライン数調節部40は、再び端数を積算する。また、第1ライン数分割部39は、最初に設定されたライン数での分割を実行する。   After returning to step S24, the first division unit number setting unit 34 divides by the adjusted number of lines. The first line number dividing unit 39 divides the image data according to the adjusted number of lines. The first line number adjustment unit 40 adds up the fractions again. Further, the first line number dividing unit 39 executes division with the initially set number of lines.

一方、ステップS30において、第1分割単位数設定部34は、積算した端数が所定値未満と判断した場合(ステップS30においてNO)には、ステップS32,S34をスキップしてステップS24に戻る。第1ライン数分割部39は、最初に設定されたライン数での分割を実行する。   On the other hand, if the first division unit number setting unit 34 determines in step S30 that the integrated fraction is less than the predetermined value (NO in step S30), it skips steps S32 and S34 and returns to step S24. The first line number dividing unit 39 executes division with the initially set number of lines.

なお、上記においては、第1分割単位数設定部34の処理について主に説明したが、第2分割単位数設定部46の処理についても同様である。   In addition, in the above, although the process of the 1st division | segmentation unit number setting part 34 was mainly demonstrated, it is the same also about the process of the 2nd division | segmentation unit number setting part 46. FIG.

図12は、実施形態に基づく第1ライン数調節部40の処理の具体例について説明する図である。   FIG. 12 is a diagram illustrating a specific example of the process of the first line number adjustment unit 40 based on the embodiment.

図12(A)に示されるように、ここでは、副走査方向に沿って画像データを所定のピクセルライン数で分割する分割単位として、ピクセルライン数X=10に設定した場合が示されている。この場合、式(6)に基づけば、Y=10.1として表わされる。端数D=0.1である。そして、端数Dを切り捨てることにより主走査方向に沿ってシフトした画像データを所定のピクセルライン数で分割する分割単位として、ピクセルライン数Y=10に設定した場合が示されている。   As shown in FIG. 12A, here, a case is shown in which the pixel line number X = 10 is set as a division unit for dividing the image data by a predetermined number of pixel lines along the sub-scanning direction. . In this case, based on Formula (6), it is expressed as Y = 10.1. The fraction D = 0.1. The figure shows a case where the pixel line number Y = 10 is set as a division unit for dividing the image data shifted along the main scanning direction by rounding down the fraction D by a predetermined number of pixel lines.

図12(B)においては、画像データを主走査方向に沿って設定されたピクセルライン数Yの分割単位で分割する過程において、端数Dが1以上となった場合にピクセルライン数Y+1の分割単位で分割する場合が示されている。   In FIG. 12B, in the process of dividing the image data by the division unit of the pixel line number Y set along the main scanning direction, the division unit of the pixel line number Y + 1 when the fraction D becomes 1 or more. The case of dividing by is shown.

図13は、実施形態に基づくシフト処理と従来のシフト処理とを比較する場合を説明する図である。   FIG. 13 is a diagram illustrating a case where the shift process based on the embodiment is compared with the conventional shift process.

図13(A)、(B)は、従来のシフト処理を説明する図である。
図13(A)に示されるように、端数を切り捨てた場合には、ピクセルライン数Yは所望の値よりも小さくなるため分割数を多くなる。
13A and 13B are diagrams for explaining the conventional shift processing.
As shown in FIG. 13A, when the fraction is rounded down, the pixel line number Y is smaller than the desired value, and the number of divisions is increased.

したがって、分割単位をシフトさせた場合には、分割数が多いためシフト量増加のため左側に傾く歪みが生じることになる。したがって、最終的にアスペクト比を調整した場合にも左側に傾く歪みが生じた画像データが形成される。   Therefore, when the division unit is shifted, since the number of divisions is large, distortion that tilts to the left side due to an increase in the shift amount occurs. Therefore, even when the aspect ratio is finally adjusted, image data in which distortion that tilts to the left occurs is formed.

図13(B)に示されるように、端数を切り上げた場合には、ピクセルライン数Yは所望の値よりも大きくなるため分割数が少なくなる。   As shown in FIG. 13B, when the fraction is rounded up, the pixel line number Y becomes larger than a desired value, so that the number of divisions decreases.

したがって、分割単位をシフトさせた場合には、分割数が少ないためシフト量減少のため右側に傾く歪みが生じることになる。したがって、最終的にアスペクト比を調整した場合にも右側に傾く歪みが生じた画像データが形成される。   Therefore, when the division unit is shifted, since the number of divisions is small, distortion that tilts to the right side due to a reduction in the shift amount occurs. Therefore, even when the aspect ratio is finally adjusted, image data in which distortion tilting to the right occurs is formed.

一方、図13(C)は、実施形態に基づくシフト処理である。
端数を積算して、積算値が所定値以上となった場合に、分割単位数を調節することによりシフト量は適切な値となり歪みを抑制することが可能である。
On the other hand, FIG. 13C shows a shift process based on the embodiment.
When the fraction is integrated and the integrated value is equal to or greater than a predetermined value, the shift amount becomes an appropriate value by adjusting the number of division units, and distortion can be suppressed.

したがって、分割単位をシフトさせた場合には、分割数を適切に調節することにより歪みが生じることを回避することが可能である。したがって、最終的にアスペクト比を調整した場合にも歪みが生じない傾き補正された画像データが形成される。   Therefore, when the division unit is shifted, it is possible to avoid the occurrence of distortion by appropriately adjusting the number of divisions. Accordingly, tilt-corrected image data that does not cause distortion even when the aspect ratio is finally adjusted is formed.

図14は、実施形態に基づく補間部54における補間処理を説明する図である。
図14(A)に示されるように、分割単位毎にシフトさせる。
FIG. 14 is a diagram illustrating the interpolation processing in the interpolation unit 54 based on the embodiment.
As shown in FIG. 14A, the shift is performed for each division unit.

図14(B)に示されるように、分割単位毎のシフトにより連続性が途切れることになる。したがって、連続的な階調を維持することが難しくなる。   As shown in FIG. 14B, the continuity is interrupted by the shift for each division unit. Therefore, it becomes difficult to maintain continuous gradation.

図14(C)は、補間部54における階調補間処理を説明する図である。
具体的には、補間部54は、各画素の階調値とシフト方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する。具体的には、分割単位に含まれる回転基準画素から注目画素への距離に応じて重み付けの値を調整する。
FIG. 14C is a diagram for explaining gradation interpolation processing in the interpolation unit 54.
Specifically, the interpolation unit 54 executes a gradation interpolation process in which the gradation value of each pixel and the gradation value of the pixel adjacent to the shift direction are respectively weighted and added. Specifically, the weighting value is adjusted according to the distance from the rotation reference pixel included in the division unit to the target pixel.

分割単位における回転基準画素は、分割単位が左方向にシフトする値が大きくなる場合には、分割単位に含まれる右端の画素が回転基準画素となる。一方、分割単位が右方向にシフトする値が大きくなる場合には、分割単位に含まれる左端の画素が回転基準画素となる。   The rotation reference pixel in the division unit is the rotation reference pixel when the value by which the division unit shifts to the left increases. On the other hand, when the value by which the division unit is shifted to the right increases, the leftmost pixel included in the division unit becomes the rotation reference pixel.

図15は、実施形態に基づく補間部54における重み付けの調整を説明する図である。
図15に示されるように、重みは、画素の中心と重心位置の距離から算出する。
FIG. 15 is a diagram illustrating adjustment of weighting in the interpolation unit 54 based on the embodiment.
As shown in FIG. 15, the weight is calculated from the distance between the center of the pixel and the center of gravity position.

重心位置は各シフト単位のライン数によって設定される。
シフト単位が6ラインの場合、回転基準画素に近い方(右端)のラインの重心位置は注目画素の中心と一致する。
The position of the center of gravity is set by the number of lines in each shift unit.
When the shift unit is 6 lines, the barycentric position of the line closer to the rotation reference pixel (right end) coincides with the center of the target pixel.

1番目のラインの場合には、注目画素の重みが100%、隣接画素の重みが0%となる。その他の画素は、回転基準側からの距離に応じて重みが変動する。   In the case of the first line, the weight of the target pixel is 100% and the weight of the adjacent pixel is 0%. The weights of other pixels vary according to the distance from the rotation reference side.

2番目のラインの場合には、注目画素の重みが100x1/6=16.7%、隣接画素の重みが100x5/6=83.3%となる。   In the case of the second line, the weight of the target pixel is 100 × 1/6 = 16.7%, and the weight of the adjacent pixel is 100 × 5/6 = 83.3%.

3番目のラインの場合には、注目画素の重みが100x2/6=33.3%、隣接画素の重みが100x4/6=66.7%となる。   In the case of the third line, the weight of the target pixel is 100x2 / 6 = 33.3%, and the weight of the adjacent pixel is 100x4 / 6 = 66.7%.

4番目のラインの場合には、注目画素の重みが100x3/6=50.0%、隣接画素の重みが100x3/6=50.0%となる。   In the case of the fourth line, the weight of the target pixel is 100x3 / 6 = 50.0%, and the weight of the adjacent pixel is 100x3 / 6 = 50.0%.

5番目のラインの場合には、注目画素の重みが100x4/6=66.7%、隣接画素の重みが100x2/6=33.3%となる。   In the case of the fifth line, the weight of the target pixel is 100 × 4/6 = 66.7%, and the weight of the adjacent pixel is 100 × 2/6 = 33.3%.

6番目のラインの場合には、注目画素の重みが100x5/6=83.3%、隣接画素の重みが100x1/6=16.7%となる。   In the case of the sixth line, the weight of the target pixel is 100x5 / 6 = 83.3%, and the weight of the adjacent pixel is 100x1 / 6 = 16.7%.

補間後の階調を求める計算式は次式で示される。
補間後の階調=注目画素の階調×注目画素の重み+隣接画素の階調×隣接画素の重みにより算出される。したがって、シフト単位のライン数によって補間時の重みは変動する。
A calculation formula for obtaining the gradation after interpolation is expressed by the following formula.
Gradation after interpolation = gradation of target pixel × weight of target pixel + gradation of adjacent pixel × weight of adjacent pixel Therefore, the weight during interpolation varies depending on the number of lines in shift units.

当該補間部54における階調補間処理により連続的な階調を維持し、違和感のない画像データを生成することが可能である。   It is possible to maintain continuous gradation by the gradation interpolation processing in the interpolation unit 54 and to generate image data without a sense of incongruity.

なお、上記における補間部54における階調補間処理は、副走査方向(第1の方向)にシフトさせた分割単位および主走査方向(第2の方向)にシフトさせた分割単位のそれぞれに対して実行してもよいし、いずれか一方のみ実行するようにしても良い。   Note that the gradation interpolation processing in the interpolation unit 54 described above is performed for each of the division unit shifted in the sub-scanning direction (first direction) and the division unit shifted in the main scanning direction (second direction). It may be executed, or only one of them may be executed.

以上、本発明に基づいた実施の形態について説明したが、今回開示された実施の形態はすべての点で例示であって制限的なものではない。本発明の技術的範囲は特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   As mentioned above, although embodiment based on this invention was described, embodiment disclosed this time is an illustration and restrictive at no points. The technical scope of the present invention is defined by the terms of the claims, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 画像読取装置、3 画像形成部、4 給紙部、5 出力トレイ、6 自動原稿搬送部、8 原稿トレイ、9 搬送ユニット、10 排紙トレイ、11 操作パネル、12 操作部、13 表示部、14,15,16 給紙用カセットトレイ、17 画像読取モジュール、18 モータ、19 駆動伝達部、20 ランプ、21 イメージセンサ、22 原稿面ガラス、23 ガラス、27 記憶部、28 制御部、29 画像記憶部、30 第1傾き検出部、32 第1シフト部、34 第1分割単位数設定部、36 第1ライン数算出部、38 第1ライン数設定部、39 第1ライン数分割部、40 第1ライン数調節部、42 第2傾き検出部、44 第2シフト部、46 第2分割単位数設定部、48 第2ライン数算出部、50 第2ライン数設定部、51 第2ライン数分割部、52 第2ライン数調節部、54 補間部、56 解像度変換部。   DESCRIPTION OF SYMBOLS 1 Image reader, 3 Image formation part, 4 Paper feed part, 5 Output tray, 6 Automatic document conveyance part, 8 Document tray, 9 Conveyance unit, 10 Paper discharge tray, 11 Operation panel, 12 Operation part, 13 Display part, 14, 15, 16 Paper feed cassette tray, 17 Image reading module, 18 Motor, 19 Drive transmission unit, 20 Lamp, 21 Image sensor, 22 Original glass, 23 Glass, 27 Storage unit, 28 Control unit, 29 Image storage , 30 first inclination detection unit, 32 first shift unit, 34 first division unit number setting unit, 36 first line number calculation unit, 38 first line number setting unit, 39 first line number division unit, 40 1 line number adjustment unit, 42 second inclination detection unit, 44 second shift unit, 46 second division unit number setting unit, 48 second line number calculation unit, 50 second line number setting unit 51 second line number of divided portions, 52 second line number adjustment unit, 54 interpolation unit 56 resolution conversion unit.

Claims (10)

原稿の画像データを取得する画像データ取得部と、
第1の方向に対する前記原稿の画像データの傾きを検出する第1傾き検出部と、
前記第1傾き検出部で検出した傾きに基づいて前記原稿の画像データを第1の方向に沿って分割する分割単位を設定する第1分割単位数設定部と、
分割した分割単位毎の画像データを第1の方向にシフトする第1シフト部とを備え、
前記第1分割単位数設定部は、
前記原稿の境界線を示す画像データが前記第1の方向に1ピクセル変化する第2の方向に沿って配置されたピクセルライン数を算出する第1ライン数算出部と、
前記ピクセルライン数に端数が生じる場合に、前記第1ライン数算出部の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する第1ライン数設定部と、
前記第1ライン数設定部の設定に従って分割単位のピクセルライン数の端数を積算して、積算値が所定値を超えた場合に、前記分割単位の整数のピクセルライン数を調節する第1ライン数調節部とを含む、画像読取装置。
An image data acquisition unit for acquiring image data of a document;
A first inclination detector for detecting an inclination of the image data of the document with respect to a first direction;
A first division unit number setting unit for setting a division unit for dividing the image data of the document along a first direction based on the inclination detected by the first inclination detection unit;
A first shift unit that shifts the divided image data for each division unit in a first direction;
The first division unit number setting unit includes:
A first line number calculation unit that calculates the number of pixel lines arranged along a second direction in which image data indicating a boundary line of the document changes by one pixel in the first direction;
A first line number setting unit configured to round up or down the fraction of the calculation result of the first line number calculation unit and set it as a division unit of an integer pixel line number when a fraction occurs in the pixel line number;
The first line number for adjusting the integer pixel line number for the division unit when the fractional value of the pixel line number for the division unit is integrated according to the setting of the first line number setting unit and the integrated value exceeds a predetermined value. An image reading apparatus including an adjustment unit.
前記ライン数調節部は、前記分割単位の整数のピクセルライン数を調節した際に前記積算値をリセットする、請求項1記載の画像読取装置。   The image reading apparatus according to claim 1, wherein the line number adjusting unit resets the integrated value when an integer number of pixel lines in the division unit is adjusted. 前記第1シフト部による前記第1の方向へのシフト後に、前記第1の方向とは異なる第2の方向に対する前記原稿の画像データの傾きを検出する第2傾き検出部と、
前記第2傾き検出部で検出した傾きに基づいて前記原稿の画像データを第2の方向に沿って分割する分割単位を設定する第2分割単位数設定部と、
分割した分割単位毎の画像データを第2の方向にシフトする第2シフト部とをさらに備える、請求項1記載の画像読取装置。
A second inclination detection unit that detects an inclination of image data of the document with respect to a second direction different from the first direction after the first shift unit shifts in the first direction;
A second division unit number setting unit for setting a division unit for dividing the image data of the document along a second direction based on the inclination detected by the second inclination detection unit;
The image reading apparatus according to claim 1, further comprising: a second shift unit that shifts the divided image data for each division unit in the second direction.
前記第2分割単位数設定部は、
シフトした前記原稿の境界線を示す画像データが前記第2の方向に1ピクセル変化する第1の方向に沿って配置されたピクセルライン数を算出する第2ライン数算出部と、
前記ピクセルライン数に端数が生じる場合に、前記第2ライン数算出部の算出結果の端数を切り上げあるいは切り下げて整数のピクセルライン数の分割単位に設定する第2ライン数設定部と、
前記第2ライン数設定部の設定に従って分割単位のピクセルライン数の端数を積算して、積算値が所定値を超えた場合に、前記分割単位の整数のピクセルライン数を調節する第2ライン数調節部とを含む、請求項3記載の画像読取装置。
The second division unit number setting unit includes:
A second line number calculation unit for calculating the number of pixel lines arranged along a first direction in which image data indicating a boundary line of the shifted document changes by one pixel in the second direction;
A second line number setting unit configured to round up or down the fraction of the calculation result of the second line number calculation unit and set it as a division unit of an integer pixel line number when a fraction occurs in the pixel line number;
A second line number for adjusting the integer pixel line number for the division unit when the fractional value of the pixel line number for the division unit is integrated according to the setting of the second line number setting unit and the integrated value exceeds a predetermined value. The image reading apparatus according to claim 3, further comprising an adjustment unit.
前記第1の方向は副走査方向、前記第2の方向は主走査方向である、請求項4記載の画像読取装置。   The image reading apparatus according to claim 4, wherein the first direction is a sub-scanning direction and the second direction is a main scanning direction. 各画素の階調値と第1の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する補間部をさらに備える、請求項1記載の画像読取装置。   The image reading apparatus according to claim 1, further comprising: an interpolation unit that executes a gradation interpolation process that weights and adds the gradation value of each pixel and the gradation value of a pixel adjacent to the first direction. 前記補間部は、分割単位に含まれる基準画素から注目画素への距離に応じて重み付けの値を調整する、請求項6記載の画像読取装置。   The image reading apparatus according to claim 6, wherein the interpolation unit adjusts a weighting value in accordance with a distance from a reference pixel included in a division unit to a target pixel. 各画素の階調値と第2の方向に対して隣接する画素の階調値とをそれぞれ重み付けて加算する階調補間処理を実行する補間部をさらに備える、請求項3記載の画像読取装置。   The image reading apparatus according to claim 3, further comprising: an interpolation unit that executes a gradation interpolation process that weights and adds the gradation value of each pixel and the gradation value of a pixel adjacent to the second direction. 前記補間部は、分割単位に含まれる基準画素から注目画素への距離に応じて重み付けの値を調整する、請求項8記載の画像読取装置。   The image reading apparatus according to claim 8, wherein the interpolation unit adjusts a weighting value according to a distance from a reference pixel included in a division unit to a target pixel. シフトした前記原稿の画像データに対してアスペクト比を調整する解像度変換部をさらに備える、請求項1記載の画像読取装置。   The image reading apparatus according to claim 1, further comprising a resolution conversion unit that adjusts an aspect ratio of the shifted image data of the document.
JP2016027832A 2016-02-17 2016-02-17 Image reading device Active JP6668806B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016027832A JP6668806B2 (en) 2016-02-17 2016-02-17 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016027832A JP6668806B2 (en) 2016-02-17 2016-02-17 Image reading device

Publications (2)

Publication Number Publication Date
JP2017147592A true JP2017147592A (en) 2017-08-24
JP6668806B2 JP6668806B2 (en) 2020-03-18

Family

ID=59682426

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016027832A Active JP6668806B2 (en) 2016-02-17 2016-02-17 Image reading device

Country Status (1)

Country Link
JP (1) JP6668806B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230188659A1 (en) * 2021-12-09 2023-06-15 Canon Kabushiki Kaisha Image forming apparatus and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230188659A1 (en) * 2021-12-09 2023-06-15 Canon Kabushiki Kaisha Image forming apparatus and method

Also Published As

Publication number Publication date
JP6668806B2 (en) 2020-03-18

Similar Documents

Publication Publication Date Title
US9369599B2 (en) Image reading device, image forming apparatus, and method for controlling image reading device to remove blank sheet image data
JP6217681B2 (en) Image forming system and image forming method
US20160261758A1 (en) Reading device, image forming apparatus including reading device, and method for controlling reading device
JP6323191B2 (en) Image reading apparatus and image forming apparatus
JP6233393B2 (en) Document inclination amount detection apparatus and image processing apparatus
JP6541502B2 (en) Image reading apparatus, image reading method
JP5481436B2 (en) Image reading apparatus and image forming apparatus
US20140177013A1 (en) Image forming apparatus, reading apparatus, and control method of reading
JP6607019B2 (en) Document inclination amount detection apparatus and image processing apparatus
JP6668806B2 (en) Image reading device
EP2129101A2 (en) Image forming apparatus and density correcting method
JP6107515B2 (en) Image forming system and image processing apparatus
JP7415763B2 (en) Image forming device
JP6209932B2 (en) Image forming apparatus, image forming system, and reading control method
JP4849144B2 (en) Image reading apparatus and streak noise correction method
JP5662675B2 (en) Image forming apparatus and control method thereof
JP7451894B2 (en) Paper transport device and image forming device
US20070002394A1 (en) Image reading apparatus and computer readable medium storing computer program
JP2018203450A (en) Image reading device, method for controlling the same, and program
US11609522B2 (en) Image forming system, control method, and storage medium
JP2014140134A (en) Original reader and image forming apparatus
JP4840734B2 (en) Image reading apparatus, image forming apparatus, and program
JP5990922B2 (en) Image recording device
JP2008289021A (en) Variable magnification method and image processor
JP2023169761A (en) Image processing apparatus, printing system, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181016

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190724

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190806

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190904

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200128

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200210

R150 Certificate of patent or registration of utility model

Ref document number: 6668806

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150