JP2005352703A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2005352703A
JP2005352703A JP2004171817A JP2004171817A JP2005352703A JP 2005352703 A JP2005352703 A JP 2005352703A JP 2004171817 A JP2004171817 A JP 2004171817A JP 2004171817 A JP2004171817 A JP 2004171817A JP 2005352703 A JP2005352703 A JP 2005352703A
Authority
JP
Japan
Prior art keywords
address
read
storage means
block
image data
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.)
Withdrawn
Application number
JP2004171817A
Other languages
Japanese (ja)
Inventor
Koichi Fujii
晃一 藤井
Mitsuyuki Tamaya
光之 玉谷
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2004171817A priority Critical patent/JP2005352703A/en
Publication of JP2005352703A publication Critical patent/JP2005352703A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus having a skew correcting function. <P>SOLUTION: Image data are stored in a large capacity low-speed memory 10, and read out by block unit in accordance with addresses generated from an address generator 12 to be stored in a small amount high-speed memory 14. The image data are further read out in accordance with addresses generated from an address generator 16 to be brought into a skew correction by a calculator 18 to perform interpolating calculation. The address generator 12 sequentially generates addresses by approximating the decimal parts with a prescribed accuracy so as to read out the image data by block unit in an oblique direction from the memory 10 with an angle corresponding to the slant of an input image, and also suppresses the cumulative error of the addresses due to approximation by increasing and decreasing the addresses by prescribed amounts on the basis of the period in response to the accuracy. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は画像処理装置、特にスキュー補正(傾き補正)等の画像加工機能を備える複写機などの装置に関する。   The present invention relates to an image processing apparatus, and more particularly to an apparatus such as a copying machine having an image processing function such as skew correction (tilt correction).

従来より、複写機等の画像処理装置において、入力画像に対して回転操作等の加工処理を行うことが知られている。   Conventionally, it is known that an image processing apparatus such as a copying machine performs processing such as a rotation operation on an input image.

例えば、下記に示す従来技術には、任意角度の図形回転処理を行う技術が記載されている。すなわち、矩形領域を形成する直線の回転後の傾きを表す傾斜パターンを生成して記憶させ、傾斜パターンと画像データバッファに格納された画像データに基づいて矩形領域の画像データを画素単位で回転処理する。   For example, the following prior art describes a technique for performing graphic rotation processing at an arbitrary angle. That is, a tilt pattern representing the tilt after rotation of the straight line forming the rectangular area is generated and stored, and the image data of the rectangular area is rotated on a pixel basis based on the tilt pattern and the image data stored in the image data buffer. To do.

図14には、この従来技術に開示された図形回転の様子が示されている。図において、ソース領域をθだけ回転させて得られた画像をデスティネーション領域とし、黒点は領域パターンをアフィン逆変換f−1した場合のソース領域での位置を示している。回転角度θを傾斜パターン生成部に入力すると、傾斜パターン生成部は回転角度θに対応する傾斜パターンを生成する。例えば、回転角度θ=tan−1(6/16)の場合には、図示のごとく「1010010010100100」なる傾斜パターンを生成する。傾斜パターンとデスティネーション領域の直線との関係は、パターンの「1」が割り当てられた座標で直線の画素がY方向に1だけずれるような関係である。このような傾斜パターンによってデスティネーション領域の注目画素を1画素ずつスキャンし、逆アフィン変換f−1により注目画素に対応する対応画素をソース領域の画像データを参照することにより求める。具体的には、ソース領域の対応画素を用いて保管処理し、注目画素の色及び属性を定める。例えば、デスティネーション領域のD´21の画素の色及び属性を決定するために注目画素D´21(2,1)を逆変換したソース領域の点D´21(2.2,0.2)の近傍の4つの対応画素S20、S21、S30、S31の色及び属性を参照する。 FIG. 14 shows the state of figure rotation disclosed in this prior art. In the figure, an image obtained by rotating the source region by θ is used as a destination region, and black dots indicate positions in the source region when the affine inverse transformation f −1 is performed on the region pattern. When the rotation angle θ is input to the inclination pattern generation unit, the inclination pattern generation unit generates an inclination pattern corresponding to the rotation angle θ. For example, in the case of the rotation angle θ = tan −1 (6/16), an inclination pattern “1010010010100100” is generated as illustrated. The relationship between the inclined pattern and the straight line of the destination area is such that the straight line pixel is shifted by 1 in the Y direction at the coordinates to which the pattern “1” is assigned. A pixel of interest in the destination area is scanned one pixel at a time using such an inclination pattern, and a corresponding pixel corresponding to the pixel of interest is obtained by referring to the image data in the source area by inverse affine transformation f- 1 . Specifically, storage processing is performed using the corresponding pixel in the source region, and the color and attribute of the target pixel are determined. For example, the point D ′ 21 (2.2, 0.2) in the source region obtained by inversely transforming the pixel of interest D ′ 21 (2, 1) in order to determine the color and attribute of the pixel D ′ 21 in the destination region. Reference is made to the colors and attributes of the four corresponding pixels S20, S21, S30, and S31 in the vicinity of.

以上のようにして、ソース画像に対してθだけ回転させたデスティネーション画像を得ることができるが、同様にして予めスキューした(傾いた)画像を補正することもできる。図14に即して説明すれば、予めθだけスキューしたソース画像に対し、−θだけ回転させることでスキューのないデスティネーション画像を得ることができる。   As described above, a destination image rotated by θ with respect to the source image can be obtained. Similarly, a skewed (tilted) image in advance can be corrected. Referring to FIG. 14, a destination image without skew can be obtained by rotating the source image skewed by θ in advance by −θ.

図15には、スキュー補正の概念説明図が示されている。スキューした元画像(ソース画像)に対し、所定サイズのブロック100単位で画像データを読出し、各ブロック内においてアフィン逆変換を行うことでスキュー補正を行う。図15においてはX方向を主走査方向、Y方向を副走査方向とし、ブロック100のサイズをWx×Wyとしている。また、スキュー補正後のブロックサイズをBx×Byとしている。ソース画像に対してスキュー角θに応じて斜めの方向に走査してブロック単位で画像データを読み出していく。   FIG. 15 is a conceptual explanatory diagram of skew correction. For the skewed original image (source image), image data is read in units of 100 blocks of a predetermined size, and skew correction is performed by performing affine inverse transformation in each block. In FIG. 15, the X direction is the main scanning direction, the Y direction is the sub-scanning direction, and the size of the block 100 is Wx × Wy. Further, the block size after skew correction is set to Bx × By. The source image is scanned in an oblique direction according to the skew angle θ, and image data is read out in block units.

特開平2−28891号公報JP-A-2-28891

上記従来技術では、傾斜パターンをX方向、すなわち主走査方向にページ幅分格納する必要があり、傾斜パターン生成部が複雑化して回路規模も大きくなる問題がある。また、傾斜パターンとして有限数の傾斜パターンを格納する必要があるが、傾斜パターンに沿ってスキャンする際に、スキャンアドレス値を一定の精度で読み出す必要があるため、誤差が蓄積されて本来の理想的な傾斜パターンで規定される傾斜直線との間にずれが生じる問題がある。   In the above prior art, it is necessary to store the inclined pattern for the page width in the X direction, that is, in the main scanning direction, and there is a problem that the inclined pattern generation unit becomes complicated and the circuit scale increases. In addition, it is necessary to store a finite number of inclined patterns as inclined patterns. However, when scanning along the inclined pattern, it is necessary to read out the scan address value with a certain degree of accuracy. There is a problem that a deviation occurs from an inclined straight line defined by a typical inclination pattern.

図16には、ブロック100単位でソース画像からデータを読み出す際の、Y方向の読出し開始位置の精度による傾き理論値と実際の読出し位置に生じる誤差が示されている。図において、点線は傾き理論値であり、スキュー角をθ、デスティネーション画像のブロックサイズをBx×Byとすると、傾き理論値Sblky(ideal)=Bx×sinθで算出される。ソース画像から順次ブロック単位で画像データを読み出す際の読出しアドレスとして、理論値Sblky(ideal)を近似し、例えば小数第1位を四捨五入することで算出する場合、図示のようにブロック100を順次読み出すにしたがって読出しアドレスの誤差が累積してしまい、本来の理論値から乖離してしまう。   FIG. 16 shows the theoretical value of the gradient based on the accuracy of the reading start position in the Y direction and the error occurring in the actual reading position when reading data from the source image in units of 100 blocks. In the figure, the dotted line is the theoretical value of inclination, and when the skew angle is θ and the block size of the destination image is Bx × By, the theoretical value of inclination Sblky (ideal) = Bx × sin θ is calculated. In the case where the theoretical value Sblky (ideal) is approximated as a read address when sequentially reading out image data from the source image in units of blocks, and is calculated by rounding off the first decimal place, for example, the blocks 100 are read sequentially as shown in the figure. Accordingly, read address errors accumulate and deviate from the original theoretical values.

