JP2009100313A - Image processing device and image forming apparatus - Google Patents

Image processing device and image forming apparatus Download PDF

Info

Publication number
JP2009100313A
JP2009100313A JP2007270638A JP2007270638A JP2009100313A JP 2009100313 A JP2009100313 A JP 2009100313A JP 2007270638 A JP2007270638 A JP 2007270638A JP 2007270638 A JP2007270638 A JP 2007270638A JP 2009100313 A JP2009100313 A JP 2009100313A
Authority
JP
Japan
Prior art keywords
data
input
memory
image
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007270638A
Other languages
Japanese (ja)
Inventor
Hirofumi Sakagami
弘文 阪上
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2007270638A priority Critical patent/JP2009100313A/en
Publication of JP2009100313A publication Critical patent/JP2009100313A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a low cost image processing device can performing image rotation processing faster than central processing unit (CPU) processing while using a small-capacity memory. <P>SOLUTION: The image processing device includes: paired memories which alternately input and output image data; paired memories which alternately input and output image data output from the memories; and an address generating circuit which generates an address for rotating image databased on a rotation angle value and outputs the address to the memories, respectively. Source image data are divided, alternately input to the paired memories in order and data alternately output from the memories are input to the following paired memories using the generated address, and then output. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像処理装置に関し、特に、画像に対して回転処理を行う画像処理装置およびこれを用いる画像形成装置に関する。   The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that performs rotation processing on an image and an image forming apparatus that uses the image processing apparatus.

特許文献1に記載の発明では、入力部と出力部に大容量メモリを使用して、以下の処理順序で入力画像の回転処理を行う画像処理装置。まず、第1のメモリ(大容量)に画像データを入力する。次に、第1のメモリから一部の画像データを出力して第2のメモリ(小容量)に入力し、第2のメモリ上で画像の回転処理を行う。更に、処理後の画像データを第2のメモリから出力して第3のメモリ(大容量)に入力する。この処理を第1のメモリ内の全画像データに対して繰返し処理して、第1のメモリに入力した画像の回転処理後の画像データを第3のメモリに入力する。最後に、第3のメモリ内の画像データを出力する技術が開示されている。   In the invention described in Patent Document 1, an image processing apparatus that uses a large-capacity memory for an input unit and an output unit and performs rotation processing of an input image in the following processing order. First, image data is input to a first memory (large capacity). Next, a part of the image data is output from the first memory and input to the second memory (small capacity), and the image is rotated on the second memory. Further, the processed image data is output from the second memory and input to the third memory (large capacity). This process is repeated for all the image data in the first memory, and the image data after the rotation process of the image input to the first memory is input to the third memory. Finally, a technique for outputting image data in the third memory is disclosed.

また、特許文献2には、入力画像の方向や傾きを判別し、画像の傾きを補正する画像処理方法が開示されている。この方法は、コンピュータプログラムとして実現されており、画像の回転処理はCPU(Central Processing Unit)で行う技術である。
特開2006−005499号公報 特開2003−259111号公報
Patent Document 2 discloses an image processing method for determining the direction and inclination of an input image and correcting the inclination of the image. This method is realized as a computer program, and is a technique for performing image rotation processing by a CPU (Central Processing Unit).
JP 2006-005499 A JP 2003-259111 A

しかしながら、特許文献1記載の発明では、入力部と出力部に大容量メモリを使用しているので、装置が高価となる難点がある。また、特許文献2記載の発明では、CPUで画像の回転処理を行っているので、処理が低速であるとの難点がある。   However, in the invention described in Patent Document 1, since a large capacity memory is used for the input unit and the output unit, there is a problem that the device becomes expensive. Further, in the invention described in Patent Document 2, since the image is rotated by the CPU, there is a problem that the processing is slow.

本発明は、上記実情を考慮してなされたものであり、CPU処理より高速で、また、小容量メモリを用いて画像回転処理を行うことができる、低価格の画像処理装置を提供する事を目的とする。   The present invention has been made in consideration of the above circumstances, and provides a low-cost image processing apparatus that can perform image rotation processing using a small-capacity memory at a higher speed than CPU processing. Objective.

上記課題を解決するために、請求項1に記載の発明は、画像データを交互に入力して出力する対となる第1と第2のメモリと、前記第1と第2のメモリから出力される画像データを交互に入力し出力する対となる第3と第4のメモリと、入力された所定の角度値に基づき、元画像データを回転させるためのアドレスを生成して前記第1乃至第4のメモリにそれぞれに出力するアドレス生成回路とを有し、入力画像保持手段によって保持された元画像データを分割して順番に前記第1と第2のメモリに交互に入力し、前記第1と第2のメモリから交互にデータを出力し、これら出力データを前記アドレス生成回路から出力されたアドレスを使用して、前記第3と第4のメモリに交互に入力し、前記第3と第4のメモリから交互にデータを出力する、ことにより前記画像データを回転させた画像データを得る画像処理装置であることを特徴とする。   In order to solve the above-mentioned problem, the invention according to claim 1 outputs a pair of first and second memories that alternately input and output image data, and the first and second memories. Based on the inputted third angle and fourth memory that alternately input and output image data to be output, and an input predetermined angle value, an address for rotating the original image data is generated to generate the first to the first memories. Each of the first and second memories is divided and sequentially input to the first and second memories, and the first image data is sequentially input to the first and second memories. Data is alternately output from the second memory and the output data is alternately input to the third and fourth memories using the address output from the address generation circuit, and the third and second memories are input. Output data alternately from 4 memory Characterized by an image processing apparatus for obtaining image data by rotating the image data by.

また、請求項2に記載の発明は、請求項1に記載の画像処理装置において、注目画素の周辺の8画素を含む9画素それぞれのデータを保持する手段と、前記9画素から注目画素の回転後のアドレスに近い3画素を選択出力する手段と、前記3画素と注目画素との4画素から補間データを演算出力する手段と、からなる補間回路を更に有し、前記第1と第2のメモリからの出力データを前記補間回路に入力し、該補間回路からの出力データを前記第3と第4のメモリに入力することを特徴とする。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect of the present invention, means for holding data of each of nine pixels including eight pixels around the target pixel, and rotation of the target pixel from the nine pixels An interpolation circuit further comprising: means for selectively outputting three pixels close to the later address; and means for calculating and outputting interpolation data from four pixels of the three pixels and the target pixel. Output data from a memory is input to the interpolation circuit, and output data from the interpolation circuit is input to the third and fourth memories.

請求項3に記載の発明は、画像データを交互に入力して出力する対となる第1と第2のメモリと、前記第1と第2のメモリから出力される画像データを交互に入力し出力する対となる第5と第6のメモリと、前記第5と第6のメモリから出力される画像データを交互に入力し出力する対となる第3と第4のメモリと、入力された所定の角度値に基づき、元画像データを回転させるためのアドレスを生成して前記第1乃至第4のメモリに出力するアドレス生成回路とを有し、入力画像保持手段によって保持された元画像データを分割して順番に前記第1と第2のメモリに交互に入力し、前記第1と第2のメモリから交互にデータを出力し、これら出力データを前記アドレス生成回路から出力されたアドレスを使用して、前記第3と第4のメモリに交互に入力し、前記第3と第4のメモリから交互にデータを出力し、これら出力データを、前記第5と第6のメモリに交互に入力し、前記第5と第6のメモリから交互にデータを出力する、ことを特徴とする。   According to a third aspect of the present invention, a pair of first and second memories that alternately input and output image data and image data output from the first and second memories are alternately input. The fifth and sixth memories that form a pair to be output, and the third and fourth memories that form a pair that alternately input and output the image data output from the fifth and sixth memories are input Original image data held by an input image holding means, having an address generation circuit that generates an address for rotating the original image data based on a predetermined angle value and outputs the address to the first to fourth memories Are sequentially input to the first and second memories in order, and data are alternately output from the first and second memories, and the output data is output from the address generation circuit. Use the third and fourth memory Alternately input, alternately output data from the third and fourth memories, and alternately input the output data to the fifth and sixth memories and alternately from the fifth and sixth memories. And outputting data.

請求項4に記載の発明は、請求項3に記載の画像処理装置において、注目画素の周辺の8画素を含む9画素を保持する手段と、前記9画素から注目画素の回転後のアドレスに近い3画素を選択出力する手段と、前記3画素と注目画素との4画素から補間データを演算出力する手段とからなる補間回路を更に有し、前記第1と第2のメモリからの出力データを前記補間回路に入力し、該補間回路からの出力データを前記第3と第4のメモリに入力することを特徴とする。   According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect of the present invention, means for holding nine pixels including eight pixels around the target pixel, and an address after rotation of the target pixel from the nine pixels An interpolation circuit comprising: means for selectively outputting three pixels; and means for calculating and outputting interpolation data from the four pixels of the three pixels and the target pixel, and output data from the first and second memories It is input to the interpolation circuit, and output data from the interpolation circuit is input to the third and fourth memories.

請求項5に記載の発明は、画像データが入力される第1の先入れ先出し型メモリと、前記第1の先入れ先出し型メモリから出力される画像データを交互に入力し出力する対となる第1と第2のメモリと、入力された所定の角度値に基づき、元画像データを回転させるためのアドレスを生成して前記第1と第2のメモリに出力するアドレス生成回路と、前記第1と第2のメモリから交互に出力されるデータを入力する第2の先入れ先出し型メモリとを有し、入力画像保持手段によって保持された元画像データを、分割して順番に、前記第1の先入れ先出し型メモリに入力し、前記第1の先入れ先出し型メモリからの出力データを前記アドレス生成回路から出力されたアドレスを使用して、前記第1と第2のメモリに交互に入力し、前記第1と第2のメモリから交互にデータを出力し前記第2の先入れ先出し型メモリに入力し、該第2の先入れ先出し型メモリから出力する、ことを特徴とする。   According to a fifth aspect of the present invention, a first first-in first-out type memory to which image data is input and a first and a first pair that input and output the image data output from the first first-in first-out type memory alternately. 2, an address generation circuit that generates an address for rotating the original image data based on the input predetermined angle value, and outputs the address to the first and second memories, and the first and second A second first-in first-out type memory that inputs data alternately output from the first memory, and divides the original image data held by the input image holding unit into the first first-in first-out type memory in order. And the output data from the first first-in first-out memory is alternately input to the first and second memories using the address output from the address generation circuit, and the first and second memories are input. The output data alternately from the memory and input to the second first-in-first-out memory, outputted from the second first-in-first-out memory, it is characterized.

請求項6に記載の発明は、請求項5に記載の画像処理装置において、注目画素の周辺の8画素を含む9画素それぞれのデータを保持する手段と、前記9画素から注目画素の回転後のアドレスに近い3画素を選択出力する手段と、前記3画素と注目画素との4画素から補間データを演算出力する手段とからなる補間回路を更に有し、前記第1の先入れ先出し型メモリからの出力データを前記補間回路に入力し、該補間回路からの出力データを前記第1と第2のメモリに入力することを特徴とする。   According to a sixth aspect of the present invention, in the image processing device according to the fifth aspect of the present invention, means for holding data of each of nine pixels including eight pixels around the target pixel, and after the rotation of the target pixel from the nine pixels An output from the first first-in first-out memory is further provided with an interpolation circuit comprising means for selectively outputting three pixels close to the address and means for calculating and outputting interpolation data from four pixels of the three pixels and the target pixel. Data is input to the interpolation circuit, and output data from the interpolation circuit is input to the first and second memories.

