JP2015055944A - Image processor and image rotation method - Google Patents
Image processor and image rotation method Download PDFInfo
- Publication number
- JP2015055944A JP2015055944A JP2013187859A JP2013187859A JP2015055944A JP 2015055944 A JP2015055944 A JP 2015055944A JP 2013187859 A JP2013187859 A JP 2013187859A JP 2013187859 A JP2013187859 A JP 2013187859A JP 2015055944 A JP2015055944 A JP 2015055944A
- Authority
- JP
- Japan
- Prior art keywords
- data
- unit
- image
- rotation
- memory
- 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
Links
- 238000000034 method Methods 0.000 title claims description 56
- 230000006866 deterioration Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 12
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000009966 trimming Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
Description
本発明は、画像処理装置における画像回転方法に関し、より詳細には、画像を矩形ブロック単位に分割し矩形ブロック単位で画像を回転する画像処理装置および画像回転方法に関する。 The present invention relates to an image rotation method in an image processing apparatus, and more particularly to an image processing apparatus and an image rotation method for dividing an image into rectangular blocks and rotating the image in rectangular blocks.
デジタル複合機に代表される画像処理装置では、デジタル化した画像を装置内部に取り込み、装置の使用条件やユーザ設定に応じて各種の画像処理を行い、画像出力を行う。例えば、デジタル複合機でプリント処理を行う場合、プリントデータの用紙向き(例えば、A4用紙横)と出力用紙の向き(例えば、A4用紙縦)とを揃えるために、装置内部で画像回転処理を行う必要がある。一般に、画像の回転処理は、回転方向に応じて画像の縦と横の画素データを入れ替えること、即ち、画像データをあるメモリ上に格納し所定のアドレス操作を行うことで実現できる。 In an image processing apparatus typified by a digital multi-function peripheral, a digitized image is taken into the apparatus, and various image processing is performed according to the use conditions of the apparatus and user settings, and an image is output. For example, when print processing is performed by a digital multi-function peripheral, image rotation processing is performed inside the apparatus in order to align the paper orientation of the print data (eg, A4 paper landscape) and the output paper orientation (eg, A4 paper portrait). There is a need. In general, image rotation processing can be realized by switching the vertical and horizontal pixel data of an image in accordance with the rotation direction, that is, storing image data in a certain memory and performing a predetermined address operation.
ここで、近年、プリント出力物の高画質化要求に伴いデジタル複合機が内部で扱う画像解像度は高まり、その分装置内部で扱う画素数は増加する。例えば、画像解像度が600dpi(dot per inch)から1200dpiに倍増する場合、画像1ページ分の画素数は4倍となる。また、画像を構成する画素について、1画素あたりの色階調数の分だけ、1画素を保持するのに必要なメモリ容量が増加する。そのため、画像回転処理で使用するメモリに係るコストを下げるためには、画像1ページ分ではなく、より小さい画像単位分のメモリを用いて回転処理を行うことが望ましい。これを実現するために、特許文献1では、画像を所定の矩形ブロック単位に分割し、当該矩形ブロックを構成する画像データ分のメモリ領域を用いて回転処理を行う手法が開示されている。 Here, in recent years, with the demand for higher image quality of printed output, the image resolution handled by the digital multi-function peripheral has increased, and the number of pixels handled by the apparatus has increased accordingly. For example, when the image resolution is doubled from 600 dpi (dot per inch) to 1200 dpi, the number of pixels for one page of the image is quadrupled. Further, the memory capacity necessary to hold one pixel is increased by the number of color gradations per pixel for the pixels constituting the image. Therefore, in order to reduce the cost related to the memory used for the image rotation process, it is desirable to perform the rotation process using a memory for a smaller image unit instead of one page of the image. In order to realize this, Patent Document 1 discloses a method of dividing an image into predetermined rectangular block units and performing a rotation process using a memory area for image data constituting the rectangular block.
特許文献1によれば、1ページ分の画像データを回転処理する際に要するメモリ容量が足りない場合に、矩形ブロック単位で画像回転処理ができる。また、画像データを構成する画素が、1画素あたりNビット(Nは2のべき乗)の色階調で表現される場合でも、色階調に応じて、画像データから切り出す矩形ブロックの幅、および、高さを適切に設定し、ブロック単位で画像回転処理ができる。 According to Patent Literature 1, when the memory capacity required for rotating image data for one page is insufficient, the image rotation processing can be performed in units of rectangular blocks. Further, even when the pixels constituting the image data are expressed by a color gradation of N bits (N is a power of 2) per pixel, the width of the rectangular block cut out from the image data according to the color gradation, and The height can be set appropriately, and image rotation processing can be performed in block units.
ここで、回転処理を行う画像データが、1画素あたりNビットの色階調で表現される画像データを正方形の矩形ブロックに分割して回転処理することを考える。矩形ブロックを正方形とするのは、回転時に入れ替える画像の縦と横の画素入れ替え数が同じになり、回転処理設定が容易となるためである。 Here, it is assumed that image data to be subjected to rotation processing is divided into square rectangular blocks that are image data represented by N-bit color gradation per pixel. The reason why the rectangular block is a square is that the vertical and horizontal pixel replacement numbers of the images to be replaced at the time of rotation are the same, and the rotation processing setting is facilitated.
正方形の矩形ブロックに対応する画像回転処理に用いるメモリ領域(以下、ワークメモリ、とする)を、32ワード×32ビット分とする。 A memory area (hereinafter referred to as a work memory) used for image rotation processing corresponding to a square rectangular block is 32 words × 32 bits.
1画素あたり1ビットの画像データ(N=1)の場合、ワークメモリが保持できる最大の正方形画像サイズは、32(縦)×32(横)画素であり、ワークメモリの32ワード×32ビット全てを使用して回転処理を行う。 In the case of 1-bit image data per pixel (N = 1), the maximum square image size that the work memory can hold is 32 (vertical) × 32 (horizontal) pixels, and all 32 words × 32 bits of the work memory. Rotate using.
次に、1画素あたり2ビットの画像データ(N=2)の場合、ワークメモリが保持できる最大の正方形画像サイズは、16(縦)×16(横)画素分となる。正方形矩形画像の縦、および、横の画素数が16となるのは、1画素あたり2ビットデータを持つため、例えば、当該2ビットデータが横方向に並ぶとすると、横16画素で32ビット(=16×2)を要しワークメモリ一杯となるためである。このとき、ワークメモリの半分の16ワード×32ビットを使用して回転処理を行う。 Next, in the case of 2-bit image data (N = 2) per pixel, the maximum square image size that can be held in the work memory is 16 (vertical) × 16 (horizontal) pixels. The reason why the number of vertical and horizontal pixels of a square rectangular image is 16 is because there are 2 bits of data per pixel. For example, if the 2 bits of data are arranged in the horizontal direction, = 16 × 2) and the work memory is full. At this time, rotation processing is performed using 16 words × 32 bits which is half of the work memory.
同様に、1画素あたり4ビットの画像データ(N=4)の場合、ワークメモリが保持できる最大の正方形画素サイズは、8(縦)×8(横)画素分となり、このとき、ワークメモリの4分の1の8ワード×32ビットを使用して回転処理を行う。 Similarly, in the case of 4-bit image data (N = 4) per pixel, the maximum square pixel size that can be held in the work memory is 8 (vertical) × 8 (horizontal) pixels. Rotation processing is performed using a quarter of 8 words × 32 bits.
このように、1画素あたりNビットの画像データを正方形の矩形ブロック単位で回転処理する場合に用いるワークメモリの使用効率はN分の1であり、Nが2以上の多値階調の画像データの回転時にワークメモリの使用効率が低下する問題が生じる。 As described above, the use efficiency of the work memory used when N-bit image data per pixel is rotated in units of square rectangular blocks is 1 / N, and multi-value gradation image data in which N is 2 or more. This causes a problem that the use efficiency of the work memory is lowered during rotation.
また、矩形ブロック単位で回転すると、1度に回転できる回転画素数がN分の1となるため、矩形ブロック切り出しに係る処理回数がN倍となる。このため、メインメモリに保持する画像データを矩形ブロックで画像を取得し回転処理するシステム構成では、メインメモリに対するアクセス数が増え、その分メモリ帯域負荷が増大する問題が生じる。 In addition, when the rotation is performed in units of rectangular blocks, the number of rotation pixels that can be rotated at a time is 1 / N, and therefore the number of times of processing relating to rectangular block cutout is N times. For this reason, in the system configuration in which the image data held in the main memory is acquired as a rectangular block and rotated, the number of accesses to the main memory increases, and the memory bandwidth load increases accordingly.
本発明は、上述した問題を鑑みてなされたものである。その目的とするところは、多数階調の画像データを正方形の矩形ブロック単位で回転処理する場合に、ワークメモリ使用効率の低下とメインメモリアクセス時のメモリ帯域負荷を軽減することが可能な、画像処理装置を提供することである。 The present invention has been made in view of the above-described problems. The purpose of this is to reduce the work memory usage efficiency and reduce the memory bandwidth load when accessing the main memory when rotating multiple-tone image data in units of square rectangular blocks. It is to provide a processing device.
画像データを格納する第一のメモリ(114)と、
前記第一のメモリ(114)上の前記画像データ(1101)に対して、
前記画像データ(1101)を所定の矩形画素単位で読み出し、および、前記第一のメモリへの書き戻しを行う画像データ転送部(601、604)と、
矩形画像データ領域を格納する第二のメモリ(603)と、
前記画像データ転送部(601、604)を用いて、前記第二のメモリ(603)に対して、前記矩形画素単位で読み出した画像データの書き込み、および、読み出しの制御を行う回転部(602)と、
を用いて回転処理を行う画像回転部(119)と、
を備え、
前記画像回転部(119)は、前記画像データ(1101)のビット階調数n(nは正の整数)に応じて、
前記画像データ転送部(601、604)のいずれかが、前記矩形画素のデータを、前記第一のメモリ(114)の連続アドレス方向(1111〜1115)に長さnでバースト転送し、前記第二のメモリ(603)に、前記矩形画素からなる矩形ブロックをn個格納して回転処理を行う、
ことを特徴とする。
A first memory (114) for storing image data;
For the image data (1101) on the first memory (114),
An image data transfer unit (601, 604) for reading the image data (1101) in units of a predetermined rectangular pixel and writing back to the first memory;
A second memory (603) for storing a rectangular image data area;
Using the image data transfer unit (601, 604), the rotation unit (602) performs writing of image data read out in units of the rectangular pixels and control of reading out to the second memory (603). When,
An image rotation unit (119) for performing rotation processing using
With
The image rotation unit (119), according to the bit gradation number n (n is a positive integer) of the image data (1101),
One of the image data transfer units (601, 604) burst-transfers the rectangular pixel data in a length n in the continuous address direction (1111 to 1115) of the first memory (114). A second memory (603) stores n rectangular blocks made up of the rectangular pixels and performs rotation processing.
It is characterized by that.
本発明により、画像回転手段はワークメモリを全て使用して回転処理を行いワークメモリの使用効率が低下しない。また、M個の矩形ブロック読み出し時にバースト読み出しが可能となり、矩形ブロックを1個単位で読み込む場合に対してメインメモリに対するリードアクセス効率が向上しアクセスオーバーヘッドを低減することが可能となる。 According to the present invention, the image rotation means performs rotation processing using the entire work memory, and the use efficiency of the work memory is not lowered. Also, burst reading is possible when reading M rectangular blocks, and the read access efficiency to the main memory can be improved and access overhead can be reduced as compared to reading rectangular blocks in units of one.
以下、本発明を実施するための最良の形態について図面を参照しながら説明する。 The best mode for carrying out the present invention will be described below with reference to the drawings.
(第1の実施形態)
以下、本発明における第1の実施形態について説明する。
(First embodiment)
The first embodiment of the present invention will be described below.
図1に、本実施形態における画像処理システムの全体構成を示すブロック図を示す。 FIG. 1 is a block diagram showing the overall configuration of the image processing system in the present embodiment.
同図に示す画像処理システムは、大きく、ホストコンピュータ(101)と、画像処理装置(102)と、から構成される。 The image processing system shown in the figure is largely composed of a host computer (101) and an image processing apparatus (102).
ホストコンピュータ(101)は、一般のPC(Personal Computer)やWS(Work Station)などのコンピュータであり、これらのコンピュータ上で作成された画像や文書は、PDLデータとして画像装置(102)に入力される。 The host computer (101) is a computer such as a general PC (Personal Computer) or WS (Work Station), and images and documents created on these computers are input to the image device (102) as PDL data. The
画像処理装置(102)は、ホストコンピュータ(101)から出力されたデータを受信する。即ち、画像処理装置(102)とホストコンピュータ(101)との間でデータ通信可能なネットワークが形成されていることを意味するが、このネットワークの構成については特に限定するものではない。 The image processing apparatus (102) receives data output from the host computer (101). That is, it means that a network capable of data communication is formed between the image processing apparatus (102) and the host computer (101), but the configuration of this network is not particularly limited.
画像処理装置(102)は、ホストコンピュータ(101)から受信したデータに基づいて各種の画像処理を施し、画像処理済みのデータをプリントエンジン部(123)へ出力する。画像処理装置(102)が行う処理の詳細については後述する。プリントエンジン部(123)は、画像処理装置(102)から出力された画像処理済みのデータに基づいて、紙などの記憶媒体上に印刷処理を行う。 The image processing apparatus (102) performs various types of image processing based on the data received from the host computer (101), and outputs the image-processed data to the print engine unit (123). Details of processing performed by the image processing apparatus (102) will be described later. The print engine unit (123) performs a printing process on a storage medium such as paper based on the image processed data output from the image processing apparatus (102).
なお、本実施形態では、画像処理装置(102)にデータを入力するのはホストコンピュータ(101)としたが、これ以外の装置であっても良く、例えば、不図示のスキャナ入力部から出力されたデータを画像処理装置(102)に入力するようにしても良い。 In this embodiment, the host computer (101) is used to input data to the image processing apparatus (102). However, other apparatuses may be used. For example, the data may be output from a scanner input unit (not shown). The data may be input to the image processing apparatus (102).
次に、画像処理装置(102)の構成について説明する。 Next, the configuration of the image processing apparatus (102) will be described.
画像処理装置のコントローラ部は、ホストI/F部(111)と、PDL処理部(112)と、CPU(113)と、RAM(114)と、ROM(115)と、符号化部(116)と、復号化部(117)と、画像処理部(118)と、回転処理部(119)と、記憶装置制御部(120)と、記憶装置(121)と、エンジンI/F部(122)と、プリントエンジン部(123)と、から構成される。 The controller unit of the image processing apparatus includes a host I / F unit (111), a PDL processing unit (112), a CPU (113), a RAM (114), a ROM (115), and an encoding unit (116). A decoding unit (117), an image processing unit (118), a rotation processing unit (119), a storage device control unit (120), a storage device (121), and an engine I / F unit (122). And a print engine unit (123).
ホストI/F部(111)は、ホストコンピュータ(102)から出力されたPDLデータを受信するためのインタフェースとして機能する。なお、ホストI/F部(111)は、画像処理装置(102)とホストコンピュータ(101)とを繋ぐネットワークに応じて異なり、例えば、イーサネット(登録商標)やシリアルインターフェース等で構成される。 The host I / F unit (111) functions as an interface for receiving PDL data output from the host computer (102). The host I / F unit (111) differs depending on the network connecting the image processing apparatus (102) and the host computer (101), and is configured by, for example, an Ethernet (registered trademark) or a serial interface.
PDL処理部(112)は、ホストI/F部(111)が受信したPDLデータを展開する処理を行う。 The PDL processing unit (112) performs processing for expanding the PDL data received by the host I / F unit (111).
CPU(113)は、RAM(114)やROM(115)に格納されているプログラムやデータを用いて本画像処理装置(102)全体の制御を行うと共に、画像処理装置(102)が行う後述の各処理を実行する。 The CPU (113) controls the entire image processing apparatus (102) using programs and data stored in the RAM (114) and ROM (115), and will be described later performed by the image processing apparatus (102). Execute each process.
RAM(114)は、画像処理装置(102)のシステムメモリであり、ホストI/F部(111)を介して、ホストコンピュータ(101)から受信したデータを一時的に記憶する他、CPU(113)が各種処理を実行する際に用いるワークエリアとなる。 A RAM (114) is a system memory of the image processing apparatus (102), and temporarily stores data received from the host computer (101) via the host I / F unit (111), as well as a CPU (113). ) Is a work area used when executing various processes.
ROM(115)は、CPU(113)が本画像処理装置(102)全体を制御する際に実行するプログラムやデータ、および、画像処理装置(102)の設定データなどが格納されている。 The ROM (115) stores programs and data executed when the CPU (113) controls the entire image processing apparatus (102), setting data of the image processing apparatus (102), and the like.
画像処理部(118)は、ホストコンピュータ(101)から出力されたデータから成る画像に対して、例えば、色空間変換、フィルタ、ハーフトーン処理等の各種画像処理を行う。 The image processing unit (118) performs various types of image processing such as color space conversion, filter, and halftone processing on the image composed of the data output from the host computer (101).
回転処理部(119)は、本発明に係る画像データを矩形ブロック単位で回転処理を行う。画像処理部(119)の詳細については後述する。 The rotation processing unit (119) performs rotation processing on the image data according to the present invention in units of rectangular blocks. Details of the image processing unit (119) will be described later.
符号化部(116)は、PDL処理部(112)において展開された画像に対して、例えば、多値画像データに対してはJPEG、2値画像データに対してはJBIG、等の圧縮方式で符号化処理を行う。 The encoding unit (116) compresses the image developed in the PDL processing unit (112) using a compression method such as JPEG for multi-valued image data and JBIG for binary image data. Perform the encoding process.
復号化部(117)は、符号化部(116)で符号化処理された圧縮方式に基づき、復号化処理を行い、符号化前の画像を生成する。 The decoding unit (117) performs a decoding process based on the compression method encoded by the encoding unit (116), and generates an image before encoding.
記憶装置制御部(120)は、本画像処理装置(102)が扱う画像データを記憶装置(121)に記録するための制御を行う。 The storage device control unit (120) performs control for recording the image data handled by the image processing device (102) in the storage device (121).
記憶装置(121)は、ハードディスクや半導体メモリからなる大容量記憶媒体であり、画像処理装置(102)がホストコンピュータ(101)から受信した画像データや、処理時に生成する中間画像データを記憶する。 The storage device (121) is a large-capacity storage medium including a hard disk and a semiconductor memory, and stores image data received by the image processing device (102) from the host computer (101) and intermediate image data generated during processing.
エンジンI/F部(122)は、本画像処理装置(102)による画像処理済みのデータをプリントエンジン部(123)に出力するための一連の処理を行う。 The engine I / F unit (122) performs a series of processes for outputting data processed by the image processing apparatus (102) to the print engine unit (123).
上述した各部は、画像処理装置(102)の内部バス(131)によって、互いに接続される。各部間のデータ転送は、各部と内部バス(131)との間に設けられたDMAC(Direct Memorry Access Controller)からなる不図示のデータ転送部を用いて行う。 The above-described units are connected to each other by an internal bus (131) of the image processing apparatus (102). Data transfer between the respective units is performed using a data transfer unit (not shown) formed by a DMAC (Direct Memory Access Controller) provided between each unit and the internal bus (131).
次に、図2のフローチャートを用いて、ホストコンピュータ(101)から画像処理装置(102)にデータを出力した場合に画像処理装置(102)が行う処理を説明する。 Next, processing performed by the image processing apparatus (102) when data is output from the host computer (101) to the image processing apparatus (102) will be described using the flowchart of FIG.
図2のフローチャートに示す処理の実態は、ROM(115)に格納されたプログラムであり、ホストI/F部(111)を介して、ホストコンピュータ(101)から出力されたPDLデータの受信をCPU(113)が検知することで開始される。なお、これ以降に述べるフローチャートの実態は、特記なき場合、ROM(115)に格納されたプログラムであるものとする。 The actual state of the processing shown in the flowchart of FIG. 2 is a program stored in the ROM (115), and the CPU receives the PDL data output from the host computer (101) via the host I / F unit (111). (113) starts upon detection. Note that the actual flow charts described below are programs stored in the ROM (115) unless otherwise specified.
先ず、ステップ(S201)において、CPU(113)は、受信したPDLデータを一時的にRAM(114)に格納する。次に、ステップ(S202)へ遷移し、CPU(113)が、受信したPDLデータをDL(Display List)に展開した後、ステップ(S203)へ遷移し、一時的にRAM(114)に格納する。ステップ(S204)において、PDL処理部(112)が、格納したDLに基づいて画像展開処理を行い、画像処理装置(102)内で扱うための画像データである、中間画像データを生成する。そして、ステップ(S205)において、符号化部(116)が、前記中間画像データを符号化しデータ圧縮を行う。ステップ(S206)において、前記符号化したデータを、記憶装置制御部(120)を介して記憶装置(121)へ格納する。以上の処理で、ホストコンピュータ(101)から送信された画像データ内容に応じて、1ページ以上の符号化圧縮された画像データが記憶装置(121)に格納される。 First, in step (S201), the CPU (113) temporarily stores the received PDL data in the RAM (114). Next, the process proceeds to step (S202), and after the CPU (113) expands the received PDL data to DL (Display List), the process proceeds to step (S203) and is temporarily stored in the RAM (114). . In step (S204), the PDL processing unit (112) performs image expansion processing based on the stored DL, and generates intermediate image data that is image data to be handled in the image processing apparatus (102). In step (S205), the encoding unit (116) encodes the intermediate image data and performs data compression. In step (S206), the encoded data is stored in the storage device (121) via the storage device control unit (120). Through the above processing, one page or more of the encoded and compressed image data is stored in the storage device (121) in accordance with the content of the image data transmitted from the host computer (101).
次に、図3に示すフローチャートを用いて、記憶装置(121)に格納された符号化圧縮された中間画像データを読み出し、プリントエンジン部(123)に出力してプリントを行う処理を説明する。 Next, a process of reading the encoded and compressed intermediate image data stored in the storage device (121) and outputting it to the print engine unit (123) will be described using the flowchart shown in FIG.
図3のフローチャートに示す処理は、CPU(113)が、記憶装置制御部(120)から符号化した中間画像データの格納処理終了通知を受信後に、復号化部(117)へプリント開始命令を指示することで開始される。 In the processing shown in the flowchart of FIG. 3, the CPU (113) instructs the decoding unit (117) to issue a print start command after receiving the encoded intermediate image data storage processing end notification from the storage device control unit (120). To start.
まず、ステップ(S301)において、画像処理部(118)、および、回転処理部(119)への動作設定を行う。具体的には、CPU(113)が、画像処理部(118)が有する不図示の画像処理モジュール、および、回転処理部(119)が有する各レジスタに対して、必要な設定値を書き込む。 First, in step (S301), operation settings for the image processing unit (118) and the rotation processing unit (119) are performed. Specifically, the CPU (113) writes necessary setting values into the image processing module (not shown) included in the image processing unit (118) and the registers included in the rotation processing unit (119).
次に、ステップ(S302)へ遷移し、CPU(113)は、記憶装置(121)に格納されている符号化された中間画像データを、RAM(114)へ出力するよう指示する。同時に、CPU(113)は、復号化部(117)に対してRAM(114)から前記符号化された中間画像データを読み出すよう指示する。復号化部(117)は、読み出した前記符号化された中間画像データを順次復号化しつつ、復号化した中間画像データを、RAM(114)へ出力する。なお復号化部(117)が行うデータの読み出し、および、出力は、復号化部(117)が内部に有する不図示のデータ転送部を用いて行うものとする。 Next, the process proceeds to step (S302), and the CPU (113) instructs to output the encoded intermediate image data stored in the storage device (121) to the RAM (114). At the same time, the CPU (113) instructs the decoding unit (117) to read the encoded intermediate image data from the RAM (114). The decoding unit (117) sequentially decodes the read encoded intermediate image data and outputs the decoded intermediate image data to the RAM (114). Note that data reading and output performed by the decryption unit (117) are performed using a data transfer unit (not shown) included in the decryption unit (117).
次に、ステップ(S303)へ遷移し、画像処理部(118)は、内部に有する不図示のデータ転送部を用いてRAM(114)から中間画像データを読み出し、プリント出力用の画像処理を行いプリントデータへ変換し、再度RAM(114)へ出力する。前記プリントデータとは、画像処理部(118)が有する不図示の各種の画像処理後のデータであり中間調処理されたデータである。中間調処理設定に応じて、前記中間画像データよりも低階調の画素データで構成される画像データである。 Next, the process proceeds to step (S303), and the image processing unit (118) reads intermediate image data from the RAM (114) by using a data transfer unit (not shown) provided therein, and performs image processing for print output. The data is converted into print data and output to the RAM (114) again. The print data is data after various types of image processing (not shown) included in the image processing unit (118), and is data subjected to halftone processing. The image data is composed of pixel data having a lower gradation than the intermediate image data in accordance with the halftone processing setting.
次に、ステップ(S304)へ遷移し、回転処理部(119)は、内部に有する不図示のデータ転送部を用いてRAM(114)からプリントデータを矩形ブロック単位で読み出し回転処理を行い、再度RAM(114)へ出力する。回転処理部(119)で行う処理の詳細は後述する。 Next, the process proceeds to step (S304), and the rotation processing unit (119) reads the print data from the RAM (114) using the internal data transfer unit (not shown) and performs rotation processing again. Output to the RAM (114). Details of processing performed by the rotation processing unit (119) will be described later.
そして、ステップ(S305)へ遷移し、プリントデータを、内部に有する不図示のデータ転送部を用いてRAM(114)に出力後、エンジンI/F部(122)が、内部に有する不図示のデータ転送部を用いてプリントエンジン部(123)へ出力する。
以上の各処理により、ホストコンピュータ(101)から受信したデータを、プリントエンジン部(123)へ出力することができる。
Then, the process proceeds to step (S305), the print data is output to the RAM (114) using a data transfer unit (not shown), and then the engine I / F unit (122) includes the data (not shown). The data is transferred to the print engine unit (123) using the data transfer unit.
Through the above processes, data received from the host computer (101) can be output to the print engine unit (123).
なお、以上の説明では、スプールデータは記憶装置(121)に保持するとしたが、これとは別に全てのデータをRAM(114)にのみ保持しつつ、上述した各種処理を行い、プリントエンジン部(122)に出力するようにしても良い。 In the above description, the spool data is held in the storage device (121). However, apart from this, all the data is held only in the RAM (114), and the various processes described above are performed, and the print engine unit ( 122).
図4は、前記中間画像データを構成する画素を模式的に示した図である。 FIG. 4 is a diagram schematically showing pixels constituting the intermediate image data.
中間画像データを構成する各画素のデータは、色コンポーネント毎のビット階調を示す画像情報で構成される。本実施例では、モノクロ画素で階調が8ビットであるものとする。なお、画像情報のデータ長、および、色空間情報はこれに限定されるものでは無く、例えば、R、G、Bの色空間で、階調8ビットからなるカラー画素であっても良い。 The data of each pixel constituting the intermediate image data is constituted by image information indicating the bit gradation for each color component. In this embodiment, it is assumed that the gradation is 8 bits with a monochrome pixel. Note that the data length of the image information and the color space information are not limited to this, and may be, for example, a color pixel having a gradation of 8 bits in an R, G, B color space.
次に、図5を用いて、画像処理部(118)のブロック構成を説明する。 Next, the block configuration of the image processing unit (118) will be described with reference to FIG.
画像処理部(118)は、大きく、データ転送を行うブロックと、画像処理を行うブロックとから構成される。本実施例では、データ転送を行うブロックとして、入力データ転送部(501)と、出力データ転送部(502)、画像処理を行うブロックとして画像処理ブロック1〜4(503〜506)と、から構成されるものとする。ここで、画像処理部(118)を構成する画像処理ブロックは、中間調処理を行うブロックを少なくとも一つ含むものとし、本実施例では画像処理ブロック3(505)がこれに該当するものとする。また、本実施例における他の画像処理ブロックは、画像処理ブロック1(503)が下地処理、画像処理ブロック2(504)が色変換処理、画像処理ブロック4(506)がトリミング処理とする。なお、画像処理ブロックの処理内容、および、段数は一例であり、実現する画像処理に応じて増減しても良い。 The image processing unit (118) is roughly composed of a block for performing data transfer and a block for performing image processing. In this embodiment, an input data transfer unit (501) and an output data transfer unit (502) are used as data transfer blocks, and image processing blocks 1 to 4 (503 to 506) are used as image processing blocks. Shall be. Here, the image processing block constituting the image processing unit (118) includes at least one block for performing halftone processing, and in this embodiment, the image processing block 3 (505) corresponds to this. In the other image processing blocks in this embodiment, the image processing block 1 (503) is background processing, the image processing block 2 (504) is color conversion processing, and the image processing block 4 (506) is trimming processing. Note that the processing content and the number of stages of the image processing block are examples, and may be increased or decreased depending on the image processing to be realized.
入力データ転送部(501)は、内部バス(131)に接続され、同じく内部バス(131)に接続されるRAM(114)に予め格納された中間画像データを画像処理部(118)内部へ読み込む。 The input data transfer unit (501) is connected to the internal bus (131), and reads the intermediate image data stored in advance in the RAM (114) which is also connected to the internal bus (131) into the image processing unit (118). .
入力データ転送部(501)の動作に要する設定としては、RAM(114)上に存在する中間画像データを構成する画像情報の開始アドレス番地、入力データサイズ等があり、CPU(113)が画像処理部(118)の有する不図示のレジスタに設定する。 The settings required for the operation of the input data transfer unit (501) include the start address address of the image information constituting the intermediate image data existing on the RAM (114), the input data size, etc., and the CPU (113) performs image processing. This is set in a register (not shown) of the section (118).
出力データ転送部(502)は、内部バス(131)に接続され、画像処理部(118)で処理された画像データを、内部バス(131)に接続されるRAM(114)に対して転送する。出力データ転送部(502)の動作に必要な設定は、RAM(114)上に画像処理済みのプリントデータを書き出すための、開始アドレス番地と、出力データサイズ等があり、CPU(113)が画像処理部(118)の有する不図示のレジスタに設定する。 The output data transfer unit (502) is connected to the internal bus (131), and transfers the image data processed by the image processing unit (118) to the RAM (114) connected to the internal bus (131). . The settings necessary for the operation of the output data transfer unit (502) include the start address address and the output data size for writing the image processed print data on the RAM (114). This is set in a register (not shown) of the processing unit (118).
画像処理ブロック1〜4(503〜506)は、入力データ転送部(501)から出力される画素データに対して、各画像処理ブロック固有の画像処理をパイプライン的に行い、処理結果であるプリントデータを出力データ転送部(502)へと出力する。本実施例では、中間調処理を行う画像処理ブロック3(505)の中間調処理出力設定は2ビットとし、RAM(114)から取得する8ビット階調の中間画像データは、2ビット階調のプリントデータに変換される。 The image processing blocks 1 to 4 (503 to 506) perform image processing unique to each image processing block on the pixel data output from the input data transfer unit (501) in a pipeline manner, and print the processing results. Data is output to the output data transfer unit (502). In this embodiment, the halftone processing output setting of the image processing block 3 (505) that performs halftone processing is set to 2 bits, and the 8-bit gradation intermediate image data acquired from the RAM (114) has a 2-bit gradation. Converted to print data.
次に、図6、および、図7を用いて、回転処理部(119)の構成を説明する。 Next, the configuration of the rotation processing unit (119) will be described using FIG. 6 and FIG.
図6に、回転処理部(119)のブロック構成図を示す。 FIG. 6 is a block diagram of the rotation processing unit (119).
入力データ転送部(601)は、内部バス(131)に接続され、RAM(114)に予め格納されたプリントデータを所定の矩形ブロック単位で画像処理部(119)内部へ読み込み、矩形ブロック画素を所定のライン単位で回転部(603)へ出力する。 The input data transfer unit (601) is connected to the internal bus (131), reads print data stored in advance in the RAM (114) into the image processing unit (119) in units of a predetermined rectangular block, and stores the rectangular block pixels. It outputs to a rotation part (603) per predetermined line unit.
回転部(602)は、入力データ転送部(601)から受信する矩形ブロックを構成する画素を、所定のライン単位で、ワークメモリ(603)へ転送する。また、回転部(602)は、ワークメモリ(603)に回転処理に必要な矩形ブロックのデータを転送後、所定のアドレス走査でワークメモリ(603)からデータを読み出すことで回転処理を行いつつ、読み出したデータを出力データ転送部(602)へ転送する。 The rotation unit (602) transfers the pixels constituting the rectangular block received from the input data transfer unit (601) to the work memory (603) in a predetermined line unit. In addition, the rotation unit (602) performs rotation processing by transferring the rectangular block data necessary for the rotation processing to the work memory (603) and then reading the data from the work memory (603) by a predetermined address scanning. The read data is transferred to the output data transfer unit (602).
図7に、ワークメモリ(603)のブロック構成図を示す。 FIG. 7 shows a block diagram of the work memory (603).
ワークメモリ(603)は、矩形ブロック単位で画像の回転処理に用いるメモリ領域である。本実施例では、ワークメモリ(603)の容量は32ワード×32ビット分とする。ワークメモリ(603)を32ビット×32ビット分の正方形ビットと見立てると、回転部(602)は、ワード方向(610で示す向き)での書き込みと、ビット方向(611で示す向き)に任意のデータ長でデータ読み出しができるものとする。なお、ワークメモリ(603)の実装形態は、前記アクセス制御ができれば、SRAM(Static RAM)、または、FF(Flip Flop)のいずれで構成しても良い。 The work memory (603) is a memory area used for image rotation processing in units of rectangular blocks. In this embodiment, the capacity of the work memory (603) is 32 words × 32 bits. Assuming that the work memory (603) is a square bit of 32 bits × 32 bits, the rotation unit (602) can write in the word direction (direction indicated by 610) and arbitrarily in the bit direction (direction indicated by 611). It is assumed that data can be read with the data length. It should be noted that the work memory (603) may be mounted in either SRAM (Static RAM) or FF (Flip Flop) as long as the access control is possible.
出力データ転送部(604)は、内部バス(131)に接続され、回転部(602)からワークメモリ(603)を用いて回転した回転済みデータを受信し、内部バス(131)に接続されるRAM(114)に対して転送する。 The output data transfer unit (604) is connected to the internal bus (131), receives the rotated data rotated using the work memory (603) from the rotation unit (602), and is connected to the internal bus (131). The data is transferred to the RAM (114).
上述した以外に、回転処理部(119)は不図示のレジスタを有する。レジスタ設定値には、データ読み書き用に、RAM(114)上に存在する中間画像データの画像情報の開始アドレス番地と、回転済みデータの書き込みのアドレス番地と、主走査画像サイズ、および、副走査画像サイズと、矩形切り出しサイズがある。 In addition to the above, the rotation processing unit (119) has a register (not shown). The register setting values include the start address address of the image information of the intermediate image data existing on the RAM (114), the address address for writing the rotated data, the main scan image size, and the sub scan for data reading and writing. There are image size and rectangular cutout size.
更に、回転角度設定と、処理対象データのビット階調の設定レジスタがある。回転角度設定は、時計まわりに例えば、90、180、270度の設定が可能であり、本実施例では90度回転設定であるものとする。また、処理対象データのビット階調、の設定値は、画像処理部(118)が有する中間調処理を行う画像処理ブロック3(505)の中間調出力設定と対応し、本実施例では2ビットであるものとする。 Furthermore, there are registers for setting the rotation angle and setting the bit gradation of the data to be processed. For example, 90, 180, and 270 degrees can be set clockwise, and in this embodiment, the rotation angle is set to 90 degrees. The setting value of the bit gradation of the processing target data corresponds to the halftone output setting of the image processing block 3 (505) that performs the halftone process of the image processing unit (118), and in this embodiment, 2 bits. Suppose that
続いて、図8〜図13を用いて、回転処理部(119)が行う矩形ブロック単位での回転処理制御を詳細に説明する。 Next, the rotation processing control in units of rectangular blocks performed by the rotation processing unit (119) will be described in detail with reference to FIGS.
まず、図8のシーケンス図を用いて、回転処理部(119)の構成要素(601〜604)と、CPU(113)、および、RAM(114)との相互処理関係を説明する。図8の処理シーケンスは、上述したステップ(S303)において、画像処理部(118)が処理したプリントデータをRAM(114)へ出力し終えたことをCPU(113)が検出した後、開始されるものとする。 First, the mutual processing relationship between the components (601 to 604) of the rotation processing unit (119), the CPU (113), and the RAM (114) will be described with reference to the sequence diagram of FIG. The processing sequence of FIG. 8 is started after the CPU (113) detects that the print data processed by the image processing unit (118) has been output to the RAM (114) in the above-described step (S303). Shall.
図8の処理シーケンス開始前には、回転処理部(119)の動作に必要なレジスタ値は、上述したステップ(S301)で設定済みであるものとし、本実施例における設定値は、処理対象データのビット階調が2ビット、矩形切り出しサイズが16×16画素等である。 Prior to the start of the processing sequence of FIG. 8, it is assumed that the register values necessary for the operation of the rotation processing unit (119) have been set in the above-described step (S301), and the set values in this embodiment are the data to be processed. The bit gradation is 2 bits, and the rectangular cut-out size is 16 × 16 pixels.
まず、CPU(113)は、画像回転部(119)に対して回転処理開始指示を行う(801)。具体的には、CPU(113)は、回転処理部(119)が備える不図示の処理開始設定用レジスタビット値(初期値は0)に1を書き込む。 First, the CPU (113) instructs the image rotation unit (119) to start a rotation process (801). Specifically, the CPU (113) writes 1 to a processing start setting register bit value (initial value is 0) (not shown) included in the rotation processing unit (119).
回転処理部(119)は、前記処理開始設定用レジスタビット値が1であることを確認すると、入力データ転送部(601)は、RAM(114)から処理対象データであるプリントデータを読み出し(802)つつ、読み出したプリントデータを回転部(602)へ転送する(803)。入力データ転送部(601)の処理の詳細は後述する。 When the rotation processing unit (119) confirms that the processing start setting register bit value is 1, the input data transfer unit (601) reads out the print data as the processing target data from the RAM (114) (802). ), The read print data is transferred to the rotation unit (602) (803). Details of the processing of the input data transfer unit (601) will be described later.
回転部(602)は、入力データ転送部(601)から受信するプリントデータをワークメモリ(603)へ書き込む(804)。データ書き込み(804)は、書き込んだデータ量を判定しながら(805)、ワークメモリ(603)に回転処理を行うだけの所定のデータ量を書き込むまで行う。回転処理部(119)は、前記所定のデータ量をワークメモリ(603)に書き込み後に入力データ転送部に対してデータ転送中断指示を行い(806)、ワークメモリ(603)からデータ読み出しを行う(807)。回転部(602)は、データ書き込み(804)と、データ読み出し(807)の方向(611)とにおけるアドレス走査とデータ制御を組み合わせることで、回転角度設定に応じた回転処理を実現する。回転処理の詳細は後述する。 The rotation unit (602) writes the print data received from the input data transfer unit (601) to the work memory (603) (804). Data writing (804) is performed until a predetermined amount of data is written to the work memory (603) while determining the amount of written data (805). The rotation processing unit (119) instructs the input data transfer unit to interrupt data transfer after writing the predetermined amount of data in the work memory (603) (806), and reads data from the work memory (603) ( 807). The rotation unit (602) realizes a rotation process according to the rotation angle setting by combining address scanning and data control in the data write (804) and the data read (807) direction (611). Details of the rotation process will be described later.
回転処理部(602)は、ワークメモリ(603)から読み出したプリントデータを、出力データ転送部へ転送(808)する。そして、出力データ転送部(604)は、回転部(602)から受信するプリントデータをRAM(114)へ書き込む(810)。回転処理部(602)は、ワークメモリ(603)から読み出したデータ量を判定しながら(809)、データ書き込み(804)で書き込んだ全てのデータを読み出すまで行うデータ転送(808)を行う。回転部(602)は、入力データ転送部(601)に対してデータ転送中断指示を解除する(811)。 The rotation processing unit (602) transfers the print data read from the work memory (603) to the output data transfer unit (808). Then, the output data transfer unit (604) writes the print data received from the rotation unit (602) to the RAM (114) (810). The rotation processing unit (602) performs data transfer (808) until all data written by data writing (804) is read while determining the amount of data read from the work memory (603) (809). The rotation unit (602) cancels the data transfer interruption instruction to the input data transfer unit (601) (811).
以上述べた処理(802〜811)が1矩形ブロック分の処理であり、本処理を、入力データ転送部に設定した画像サイズ分繰り返して行うことで、プリントデータ分の回転処理を行う。入力データ転送部(601)は、全画像サイズ分の回転処理終了を判断すると、CPUに対して回転処理終了を割り込み通知し(812)、回転処理部(119)は、プリントデータの回転処理を終了する。 The processing (802 to 811) described above is processing for one rectangular block, and this processing is repeated for the image size set in the input data transfer unit, thereby performing rotation processing for print data. When the input data transfer unit (601) determines the end of the rotation processing for all image sizes, the CPU notifies the CPU of the end of the rotation processing (812), and the rotation processing unit (119) performs the rotation processing of the print data. finish.
図9に回転処理部(119)の処理フローチャートを示す。本フローチャートに示す処理は、上述したステップ(S304)の開始タイミングで実行される。 FIG. 9 shows a processing flowchart of the rotation processing unit (119). The processing shown in this flowchart is executed at the start timing of the above-described step (S304).
ステップ(S901)で、入力データ転送部(601)がRAM(114)上の処理対象データを読み出す。ステップ(S902)で、回転部(602)がワークメモリ(603)を用いて回転処理を行う。そして、回転済みデータを出力データ転送部がステップ(S903)でRAM(114)へ書き込む。これら一連の処理を、ステップ(S904)で設定サイズ分行ったか判断し、全サイズ分処理終了したら回転処理を終了する。入力データ転送(S901)、および、回転(S902)の処理詳細は後述する。 In step (S901), the input data transfer unit (601) reads the processing target data on the RAM (114). In step (S902), the rotation unit (602) performs rotation processing using the work memory (603). Then, the output data transfer unit writes the rotated data to the RAM (114) in step (S903). It is determined whether or not a series of these processes has been performed for the set size in step (S904). Details of input data transfer (S901) and rotation (S902) will be described later.
図10に、入力データ転送部(601)が行う処理(S901)のフローチャートを示す。 FIG. 10 shows a flowchart of the process (S901) performed by the input data transfer unit (601).
ステップ(S1001)では、CPU(113)が回転処理部(119)に設定するレジスタ値から、処理対象データのビット階調と、矩形切り出しサイズと、読み出しデータの開始アドレス、および、主走査、副走査サイズをそれぞれ取得する。本実施例における設定値は、ビット階調が2、矩形切り出しサイズが16×16画素、先頭アドレスが0x1000番地、である。また、主走査サイズが80画素、副走査サイズが96画素である。 In step (S1001), from the register values set in the rotation processing unit (119) by the CPU (113), the bit gradation of the data to be processed, the rectangular cutout size, the read data start address, the main scan, the sub scan, Each scan size is acquired. In this embodiment, the set values are bit gradation 2, rectangular cutout size 16 × 16 pixels, and top address 0x1000. The main scanning size is 80 pixels and the sub-scanning size is 96 pixels.
次に、ステップ(S1002〜S1006)において、処理対象データのビット階調の設定値に応じて、入力データ転送部(119)が行うデータ転送の単位データ長(以下、転送サイズ、とする)を設定する。1ビット階調の場合(S1002でYES)は、ステップ(S1003)において、主走査転送サイズを32ビットに設定する。これは、バス(131)におけるバースト長1の転送サイズである。1ビット階調ではなく(S1002でNO)、2ビット階調の場合(S1004でYES)は、主走査転送サイズを64ビットに設定する。これは、バス(131)におけるバースト長2の転送サイズである。2ビット階調でもない場合(S1004でNO)は、主走査転送サイズを128ビットに設定する。これは、バス(131)におけるバースト長4の転送サイズである。 Next, in steps (S1002 to S1006), the unit data length (hereinafter referred to as transfer size) of data transfer performed by the input data transfer unit (119) according to the set value of the bit gradation of the processing target data is set. Set. In the case of 1-bit gradation (YES in S1002), the main scan transfer size is set to 32 bits in step (S1003). This is a transfer size of burst length 1 on the bus (131). If it is not 1-bit gradation (NO in S1002) and 2-bit gradation (YES in S1004), the main scan transfer size is set to 64 bits. This is the transfer size of burst length 2 on the bus (131). If it is not 2 bit gradation (NO in S1004), the main scanning transfer size is set to 128 bits. This is the transfer size of burst length 4 on the bus (131).
転送サイズ設定後、入力データ転送部(601)は、ステップ(S1007)へ遷移し、単位矩形ブロック分だけ、RAM(114)上の処理対象データの読み出しを行い、データ転送処理を終了する。 After setting the transfer size, the input data transfer unit (601) proceeds to step (S1007), reads the processing target data on the RAM (114) by the unit rectangular block, and ends the data transfer process.
ここで、図11を用いて、回転処理部(119)が、RAM(114)上にある回転処理対象データであるプリントデータ(1101)から、単位矩形ブロック領域(1102)を読み出す際に行う処理動作を模式的に説明する。 Here, referring to FIG. 11, the processing performed when the rotation processing unit (119) reads the unit rectangular block area (1102) from the print data (1101) that is the rotation processing target data on the RAM (114). The operation will be schematically described.
プリントデータ(1101)は、画像処理部(118)が有する中間調処理を行う画像処理ブロック3(505)で処理された画像データである。本実施例におけるプリントデータ(1101)は、主走査サイズが160ビット、副走査サイズが192ビットであり、1画素あたり2ビット階調のデータが主走査方向に置かれるとして、80画素(主走査)×96画素(副走査)の画素で構成される。 The print data (1101) is image data processed by the image processing block 3 (505) that performs halftone processing of the image processing unit (118). The print data (1101) in this embodiment has a main scanning size of 160 bits and a sub-scanning size of 192 bits, and assuming that 2-bit gradation data per pixel is placed in the main scanning direction, 80 pixels (main scanning). ) × 96 pixels (sub-scanning).
入力データ転送部(601)は、プリントデータ(1101)を、単位矩形ブロック領域(1102〜1104)で切り出し、データ読み込みを行う。単位矩形ブロック領域は、先に設定した主走査転送サイズと、ステップ(S1001)で取得する矩形切り出しサイズの副走査方向サイズとで決まる矩形領域であり、本実施例では、64(ビット)×16(画素)である。単位矩形ブロック領域(1102)の読み出しは、まず、開始アドレス(1110)から主走査転送サイズである64ビットのデータ読み出しを行う(1111)。 The input data transfer unit (601) cuts out the print data (1101) in the unit rectangular block areas (1102 to 1104) and reads the data. The unit rectangular block area is a rectangular area determined by the previously set main scanning transfer size and the sub-scanning direction size of the rectangular cut-out size acquired in step (S1001). In this embodiment, 64 (bits) × 16 (Pixel). To read the unit rectangular block area (1102), first, 64-bit data that is the main scanning transfer size is read from the start address (1110) (1111).
具体的には、0x1000番地から0x1007番地まで、バースト長2つ分の連続アドレスでのデータ読み出しを行う。次に、現在のアドレス位置である0x1008番地から、(主走査サイズ−主走査転送サイズ)分のアドレスジャンプを行い、次の主走査転送サイズ分のデータ読み出しを行う(1112)。同様なアドレスジャンプ、および、主走査転送サイズでのデータ読み出しを、合計16画素ライン分行い単位矩形ブロック領域(1102)のデータ読み出しを行う。単位矩形ブロック領域(1102)の最後のデータ読み出し(1113)が終わると、(主走査サイズ×単位矩形ブロック領域の画素ライン)分のアドレスジャンプをして次の単位矩形ブロック領域(1103)の開始アドレスからデータ読み出し(1114)を行う。 Specifically, data reading is performed at continuous addresses corresponding to two burst lengths from address 0x1000 to address 0x1007. Next, an address jump corresponding to (main scanning size−main scanning transfer size) is performed from address 0x1008, which is the current address position, and data reading for the next main scanning transfer size is performed (1112). A similar address jump and data reading with the main scanning transfer size are performed for a total of 16 pixel lines, and data reading of the unit rectangular block area (1102) is performed. When the last data reading (1113) of the unit rectangular block area (1102) is completed, an address jump corresponding to (main scanning size × pixel line of the unit rectangular block area) is performed, and the next unit rectangular block area (1103) is started. Data is read from the address (1114).
その後データ読み出しを16ライン分行い16ライン目のデータ読み出し(1115)が終了後、次の単位矩形ブロック領域(1104)の開始アドレスからデータ読み出しを行う(1116)。以下同様に、入力データ転送部は、全プリントデータに対して、単位矩形ブロックでのデータ読み出しを、バースト長2の連続アドレスデータ読み込みで行う。 Thereafter, data reading is performed for 16 lines, and after data reading (1115) for the 16th line is completed, data is read from the start address of the next unit rectangular block area (1104) (1116). Similarly, the input data transfer unit reads data in a unit rectangular block for all print data by reading continuous address data with a burst length of 2.
図12に、回転部(602)が行う回転(S903)に係る処理のフローチャートを示す。 FIG. 12 shows a flowchart of processing relating to the rotation (S903) performed by the rotation unit (602).
ステップ(S1201)では、CPU(113)が回転処理部(119)に設定するレジスタ値から、処理対象データのビット階調、および、回転角度設定を取得する。本実施例における、ビット階調は2、回転角度は90度、であるものとする。 In step (S1201), the CPU (113) acquires the bit gradation and rotation angle setting of the processing target data from the register value set in the rotation processing unit (119). In this embodiment, the bit gradation is 2 and the rotation angle is 90 degrees.
次に、ステップ(S1202〜S1206)において、回転部(602)がワークメモリ(603)に対して、正方形画素からなる矩形ブロック領域のデータを同時に何個分、書き込み、および、データ読み込みするかを示す、矩形ブロック数を設定する。1ビット階調の場合(S1202でYES)は、ステップ(S1203)において、矩形ブロック数を1に設定する。このとき、回転部(602)は、ワークメモリ(603)へ32×32画素の正方形矩形ブロック領域を1個書き込み、それを読み出すことで回転処理を行う。 Next, in steps (S1202 to S1206), the rotating unit (602) determines how many pieces of data in the rectangular block area composed of square pixels are written to and read from the work memory (603) at the same time. Set the number of rectangular blocks shown. In the case of 1-bit gradation (YES in S1202), the number of rectangular blocks is set to 1 in step (S1203). At this time, the rotation unit (602) performs a rotation process by writing one square rectangular block region of 32 × 32 pixels to the work memory (603) and reading it out.
1ビット階調ではなく(S1202でNO)、2ビット階調の場合(S1204でYES)は、ステップ(S1205)において、矩形ブロック数を2に設定する。このとき、回転部(602)は、ワークメモリ(603)へ16画素×16画素の正方形矩形ブロック領域を2個書き込み、それを読み出すことで回転処理を行う。また、正方形矩形ブロック領域のデータ量は、1画素あたり2ビット階調のデータが主走査方向に置かれるとして32×16ビットであり、ワークメモリ(603)は、正方形矩形ブロック領域2個分のデータを格納できる。2ビット階調でもない場合(S1204でNO)は、ステップ(S1206)において、矩形ブロック数を4に設定する。 If it is not 1-bit gradation (NO in S1202) and 2-bit gradation (YES in S1204), the number of rectangular blocks is set to 2 in step (S1205). At this time, the rotation unit (602) performs rotation processing by writing two square rectangular block regions of 16 pixels × 16 pixels into the work memory (603) and reading them out. Further, the data amount of the square rectangular block area is 32 × 16 bits assuming that 2-bit gradation data is placed in the main scanning direction per pixel, and the work memory (603) has two square rectangular block areas. Can store data. If it is not a 2-bit gradation (NO in S1204), the number of rectangular blocks is set to 4 in step (S1206).
このとき、回転部(602)は、ワークメモリ(603)へ8画素×8画素の正方形矩形ブロック領域を4個書き込み、それを読み出すことで回転処理を行う。また、正方形矩形ブロック領域のデータ量は、1画素あたり4ビット階調のデータが主走査方向に置かれるとして32×4ビットであり、ワークメモリ(603)は、正方形ブロック領域4個分のデータを格納できる。本実施例では、ビット階調は2であり、矩形ブロック数は2である。 At this time, the rotation unit (602) performs rotation processing by writing four 8-pixel by 8-pixel square rectangular block areas to the work memory (603) and reading them out. The data amount of the square rectangular block area is 32 × 4 bits assuming that 4-bit gradation data is placed in the main scanning direction per pixel, and the work memory (603) stores data for four square block areas. Can be stored. In this embodiment, the bit gradation is 2 and the number of rectangular blocks is 2.
その後、ステップ(S1207)へ遷移し、回転部(602)は、先に設定した矩形ブロック数に応じて、入力データ転送部(601)が転送するプリントデータをワークメモリ(603)へ書き込む。ステップ(S1208)で矩形ブロック数分の書き込みしたかを判定する。本実施例では、矩形ブロック数2個分のデータ書き込みを判定後、回転部(602)は、ワークメモリ(603)から、回転角度設定に従い、90度回転できるアドレス走査でデータ読み出しを行う(S1209)。 Thereafter, the process proceeds to step (S1207), and the rotation unit (602) writes the print data transferred by the input data transfer unit (601) to the work memory (603) according to the previously set number of rectangular blocks. In step (S1208), it is determined whether the number of rectangular blocks has been written. In this embodiment, after determining data writing for two rectangular blocks, the rotating unit (602) reads data from the work memory (603) by address scanning capable of rotating by 90 degrees according to the rotation angle setting (S1209). ).
ここで、図13を用いて、上述したステップ(S1207〜S1209)において、回転部(602)が、ワークメモリ(603)に対して、矩形ブロック単位でデータ書き込み、および、データ読み出しして行う回転処理を模式的に説明する。以下では、本実施例における設定である、ビット階調が2、回転角度設定が90度、に基づいて説明する。 Here, referring to FIG. 13, in the steps (S1207 to S1209) described above, the rotation unit (602) performs rotation by writing data to and reading data from the work memory (603) in units of rectangular blocks. The process will be schematically described. In the following, description will be made based on the setting in the present embodiment, which is bit gradation 2 and rotation angle setting 90 degrees.
まず、ステップ(S1207)のデータ書き込み処理について説明する。回転部(602)は、入力データ転送部(601)が上述したステップ(S901)において読み出すデータ64ビット長のデータ(1301)を受信後、下位32ビット(1302)と上位32ビット(1303)に分割してワークメモリ(603)へ書き込む。このとき、下位32ビット分のデータ(1302)を、ワークメモリ(603)のアドレス0x00(1304)へ書き込み、上位32ビット分のデータ(1303)をアドレス0x10(1306)へ書き込む。 First, the data writing process in step (S1207) will be described. The rotation unit (602) receives the 64-bit data (1301) read out in the above-described step (S901) by the input data transfer unit (601), and then converts the data into the lower 32 bits (1302) and the upper 32 bits (1303). Divide and write to work memory (603). At this time, the lower 32 bits of data (1302) are written to address 0x00 (1304) of the work memory (603), and the upper 32 bits of data (1303) are written to address 0x10 (1306).
以下同様に、回転部(602)は、入力データ転送部(601)から受信する64ビット長のデータを、上下32ビットで分け、下位32ビットはアドレス0x00(1304)からの、上位32ビットはアドレス0x10(1306)からの昇順で書き込む。データの書き込みは、は単位矩形ブロック領域分となる16画素(ライン)分のデータ分行い、最終的に、ワークメモリ(603)は全メモリ領域分となる単位矩形ブロック領域2個分(1310、1311)のデータを格納する。 Similarly, the rotation unit (602) divides 64-bit data received from the input data transfer unit (601) into upper and lower 32 bits, the lower 32 bits are from the address 0x00 (1304), and the upper 32 bits are Write in ascending order from address 0x10 (1306). Data is written for 16 pixels (lines) corresponding to the unit rectangular block area, and finally, the work memory (603) corresponds to two unit rectangular block areas (1310, 13) corresponding to the entire memory area. 1311) is stored.
次に、ステップ(S1209)のデータ読み出し処理について説明する。回転部(602)は、ワークメモリ(603)の格納データを、ビット方向(1308、1309)で、単位矩形ブロック領域(1310、1311)別に、各16ビット長のデータを読み出す(1308、1309)。回転部(602)は、読み出した16ビット長データ(1308、1309)を、出力データ転送部(604)に出力し、出力データ転送部(604)は、回転角度設定に応じてRAM(114)上にあらかじめ確保した回転先データ格納領域に書き出す。 Next, the data reading process in step (S1209) will be described. The rotation unit (602) reads the data stored in the work memory (603) in the bit direction (1308, 1309) and the 16-bit data for each unit rectangular block area (1310, 1311) (1308, 1309). . The rotation unit (602) outputs the read 16-bit length data (1308, 1309) to the output data transfer unit (604), and the output data transfer unit (604) determines the RAM (114) according to the rotation angle setting. Write to the rotation destination data storage area secured in advance above.
例えば、単位矩形ブロック領域(1310)は、回転後のデータ(1320)上の16×32ビットのデータ領域(1323)に対応する。出力データ転送部(604)は、回転部(602)がワークメモリ(603)から読み出した16ビット長のデータ(1308)を、回転後データ(1320)の16ビット長データ(1321)に書き込む。また、単位矩形ブロック領域(1311)は、回転後データ(1320)の領域(1324)に対応し、回転部(602)がワークメモリ(603)から読み出す16ビット長のデータ(1309)を、回転後データ(1320)の16ビット長データ(1322)に書き込む。 For example, the unit rectangular block area (1310) corresponds to a 16 × 32-bit data area (1323) on the rotated data (1320). The output data transfer unit (604) writes the 16-bit length data (1308) read from the work memory (603) by the rotation unit (602) to the 16-bit length data (1321) of the post-rotation data (1320). The unit rectangular block area (1311) corresponds to the area (1324) of the post-rotation data (1320), and the rotation unit (602) rotates 16-bit data (1309) read from the work memory (603). Write to the 16-bit length data (1322) of the subsequent data (1320).
なお、出力データ転送部(604)が行う、RAM(114)へのデータ書き込みは、バースト長1のシングル書き込みである。以上の処理により、回転部(602)は、ワークメモリ(603)に書き込んだデータを読み出し回転を実現する。 Note that the data write to the RAM (114) performed by the output data transfer unit (604) is a single write with a burst length of 1. Through the above processing, the rotation unit (602) reads the data written in the work memory (603) and realizes rotation.
以上の説明により、回転処理部(119)は、RAM(114)上のプリントデータ(1101)を、内部に備えるワークメモリ(603)を用いて回転することができる。この回転処理において、ワークメモリ(603)は2つの正方形矩形画素を格納することができ、メモリ使用率は100パーセントである。また、RAM(114)上の、ビット階調2のプリントデータ(1101)をバースト長2で連続アドレス読み出すことができる。なお、本発明は、本実施例で述べた各種設定に制限されものではない。 As described above, the rotation processing unit (119) can rotate the print data (1101) on the RAM (114) using the work memory (603) provided therein. In this rotation processing, the work memory (603) can store two square rectangular pixels, and the memory usage rate is 100%. Further, the print data (1101) of the bit gradation 2 on the RAM (114) can be continuously read out with the burst length of 2. The present invention is not limited to the various settings described in this embodiment.
本実施例では、ビット階調が2のデータに対して、バースト長2の連続アドレス読み出しを行い、ワークメモリ(603)に2個の正方形矩形画素(16×16)を格納して回転処理を行った。 In this embodiment, continuous address reading with a burst length of 2 is performed on data with a bit gradation of 2, and two square rectangular pixels (16 × 16) are stored in the work memory (603) to perform rotation processing. went.
これとは異なる設定として、ビット階調が4のデータの回転処理する設定の場合は、ワークメモリ(603)が格納する正方形矩形画素を8×8画素分とし、回転処理を行うようにする。このとき、前記正方形画素(8×8)のビット数は、(8(画素)×4(ビット階調))×8、即ち、32×4ビットとなり、ワークメモリ(603)は4個の正方形画素を格納すれば、メモリ使用効率100%で回転処理を行うことができる。また、RAM(114)からの4個分の正方形画素の読み出しを、バースト長4の連続アドレス読み出しで行うことができる。 As a setting different from this, in the case of setting to rotate data with a bit gradation of 4, the square rectangular pixels stored in the work memory (603) are set to 8 × 8 pixels, and the rotation processing is performed. At this time, the number of bits of the square pixel (8 × 8) is (8 (pixel) × 4 (bit gradation)) × 8, that is, 32 × 4 bits, and the work memory (603) has four squares. If the pixels are stored, the rotation process can be performed with a memory use efficiency of 100%. Further, reading of four square pixels from the RAM (114) can be performed by continuous address reading with a burst length of 4.
即ち、本発明では、RAM上のビット階調n(nは正の整数)からなるデータを、m×m(mはnの倍数)の正方形矩形画素単位で回転する場合に、1辺がm×nビットからなる回転用一時メモリにn個の正方形矩形画素を格納し、この単位で回転処理を行う。これにより、回転用一時メモリを全て使用し、かつ、RAMから回転用一時メモリへのデータ転送について、バースト長nの連続アドレス読み出しを行うことができる。そして、データ転送効率を高め、バス帯域負荷を低減することができる。 That is, in the present invention, when data consisting of bit gradation n (n is a positive integer) on the RAM is rotated in units of m × m (m is a multiple of n) square rectangular pixels, one side is m N square rectangular pixels are stored in a temporary memory for rotation of × n bits, and the rotation process is performed in this unit. As a result, all the temporary memory for rotation can be used, and continuous address reading with a burst length n can be performed for data transfer from the RAM to the temporary memory for rotation. Then, the data transfer efficiency can be increased and the bus bandwidth load can be reduced.
また、本発明におけるRAM(114)とワークメモリ(603)との間で行うデータのバースト転送は、入力データ転送部(601)が行うデータ読み出しに限るものではなく、出力データ転送部(604)側で行うようにしても良い。例えば、回転後画像データ(1320)を270度回転して画像データ(1101)を生成することを考える。このとき、入力データ転送部(601)は、シングル転送で行いデータを読み出し(1321、1322)、出力データ転送部(604)は、回転後のデータをバースト長2でバースト転送できる(1111〜1115)。よって、RAM(114)のデータアクセスが、例えば、データ読み出しよりもデータ書き込みが遅い場合は、データ書き込み側をバースト転送するようにRAM(114)上で回転処理に係る画像データを取り扱う。これにより、RAM(114)に対するデータ読み出しとデータ書き込みを平準化することができる。 The burst transfer of data performed between the RAM (114) and the work memory (603) in the present invention is not limited to the data read performed by the input data transfer unit (601), but the output data transfer unit (604). It may be performed on the side. For example, consider that the image data (1101) is generated by rotating the rotated image data (1320) by 270 degrees. At this time, the input data transfer unit (601) performs single transfer and reads data (1321, 1322), and the output data transfer unit (604) can perform burst transfer of the rotated data with a burst length of 2 (1111 to 1115). ). Therefore, when the data access of the RAM (114) is slower than the data reading, for example, the image data related to the rotation processing is handled on the RAM (114) so as to perform burst transfer on the data writing side. As a result, data reading and data writing to the RAM (114) can be leveled.
102 画像処理装置
119 回転処理部
601 入力データ転送部
602 回転部
603 ワークメモリ
604 出力データ転送部
102 Image Processing Device 119 Rotation Processing Unit 601 Input Data Transfer Unit 602 Rotation Unit 603 Work Memory 604 Output Data Transfer Unit
Claims (3)
前記第一のメモリ(114)上の前記画像データ(1101)に対して、
前記画像データ(1101)を所定の矩形画素単位で読み出し、および、前記第一のメモリへの書き戻しを行う画像データ転送部(601、604)と、
矩形画像データ領域を格納する第二のメモリ(603)と、
前記画像データ転送部(601、604)を用いて、前記第二のメモリ(603)に対して、前記矩形画素単位で読み出した画像データの書き込み、および、読み出しの制御を行う回転部(602)と、
を用いて回転処理を行う画像回転部(119)と、
を備え、
前記画像回転部(119)は、前記画像データ(1101)のビット階調数n(nは正の整数)に応じて、
前記画像データ転送部(601、604)のいずれかが、前記矩形画素のデータを、前記第一のメモリ(114)の連続アドレス方向(1111〜1115)に長さnでバースト転送し、前記第二のメモリ(603)に、前記矩形画素からなる矩形ブロックをn個格納して回転処理を行う、
ことを特徴とする画像処理装置。 A first memory (114) for storing image data;
For the image data (1101) on the first memory (114),
An image data transfer unit (601, 604) for reading the image data (1101) in units of a predetermined rectangular pixel and writing back to the first memory;
A second memory (603) for storing a rectangular image data area;
Using the image data transfer unit (601, 604), the rotation unit (602) performs writing of image data read out in units of the rectangular pixels and control of reading out to the second memory (603). When,
An image rotation unit (119) for performing rotation processing using
With
The image rotation unit (119), according to the bit gradation number n (n is a positive integer) of the image data (1101),
One of the image data transfer units (601, 604) burst-transfers the rectangular pixel data in a length n in the continuous address direction (1111 to 1115) of the first memory (114). A second memory (603) stores n rectangular blocks made up of the rectangular pixels and performs rotation processing.
An image processing apparatus.
ことを特徴とする、請求項1に記載の画像処理装置。 The area of the rectangular pixel unit is a square rectangular pixel, and the second memory (603) performs a rotation process in a square rectangular pixel unit.
The image processing apparatus according to claim 1, wherein:
ことを特徴とする、請求項1に記載の画像処理装置。 The square rectangular pixel is m × m (m is a multiple of n), and the second memory (603) is a square bit region having one side of m × n bit length.
The image processing apparatus according to claim 1, wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013187859A JP2015055944A (en) | 2013-09-11 | 2013-09-11 | Image processor and image rotation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013187859A JP2015055944A (en) | 2013-09-11 | 2013-09-11 | Image processor and image rotation method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015055944A true JP2015055944A (en) | 2015-03-23 |
Family
ID=52820320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013187859A Pending JP2015055944A (en) | 2013-09-11 | 2013-09-11 | Image processor and image rotation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015055944A (en) |
-
2013
- 2013-09-11 JP JP2013187859A patent/JP2015055944A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5558767B2 (en) | Image processing apparatus and processing method thereof | |
JP5501041B2 (en) | Image processing apparatus, image processing method, and program | |
JP2008193529A (en) | Scanning converter, and scanning conversion method | |
JP5479225B2 (en) | Image processing apparatus, image processing method, and program | |
JP4382000B2 (en) | Print control system and print control method | |
JP2015055944A (en) | Image processor and image rotation method | |
JP5441676B2 (en) | Image processing apparatus and processing method thereof | |
JP4950919B2 (en) | Image processing apparatus and image processing method | |
JP5915670B2 (en) | Image processing apparatus, image processing method and image processing program in the same | |
JP2004328571A (en) | Image processing apparatus | |
JP4223049B2 (en) | Image processing apparatus and image forming apparatus | |
JP2020088694A (en) | Image processing apparatus and image processing method | |
JPH10208031A (en) | Image processor | |
JP3912372B2 (en) | Color image processing device | |
JP2008282135A (en) | Image processing apparatus, image reading apparatus, image forming apparatus, and image processing method | |
JP2004120639A (en) | Image processing method | |
JP2020090075A (en) | Image formation device and image formation method | |
JP3791404B2 (en) | Image processing device | |
JPH11313182A (en) | Image forming device | |
JP2013016005A (en) | Information processing device, control method therefor, and control program | |
JP2005327044A (en) | Image processor and image processing method | |
JP2008035035A (en) | Image processing apparatus | |
JP2015204574A (en) | Image processing apparatus, image processing method and image processing program in the same apparatus | |
JP2005020094A (en) | Image processing method and image processor | |
JP2012074897A (en) | Image processing device, image processing method, and program |