このように本来の理論値からの誤差が生じると、スキュー補正した場合においても、本来直線であるべき画像データが不連続な直線となり、例えば図17に示されるようなスキューした画像300をスキュー補正した場合、図18に示されるように段差がある不連続な画像400となってしまう。   When an error from the original theoretical value occurs in this way, even when skew correction is performed, the image data that should be a straight line becomes a discontinuous straight line. For example, a skewed image 300 as shown in FIG. In this case, a discontinuous image 400 having a step as shown in FIG.

本発明の目的は、簡易な構成で、かつ、正確にスキュー補正等の回転処理を行うことができる装置を提供することにある。   An object of the present invention is to provide an apparatus that can perform rotation processing such as skew correction accurately with a simple configuration.

本発明は、入力画像を回転して出力する画像処理装置であって、入力画像を記憶する第1記憶手段と、前記第1記憶手段に記憶された画像データをブロック単位で読み出すための第1読み出しアドレスを生成する第1アドレス生成手段と、前記第1読み出しアドレスに従い前記第1記憶手段から読み出された画像データを記憶する第2記憶手段と、前記第2記憶手段に記憶された画像データを読み出すための第2読み出しアドレスを生成する第2アドレス生成手段と、前記第2読み出しアドレスに従い前記第2記憶手段から読み出された画像データに対し、前記入力画像の回転角度に応じた回転処理を行う演算手段と、回転処理された画像データを記憶する第3記憶手段とを有し、前記第1アドレス生成手段は、前記入力画像の回転角度に応じて前記第1記憶手段から斜め方向にブロック単位で読み出すべく、その小数部を所定の精度で近似して前記第1読み出しアドレスを順次生成し、かつ、前記第1読み出しアドレスを前記精度に応じた周期で所定量だけ増減させることで前記近似による前記第1読み出しアドレスの累積誤差を抑制するものである。   The present invention is an image processing apparatus for rotating and outputting an input image, the first storage means for storing the input image, and the first for reading the image data stored in the first storage means in block units. First address generation means for generating a read address, second storage means for storing image data read from the first storage means in accordance with the first read address, and image data stored in the second storage means Second address generation means for generating a second read address for reading out the image data, and rotation processing corresponding to the rotation angle of the input image with respect to the image data read from the second storage means in accordance with the second read address And a third storage means for storing the rotated image data, wherein the first address generation means responds to the rotation angle of the input image. In order to read from the first storage means diagonally in block units, the decimal part is approximated with a predetermined accuracy to sequentially generate the first read address, and the first read address is determined according to the accuracy. By increasing / decreasing the cycle by a predetermined amount, the accumulated error of the first read address due to the approximation is suppressed.

また、本発明は、入力画像を回転して出力する画像処理装置であって、入力画像を記憶する第1記憶手段と、前記第1記憶手段に記憶された画像データをブロック単位で読み出すための第1読み出しアドレスを生成する第1アドレス生成手段と、前記第1読み出しアドレスに従い前記第1記憶手段から読み出された画像データを記憶する第2記憶手段と、前記第2記憶手段に記憶された画像データを読み出すための第2読み出しアドレスを生成する第2アドレス生成手段と、前記第2読み出しアドレスに従い前記第2記憶手段から読み出された画像データに対し、前記入力画像の回転角度に応じた回転処理を行う演算手段と、回転処理された画像データを記憶する第3記憶手段とを有し、前記第1アドレス生成手段は、前記入力画像の回転角度に応じて前記第1記憶手段から斜め方向にブロック単位で読み出すべく、その小数部を所定の精度で近似して前記第1読み出しアドレスを順次生成し、前記第2アドレス生成手段は、前記近似による前記第1読み出しアドレスの累積誤差が所定画素数より小さい場合に前記第2読み出しアドレスを前記精度に応じた周期で所定量だけ増減させることで前記近似による前記第1読み出しアドレスの累積誤差を抑制するものである。   The present invention is also an image processing apparatus for rotating and outputting an input image, the first storage means for storing the input image, and for reading out the image data stored in the first storage means in block units. First address generation means for generating a first read address, second storage means for storing image data read from the first storage means according to the first read address, and stored in the second storage means Second address generation means for generating a second read address for reading image data, and image data read from the second storage means according to the second read address according to the rotation angle of the input image Computation means for performing rotation processing, and third storage means for storing the image data subjected to rotation processing, wherein the first address generation means is a rotation angle of the input image Accordingly, the first address is sequentially generated by approximating the decimal part with a predetermined accuracy so as to read out the block from the first storage unit in an oblique direction, and the second address generation unit is configured to perform the approximation according to the approximation. When the accumulated error of the first read address is smaller than a predetermined number of pixels, the accumulated error of the first read address due to the approximation is suppressed by increasing / decreasing the second read address by a predetermined amount at a period according to the accuracy. Is.

ここで、前記第1アドレス生成手段は、前記第1読み出しアドレスの累積誤差が前記所定画素数以上の場合に前記第1読み出しアドレスを所定量だけ増減させることで前記近似による前記第1読み出しアドレスの累積誤差を抑制してもよい。   Here, the first address generation means increases or decreases the first read address by a predetermined amount when the accumulated error of the first read address is greater than or equal to the predetermined number of pixels, so that the first read address by the approximation is increased. The accumulated error may be suppressed.

本発明によれば、簡易な構成で高精度にスキュー補正等の回転処理を行うことができる。   According to the present invention, rotation processing such as skew correction can be performed with high accuracy with a simple configuration.

以下、図面に基づき本発明の実施形態について、スキュー補正を例にとり説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings, taking skew correction as an example.

図1には、本実施形態に係るスキュー補正機能を備えた画像処理装置の構成ブロック図が示されている。スキャナなどの画像データ入力部から入力された画像データはページメモリ等の大容量低速メモリ10に記憶される。大容量低速メモリ10に記憶された画像データは、アドレス生成部12で生成されたブロック読出しアドレスに従い順次読み出されて小容量高速メモリ14に格納される。小容量高速メモリ14に格納された画像データは、アドレス生成部16により生成された局所回転用読出しアドレスに従い順次読み出されて補間処理を行う演算部18に供給される。演算部18は、従来技術のようにソース画像における対応画素近傍の複数の画素データを用いて補間処理を行い、処理結果を大容量低速メモリ20に格納する。大容量低速メモリ20への書き込みは、アドレス生成部22により生成されるブロック書き込みアドレスに従って行われる。   FIG. 1 is a block diagram showing the configuration of an image processing apparatus having a skew correction function according to this embodiment. Image data input from an image data input unit such as a scanner is stored in a large-capacity low-speed memory 10 such as a page memory. The image data stored in the large-capacity low-speed memory 10 is sequentially read according to the block read address generated by the address generator 12 and stored in the small-capacity high-speed memory 14. The image data stored in the small-capacity high-speed memory 14 is sequentially read according to the local rotation read address generated by the address generation unit 16 and supplied to the calculation unit 18 that performs interpolation processing. The calculation unit 18 performs interpolation processing using a plurality of pixel data in the vicinity of the corresponding pixel in the source image as in the prior art, and stores the processing result in the large-capacity low-speed memory 20. Writing to the large-capacity low-speed memory 20 is performed according to the block write address generated by the address generator 22.

以下、本実施形態におけるブロック読出しの基本動作について説明する。   Hereinafter, a basic operation of block reading in this embodiment will be described.

図2には、大容量低速メモリ10からブロック100単位で画像データを読み出す際の処理が示されている。上記したように、スキュー補正を行う際にはソース画像における対応画素近傍の複数の画素データが必要となるため、ブロック単位で画像データを読み出す際にオーバラップさせて読みだす。オーバラップさせるべき画像領域は傾き角θに応じて変化し、オーバラップデータを読み出すためのブロック読み出し開始点が異なってくる。一般に、傾き角θが増大するほどオーバラップデータ量は増大する。図2において、例えば48画素×40画素のブロック100の読出し開始点SをS1、S2、S3・・・とすると、読み出し開始点S1を有するブロック100に対し、次に読み出すべきブロック100の読出し開始点S2は、X方向移動量=By×sinθであり、Y方向移動量=Bx×sinθ(理論値)である。図中太線は、デスティネーション画像における出力ブロック200を示したものであり、例えば32画素×32画素に設定される。図において、1マスは4画素×4画素でパッキングされている。   FIG. 2 shows processing when image data is read from the large-capacity low-speed memory 10 in units of 100 blocks. As described above, when skew correction is performed, a plurality of pixel data in the vicinity of the corresponding pixel in the source image are required. Therefore, when image data is read out in units of blocks, it is read out in an overlapping manner. The image area to be overlapped changes according to the inclination angle θ, and the block read start point for reading the overlap data differs. In general, the amount of overlap data increases as the tilt angle θ increases. In FIG. 2, for example, when the read start point S of the block 100 of 48 pixels × 40 pixels is S1, S2, S3... At point S2, the X-direction movement amount = By × sin θ, and the Y-direction movement amount = Bx × sin θ (theoretical value). The thick line in the figure shows the output block 200 in the destination image, and is set to 32 pixels × 32 pixels, for example. In the figure, one square is packed with 4 pixels × 4 pixels.