請求項7に記載の発明は、画像形成装置原稿をスキャンして画像データに変換する画像入力手段と、画像データを用紙に印刷する画像形成手段と、スキャン画像における原稿や画像の傾きを検出する手段と、請求項1乃至6の何れか1つに記載の画像処理装置と、を有する画像形成装置であることを特徴とする。   According to a seventh aspect of the present invention, an image input unit that scans an image forming apparatus document to convert it into image data, an image forming unit that prints image data on a sheet, and a document or an image inclination in the scanned image are detected. And an image processing apparatus according to any one of claims 1 to 6.

本発明によれば、小容量メモリによって画像回転処理を行う、低価格で高速な画像処理装置を提供することができる。補間回路を備えたものでは、特に、画像回転による画質の劣化を防止することが可能になっている。   According to the present invention, it is possible to provide a low-cost and high-speed image processing apparatus that performs image rotation processing using a small-capacity memory. In particular, the apparatus including the interpolation circuit can prevent the deterioration of the image quality due to the image rotation.

以下、図面を参照して、本発明の実施形態を詳細に説明する。図1に本発明に係る実施形態としての画像処理装置を含む画像形成装置の構成の概要図を示す。本実施の形態は、複写機、プリンタ、複合機(複写機、プリンタ、スキャナ、ファクシミリ装置の機能を有する機器)等における画像形成装置として適用可能である。図示した画像形成装置100は、書類を光学的に読取り、画像データに変換する画像入力手段としてのスキャナ1、画像データを用紙に印刷して出力する画像出力手段としてのプリンタ2、スキャナ2から出力された画像データや、本装置全体の動作を制御するコンピュータプログラムを記憶するハードディスク装置3、本装置をユーザーが操作するための操作部4(ボタンやタッチパネル、文字や画像を表示するための液晶表示装置からなる)、本装置の動作を制御するためのCPU5(Central Processing Unit)、CPU5がアクセスするデータやコンピュータプログラムを一時的に蓄積するとともに画像蓄積手段として機能する主メモリ6、そして、画像データの回転処理を行う画像回転手段としての画像回転処理部10を含み構成され、これらが各種データをやり取りするためのデータバス7を介して接続されている。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a schematic diagram of a configuration of an image forming apparatus including an image processing apparatus as an embodiment according to the present invention. The present embodiment can be applied as an image forming apparatus in a copying machine, a printer, a multifunction machine (equipment having functions of a copying machine, a printer, a scanner, and a facsimile machine). The illustrated image forming apparatus 100 optically reads a document and outputs it from a scanner 1 as an image input unit that converts the image data into image data, a printer 2 as an image output unit that prints and outputs image data on paper, and outputs from the scanner 2. Hard disk device 3 for storing the image data and computer program for controlling the overall operation of the apparatus, operation unit 4 for operating the apparatus by a user (buttons, touch panel, liquid crystal display for displaying characters and images) CPU 5 (Central Processing Unit) for controlling the operation of this apparatus, main memory 6 that temporarily stores data and computer programs accessed by CPU 5 and functions as image storage means, and image data The image rotation processing unit 10 as an image rotation means for performing the rotation processing of Al is connected via a data bus 7 for exchanging various kinds of data.

画像回転処理部10にて、スキャン画像における原稿や画像の傾きを補正するためには、まず原稿や画像の傾き角αを検出する。検出方法は、例えば、前掲の特許文献1にても開示されている既知の以下の方法のいずれかを使用すれば良い。第1の方法では、CPU5で、原稿の4つの頂点座標を検出し、これらの頂点座標の位置関係から検出する。或いは、第2の方法として、操作部4の液晶表示装置に原稿のプリスキャン画像を表示し、これをもとにユーザーが傾き角を読取り、傾きを補正するための画像の回転角αとして入力し、CPU5が所定の入力処理を行って、回転角αを画像回転処理部10にデータバス7を経由して入力する。   In order to correct the inclination of the document or image in the scanned image by the image rotation processing unit 10, first, the inclination angle α of the document or image is detected. As the detection method, for example, any one of the following known methods disclosed in Patent Document 1 described above may be used. In the first method, the CPU 5 detects the four vertex coordinates of the document and detects them from the positional relationship of these vertex coordinates. Alternatively, as a second method, a prescan image of a document is displayed on the liquid crystal display device of the operation unit 4, and the user reads the tilt angle based on the prescan image and inputs it as an image rotation angle α for correcting the tilt. Then, the CPU 5 performs a predetermined input process, and inputs the rotation angle α to the image rotation processing unit 10 via the data bus 7.

[第1実施例]
画像回転処理部の第1の実施例の構成を図2のブロック図に示す。この画像回転処理部10Aは、データバス7の双方向データを入力データと出力データに分離するバッファ回路11、入力データを交互に入力する1対の第1メモリ12Aと第2メモリ12B、第1メモリ12Aと第2メモリ12Bの出力データを選択して出力する第1データセレクタ13、第1データセレクタから出力されたデータを交互に入力する1対の第3メモリ14Aと第4メモリ14B、第3メモリ14Aと第4メモリ14Bの出力データを選択して出力する第2データセレクタ15、第1メモリ12Aと第2メモリ12Bの書込みアドレスを生成する第1書込みアドレス生成回路16、第1メモリ12Aと第2メモリ12Bの読出しアドレスを生成する第1読出しアドレス生成回路17、回転角を入力し画像を回転させた後のアドレスを生成し、第3メモリ14Aと第4メモリ14Bの書込みアドレスとして出力する第2書込みアドレス生成回路18(図22参照)、第3メモリ14Aと第4メモリ14Bの読出しアドレスを生成する第2読出しアドレス生成回路19、第1メモリ12Aと第2メモリ12Bおよび第3メモリ14Aと第4メモリ14Bの入出力動作に対応してアドレスを切替えるアドレスセレクタ21〜24(第1アドレスセレクタ〜第4アドレスセレクタ)と、各アドレスセレクタと各データセレクタの入力データの切替え、各メモリのリードライト制御、バッファ回路のデータ入出力の切替えを行う制御回路25とから成る。なお、回転角のデータαは、画像データとは別にデータバス経由で画像回転処理部10に入力されて、第2書込みアドレス生成回路に入力されるが、そのための回路は図示を省略した。
[First embodiment]
The configuration of the first embodiment of the image rotation processing unit is shown in the block diagram of FIG. The image rotation processing unit 10A includes a buffer circuit 11 that separates bidirectional data of the data bus 7 into input data and output data, a pair of first memory 12A and second memory 12B that alternately input input data, A first data selector 13 that selects and outputs the output data of the memory 12A and the second memory 12B, a pair of third memory 14A and a fourth memory 14B that alternately input the data output from the first data selector, A second data selector 15 that selects and outputs the output data of the third memory 14A and the fourth memory 14B, a first write address generation circuit 16 that generates a write address of the first memory 12A and the second memory 12B, and the first memory 12A And a first read address generation circuit 17 for generating a read address of the second memory 12B, an input after rotating the image by inputting the rotation angle. And a second write address generation circuit 18 (see FIG. 22) that outputs the write address of the third memory 14A and the fourth memory 14B, and a second address that generates a read address of the third memory 14A and the fourth memory 14B. Address selectors 21 to 24 (first address selector to fourth address) for switching addresses corresponding to input / output operations of the read address generation circuit 19, the first memory 12A and the second memory 12B, and the third memory 14A and the fourth memory 14B. And a control circuit 25 for switching input data of each address selector and each data selector, read / write control of each memory, and switching data input / output of the buffer circuit. The rotation angle data α is input to the image rotation processing unit 10 via the data bus separately from the image data, and is input to the second write address generation circuit, but the circuit for that is not shown.

本実施例によって画像の回転処理を行う時の入力画像と出力画像、および第1メモリ12A〜第4メモリ14Bへ入出力する画像データとの関係を図3に示す。説明を簡単にするために、ここでは入力画像を副走査方向に5分割(A、B、C、D、E)して処理する場合を説明する。入力画像は図1のメモリに記憶されている。ここでは、1画素のデータは8ビット(1バイト)とし、バイト単位のアドレスを割り当ててメモリに記憶する。モノクロ画像の場合は、入力画像は1面分の処理であるが、カラー画像の場合はR(赤)、G(緑)、B(青)の3面分を順に処理する。5分割した画像データはそれぞれ主走査方向の順番に画素データを読み出し、データバス7を経由して、第1メモリ12Aと第2メモリ12Bに交互に入力する。   FIG. 3 shows the relationship between an input image and an output image when image rotation processing is performed according to this embodiment, and image data input / output to / from the first memory 12A to the fourth memory 14B. In order to simplify the description, here, a case will be described in which an input image is processed by being divided into five (A, B, C, D, E) in the sub-scanning direction. The input image is stored in the memory of FIG. Here, the data of one pixel is 8 bits (1 byte), and an address in byte units is assigned and stored in the memory. In the case of a monochrome image, the input image is processed for one surface, but in the case of a color image, three surfaces of R (red), G (green), and B (blue) are processed in order. The image data divided into five parts is read out in the order of the main scanning direction, and the pixel data is alternately input to the first memory 12A and the second memory 12B via the data bus 7.

図1においてメモリと画像回転処理部10との間で、データバス7を経由して画像データを転送する場合、一般に画素データを1個ずつ転送するよりも、例えば、64バイトや128バイト等のように、大量のデータを連続転送する方が、高速に転送できる。そのため、画像回転処理部10のデータ入力部とデータ出力部にはデータを一時的に保存するためのメモリが必要になる。第1メモリ12Aと第2メモリ12Bおよび第3メモリ14Aと第4メモリ14Bはこの役割も果たしている。   In FIG. 1, when transferring image data between the memory and the image rotation processing unit 10 via the data bus 7, in general, for example, 64 bytes, 128 bytes, etc., rather than transferring pixel data one by one. As described above, it is possible to transfer a large amount of data at high speed by continuously transferring the data. For this reason, the data input unit and data output unit of the image rotation processing unit 10 need a memory for temporarily storing data. The first memory 12A, the second memory 12B, the third memory 14A, and the fourth memory 14B also play this role.

特に、データ入力用の1対の第1メモリ12Aと第2メモリ12B、及びデータ出力用の1対の第3メモリ14Aと第4メモリ14Bとを使用する事で、データバスからのデータ入力と、データバスへのデータ出力とを連続的に行えるので、処理を効率的かつ高速化できる。図4に第1メモリ12A、第2メモリ12Bの内部構成を、図5に第3メモリ14A、第4メモリ14Bの内部構成を示す。   In particular, by using a pair of first memory 12A and second memory 12B for data input and a pair of third memory 14A and fourth memory 14B for data output, data input from the data bus Since data output to the data bus can be performed continuously, the processing can be efficiently and speeded up. FIG. 4 shows the internal configuration of the first memory 12A and the second memory 12B, and FIG. 5 shows the internal configuration of the third memory 14A and the fourth memory 14B.

図4において、メモリ部へのデータ入力(書込み)は16ビットデータ単位で行う。データ出力は、メモリ部から出力された16ビットデータの上位8ビットと下位8ビットを個別のアドレスのデータとして出力するために、データセレクタを経由して出力する。データセレクタの入力データの切替えは、8ビットデータ単位の読出しアドレスの下位1ビットデータを使用する。これにより、メモリ部へのデータ入力(書込み)は16ビットデータ単位で行え、データ出力(読出し)は8ビットデータ単位で行える。   In FIG. 4, data input (writing) to the memory unit is performed in units of 16-bit data. The data output is output via a data selector in order to output the upper 8 bits and the lower 8 bits of the 16-bit data output from the memory unit as individual address data. The input data of the data selector is switched using the lower 1-bit data of the read address in 8-bit data units. Thus, data input (write) to the memory unit can be performed in units of 16-bit data, and data output (readout) can be performed in units of 8-bit data.

