Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6205904B2 - Image reading device - Google Patents
[go: Go Back, main page]

JP6205904B2 - Image reading device - Google Patents

Image reading device Download PDF

Info

Publication number
JP6205904B2
JP6205904B2 JP2013136731A JP2013136731A JP6205904B2 JP 6205904 B2 JP6205904 B2 JP 6205904B2 JP 2013136731 A JP2013136731 A JP 2013136731A JP 2013136731 A JP2013136731 A JP 2013136731A JP 6205904 B2 JP6205904 B2 JP 6205904B2
Authority
JP
Japan
Prior art keywords
image
read
capacity
reading
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013136731A
Other languages
Japanese (ja)
Other versions
JP2015012467A (en
Inventor
哲郎 松谷
哲郎 松谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2013136731A priority Critical patent/JP6205904B2/en
Publication of JP2015012467A publication Critical patent/JP2015012467A/en
Application granted granted Critical
Publication of JP6205904B2 publication Critical patent/JP6205904B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Storing Facsimile Image Data (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

原稿を読み取った読取画像に対して斜行補正を行う技術に関する。   The present invention relates to a technique for performing skew correction on a read image obtained by reading a document.

従来から、スキャナ等で原稿を読み取った読取画像が基準方向に対して傾いている場合に、読取画像をブロック単位に分割し、ブロック単位で回転補正して、読取画像の斜行補正を行う装置が知られている。この装置では、読取画像の傾き角度に応じて、ブロック単位の読取画像を読み込む画像メモリを切り替える技術が開示されている(例えば、特許文献1)。   Conventionally, when a read image read by a scanner or the like is inclined with respect to a reference direction, the read image is divided into block units, and rotation correction is performed in block units to perform skew correction of the read image. It has been known. In this apparatus, a technique for switching an image memory that reads a read image in block units according to the tilt angle of the read image is disclosed (for example, Patent Document 1).

特開2010−205143号公報JP 2010-205143 A

ところで、読取画像を画像メモリなどの記憶部に読み込んで斜行補正を行う装置では、記憶部に記憶される読取画像の容量の増大が問題となることがあった。例えば、原稿の読み取り中に読取画像の斜行補正を行う場合、斜行補正後の出力画像を構成するのに必要な所定量の読取画像が記憶部に記憶されるまで、斜行補正を開始することができない。さらに、当該所定量の読取画像が記憶された場合であっても、当該所定量の読取画像を用いて読取画像の傾き角度を算出するまでは、斜行補正を開始することができない。その結果、斜行補正の開始時において記憶部に記憶される読取画像の容量が増大してしまい、これに応じて斜行補正を行う場合において斜行補正のために割り振られる容量が増大してしまうと、他の処理を行う為に割り振ることができる容量を確保するために、記憶部の容量を増大させなければならない問題が生じていた。   By the way, in an apparatus that reads a read image into a storage unit such as an image memory and performs skew correction, an increase in the capacity of the read image stored in the storage unit may be a problem. For example, when skew correction of a read image is performed while a document is being read, skew correction is started until a predetermined amount of the read image necessary for forming the output image after skew correction is stored in the storage unit. Can not do it. Further, even when the predetermined amount of the read image is stored, the skew correction cannot be started until the inclination angle of the read image is calculated using the predetermined amount of the read image. As a result, the capacity of the read image stored in the storage unit at the start of skew correction increases, and accordingly, the capacity allocated for skew correction increases when skew correction is performed. In other words, there has been a problem that the capacity of the storage unit has to be increased in order to secure a capacity that can be allocated to perform other processes.

本明細書では、斜行補正に用いる記憶部の容量を抑制する技術を開示する。   In the present specification, a technique for suppressing the capacity of a storage unit used for skew correction is disclosed.

本明細書によって開示される画像読取装置は、画像読取部と、前記画像読取部が主走査方向に読み取った読取画像を、前記主走査方向に沿った出力画像に斜行補正する制御部と、記憶部と、を備え、前記記憶部は、前記読取画像が記憶される入力領域を含み、前記制御部は、前記斜行補正において、前記入力領域に記憶された前記読取画像から、前記斜行補正に必要な前記入力領域の容量である必要容量を設定する設定処理と、前記入力領域に記憶された前記読取画像を読み出して前記出力画像として選出する読出処理と、前記入力領域の容量が前記必要容量よりも大きい場合、前記記憶部に対して、前記読出処理において読み出された前記読取画像が記憶されていた領域を前記入力領域から解放するように指示する解放指示処理と、を実行する構成を備える。   An image reading device disclosed in the present specification includes an image reading unit, a control unit that corrects a skew of the read image read in the main scanning direction by the image reading unit into an output image along the main scanning direction, A storage unit, wherein the storage unit includes an input area in which the scanned image is stored, and the control unit performs the skew feeding from the scanned image stored in the input area in the skew feeding correction. A setting process for setting a required capacity that is a capacity of the input area necessary for correction, a read process for reading the read image stored in the input area and selecting it as the output image, and a capacity of the input area A release instruction process for instructing the storage unit to release the area in which the read image read in the read process is stored from the input area, if larger than the required capacity; Provided with a configuration that.

この画像読取装置では、読取画像を斜行補正する際に、読取画像が記憶された入力領域の容量を必要容量と比較する。そして、入力領域の容量が必要容量よりも大きい場合には、入力領域のうち、斜行補正が終了した、つまり、読取画像を読み出した領域を、入力領域から解放するように記憶部に指示する。これによって、例え斜行補正の開始時において一時的に入力領域のために割り振られる容量が増大した場合でも、その後、入力領域の一部を解放することで、入力領域の容量を減少させることができるとともに、解放された領域を他の処理を行う為に割り振ることができ、記憶部の容量が増大してしまうのを抑制することができる。   In this image reading apparatus, when correcting the skew feeding of the read image, the capacity of the input area in which the read image is stored is compared with the necessary capacity. If the capacity of the input area is larger than the required capacity, the storage unit is instructed to release the area in which the skew correction has been completed, that is, the area from which the read image has been read out from the input area. . As a result, even if the capacity allocated for the input area temporarily increases at the start of skew correction, the capacity of the input area can be reduced by releasing a part of the input area thereafter. In addition, the freed area can be allocated for other processing, and an increase in the capacity of the storage unit can be suppressed.

上記画像読取装置では、前記記憶部は、前記出力画像が記憶される出力領域を更に備え、前記制御部は、更に、前記記憶部に対して、前記解放指示処理において解放を指示した前記領域を、前記出力領域として割り当てるように指示する割当指示処理、を実行する構成としても良い。   In the image reading apparatus, the storage unit further includes an output area in which the output image is stored, and the control unit further includes the area instructed to be released in the release instruction process to the storage unit. An allocation instruction process for instructing allocation as the output area may be executed.

読取画像から出力画像への斜行補正が進むにつれて、出力領域に必要とされる容量は増大する。この画像読取装置では、記憶部のうち、入力領域から解放された領域を出力領域として割り当てるので、出力領域の容量の増大を入力容量の容量の減少で補うことができ、入力領域と出力領域とを合計した容量を、斜行補正の間において略一定とすることができる。   As skew correction from the read image to the output image proceeds, the capacity required for the output area increases. In this image reading apparatus, an area released from the input area in the storage unit is allocated as an output area, so that an increase in the capacity of the output area can be compensated by a decrease in the capacity of the input capacity. Can be made substantially constant during skew correction.

上記画像読取装置では、前記読取画像は、画像読取部が原稿を読み取ったものであり、前記必要容量は、前記原稿の少なくとも一辺を含む領域を読み取った読取画像を記憶可能な容量である構成としても良い。   In the image reading apparatus, the read image is obtained by reading an original by an image reading unit, and the required capacity is a capacity capable of storing a read image obtained by reading an area including at least one side of the original. Also good.

入力領域に原稿の少なくとも一辺を含む領域の読取画像が記憶されれば、当該一辺の出力画像を選出することができる。そして、当該入力領域に記憶される読取画像を更新することで、当該一辺に平行な出力画像を順次選出することができ、この結果、読取画像の全域を出力画像として選出することができる。この画像読取装置によれば、入力領域の容量を抑制して、読取画像を出力画像に斜行補正することができる。   If a read image of an area including at least one side of the document is stored in the input area, an output image on the one side can be selected. Then, by updating the read image stored in the input area, output images parallel to the one side can be sequentially selected, and as a result, the entire read image can be selected as the output image. According to this image reading apparatus, it is possible to correct the skew of the read image to the output image while suppressing the capacity of the input area.

上記画像読取装置では、前記画像読取部は、前記主走査方向への読み取りを前記主走査方向と直交する副走査方向に複数回繰り返して前記読取画像を読み取り、前記制御部は、前記解放指示処理において、前記主走査方向への1回の読み取りにより読み取られるライン読取画像毎に読み出されたか否かを確認し、前記ライン読取画像毎に、当該ライン読取画像が記憶されていた領域を前記入力領域から解放するように指示する構成としても良い。   In the image reading apparatus, the image reading unit reads the read image by repeating reading in the main scanning direction a plurality of times in the sub-scanning direction orthogonal to the main scanning direction, and the control unit performs the release instruction process. In the above, it is confirmed whether or not each line read image read by one reading in the main scanning direction is read, and for each line read image, the area where the line read image is stored is input It may be configured to instruct to release from the area.

この画像読取装置によれば、画像読取部が読み取りを行う単位であるライン読取画像毎に、入力領域の一部の領域を解放することができる。   According to this image reading apparatus, a part of the input area can be released for each line read image that is a unit for the image reading unit to read.

上記画像読取装置では、前記読取画像は、画像読取部が原稿を読み取ったものであり、前記制御部は、更に、前記入力領域の初期容量を設定する初期設定処理、を実行し、前記初期容量は、前記必要容量、及び、1枚分の原稿を読み取った読取画像を記憶可能な容量から設定される構成としても良い。   In the image reading apparatus, the read image is obtained by reading an original by an image reading unit, and the control unit further executes an initial setting process for setting an initial capacity of the input area, May be configured from the necessary capacity and a capacity capable of storing a read image obtained by reading one original.

この画像読取装置では、斜行補正の開始時において、入力領域の容量を、1枚分の原稿を読み取った読取画像が記憶可能な程度に広く設定しておくので、読取画像が入力領域の容量を超えて記憶できない問題が生じることはない。その上で、この画像読取装置では、読取画像を斜行補正する際に、入力領域の一部の領域を解放するように指示するので、記憶部の容量が増大してしまうのを抑制することができる。   In this image reading apparatus, since the capacity of the input area is set wide enough to store the read image obtained by reading one original, at the start of the skew correction, the read image has the capacity of the input area. There is no problem that cannot be remembered beyond. In addition, this image reading apparatus instructs to release a part of the input area when correcting the skew of the read image, thereby suppressing an increase in the capacity of the storage unit. Can do.

上記画像読取装置では、前記制御部は、前記入力領域の容量が前記必要容量と一致するまで、前記読出処理と前記解放指示処理を繰り返し、前記解放指示処理により前記入力領域の容量が前記必要容量と等しいと判断された場合、前記入力領域をリングバッファとして使用する構成としても良い。   In the image reading apparatus, the control unit repeats the reading process and the release instruction process until the capacity of the input area matches the required capacity, and the capacity of the input area is set to the required capacity by the release instruction process. The input area may be used as a ring buffer.

この画像読取装置では、解放指示処理を繰り返し実行した結果、入力領域の容量が必要容量と等しくなった場合に、入力領域をリングバッファとして使用することで、必要な記憶部の容量を削減しつつ、読取画像を出力画像に斜行補正することができる。   In this image reading apparatus, when the capacity of the input area becomes equal to the required capacity as a result of repeatedly executing the release instruction process, the input area is used as a ring buffer, thereby reducing the necessary storage capacity. The skewed image can be corrected to the output image.

上記画像読取装置では、前記制御部は、前記画像読取部の読み取り中に前記斜行補正を開始し、更に、前記入力領域の初期容量を設定する初期設定処理、を実行し、前記初期容量は、前記必要容量、及び、前記制御部の処理速度と前記画像読取部とから決定される補助容量から設定される構成としても良い。   In the image reading apparatus, the control unit starts the skew correction during reading of the image reading unit, and further executes an initial setting process for setting an initial capacity of the input area. The auxiliary capacity determined from the required capacity and the processing speed of the control unit and the image reading unit may be used.

この画像読取装置では、斜行補正の処理時間の短縮のため、画像読取部の読み取り中に斜行補正を開始し、制御部は、斜行補正の開始時に、入力領域の初期容量を設定する。斜行補正中の設定処理により必要容量が設定された場合、初期容量は必要容量と同一の容量に設定してもよいように思える。しかし、斜行補正の開始時では、例えば読取画像の読み出しを開始する際に、初期設定をしなければならない等、制御部の処理速度が低下することがある。その結果、画像読取部が読み取った読取画像の容量が必要容量を超える事象が生じることがあり、この場合、斜行補正中に画像読取部の読み取りを中断しなければならず、斜行補正の処理時間を短縮することができないことがあった。   In this image reading apparatus, in order to shorten the skew correction processing time, skew correction is started during reading of the image reading unit, and the control unit sets the initial capacity of the input area at the start of skew correction. . When the required capacity is set by the setting process during the skew correction, it seems that the initial capacity may be set to the same capacity as the required capacity. However, at the start of skew correction, the processing speed of the control unit may decrease, for example, when initial setting must be performed when reading of a read image is started. As a result, an event may occur in which the capacity of the read image read by the image reading unit exceeds the required capacity. In this case, reading of the image reading unit must be interrupted during skew correction, and skew correction is performed. In some cases, the processing time could not be shortened.

この画像読取装置では、必要容量に加えて、制御部の算出速度、及び、画像読取部の読取速度から設定される補助容量を加えておく。そのため、斜行補正の開始時において、斜行補正中に画像読取部の読み取りを中断しなければならない事象の発生を抑制することができ、斜行補正の処理時間を短縮することができる。また、補助容量は、斜行補正において解放されることから、補助容量を用いて初期容量を設定しても、記憶部の容量が増大してしまうのを抑制することができる。   In this image reading apparatus, in addition to the required capacity, an auxiliary capacity set based on the calculation speed of the control section and the reading speed of the image reading section is added. Therefore, at the start of skew correction, the occurrence of an event that requires reading of the image reading unit during skew correction can be suppressed, and the skew correction processing time can be shortened. Further, since the auxiliary capacity is released in the skew correction, even if the initial capacity is set using the auxiliary capacity, it is possible to suppress an increase in the capacity of the storage unit.

本明細書によって開示される画像読取装置では、斜行補正に用いる記憶部の容量を抑制することができる。   In the image reading device disclosed in this specification, the capacity of the storage unit used for skew correction can be suppressed.

画像読取装置の構成を示すブロック図Block diagram showing the configuration of the image reading apparatus 斜行補正部の構成を示すブロック図Block diagram showing the configuration of the skew correction unit 補正後座標系、補正前画像および補正後画像の関係を示す説明図Explanatory drawing which shows the relationship between the coordinate system after correction, the image before correction, and the image after correction 読取制御処理を示すフローチャートFlow chart showing reading control processing 読取画像における補正前画像を示す説明図Explanatory drawing which shows the image before correction | amendment in a read image 実施形態1における管理処理を示すフローチャートThe flowchart which shows the management processing in Embodiment 1. 実施形態1における入力用バッファにおける補正前画像、出力用バッファにおける補正後画像、及び、斜光補正の実行状態の関係を示す説明図Explanatory drawing which shows the relationship between the image before correction | amendment in the buffer for input in Embodiment 1, the image after correction | amendment in the buffer for output, and the execution state of oblique light correction | amendment 実施形態1における入力用バッファにおける補正前画像、出力用バッファにおける補正後画像、及び、斜光補正の実行状態の関係を示す説明図Explanatory drawing which shows the relationship between the image before correction | amendment in the buffer for input in Embodiment 1, the image after correction | amendment in the buffer for output, and the execution state of oblique light correction | amendment 実施形態2における管理処理を示すフローチャートThe flowchart which shows the management processing in Embodiment 2. 実施形態2における入力用バッファにおける補正前画像、出力用バッファにおける補正後画像、及び、斜光補正の実行状態の関係を示す説明図Explanatory drawing which shows the relationship between the image before correction | amendment in the buffer for input in Embodiment 2, the image after correction | amendment in the buffer for output, and the execution state of oblique light correction | amendment 実施形態2における入力用バッファにおける補正前画像、出力用バッファにおける補正後画像、及び、斜光補正の実行状態の関係を示す説明図Explanatory drawing which shows the relationship between the image before correction | amendment in the buffer for input in Embodiment 2, the image after correction | amendment in the buffer for output, and the execution state of oblique light correction | amendment

<実施形態1>
実施形態1を、図1から図8を用いて説明する。
<Embodiment 1>
The first embodiment will be described with reference to FIGS.

1.画像読取装置の構成
画像読取装置1は、図示しない原稿を読み取り、取得された読取画像に含まれる原稿画像を、基準方向に沿った原稿画像に補正する斜行補正を行う機能を有する。以下、斜行補正を行う前の原稿画像を、補正前画像Giと称し、斜行補正を行った後の原稿画像を、補正後画像Goと称す。補正前画像Giは、読取画像の一例であり、補正後画像Goは、出力画像の一例である。なお、基準方向は、任意の方向を設定することができ、例えば原稿シートの読取方向である主走査方向に設定することができる。
1. Configuration of Image Reading Apparatus The image reading apparatus 1 has a function of performing skew correction for reading a document (not shown) and correcting a document image included in the acquired scanned image into a document image along a reference direction. Hereinafter, a document image before skew correction is referred to as an uncorrected image Gi, and a document image after skew correction is referred to as a corrected image Go. The pre-correction image Gi is an example of a read image, and the post-correction image Go is an example of an output image. Note that an arbitrary direction can be set as the reference direction, and can be set, for example, in the main scanning direction which is the reading direction of the document sheet.

図1に示すように、画像読取装置1は、画像読取装置1の各部を制御するASIC(特定用途向け集積回路)2、及び、ASIC2の外部に設けられたROM3、DRAM4、搬送部6、駆動回路7、読取部8、デバイス制御部9、アナログフロントエンド(以下、AFE)10等を含む。DRAM4は、記憶部の一例であり、読取部8は、画像読取部の一例である。また、図1に点線5で示すように、ASIC2と、ROM3と、DRAM4とを含めたものが、制御部の一例である。   As shown in FIG. 1, the image reading apparatus 1 includes an ASIC (application-specific integrated circuit) 2 that controls each unit of the image reading apparatus 1, and a ROM 3, a DRAM 4, a conveyance unit 6, and a drive provided outside the ASIC 2. A circuit 7, a reading unit 8, a device control unit 9, an analog front end (hereinafter referred to as AFE) 10, and the like are included. The DRAM 4 is an example of a storage unit, and the reading unit 8 is an example of an image reading unit. Further, as indicated by a dotted line 5 in FIG. 1, the one including the ASIC 2, the ROM 3, and the DRAM 4 is an example of the control unit.

ASIC2は、中央処理装置(以下、CPU)13を含む他、読取補正回路14、斜行補正回路15等の専用のハード回路を含む。ROM3には、画像読取装置1の動作を制御するための各種の制御プログラムが記憶されており、CPU13は、ROM3から読み出したプログラムに従って各部の制御を行うとともに、ハード回路を用いて後述する画像読取処理等の処理を実行する。   The ASIC 2 includes a central processing unit (hereinafter referred to as CPU) 13 and also includes dedicated hardware circuits such as a reading correction circuit 14 and a skew feeding correction circuit 15. The ROM 3 stores various control programs for controlling the operation of the image reading apparatus 1. The CPU 13 controls each unit in accordance with the program read from the ROM 3, and uses image data reading to be described later using a hardware circuit. Processing such as processing is executed.

駆動回路7は、搬送部6に接続されており、CPU13からの命令に基づいて図示しないモータを駆動する。搬送部6は、図示しないローラを含み、上記モータにより当該ローラが回転駆動されると、原稿を搬送する。   The drive circuit 7 is connected to the transport unit 6 and drives a motor (not shown) based on a command from the CPU 13. The conveyance unit 6 includes a roller (not shown), and conveys a document when the roller is rotationally driven by the motor.

デバイス制御部9は、読取部8に接続されており、CPU13からの命令に基づいて読取制御信号を読取部8に送信する。読取部8は、デバイス制御部9からの読取制御信号に基づいて、搬送部6により搬送される原稿を読み取る。   The device control unit 9 is connected to the reading unit 8 and transmits a reading control signal to the reading unit 8 based on a command from the CPU 13. The reading unit 8 reads a document conveyed by the conveyance unit 6 based on a reading control signal from the device control unit 9.

読取部8には、図示されない複数の受光素子が一列に配置されており、読取部8は、1回の読み取りで、当該受光素子に沿った主走査方向に1ライン読み取り、ライン読取画像LB(図5参照)を取得する。読取部8は、原稿を読み取る際に、搬送部6により主走査方向と直交する方向に搬送される原稿を、複数回に亘って繰り返し読み取り、主走査方向と直交する副走査方向に複数のライン読取画像LBが集まって構成される読取画像B(図5参照)を取得する。   A plurality of light receiving elements (not shown) are arranged in a row in the reading unit 8. The reading unit 8 reads one line in the main scanning direction along the light receiving elements by one reading, and reads a line read image LB ( (See FIG. 5). When reading the document, the reading unit 8 repeatedly reads the document conveyed in the direction orthogonal to the main scanning direction by the conveying unit 6 a plurality of times, and reads a plurality of lines in the sub-scanning direction orthogonal to the main scanning direction. A read image B (see FIG. 5) configured by collecting the read images LB is acquired.

AFE10は、読取部8に接続されており、読取部8が取得した読取画像BをAD変換し、ASIC2に送信する。読取補正回路14は、AD変換された読取画像Bに対して、各ライン読取画像LB毎にシェーディング補正を実行し、シェーディング補正した読取画像BをDRAM4に記憶する。読取補正回路14は、各ライン読取画像LBをDRAM4に記憶する毎に、CPU13に対して割り込み信号を送信する。   The AFE 10 is connected to the reading unit 8, performs AD conversion on the read image B acquired by the reading unit 8, and transmits it to the ASIC 2. The reading correction circuit 14 performs shading correction for each line read image LB on the AD-converted read image B, and stores the read image B subjected to the shading correction in the DRAM 4. The read correction circuit 14 transmits an interrupt signal to the CPU 13 every time each line read image LB is stored in the DRAM 4.

図2に示すように、DRAM4には、上記補正前画像Giを含む読取画像Bが記憶される入力用ラインバッファ4Aと、上記補正後画像Goが記憶される出力用ラインバッファ4Bとが確保されている。読取補正回路14は、シェーディング補正した読取画像Bを、入力用ラインバッファ4Aに記憶する。斜行補正回路15は、入力用ラインバッファ4Aに記憶された読取画像Bに対して斜行補正を行い、補正後画像Goを出力用ラインバッファ4Bに記憶する。入力用ラインバッファ4Aは、入力領域の一例であり、出力用ラインバッファ4Bは、出力領域の一例である。   As shown in FIG. 2, the DRAM 4 has an input line buffer 4A for storing the read image B including the uncorrected image Gi and an output line buffer 4B for storing the corrected image Go. ing. The read correction circuit 14 stores the read image B subjected to the shading correction in the input line buffer 4A. The skew correction circuit 15 performs skew correction on the read image B stored in the input line buffer 4A, and stores the corrected image Go in the output line buffer 4B. The input line buffer 4A is an example of an input area, and the output line buffer 4B is an example of an output area.

また、画像読取装置1には、この他に、LEDや液晶ディスプレイからなり画像読取装置1の状況を表示する表示部11や、各種設定ボタンからなり、使用者からの各種命令を受け付ける操作部12が設けられている。   In addition to this, the image reading apparatus 1 includes a display unit 11 that includes an LED and a liquid crystal display and displays the status of the image reading apparatus 1 and various setting buttons, and an operation unit 12 that receives various commands from a user. Is provided.

2.斜行補正回路の構成
次に、斜行補正回路15の構成について説明する。図2に示すように、斜行補正回路15は、ステートマシン21、演算処理部22、リードDMA処理部25、及び、ライトDMA処理部26を含む。
2. Configuration of Skew Correction Circuit Next, the configuration of the skew correction circuit 15 will be described. As shown in FIG. 2, the skew feeding correction circuit 15 includes a state machine 21, an arithmetic processing unit 22, a read DMA processing unit 25, and a write DMA processing unit 26.

ステートマシン21は、図3の左図に示すように、補正後画像Goの各画素を配置すべき補正後座標系の補正後座標(Xo,Yo)を指定する。ステートマシン21は、図3に矢印Z1に示すように、補正後画像Goに含まれる各画素の補正後座標を、X座標が増加する方向に順々に指定する1ラインの指定を実行する。ステートマシン21は、更に、図3に矢印Z2に示すように、Y座標が増加する方向に1ラインの指定を繰り返し、補正後画像Goに含まれる各画素の補正後座標を順々に指定する。ステートマシン21は、指定された補正後座標を演算処理部22に送信する。ステートマシン21は、補正後画像Goに含まれる各画素の補正後座標の指定が終了すると、CPU13に対して割り込み信号を送信する。   As shown in the left diagram of FIG. 3, the state machine 21 designates corrected coordinates (Xo, Yo) of the corrected coordinate system in which each pixel of the corrected image Go is to be arranged. As indicated by an arrow Z1 in FIG. 3, the state machine 21 designates one line for sequentially designating the corrected coordinates of each pixel included in the corrected image Go in the direction in which the X coordinate increases. Further, the state machine 21 repeatedly designates one line in the direction in which the Y coordinate increases as indicated by an arrow Z2 in FIG. 3, and sequentially designates the corrected coordinates of each pixel included in the corrected image Go. . The state machine 21 transmits the specified corrected coordinates to the arithmetic processing unit 22. When the state machine 21 finishes specifying the corrected coordinates of each pixel included in the corrected image Go, the state machine 21 transmits an interrupt signal to the CPU 13.

演算処理部22は、ステートマシン21から補正後座標を受け取ると、主走査方向に対する補正前画像Giの傾き角度θを用いて、当該補正後座標に対応する補正前座標(Xi,Yi)を演算する。演算の方法については、後述して詳細に説明する。演算処理部22は、補正前座標を演算すると、補正後座標と補正前座標とを関連付けてリードDMA処理部25に送信する。   Upon receiving the corrected coordinates from the state machine 21, the arithmetic processing unit 22 calculates the uncorrected coordinates (Xi, Yi) corresponding to the corrected coordinates using the inclination angle θ of the uncorrected image Gi with respect to the main scanning direction. To do. The calculation method will be described in detail later. When the pre-correction coordinates are calculated, the arithmetic processing unit 22 associates the post-correction coordinates and the pre-correction coordinates and transmits them to the read DMA processing unit 25.

リードDMA処理部25は、演算処理部22から補正後座標と補正前座標とを受け取ると、DRAM4の入力用ラインバッファ4Aに補正前座標を送信する。そして、図3の中図に示すように、当該入力用ラインバッファ4Aから補正前画像Giの補正前座標における画素データを読み出す(矢印Z3参照)。リードDMA処理部25は、読み出した画素データを、補正後座標に関連付けてライトDMA処理部26に送信する。   When the read DMA processing unit 25 receives the corrected coordinates and the uncorrected coordinates from the arithmetic processing unit 22, the read DMA processing unit 25 transmits the uncorrected coordinates to the input line buffer 4 </ b> A of the DRAM 4. Then, as shown in the middle diagram of FIG. 3, pixel data at coordinates before correction of the image Gi before correction is read out from the input line buffer 4A (see arrow Z3). The read DMA processing unit 25 transmits the read pixel data to the write DMA processing unit 26 in association with the corrected coordinates.

ライトDMA処理部26は、リードDMA処理部25から画素データを受け取ると、図3の右図に示すように、その画素データを、当該画素データに関連付けて送信された補正後座標の画素データとして、DRAM4の出力用ラインバッファ4Bに記憶する(矢印Z4参照)。出力用ラインバッファ4Bには、ステートマシン21が補正後画像Goに含まれる各画素の補正後座標を指定することで、各補正後座標における画素データが記憶され、この結果、出力用ラインバッファ4Bに補正後画像Goが記憶される。   When the write DMA processing unit 26 receives the pixel data from the read DMA processing unit 25, as shown in the right diagram of FIG. 3, the write DMA processing unit 26 uses the pixel data as pixel data of corrected coordinates transmitted in association with the pixel data. And stored in the output line buffer 4B of the DRAM 4 (see arrow Z4). The output line buffer 4B stores the pixel data at each corrected coordinate by the state machine 21 designating the corrected coordinate of each pixel included in the corrected image Go, and as a result, the output line buffer 4B. Is stored the corrected image Go.

上述したように、斜行補正回路15では、補正前画像Giにおいて補正前座標に関連付けられて記憶されていた画素データが、補正後画像Goにおいて補正後座標に関連付けられることで、補正前画像Giが補正後画像Goへと変換される。この際、斜行補正回路15において、補正前座標が、主走査方向に対する補正前画像Giの傾き角度θを用いて演算されるので、主走査方向に対する補正前画像Giの傾きが抑制されるように変換され、この結果、補正前画像Giが補正後画像Goへと斜行補正される。   As described above, in the skew correction circuit 15, the pixel data stored in association with the pre-correction coordinates in the pre-correction image Gi is associated with the post-correction coordinates in the post-correction image Go. Is converted into a corrected image Go. At this time, the skew correction circuit 15 calculates the pre-correction coordinates using the inclination angle θ of the pre-correction image Gi with respect to the main scanning direction, so that the inclination of the pre-correction image Gi with respect to the main scanning direction is suppressed. As a result, the pre-correction image Gi is skew-corrected to the post-correction image Go.

また、演算処理部22は、サイズ管理部23を有しており、DRAM4の入力用ラインバッファ4A及び出力用ラインバッファ4Bの容量を管理するための管理処理を実行する。管理処理は、補正前画像Giから補正後画像Goへの斜行補正において実行され、その詳細については、後述して詳細に説明する。   The arithmetic processing unit 22 includes a size management unit 23 and executes management processing for managing the capacities of the input line buffer 4A and the output line buffer 4B of the DRAM 4. The management process is executed in the skew correction from the pre-correction image Gi to the post-correction image Go, and details thereof will be described later.

3.画像読取処理
次に、図4から図8を参照して、画像読取処理について説明する。画像読取処理には、取得された読取画像Bに含まれる補正前画像Giを補正後画像Goに斜行補正する処理が含まれる。画像読取処理は、斜行補正の一例である。CPU13は、操作部12を介して使用者から原稿の読取指示が入力されると、画像読取処理を実行する。
3. Image Reading Process Next, the image reading process will be described with reference to FIGS. The image reading process includes a process of correcting the skew correction of the uncorrected image Gi included in the acquired read image B to the corrected image Go. The image reading process is an example of skew correction. When an instruction to read a document is input from the user via the operation unit 12, the CPU 13 executes an image reading process.

図4に示すように、CPU13は、まず、搬送部6に対して原稿の搬送を指示し、原稿の搬送を開始させる(S2)。続いて、CPU13は、読取部8に対して原稿の読み取りを指示する(S4)。これにより、読取部8は、原稿を含む所定の読取範囲に対して、主走査方向への1ライン読み取りを開始する。   As shown in FIG. 4, the CPU 13 first instructs the transport unit 6 to transport a document, and starts transporting the document (S2). Subsequently, the CPU 13 instructs the reading unit 8 to read a document (S4). Accordingly, the reading unit 8 starts reading one line in the main scanning direction with respect to a predetermined reading range including the original.

CPU13は、DRAM4の入力用ラインバッファ4Aに記憶されたライン読取画像LBの数を示すライン数Nを初期化し(S6)、読取補正回路14から割り込み信号が送信されるのを待機する。そして、DRAM4の入力用ラインバッファ4Aにライン読取画像LBが記憶され、読取補正回路14から割り込み信号が受信されると(S8)、CPU13は、ライン数Nを1増加させ(S10)、当該ライン数NをROM3に記憶された初期格納ライン数SNと比較する(S12)。   The CPU 13 initializes the line number N indicating the number of line read images LB stored in the input line buffer 4A of the DRAM 4 (S6), and waits for an interrupt signal to be transmitted from the read correction circuit 14. When the line read image LB is stored in the input line buffer 4A of the DRAM 4 and an interrupt signal is received from the read correction circuit 14 (S8), the CPU 13 increases the number N of lines by 1 (S10), The number N is compared with the initial storage line number SN stored in the ROM 3 (S12).

ここで、初期格納ライン数SNとは、主走査方向に対する補正前画像Giの傾き角度θを検出するのに必要なライン読取画像LBの数を意味し、具体的には、図5に示すように、補正前画像Giの外周の4辺の線画像L1〜L4のうち、線画像L3の全域が含まれるのに必要なライン読取画像LBの数を意味する。   Here, the initial storage line number SN means the number of line read images LB necessary to detect the inclination angle θ of the pre-correction image Gi with respect to the main scanning direction, and specifically, as shown in FIG. In addition, it means the number of line read images LB necessary to include the entire area of the line image L3 among the line images L1 to L4 of the four sides on the outer periphery of the pre-correction image Gi.

読取部8には、画像を読取可能な原稿の最大サイズが予め設定されており、当該最大サイズの原稿が主走査方向に対して傾いた場合でも、搬送部6を用いて搬送可能な最大傾き角度θmaxが予め設定されている。初期格納ライン数SNは、最大サイズの原稿が最大傾き角度θmax傾いた場合に、少なくとも1つの線画像Lの全域が含まれるのに必要なライン読取画像LBの数を意味する。   The reading unit 8 is preset with a maximum size of a document that can read an image. Even when the maximum size document is tilted with respect to the main scanning direction, the maximum tilt that can be transported using the transport unit 6. The angle θmax is set in advance. The initial storage line number SN means the number of line read images LB necessary to include the entire area of at least one line image L when the maximum-size document is inclined at the maximum inclination angle θmax.

CPU13は、ライン数Nが初期格納ライン数SNよりも小さい場合(S12:YES)、入力用ラインバッファ4Aに記憶された読取画像Bからでは、傾き角度θを検出することができない虞があることから、S8からの処理を繰り返す。一方、ライン数Nが初期格納ライン数SN以上である場合(S12:NO)、CPU13は、入力用ラインバッファ4Aに記憶された読取画像Bから、主走査方向に対する補正前画像Giの傾き角度θを検出する傾き検出処理を実行する(S14)。   When the line number N is smaller than the initial storage line number SN (S12: YES), the CPU 13 may not be able to detect the inclination angle θ from the read image B stored in the input line buffer 4A. To repeat the process from S8. On the other hand, when the line number N is equal to or larger than the initial storage line number SN (S12: NO), the CPU 13 determines the inclination angle θ of the pre-correction image Gi with respect to the main scanning direction from the read image B stored in the input line buffer 4A. An inclination detection process for detecting is performed (S14).

図5には、補正前画像Giを含んだ読取画像Bの全域の画像が示されており、CPU13が傾き検出処理を実行する際、入力用ラインバッファ4Aには、境界線LLよりも下側に記載された初期格納ライン数SNのライン読取画像LBが記憶されている。つまり、入力用ラインバッファ4Aには、補正前画像Giの外周の4辺の線画像L1〜L4のうち、線画像L3の全域を含む読取画像Bが記憶されている。なお、読取画像Bでは、補正前画像Giが、主走査方向に対して傾き角度θだけ傾いている。また、読取画像Bでは、補正前画像Giの左下の角P1が、補正前座標系(Xi,Yi)の原点(0,0)からX方向にxpmだけ、Y方向にypmだけずれた位置にある。   FIG. 5 shows the entire image of the read image B including the pre-correction image Gi. When the CPU 13 executes the tilt detection process, the input line buffer 4A has a lower side than the boundary line LL. The line read image LB having the initial storage line number SN described in the above is stored. That is, the input line buffer 4A stores the read image B including the entire area of the line image L3 among the line images L1 to L4 on the four sides on the outer periphery of the pre-correction image Gi. In the read image B, the pre-correction image Gi is tilted by the tilt angle θ with respect to the main scanning direction. In the read image B, the lower left corner P1 of the pre-correction image Gi is shifted from the origin (0, 0) of the pre-correction coordinate system (Xi, Yi) by xpm in the X direction and ypm in the Y direction. is there.

CPU13は、傾き検出処理を実行する際に、種々の公知技術により、入力用ラインバッファ4Aに記憶された読取画像Bから線画像L3を抽出し、その抽出結果から、補正前画像Giのxpm、ypm、傾き角度θ、及び、原稿サイズを求める。具体的には、CPU13は、抽出した線画像L3の右端の座標から、xpm及びypmを検出する。また、抽出した線画像L3に沿った方向と主走査方向との角度を、傾き角度θとして検出する。   When executing the tilt detection process, the CPU 13 extracts the line image L3 from the read image B stored in the input line buffer 4A by various known techniques, and from the extraction result, xpm, The ypm, the tilt angle θ, and the document size are obtained. Specifically, the CPU 13 detects xpm and ypm from the coordinates of the right end of the extracted line image L3. Further, an angle between the direction along the extracted line image L3 and the main scanning direction is detected as an inclination angle θ.

更に、抽出した線画像L3の長さXmaxを検出し、ROM3に記憶されたA4、B5などの規格化された原稿サイズと比較する。CPU13は、長さXmaxと当該規格化された原稿サイズとの比較結果から、線画像L4の長さYmaxを推定し、原稿サイズを推定する。   Further, the length Xmax of the extracted line image L3 is detected and compared with standardized document sizes such as A4 and B5 stored in the ROM 3. The CPU 13 estimates the length Ymax of the line image L4 from the comparison result between the length Xmax and the standardized document size, and estimates the document size.

次に、CPU13は、求められた傾き角度θ及び原稿サイズから、線画像L3の全域が記憶されるのに必要なライン読取画像LBの数である最小限格納ライン数MNを設定する設定処理を実行する(S16)。つまり、最小限格納ライン数MNとは、線画像L3に相当する原稿の外周辺側の端部領域を読み取った端部画像RB(図5斜線部参照)が記憶されるのに必要なライン読取画像LBの数である。詳細には、線画像L3の長さXmaxの傾き角度θにおける正弦値と、ライン読取画像LBの副走査方向の幅との比に基づいて設定する。そのため、最小限格納ライン数MNは、通常、初期格納ライン数SNよりも小さい値となる。最小限格納ライン数MNは、必要容量の一例である。   Next, the CPU 13 performs setting processing for setting a minimum storage line number MN, which is the number of line read images LB necessary for storing the entire area of the line image L3, from the obtained inclination angle θ and document size. Execute (S16). That is, the minimum storage line number MN is the line reading necessary for storing the end image RB (see the hatched portion in FIG. 5) obtained by reading the end region on the outer peripheral side of the document corresponding to the line image L3. It is the number of images LB. Specifically, it is set based on the ratio between the sine value at the inclination angle θ of the length Xmax of the line image L3 and the width of the line read image LB in the sub-scanning direction. For this reason, the minimum storage line number MN is usually smaller than the initial storage line number SN. The minimum storage line number MN is an example of the required capacity.

また、CPU13は、求められた原稿サイズから、補正後画像Goの全域が記憶されるのに必要なライン読取画像LBの数である全域格納ライン数ANを設定する(S18)。具体的には、線画像L4の長さYmaxとライン読取画像LBの副走査方向の幅との比に基づいて全域格納ライン数ANを設定する。全域格納ライン数ANは、1枚分の原稿を読み取った読取画像Bを記憶可能な容量の一例である。   Further, the CPU 13 sets the total area storage line number AN which is the number of line read images LB necessary for storing the entire area of the corrected image Go from the obtained document size (S18). Specifically, the total area storage line number AN is set based on the ratio between the length Ymax of the line image L4 and the width of the line read image LB in the sub-scanning direction. The total area storage line number AN is an example of a capacity capable of storing a read image B obtained by reading one original.

CPU13は、上記の値が設定されると、傾き検出処理により求められた傾き角度θ、xpm、ypm、原稿サイズ(Xmax、Ymax)、及び、最小限格納ライン数MN、全域格納ライン数ANを斜行補正回路15に送信し、斜行補正回路15に対して斜行補正を指示する(S20)。   When the above values are set, the CPU 13 determines the inclination angles θ, xpm, ypm, document size (Xmax, Ymax) obtained by the inclination detection process, the minimum number of storage lines MN, and the total area storage line number AN. This is transmitted to the skew correction circuit 15, and the skew correction circuit 15 is instructed to perform skew correction (S20).

CPU13は、斜行補正を指示した後、図示しない各種センサを用いて読取部8により読み取られる原稿の有無を検出する(S22:NO)。CPU13は、読取部8により読み取られる原稿が無くなると(S22:YES)、読取部8に対して原稿の読取停止を指示する(S24)とともに、搬送部6に対して原稿の搬送停止を指示する(S26)。そして、CPU13は、斜行補正回路15から割り込み信号が送信されるのを待機し(S28:NO)、斜行補正回路15から割り込み信号を受信すると(S28:YES)、画像読取処理を終了する。   After instructing skew correction, the CPU 13 detects the presence or absence of a document read by the reading unit 8 using various sensors (not shown) (S22: NO). When there is no more document to be read by the reading unit 8 (S22: YES), the CPU 13 instructs the reading unit 8 to stop reading the document (S24) and instructs the conveyance unit 6 to stop conveying the document. (S26). Then, the CPU 13 waits for an interrupt signal to be transmitted from the skew feeding correction circuit 15 (S28: NO), and upon receiving the interrupt signal from the skew feeding correction circuit 15 (S28: YES), the image reading process ends. .

(管理処理)
斜行補正回路15は、CPU13からの指示に従って斜行補正を実行し、斜行補正回路15に含まれる各部が上記の各処理を実行する。斜行補正は、CPU13の画像読取処理中に実行され、更には、読取部8による原稿の読み取り中に実行される。そして、斜行補正回路15に含まれる演算処理部22は、斜行補正において管理処理を実行する。
(Management process)
The skew correction circuit 15 executes skew correction in accordance with an instruction from the CPU 13, and each unit included in the skew correction circuit 15 performs the above-described processes. The skew correction is executed during the image reading process of the CPU 13 and further executed while the original is being read by the reading unit 8. The arithmetic processing unit 22 included in the skew correction circuit 15 executes management processing in the skew correction.

図6に示すように、演算処理部22は、CPU13から斜行補正の指示が入力されるのを待機する(S32:NO)。CPU13は、入力用ラインバッファ4Aに初期格納ライン数SNのライン読取画像LBが記憶されるまでは、傾き角度θ、原稿サイズ等の値を求めず、演算処理部22に対して斜行補正の指示を送信しない。この間、図7の左図に示すように、斜行補正回路15は、斜行補正を行っていないオフ状態であり、出力用ラインバッファ4Bには、補正後画像Goが記憶されない。図7、8において、斜線を付した入力用ラインバッファ4A及び出力用ラインバッファ4Bの領域は、画像が記憶されていない領域を示すものとする。   As shown in FIG. 6, the arithmetic processing unit 22 waits for an instruction for skew correction to be input from the CPU 13 (S32: NO). The CPU 13 does not obtain values such as the inclination angle θ and the document size and stores the skew correction to the arithmetic processing unit 22 until the line read image LB having the initial storage line number SN is stored in the input line buffer 4A. Do not send instructions. During this time, as shown in the left diagram of FIG. 7, the skew correction circuit 15 is in an off state in which the skew correction is not performed, and the corrected image Go is not stored in the output line buffer 4B. 7 and 8, the hatched areas of the input line buffer 4A and the output line buffer 4B indicate areas in which no image is stored.

図7の中図に示すように、入力用ラインバッファ4Aに最小限格納ライン数MNのライン読取画像LBが記憶されると、補正前画像Giのうち、線画像L3の全域が入力用ラインバッファ4Aに記憶される。しかし、最小限格納ライン数MNは、初期格納ライン数SNよりも小さい値であるため、この場合でも、斜行補正回路15はオフ状態に維持され、出力用ラインバッファ4Bには補正後画像Goが記憶されない。   As shown in the middle diagram of FIG. 7, when the line read image LB with the minimum storage line number MN is stored in the input line buffer 4A, the entire line image L3 of the pre-correction image Gi is the input line buffer. Stored in 4A. However, since the minimum storage line number MN is a value smaller than the initial storage line number SN, the skew feeding correction circuit 15 is maintained in the off state even in this case, and the corrected image Go is stored in the output line buffer 4B. Is not remembered.

そして、図7の右図に示すように、入力用ラインバッファ4Aに初期格納ライン数SNのライン読取画像LBが記憶されると、CPU13は、演算処理部22に対して斜行補正の指示を送信し、演算処理部22に最小限格納ライン数MN、全域格納ライン数AN等の値を送信する。これにより、斜行補正回路15は、斜行補正を行っているオン状態に切り替わる。演算処理部22は、CPU13からこれらの値が入力されると(S32:YES)、入力用ラインバッファ4Aに記憶可能なライン読取画像LBの数を示す入力用格納ライン数NNの初期値、及び、出力用ラインバッファ4Bに記憶可能なライン読取画像LBの数を示す出力用格納ライン数TNの初期値を設定する初期設定処理を実行する(S34)。   7, when the line read image LB having the initial storage line number SN is stored in the input line buffer 4A, the CPU 13 instructs the arithmetic processing unit 22 to perform skew feeding correction. Then, values such as the minimum number of storage lines MN and the total number of storage lines AN are transmitted to the arithmetic processing unit 22. As a result, the skew feeding correction circuit 15 is switched to an on state in which skew feeding correction is performed. When these values are input from the CPU 13 (S32: YES), the arithmetic processing unit 22 receives the initial value of the input storage line number NN indicating the number of line read images LB that can be stored in the input line buffer 4A, and Then, an initial setting process for setting an initial value of the output storage line number TN indicating the number of line read images LB that can be stored in the output line buffer 4B is executed (S34).

演算処理部22は、DRAM4の記憶領域のうち、既にライン読取画像LBが記憶されている領域を含めて、入力用格納ライン数NN分の記憶領域を確保し、当該記憶領域を入力用ラインバッファ4Aとして使用し、他の用途では使用しないように割り当てる。また、演算処理部22は、DRAM4の記憶領域のうち、出力用格納ライン数TN分の記憶領域を確保し、当該記憶領域を出力用ラインバッファ4Bとして使用し、他の用途では使用しないように割り当てる。   The arithmetic processing unit 22 secures a storage area for the number NN of input storage lines including the area where the line read image LB is already stored in the storage area of the DRAM 4, and stores the storage area in the input line buffer. Used as 4A and assigned not to be used for other purposes. Further, the arithmetic processing unit 22 secures a storage area for the number TN of output storage lines in the storage area of the DRAM 4, uses the storage area as the output line buffer 4B, and does not use it for other purposes. assign.

本実施形態では、出力用格納ライン数TNの初期値を1に設定するとともに、入力用格納ライン数NNの初期値と出力用格納ライン数TNの初期値の合計値が、最小限格納ライン数MNと全域格納ライン数ANとを加算したライン数となるように設定する。   In the present embodiment, the initial value of the output storage line number TN is set to 1, and the total value of the initial value of the input storage line number NN and the initial value of the output storage line number TN is the minimum number of storage lines. The number of lines is set by adding the MN and the total area storage line number AN.

次に、演算処理部22は、ステートマシン21から補正後座標が入力されるのを待機し(S36:NO)、補正後座標が入力されると(S36:YES)、補正前座標を演算する(S38)。具体的には、補正後座標を傾き角度θだけ回転させ、更に、X方向にxpmだけ、Y方向にypmだけずらして補正前座標を演算する。補正前座標(Xi,Yi)は、補正後座標(Xo,Yo)、傾き角度θ、xpm、ypmを用いて、以下のように表される。
Xi=cosθ*Xo−sinθ*Yo+xpm
Yi=sinθ*Xo+cosθ*Yo+ypm
Next, the arithmetic processing unit 22 waits for the corrected coordinates to be input from the state machine 21 (S36: NO), and when the corrected coordinates are input (S36: YES), calculates the uncorrected coordinates. (S38). Specifically, the post-correction coordinates are rotated by the tilt angle θ, and further, the pre-correction coordinates are calculated by shifting by xpm in the X direction and ypm in the Y direction. Pre-correction coordinates (Xi, Yi) are expressed as follows using post-correction coordinates (Xo, Yo) and inclination angles θ, xpm, and ypm.
Xi = cos θ * Xo−sin θ * Yo + xpm
Yi = sin θ * Xo + cos θ * Yo + ypm

演算処理部22は、補正前座標を演算すると、補正後座標と補正前座標とを関連付けてリードDMA処理部25に送信する(S40)。これにより、リードDMA処理部25及びライトDMA処理部は、入力用ラインバッファ4Aに記憶された補正前画像Giから、補正前座標における画素データを読み出し、補正後画像Goの補正後座標における画像データとして出力用ラインバッファ4Bに記憶する読出処理を実行する。   When calculating the pre-correction coordinates, the arithmetic processing unit 22 associates the post-correction coordinates and the pre-correction coordinates and transmits them to the read DMA processing unit 25 (S40). Thereby, the read DMA processing unit 25 and the write DMA processing unit read out the pixel data at the coordinates before correction from the image before correction Gi stored in the input line buffer 4A, and the image data at the coordinates after correction of the corrected image Go. Is read out and stored in the output line buffer 4B.

演算処理部22は、図3に矢印Z1に示すように、ステートマシン21の1ラインの指定に伴って1ラインの補正後画像Goが記憶されるまで(S42:NO)、S36からの処理を繰り返す。そして、図7の右下図に示すように、1ラインの補正後画像Goが記憶されると、入力用ラインバッファ4Aの一部の記憶領域を解放するか否かを判断する判断処理(S44、S46)を実行する。   As indicated by an arrow Z1 in FIG. 3, the arithmetic processing unit 22 performs the processing from S36 until the corrected image Go of one line is stored in accordance with the designation of one line of the state machine 21 (S42: NO). repeat. Then, as shown in the lower right diagram of FIG. 7, when one line of corrected image Go is stored, a determination process for determining whether or not to release a part of the storage area of the input line buffer 4A (S44, S46) is executed.

判断処理において、演算処理部22は、入力用格納ライン数NNと最小限格納ライン数MNとを比較し、入力用格納ライン数NNから1を引いたライン数が最小限格納ライン数MNよりも大きいか否かを確認する(S44)。演算処理部22は、入力用格納ライン数NNから1を引いたライン数が最小限格納ライン数MNよりも大きい場合(S44:YES)、更に、入力用ラインバッファ4Aに記憶される各ライン読取画像LB毎に、当該ライン読取画像LBが不要か否かを判断する(S46)。   In the determination process, the arithmetic processing unit 22 compares the input storage line number NN and the minimum storage line number MN, and the number of lines obtained by subtracting 1 from the input storage line number NN is smaller than the minimum storage line number MN. It is confirmed whether it is larger (S44). When the number of lines obtained by subtracting 1 from the input storage line number NN is larger than the minimum storage line number MN (S44: YES), the arithmetic processing unit 22 further reads each line read stored in the input line buffer 4A. For each image LB, it is determined whether or not the line read image LB is unnecessary (S46).

ライン読取画像LBの要不要の判断において、演算処理部22は、入力用ラインバッファ4Aに記憶される各ライン読取画像LB毎に、当該ライン読取画像LBに含まれる補正後画像Goの範囲を抽出する。そして、演算処理部22は、各ライン読取画像LBに抽出した範囲が存在する場合には、更に、抽出した範囲内の補正後画像Goの全てが読み出されたか否かを確認する。   In determining whether the line read image LB is necessary or not, the arithmetic processing unit 22 extracts the range of the corrected image Go included in the line read image LB for each line read image LB stored in the input line buffer 4A. To do. Then, when the extracted range exists in each line read image LB, the arithmetic processing unit 22 further confirms whether or not all the corrected images Go within the extracted range have been read.

演算処理部22は、各ライン読取画像LBにおいて、抽出した範囲内に読み出されていない補正後画像Goが含まれている場合には(S46:NO)、当該ライン読取画像LBが必要と判断し、S36からの処理を繰り返す。一方、抽出した範囲が存在しない場合、或いは、抽出した範囲内の補正後画像Goの全てが読み出された場合(S46:YES)、当該ライン読取画像LBは、以後の処理において読み出されることがないことから、当該ライン読取画像LBが不要と判断する。   The arithmetic processing unit 22 determines that the line read image LB is necessary when each line read image LB includes the corrected image Go that has not been read out within the extracted range (S46: NO). Then, the processing from S36 is repeated. On the other hand, when the extracted range does not exist or when all the corrected images Go within the extracted range are read (S46: YES), the line read image LB can be read in the subsequent processing. Therefore, it is determined that the line read image LB is unnecessary.

この場合、演算処理部22は、図7の右上図に黒色で示すように、不要と判断されたライン読取画像LBが記憶されていた記憶領域を入力用ラインバッファ4Aから解放するようにDRAMに指示する解放指示処理を実行する(S48)。   In this case, as shown in black in the upper right diagram of FIG. 7, the arithmetic processing unit 22 stores the storage area in which the line read image LB determined to be unnecessary is stored in the DRAM so as to release it from the input line buffer 4A. The instructing release instruction process is executed (S48).

更に、演算処理部22は、図7の右下図に中下図と比較して示すように、入力用ラインバッファ4Aから解放したDRAM4の記憶領域を、出力用ラインバッファ4Bとして割り当てるようにDRAMに指示する割当指示処理を実行する(S50)。これにより、入力用格納ライン数NNは1だけ減少し、出力用格納ライン数TNは1だけ増加する(S52)。演算処理部22は、割当指示処理を実行すると、S36からの処理を繰り返す。   Further, the arithmetic processing unit 22 instructs the DRAM to allocate the storage area of the DRAM 4 released from the input line buffer 4A as the output line buffer 4B, as shown in the lower right diagram of FIG. 7 in comparison with the middle lower diagram. The allocation instruction process is executed (S50). As a result, the input storage line number NN decreases by 1, and the output storage line number TN increases by 1 (S52). When executing the assignment instruction process, the arithmetic processing unit 22 repeats the processes from S36.

演算処理部22は、入力用格納ライン数NNから1を引いたライン数が最小限格納ライン数MNよりも大きい間(S44:YES)、S36からS52までの処理を繰り返し、読出処理と判断処理と解放指示処理と割当指示処理とを繰り返す。これにより、図8の左図に示すように、入力用ラインバッファ4Aから補正前画像Giが読み出されるのに従って、入力用ラインバッファ4Aが減少し、出力用ラインバッファ4Bに補正後画像Goが記憶されるのに従って、出力用ラインバッファ4Bが増加する。   The arithmetic processing unit 22 repeats the processes from S36 to S52 while the number of lines obtained by subtracting 1 from the input storage line number NN is larger than the minimum storage line number MN (S44: YES), and the read process and the determination process The release instruction process and the allocation instruction process are repeated. As a result, as shown in the left diagram of FIG. 8, as the uncorrected image Gi is read from the input line buffer 4A, the input line buffer 4A decreases, and the corrected image Go is stored in the output line buffer 4B. As a result, the output line buffer 4B increases.

そして、図9の中図に示すように、入力用格納ライン数NNから1を引いたライン数が最小限格納ライン数MN以下となると(S44:NO)、演算処理部22は、S36からS52の処理のうち、S36からS44までの処理を繰り返し、S46からS52までの処理を繰り返さない。演算処理部22は、入力用ラインバッファ4A及び出力用ラインバッファ4Bの記憶容量を変化させることなく、図9の中下図に斜線を付して示す出力用ラインバッファ4Bの画像が記憶されていない領域への補正後画像Goの記憶を繰り返す。   As shown in the middle diagram of FIG. 9, when the number of lines obtained by subtracting 1 from the number of input storage lines NN is equal to or less than the minimum number of storage lines MN (S44: NO), the arithmetic processing unit 22 performs S36 to S52. Of these processes, the processes from S36 to S44 are repeated, and the processes from S46 to S52 are not repeated. The arithmetic processing unit 22 does not change the storage capacity of the input line buffer 4A and the output line buffer 4B, and the image of the output line buffer 4B indicated by hatching in the middle and lower diagrams of FIG. 9 is not stored. The storage of the corrected image Go in the area is repeated.

そして、図9の右図に示すように、出力用ラインバッファ4Bへの補正後画像Goの記憶が終了し、斜行補正が完了すると、ステートマシン21からCPU13に割り込み信号が入力され、演算処理部22における管理処理を含む、斜行補正回路15の斜行補正を終了する。   Then, as shown in the right diagram of FIG. 9, when the storage of the corrected image Go in the output line buffer 4B is completed and the skew feeding correction is completed, an interrupt signal is input from the state machine 21 to the CPU 13, and the arithmetic processing is performed. The skew correction of the skew correction circuit 15 including the management process in the unit 22 ends.

4.本実施形態の効果
(1)本実施形態の画像読取装置1では、斜行補正中に、入力用ラインバッファ4Aに記憶されたライン読取画像LBの要不要を判断する。そして、不要と判断される、つまり、以後の処理において読み出されることがないと判断されるライン読取画像LBに対しては、当該ライン読取画像LBが記憶されていた記憶領域を入力用ラインバッファ4Aから解放するようにDRAM4に指示する。
4). Advantages of the present embodiment (1) The image reading apparatus 1 of the present embodiment determines whether or not the line read image LB stored in the input line buffer 4A is necessary during skew correction. For a line read image LB that is determined to be unnecessary, that is, that is not read in the subsequent processing, the storage area in which the line read image LB is stored is stored in the input line buffer 4A. The DRAM 4 is instructed to release the memory.

従来技術の画像読取装置では、斜行補正中に、入力用ラインバッファ4Aの記憶領域が解放されることが無かった。そのため、例えば、入力用格納ライン数NNの初期値が全域格納ライン数ANと略等しく設定されるなど、斜行補正の開始時において入力用ラインバッファ4Aの記憶領域として比較的大きい領域が確保される場合に問題が生じていた。すなわち、従来技術の画像読取装置では、上記の場合に、斜行補正を通して入力用ラインバッファ4A以外の用途に使用できるDRAM4の記憶容量が減少し、DRAM4の容量を増大させる必要がある問題が生じていた。   In the conventional image reading apparatus, the storage area of the input line buffer 4A is not released during the skew correction. Therefore, for example, a relatively large area is secured as the storage area of the input line buffer 4A at the start of skew correction, for example, the initial value of the input storage line number NN is set to be approximately equal to the total area storage line number AN. There was a problem. That is, in the above-described image reading apparatus, in the above-described case, the storage capacity of the DRAM 4 that can be used for applications other than the input line buffer 4A is reduced through skew correction, and the capacity of the DRAM 4 needs to be increased. It was.

これに対して、本実施形態の画像読取装置1では、斜行補正の開始時において入力用ラインバッファ4Aの記憶領域として比較的大きい領域が確保された場合でも、その後、入力用ラインバッファ4Aの一部の記憶領域が解放される。そのため、斜行補正の開始時に入力用ラインバッファ4A以外の用途に使用できるDRAM4の記憶容量が減少していても、その後、当該記憶容量を増大させることができ、DRAM4の容量が増大してしまうのを抑制することができる。   On the other hand, in the image reading apparatus 1 of the present embodiment, even when a relatively large area is secured as the storage area of the input line buffer 4A at the start of the skew correction, the input line buffer 4A is thereafter set. Some storage space is freed. Therefore, even if the storage capacity of the DRAM 4 that can be used for purposes other than the input line buffer 4A is reduced at the start of skew correction, the storage capacity can be increased thereafter, and the capacity of the DRAM 4 increases. Can be suppressed.

(2)本実施形態の画像読取装置1では、入力用ラインバッファ4Aから解放される記憶領域を、出力用ラインバッファ4Bとして割り当てる。DRAM4では、補正前画像Giから補正後画像Goへの斜行補正が進むにつれて、入力用ラインバッファ4Aとして必要とされる入力用格納ライン数NNが減少する一方、出力用ラインバッファ4Bに必要とされる出力用格納ライン数TNが増大する。この画像読取装置1では、出力用ラインバッファ4Bに必要とされる出力用格納ライン数TNの増大を、入力用ラインバッファ4Aに必要とされる入力用格納ライン数NNの減少により補う。つまり、斜行補正を通して入力用格納ライン数NNと出力用格納ライン数TNとの合計のライン数を一定とすることができる。従って、斜行補正の開始時などに、一時的に入力用ラインバッファ4Aと出力用ラインバッファ4B以外の用途に使用できるDRAM4の記憶容量が減少してしまうことが無く、DRAM4の容量が増大してしまうのを抑制することができる。 (2) In the image reading apparatus 1 of the present embodiment, the storage area released from the input line buffer 4A is allocated as the output line buffer 4B. In the DRAM 4, as the skew correction from the pre-correction image Gi to the post-correction image Go proceeds, the number of input storage lines NN required for the input line buffer 4A decreases, while that required for the output line buffer 4B. The number of output storage lines TN to be increased. In this image reading apparatus 1, the increase in the number of output storage lines TN required for the output line buffer 4B is compensated by the decrease in the number of input storage lines NN required for the input line buffer 4A. That is, the total number of lines of the input storage line number NN and the output storage line number TN can be made constant through the skew correction. Accordingly, the storage capacity of the DRAM 4 that can be temporarily used for purposes other than the input line buffer 4A and the output line buffer 4B is not reduced at the start of skew correction, and the capacity of the DRAM 4 is increased. Can be suppressed.

(3)本実施形態の画像読取装置1では、入力用ラインバッファ4Aの一部の記憶領域を解放するか否かを判断する際に、入力用格納ライン数NNと最小限格納ライン数MNとを比較する。入力用格納ライン数NNとして最小限格納ライン数MN以上のライン数が確保されていれば、入力用ラインバッファ4Aから1ラインの補正後画像Goに対応する補正前画像Giの画素データを読み出すことができ、入力用ラインバッファ4Aの記憶領域の不足により、斜行補正が途中で中断してしまうことを抑制することができる。 (3) In the image reading apparatus 1 of the present embodiment, when determining whether or not to release a part of the storage area of the input line buffer 4A, the input storage line number NN, the minimum storage line number MN, Compare If the number of lines equal to or greater than the minimum storage line number MN is secured as the input storage line number NN, the pixel data of the pre-correction image Gi corresponding to the post-correction image Go of one line is read from the input line buffer 4A. It is possible to prevent the skew correction from being interrupted halfway due to a shortage of the storage area of the input line buffer 4A.

(4)本実施形態の画像読取装置1では、入力用ラインバッファ4Aの一部の記憶領域を解放するか否かを判断する際に、入力用ラインバッファ4Aに記憶された各ライン読取画像LB毎に要不要を判断する。そして、不要と判断される場合には、各ライン読取画像LB毎に、当該各ライン読取画像LBが記憶されていた記憶領域を入力用ラインバッファ4Aから解放する。読取部8が読み取りを行うライン読取画像LB単位で解放を行うことで、入力用ラインバッファ4Aへの記憶と解放を、同じライン読取画像LB単位で行うことができる。 (4) In the image reading apparatus 1 of this embodiment, when determining whether or not to release a part of the storage area of the input line buffer 4A, each line read image LB stored in the input line buffer 4A is determined. Judgment is necessary for each time. If it is determined that the line read image LB is unnecessary, the storage area in which the line read image LB is stored is released from the input line buffer 4A. By performing release in units of line read images LB to be read by the reading unit 8, storage and release in the input line buffer 4A can be performed in units of the same line read image LB.

(5)本実施形態の画像読取装置1では、読取部8による原稿の読み取り中に斜行補正が実行される。この画像読取装置1では、入力用格納ライン数NNの初期値が全域格納ライン数ANと略等しく設定され、斜行補正の開始時において入力用ラインバッファ4Aの記憶領域として比較的大きい領域が確保される。そのため、斜行補正中に入力用ラインバッファ4Aの記憶領域が不足し、読取部8による原稿の読み取りが中断することで、斜行補正に必要な時間が長期化することを抑制することができる。 (5) In the image reading apparatus 1 of the present embodiment, skew correction is executed while the original is being read by the reading unit 8. In this image reading apparatus 1, the initial value of the input storage line number NN is set substantially equal to the total area storage line number AN, and a relatively large area is secured as a storage area of the input line buffer 4A at the start of skew correction. Is done. For this reason, the storage area of the input line buffer 4A is insufficient during skew correction, and the reading of the original by the reading unit 8 is interrupted, thereby preventing an increase in the time required for skew correction. .

<実施形態2>
実施形態2を、図9から図11を用いて説明する。本実施形態は、入力用格納ライン数NNの初期値を設定する方法が実施形態1と異なる(図9のS62参照)。また、入力用ラインバッファ4Aから解放されたDRAM4の記憶領域を、出力用ラインバッファ4Bとして割り当てない(図9でS52無し)点で実施形態1と異なる。以下の説明では、実施形態1と同一の内容については重複した記載を省略する。
<Embodiment 2>
The second embodiment will be described with reference to FIGS. 9 to 11. This embodiment is different from the first embodiment in the method of setting the initial value of the input storage line number NN (see S62 in FIG. 9). Further, the storage area of the DRAM 4 released from the input line buffer 4A is not allocated as the output line buffer 4B (no S52 in FIG. 9), which is different from the first embodiment. In the following description, the same description as that of the first embodiment will not be repeated.

1.管理処理
図9に示す管理処理において、演算処理部22は、CPU13から最小限格納ライン数MN、全域格納ライン数AN等の値が入力されると(S32:YES)、入力用格納ライン数NNの初期値、及び、出力用格納ライン数TNの初期値を設定する(S62)。
1. Management Process In the management process shown in FIG. 9, when the CPU 13 receives values such as the minimum storage line number MN and the total storage line number AN from the CPU 13 (S32: YES), the input storage line number NN. And the initial value of the output storage line number TN are set (S62).

本実施形態では、図10に示すように、出力用格納ライン数TNの初期値を、全域格納ライン数ANに設定する。また、入力用格納ライン数NNの初期値が、最小限格納ライン数MNと補助ライン数HNとを加算したライン数となるように設定する。ここで、補助ライン数HNとは、斜行補正回路15に含まれる各部の処理速度と、読取部8の読取速度から決定されるライン数であり、予め決定されてROM3に記憶されている。   In this embodiment, as shown in FIG. 10, the initial value of the output storage line number TN is set to the total storage line number AN. Further, the initial value of the input storage line number NN is set to be the number of lines obtained by adding the minimum storage line number MN and the auxiliary line number HN. Here, the auxiliary line number HN is the number of lines determined from the processing speed of each unit included in the skew correction circuit 15 and the reading speed of the reading unit 8, and is determined in advance and stored in the ROM 3.

斜行補正回路15に含まれる各部の処理速度が読取部8の読取速度よりも速い場合、入力用格納ライン数NNの初期値を最小限格納ライン数MNと等しく設定したとしても、斜行補正回路15における処理の遅れにより、ライン読取画像LBを記憶する記憶容量を入力用ラインバッファ4Aに確保することができず、読取部8の読み取りが停止する事態が生じ難い。そのため、補助ライン数HNは比較的小さい値に決定される。   When the processing speed of each unit included in the skew correction circuit 15 is faster than the reading speed of the reading unit 8, the skew correction is performed even if the initial value of the input storage line number NN is set equal to the minimum storage line number MN. Due to the processing delay in the circuit 15, the storage capacity for storing the line read image LB cannot be secured in the input line buffer 4 </ b> A, and it is difficult for the reading unit 8 to stop reading. Therefore, the auxiliary line number HN is determined to be a relatively small value.

一方、斜行補正回路15に含まれる各部の処理速度が読取部8の読取速度よりも遅い場合、入力用格納ライン数NNの初期値を最小限格納ライン数MNと等しく設定した場合、斜行補正回路15における処理の遅れにより、ライン読取画像LBを記憶する記憶容量を入力用ラインバッファ4Aに確保することができず、読取部8の読み取りが停止する事態が生じ易い。そのため、補助ライン数HNは比較的大きい値に決定される。   On the other hand, when the processing speed of each unit included in the skew feeding correction circuit 15 is slower than the reading speed of the reading unit 8, when the initial value of the input storage line number NN is set equal to the minimum storage line number MN, skewing is performed. Due to the processing delay in the correction circuit 15, the storage capacity for storing the line-read image LB cannot be secured in the input line buffer 4 </ b> A, and a situation in which reading by the reading unit 8 stops tends to occur. Therefore, the auxiliary line number HN is determined to be a relatively large value.

この結果、本実施形態では、入力用格納ライン数NNの初期値が、全域格納ライン数ANよりも小さい値に設定される。そのため、入力用ラインバッファ4Aでは、図11の中上図に示すように、管理処理における解放指示処理(S48)により入力用格納ライン数NNと最小限格納ライン数MNとが等しくなり、且つ、入力用ラインバッファ4Aに画像が記憶されていない領域が存在しない状態が実現される。   As a result, in this embodiment, the initial value of the input storage line number NN is set to a value smaller than the total area storage line number AN. Therefore, in the input line buffer 4A, as shown in the upper middle diagram of FIG. 11, the input storage line number NN and the minimum storage line number MN are equalized by the release instruction process (S48) in the management process, and A state in which there is no area in which no image is stored in the input line buffer 4A is realized.

この場合、演算処理部22は、図11の右上図に中上図と比較して示すように、新たに入力用ラインバッファ4Aに記憶されるライン読取画像LBを、入力用ラインバッファ4Aに記憶された最小限格納ライン数MNのライン読取画像LBのうち、最も早く記憶されたライン読取画像LBが記憶された記憶領域に上書きして記憶する。   In this case, the arithmetic processing unit 22 stores the line read image LB newly stored in the input line buffer 4A in the input line buffer 4A as shown in the upper right diagram of FIG. 11 in comparison with the middle upper diagram. Of the line read images LB having the minimum number of stored lines MN, the line read image LB stored earliest is overwritten and stored in the storage area.

つまり、演算処理部22は、入力用格納ライン数NNから1を引いたライン数が最小限格納ライン数MN以下となった場合(S44:NO)、それ以降の処理において、入力用ラインバッファ4Aを、最小限格納ライン数MNを有するリングバッファとして使用する。演算処理部22は、これ以降、出力用ラインバッファ4Bへの補正後画像Goの記憶が終了するまで、図11に矢印Z5、6に示すように、入力用ラインバッファ4Aをリングバッファとして使用し、出力用ラインバッファ4Bへの補正後画像Goの記憶が終了すると、管理処理を含む斜行補正回路15の斜行補正を終了する。   That is, when the number of lines obtained by subtracting 1 from the number of input storage lines NN is equal to or less than the minimum number of storage lines MN (S44: NO), the arithmetic processing unit 22 performs the input line buffer 4A in the subsequent processing. Is used as a ring buffer having a minimum number of storage lines MN. Thereafter, the arithmetic processing unit 22 uses the input line buffer 4A as a ring buffer as indicated by arrows Z5 and 6 in FIG. 11 until the storage of the corrected image Go in the output line buffer 4B is completed. When the storage of the corrected image Go in the output line buffer 4B is completed, the skew correction of the skew correction circuit 15 including the management process is ended.

2.本実施形態の効果
(1)本実施形態の画像読取装置1では、入力用格納ライン数NNの初期値を、最小限格納ライン数MNと補助ライン数HNとを加算したライン数に設定する。上述したように、斜行補正回路15では、読取部8の読取速度との関係において、ライン読取画像LBを記憶する記憶容量を入力用ラインバッファ4Aに確保することができず、読取部8の読み取りが停止する事態が生じることがある。
2. Advantages of the present embodiment (1) In the image reading apparatus 1 of the present embodiment, the initial value of the input storage line number NN is set to the number of lines obtained by adding the minimum storage line number MN and the auxiliary line number HN. As described above, in the skew feeding correction circuit 15, the storage capacity for storing the line read image LB cannot be secured in the input line buffer 4 </ b> A in relation to the reading speed of the reading unit 8. There may be situations where reading stops.

特に、斜行補正の開始時には、CPU13が最小限格納ライン数MNを算出し、演算処理部22が当該最小限格納ライン数MNを受け取って出力用格納ライン数TNの初期値を設定する等、斜行補正回路15における処理速度が低下する事態が生じやすい。   In particular, at the start of the skew correction, the CPU 13 calculates the minimum storage line number MN, the arithmetic processing unit 22 receives the minimum storage line number MN, and sets an initial value of the output storage line number TN. A situation in which the processing speed of the skew correction circuit 15 decreases tends to occur.

これに対して、本実施形態の画像読取装置1では、最小限格納ライン数MNに補助ライン数HNを加えたライン数を、入力用格納ライン数NNの初期値に設定する。そのため、斜行補正の開始時において、斜行補正中に読取部8の読み取りを中断しなければならない事象の発生を抑制することができ、斜行補正の処理時間を短縮することができる。また、補助ライン数HNは、斜行補正における解放指示処理において、入力用ラインバッファ4Aから解放されることから、補助ライン数HNを用いて入力用格納ライン数NNを設定しても、DRAM4の容量が増大してしまうのを抑制することができる。   On the other hand, in the image reading apparatus 1 of the present embodiment, the number of lines obtained by adding the auxiliary line number HN to the minimum storage line number MN is set as the initial value of the input storage line number NN. Therefore, it is possible to suppress the occurrence of an event that requires reading of the reading unit 8 to be interrupted during the skew correction at the start of the skew correction, and to shorten the skew correction processing time. Further, since the auxiliary line number HN is released from the input line buffer 4A in the release instruction processing in the skew feeding correction, even if the input storage line number NN is set using the auxiliary line number HN, the DRAM 4 An increase in capacity can be suppressed.

(2)本実施形態の画像読取装置1では、入力用格納ライン数NNの初期値が全域格納ライン数ANよりも小さい値に設定され、斜行補正の開始時において入力用ラインバッファ4Aの記憶領域が比較的小さい領域に抑制される。更に、斜行補正の開始後において、入力用格納ライン数NNと最小限格納ライン数MNとが等しくなった場合に、入力用ラインバッファ4Aをリングバッファとして使用し、斜行補正の開始後において入力用ラインバッファ4Aの記憶領域が比較的小さい領域に抑制される。つまり、斜行補正を通して入力用ラインバッファ4Aの記憶領域を抑制することができ、DRAM4の容量が増大してしまうのを抑制することができる。 (2) In the image reading apparatus 1 of the present embodiment, the initial value of the input storage line number NN is set to a value smaller than the total storage line number AN, and stored in the input line buffer 4A at the start of skew correction. The area is suppressed to a relatively small area. Further, after the skew correction is started, when the input storage line number NN and the minimum storage line number MN become equal, the input line buffer 4A is used as a ring buffer, and after the skew correction is started. The storage area of the input line buffer 4A is suppressed to a relatively small area. That is, the storage area of the input line buffer 4A can be suppressed through the skew correction, and the increase in the capacity of the DRAM 4 can be suppressed.

<他の実施形態>
本明細書で開示される技術は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば次のような種々の態様も含まれる。
(1)上記実施形態では、スキャン機能のみ有する画像読取装置1を挙げて説明を行った。しかし、これに限らず、スキャン機能および印刷機能を有するコピー機や、ファクシミリ機能を有するファクシミリ装置、スキャナ機能、印刷機能およびファクシミリ機能など複数の機能を有する複合機などでもよい。
<Other embodiments>
The technology disclosed in the present specification is not limited to the embodiments described with reference to the above description and drawings, and includes, for example, the following various aspects.
(1) In the above embodiment, the image reading apparatus 1 having only the scan function has been described. However, the present invention is not limited to this, and a copying machine having a scanning function and a printing function, a facsimile machine having a facsimile function, a multifunction machine having a plurality of functions such as a scanner function, a printing function, and a facsimile function may be used.

(2)上記実施形態では、画像読取装置1がCPU13を有する及びASIC2を有し、このCPU13が必要に応じてASIC2内の斜行補正回路15等のハード回路を用いて画像読取処理を実行する制御部が構成される例を用いて説明を行ったが、本発明はこれに限られない。例えば、CPUがASICとは別体として存在し、このCPUにより制御部が実行する処理が実行されてもよければ、ASIC内にCPUが存在せず、ASICに設けられたハード回路により制御部が実行する処理が実行されてもよい。さらには、単数又は複数のCPU及びASICによって、制御部が実行する処理を実行していても良い。 (2) In the above embodiment, the image reading apparatus 1 has the CPU 13 and the ASIC 2, and the CPU 13 executes image reading processing using a hardware circuit such as the skew correction circuit 15 in the ASIC 2 as necessary. Although the description has been given using an example in which the control unit is configured, the present invention is not limited to this. For example, if the CPU exists separately from the ASIC and the processing executed by the control unit may be executed by the CPU, the CPU does not exist in the ASIC, and the control unit is installed by a hardware circuit provided in the ASIC. Processing to be executed may be executed. Furthermore, the process which a control part performs may be performed by one or several CPU and ASIC.

(3)また、CPU13が実行するプログラムは必ずしもROM3に記憶されている必要はなく、ASIC2内に記憶されていてもよければ、他の記憶装置に記憶されていても良い。 (3) The program executed by the CPU 13 is not necessarily stored in the ROM 3, and may be stored in the ASIC 2 or may be stored in another storage device.

(4)上記実施形態では、出力用ラインバッファ4BがDRAM4に確保されている例を用いて説明を行ったが、本発明はこれに限られない。例えば、画像読取装置1が更にUSBや外部PCなどの外部装置に接続されている場合には、これらの有する記憶部に出力用ラインバッファ4Bが確保されても良い。 (4) In the above embodiment, the output line buffer 4B has been described using an example secured in the DRAM 4. However, the present invention is not limited to this. For example, when the image reading device 1 is further connected to an external device such as a USB or an external PC, the output line buffer 4B may be secured in the storage unit included therein.

(5)上記実施形態1では、入力用ラインバッファ4Aから解放したDRAM4の記憶領域を、出力用ラインバッファ4Bとして割り当てる例を用いて説明を行ったが、本発明はこれに限られない。入力用ラインバッファ4Aから解放したDRAM4の記憶領域は、出力用ラインバッファ4B以外の用途に割り当てられても良い。 (5) Although the first embodiment has been described using the example in which the storage area of the DRAM 4 released from the input line buffer 4A is assigned as the output line buffer 4B, the present invention is not limited to this. The storage area of the DRAM 4 released from the input line buffer 4A may be allocated for uses other than the output line buffer 4B.

4A:入力用ラインバッファ、4B:出力用ラインバッファ、15:斜行補正回路、21:ステートマシン、22:演算処理部、23:サイズ管理部、25:リードDMA処理部、26:ライトDMA処理部、Gi:補正前画像、Go:補正後画像、MN:最小限格納ライン数、AN:全域格納ライン数、HN:補助ライン数、θ:傾き角度 4A: input line buffer, 4B: output line buffer, 15: skew feeding correction circuit, 21: state machine, 22: arithmetic processing unit, 23: size management unit, 25: read DMA processing unit, 26: write DMA processing Part, Gi: pre-correction image, Go: post-correction image, MN: minimum number of storage lines, AN: total number of storage lines, HN: number of auxiliary lines, θ: inclination angle

Claims (6)

画像読取部と、
前記画像読取部が主走査方向に読み取った読取画像を、前記主走査方向に沿った出力画像に斜行補正する制御部と、
記憶部と、
を備え、
前記画像読取部は、前記主走査方向への読み取りを前記主走査方向と直交する副走査方向に複数回繰り返して前記読取画像を読み取り、
前記記憶部は、前記読取画像が記憶される入力領域を含み、
前記制御部は、
前記斜行補正において、
前記入力領域に記憶された前記読取画像から、前記斜行補正に必要な前記入力領域の容量である必要容量を設定する設定処理と、
前記入力領域に記憶された前記読取画像を読み出して前記出力画像として選出する読出処理と、
前記入力領域の容量が前記必要容量よりも大きい場合、前記記憶部に対して、前記読出処理において読み出された前記読取画像が記憶されていた領域を前記入力領域から解放するように指示する解放指示処理であって、前記主走査方向への1回の読み取りにより読み取られるライン読取画像毎に読み出されたか否かを確認し、前記ライン読取画像毎に、当該ライン読取画像が記憶されていた領域を前記入力領域から解放するように指示する解放指示処理と、
を実行する画像読取装置。
An image reading unit;
A control unit that corrects a skew of the read image read by the image reading unit in the main scanning direction into an output image along the main scanning direction;
A storage unit;
With
The image reading unit reads the read image by repeating reading in the main scanning direction a plurality of times in a sub-scanning direction orthogonal to the main scanning direction,
The storage unit includes an input area in which the read image is stored,
The controller is
In the skew correction,
A setting process for setting a required capacity, which is a capacity of the input area necessary for the skew correction, from the read image stored in the input area;
A read process for reading the read image stored in the input area and selecting it as the output image;
When the capacity of the input area is larger than the required capacity, release that instructs the storage unit to release the area in which the read image read in the reading process is stored from the input area In the instruction processing , it is confirmed whether or not each line reading image read by one reading in the main scanning direction is read, and the line reading image is stored for each line reading image. A release instruction process for instructing to release an area from the input area ;
An image reading apparatus that executes
請求項1記載の画像読取装置であって、
前記記憶部は、前記出力画像が記憶される出力領域を更に備え、
前記制御部は、
更に、
前記記憶部に対して、前記解放指示処理において解放を指示した前記領域を、前記出力領域として割り当てるように指示する割当指示処理、
を実行する、画像読取装置。
The image reading apparatus according to claim 1,
The storage unit further includes an output area in which the output image is stored,
The controller is
Furthermore,
An allocation instruction process for instructing the storage unit to allocate the area instructed to be released in the release instruction process as the output area;
An image reading apparatus that executes
請求項1または請求項2に記載の画像読取装置であって、
前記読取画像は、画像読取部が原稿を読み取ったものであり、
前記必要容量は、前記原稿の少なくとも一辺を含む領域を読み取った読取画像を記憶可能な容量である、画像読取装置。
The image reading apparatus according to claim 1, wherein:
The read image is an image read by the image reading unit,
The image reading apparatus, wherein the required capacity is a capacity capable of storing a read image obtained by reading an area including at least one side of the document.
請求項1から請求項のいずれか一項に記載の画像読取装置であって、
前記読取画像は、画像読取部が原稿を読み取ったものであり、
前記制御部は、
更に、
前記入力領域の初期容量を設定する初期設定処理、
を実行し、
前記初期容量は、前記必要容量、及び、1枚分の原稿を読み取った読取画像を記憶可能な容量から設定される、画像読取装置。
An image reading apparatus according to any one of claims 1 to 3 ,
The read image is an image read by the image reading unit,
The controller is
Furthermore,
An initial setting process for setting an initial capacity of the input area;
Run
The initial capacity is set from the necessary capacity and a capacity capable of storing a read image obtained by reading one original.
請求項1から請求項のいずれか一項に記載の画像読取装置であって、
前記制御部は、
前記入力領域の容量が前記必要容量と一致するまで、前記読出処理と前記解放指示処理を繰り返し、
前記解放指示処理により前記入力領域の容量が前記必要容量と等しいと判断された場合、前記入力領域をリングバッファとして使用する、画像読取装置。
An image reading apparatus according to any one of claims 1 to 3 ,
The controller is
Until the capacity of the input area matches the required capacity, the reading process and the release instruction process are repeated,
An image reading apparatus that uses the input area as a ring buffer when it is determined by the release instruction process that the capacity of the input area is equal to the required capacity.
請求項記載の画像読取装置であって、
前記制御部は、
前記画像読取部の読み取り中に前記斜行補正を開始し、
更に、
前記入力領域の初期容量を設定する初期設定処理、
を実行し、
前記初期容量は、前記必要容量、及び、前記制御部の処理速度と前記画像読取部とから決定される補助容量から設定される、画像読取装置。
The image reading apparatus according to claim 5 ,
The controller is
The skew correction is started during reading by the image reading unit,
Furthermore,
An initial setting process for setting an initial capacity of the input area;
Run
The initial capacity is an image reading apparatus set from the necessary capacity and an auxiliary capacity determined from a processing speed of the control unit and the image reading unit.
JP2013136731A 2013-06-28 2013-06-28 Image reading device Active JP6205904B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013136731A JP6205904B2 (en) 2013-06-28 2013-06-28 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013136731A JP6205904B2 (en) 2013-06-28 2013-06-28 Image reading device

Publications (2)

Publication Number Publication Date
JP2015012467A JP2015012467A (en) 2015-01-19
JP6205904B2 true JP6205904B2 (en) 2017-10-04

Family

ID=52305254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013136731A Active JP6205904B2 (en) 2013-06-28 2013-06-28 Image reading device

Country Status (1)

Country Link
JP (1) JP6205904B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6880654B2 (en) * 2016-10-31 2021-06-02 株式会社リコー Image processing device, image forming device, image processing method and image processing program
JP7082757B2 (en) * 2018-06-26 2022-06-09 京セラドキュメントソリューションズ株式会社 Image processing equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09261384A (en) * 1996-03-22 1997-10-03 Toshiba Corp Image forming device
JP5574655B2 (en) * 2009-09-25 2014-08-20 キヤノン株式会社 Image processing apparatus, image processing apparatus control method, and program
JP5671922B2 (en) * 2010-10-05 2015-02-18 富士ゼロックス株式会社 Image processing apparatus, image forming apparatus, and image processing program
JP2013064873A (en) * 2011-09-16 2013-04-11 Ricoh Co Ltd Image forming apparatus

Also Published As

Publication number Publication date
JP2015012467A (en) 2015-01-19

Similar Documents

Publication Publication Date Title
US10200563B2 (en) Image processing apparatus and method of processing an image
JP6736881B2 (en) Image processing apparatus, image forming apparatus, image processing method, and program
JP6459384B2 (en) Image reading apparatus, program, and read image correction method
JP6397238B2 (en) Image processing apparatus, image processing apparatus control method, program, and storage medium
US9628649B2 (en) Scanning apparatus and computer-readable medium storing program therefor
US9479661B2 (en) Image-reading device detecting edge of sheet by setting mask region including part of lines
CN103458139B (en) Image read-out and image processing system
JP6205904B2 (en) Image reading device
JP6233202B2 (en) Image forming apparatus and job execution method
JP2016005187A (en) Image reading apparatus
JP6570251B2 (en) Image reading device
JP6467845B2 (en) Image reading device
JP5780064B2 (en) Image reading device
US9679231B2 (en) Copier and method in which print processing proceeds prior to storing all read image data exceeding predetermined size when ACS is selected
JP5994538B2 (en) Image processing device
JP2020039093A (en) Reader and program
JP2018098527A (en) Original reading device, control method of original reading device, image formation device
JP6394225B2 (en) Image processing apparatus, image processing method, and image processing program
JP6926618B2 (en) Image processing equipment and programs
JP5671922B2 (en) Image processing apparatus, image forming apparatus, and image processing program
US10516802B1 (en) Image processing device
EP3252601A1 (en) Apparatus and method for changing priority of a job
JP6343948B2 (en) Reader
JP6558660B2 (en) Reader
JP2019036769A (en) Image reading device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170323

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170821

R150 Certificate of patent or registration of utility model

Ref document number: 6205904

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150