図3には、以上のようにして設定される読出し開始位置S1、S2、・・・Sn、Sn+1が示されている。Y方向の移動量で読出し開始点が決定されるため、図中矢印で示されるように大容量低速メモリ10から斜め方向にブロック100が順次読み出される。読出し開始位置S1、S2・・はアドレス生成部12で生成される。   FIG. 3 shows the read start positions S1, S2,... Sn, Sn + 1 set as described above. Since the reading start point is determined by the amount of movement in the Y direction, the blocks 100 are sequentially read from the large-capacity low-speed memory 10 in an oblique direction as indicated by arrows in the figure. The read start positions S1, S2,... Are generated by the address generator 12.

図4には、アドレス生成部16におけるアドレス生成の原理が示されている。図4(A)は、大容量低速メモリ10から読み出されたブロック100及びこのブロック100から出力ブロック200を傾けて抽出することが示されており、図4(B)には、この出力ブロック200をさらにθだけ回転させて傾きを補正することが示されている。   FIG. 4 shows the principle of address generation in the address generation unit 16. 4A shows that the block 100 read from the large-capacity low-speed memory 10 and the output block 200 are extracted from the block 100 by tilting. FIG. 4B shows the output block. It is shown that the tilt is corrected by further rotating 200 by θ.

具体的には、図5に示されるように、ブロック100内におけるブロック200の画像データを(x、y)、回転角度θを補正した後のブロック200の画像データを(X,Y)とすると、アフィン逆行列を用いて
x=cosθ(X−m)+sinθ(Y−n)
y=−sinθ(X−m)+cos(Y−n)
で与えられる。ここで、m,nはオフセット量である。これにより、スキュー補正前の画素No.23は出力画像の画素No.1に写像され、スキュー補正前の画素No.17は画素No.10に写像される。読み出された画像データは演算部18に供給され、図6に示されるように、スキュー補正後の画素データは、対応する画素Nに隣接する4点P1〜P4の画素データから
N1=xP2+(1−x)P1
N2=xP4+(1−x)P3
N=(1−y)N1+yN2
で与えられる。
Specifically, as shown in FIG. 5, when the image data of the block 200 in the block 100 is (x, y) and the image data of the block 200 after correcting the rotation angle θ is (X, Y). , Using an affine inverse matrix, x = cos θ (X−m) + sin θ (Y−n)
y = −sin θ (X−m) + cos (Y−n)
Given in. Here, m and n are offset amounts. Thereby, the pixel No. before skew correction is changed. Reference numeral 23 denotes a pixel No. of the output image. 1 and the pixel No. before skew correction is mapped. 17 is a pixel No. 10 is mapped. The read image data is supplied to the calculation unit 18, and as shown in FIG. 6, the pixel data after skew correction is obtained from the pixel data of four points P1 to P4 adjacent to the corresponding pixel N. N1 = xP2 + ( 1-x) P1
N2 = xP4 + (1-x) P3
N = (1-y) N1 + yN2
Given in.

ところが、ブロック100を順次読み出す場合の読み出し開始点S1、S2、・・のアドレスを単に理論値からの近似値とすると、図16に示されるように読み出し開始アドレスの誤差が蓄積してしまう。   However, if the addresses of the read start points S1, S2,... In the case of sequentially reading the block 100 are simply approximate values from the theoretical values, errors in the read start addresses accumulate as shown in FIG.

そこで、本実施形態では、アドレス生成部12内に誤差補正部が設けられ、この誤差補正部により蓄積誤差を補正する。誤差補正部は、Y方向の傾き理論値であるSblk(ideal)の小数部を四捨五入するのではなく1/2の精度で近似して読み出し開始アドレスSblkとし、かつ、小数部の値に応じて周期的にSblk+1として蓄積誤差を解消する。 Therefore, in the present embodiment, an error correction unit is provided in the address generation unit 12, and the accumulation error is corrected by the error correction unit. The error correction unit does not round off the decimal part of Sblk (ideal), which is the theoretical value in the Y direction, but approximates it with an accuracy of 1/2 n to obtain the read start address Sblk, and depends on the value of the decimal part Thus, the accumulation error is eliminated as Sblk + 1 periodically.

図7には、n=2とし、理論値Sblk(ideal)の小数部を1/4の精度で近似した場合のY方向読み出し開始アドレスが示されている。小数部を1/4の精度で近似するため、Sblk(ideal)の小数部が0〜0.125の範囲は0に近似され、小数部が0.125〜0.375の範囲は0.25に近似され、小数部が0.375〜0.625の範囲は0.5に近似され、小数部が0.625〜0.875の範囲は0.75に近似され、小数部が0.875〜の範囲は1に近似される。そして、Y方向の読み出し開始アドレスの整数部をSyとすると、例えば小数部が0〜0.125の場合、最初の読み出し開始アドレス(ステップ量1)はSyとされ、次の読み出し開始アドレス(ステップ量2)もSyとされ、以下同様にSyで読み出し開始アドレスが決定される。この場合、誤差補正部では蓄積誤差の解消を行うことはないが、誤差量が0〜0.125と小さいため蓄積誤差も小さく問題は生じない。   FIG. 7 shows the Y-direction read start address when n = 2 and the decimal part of the theoretical value Sblk (ideal) is approximated with an accuracy of 1/4. In order to approximate the fractional part with an accuracy of 1/4, the range of 0 to 0.125 for the fractional part of Sblk (ideal) is approximated to 0, and the range for the fractional part of 0.125 to 0.375 is 0.25. The range of the decimal part from 0.375 to 0.625 is approximated to 0.5, the range of the decimal part from 0.625 to 0.875 is approximated to 0.75, and the fractional part is 0.875. The range of ~ approximates to 1. If the integer part of the read start address in the Y direction is Sy, for example, if the decimal part is 0 to 0.125, the first read start address (step amount 1) is Sy, and the next read start address (step The quantity 2) is also set to Sy, and similarly, the read start address is determined by Sy. In this case, the error correction unit does not eliminate the accumulation error, but since the error amount is small, 0 to 0.125, the accumulation error is small and no problem occurs.

一方、小数部が0.125〜0.375の場合、最初の読み出し開始アドレス(ステップ量1)はSyとされ、次の読み出し開始アドレス(ステップ量2)もSyとされる。しかし、次の読み出し開始アドレス(ステップ量3)では、Sy+1とする。以下、ステップ量4ではSy、ステップ量5ではSy、ステップ量6ではSy、ステップ量7ではSy+1と、基本的に3回のSyのステップの後の4回目の読み出しアドレスをSy+1とする。   On the other hand, when the decimal part is 0.125 to 0.375, the first read start address (step amount 1) is Sy, and the next read start address (step amount 2) is also Sy. However, at the next read start address (step amount 3), Sy + 1 is set. Hereinafter, Sy is used for the step amount 4, Sy is used for the step amount 5, Sy is used for the step amount 6, Sy + 1 is used for the step amount 7, and the fourth read address after three Sy steps is basically Sy + 1.

図8には、この場合の処理が模式的に示されている。最初のブロック100−1のY方向の読み出し開始点S1に対し、次のブロック100−2の読み出し開始点S2のアドレスはS1に対してSyだけずれた位置となる。S1に対してSyだけずらすことで、ほぼ理論値に近い傾きの位置から読み出すことができるが、上記のようにSyは理論値の整数部であって誤差が存在する。次のブロック100−3の読み出し開始点S3のアドレスはS2に対してさらにSyだけずれた位置となる。そして、次のブロック100−4の読み出し開始点S4のアドレスを、仮にS3に対してさらにSyだけずれた位置に設定すると、近似した小数部である0.25の累計が1に達するため(S2、S3、S4でそれぞれ約0.25の小数分誤差が存在するため、0.25×4=1)、その累積誤差分を解消すべくSyに1を加えてSy+1とする。   FIG. 8 schematically shows the processing in this case. The address of the read start point S2 of the next block 100-2 is shifted by Sy with respect to the read start point S1 of the first block 100-1 in the Y direction. By shifting by Sy with respect to S1, it is possible to read from a position having an inclination close to the theoretical value. However, as described above, Sy is an integer part of the theoretical value and there is an error. The address of the read start point S3 of the next block 100-3 is further shifted by Sy with respect to S2. Then, if the address of the read start point S4 of the next block 100-4 is set at a position further shifted by Sy with respect to S3, the cumulative total of 0.25, which is an approximate fractional part, reaches 1 (S2). , S3, and S4 each have a fractional error of about 0.25, so 0.25 × 4 = 1). To eliminate the accumulated error, 1 is added to Sy to obtain Sy + 1.