図5においては、メモリ部へのデータ入力(書込み)は8ビットデータ単位で行い、データ出力(読出し)は16ビットデータ単位で行う。入出力データのビット数が16ビットであり、8ビットデータ単位でデータの書込みが行えるメモリ部を使用する。8ビットの入力データの各ビットの信号線を2つに分岐し、入力の8ビットデータを上位8ビットデータと下位8ビットデータに配置した16ビットデータにする。メモリ部に入力する16ビットデータの上位8ビットデータと下位8ビットデータのどちらのデータをメモリ部に書込むかは、8ビットデータ単位の書込みアドレスで判別する。例えば、8ビットデータ単位の書込みアドレスが偶数であれば下位8ビットデータを、奇数であれば上位8ビットデータをメモリ部に書込む。これにより、メモリ部へのデータ入力(書込み)は8ビットデータ単位で行え、データ出力(読出し)は16ビットデータ単位で行える。   In FIG. 5, data input (write) to the memory unit is performed in 8-bit data units, and data output (read-out) is performed in 16-bit data units. A memory unit is used in which the number of bits of input / output data is 16 bits and data can be written in 8-bit data units. The signal line of each bit of 8-bit input data is branched into two, and the input 8-bit data is changed to 16-bit data arranged in upper 8 bit data and lower 8 bit data. Whether the upper 8-bit data or the lower 8-bit data of the 16-bit data input to the memory unit is written to the memory unit is determined by a write address in units of 8-bit data. For example, if the write address of the 8-bit data unit is an even number, the lower 8 bit data is written into the memory unit, and if the write address is an odd number, the upper 8 bit data is written into the memory unit. As a result, data input (write) to the memory unit can be performed in 8-bit data units, and data output (read-out) can be performed in 16-bit data units.

図2における第1メモリ12A、第2メモリ12B及び第3メモリ14A、4を図4、図5に示した構成にする事により、画像回転処理は8ビットデータ単位で処理するが、データバス上では16ビットデータ単位でデータ転送を行える。これにより、データバス7からのデータの入出力(メモリへの書込みと読出し)時間は、画像回転処理を行う時の8ビットデータ単位のメモリへの書込みと読出し時間の半分になる。これにより、画像データの入出力と回転処理とを同時進行でき、効率的な高速処理が可能になる。   By configuring the first memory 12A, the second memory 12B, and the third memories 14A and 4 in FIG. 2 as shown in FIGS. 4 and 5, image rotation processing is performed in units of 8-bit data. In this case, data transfer can be performed in units of 16-bit data. As a result, the data input / output (write / read to / from memory) time from the data bus 7 is half the write / read time to / from the 8-bit data unit memory at the time of image rotation processing. As a result, the input / output of image data and the rotation processing can proceed simultaneously, and efficient high-speed processing becomes possible.

以下に、図3を用いて、画像の回転処理を行う時の第1メモリ12A〜第4メモリ14Bへの画像データの入出力方法を説明する。   Hereinafter, an input / output method of image data to the first memory 12A to the fourth memory 14B when image rotation processing is performed will be described with reference to FIG.

まず、画像データAを第1メモリ12Aに入力する。その後、画像データBを第2メモリ12Bに入力する。これらの入力には第1書込みアドレス生成回路が出力するアドレスを使用する。第2メモリ12Bへの入力と並行して、第1読出しアドレス生成回路が出力するアドレスを使用して、第1メモリ12Aに入力された画像データAを第1メモリ12Aから主走査方向の順番で出力し、第2書込みアドレス生成回路から出力される回転後のアドレスを使用して第3メモリ14Aに入力する。この時、画像データAの一部であるA1は、回転後の出力画像からはみ出る部分であるため、第3メモリ14Aには入力しない。そして、A2の部分を第3メモリ14Aに、A3の部分を第4メモリ14Bに入力する。A1以外にも、画像の回転によって出力画像からはみ出る部分があるが、これも第3メモリ14Aと第4メモリ14Bには入力しない。この時点で、第1メモリ12Aに入力した画像データAは全て出力済みになるので、画像データCを第1メモリ12Aに入力する。   First, the image data A is input to the first memory 12A. Thereafter, the image data B is input to the second memory 12B. The addresses output from the first write address generation circuit are used for these inputs. In parallel with the input to the second memory 12B, the image data A input to the first memory 12A is sequentially input from the first memory 12A in the main scanning direction using the address output from the first read address generation circuit. And outputs the rotated address output from the second write address generation circuit to the third memory 14A. At this time, A1, which is a part of the image data A, is a portion that protrudes from the output image after rotation, and thus is not input to the third memory 14A. The A2 portion is input to the third memory 14A and the A3 portion is input to the fourth memory 14B. In addition to A1, there is a portion that protrudes from the output image due to the rotation of the image, but this is also not input to the third memory 14A and the fourth memory 14B. At this time, since all the image data A input to the first memory 12A has already been output, the image data C is input to the first memory 12A.

次に、第1メモリ12Aへの入力と並行して第2メモリ12Bに入力された画像データBを第2メモリ12Bから主走査方向の順番で出力し、第2書込みアドレス生成回路から出力される回転後のアドレスを使用して、B1の部分を第3メモリ14Aに、B2の部分を第4メモリ14Bに入力する。B1の部分を第3メモリ14Aに入力し終えた時点で、第2読出しアドレス生成回路が出力するアドレスを使用して第3メモリ14Aのデータ出力を開始する。第3メモリ14Aのデータ出力終了後に、B3の部分を第3メモリ14Aに入力する。この時点で、第2メモリ12Bに入力した画像データBは全て出力済みになるので、画像データDを第2メモリ12Bに入力する。以下、この処理を順次繰返す。   Next, in parallel with the input to the first memory 12A, the image data B input to the second memory 12B is output from the second memory 12B in the order of the main scanning direction and output from the second write address generation circuit. Using the post-rotation address, the B1 portion is input to the third memory 14A and the B2 portion is input to the fourth memory 14B. When the portion B1 is completely input to the third memory 14A, data output from the third memory 14A is started using the address output from the second read address generation circuit. After the data output from the third memory 14A is completed, the portion B3 is input to the third memory 14A. At this time, since all the image data B input to the second memory 12B has been output, the image data D is input to the second memory 12B. Thereafter, this process is repeated sequentially.

このときの、各メモリのデータの入出力(書込みと読出し)のタイミングチャートを図6に示した。画像データA2とB1を第3メモリ14Aに入力し終えたら、第3メモリ14Aのデータを出力する。画像データA3とB2とC1を第4メモリ14Bに入力し終えたら、第4メモリ14Bのデータを出力する。タイミングチャートでは、処理動作を分かり易くするために、A2、A3、B1、B2等の画像データの書込みを一まとめにして行っているように記載してある。しかし、実際には、第1メモリ12Aと2の画像データは主走査方向の順番で読み出しているので、主走査方向の1列分(以後、これを1ライン分と呼ぶ事がある。)のデータがA2とA3になったり、B1とB2になったりするため、A2とA3のデータの書込みやB1とB2のデータの書込みは、1ライン分のデータの書込み時間内に行っている。   A timing chart of data input / output (writing and reading) of each memory at this time is shown in FIG. When the image data A2 and B1 have been input to the third memory 14A, the data of the third memory 14A is output. When the image data A3, B2, and C1 have been input to the fourth memory 14B, the data of the fourth memory 14B is output. In the timing chart, image data such as A2, A3, B1, and B2 are written together to make the processing operation easy to understand. However, actually, the image data in the first memories 12A and 2 are read in the order of the main scanning direction, and therefore, one column in the main scanning direction (hereinafter, this may be referred to as one line). Since the data becomes A2 and A3 or B1 and B2, the data writing of A2 and A3 and the data writing of B1 and B2 are performed within the data writing time for one line.

このようにして、画像回転処理部10の入力段部の1対のメモリに交互に分割した画像データを順番に入力し、出力部の1対のメモリに交互に回転後のアドレスを使用して画像データを入力して出力することで、回転後の出力画像を分割して出力できる。出力画像データは、図1の主メモリ6に記憶される。   In this manner, the divided image data is alternately input to the pair of memories of the input stage unit of the image rotation processing unit 10, and the rotated address is used alternately for the pair of memories of the output unit. By inputting and outputting image data, the output image after rotation can be divided and output. The output image data is stored in the main memory 6 of FIG.

図7に図2中の制御回路25に関わる各制御信号の制御タイミングを示す。
図7について詳述する。以下に、図2中および図7中に示した各制御信号の符号と機能をまとめて記す。
a1:アドレスセレクタ1の切替え信号
a2:アドレスセレクタ2の切替え信号
a3:アドレスセレクタ3の切替え信号
a4:アドレスセレクタ4の切替え信号
d1:第1データセレクタの切替え信号
d2:第2データセレクタの切替え信号
m1:第1メモリ12Aのリードライト切替え信号
m2:第2メモリ12Bのリードライト切替え信号
m3:第3メモリ14Aのリードライト切替え信号
m4:第4メモリ14Bのリードライト切替え信号
bsel:バッファ回路のデータ入出力の切替え信号
FIG. 7 shows the control timing of each control signal related to the control circuit 25 in FIG.
FIG. 7 will be described in detail. The symbols and functions of the control signals shown in FIG. 2 and FIG. 7 are collectively shown below.
a1: Address selector 1 switching signal
a2: Address selector 2 switching signal
a3: Address selector 3 switching signal
a4: Address selector 4 switching signal
d1: First data selector switching signal
d2: Second data selector switching signal
m1: Read / write switching signal of the first memory 12A
m2: read / write switching signal of the second memory 12B
m3: read / write switching signal of the third memory 14A
m4: read / write switching signal of the fourth memory 14B
bsel: Buffer circuit data input / output switching signal

図6のタイミングチャートに示した第1メモリ12A、第2メモリ12B、第3メモリ14A、第4メモリ14Bの動作に合わせて、アドレスの切替えと出力データの切替えとリードライト切替えを行っている。特に、バッファ回路11のデータ入出力の切替え信号(bsel)の入力と出力の切替え動作と、画像回転処理のための第1メモリ12Aと第2メモリ12Bからデータを読出し第3メモリ14Aと第4メモリ14Bに書込む動作とが同時進行している点が固有の特徴となっている。これにより、効率的な高速処理が実現されている。   Address switching, output data switching, and read / write switching are performed in accordance with the operations of the first memory 12A, the second memory 12B, the third memory 14A, and the fourth memory 14B shown in the timing chart of FIG. In particular, the input / output switching operation of the data input / output switching signal (bsel) of the buffer circuit 11 and the data are read from the first memory 12A and the second memory 12B for the image rotation process, and the third memory 14A and the fourth memory 14B are read. A unique feature is that the operation of writing to the memory 14B proceeds simultaneously. Thereby, efficient high-speed processing is realized.

図8に画像回転後のアドレス生成方法を示す。回転前の入力画像(元画像データ)は、主走査方向はW画素、副走査方向はLラインから成る画像とする。主走査方向をx軸、副走査方向をy軸とし、回転前のある画素の座標を(x,y)とする。図の回転前画像の左上を原点(0、0)とする。座標は画素データを記憶しているメモリのアドレスであるため、図において原点の右側がx>0、左側がx<0の領域とし、原点の上側がy<0、下側がy>0の領域とする。   FIG. 8 shows an address generation method after image rotation. The input image (original image data) before rotation is an image composed of W pixels in the main scanning direction and L lines in the sub-scanning direction. Assume that the main scanning direction is the x axis, the sub scanning direction is the y axis, and the coordinates of a certain pixel before rotation are (x, y). The upper left of the pre-rotation image in the figure is the origin (0, 0). Since the coordinates are addresses of the memory storing the pixel data, in the figure, the area on the right side of the origin is x> 0 and the left side is x <0, the area above the origin is y <0, and the area below y> 0 And

原点を中心として、角度θだけ画像を図のように回転させ、更に画像の中心座標が回転前後で概略一致するように平行移動させた後のある画素の座標を(X,Y)とすると、回転前後の座標(x,y)と(X,Y)には次式の関係がある。
X = xcosθ - ysinθ + W' (式1)
Y = xsinθ + ycosθ - L' (式2)
ただし、
W' = ( L/2 )sinθ (式3)
L' = ( W/2 )sinθ (式4)
(X,Y)は、出力画像全体の座標であるので、これを出力部のメモリに対応するように、分割したアドレスを生成する。
If the image is rotated by an angle θ around the origin as shown in the figure, and the coordinates of a certain pixel after being translated so that the center coordinates of the image are approximately the same before and after the rotation are (X, Y), The coordinates (x, y) and (X, Y) before and after the rotation have the following relationship.
X = xcosθ-ysinθ + W '(Formula 1)
Y = xsinθ + ycosθ-L '(Formula 2)
However,
W '= (L / 2) sinθ (Formula 3)
L '= (W / 2) sinθ (Formula 4)
Since (X, Y) is the coordinates of the entire output image, an address is generated by dividing this so as to correspond to the memory of the output unit.

x及びXは1ライン上の画素番号を示し、y及びYはライン番号を示す。図2における第2書込みアドレス生成回路の内部構成を、図9にブロック図で示す。図示回路は、回転前アドレス(x、y)を生成する回転前アドレス生成回路(カウンタ回路で実現できる)、回転角θをcosθとsinθに変換するテーブル(メモリで実現できる。)、乗算器、加算器、減算器からなり、入力された回転角θと、クロック信号に従って順に生成される回転前アドレス(x、y)に基づいて、式1と式2に示されたXとYを出力する。図中に各部に生成する値を記してある。   x and X indicate pixel numbers on one line, and y and Y indicate line numbers. The internal configuration of the second write address generation circuit in FIG. 2 is shown in a block diagram in FIG. The illustrated circuit includes a pre-rotation address generation circuit (which can be realized by a counter circuit) that generates a pre-rotation address (x, y), a table (which can be realized by a memory) that converts a rotation angle θ into cos θ and sin θ, a multiplier, It consists of an adder and a subtracter, and outputs X and Y shown in Equation 1 and Equation 2 based on the input rotation angle θ and the pre-rotation address (x, y) generated in accordance with the clock signal. . In the figure, values to be generated for each part are shown.

本実施例では、画像を副走査方向に分割してメモリに入力しているので、主操作方向のアドレス(X:画素番号)は、そのまま分割メモリ(第3メモリ14Aと第4メモリ14B)の主操作方向のアドレスに使用する。分割メモリ(第3メモリ14Aと第4メモリ14B)の副走査方向のアドレス(Y:ライン番号)は以下のように生成する。   In this embodiment, since the image is divided and input to the memory in the sub-scanning direction, the address (X: pixel number) in the main operation direction is directly stored in the divided memory (the third memory 14A and the fourth memory 14B). Used for main operation direction address. The sub-scanning direction address (Y: line number) of the divided memory (the third memory 14A and the fourth memory 14B) is generated as follows.

例えば、図10に示すように、回転後のアドレスのライン番号(Y)が16ビットのデータであり、分割メモリのライン数が1024ラインであるとする。下位10ビットを第3メモリ14Aと第4メモリ14Bの副走査方向のアドレスに使用する。そして、第11ビットを(第2書込みアドレス生成回路からの)第3メモリ14Aと第4メモリ14Bの切替え信号として使用する。例えば、第11ビットが「0」であれば第3メモリ14Aを、「1」であれば第4メモリ14Bを選択する。これにより、Y(回転後のライン番号)の増加に伴い、自動的に第3メモリ14Aと第4メモリ14Bとを交互に切替えられる。   For example, as shown in FIG. 10, it is assumed that the line number (Y) of the address after rotation is 16-bit data, and the number of lines in the divided memory is 1024 lines. The lower 10 bits are used for the addresses in the sub-scanning direction of the third memory 14A and the fourth memory 14B. The eleventh bit is used as a switching signal between the third memory 14A and the fourth memory 14B (from the second write address generation circuit). For example, if the 11th bit is “0”, the third memory 14A is selected, and if the 11th bit is “1”, the fourth memory 14B is selected. Accordingly, the third memory 14A and the fourth memory 14B are automatically switched alternately with an increase in Y (the line number after rotation).

このように、本実施例では、分割メモリが少なくとも主操作方向の画素データの容量を備え、画像を副走査方向に分割しているので、分割メモリのアドレス生成やメモリの切替えを容易に行うことができている。   As described above, in this embodiment, the divided memory has at least the capacity of the pixel data in the main operation direction and divides the image in the sub-scanning direction, so that it is easy to generate the addresses of the divided memories and switch the memories. Is done.

画素番号:Xが負になったりWを超えたり、画素番号:Yが負になったりLを超えたら、その画素は出力画像からはみ出すことになるので、出力部のメモリには入力しない(反映されない)。他方、回転により出力画像に画素データが無い部分が生じる。従って、この部分にも違和感を生じさせない画素データを入力する(補填)ために、図11に示すように出力部のメモリ(第3メモリ14Aと第4メモリ14B)の所定の領域に特定の画素データを書込んでおくと良い。例えば、白、黒、グレー、カラー画像ならば特定の色、縞模様や格子模様、水玉模様等の特定の画像データパターン等を書込んでおく。又、入力画像の第1ラインや最終ライン、各ラインの第1画素や最終画素を事前に読取って、入力画像の第1ラインのデータは図の書込み領域の上部に、最終ラインのデータは図の書込み領域の下部に、各ラインの第1画素データは図の書込み領域の左部に、最終画素のデータは図の書込み領域の右部に書込んでも良い。これらにより、出力画像の周辺の画像データの無い部分の違和感を排除できる。   If the pixel number: X becomes negative or exceeds W, or if the pixel number: Y becomes negative or exceeds L, the pixel protrudes from the output image and is not input to the memory of the output unit (reflecting) Not) On the other hand, a portion without pixel data is generated in the output image due to the rotation. Therefore, in order to input (complement) pixel data that does not cause a sense of incongruity in this portion, as shown in FIG. 11, a specific pixel is set in a predetermined area of the memory (third memory 14A and fourth memory 14B) of the output unit. It is good to write data. For example, in the case of a white, black, gray, or color image, a specific color, a specific image data pattern such as a stripe pattern, a lattice pattern, or a polka dot pattern is written. Also, the first line and the last line of the input image, the first pixel and the last pixel of each line are read in advance, the data of the first line of the input image is at the upper part of the writing area of the figure, and the data of the last line is the figure. The first pixel data of each line may be written in the left part of the writing area in the drawing, and the data of the final pixel may be written in the right part of the writing area in the drawing. As a result, it is possible to eliminate a sense of incongruity in the area without the image data around the output image.

以上説明したように第1実施例の画像回転処理部10を備えた画像処理装置では、入力部と出力部にデータを交互に入出力する1対の小容量メモリを使用し、画像データを分割して順番に入力部のメモリに入力し、画像を別途得られた所定の角度値に対応して回転させたアドレスを生成して、出力部のメモリに入力しているので、小容量メモリを用いて、既知のCPU処理の場合に比べてより高速に画像回転処理を行う画像処理装置を低価格で実現できる。   As described above, in the image processing apparatus including the image rotation processing unit 10 according to the first embodiment, a pair of small-capacity memories that alternately input and output data are used for the input unit and the output unit, and the image data is divided. Then, the image is input in order to the memory of the input unit, and an address obtained by rotating the image corresponding to a predetermined angle value obtained separately is generated and input to the memory of the output unit. By using it, an image processing apparatus that performs image rotation processing at a higher speed than in the case of known CPU processing can be realized at a low price.

[第2実施例]
次に、図12に画像回転処理部の第2の実施例を示す。この画像回転処理部10Bは、第1の実施例に相当する構成を略全て備えた上で、更に、第1データセレクタ13と、第3メモリ14A並びに第4メモリ14Bの間に補間回路30を挿入した構成となっている。前出の式1と式2に示した座標変換計算結果は、画素データを記憶しているメモリのアドレスであるため整数値に丸められている。10進数であれば小数点未満4捨5入を行い、2進数であれば小数点未満0捨1入を行う。このため、回転後の画素データの位置が、出力画像におけるアドレスとずれる場合も少なくない。これにより、例えば、入力画像の直線が、回転後の出力画像では階段状の線になる等の画質の劣化が発生する。これを防止するために、第2の実施例では、最寄りの4画素を使用して、出力画像におけるアドレス上の画素データを補間演算によって生成する補間回路30を挿入している。
[Second Embodiment]
Next, FIG. 12 shows a second embodiment of the image rotation processing unit. The image rotation processing unit 10B has substantially all the configuration corresponding to the first embodiment, and further includes an interpolation circuit 30 between the first data selector 13, the third memory 14A, and the fourth memory 14B. It has an inserted configuration. The coordinate transformation calculation results shown in the above Equations 1 and 2 are rounded to an integer value because they are the addresses of the memory storing the pixel data. If it is a decimal number, it is rounded off to the nearest decimal place, and if it is a binary number, it is rounded to the nearest decimal point. For this reason, the position of the pixel data after rotation is often shifted from the address in the output image. As a result, for example, the straight line of the input image becomes a stepped line in the output image after rotation, and image quality deterioration occurs. In order to prevent this, in the second embodiment, an interpolation circuit 30 that generates pixel data on an address in the output image by interpolation calculation using the nearest four pixels is inserted.

図13に、注目画素の回転後の位置(丸める前の計算結果の座標)と、丸めた後の回転後のアドレスとの位置関係によって、補間演算に使用する最寄りの4画素の変化の例を示す。丸め方に応じて位置関係は以下の4通りがある。なお、ここでは原稿の傾き補正のための画像回転を目的としているため、画像の回転角度は小さいと仮定し、回転角度は±45度未満とする。   FIG. 13 shows an example of changes in the nearest four pixels used for the interpolation calculation depending on the positional relationship between the position after rotation of the target pixel (coordinates of the calculation result before rounding) and the address after rotation after rounding. Show. There are the following four positional relationships depending on the rounding method. Here, since the purpose is to rotate the image for correcting the inclination of the document, it is assumed that the rotation angle of the image is small and the rotation angle is less than ± 45 degrees.

図13の(a)〜(d)は、それぞれ、
(a)………Xの小数点未満切り捨てとYの小数点未満切り捨て
(b)………Xの小数点未満切り上げとYの小数点未満切り捨て
(c)………Xの小数点未満切り捨てとYの小数点未満切り上げ
(d)………Xの小数点未満切り上げとYの小数点未満切り上げ
の場合を示している。
(A) to (d) in FIG.
(a) .... Rounded down to the nearest X and rounded to the nearest Y.
(b) ... rounded up to the nearest X and rounded to the nearest Y
(c) ......... Rounded off the decimal point of X and rounded up the decimal point of Y
(d)... Rounds up the decimal point of X and rounds up the decimal point of Y.

図に示すように、注目画素を中心にして周囲の8画素を含む9画素に1から9の番号を付けると、上記のそれぞれの場合の最寄りの4画素は以下のようになる。
(a)………1、2、4、5
(b)………2、3、5、6
(c)………4、5、7、8
(d)………5、6、8、9
As shown in the figure, when 9 pixels including 8 pixels around the pixel of interest are numbered from 1 to 9, the nearest 4 pixels in each of the above cases are as follows.
(a) ……… 1, 2, 4, 5
(b) ……… 2, 3, 5, 6
(c) ……… 4, 5, 7, 8
(d) ……… 5, 6, 8, 9