また、小数部が0.5〜0.625の場合、最初の読み出し開始アドレス(ステップ量1)はSyとされ、次の読み出し開始アドレス(ステップ量2)はSy+1とされ、次の読み出し開始アドレス(ステップ量3)は再びSyとされ、次の読み出し開始アドレス(ステップ量4)は再びSy+1とされる。   When the decimal part is 0.5 to 0.625, the first read start address (step amount 1) is Sy, the next read start address (step amount 2) is Sy + 1, and the next read start address. (Step amount 3) is again Sy, and the next read start address (step amount 4) is again Sy + 1.

また、小数部が0.625〜0.875の場合、最初の読み出し開始アドレスはSy+1とされ、次の読み出し開始アドレスもSy+1とされ、以下、Sy、Sy+1、Sy+1、Sy+1、Sy、・・と、基本的に3回のSy+1のステップの後の4回目の読み出しアドレスをSyとする。   When the decimal part is 0.625 to 0.875, the first read start address is Sy + 1 and the next read start address is also Sy + 1. Hereinafter, Sy, Sy + 1, Sy + 1, Sy + 1, Sy,. Basically, the fourth read address after three Sy + 1 steps is Sy.

また、小数部が0.875〜の場合、全ての読み出し開始アドレスはSy+1とされる。つまり、最初のブロック100−1の読み出し開始点S1に対し、次のブロック100−2の読み出し開始点S2はS1に対してSy+1だけずれた位置となり、次のブロック100−3の読み出し開始点S3はS2に対してさらにSy+1だけずれた位置となる。以下同様である。   When the decimal part is 0.875-, all read start addresses are Sy + 1. That is, the read start point S2 of the next block 100-2 is shifted by Sy + 1 with respect to S1 with respect to the read start point S1 of the first block 100-1, and the read start point S3 of the next block 100-3. Is further shifted by Sy + 1 from S2. The same applies hereinafter.

以上のように、アドレス生成部12内の誤差補正部は、理論値の小数第1位の近似値に応じた周期で読み出し開始アドレスを1ずつ変化させて蓄積誤差を解消する。具体的には、誤差補正部は、傾き角のデータを入力し、この傾き角に応じた小数近似値及びステップ量、あるいは1だけ増加させる周期を内蔵メモリ等に格納しておき、アドレス生成部12で生成されたアドレスSyに対して補正を加えればよい。   As described above, the error correction unit in the address generation unit 12 eliminates the accumulation error by changing the read start address one by one in a cycle corresponding to the approximate value of the first decimal place of the theoretical value. Specifically, the error correction unit inputs tilt angle data, stores a decimal approximation value and a step amount corresponding to the tilt angle, or a cycle of increasing by 1 in a built-in memory or the like, and an address generation unit. What is necessary is just to correct | amend the address Sy produced | generated by 12. FIG.

このように、ブロック100単位で順次画像データを読み出す際に、読み出し開始点のアドレスを周期的に変化させる、すなわち傾き角θに応じた周期で不連続的に1だけ変化させることで、累積誤差を抑制することができる。本実施形態のように、Sblk(ideal)の小数部を1/2の精度で近似した場合、主走査方向ブロック数×(1/2n+1)に抑えることが可能である。したがって、図17に示されるようなスキュー画像を補正する場合でも、図9に示されるように累積誤差が解消され、不連続でない(ギザギザのない)直線画像を得ることができる。 As described above, when sequentially reading out image data in units of 100 blocks, the address of the reading start point is periodically changed, that is, the accumulated error is changed discontinuously by 1 at a period corresponding to the inclination angle θ. Can be suppressed. As in the present embodiment, when the fractional part of Sblk (ideal) is approximated with an accuracy of 1/2 n , it is possible to suppress the number of blocks in the main scanning direction × (1/2 n + 1 ). Therefore, even when the skew image as shown in FIG. 17 is corrected, the accumulated error is eliminated as shown in FIG. 9, and a non-continuous (not jagged) straight image can be obtained.

なお、本実施形態では、Y方向の読み出し開始アドレスについて説明したが、X方向についても同様に処理することができる。   In the present embodiment, the read start address in the Y direction has been described, but the same processing can be performed in the X direction.

すなわち、X方向の理論値は、By×sinθであるが、この小数部の値に応じて0、0.25、0.5、0.75のいずれかに近似し、その近似値に応じて周期的に読み出し開始アドレスを1だけ変化させればよい。   That is, the theoretical value in the X direction is By × sin θ, but approximates any one of 0, 0.25, 0.5, and 0.75 depending on the value of the decimal part, and depends on the approximate value. It suffices to periodically change the read start address by one.

また、図4に示されるように、ブロック100からブロック200を読み出し、このブロック200に対してスキュー補正を行う構成であるため、ブロック100の読み出し開始アドレスを周期的に変化させるとともに、ブロック200の読み出し開始アドレスも周期的に変化させることで、より高精度に累積誤差を解消することもできる。特に、ページメモリやバンドメモリ等の大容量低速メモリ10にワード単位で画像データを格納する際に、1ワードが複数画素(例えば2画素)から構成されている場合、ブロック100の読み出し開始アドレスの調整では対応できない場合が生ずる(累積誤差が1ワード以内である場合)が、このような場合にはブロック200の読み出し開始アドレスを調整して対応することが可能である。   Further, as shown in FIG. 4, since the block 200 is read from the block 100 and the skew correction is performed on the block 200, the read start address of the block 100 is periodically changed, and the block 200 By changing the read start address periodically, the accumulated error can be eliminated with higher accuracy. In particular, when storing image data in units of words in the large-capacity low-speed memory 10 such as a page memory or a band memory, if one word is composed of a plurality of pixels (for example, two pixels), the read start address of the block 100 In some cases, the adjustment cannot be handled (when the accumulated error is within one word). In such a case, the read start address of the block 200 can be adjusted to cope with it.

以下、ブロック100の読み出し開始アドレスとブロック200の読み出し開始アドレスをともに周期的に変化させる場合について、X方向読み出し開始アドレスを例にとり説明する。   Hereinafter, a case where both the read start address of the block 100 and the read start address of the block 200 are periodically changed will be described using the X direction read start address as an example.

図10には、本実施形態の画像処理装置の構成ブロック図が示されている。スキャナなどの画像データ入力部から入力された画像データはページメモリ等の大容量低速メモリ10に記憶される。大容量低速メモリ10に記憶された画像データは、アドレス生成部12で生成されたブロック読出しアドレスに従い順次読み出されて小容量高速メモリ14に格納される。小容量高速メモリ14に格納された画像データは、アドレス生成部16により生成された局所回転用読出しアドレスに従い順次読み出される。ここで、1ワード内に複数画素に相当する画像データをパッキングして格納された場合、アンパック部13で1画素毎に分離して補間処理を行う演算部18に供給される。演算部18は、ソース画像における対応画素近傍の複数の画素データを用いて補間処理を行い、処理結果をパック部19で再び複数画素をまとめてパッキングし、大容量低速メモリ20に格納する。大容量低速メモリ20への書き込みは、アドレス生成部22により生成されるブロック書き込みアドレスに従って行われる。   FIG. 10 is a block diagram showing the configuration of the image processing apparatus according to this embodiment. Image data input from an image data input unit such as a scanner is stored in a large-capacity low-speed memory 10 such as a page memory. The image data stored in the large-capacity low-speed memory 10 is sequentially read according to the block read address generated by the address generator 12 and stored in the small-capacity high-speed memory 14. The image data stored in the small-capacity high-speed memory 14 is sequentially read according to the local rotation read address generated by the address generator 16. Here, when image data corresponding to a plurality of pixels is packed and stored in one word, the data is supplied to the arithmetic unit 18 which performs the interpolation process by separating the pixel data for each pixel by the unpack unit 13. The calculation unit 18 performs an interpolation process using a plurality of pixel data in the vicinity of the corresponding pixel in the source image, and packs a plurality of pixels again in the pack unit 19 and stores the result in the large-capacity low-speed memory 20. Writing to the large-capacity low-speed memory 20 is performed according to the block write address generated by the address generator 22.

本実施形態においては、上述したY方向の読み出し開始アドレスと同様に、アドレス生成部12の誤差補正部が周期的に読み出し開始アドレスを変化させて累積誤差を解消するが、さらに、ブロック200の読み出しアドレスを制御するアドレス生成部16内にも誤差補正部を設け、この誤差補正部でブロック200の読み出し開始アドレスの蓄積誤差を解消する。より詳しくは、理論理との誤差のうちの一定範囲内(1ワード以内)は、まずブロック200の読み出し開始アドレス、すなわちブロック100内における読み出し開始アドレスを変化させることで解消し、解消すべき誤差が一定以上となった場合、すなわち1ワードに格納すべき画素数に達した場合には、ブロック200の読み出し開始アドレスはその位置で固定し、次にブロック100の読み出し開始アドレスを変化させて誤差を解消する。   In the present embodiment, the error correction unit of the address generation unit 12 eliminates the accumulated error by periodically changing the read start address in the same manner as the read start address in the Y direction described above. An error correction unit is also provided in the address generation unit 16 that controls the address, and the error correction unit eliminates an accumulation error of the read start address of the block 200. More specifically, within a certain range (within 1 word) of errors from logic and logic, first, the error to be eliminated by changing the read start address of the block 200, that is, the read start address in the block 100. Is equal to or greater than a certain value, that is, when the number of pixels to be stored in one word is reached, the read start address of the block 200 is fixed at that position, and then the read start address of the block 100 is changed to obtain an error. Is solved.

図11には、X方向の読み出し開始アドレスが示されている。図において、ブロック100の読み出し開始位置はS1、S2、・・で示されており、ブロック200の読み出し開始位置はB1、B2、・・・で示されている。アドレス生成部12で生成されたアドレスに従ってブロック100−1が読み出され、アドレス生成部16で生成されたアドレスに従ってブロック200−1が読み出される。ブロック100の読み出し開始位置の理論値は、上記のようにBy×sinθであり、その小数部を1/2の精度、例えばn=2として1/4の精度で近似する。また、大容量低速メモリ10の1ワードに2画素分の画像データをパッキングして格納するものとする。 FIG. 11 shows a read start address in the X direction. In the figure, the read start position of the block 100 is indicated by S1, S2,..., And the read start position of the block 200 is indicated by B1, B2,. The block 100-1 is read according to the address generated by the address generator 12, and the block 200-1 is read according to the address generated by the address generator 16. The theoretical value of the reading start position of the block 100 is By × sin θ as described above, and its decimal part is approximated with an accuracy of 1/2 n , for example, with n = 2, 1/4 accuracy. It is also assumed that image data for two pixels is packed and stored in one word of the large-capacity low-speed memory 10.

次のブロック100−2の読み出し開始位置S2は、理論値の整数部をSxとし、小数部が0.25に近似された場合、SxだけX方向にずれた位置に設定される。また、ブロック100−2内におけるブロック200−2がアドレス生成部16のアドレスに従って読み出される。読み出し開始位置B2は、ブロック200−1の読み出し開始位置B1と同じである。図では、B1はブロック100内においてX方向にオフセット量=0として(0,n)として示されている。nはY方向のオフセット量である。B2も、ブロック100−2内における(0,n)から読み出される。   The read start position S2 of the next block 100-2 is set to a position shifted in the X direction by Sx when the integer part of the theoretical value is Sx and the decimal part is approximated to 0.25. Further, the block 200-2 in the block 100-2 is read according to the address of the address generator 16. The read start position B2 is the same as the read start position B1 of the block 200-1. In the figure, B1 is shown as (0, n) in the block 100 with the offset amount = 0 in the X direction. n is an offset amount in the Y direction. B2 is also read from (0, n) in the block 100-2.

次のブロック100−3の読み出し開始位置S3は、S2に対してSxだけずれた位置に設定される。また、ブロック100−3内においてブロック200−3が読み出される。読み出し開始位置B3は、ブロック200−2の読み出し開始位置B2と同じである。   The read start position S3 of the next block 100-3 is set at a position shifted by Sx with respect to S2. Further, the block 200-3 is read in the block 100-3. The read start position B3 is the same as the read start position B2 of the block 200-2.

次のブロック100−4の読み出し開始位置S4は、上記の例に従えばS3に対してSx+1だけずれた位置に設定されて蓄積誤差が解消されることとなるが、この場合にはブロック100−4の読み出し位置S4はS3に対して依然としてSxだけずれた位置とし、その代わりに、ブロック100−4内におけるブロック200−4の読み出し開始位置B4をB3に対して1だけX方向に変化させる。位置S4をS3に対して依然としてSxだけずれた位置とすると、理論値の小数部が0.25に近似された場合にはその累積誤差は1画素分となる。そこで、ブロック100−4内のブロック200−4の読み出し開始位置B4をX方向に1だけ増分することで、この累積誤差が解消されることになる。画像データの読み出し位置は、実質的にはブロック100−3の読み出し位置に対してSx+1だけずれた位置となる。   According to the above example, the reading start position S4 of the next block 100-4 is set to a position shifted by Sx + 1 with respect to S3, and the accumulation error is eliminated. In this case, the block 100- The read position S4 of 4 is still shifted by Sx with respect to S3. Instead, the read start position B4 of the block 200-4 in the block 100-4 is changed by 1 in the X direction with respect to B3. Assuming that the position S4 is still shifted by Sx with respect to S3, when the decimal part of the theoretical value is approximated to 0.25, the accumulated error is one pixel. Therefore, the cumulative error is eliminated by incrementing the read start position B4 of the block 200-4 in the block 100-4 by 1 in the X direction. The reading position of the image data is substantially shifted by Sx + 1 from the reading position of the block 100-3.

次のブロック100−5の読み出し開始位置S5は、S4に対してSxだけずれた位置に設定される。また、ブロック100−5内におけるブロック200−5の読み出し開始位置B5は、B4と同じ位置、すなわち1だけX方向に変化させた位置に設定される。ブロック100−6、100−7の読み出し、及びブロック200−6、200−7の読み出しについても同様である。   The read start position S5 of the next block 100-5 is set at a position shifted by Sx with respect to S4. The read start position B5 of the block 200-5 in the block 100-5 is set to the same position as B4, that is, a position changed by 1 in the X direction. The same applies to the reading of the blocks 100-6 and 100-7 and the reading of the blocks 200-6 and 200-7.

そして、ブロック100−8の読み出し開始位置S8及びブロック200−8の読み出し開始位置B8については、上記のようなアルゴリズムに従うならば、S8はS7に対してSxだけずれた位置に設定され、B8はB7に対してさらに1だけずれた位置に設定されることとなるが、ブロック200−8の読み出し開始位置が、ブロック100−8に対してトータルとして2画素分だけ、つまり1ワードに格納する画素数分だけのずれ量に等しいことになるから、ブロック200−8の読み出し開始位置B8をずらすのではなく、ブロック100−8の読み出し開始位置S8をS7に対してSx+2だけずらせることで対応する。この場合、ブロック200−8の読み出し開始位置B8はB1と同じ位置、すなわちX方向のオフセット量は再び0とする。   Then, with respect to the read start position S8 of the block 100-8 and the read start position B8 of the block 200-8, if following the algorithm as described above, S8 is set to a position shifted by Sx with respect to S7. Although the position is further shifted by 1 with respect to B7, the reading start position of the block 200-8 is a total of two pixels with respect to the block 100-8, that is, the pixels stored in one word. Since the amount of shift is equal to several minutes, the read start position B8 of the block 200-8 is not shifted, but the read start position S8 of the block 100-8 is shifted by Sx + 2 with respect to S7. . In this case, the read start position B8 of the block 200-8 is the same position as B1, that is, the offset amount in the X direction is set to 0 again.

このように、1ワードに複数画素分だけ格納されてパッキングされる場合、ブロック100単位で画像データを読み出す際に、1画素分だけずらせて読み出すことができないため、ワード以内のずれ量に関してはアンパック部13で1画素毎に分離するとともにブロック200を読み出す際に周期的に1画素ずつずらせて読み出すことで対応する。ブロック200の読み出し位置で微調整し、ブロック100の読み出し位置で粗調整するということもできよう。   As described above, when a plurality of pixels are stored and packed in one word, when the image data is read out in units of block 100, it cannot be read out by shifting by one pixel. When the unit 13 separates each pixel and reads out the block 200, the unit 13 periodically reads and shifts the pixels one by one. It can be said that fine adjustment is performed at the reading position of the block 200 and coarse adjustment is performed at the reading position of the block 100.

図12には、アドレス生成部12の構成ブロック図が示されている。アドレス生成部16は、複数のカウンタ30〜44、加算器46を含んで構成される。   FIG. 12 shows a configuration block diagram of the address generation unit 12. The address generation unit 16 includes a plurality of counters 30 to 44 and an adder 46.

カウンタ30は、ブロック100内のX方向アドレス計算カウンタであり、1ずつカウントしてブロック100のX方向(主走査方向)の画素数分までカウントする。カウント値は加算器46に供給され、カウントアップした場合のキャリー信号はカウンタ32に供給される。   The counter 30 is an X direction address calculation counter in the block 100 and counts one by one up to the number of pixels in the X direction (main scanning direction) of the block 100. The count value is supplied to the adder 46, and the carry signal when the count is incremented is supplied to the counter 32.