また、入力画像から上記の9画素を抽出する場合は、画像の周辺部においては、注目画素の隣接画素が無い場合がある。入力画像の周辺部における9画素の抽出方法を図14に示す。図に示すように、注目画素がライン上の第1画素か、最終画素か、それ以外の中間画素か、或いは注目画素が第1ライン上の画素か、最終ライン上の画素か、それ以外の中間ライン上の画素かによって、9通りの処理に分かれる。この方法では、中間ライン中間画素の場合(図14中(5))を除き、画像の外端部の画素の補正にあたっては、画像の周辺部の画素データを1画素分外側に複製して9画素を抽出する。   Further, when the above nine pixels are extracted from the input image, there may be no adjacent pixel of the pixel of interest in the periphery of the image. FIG. 14 shows a method for extracting nine pixels in the peripheral portion of the input image. As shown in the figure, the target pixel is the first pixel on the line, the last pixel, or any other intermediate pixel, or the target pixel is the pixel on the first line, the pixel on the last line, or any other There are nine processes depending on whether the pixel is on the middle line. In this method, except for the case of the intermediate line intermediate pixel ((5) in FIG. 14), in correcting the pixel at the outer edge of the image, the pixel data of the peripheral portion of the image is copied by one pixel to the outside. Extract pixels.

図13と図14に示した処理方法を実現した補間回路の構成の一例を図15にブロック図で示す。図15の補間回路30では、画素データを1個(1バイト)ずつ入力し、遅延回路31(31a〜31f)と1ライン分のメモリ32(32a,32b)によって3画素×3画素のマトリクス配置の9画素を保持する。図中のデータセレクタ33に、座標変換計算の丸め方によって図13に示した4通りの何れに該当するかを示す3画素選択条件データと、注目画素が図14に示した9通りの何れに該当するかを示す周辺処理選択条件データを入力して、注目画素以外の3画素を選択して出力し、補間演算回路34に入力する。注目画素データ5は、常に補間演算に使用するため、データセレクタを通さずに補間演算回路に入力する。このようにして補間演算に必要な最寄りの4画素を補間演算回路に入力する。   FIG. 15 is a block diagram showing an example of the configuration of an interpolation circuit that realizes the processing method shown in FIGS. In the interpolation circuit 30 of FIG. 15, pixel data is input one by one (1 byte), and a matrix arrangement of 3 pixels × 3 pixels is provided by the delay circuit 31 (31a to 31f) and the memory 32 (32a, 32b) for one line. 9 pixels are held. In the data selector 33 in the figure, the three-pixel selection condition data indicating which of the four types shown in FIG. 13 corresponds to the rounding method of the coordinate conversion calculation, and the target pixel is in any of the nine types shown in FIG. Peripheral processing selection condition data indicating whether it is applicable is input, three pixels other than the target pixel are selected and output, and input to the interpolation calculation circuit 34. Since the target pixel data 5 is always used for the interpolation calculation, it is input to the interpolation calculation circuit without passing through the data selector. In this way, the nearest four pixels necessary for the interpolation calculation are input to the interpolation calculation circuit.

以下に、補間演算回路での処理を説明する。図16に、補間演算時に使用する4画素(P1、P2、P3、P4)と、補間演算によって生成する出力画素(N)との位置関係を示す。図では、注目画素をP1とする。注目画素の回転後の位置(丸める前の計算結果の座標)と注目画素の回転後のアドレス(丸めた後の計算結果の座標)との差が丸め誤差である。主走査方向の丸め誤差をα、副走査方向の丸め誤差をβとする。   Hereinafter, processing in the interpolation calculation circuit will be described. FIG. 16 shows the positional relationship between the four pixels (P1, P2, P3, P4) used during the interpolation calculation and the output pixel (N) generated by the interpolation calculation. In the figure, the pixel of interest is P1. The difference between the position after rotation of the pixel of interest (coordinates of calculation results before rounding) and the address after rotation of the pixel of interest (coordinates of calculation results after rounding) is a rounding error. The rounding error in the main scanning direction is α, and the rounding error in the sub scanning direction is β.

回転後の4画素から、補間演算によって注目画素Nを生成するためには、回転座標でのNと4画素P1、P2、P3、P4との距離を算出する必要がある。その距離として図中のpとqを定義する。P1、P2、P3、P4、N、N1、N2が画素データの値(8ビット)を示すとして、出力画素Nを次式で算出する。
N1 = p・P2 + (1−p)・P1 (式5)
N2 = p・P4 + (1−p)・P3 (式6)
N = q・N2 + (1−q)・N1 (式7)
上式の演算を行うために、αとβからpとqを算出する。図13の(1)から(4)に示したように、注目画素の回転後の位置と回転後のアドレスの位置関係は4通りある。それに対応して、pとqをαとβおよび回転角θで表した結果を図17〜図20の各図に示す。
In order to generate the pixel of interest N by interpolation calculation from the four pixels after rotation, it is necessary to calculate the distance between N and the four pixels P1, P2, P3, and P4 in the rotation coordinates. We define p and q in the figure as the distance. Assuming that P1, P2, P3, P4, N, N1, and N2 indicate pixel data values (8 bits), the output pixel N is calculated by the following equation.
N1 = p · P2 + (1−p) · P1 (Formula 5)
N2 = p.P4 + (1-p) .P3 (Formula 6)
N = q · N2 + (1−q) · N1 (Formula 7)
In order to perform the above equation, p and q are calculated from α and β. As shown in (1) to (4) of FIG. 13, there are four positional relationships between the position of the pixel of interest after rotation and the address after rotation. Correspondingly, the results of p and q expressed as α and β and the rotation angle θ are shown in FIGS.

まとめると、pとqは次式で表される。
・(1)と(4)の場合
p = α/cosθ +(βcosθ - αsinθ)tanθ ……(式8)
q = βcosθ - αsinθ ……(式9)
・(2)と(3)の場合
p = αcosθ - βsinθ ……(式10)
q = β/cosθ +(αcosθ - βsinθ)tanθ ……(式11)
In summary, p and q are expressed by the following equations.
In the case of (1) and (4), p = α / cosθ + (βcosθ-αsinθ) tanθ (Equation 8)
q = βcosθ-αsinθ (Equation 9)
In the case of (2) and (3), p = αcosθ-βsinθ (Equation 10)
q = β / cosθ + (αcosθ−βsinθ) tanθ (Expression 11)

仮に、回転角θは小さい(θ≒0)とすると、以下の近似式を用いて更に簡素化したpとqが得られる。ただし、θの単位はラジアンである。
cosθ≒1 ……(式12)
sinθ≒θ ……(式13)
tanθ≒θ ……(式14)
θ2≒0 ……(式15)
・(1)と(4)の場合の近似式
p ≒ α + βθ ……(式16)
q ≒ β - αθ ……(式17)
・(2)と(3)の場合の近似式
p ≒ α - βθ ……(式18)
q ≒ β + αθ ……(式19)
If the rotation angle θ is small (θ≈0), further simplified p and q can be obtained using the following approximate expression. However, the unit of θ is radian.
cosθ≈1 (Formula 12)
sinθ≈θ (Formula 13)
tanθ≈θ (Formula 14)
θ 2 ≈ 0 (Equation 15)
・ Approximate expression p in the case of (1) and (4) ≒ α + βθ (Expression 16)
q ≒ β-αθ (Equation 17)
・ Approximation formula p in the case of (2) and (3) ≒ α-βθ (Equation 18)
q ≒ β + αθ (Equation 19)

以上詳細に説明したように、第2実施例の画像回転処理部10を備えた画像処理装置では、前第1実施例の構成に加えて、詳述した補間回路30を有していて、画像回転後のアドレス生成回路での丸め方と丸め誤差の値から、補間回路30によって注目画素の回転後のアドレスにおける画素データを、最寄りの4画素から算出して出力画素データを生成できる。これにより、既に説明した第1実施例と同様の高速化の効果が得られることに加えて、画像回転処理による画質の劣化を防止する効果が更に得られる。   As described above in detail, the image processing apparatus including the image rotation processing unit 10 according to the second embodiment includes the interpolation circuit 30 described in detail in addition to the configuration of the first embodiment, From the rounding method and the rounding error value in the post-rotation address generation circuit, the interpolation pixel 30 can calculate the pixel data at the post-rotation address of the pixel of interest from the nearest four pixels to generate output pixel data. Thereby, in addition to the effect of increasing the speed similar to that of the first embodiment already described, the effect of preventing the deterioration of the image quality due to the image rotation process is further obtained.

[第3実施例]
次に、図21に画像回転処理部の第3の実施例を示す。この画像回転処理部10Cは、入出力部のメモリ容量が少なく、より大きな回転角度の回転処理が可能な特徴を持っている。画像回転処理部10Cは、第1の実施例に相当する構成(図2参照)を略全て備えた上で、更に、第5メモリ41Aと第6メモリ41B、第5アドレスセレクタ42、第6アドレスセレクタ43、そして、第3書込みアドレス生成回路44、第3読出しアドレス生成回路45、第3データセレクタ46を備えた構成となっている。
[Third embodiment]
Next, FIG. 21 shows a third embodiment of the image rotation processing unit. This image rotation processing unit 10C has a feature that the memory capacity of the input / output unit is small and rotation processing with a larger rotation angle is possible. The image rotation processing unit 10C includes substantially all the configuration corresponding to the first embodiment (see FIG. 2), and further includes a fifth memory 41A, a sixth memory 41B, a fifth address selector 42, and a sixth address. The configuration includes a selector 43, a third write address generation circuit 44, a third read address generation circuit 45, and a third data selector 46.