カウンタ32は、ブロック100内の行数計算カウンタであり、1ずつカウントしてブロック100の全行数までカウントする。カウント値は加算器46に供給され、カウントアップした場合のキャリー信号はカウンタ34に供給される。カウンタ32からのキャリー信号により、1つのブロック100における処理が完了したことを意味する。   The counter 32 is a counter for calculating the number of rows in the block 100 and counts one by one until the total number of rows in the block 100 is counted. The count value is supplied to the adder 46, and the carry signal when the count is incremented is supplied to the counter 34. The carry signal from the counter 32 means that the processing in one block 100 is completed.

カウンタ34は、ブロック移動時X方向アドレス増分カウンタであり、次のブロック100の処理に移行する際の読み出し開始アドレス(B1、B2等)を与えるカウンタである。Sblkx、すなわち理論値の小数部を1/4の精度で近似した値をステップ幅としてカウントし、X方向の画素数をfsとした場合にSblk×(fs/Wx−1)まで、すなわちX方向に存在するブロック100の個数分に相当する移動量までカウントする。   The counter 34 is an X-direction address increment counter at the time of block movement, and is a counter that gives a read start address (B1, B2, etc.) when shifting to the processing of the next block 100. Sblkx, that is, a value obtained by approximating the decimal part of the theoretical value with a precision of 1/4, is counted as a step width, and when the number of pixels in the X direction is fs, up to Sblk × (fs / Wx−1), that is, in the X direction Is counted up to the amount of movement corresponding to the number of blocks 100 existing in the.

カウント値は加算器46に供給され、カウントアップした場合のキャリー信号はカウンタ36のリセット信号として供給される。   The count value is supplied to the adder 46, and the carry signal in the case of counting up is supplied as a reset signal for the counter 36.

カウンタ36は、ブロック移動時X方向誤差補正周期カウンタであり、図11で示される読み出し開始位置B1、B2・・・の読み出し開始アドレスの変化周期を算出するものである。変化周期は、理論値の小数部を近似する場合の精度2により定まるから、1ずつカウントして2でカウントアップする。初期値Nblkxは、理論値Sblkxと2から定まる整数である。カウントアップした場合のキャリー信号はカウンタ38に供給される。 The counter 36 is an X-direction error correction cycle counter during block movement, and calculates a change cycle of the read start address at the read start positions B1, B2,... Shown in FIG. Since the change period is determined by the precision 2 n when approximating the decimal part of the theoretical value, the change period is counted one by one and counted up by 2 n . The initial value Nblkx is an integer determined from the theoretical value Sblkx and 2n . The carry signal when the count is up is supplied to the counter 38.

カウンタ38は、ブロック移動時X方向誤差補正量カウンタであり、図11で示される読み出し開始位置B1、B2・・の読み出し開始アドレスの変化周期における補正量を算出するものである。位置は1画素分ずつずらせるから、ステップは1(あるいは−1)としてカウントしていく。変化周期に達した時点でカウンタ38からカウント値が出力されて加算器46に供給される。カウント値は、カウンタ34のキャリー信号によりリセットされる。   The counter 38 is an X-direction error correction amount counter during block movement, and calculates a correction amount in the change period of the read start address at the read start positions B1, B2,. Since the position is shifted by one pixel, the step is counted as 1 (or -1). When the change period is reached, the count value is output from the counter 38 and supplied to the adder 46. The count value is reset by a carry signal of the counter 34.

カウンタ40〜42はバンド移動時のX方向アドレスを制御するカウンタである。ここで、「バンド」とは、ブロック100をX方向(主走査方向)に走査する場合の、1走査当たりのブロック群を意味する。   Counters 40 to 42 are counters for controlling the X-direction address during band movement. Here, the “band” means a block group per scan when the block 100 is scanned in the X direction (main scanning direction).

カウンタ40は、バンド移動時X方向アドレス増分カウンタであり、あるバンドから次のバンドに移行するときのX方向のずれ量を与えるものである。これは、図11のブロック100群が各バンドの先頭ブロックである場合の、それぞれのSxに相当するものである。カウンタ40の初期値は0であり、ステップ幅はSbndx、すなわち理論値の整数部(図11におけるSx)に設定される。リミット値は、Y方向(副走査方向)のブロック数ss/Wyで定まる。ここで、ssは副走査方向の画素数である。カウント値は加算器46に供給される。   The counter 40 is an X direction address increment counter at the time of band movement, and gives an amount of deviation in the X direction when shifting from a certain band to the next band. This corresponds to each Sx when the block 100 group in FIG. 11 is the first block of each band. The initial value of the counter 40 is 0, and the step width is set to Sbndx, that is, the integer part of the theoretical value (Sx in FIG. 11). The limit value is determined by the number of blocks ss / Wy in the Y direction (sub-scanning direction). Here, ss is the number of pixels in the sub-scanning direction. The count value is supplied to the adder 46.

カウンタ42は、バンド移動時X方向誤差補正周期カウンタであり、図11のブロック100群が各バンドの先頭ブロックである場合の、Sxの変化周期を与えるものである。初期値Nbndxは、Sbndxの理論値と小数部の分割数(精度)から定まる整数である。キャリー信号はカウンタ44に供給される。   The counter 42 is an X direction error correction cycle counter during band movement, and gives a change cycle of Sx when the block 100 group in FIG. 11 is the head block of each band. The initial value Nbndx is an integer determined from the theoretical value of Sbndx and the number of divisions (precision) of the fractional part. The carry signal is supplied to the counter 44.

カウンタ44は、バンド移動時X方向誤差補正量カウンタであり、カウンタ42からのキャリー信号、すなわち補正周期に達したときに読み出し開始アドレスを1あるいは−1だけ変化させるものである。カウント値は加算器46に供給される。   The counter 44 is an X direction error correction amount counter during band movement, and changes the read start address by 1 or -1 when the carry signal from the counter 42, that is, the correction period is reached. The count value is supplied to the adder 46.

図13には、アドレス生成部16のタイミングチャートが示されている。(a)は読み出しクロック(リードクロック)であり、カウンタ30に供給される。(b)はブロック内X方向アドレス値であり、カウンタ30からの出力値である。ブロック100内のX方向画素数をNとすると0〜Nまでカウントする。(c)はブロック内行数値であり、カウンタ32からの出力値である。ブロック100内の行数をMとすると0〜Mまでカウントする。ブロック内カウント値がNになるとそのキャリー信号が入力され、0から1ずつインクリメントされMに至る。(d)はブロック移動時X増分値であり、カウンタ34からの出力値である。図では説明の都合上、0、1、2・・と示しているが、実際はこれらにSblkxを乗じた値、すなわち0、Sblkx、2・Sblkx、・・である。(e)はX誤差補正周期であり、カウンタ36からの出力値である。補正周期をKとすると、Kまでカウントしたときにキャリー信号を出力する。(f)はブロック移動X誤差補正値であり、カウンタ38からのカウント値である。(e)のカウント値がKとなったタイミングでブロック移動誤差補正値、すなわち1あるいは−1が出力されてブロック200の読み出し開始位置がずれて累積誤差が解消される。(g)はバンド移動時X増分であり、カウンタ40からの出力値である。バンド内のブロック数をLとすると、(d)のブロック移動時X増分がLまでカウントアップした、つまり1つのバンドの処理が終了したタイミングでインクリメントする。図では説明の都合上、0、1、・・と示しているが、実際はこれらにSbndxである。X方向アドレスは、図11に示されるように、カウンタ30、34、38、40、44の加算値として与えられる。すなわち、カウンタ40、44によりあるバンドの先頭ブロックのX方向アドレスが与えられ、34、38で当該バンド内における各ブロックのX方向アドレスが与えられ、カウンタ30で各ブロック内におけるX方向アドレスが与えられる。   FIG. 13 shows a timing chart of the address generation unit 16. (A) is a read clock (read clock), which is supplied to the counter 30. (B) is an in-block X-direction address value, which is an output value from the counter 30. If the number of pixels in the X direction in the block 100 is N, 0 to N are counted. (C) is a row numerical value in the block, which is an output value from the counter 32. If the number of rows in the block 100 is M, it counts from 0 to M. When the in-block count value becomes N, the carry signal is input, incremented from 0 to 1 and reaches M. (D) is an X increment value at the time of block movement, which is an output value from the counter 34. In the figure, for convenience of explanation, 0, 1, 2,... Are shown, but in actuality, these values are multiplied by Sblkx, that is, 0, Sblkx, 2 · Sblkx,. (E) is an X error correction period, which is an output value from the counter 36. If the correction period is K, a carry signal is output when the correction period is counted up to K. (F) is a block movement X error correction value, which is a count value from the counter 38. At the timing when the count value of (e) becomes K, the block movement error correction value, that is, 1 or −1 is output, the read start position of the block 200 is shifted, and the accumulated error is eliminated. (G) is an X increment during band movement, and is an output value from the counter 40. When the number of blocks in a band is L, the X increment at the time of block movement in (d) is counted up to L, that is, incremented at the timing when processing of one band is completed. In the figure, for convenience of explanation, 0, 1,... Are shown, but these are actually Sbndx. The X-direction address is given as an added value of the counters 30, 34, 38, 40, 44 as shown in FIG. That is, the X direction address of the first block of a band is given by the counters 40 and 44, the X direction address of each block in the band is given by 34 and 38, and the X direction address in each block is given by the counter 30. It is done.