すなわち、画像回転処理部10Cは、データバス7の双方向データを入力データと出力データに分離するバッファ回路11、入力データを交互に入力する1対の第1メモリ12Aと第2メモリ12B、第1メモリ12Aと第2メモリ12Bの出力データを選択して出力する第1データセレクタ13、第1データセレクタから出力されたデータを交互に入力する1対の第5メモリ41Aと第6メモリ41B、第5メモリ41Aと第6メモリ41Bの出力データを選択して出力する第3データセレクタ46、第3データセレクタ46から出力されたデータを交互に入力する1対の第3メモリ14Aと第4メモリ14B、第3メモリ14Aと第4メモリ14Bの出力データを選択して出力する第2データセレクタ15、第1メモリ12Aと第2メモリ12Bの書込みアドレスを生成する第1書込みアドレス生成回路16、第1メモリ12Aと第2メモリ12Bの読出しアドレスを生成する第1読出しアドレス生成回路17、回転角を入力し画像を回転させた後のアドレスを生成し、第5メモリ41Aと第6メモリ41Bの書込みアドレスとして出力する第3書込みアドレス生成回路44、第5メモリ41Aと第6メモリ41Bの読出しアドレスを生成する第3読出しアドレス生成回路45、第3メモリ14Aと第4メモリ14Bの書込みアドレスを生成する第2書込みアドレス生成回路18、第3メモリ14Aと第4メモリ14Bの読出しアドレスを生成する第2読出しアドレス生成回路19、第1メモリ12Aと第2メモリ12Bおよび第3メモリ14Aと第4メモリ14Bおよび第5メモリ41Aと第6メモリ41Bの入出力動作に対応してアドレスを切替えるアドレスセレクタ21〜24,42,43(第1アドレスセレクタ〜第6アドレスセレクタ)と、各アドレスセレクタと各データセレクタの入力データの切替え、各メモリのリードライト制御、バッファ回路のデータ入出力の切替えを行う制御回路25Cとから成る。なお、回転角のデータαは、画像データとは別にデータバス経由で画像回転処理部10Cに入力されて、第3書込みアドレス生成回路44へと入力されるが、そのための回路は図示を省略した。   That is, the image rotation processing unit 10C includes a buffer circuit 11 that separates bidirectional data on the data bus 7 into input data and output data, a pair of first memory 12A and second memory 12B that alternately input input data, A first data selector 13 for selecting and outputting the output data of the first memory 12A and the second memory 12B; a pair of fifth memory 41A and sixth memory 41B for alternately inputting the data output from the first data selector; A third data selector 46 that selects and outputs the output data of the fifth memory 41A and the sixth memory 41B, and a pair of third memory 14A and a fourth memory that alternately input the data output from the third data selector 46 14B, the second data selector 15 for selecting and outputting the output data of the third memory 14A and the fourth memory 14B, the first memory 12A and the second memo A first write address generation circuit 16 for generating a write address of 12B, a first read address generation circuit 17 for generating read addresses of the first memory 12A and the second memory 12B, and after rotating the image by inputting a rotation angle A third write address generation circuit 44 that generates addresses and outputs them as write addresses of the fifth memory 41A and the sixth memory 41B, and a third read address generation circuit 45 that generates read addresses of the fifth memory 41A and the sixth memory 41B. The second write address generation circuit 18 for generating the write addresses of the third memory 14A and the fourth memory 14B, the second read address generation circuit 19 for generating the read addresses of the third memory 14A and the fourth memory 14B, the first memory 12A and second memory 12B and third memory 14A and fourth memory 14B and fifth Address selectors 21 to 24, 42, and 43 (first address selector to sixth address selector) for switching addresses corresponding to input / output operations of the memory 41A and the sixth memory 41B, and input data of each address selector and each data selector , A read / write control of each memory, and a control circuit 25C for switching data input / output of the buffer circuit. The rotation angle data α is input to the image rotation processing unit 10C via the data bus separately from the image data, and is input to the third write address generation circuit 44, but the circuit for that is not shown. .

これは、図2に示した第1の実施例に対して、更に内部メモリとして、1対の第5メモリ41Aと第6メモリ41Aおよび関連回路を追加し、画像回転後のアドレスを使用して画像データを交互に入力するようにした実施例である。第1の実施例では、画像の回転角が大きくなると、第1メモリ〜第4メモリ(12A〜12D)の容量を全て大きくする必要がある。しかし、この実施例では、画像の回転角は第5メモリと第6メモリの容量だけに関係し、第1メモリ〜第4メモリの容量とは無関係になる。つまり、第1メモリ〜第4メモリの容量は、入力画像を分割した各画像のデータ量よりも小さくできる。例えば、256バイトや512バイトのように、データバスを経由してデータを連続転送する時のデータ量の整数倍等の小容量のもので足りる。必ずしも入力画像の1ライン分の整数倍の容量にする必要は無く、容量をもっと小さくできる。従って、回転処理に使用するメモリ総体としては少ない容量増加で、画像の回転角を大きくできる。   This is because, with respect to the first embodiment shown in FIG. 2, a pair of fifth memory 41A and sixth memory 41A and related circuits are added as internal memories, and the address after image rotation is used. In this embodiment, image data is alternately input. In the first embodiment, when the image rotation angle increases, it is necessary to increase the capacities of the first to fourth memories (12A to 12D). However, in this embodiment, the rotation angle of the image is related only to the capacities of the fifth memory and the sixth memory, and is independent of the capacities of the first memory to the fourth memory. That is, the capacity of the first memory to the fourth memory can be made smaller than the data amount of each image obtained by dividing the input image. For example, a small capacity of 256 bytes or 512 bytes, such as an integer multiple of the data amount when continuously transferring data via the data bus, is sufficient. The capacity is not necessarily an integer multiple of one line of the input image, and the capacity can be further reduced. Therefore, the rotation angle of the image can be increased with a small increase in the capacity of the entire memory used for the rotation process.

この実施例では、第1メモリ12Aと第2メモリ12Bは、単純にデータバス7から入力されるデータを交互に入力して、入力した順番どおりに第1データセレクタを経由して第5メモリ41Aと第6メモリ41Bへと出力する。又、第3メモリ14Aと第4メモリ14Bは、単純に第3データセレクタから出力されるデータを交互に入力して、入力した順番どおりに第2データセレクタを経由してデータバス7へ出力する。上述したように第1メモリ〜第4メモリ(12A,12B,14A,14B)の容量は画像の回転角とは無関係で良い。第1メモリ〜第4メモリは、データバス7と第5メモリ41Aと第6メモリ41Bとの間でデータを転送するための一時的な保存手段としてのみ使用している。そして、画像の回転処理には、第5メモリ41Aと第6メモリ41Bを使用する。   In this embodiment, the first memory 12A and the second memory 12B simply input data input from the data bus 7 alternately, and the fifth memory 41A passes through the first data selector in the input order. And output to the sixth memory 41B. Further, the third memory 14A and the fourth memory 14B simply input the data output from the third data selector alternately, and output to the data bus 7 via the second data selector in the input order. . As described above, the capacities of the first to fourth memories (12A, 12B, 14A, 14B) may be independent of the image rotation angle. The first to fourth memories are used only as temporary storage means for transferring data among the data bus 7, the fifth memory 41A, and the sixth memory 41B. The fifth memory 41A and the sixth memory 41B are used for the image rotation process.

図22に、画像の回転処理を行う時の入力画像と出力画像、および第5メモリ41Aと第6メモリ41Bへ入出力する画像データとの関係を示す。まず、画像データAを第1メモリ12A、2を経由して、第3書込みアドレス生成回路から出力される回転後のアドレスを使用して第5メモリ41Aに入力する。この時、画像データAの一部であるA1は、回転後の出力画像からはみ出る部分であるため、第5メモリ41Aには入力しない。そして、A2の部分を第5メモリ41Aに、A3の部分を第6メモリ41Bに入力する。   FIG. 22 shows the relationship between an input image and an output image when image rotation processing is performed, and image data input / output to / from the fifth memory 41A and the sixth memory 41B. First, the image data A is input to the fifth memory 41A via the first memories 12A and 2 using the rotated address output from the third write address generation circuit. At this time, A1, which is a part of the image data A, is a portion that protrudes from the output image after rotation, and thus is not input to the fifth memory 41A. The A2 portion is input to the fifth memory 41A, and the A3 portion is input to the sixth memory 41B.

次に、画像データBを第1メモリ12A、2を経由して、第3書込みアドレス生成回路から出力される回転後のアドレスを使用して、第5メモリ41Aに入力する。B1の部分を第5メモリ41Aに入力し終えた時点で、第5メモリ41Aのデータ出力を開始する。第5メモリ41Aのデータ出力と並行して、B2の部分を第6メモリ41Bに入力する。第5メモリ41Aのデータ出力終了後に、B3の部分を第5メモリ41Aに入力する。   Next, the image data B is input to the fifth memory 41A via the first memories 12A and 2 using the rotated address output from the third write address generation circuit. When the portion B1 is completely input to the fifth memory 41A, data output from the fifth memory 41A is started. In parallel with the data output of the fifth memory 41A, the portion B2 is input to the sixth memory 41B. After the data output from the fifth memory 41A is completed, the portion B3 is input to the fifth memory 41A.

次に、画像データCを第1メモリ12A、2を経由して、第3書込みアドレス生成回路から出力される回転後のアドレスを使用して、第6メモリ41Bに入力する。C1の部分を第6メモリ41Bに入力し終えた時点で、第3読出しアドレス生成回路が出力するアドレスを使用して、第6メモリ41Bのデータ出力を開始する。第6メモリ41Bのデータ出力と並行して、C2の部分を第5メモリ41Aに入力する。第6メモリ41Bのデータ出力終了後に、C3の部分を第6メモリ41Bに入力する。以下、この処理を繰返す。   Next, the image data C is input to the sixth memory 41B via the first memories 12A and 2 using the rotated address output from the third write address generation circuit. When the C1 portion is completely input to the sixth memory 41B, data output from the sixth memory 41B is started using the address output from the third read address generation circuit. In parallel with the data output of the sixth memory 41B, the portion C2 is input to the fifth memory 41A. After the data output from the sixth memory 41B is completed, the portion C3 is input to the sixth memory 41B. Thereafter, this process is repeated.

図23に、第5メモリ41Aと第6メモリ41Bのデータ入出力(書込みと読出し)のタイミングチャートを示す。画像データA2とB1を第5メモリ41Aに入力し終えたら、第5メモリ41Aのデータを出力する。画像データA3とB2とC1を第6メモリ41Bに入力し終えたら、第6メモリ41Bのデータを出力する。タイミングチャートでは、処理動作を分かり易くするために、A2、A3、B1、B2等の画像データの書込みを一まとめにして行っているように記載している。しかし、実際には、入力画像の画素データは主走査方向の順番で読み出しているので、1ライン分のデータがA2とA3になったり、B1とB2になったりするため、A2とA3のデータの書込みやB1とB2のデータの書込みは、1ライン分のデータの書込み時間内に行う。   FIG. 23 shows a timing chart of data input / output (writing and reading) between the fifth memory 41A and the sixth memory 41B. When the image data A2 and B1 have been input to the fifth memory 41A, the data of the fifth memory 41A is output. When the image data A3, B2, and C1 have been input to the sixth memory 41B, the data of the sixth memory 41B is output. In the timing chart, it is described that writing of image data such as A2, A3, B1, and B2 is performed collectively to make the processing operation easy to understand. However, since the pixel data of the input image is actually read in the order of the main scanning direction, the data for one line becomes A2 and A3, or B1 and B2, so the data of A2 and A3 And B1 and B2 data are written within the data write time for one line.

このようにして、内部メモリとしての1対のメモリ(第5メモリ41Bと第6メモリ41B)に交互に回転後のアドレスを使用して画像データを入力して出力する事で、回転後の出力画像を分割して出力できる。出力画像は、図1の主メモリ6に記憶される。   In this way, by inputting and outputting the image data using the rotated address alternately to a pair of memories (the fifth memory 41B and the sixth memory 41B) as the internal memory, the output after the rotation The image can be divided and output. The output image is stored in the main memory 6 of FIG.

以上詳細に説明したように、この実施例では、入力部と出力部のメモリにデータを交互に入出力する1対の小容量メモリを使用し、更にデータを交互に入出力する1対の内部メモリを使用して、画像データを分割して入力部のメモリに順番に入力し、これを基に画像を回転させたアドレスを生成して、内部メモリに入力し、内部メモリのデータを出力部のメモリを経由して主メモリ6に出力する事で、入出力部のメモリ容量は少ないまま、より大きな回転角度の回転処理が、使用する全てのメモリの少ない容量増加で行える、CPU処理より高速で、小容量メモリによる画像回転処理を行う低価格の画像処理装置を提供できる。   As described above in detail, in this embodiment, a pair of small-capacity memories that alternately input and output data are used in the memory of the input unit and the output unit, and a pair of internal memories that alternately input and output data. Using the memory, the image data is divided and input to the memory of the input unit in order, an address obtained by rotating the image based on this is generated, input to the internal memory, and the data of the internal memory is output to the output unit By outputting to the main memory 6 via the memory, the input / output unit has a small memory capacity, and the rotation process with a larger rotation angle can be performed with a small increase in the capacity of all the memories used. Thus, it is possible to provide a low-cost image processing apparatus that performs image rotation processing using a small-capacity memory.

[第4実施例]
図24に画像回転処理部の第4の実施例を示す。これは、第3の実施例に対して、第1データセレクタ13と、第5メモリ並びに第6メモリの間に補間回路30を挿入した構成となっている。補間回路30は第2の実施例で説明した回路と同じものである。すなわち、各部の構成は、補間回路30以外は、既に説明した第3実施例に対応した同一の構成(従って第2実施例と同一部分も含まれている)となっており、図24では第2実施例および第3実施例と同一部分については、同一符号を付してあり、個々の説明は重複を避け省略する。図24の構成の画像回転処理部10Dは、要は、第3実施例と同様に入出力部の小容量メモリおよび内部メモリを含み主部が構成されていて、第2実施例で説明したと同等の補間回路30も備えているため、画質の劣化も抑えて大きな回転角度の画像回転処理が高速に可能になっている。
[Fourth embodiment]
FIG. 24 shows a fourth embodiment of the image rotation processing unit. This is a configuration in which an interpolation circuit 30 is inserted between the first data selector 13, the fifth memory, and the sixth memory with respect to the third embodiment. The interpolation circuit 30 is the same as the circuit described in the second embodiment. That is, the configuration of each part is the same as that of the third embodiment already described except for the interpolation circuit 30 (therefore, the same part as that of the second embodiment is also included). The same parts as those in the second embodiment and the third embodiment are denoted by the same reference numerals, and description thereof is omitted to avoid duplication. The image rotation processing unit 10D having the configuration shown in FIG. 24 is basically the same as the third embodiment, including a small-capacity memory of an input / output unit and an internal memory. Since an equivalent interpolation circuit 30 is also provided, image rotation processing with a large rotation angle can be performed at high speed while suppressing deterioration in image quality.

[第5実施例]
次に、図25に画像回転処理部の第5の実施例を示す。これは、第3の実施例における、入力部の第1メモリ12Aと第2メモリ12Bおよびそれに関連するアドレスセレクタやデータセレクタ、アドレス生成回路を、先入れ先出し型(FIFO:First In First Out)のメモリ(第1FIFOメモリ52)とその駆動回路に置き換え、同様に、出力部の第3メモリ14Aと第4メモリ14Bおよびそれに関連するアドレスセレクタやデータセレクタ、アドレス生成回路についても、先入れ先出し型の第2FIFOメモリ54とその駆動回路に置き換えた構成となっている。
[Fifth embodiment]
Next, FIG. 25 shows a fifth embodiment of the image rotation processing unit. This is because a first-in first-out (FIFO) memory (first-in-first-out) (FIFO) memory (the first memory 12A and the second memory 12B of the input unit and the address selector, the data selector, and the address generation circuit in the third embodiment are used. Similarly, the first FIFO memory 52) and its driving circuit are replaced. Similarly, the third memory 14A and the fourth memory 14B of the output section and the associated address selector, data selector, and address generation circuit are also used in the first-in first-out second FIFO memory 54. And its drive circuit.

先の第3の実施例においては、入出力部の第1メモリ12A、第2メモリ12B、第3メモリ14A、第4メモリ14Bは、単に画像データをデータバス7と第5メモリ41Aと第6メモリ41Bとの間でデータ転送するための一時的な保存手段として機能しているに過ぎないため、FIFOメモリを使用して同等機能が実現できる。第3の実施例と異なり、2個のメモリを交互に使用せずに、1個のメモリを使用し等価の動作を得ているので、メモリ容量をより小さくできる。   In the third embodiment, the first memory 12A, the second memory 12B, the third memory 14A, and the fourth memory 14B of the input / output unit simply send image data to the data bus 7, the fifth memory 41A, and the sixth memory. Since it merely functions as a temporary storage means for transferring data to and from the memory 41B, an equivalent function can be realized using a FIFO memory. Unlike the third embodiment, since the equivalent operation is obtained by using one memory without using two memories alternately, the memory capacity can be further reduced.

図25に示す第5実施例の画像回転処理部10Eでは、入力部と出力部それぞれに先入れ先出し型のFIFOメモリ52、54を使用し、更にデータを交互に入出力する1対の内部メモリである第5メモリ41A、第6メモリ41Bを使用して、入力部の第1FIFOメモリ52から画像データを分割して順番に入力し、画像を回転させたアドレスを生成して、内部メモリ41A、41Bに交互に入力し、内部メモリ41A、41Bのデータを交互に出力して、出力部の先入れ先出し型の第1FIFOメモリ52を経由して出力する。なお、図中で第3の実施例と同一部分については、同一符号を付してあり、個々の説明は重複を避け省略する。このような構成とすることで、より少ない容量の入出力部のメモリで、大きな回転角度の回転処理が、CPU処理より高速で、小容量メモリにより行える低価格の画像処理装置を実現している。   The image rotation processing unit 10E of the fifth embodiment shown in FIG. 25 is a pair of internal memories that use first-in first-out FIFO memories 52 and 54 for the input unit and the output unit, respectively, and that alternately input and output data. Using the fifth memory 41A and the sixth memory 41B, the image data is divided and input in order from the first FIFO memory 52 of the input unit, and an address obtained by rotating the image is generated, and is stored in the internal memories 41A and 41B. The data are alternately input, the data in the internal memories 41A and 41B are alternately output, and output via the first-in first-out first FIFO memory 52 of the output unit. In the figure, the same parts as those of the third embodiment are denoted by the same reference numerals, and the description thereof is omitted to avoid duplication. By adopting such a configuration, a low-cost image processing apparatus that can perform a rotation process with a large rotation angle at a higher speed than a CPU process and a small-capacity memory with a memory of an input / output unit having a smaller capacity is realized. .

[第6実施例]
図26に画像回転処理部の第6の実施例を示す。この画像回転処理部10Fは、第5の実施例に対して、第1FIFOメモリ52の出力端と、第5メモリ41A並びに第6メモリ41Bの並列接続した入力との間に補間回路30を挿入した実施例である。なお、補間回路30は第2の実施例と同じものである。これにより、重複する説明は省略するが、第5実施例と同等の作用・効果に加えて、補間回路30の既述した作用によって画像回転による画質の劣化を防止するとの効果が付加される。
[Sixth embodiment]
FIG. 26 shows a sixth embodiment of the image rotation processing unit. In the image rotation processing unit 10F, the interpolation circuit 30 is inserted between the output end of the first FIFO memory 52 and the parallel-connected inputs of the fifth memory 41A and the sixth memory 41B in the fifth embodiment. This is an example. The interpolation circuit 30 is the same as that in the second embodiment. As a result, although an overlapping description is omitted, in addition to the operations and effects equivalent to those of the fifth embodiment, an effect of preventing image quality deterioration due to image rotation by the operation described above of the interpolation circuit 30 is added.

本願他の発明では、以上に説明した第1から第6の実施例の画像処理装置の何れかを、例えば、図1に示した画像形成装置の画像回転処理部として実装する事により、スキャン画像における原稿や画像の傾きを補正できる高速で低価格の画像形成装置を提供することができる。   In another invention of the present application, any one of the image processing apparatuses according to the first to sixth embodiments described above is mounted as, for example, an image rotation processing unit of the image forming apparatus shown in FIG. Thus, it is possible to provide a high-speed and low-cost image forming apparatus that can correct the inclination of the original or image.

本発明は、複写機、プリンタ、スキャナ、ファクシミリ装置等の画像処理装置に限らず、画像に対して回転処理を行うその他の装置にも適用することができる。   The present invention is not limited to an image processing apparatus such as a copying machine, a printer, a scanner, and a facsimile machine, but can be applied to other apparatuses that perform rotation processing on an image.

本発明に係る画像形成装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image forming apparatus according to the present invention. 画像回転処理部の第2実施例の構成ブロック図である。It is a block diagram of the configuration of the second embodiment of the image rotation processing unit. 入力画像と出力画像、および第1メモリ〜第4メモリへ入出力する画像データとの関係を示す図である。It is a figure which shows the relationship between an input image, an output image, and the image data input / output to 1st memory-4th memory. 第1メモリ、第2メモリの内部構成を説明する図である。It is a figure explaining the internal structure of a 1st memory and a 2nd memory. 第3メモリ、第4メモリの内部構成を説明する図である。It is a figure explaining the internal structure of a 3rd memory and a 4th memory. 第1メモリ〜第4メモリにおけるデータ入出力(書込みと読出し)のタイミングチャートである。It is a timing chart of data input / output (write and read) in the first memory to the fourth memory. 制御回路に関わる各制御信号の制御タイミングを示す図である。It is a figure which shows the control timing of each control signal regarding a control circuit. 実施例における画像回転後アドレス生成方法の説明図である。It is explanatory drawing of the address generation method after the image rotation in an Example. 第2書込みアドレス生成回路の構成を示すブロック図である。It is a block diagram which shows the structure of a 2nd write address generation circuit. 出力部メモリへの副走査方向アドレス生成の説明図である。It is explanatory drawing of the subscanning direction address production | generation to an output part memory. 出力部メモリの状態を説明する図である。It is a figure explaining the state of an output part memory. 画像回転処理部の第2実施例の構成のブロック図である。It is a block diagram of a structure of 2nd Example of an image rotation process part. 補間演算回路での処理の説明図である。It is explanatory drawing of the process in an interpolation calculation circuit. 入力画像の周辺部の9画素の抽出方法を示す図である。It is a figure which shows the extraction method of 9 pixels of the peripheral part of an input image. 実施例における補間回路の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the interpolation circuit in an Example. 補間演算回路での処理の説明図である。It is explanatory drawing of the process in an interpolation calculation circuit. 補間演算回路での処理の説明図である。It is explanatory drawing of the process in an interpolation calculation circuit. 補間演算回路での処理の説明図である。It is explanatory drawing of the process in an interpolation calculation circuit. 補間演算回路での処理の説明図である。It is explanatory drawing of the process in an interpolation calculation circuit. 補間演算回路での処理の説明図である。It is explanatory drawing of the process in an interpolation calculation circuit. 画像回転処理部の第3実施例の構成のブロック図である。It is a block diagram of a structure of 3rd Example of an image rotation process part. 画像回転処理時の入力画像、出力画像、第5メモリと第6メモリへ入出力する画像データの説明図である。It is explanatory drawing of the input image at the time of an image rotation process, an output image, and the image data input / output to 5th memory and 6th memory. 第5メモリと第6メモリのデータ入出力を説明するタイミングチャートである。It is a timing chart explaining data input / output of the 5th memory and the 6th memory. 画像回転処理部の第4実施例の構成のブロック図である。It is a block diagram of a structure of 4th Example of an image rotation process part. 画像回転処理部の第5実施例の構成のブロック図である。It is a block diagram of a structure of 5th Example of an image rotation process part. 画像回転処理部の第6実施例の構成のブロック図である。It is a block diagram of a structure of 6th Example of an image rotation process part.

符号の説明Explanation of symbols