以上説明したように、本実施形態では、X方向、Y方向の少なくともいずれか(好適にはX方向及びY方向のいずれにも)において、スキュー角θに応じたブロック読み出し開始位置の理論値を近似するとともに、近似した小数部の値あるいは近似精度に応じて読み出し開始アドレスを周期的に変化させることで、累積誤差を解消することができる。   As described above, in this embodiment, the theoretical value of the block read start position corresponding to the skew angle θ is determined in at least one of the X direction and the Y direction (preferably in both the X direction and the Y direction). Accumulation errors can be eliminated by approximating and periodically changing the read start address in accordance with the value of the approximated decimal part or the approximation accuracy.

また、1ワード内に複数画素、例えば2画素分の画像データをパッキングして格納する場合においては、ブロック100内で読み出すべきブロック200の読み出し開始位置を周期的に変化させ、かつ、ブロック100の読み出し開始位置を周期的に変化させることで、累積誤差を高精度に解消することができる。   In addition, in the case where image data for a plurality of pixels, for example, two pixels, is packed and stored in one word, the reading start position of the block 200 to be read in the block 100 is periodically changed, and the block 100 By changing the reading start position periodically, the accumulated error can be eliminated with high accuracy.

アドレス制御の態様をまとめると、以下のようになる。   The address control mode is summarized as follows.

(1)X方向、Y方向のそれぞれにおいてアドレス生成部12にてアドレスを周期的に1画素分移動させる。
(2)X方向、Y方向のそれぞれにおいてアドレス生成部16でアドレスを周期的に1画素分移動させるとともに、アドレス生成部12でアドレスを周期的に複数画素分(ワード内の画素分)移動させる。
(3)X方向においてアドレス生成部16でアドレスを周期的に1画素分移動させ、アドレス生成部12でアドレスを周期的に複数画素分(ワード内の画素分)移動させるとともに、Y方向においてアドレス生成12にてアドレスを周期的に1画素分移動させる。
(1) The address generator 12 periodically moves the address by one pixel in each of the X direction and the Y direction.
(2) The address generator 16 periodically moves the address by one pixel in each of the X direction and the Y direction, and the address generator 12 periodically moves the address by a plurality of pixels (pixels in the word). .
(3) The address generation unit 16 periodically moves the address by one pixel in the X direction, and the address generation unit 12 periodically moves the address by a plurality of pixels (pixels in the word) and addresses in the Y direction. In generation 12, the address is periodically moved by one pixel.

なお、上記の(3)は、X方向の複数画素のみが1ワードとしてパッキングされていることを考慮したものである。X方向及びY方向に複数画素が1ワード内にパッキングされている場合には、(2)の態様が好適である。   The above (3) takes into account that only a plurality of pixels in the X direction are packed as one word. When a plurality of pixels are packed in one word in the X direction and the Y direction, the mode (2) is preferable.

実施形態の構成ブロック図である。It is a configuration block diagram of an embodiment. ブロック読み出しの概念説明図である。It is a conceptual explanatory view of block reading. ブロック読み出しの概念説明図である。It is a conceptual explanatory view of block reading. スキュー補正説明図である。It is skew correction explanatory drawing. スキュー補正説明図である。It is skew correction explanatory drawing. スキュー補正の補間説明図である。It is interpolation explanatory drawing of skew correction. スキューの傾き理論値と小数部近似値、及び周期変化を示す説明図である。It is explanatory drawing which shows the inclination value of a skew, a decimal part approximate value, and a period change. Y方向の読み出し開始アドレスの周期変化説明図である。It is an explanatory view of a cycle change of a read start address in the Y direction. 実施形態のスキュー補正後の画像説明図である。It is image explanatory drawing after skew correction of embodiment. 他の実施形態の構成ブロック図である。It is a block diagram of the configuration of another embodiment. X方向の読み出し開始アドレスの周期変化説明図である。It is an explanatory view of a cycle change of a read start address in the X direction. アドレス生成部12の構成ブロック図である。3 is a block diagram illustrating the configuration of an address generation unit 12. FIG. 実施形態のタイミングチャートである。It is a timing chart of an embodiment. 従来技術の回転処理説明図である。It is rotation processing explanatory drawing of a prior art. スキュー補正時のブロック読み出し説明図である。It is block reading explanatory drawing at the time of skew correction. Y方向の読み出し開始アドレスの誤差蓄積説明図である。It is an error accumulation explanatory diagram of the read start address in the Y direction. スキューした入力画像説明図である。FIG. 6 is an explanatory diagram of a skewed input image. 従来技術でスキュー補正した場合の画像説明図である。It is image explanatory drawing at the time of carrying out skew correction by a prior art.

符号の説明Explanation of symbols

10 大容量低速メモリ(ページメモリあるいはバンドメモリ:第1記憶手段)、12 アドレス生成部(第1アドレス生成部)、14 小容量高速メモリ(第2記憶手段)、16 アドレス生成部(第2アドレス生成部)、18 演算部、20 大容量低速メモリ(第3記憶手段)、22 アドレス生成部。   10 large-capacity low-speed memory (page memory or band memory: first storage unit), 12 address generation unit (first address generation unit), 14 small-capacity high-speed memory (second storage unit), 16 address generation unit (second address) Generator), 18 arithmetic unit, 20 large-capacity low-speed memory (third storage means), 22 address generator.

Claims (7)

入力画像を回転して出力する画像処理装置であって、
入力画像を記憶する第1記憶手段と、
前記第1記憶手段に記憶された画像データをブロック単位で読み出すための第1読み出しアドレスを生成する第1アドレス生成手段と、
前記第1読み出しアドレスに従い前記第1記憶手段から読み出された画像データを記憶する第2記憶手段と、
前記第2記憶手段に記憶された画像データを読み出すための第2読み出しアドレスを生成する第2アドレス生成手段と、
前記第2読み出しアドレスに従い前記第2記憶手段から読み出された画像データに対し、前記入力画像の回転角度に応じた回転処理を行う演算手段と、
回転処理された画像データを記憶する第3記憶手段と、
を有し、
前記第1アドレス生成手段は、前記入力画像の回転角度に応じて前記第1記憶手段から斜め方向にブロック単位で読み出すべく、その小数部を所定の精度で近似して前記第1読み出しアドレスを順次生成し、かつ、前記第1読み出しアドレスを前記精度に応じた周期で所定量だけ増減させることで前記近似による前記第1読み出しアドレスの累積誤差を抑制する
ことを特徴とする画像処理装置。
An image processing apparatus that rotates and outputs an input image,
First storage means for storing an input image;
First address generation means for generating a first read address for reading the image data stored in the first storage means in block units;
Second storage means for storing image data read from the first storage means according to the first read address;
Second address generation means for generating a second read address for reading image data stored in the second storage means;
Arithmetic means for performing rotation processing according to the rotation angle of the input image on the image data read from the second storage means according to the second read address;
Third storage means for storing the rotated image data;
Have
The first address generation means sequentially approximates the decimal part with a predetermined accuracy and sequentially reads the first read addresses so as to read the first storage means diagonally in blocks from the first storage means according to the rotation angle of the input image. An image processing apparatus that suppresses an accumulated error of the first read address due to the approximation by generating and increasing / decreasing the first read address by a predetermined amount in a cycle according to the accuracy.
入力画像を回転して出力する画像処理装置であって、
入力画像を記憶する第1記憶手段と、
前記第1記憶手段に記憶された画像データをブロック単位で読み出すための第1読み出しアドレスを生成する第1アドレス生成手段と、
前記第1読み出しアドレスに従い前記第1記憶手段から読み出された画像データを記憶する第2記憶手段と、
前記第2記憶手段に記憶された画像データを読み出すための第2読み出しアドレスを生成する第2アドレス生成手段と、
前記第2読み出しアドレスに従い前記第2記憶手段から読み出された画像データに対し、前記入力画像の回転角度に応じた回転処理を行う演算手段と、
回転処理された画像データを記憶する第3記憶手段と、
を有し、
前記第1アドレス生成手段は、前記入力画像の回転角度に応じて前記第1記憶手段から斜め方向にブロック単位で読み出すべく、その小数部を所定の精度で近似して前記第1読み出しアドレスを順次生成し、
前記第2アドレス生成手段は、前記近似による前記第1読み出しアドレスの累積誤差が所定画素数より小さい場合に前記第2読み出しアドレスを前記精度に応じた周期で所定量だけ増減させることで前記近似による前記第1読み出しアドレスの累積誤差を抑制する
ことを特徴とする画像処理装置。
An image processing apparatus that rotates and outputs an input image,
First storage means for storing an input image;
First address generation means for generating a first read address for reading the image data stored in the first storage means in block units;
Second storage means for storing image data read from the first storage means according to the first read address;
Second address generation means for generating a second read address for reading image data stored in the second storage means;
Arithmetic means for performing rotation processing according to the rotation angle of the input image on the image data read from the second storage means according to the second read address;
Third storage means for storing the rotated image data;
Have
The first address generation means sequentially approximates the decimal part with a predetermined accuracy and sequentially reads the first read addresses so as to read the first storage means obliquely in block units according to the rotation angle of the input image. Generate
The second address generation means increases or decreases the second read address by a predetermined amount in a cycle according to the accuracy when the accumulated error of the first read address by the approximation is smaller than a predetermined number of pixels. An image processing apparatus that suppresses an accumulated error of the first read address.
請求項2記載の装置において、
前記第1アドレス生成手段は、前記第1読み出しアドレスの累積誤差が前記所定画素数以上の場合に前記第1読み出しアドレスを所定量だけ増減させることで前記近似による前記第1読み出しアドレスの累積誤差を抑制する
ことを特徴とする画像処理装置。
The apparatus of claim 2.
The first address generation means may increase or decrease the first read address by the approximation by increasing or decreasing the first read address by a predetermined amount when the accumulated error of the first read address is greater than or equal to the predetermined number of pixels. An image processing apparatus characterized by suppressing the above.
請求項1〜3のいずれかに記載の装置において、
前記第1アドレス生成手段は、前記入力画像の回転角度をθ、前記ブロックサイズをWとした場合にW×sinθで前記第1読み出しアドレスの理論値を算出し、かつ、前記理論値の小数部を1/2(nは自然数)の精度で近似する
ことを特徴とする画像処理装置。
In the apparatus in any one of Claims 1-3,
The first address generation means calculates the theoretical value of the first read address by W × sin θ when the rotation angle of the input image is θ and the block size is W, and the decimal part of the theoretical value Is approximated with an accuracy of 1/2 n (n is a natural number).
請求項1記載の装置において、
前記第1アドレス生成手段は、前記入力画像の回転角度をθ、前記ブロックサイズをWとした場合にW×sinθで前記第1読み出しアドレスの理論値を算出し、かつ、前記理論値の小数部を0、0.25、0.5、0.75のいずれかに近似し、前記近似値に応じた周期で前記第1読み出しアドレスの整数部を1だけ増減させる
ことを特徴とする画像処理装置。
The apparatus of claim 1.
The first address generation means calculates the theoretical value of the first read address by W × sin θ when the rotation angle of the input image is θ and the block size is W, and the decimal part of the theoretical value Is approximated to any one of 0, 0.25, 0.5, and 0.75, and the integer part of the first read address is increased or decreased by 1 in a cycle according to the approximate value. .
請求項2記載の装置において、
前記第1アドレス生成手段は、前記入力画像の回転角度をθ、前記ブロックサイズをWとした場合にW×sinθで前記第1読み出しアドレスの理論値を算出し、かつ、前記理論値の小数部を0、0.25、0.5、0.75のいずれかに近似し、
前記第2アドレス生成手段は、前記近似値に応じた周期で前記第2読み出しアドレスを増減させる
ことを特徴とする画像処理装置。
The apparatus of claim 2.
The first address generation means calculates the theoretical value of the first read address by W × sin θ when the rotation angle of the input image is θ and the block size is W, and the decimal part of the theoretical value Is approximated to 0, 0.25, 0.5, or 0.75,
The image processing apparatus, wherein the second address generation unit increases or decreases the second read address in a cycle according to the approximate value.
請求項1〜3のいずれかに記載の装置において、
前記第1アドレス生成手段は、主走査方向及び前記主走査方向に垂直な副走査方向のアドレスを前記第1読み出しアドレスとして生成し、前記主走査方向あるいは前記副走査方向の少なくともいずれかのアドレスに対して前記近似及び前記増減を実行することを特徴とする画像処理装置。
In the apparatus in any one of Claims 1-3,
The first address generation unit generates an address in a main scanning direction and a sub-scanning direction perpendicular to the main scanning direction as the first read address, and sets the address as at least one of the main scanning direction and the sub-scanning direction. An image processing apparatus, wherein the approximation and the increase / decrease are executed.
JP2004171817A 2004-06-09 2004-06-09 Image processing apparatus Withdrawn JP2005352703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004171817A JP2005352703A (en) 2004-06-09 2004-06-09 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004171817A JP2005352703A (en) 2004-06-09 2004-06-09 Image processing apparatus

Publications (1)

Publication Number Publication Date
JP2005352703A true JP2005352703A (en) 2005-12-22

Family

ID=35587146

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004171817A Withdrawn JP2005352703A (en) 2004-06-09 2004-06-09 Image processing apparatus

Country Status (1)

Country Link
JP (1) JP2005352703A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006005499A (en) * 2004-06-15 2006-01-05 Fuji Xerox Co Ltd Image processing apparatus
JP2007272593A (en) * 2006-03-31 2007-10-18 Topcon Corp Image data processing method, image data processor, image display method, image display device and charged particle beam device
US7959151B2 (en) 2006-11-29 2011-06-14 Ricoh Company, Ltd. Image forming apparatus and recording medium conveying device included in the image forming apparatus
JP2018007100A (en) * 2016-07-05 2018-01-11 株式会社リコー Image processing device, image processing method, and program
JP2018157492A (en) * 2017-03-21 2018-10-04 富士ゼロックス株式会社 Image processing apparatus, image processing method and program
JP2020501455A (en) * 2016-12-09 2020-01-16 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッドAdvanced Micro Devices Incorporated Simultaneous image compression and thumbnail generation

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006005499A (en) * 2004-06-15 2006-01-05 Fuji Xerox Co Ltd Image processing apparatus
JP2007272593A (en) * 2006-03-31 2007-10-18 Topcon Corp Image data processing method, image data processor, image display method, image display device and charged particle beam device
JP4711263B2 (en) * 2006-03-31 2011-06-29 株式会社トプコン Image data processing method, image data processing device, image display method, image display device, and charged particle beam device
US7959151B2 (en) 2006-11-29 2011-06-14 Ricoh Company, Ltd. Image forming apparatus and recording medium conveying device included in the image forming apparatus
JP2018007100A (en) * 2016-07-05 2018-01-11 株式会社リコー Image processing device, image processing method, and program
JP2020501455A (en) * 2016-12-09 2020-01-16 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッドAdvanced Micro Devices Incorporated Simultaneous image compression and thumbnail generation
JP2022009091A (en) * 2016-12-09 2022-01-14 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Simultaneous image compression and thumbnail generation
JP7194247B2 (en) 2016-12-09 2022-12-21 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Simultaneous image compression and thumbnail generation
JP2018157492A (en) * 2017-03-21 2018-10-04 富士ゼロックス株式会社 Image processing apparatus, image processing method and program

Similar Documents

Publication Publication Date Title
JP4781229B2 (en) Distortion correction apparatus, imaging apparatus, and control method for distortion correction apparatus
EP0284043A2 (en) Method of and apparatus for connecting output image signals from a plurality of line image sensors
JPH05260287A (en) Improvement of picture enlargement/reduction device
JP2012231401A (en) Image processing apparatus, image processing method, and computer program
JPH0737082A (en) Method and device for rotating multilevel picture 90 degrees
JP4317624B2 (en) Image processing device
US8054320B1 (en) Horizontal strip column-first two-dimensional scaling
JP2005352703A (en) Image processing apparatus
JP2006191362A (en) Device and method for processing image data
JP2005135096A (en) Image processing method, image processing apparatus and program
JP2007079708A (en) Image processor and processing method
JP2004140702A (en) Image signal processor, gamma correcting method and display
JP2001143062A (en) Rotational conversion of image using block transfer
JP4270035B2 (en) Image processing device
JP6295619B2 (en) Image processing apparatus and method, and electronic apparatus
US5793378A (en) Implementation for high speed arbitrary angle of rotation
JP3602884B2 (en) Image processing device
US9195160B2 (en) Image forming apparatus and image forming method for correcting registration deviation
JP2005086598A (en) Device, method, program, and circuit for processing image
JP3786229B2 (en) Image reading device
JP6278716B2 (en) Image processing apparatus, image processing method, and program
JP6156653B2 (en) Image transformation device
JP2006159451A5 (en)
JP4232712B2 (en) Image processing device
JP2012183805A (en) Image forming apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070517

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090116