1 スキャナ
2 プリンタ
3 ハードディスク装置
4 操作部
5 CPU(Central Processing Unit)
6 主メモリ
7 データバス
10、10B、10C 画像回転処理部
10D、10E、10F 画像回転処理部
11 バッファ回路
12A 第1メモリ
12B 第2メモリ
13 第1データセレクタ
14A 第3メモリ
14B 第4メモリ
15 第2データセレクタ
16 第1書込みアドレス生成回路
17 第1読出しアドレス生成回路
18 第2書込みアドレス生成回路
19 第2読出しアドレス生成回路
21〜24 アドレスセレクタ(第1アドレスセレクタ〜第4アドレスセレクタ)
25 制御回路
30 補間回路
31(31a〜31f) 遅延回路
32(32a,32b) メモリ(1ライン分)
33 データセレクタ
34 補間演算回路
41A 第5メモリ
41B 第6メモリ
42、43 アドレスセレクタ(第5アドレスセレクタ、第6アドレスセレクタ)
44 第3読出しアドレス生成回路
45 第3書込みアドレス生成回路
46 第3データセレクタ
52 第1FIFOメモリ
54 第2FIFOメモリ
100 画像形成装置(画像処理装置)
bsel バッファ回路のデータ入出力の切替え信号
DESCRIPTION OF SYMBOLS 1 Scanner 2 Printer 3 Hard disk device 4 Operation part 5 CPU (Central Processing Unit)
6 Main memory 7 Data bus 10, 10B, 10C Image rotation processing unit 10D, 10E, 10F Image rotation processing unit 11 Buffer circuit 12A First memory 12B Second memory 13 First data selector 14A Third memory 14B Fourth memory 15 First 2 data selector 16 first write address generation circuit 17 first read address generation circuit 18 second write address generation circuit 19 second read address generation circuit 21 to 24 address selector (first address selector to fourth address selector)
25 Control circuit 30 Interpolation circuit 31 (31a to 31f) Delay circuit 32 (32a, 32b) Memory (for one line)
33 Data selector 34 Interpolation operation circuit 41A 5th memory 41B 6th memory 42, 43 Address selector (5th address selector, 6th address selector)
44 Third read address generation circuit 45 Third write address generation circuit 46 Third data selector 52 First FIFO memory 54 Second FIFO memory 100 Image forming apparatus (image processing apparatus)
bsel Buffer circuit data input / output switching signal

Claims (7)

画像データを交互に入力して出力する対となる第1と第2のメモリと、
前記第1と第2のメモリから出力される画像データを交互に入力し出力する対となる第3と第4のメモリと、
入力された所定の角度値に基づき、元画像データを回転させるためのアドレスを生成して前記第1乃至第4のメモリにそれぞれに出力するアドレス生成回路とを有し、
入力画像保持手段によって保持された元画像データを分割して順番に前記第1と第2のメモリに交互に入力し、
前記第1と第2のメモリから交互にデータを出力し、これら出力データを前記アドレス生成回路から出力されたアドレスを使用して、前記第3と第4のメモリに交互に入力し、
前記第3と第4のメモリから交互にデータを出力する、
ことを特徴とする画像処理装置。
A pair of first and second memories for alternately inputting and outputting image data;
A pair of third and fourth memories that alternately input and output image data output from the first and second memories;
An address generation circuit that generates an address for rotating the original image data based on the input predetermined angle value and outputs the generated address to each of the first to fourth memories;
The original image data held by the input image holding means is divided and inputted alternately to the first and second memories in order,
Data is alternately output from the first and second memories, and these output data are alternately input to the third and fourth memories using addresses output from the address generation circuit,
Alternately outputting data from the third and fourth memories;
An image processing apparatus.
注目画素の周辺の8画素を含む9画素それぞれのデータを保持する手段と、
前記9画素から注目画素の回転後のアドレスに近い3画素を選択出力する手段と、
前記3画素と注目画素との4画素から補間データを演算出力する手段と、からなる補間回路を更に有し、
前記第1と第2のメモリからの出力データを前記補間回路に入力し、該補間回路からの出力データを前記第3と第4のメモリに入力することを特徴とする請求項1に記載の画像処理装置。
Means for holding data of each of nine pixels including eight pixels around the target pixel;
Means for selectively outputting three pixels close to the address after rotation of the target pixel from the nine pixels;
Means for calculating and outputting interpolation data from the four pixels of the three pixels and the target pixel,
2. The output data from the first and second memories are input to the interpolation circuit, and the output data from the interpolation circuit are input to the third and fourth memories. Image processing device.
画像データを交互に入力して出力する対となる第1と第2のメモリと、
前記第1と第2のメモリから出力される画像データを交互に入力し出力する対となる第5と第6のメモリと、
前記第5と第6のメモリから出力される画像データを交互に入力し出力する対となる第3と第4のメモリと、
入力された所定の角度値に基づき、元画像データを回転させるためのアドレスを生成して前記第1乃至第4のメモリに出力するアドレス生成回路とを有し、
入力画像保持手段によって保持された元画像データを分割して順番に前記第1と第2のメモリに交互に入力し、
前記第1と第2のメモリから交互にデータを出力し、これら出力データを前記アドレス生成回路から出力されたアドレスを使用して、前記第3と第4のメモリに交互に入力し、
前記第3と第4のメモリから交互にデータを出力し、これら出力データを、前記第5と第6のメモリに交互に入力し、
前記第5と第6のメモリから交互にデータを出力する、
ことを特徴とする画像処理装置。
A pair of first and second memories for alternately inputting and outputting image data;
A pair of fifth and sixth memories that alternately input and output image data output from the first and second memories;
A third and fourth memory forming a pair for alternately inputting and outputting image data output from the fifth and sixth memories;
An address generation circuit that generates an address for rotating the original image data based on the input predetermined angle value and outputs the generated address to the first to fourth memories;
The original image data held by the input image holding means is divided and inputted alternately to the first and second memories in order,
Data is alternately output from the first and second memories, and these output data are alternately input to the third and fourth memories using addresses output from the address generation circuit,
Data is alternately output from the third and fourth memories, and these output data are alternately input to the fifth and sixth memories;
Alternately outputting data from the fifth and sixth memories;
An image processing apparatus.
注目画素の周辺の8画素を含む9画素を保持する手段と、
前記9画素から注目画素の回転後のアドレスに近い3画素を選択出力する手段と、
前記3画素と注目画素との4画素から補間データを演算出力する手段とからなる補間回路を更に有し、
前記第1と第2のメモリからの出力データを前記補間回路に入力し、該補間回路からの出力データを前記第3と第4のメモリに入力することを特徴とする請求項3に記載の画像処理装置。
Means for holding 9 pixels including 8 pixels around the pixel of interest;
Means for selectively outputting three pixels close to the address after rotation of the target pixel from the nine pixels;
An interpolation circuit comprising means for calculating and outputting interpolation data from the four pixels of the three pixels and the target pixel;
4. The output data from the first and second memories is input to the interpolation circuit, and the output data from the interpolation circuit is input to the third and fourth memories. Image processing device.
画像データが入力される第1の先入れ先出し型メモリと、
前記第1の先入れ先出し型メモリから出力される画像データを交互に入力し出力する対となる第1と第2のメモリと、
入力された所定の角度値に基づき、元画像データを回転させるためのアドレスを生成して前記第1と第2のメモリに出力するアドレス生成回路と、
前記第1と第2のメモリから交互に出力されるデータを入力する第2の先入れ先出し型メモリとを有し、
入力画像保持手段によって保持された元画像データを分割して順番に前記第1の先入れ先出し型メモリに入力し、
前記第1の先入れ先出し型メモリからの出力データを前記アドレス生成回路から出力されたアドレスを使用して、前記第1と第2のメモリに交互に入力し、
前記第1と第2のメモリから交互にデータを出力し前記第2の先入れ先出し型メモリに入力し、該第2の先入れ先出し型メモリから出力する、
ことを特徴とする画像処理装置。
A first first-in first-out memory into which image data is input;
A pair of first and second memories for alternately inputting and outputting image data output from the first first-in first-out memory;
An address generation circuit that generates an address for rotating the original image data based on the input predetermined angle value and outputs the generated address to the first and second memories;
A second first-in first-out memory for inputting data alternately output from the first and second memories;
The original image data held by the input image holding means is divided and sequentially input to the first first-in first-out memory,
The output data from the first first-in first-out memory is alternately input to the first and second memories using the address output from the address generation circuit,
Alternately outputting data from the first and second memories, inputting the data to the second first-in first-out memory, and outputting from the second first-in first-out memory;
An image processing apparatus.
注目画素の周辺の8画素を含む9画素それぞれのデータを保持する手段と、
前記9画素から注目画素の回転後のアドレスに近い3画素を選択出力する手段と、
前記3画素と注目画素との4画素から補間データを演算出力する手段とからなる補間回路を更に有し、
前記第1の先入れ先出し型メモリからの出力データを前記補間回路に入力し、該補間回路からの出力データを前記第1と第2のメモリに入力することを特徴とする請求項5に記載の画像処理装置。
Means for holding data of each of nine pixels including eight pixels around the target pixel;
Means for selectively outputting three pixels close to the address after rotation of the target pixel from the nine pixels;
An interpolation circuit comprising means for calculating and outputting interpolation data from the four pixels of the three pixels and the target pixel;
6. The image according to claim 5, wherein output data from the first first-in first-out memory is input to the interpolation circuit, and output data from the interpolation circuit is input to the first and second memories. Processing equipment.
原稿をスキャンして画像データに変換する画像入力手段と、
画像データを用紙に印刷する画像形成手段と、
スキャン画像における原稿や画像の傾きを検出する手段と、
請求項1乃至6の何れか1つに記載の画像処理装置と、を有する事を特徴とする画像形成装置。
Image input means for scanning a document and converting it into image data;
Image forming means for printing image data on paper;
Means for detecting the document or the inclination of the image in the scanned image;
An image forming apparatus comprising: the image processing apparatus according to claim 1.
JP2007270638A 2007-10-17 2007-10-17 Image processing device and image forming apparatus Pending JP2009100313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007270638A JP2009100313A (en) 2007-10-17 2007-10-17 Image processing device and image forming apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007270638A JP2009100313A (en) 2007-10-17 2007-10-17 Image processing device and image forming apparatus

Publications (1)

Publication Number Publication Date
JP2009100313A true JP2009100313A (en) 2009-05-07

Family

ID=40702883

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007270638A Pending JP2009100313A (en) 2007-10-17 2007-10-17 Image processing device and image forming apparatus

Country Status (1)

Country Link
JP (1) JP2009100313A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9008445B2 (en) 2010-05-27 2015-04-14 Panasonic Intellectual Property Management Co., Ltd. Solid-state image capturing element and method for driving solid-state image capturing element
JP2019000231A (en) * 2017-06-13 2019-01-10 株式会社平和 Game machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9008445B2 (en) 2010-05-27 2015-04-14 Panasonic Intellectual Property Management Co., Ltd. Solid-state image capturing element and method for driving solid-state image capturing element
JP2019000231A (en) * 2017-06-13 2019-01-10 株式会社平和 Game machine

Similar Documents

Publication Publication Date Title
US7633508B2 (en) Data transfer apparatus
JP2010282429A (en) Image processing device and control method thereof
JP2009100313A (en) Image processing device and image forming apparatus
JP6238510B2 (en) Buffer, buffer control method, synchronization control device, synchronization control method, image processing device, and image processing method
JPH07296157A (en) Method and system of rotating image data
JP4313527B2 (en) Image drawing device
JP4748077B2 (en) Pixel data transfer control device and pixel data transfer control method
JP2011188050A (en) Image processing method and apparatus, and image forming apparatus
JP3019906B2 (en) Image processing device
JPH11168610A (en) Image processor
JP4172410B2 (en) Image processing method and image processing apparatus
JP3671744B2 (en) Image composition display device
JP2006092506A (en) Image processor
JP4144547B2 (en) Image processing device
JP3633807B2 (en) Intermediate pixel arithmetic unit
JP4144548B2 (en) Image processing device
JP4158695B2 (en) Image processing method and image processing apparatus
JP2008236085A (en) Image processor
JP5888028B2 (en) SIMD type microprocessor and processor system
JP4835872B2 (en) Image processing device
JP2005174142A (en) Image processing device
JP2019129356A (en) Image processing apparatus
JP2005286486A (en) Image processing apparatus
JP2005277710A (en) Method and apparatus of image processing
JP2002064701A (en) Processing unit for image rotation