JP2008192073A - Image processing device and control method therefor - Google Patents

Image processing device and control method therefor Download PDF

Info

Publication number
JP2008192073A
JP2008192073A JP2007028443A JP2007028443A JP2008192073A JP 2008192073 A JP2008192073 A JP 2008192073A JP 2007028443 A JP2007028443 A JP 2007028443A JP 2007028443 A JP2007028443 A JP 2007028443A JP 2008192073 A JP2008192073 A JP 2008192073A
Authority
JP
Japan
Prior art keywords
image
output
input
coordinate
buffer control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007028443A
Other languages
Japanese (ja)
Other versions
JP4971818B2 (en
Inventor
Hiroo Inoue
博夫 井上
Michiaki Takasaka
三千聡 高坂
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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2007028443A priority Critical patent/JP4971818B2/en
Publication of JP2008192073A publication Critical patent/JP2008192073A/en
Application granted granted Critical
Publication of JP4971818B2 publication Critical patent/JP4971818B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To rotate, zoom, and deform an image at low cost by matrix operation based on a forward transform, in which coordinates on the output side are found from coordinates of an image on the input side, by means of a low-capacity memory. <P>SOLUTION: The image processing device is provided with a first buffer control part controlling a reading buffer storing partial images, a transformation part sequentially transforming the partial images stored in the reading buffer to the positions of the output coordinate, and a second buffer control part controlling a writing buffer storing the partial images transformed to the positions of the output coordinate by the transformation part. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は画像処理技術に関するものである。   The present invention relates to an image processing technique.

画像処理の出力側でラスタ走査順となるように画像データを処理するためには、入力側で画像データにランダムアクセスすることが必要なる(この変換方式を逆変換方式という)。出力座標系から逆変換を行って入力座標系上での処理領域を求めて画像処理を行う技術としては、例えば、特許文献1に示されるものがある。特許文献1においては、逆変換と順変換は、変換方式の選択として説明されている。
特開平11−154228号公報
In order to process the image data in the raster scanning order on the output side of the image processing, it is necessary to randomly access the image data on the input side (this conversion method is called an inverse conversion method). As a technique for performing image processing by performing inverse transformation from the output coordinate system to obtain a processing region on the input coordinate system, there is one disclosed in Patent Document 1, for example. In Patent Document 1, reverse conversion and forward conversion are described as selection of conversion methods.
JP 11-154228 A

しかしながら、逆変換と順変換は、選択により何れの変換も実行することが可能とは限らない。一般的な1次変換式によるアフィン変換の場合、変換行列は必ずしも逆行列を持つとは限らないためである。逆変換を行う場合には、逆行列が存在しない場合の処理を必ず入れなければならず、そのときだけ処理が切り替わることにより、処理時間が変動してしまうなど、逆変換による画像処理には逆変換処理上の問題がある。   However, it is not always possible to perform either inverse transformation or forward transformation by selection. This is because in the case of affine transformation using a general linear transformation formula, the transformation matrix does not necessarily have an inverse matrix. When performing inverse transformation, it is necessary to include processing when there is no inverse matrix, and processing time is changed by switching processing only at that time. There is a problem with the conversion process.

また、図18に示すように、画像中の一部分を回転しながら取り出すような変換を行う場合として、例えば、入力画像中1801にある領域1802を回転して出力する場合を考える。出力バッファに一度に入るバッファサイズを領域1803とすると、その幅サイズ1804と高さサイズ1805とを含む入力データとして必要な領域のサイズは高さサイズ1806として示される。このように、回転角度が大きいほど、一度に保持しなければならない入力画像の範囲(サイズ)は大きくなる。   Further, as shown in FIG. 18, as a case where conversion is performed such that a part of an image is extracted while being rotated, for example, a case where a region 1802 in an input image 1801 is rotated and output is considered. When the buffer size that once enters the output buffer is an area 1803, the size of the area necessary as input data including the width size 1804 and the height size 1805 is indicated as a height size 1806. Thus, the larger the rotation angle, the larger the range (size) of the input image that must be held at one time.

特許文献1では、入力として必要な画像をライン単位で入力し、図18の参照番号1807に示すような範囲の局所データを読み取るだけのデータがたまるまで入力ラインの画像データをためる処理を行う技術を開示している。そのため、回転変倍処理には、大きな入力バッファサイズが必要になる。   In Japanese Patent Laid-Open No. 2004-228688, a technique for inputting a necessary image as an input in units of lines and performing a process of accumulating input line image data until data sufficient to read local data in a range as indicated by reference numeral 1807 in FIG. 18 is collected. Is disclosed. Therefore, a large input buffer size is required for the rotation scaling process.

例えば、画像の横幅をA4サイズ600dpiとして考えると、1ラインが5000画素以上になることから、45度の回転を想定しても、5000/√2、すなわち3535ライン分のデータを保持しなければならない。この場合、1画素を3バイトで保持したとすると5000×3×3535=約50MBのメモリ量となり、巨大なメモリが必要となる。   For example, if the horizontal width of the image is assumed to be A4 size 600 dpi, one line is 5000 pixels or more, so even if a 45 degree rotation is assumed, 5000 / √2, that is, 3535 lines of data must be retained. Don't be. In this case, if one pixel is held in 3 bytes, the memory amount is 5000 × 3 × 3535 = about 50 MB, and a huge memory is required.

こうした問題を回避するために入力側の画像を圧縮して保持することが考えられる。圧縮率10倍の圧縮方法を使用すれば、50MBのデータを5MBという比較的現実的なサイズに抑えることが可能である。しかし、この場合も逆変換方式では入力データを斜めに横切るように読まなければならないため、圧縮データの並びに逆らった読み方となり、結果として読み出しに要する時間がかかりすぎて高速に処理を実施することができないという問題がある。特に、JPEG、PNG、TIFF等のように、カラム方向にピクセルないしはブロック単位で移動しながら圧縮する画像圧縮方法では、斜めに読むことに対する負荷が非常に大きく、現実に利用することが困難であるという問題がある。   In order to avoid such a problem, it is conceivable to compress and hold the image on the input side. If a compression method with a compression ratio of 10 is used, 50 MB data can be reduced to a relatively realistic size of 5 MB. However, in this case as well, in the inverse conversion method, the input data must be read so as to cross diagonally, so that the reading of the compressed data is reversed. As a result, it takes too much time for reading, and the processing can be performed at high speed. There is a problem that you can not. In particular, in an image compression method such as JPEG, PNG, TIFF, etc., which compresses while moving in the column direction in units of pixels or blocks, the load for reading obliquely is very large and is difficult to use in practice. There is a problem.

更に、アドレス変換ROMによって回転を行う技術が特許文献1に開示されており、アフィン変換を行う場合には、回転・変倍の他に更に平行性を保った形での変形が可能である。回転・変倍等の全てのケースに対応するには、2×2又は3×3の変換マトリクスの個々の係数の全ての値の組み合わせに対してアドレス変換テーブルをROM化しなければならず、実際には実現困難であるという問題がある。   Furthermore, a technique for performing rotation using an address conversion ROM is disclosed in Patent Document 1, and in the case of performing affine conversion, in addition to rotation / magnification, deformation in a form that maintains parallelism is possible. In order to deal with all cases such as rotation and scaling, the address conversion table must be stored in ROM for all combinations of individual coefficients of the 2 × 2 or 3 × 3 conversion matrix. Has a problem that it is difficult to realize.

近年標準化されたSVG(Scalable Vector graphics)規格などでは、回転、変倍などのほかにアフィン変換行列の係数を個々に自由に指定することが可能である。SVG規格への応用においてはROM化テーブルは必ずしも安価・高速に処理を実行するための有効な手段とならない場合があるという問題がある。   In recent standardized SVG (Scalable Vector Graphics) standards and the like, it is possible to freely specify the coefficients of the affine transformation matrix in addition to rotation and scaling. In application to the SVG standard, there is a problem that the ROM table is not necessarily an effective means for executing processing at low cost and at high speed.

上記問題を鑑み、本発明は、少ない容量のメモリを用いて、入力側の画像の座標から出力側の座標を求める順変換方式による行列演算によって回転・変倍・変形処理等を高速で安価に実現する画像処理技術の提供を目的とする。   In view of the above problems, the present invention can perform rotation / magnification / deformation processing at high speed and inexpensively by a matrix operation based on a forward conversion method that obtains output-side coordinates from input-side image coordinates using a memory with a small capacity. An object is to provide an image processing technique to be realized.

上記の従来技術を解決するべく、本発明に係る画像処理装置は、部分画像を格納する第1格納手段を制御する第1バッファ制御手段と、
前記第1格納手段に格納された前記部分画像を、出力座標の位置に順次変換する変換手段と、
前記変換手段により出力座標の位置に変換された部分画像を格納する第2格納手段を制御する第2バッファ制御手段と、
を備えることを特徴とする。
In order to solve the above-described conventional technology, an image processing apparatus according to the present invention includes first buffer control means for controlling first storage means for storing a partial image, and
Conversion means for sequentially converting the partial images stored in the first storage means into positions of output coordinates;
Second buffer control means for controlling second storage means for storing the partial image converted to the position of the output coordinate by the conversion means;
It is characterized by providing.

本発明によれば、少ない容量のメモリを用いて、入力側の画像の座標から出力側の座標を求める順変換方式による行列演算によって回転・変倍・変形処理を高速で安価に実現する画像処理技術の提供が可能になる。   According to the present invention, image processing that realizes rotation / magnification / deformation processing at high speed and at low cost by a matrix operation based on a forward conversion method that obtains output side coordinates from input side image coordinates using a small capacity memory. Technology can be provided.

以下、図面を参照して、本発明の好適な実施形態を例示的に詳しく説明する。ただし、この実施の形態に記載されている構成要素はあくまで例示であり、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. However, the constituent elements described in this embodiment are merely examples, and the technical scope of the present invention is determined by the scope of claims, and is limited by the following individual embodiments. is not.

(第1実施形態)
図1は、本発明の実施形態に係る画像処理装置が備える構成要素を示す図である。画像入力部101は画像データ、画像データの座標情報を入力する。画像入力部101は単純なメモリアクセスやハードディスクアクセス、ないしはネットワークアクセスにより画像データ、座標情報を取得することも可能である。
(First embodiment)
FIG. 1 is a diagram illustrating components included in an image processing apparatus according to an embodiment of the present invention. The image input unit 101 inputs image data and coordinate information of the image data. The image input unit 101 can also acquire image data and coordinate information by simple memory access, hard disk access, or network access.

画像処理装置の構成としては、画像データを取得する画像入力部101の他、圧縮画像伸張部1501を設ける構成でもよい。図15に示す構成によれば、回転・変倍・変形処理の前に、圧縮画像伸張部1501は、圧縮された画像を伸張して出力することが可能である。その場合、回転、変倍、変形処理は、高々数ピクセルの入力単位で処理が可能であるので、特別なバッファなしに、画素(ピクセル)単位、またはブロック単位の部分画像と、その座標情報と、の受け渡しを直接行うようにすることも可能である。符号化方式として、例えば、DCT、DFT、DST、LOT、アダマール変換、Wavelet変換、サブバンド符号化、ランレングス符号化、LZW符号化、ハフマン符号化またはこれらの組み合わせを利用することが可能である。   The configuration of the image processing apparatus may be a configuration in which a compressed image expansion unit 1501 is provided in addition to the image input unit 101 that acquires image data. According to the configuration shown in FIG. 15, the compressed image decompression unit 1501 can decompress and output the compressed image before the rotation / magnification / deformation processing. In that case, since rotation, scaling, and transformation processing can be performed in units of several pixels at most, a partial image in pixel (pixel) unit or block unit, and its coordinate information, without a special buffer. It is also possible to perform the delivery of. For example, DCT, DFT, DST, LOT, Hadamard transform, Wavelet transform, subband coding, run length coding, LZW coding, Huffman coding, or a combination thereof can be used as the coding method. .

読み出し用バッファ102は、画像入力部101から入力された画像データを保持するバッファである。読み出し用バッファ102は、部分画像を格納する第1格納部として機能することが可能である。   The read buffer 102 is a buffer that holds the image data input from the image input unit 101. The read buffer 102 can function as a first storage unit that stores partial images.

読み出し用バッファ制御部103は、入力された画像データのうち局所データ(部分画像)を格納する読み出し用バッファ102(第1格納手段)を制御する。読み出し用バッファ制御部103は、読み出し用バッファ102(第1格納部)を制御する第1バッファ制御部として機能することが可能である。   The read buffer control unit 103 controls the read buffer 102 (first storage means) that stores local data (partial image) of the input image data. The read buffer control unit 103 can function as a first buffer control unit that controls the read buffer 102 (first storage unit).

読み出し用バッファ制御部103は処理に必要な画像データを、局所データ(部分画像)として、読み出し用バッファ102(第1格納部)に保持させるように不要な画像データを削除したり、新たな画像データを保持させたりする制御が可能である。また、読み出し用バッファ制御部(第1バッファ制御部)103は、必要に応じて、読み出し用バッファ102(第1格納部)における画像データの保持位置をシフトさせるなどの並べ替えを行うことも可能である。   The read buffer control unit 103 deletes unnecessary image data so that image data necessary for processing is stored as local data (partial image) in the read buffer 102 (first storage unit), or creates a new image. Control to hold data is possible. Further, the read buffer control unit (first buffer control unit) 103 can perform rearrangement such as shifting the holding position of the image data in the read buffer 102 (first storage unit) as necessary. It is.

局所データ変換部104は、読み出し用バッファ制御部(第1バッファ制御部)103によって並べ替えられた入力画像の局所データ(部分画像)を順変換により、出力座標の位置に順次変換する座標変換を行い出力することが可能である。   The local data conversion unit 104 performs coordinate conversion for sequentially converting the local data (partial image) of the input image rearranged by the read buffer control unit (first buffer control unit) 103 to the position of the output coordinate by forward conversion. Can be output.

局所データ出力アドレス計算部105は、局所データ(部分画像)から、順変換による座標変換で必要となる出力座標点を算出することが可能である。   The local data output address calculation unit 105 can calculate output coordinate points necessary for coordinate conversion by forward conversion from local data (partial image).

順変換座標算出部106は、局所データ出力アドレス計算部105に、入力座標位置と変換マトリクスによって順変換方式で出力座標位置を求めることが可能である。   The forward conversion coordinate calculation unit 106 can obtain the output coordinate position from the local data output address calculation unit 105 by the forward conversion method based on the input coordinate position and the conversion matrix.

一般的な画像処理においては、画像データはラスタ走査順に処理され、その画像処理結果はラスタ走査順に出力される。これに対して、回転処理は、入力側と出力側でデータの入出力の順番が異なる。入力側からラスタ走査順に画像データが入力され、回転された画像データは、回転角に従った傾きの方向に書き込まれることになる。このため、出力側では、入力順とは異なる書き込み用バッファ107へのアクセス(ランダムアクセス)が必要となる。この変換方式を以下、順変換方式という。   In general image processing, image data is processed in the order of raster scanning, and the image processing results are output in the order of raster scanning. On the other hand, in the rotation process, the order of data input / output differs between the input side and the output side. Image data is input from the input side in the order of raster scanning, and the rotated image data is written in the direction of inclination according to the rotation angle. For this reason, on the output side, access (random access) to the write buffer 107 different from the input order is required. This conversion method is hereinafter referred to as a forward conversion method.

書き込み用バッファ107は、局所データ変換部104により変換された出力用画像データを保持する。読み出し用バッファ102(第1格納部)に格納された部分画像(局所データ)は、局所データ変換部104により出力座標の位置に変換され、書き込み用バッファ107に格納される。書き込み用バッファ107は、出力座標の位置に変換された部分画像を格納する第2格納部として機能することが可能である。   The write buffer 107 holds the output image data converted by the local data conversion unit 104. The partial image (local data) stored in the read buffer 102 (first storage unit) is converted into the output coordinate position by the local data conversion unit 104 and stored in the write buffer 107. The writing buffer 107 can function as a second storage unit that stores the partial image converted into the position of the output coordinate.

書き込み用バッファ制御部108は、書き込み用バッファ107(第2格納部)に効率よく出力データを保持させるための書き込みアドレスの制御を行う。書き込み用バッファ制御部108は、出力座標の位置に変換された部分画像を格納する第2格納部を制御する第2バッファ制御部として機能することが可能である。   The write buffer control unit 108 controls a write address for efficiently holding output data in the write buffer 107 (second storage unit). The write buffer control unit 108 can function as a second buffer control unit that controls the second storage unit that stores the partial image converted into the output coordinate position.

画像出力部109は、書き込み用バッファ107(第2格納部)に保持された出力用画像データを適宜、外部処理モジュールまたは外部メモリに出力する。   The image output unit 109 appropriately outputs the output image data held in the write buffer 107 (second storage unit) to an external processing module or an external memory.

(順変換による局所データの変換処理)
順変換による局所データの変換処理について図2を参照して説明する。図2では、入力画像が画素(ピクセル)単位に、矢印250で示す横方向に順次入力されてくるようなデータの流れを想定している。図2(a)に示すように、4画素を一度に処理することで処理回数を減らし、なおかつ読み出し用バッファ102(第1格納部)、書き込み用バッファ107(第2格納部)上での読み書き回数を低減させることができる。
(Local data conversion by forward conversion)
A local data conversion process by forward conversion will be described with reference to FIG. In FIG. 2, a data flow is assumed in which an input image is sequentially input in a horizontal direction indicated by an arrow 250 in units of pixels (pixels). As shown in FIG. 2A, the number of processing is reduced by processing four pixels at a time, and reading / writing on the read buffer 102 (first storage unit) and the write buffer 107 (second storage unit). The number of times can be reduced.

横方向の画素(ピクセル)4点210〜213に基づき出力される出力画素として、図2(a)中のAで示した領域に含まれる画素に限定することで、処理を簡素化しつつ、出力バッファ上での読み書きの回数を低減させるこがきる。   Output pixels are output while simplifying the processing by limiting the output pixels to be output based on the four pixels 210 to 213 in the horizontal direction to the pixels included in the area indicated by A in FIG. It can reduce the number of reading and writing on the buffer.

原理的には、4点(4画素)全てが関与する範囲である図2(a)中にBで示す範囲に対して出力値を算出することが可能である。その場合、出力値に対する画素の関与の比率が出力画素ごとに異なってしまい、一律の処理によって出力値の算出処理を進めることが不可能になる。よって、本実施形態では、入力4点(4画素)に対してAで示した領域についてのみ出力を行うものとする。図中の「○」は出力画素を例示的に示すものである。   In principle, it is possible to calculate an output value for a range indicated by B in FIG. 2A, which is a range in which all four points (four pixels) are involved. In this case, the ratio of pixel involvement with respect to the output value differs for each output pixel, making it impossible to proceed with the output value calculation process by a uniform process. Therefore, in the present embodiment, it is assumed that output is performed only for the area indicated by A with respect to four inputs (four pixels). “◯” in the figure shows an output pixel by way of example.

次に、図2(b)に示すように、次の画素が1点(1画素分)入ってきたところで、最初に入力された画素を記憶領域から破棄し、新たに入力された1画素を含む4点(4画素)を保持することで同様の出力値の計算を行う。そして、図2(b)中Cで示す範囲に含まれる出力座標点への出力を行う。このようにして、1ラスタ目の画像入力については1ピクセルの入力毎に4点という非常に少ない保持データにより、順次出力画素を出力する。   Next, as shown in FIG. 2B, when one next pixel (one pixel) comes in, the first input pixel is discarded from the storage area, and the newly input one pixel is The same output value is calculated by holding 4 points (4 pixels) including the same. And the output to the output coordinate point contained in the range shown by C in FIG.2 (b) is performed. In this way, for the image input of the first raster, output pixels are sequentially output with very small holding data of 4 points for each input of one pixel.

次に、図2(c)に示すように2ラスタ目の処理に移ると、4点により出力できる領域が上方向にもあることになるため、図中に領域Dに示すような領域に含まれる出力座標点への出力を行う。   Next, as shown in FIG. 2 (c), when the processing of the second raster is performed, an area that can be output by four points is also in the upward direction. Output to the output coordinate point.

2ラスタ目についても1ラスタ目と同様、図2(d)に示すとおり次のピクセルが入力されたところで最初のピクセルを破棄し、新たな4点(4画素)について同様の処理を行うことで、順次処理を進めていくことができる。   Similarly to the first raster, the second raster is discarded when the next pixel is input as shown in FIG. 2D, and the same processing is performed on four new points (four pixels). The process can proceed sequentially.

その後、図2(e)、(f)に示すように3ラスタ目、4ラスタ目と順次同様の処理を繰り返していくことで、出力画素を生成することが可能である。   Thereafter, as shown in FIGS. 2E and 2F, it is possible to generate an output pixel by sequentially repeating the same processing as the third raster and the fourth raster.

画像の下端については、図2(a)〜図2(d)に示した領域をちょうど上下反転したように処理することで、入力画像の境界部分での出力処理を境界以外の他の処理と同様に行うことが可能になる。一定の透過率による画像合成を行う場合には、予め出力バッファ上に描画されている画像をピクセル単位で読み出し、透過率によって決まる係数を掛けて書き戻しておくことにより、合成画像を得ることも可能である。   The lower end of the image is processed so that the region shown in FIGS. 2 (a) to 2 (d) is just flipped up and down, so that the output processing at the boundary portion of the input image is different from the processing other than the boundary. It is possible to do the same. When performing image composition with a fixed transmittance, it is possible to obtain a composite image by reading an image drawn in advance on the output buffer in units of pixels and writing it back with a coefficient determined by the transmittance. Is possible.

次に、処理をより高速に実現するにあたって、画像上端・下端を除いた一般的な処理において、バッファ上での読み書き回数を減らすために最低限必要なバッファの構成について図3を用いて説明する。   Next, with reference to FIG. 3, the minimum buffer configuration required to reduce the number of times of reading and writing on the buffer in general processing excluding the upper and lower ends of the image when realizing processing at higher speed will be described. .

例えば、本実施形態の処理をキャッシュメモリなどのローカルバッファを持つハードウェアないしはCPUにおいて実現することも可能である。この場合、図3で示した領域に含まれる出力座標点分のサイズのローカルバッファを持つことにより、効果的に外部メモリへの書き込み回数を減らすことが可能である。この場合、バッファのサイズは、変倍率などによって変動する。拡大処理を行う場合、図中の領域に含まれる出力座標点は多くなり、縮小の場合には少なくなるからである。   For example, the processing of this embodiment can be realized by hardware or a CPU having a local buffer such as a cache memory. In this case, the number of times of writing to the external memory can be effectively reduced by having a local buffer having a size corresponding to the output coordinate point included in the region shown in FIG. In this case, the size of the buffer varies depending on the scaling factor. This is because when the enlargement process is performed, the number of output coordinate points included in the region in the figure increases, and in the case of reduction, the number decreases.

一般にローカルバッファのサイズには実装コスト上の制約があるため、変倍率に対しても制限が必要となる。しかし、本実施形態によれば、ローカルバッファに入らない領域の出力座標点については直接外部メモリに出力しておき、その後の処理時に再度読み出して処理をすればよく、ローカルバッファに全ての出力座標点の情報が含まれる必要はない。ローカルバッファの上限を超える変倍率を指定した際には、変倍率の増加に対して単調増加の傾向で処理負荷が重くなるだけであり、高速化と柔軟性を比較的制御性の良い形で両立することも可能である。   In general, since the size of the local buffer is limited in terms of mounting cost, it is necessary to limit the scaling factor. However, according to the present embodiment, the output coordinate points of the area that does not enter the local buffer may be directly output to the external memory and read and processed again in the subsequent processing, and all output coordinates are stored in the local buffer. Point information need not be included. When a scaling factor exceeding the upper limit of the local buffer is specified, the processing load only increases as the scaling factor increases, and the speed and flexibility are relatively easy to control. It is possible to achieve both.

また、ローカルバッファの構成では、画素が連続して入力される横方向の画素数分、ローカルバッファの幅を持つ必要がある。これを効果的に小さくするための方法について図4を用いて説明する。図4(a)中の参照番号401は、図2で示した入力されるデータの入力順を概略的に示している。このようにラスタ単位でデータを処理する場合、入力されるデータの入力順は参照番号401にようになる。この場合、多くの画像処理に対して適用可能であるが、反面、本実施形態で用意するべきバッファの容量は、図4中の参照番号402で示すように大きくなってしまう。   In the configuration of the local buffer, it is necessary to have the width of the local buffer by the number of pixels in the horizontal direction in which pixels are continuously input. A method for effectively reducing this will be described with reference to FIG. Reference numeral 401 in FIG. 4A schematically shows the input order of the input data shown in FIG. When data is processed in units of rasters in this way, the input order of input data is as indicated by reference numeral 401. In this case, the present invention can be applied to many image processes, but on the other hand, the capacity of the buffer to be prepared in the present embodiment becomes large as indicated by reference numeral 402 in FIG.

これに対して、画像をバンド単位に処理する場合、画素の入力方向を縦方向にすることで、回転処理で必要となるローカルバッファの領域を90度回転させたものとすることができ、結果としてローカルバッファのサイズを小さく抑えることが可能である。   On the other hand, when processing an image in band units, the pixel input direction is set to the vertical direction, and the local buffer area required for the rotation process can be rotated by 90 degrees. As a result, the size of the local buffer can be kept small.

次に、画像の回転を行う場合の局所データ変換部104の処理について図5を用いて説明する。回転においては、例えば、図2(e)の領域Fに、斜めに出力画素が並ぶことになる。この場合には、参照番号501に示した点に対してそれぞれ計算を行ったうえで積算処理を行う必要があるが、処理としてはこれまでに説明した処理と同様である。例えば、16点の補間の処理であっても、4画素(ピクセル)という非常に少ない入力画像の局所データの保持で、かつ、効率的な回転変倍を行うことができる。   Next, the processing of the local data conversion unit 104 when performing image rotation will be described with reference to FIG. In the rotation, for example, output pixels are arranged obliquely in the region F in FIG. In this case, it is necessary to perform the integration process after calculating each of the points indicated by reference numeral 501, but the process is the same as the process described so far. For example, even with 16-point interpolation processing, it is possible to retain local data of an input image that is very small of 4 pixels (pixels) and to perform efficient rotational scaling.

ただし、これだけでは、アフィン変換のための乗算処理を複数行う必要があるなど、ハードウェア化においては回路規模が大きくなる要素を残している。そこで、出力座標範囲と、その中に含まれる実際に出力を行うべき出力座標点の集合を簡単な演算で実施する構成を以下に説明する。   However, this alone leaves elements that increase the circuit scale in hardware, such as the need to perform multiple multiplication processes for affine transformation. Therefore, a configuration in which an output coordinate range and a set of output coordinate points to be actually output included in the output coordinate range will be described below with a simple calculation.

アフィン変換と呼ばれる行列演算による変形では、「平行な直線は変換後も平行である」という性質を持っていることが知られている。このことは、すなわち直線によって囲まれた領域を変形する場合には、領域を囲む平行でない直線の数だけの傾き情報の変換によって図形の変換が可能であることを示している。   It is known that a transformation by matrix operation called affine transformation has a property that “parallel straight lines remain parallel after transformation”. This indicates that, when a region surrounded by straight lines is deformed, a figure can be converted by converting inclination information by the number of non-parallel straight lines surrounding the region.

こうしたことからアフィン変換における変換パラメータは、行列演算から求められる入力座標系の整数位置の単位移動量に対する変換後の単位移動量、すなわち傾きとして求められることになる。   For this reason, the conversion parameter in the affine transformation is obtained as a unit movement amount after conversion with respect to the unit movement amount of the integer position of the input coordinate system obtained from matrix calculation, that is, as a slope.

アフィン変換は、入力座標を(x,y)、出力座標を(X,Y)とすると、以下のように表される。   The affine transformation is expressed as follows, where the input coordinates are (x, y) and the output coordinates are (X, Y).

Figure 2008192073
Figure 2008192073

ここで、デジタル画像処理では入出力座標位置は整数で表される位置に離散化されていることから、例えば(x,0)という点は、この式によって(ax+c,dx+f)という位置に写像される。   Here, in the digital image processing, since the input / output coordinate position is discretized at an integer position, for example, the point (x, 0) is called (ax + c, dx + f) by this equation Mapped to position.

Figure 2008192073
Figure 2008192073

更に、x+1という位置は、下式に示すように(ax+c+a,dx+f+d)という位置に写像されることになる。   Furthermore, the position x + 1 is mapped to the position (ax + c + a, dx + f + d) as shown in the following equation.

Figure 2008192073
Figure 2008192073

(3)式より明らかなように、入力座標系での隣の画素位置への移動は、出力座標系での(a,d)という傾きを持った移動となる。アフィン変換によって行われる座標変換は、入力座標系での一定の移動量は、出力座標系では変換された傾きを持った移動量となる事がわかる。このことから、アフィン変換では入力座標上のある点の変換座標と、そこからの移動量を傾きとして与えることで、変換後の出力位置を簡便に求められる可能性があることが分かる。   As is clear from the equation (3), the movement to the adjacent pixel position in the input coordinate system is a movement having an inclination of (a, d) in the output coordinate system. In the coordinate transformation performed by the affine transformation, it can be seen that a certain amount of movement in the input coordinate system becomes a movement amount having a converted inclination in the output coordinate system. From this, it can be seen that in the affine transformation, the converted output position may be easily obtained by giving the transformation coordinates of a certain point on the input coordinates and the movement amount therefrom as the inclination.

逆行列が存在しない行列式による変換の場合には、入力画像上で互いに平行でなかった直線が平行になってしまったり、1点に集約されてしまったりするなどの現象が起きる。こうした場合には、ある1点の出力座標に対応する入力座標位置が無数に存在してしまうため、逆変換によって入力座標位置を求めることは単なる計算だけでは行えなくなる。このような場合でも、変換前には異なる傾きを持った直線が、変換後には同じ傾きを持つようになるというだけであり、その変換は傾きの変換によって行える。   In the case of transformation based on a determinant that does not have an inverse matrix, phenomena such as straight lines that are not parallel to each other on the input image become parallel or aggregated at one point. In such a case, an infinite number of input coordinate positions corresponding to a certain output coordinate exist, and therefore it is impossible to obtain the input coordinate position by inverse transformation by simple calculation. Even in such a case, straight lines having different inclinations before conversion have the same inclination after conversion, and the conversion can be performed by conversion of the inclination.

図6は、順変換により回転・変形・変倍を行った場合の座標値の簡便な求め方を説明する図である。アフィン変換による座標変換は、出力画像座標系に対して、入力画像座標が軸の平行性を保った形で写像される。入力座標系の座標点を白丸で示すと、正方形として配置する座標点は、アフィン変換を行うことにより、一般的に、黒丸で座標点を示す平行四辺形の配置に写像される。入力座標系のX座標、Y座標は、出力座標系でそれぞれd/a、e/bの傾きを持つ直線に写像されることになる。   FIG. 6 is a diagram for explaining a simple method for obtaining coordinate values when rotation, deformation, and scaling are performed by forward conversion. In the coordinate transformation by affine transformation, the input image coordinates are mapped to the output image coordinate system while maintaining the parallelism of the axes. When the coordinate points of the input coordinate system are indicated by white circles, the coordinate points arranged as squares are generally mapped into a parallelogram arrangement in which the coordinate points are indicated by black circles by performing affine transformation. The X coordinate and Y coordinate of the input coordinate system are mapped to straight lines having inclinations of d / a and e / b, respectively, in the output coordinate system.

これにより、矩形領域を持つ画像の回転・変倍・変形処理を簡素化して行うことが可能になる。図7は、アフィン変換による回転・変倍・変形処理を行う場合の設定パラメータについて説明した図である。   As a result, it is possible to simplify the rotation, scaling, and deformation processing of an image having a rectangular area. FIG. 7 is a diagram illustrating setting parameters when performing rotation / magnification / deformation processing by affine transformation.

図7中に黒丸で示したのが出力座標上の画素点であり、四角で示したのが入力座標系の画素点である。入力画像の処理開始点を出力座標上に写像した位置(StartX, StartY)を基点とする。   In FIG. 7, pixel points on the output coordinates are indicated by black circles, and pixel points on the input coordinate system are indicated by squares. The position (StartX, StartY) where the processing start point of the input image is mapped on the output coordinates is used as the base point.

入力画像の点の出力座標上の配置は入力座標のX軸、Y軸が出力座標系上で持つ傾き(rate_x, rate_y)、(line_rate_x, line_rate_y)とを算出して求めることが可能である。   The arrangement of the points of the input image on the output coordinates can be obtained by calculating the slopes (rate_x, rate_y) and (line_rate_x, line_rate_y) of the X and Y axes of the input coordinates on the output coordinate system.

アフィン変換による変倍後の座標計算は、(StartX, StartY), (rate_x, rate_y), (line_rate_x, line_rate_y)の6つのパラメータによって置き換えることが可能である。   The coordinate calculation after scaling by affine transformation can be replaced by six parameters (StartX, StartY), (rate_x, rate_y), and (line_rate_x, line_rate_y).

6つのパラメータは、アフィン変換を表現するための基本的なものであるが、これだけでは出力座標上の画素位置を求めることが困難である。なぜなら、入力画像の画素位置は、出力画像の画素位置の途中、つまり小数点以下の値を含む位置に一般に写像されるからである。出力画像を正しく求めるためには、こうした小数点を含む位置から整数によって表される出力座標格子点を求める計算を行わなければならない。   The six parameters are basic for expressing the affine transformation, but it is difficult to determine the pixel position on the output coordinates only by this. This is because the pixel position of the input image is generally mapped to the middle of the pixel position of the output image, that is, a position including a value after the decimal point. In order to obtain the output image correctly, a calculation for obtaining the output coordinate grid point represented by an integer from the position including the decimal point must be performed.

このパラメータの与え方について、図8を用いて説明する。先に与えられた6つのパラメータから直線line1、line2、line3を求める。そして、出力座標系のY座標整数位置にある水平線との交点(図8の(CstartX1,CstartY1)、(CstartX2, CstartY2)および(CendX1,CendY1)、(CendX2, CendY2))を算出する。   How to give this parameter will be described with reference to FIG. Straight lines line1, line2, and line3 are obtained from the six parameters given previously. Then, intersections with the horizontal line at the Y coordinate integer position in the output coordinate system ((CstartX1, CstartY1), (CstartX2, CstartY2) and (CendX1, CendY1), (CendX2, CendY2) in FIG. 8) are calculated.

これは、ハードウェアで行うためには乗算器を含む比較的回路規模の大きな演算処理を必要とするため、安価な実施には不適当であるが、ソフトウェアによってあらかじめ求めることは実装上の負荷とはならない。これらの交点座標を初期値として与え、その後は傾きの情報を加算することで順次出力座標の範囲を求めることが可能である。これにより、ハードウェア実装負荷の低い加算器のみを用いてアフィン変換の順変換座標算出部を実施することが可能となり、安価な構成で、かつ高速な処理の実行が可能となる。   This is not suitable for low-priced implementation because it requires arithmetic processing with a relatively large circuit scale including a multiplier in order to be performed by hardware. Must not. It is possible to obtain the range of output coordinates sequentially by giving these intersection coordinates as initial values and then adding inclination information. As a result, the forward conversion coordinate calculation unit for affine transformation can be implemented using only an adder with a low hardware implementation load, and high-speed processing can be performed with an inexpensive configuration.

図8のように、最初に入力される4点についての座標位置として(StartX,StartY)、(EndX, EndY)、(EndLineX, EndLineY)、(EndRectX, EndRectY)を求める(矩形範囲801)。これらはそれぞれ、所望のアフィン変換行列をかけることで求めることが可能である。   As shown in FIG. 8, (StartX, StartY), (EndX, EndY), (EndLineX, EndLineY), and (EndRectX, EndRectY) are obtained as the coordinate positions for the four points that are input first (rectangular range 801). Each of these can be obtained by multiplying a desired affine transformation matrix.

n×mの参照点を持つフィルタの場合、nとmから求められる係数cn1,cn2,cm1,cm2により(x+cn1, y-cm1),(x+cn2, y-cm1),(x+cn1, y+cm2),(x+cn2, y+cm2)を求めることができる。cn1,cm1,cn2,cm2は、単純にn/2-1, m/2, n/2, m/2となるのが基本となる。   In the case of a filter having n × m reference points, (x + cn1, y-cm1), (x + cn2, y-cm1), (x +) by coefficients cn1, cn2, cm1, and cm2 obtained from n and m cn1, y + cm2), (x + cn2, y + cm2) can be obtained. Basically, cn1, cm1, cn2, and cm2 are simply n / 2-1, m / 2, n / 2, and m / 2.

しかしながら、フィルタサイズn、mは必ずしも偶数であるとは限らないことから、cn1,cn2,cm1,cm2が常にこのような単純な式で求められるとは限らない。また、入力画像の上端、下端、左端、右端においては、さらにこのcn1,cn2,cm1,cm2を図2に示したように変化させる制御を行う必要がある。但し、入力画素をn,mを考慮して画像の外に当たる部分も供給するなどの方法によって、処理に必要な画像を補うことで、こうした出力領域の制御を行わないように構成することも可能である。   However, since the filter sizes n and m are not necessarily even numbers, cn1, cn2, cm1, and cm2 are not always obtained by such a simple expression. Further, at the upper end, the lower end, the left end, and the right end of the input image, it is necessary to perform control to further change the cn1, cn2, cm1, and cm2 as shown in FIG. However, it is also possible to configure such that the output area is not controlled by supplementing the image necessary for processing by supplying a portion that falls outside the image in consideration of n and m as input pixels. It is.

こうして求められた矩形範囲801について、(StartX, StartY)を基点として画像を処理する方向で最も近い出力座標系で整数位置を持つ水平線(line5)との交点を求める。(CstartX1,CstartY1)は、先に述べた(EndLineX,EndLineY)から(rate_x,rate_Y)の傾きによって伸びる直線line1と、line5の交点である。この点は、出力座標上でY座標は整数位置にあるが、X座標は小数点以下の値を持つ位置になる。以下同様に、(CstartX2,CstartY2)は、(StartX,StartY)からline_rate_y / line_rate_x の傾きで伸びる直線line2とline5の交点である。(CendX1,CendY1)は(EndX,EndY)からline_rate_y/line_rate_xの傾きで伸びる直線line3とline5の交点である。   With respect to the rectangular range 801 thus obtained, the intersection point with the horizontal line (line 5) having an integer position in the output coordinate system closest in the image processing direction with (StartX, StartY) as the base point is obtained. (CstartX1, CstartY1) is an intersection of line 5 and line 5 extending from the (EndLineX, EndLineY) to (rate_x, rate_Y) described above. In this point, the Y coordinate is an integer position on the output coordinate, but the X coordinate is a position having a value after the decimal point. Similarly, (CstartX2, CstartY2) is an intersection of lines line2 and line5 extending from (StartX, StartY) with a slope of line_rate_y / line_rate_x. (CendX1, CendY1) is the intersection of lines line3 and line5 extending from (EndX, EndY) with a slope of line_rate_y / line_rate_x.

(StartX,StartY),(EndX, EndY),(EndLineX,EndLineY),(EndRectX, EndRectY)を出力座標領域算出の初期値として与える。その後は傾きの情報を加算することで順次出力座標における局所データの変換を求めることが可能になる。   (StartX, StartY), (EndX, EndY), (EndLineX, EndLineY), (EndRectX, EndRectY) are given as initial values for calculating the output coordinate area. After that, by adding the information of the inclination, it becomes possible to obtain the conversion of the local data in the output coordinates sequentially.

本実施形態の出力座標算出処理の流れを図9のフローチャートを参照して説明する。本処理は、局所データ変換部104、局所データ出力アドレス計算部105、順変換座標算出部106の制御の下に実行することが可能である。   The flow of the output coordinate calculation process of this embodiment is demonstrated with reference to the flowchart of FIG. This process can be executed under the control of the local data conversion unit 104, the local data output address calculation unit 105, and the forward conversion coordinate calculation unit 106.

出力座標位置算出処理が開始されると、ステップS901で、入力座標CstartX1,CstartX2のうち、X座標の値が大きいほうを選択し、CstartXとする。   When the output coordinate position calculation process is started, in step S901, the input coordinate CstartX1, CstartX2 having the larger X coordinate value is selected and set as CstartX.

ステップS902において、入力座標CendX1,CendX2のうち、X座標の小さいほうを選択し、CendXとする。   In step S902, of the input coordinates CendX1 and CendX2, the smaller of the X coordinates is selected and set as CendX.

ステップS903において、CstartY1,CstartY2, CendY1, CendY2は、全ての点について同じ値となるため、いずれかのCYを決定する。   In step S903, since CstartY1, CstartY2, CendY1, and CendY2 have the same value for all points, any CY is determined.

ステップS904において、CstartXを切り上げ、整数位置に移動させ、CXとする。   In step S904, CstartX is rounded up and moved to the integer position to obtain CX.

ステップS905において、現在のCX,CYを出力座標位置として図1に示す局所データ出力アドレス計算部105に出力する。   In step S905, the current CX, CY is output as an output coordinate position to the local data output address calculation unit 105 shown in FIG.

ステップS906において、CXに出力座標系で1を加算する。   In step S906, 1 is added to CX in the output coordinate system.

ステップS907において、もしCXが先に求めたCendXよりも小さければ(S907−Yes)、処理をステップS905に戻す。一方、ステップS907の判定で、CXがCendx以上の場合(S907−No)、処理はステップS908に進められる。   In step S907, if CX is smaller than the previously determined CendX (S907-Yes), the process returns to step S905. On the other hand, if it is determined in step S907 that CX is equal to or greater than Cendx (S907-No), the process proceeds to step S908.

ステップS908では、CYに1を加算する。   In step S908, 1 is added to CY.

ステップS909において、CYがEndRectYを超えていた場合には処理を終了する。一方、ステップS909の判定で、CYがEndRectYを超えていない場合(S909‐Yes)、処理はステップS910に進められる。   In step S909, if CY exceeds EndRectY, the process ends. On the other hand, if it is determined in step S909 that CY does not exceed EndRectY (S909-Yes), the process proceeds to step S910.

ステップS910において、CstartX1にrate_y/rate_xを足すことにより、ステップS908で更新されたCYの水平線と、図8のline1との交点に移動させて、CstartX1の更新を行う。   In step S910, by adding rate_y / rate_x to CstartX1, it is moved to the intersection of the horizontal line CY updated in step S908 and line1 in FIG. 8, and CstartX1 is updated.

ステップS911において、CstartX2にline_rate_y/line_rate_xを足すことにより、CYの水平線と図8のline2との交点に移動させて、CstartX2の更新を行う。   In step S911, by adding line_rate_y / line_rate_x to CstartX2, it is moved to the intersection of the CY horizontal line and line2 in FIG. 8, and CstartX2 is updated.

ステップS912において、CendX1にline_rate_y/line_rate_xを足すことにより、CYの水平線と図8のline3との交点に移動させて、CendX1の更新を行う。   In step S912, by adding line_rate_y / line_rate_x to CendX1, it is moved to the intersection of the horizontal line of CY and line3 in FIG. 8, and CendX1 is updated.

ステップS913において、CendX2にrate_y/rate_xを足すことにより、ステップS908で更新されたCYの水平線と、図8のline4との交点に移動させて、CendX2の更新を行い、処理をステップS901に戻す。そして、ステップS901〜S913まで同様の処理が繰り返される。   In step S913, by adding rate_y / rate_x to CendX2, the CY horizontal line updated in step S908 is moved to the intersection of line4 in FIG. 8, CendX2 is updated, and the process returns to step S901. Then, the same processing is repeated from step S901 to S913.

本実施形態によれば、少ない容量のメモリを用いて、入力側の画像の座標から出力側の座標を求める順変換方式による行列演算によって回転・変倍・変形処理を高速で安価に実現する画像処理技術の提供が可能になる。   According to the present embodiment, an image that realizes rotation, scaling, and transformation processing at high speed and low cost by a matrix operation based on a forward transformation method that obtains output side coordinates from input side image coordinates using a small amount of memory. Processing technology can be provided.

(第2実施形態)
本実施形態における画像処理装置の構成を図10に示す。構成要素は(101〜109)、図1に示した構成と同一であるので、ここでは詳細な説明を省略する。本実施形態にかかる画像処理装置において、画像入力部101と読み出し用バッファ102との間でやりとりするデータ1010には、ピクセル情報だけでなく、座標情報も含む。
(Second Embodiment)
FIG. 10 shows the configuration of the image processing apparatus according to this embodiment. Since the components (101 to 109) are the same as those shown in FIG. 1, detailed description thereof is omitted here. In the image processing apparatus according to the present embodiment, the data 1010 exchanged between the image input unit 101 and the reading buffer 102 includes not only pixel information but also coordinate information.

画像処理に与える入力画像データは、必ずしも1ラスタ単位であるとは限らない。図4(a)で示したように横方向に1ラインずつ入力するケースのほかに、バンドに区切った部分画像について縦方向に順次データを入力する場合もありうるためである(図4(b))。このような様々な入力データの入力順序に臨機応変に対応するためには、図10のデータ1010に、座標情報も同時に含まれるようなデータ構造が必要となる。   Input image data to be given to image processing is not necessarily in units of one raster. This is because, in addition to the case of inputting one line in the horizontal direction as shown in FIG. 4A, data may be sequentially input in the vertical direction for partial images divided into bands (FIG. 4B). )). In order to adapt to the input order of such various input data, it is necessary to have a data structure in which coordinate information is also included in the data 1010 of FIG.

部分画像データ(ピクセルデータ)と座標情報とを同時に入力する場合の好適なデータの入力順序の例を図11に示す。   FIG. 11 shows an example of a suitable data input order when partial image data (pixel data) and coordinate information are input simultaneously.

データの入力順序は、2ラスタ1101をカラム単位で順次入力するものである。この場合、第1実施形態で既に説明した1ラスタ単位のデータ入力に比べ、一度に2ラスタ分のデータを(4)式により計算できる。(4)式において、ciは、横方向の変倍時のピクセル影響度を示す係数である。cjは縦方向の係数であり、Pinは局所画像範囲内の(i、j)の位置にある画素値である。そして、出力画像生成のための加算は(5)式により算出することができる。   The data input order is to input the two rasters 1101 sequentially in column units. In this case, the data for two rasters can be calculated at once by the equation (4) as compared with the data input of one raster unit already described in the first embodiment. In the equation (4), ci is a coefficient indicating the pixel influence degree at the time of scaling in the horizontal direction. cj is a vertical coefficient, and Pin is a pixel value at a position (i, j) in the local image range. The addition for generating the output image can be calculated by equation (5).

Figure 2008192073
Figure 2008192073

出力メモリまたは出力側ローカルメモリ上での積算回数が半分または半分+1回とすることが可能となり、特に出力バッファを応答速度の遅い外部メモリにおく場合には処理の高速化が期待できる。また、ある1点の出力点についての横方向の係数ciは、2ラスタについて同じ値が使用できるため、係数の算出にかかる処理速度も向上が図れる。   The number of integrations on the output memory or the output-side local memory can be reduced to half or half + 1. In particular, when the output buffer is placed in an external memory with a slow response speed, it is expected to increase the processing speed. In addition, since the horizontal coefficient ci for one output point can use the same value for two rasters, the processing speed for calculating the coefficient can be improved.

2ラスタ単位でのデータ入力を行った場合に、出力側に持つべきローカルメモリの領域1201を図12に示す。   FIG. 12 shows a local memory area 1201 to be provided on the output side when data is input in units of two rasters.

2ラスタ入力の場合には、1ラスタ入力の場合(図3)に比べてバッファの重なり部分が小さくなることがわかる。このような領域をカバーする分のローカルメモリを持つことで、積算処理をローカルメモリで行うことができ、応答の遅い外部メモリへのアクセスは1回の書き込みに抑えることが可能となる。   In the case of 2-raster input, it can be seen that the overlapping portion of the buffers is smaller than in the case of 1-raster input (FIG. 3). By having a local memory for covering such an area, the integration process can be performed in the local memory, and access to the external memory with a slow response can be suppressed to one write.

ローカルメモリ容量の限界を超えるフィルタサイズの処理を行う場合でも、はみ出した部分を外部メモリに割り当てることで処理を行うことが可能であり、ローカルメモリのサイズによって処理可能なフィルタサイズは制限を受けない。   Even when processing a filter size that exceeds the limit of the local memory capacity, processing can be performed by allocating the protruding part to external memory, and the filter size that can be processed is not limited by the size of the local memory .

図13は、3ラスタをカラム単位1301で入力する状態を示す図である。   FIG. 13 is a diagram illustrating a state in which three rasters are input in column units 1301.

この場合、先に示した式(4)、(5)式は、以下の(6)式、(7)式となる。   In this case, the equations (4) and (5) shown above become the following equations (6) and (7).

Figure 2008192073
Figure 2008192073

出力メモリまたは出力側ローカルメモリ上での積算回数が1/3または1/3+1回とすることが可能となり、特に出力バッファを応答速度の遅い外部メモリにおく場合には処理の高速化が期待できる。また、ある1点の出力点についての横方向の係数ciは、3ラスタについて同じ値が使用できるため、係数の算出にかかる処理速度も更なる向上が図れる。   The number of integrations in the output memory or the output-side local memory can be reduced to 1/3 or 1/3 + 1. In particular, when the output buffer is placed in an external memory with a slow response speed, a high-speed process can be expected. . Further, since the same value can be used for the three rasters for the horizontal direction coefficient ci for one output point, the processing speed for calculating the coefficient can be further improved.

尚、係数ci, cj、フィルタ、補間演算の参照点を選択することにより、局所データ変換処理の構成を変えずに、例えば、1次補間、3次補間などの処理を切り替えて実施する処理をハードウェアまたはソフトウェアに実装しても良い。   In addition, by selecting coefficients ci, cj, filters, and reference points for interpolation calculation, processing that is performed by switching processing such as primary interpolation and tertiary interpolation without changing the configuration of the local data conversion processing, for example. It may be implemented in hardware or software.

更に、係数算出時に周囲の局所データの水平、垂直方向の距離を求めるステップにおいて、最も近傍の点を割り出す判断処理を追加することも可能である。この判断ステップの追加により局所データ変換部の構成を変えずに、0次補間(最近傍サンプリング処理)を行う処理をハードウェアまたはソフトウェアに実装することも可能である。   Furthermore, it is possible to add a determination process for determining the nearest point in the step of obtaining the horizontal and vertical distances of the surrounding local data when calculating the coefficients. By adding this determination step, it is possible to implement a process for performing 0th-order interpolation (nearest neighbor sampling process) in hardware or software without changing the configuration of the local data conversion unit.

(第3実施形態)
第3実施形態として、フィルタサイズと同じライン数のデータを入力として同時に与えた場合の処理を説明する。図14の参照番号1401で示した部分については、そもそも全てのフィルタ計算用の入力画素が一度に保持されていることから、積算の必要がない。図14の参照番号1402で示した領域については複数回の処理に分かれる積算処理が不要であるため、ローカルバッファへの保存を行う必要がない。ここでは単に積算処理が不要となる特別なケースを例示的に説明するものであり、外部メモリへの連続書き込み(バーストライト)を行うための一時保持バッファとしてローカルバッファを使用することは可能である。
(Third embodiment)
As a third embodiment, processing when data having the same number of lines as the filter size is simultaneously given as input will be described. In the portion indicated by reference numeral 1401 in FIG. 14, since all input pixels for filter calculation are held at the same time, there is no need for integration. The area indicated by reference numeral 1402 in FIG. 14 does not need to be stored in the local buffer because the integration process divided into a plurality of processes is unnecessary. Here, a special case in which integration processing is not required is described as an example, and a local buffer can be used as a temporary holding buffer for performing continuous writing (burst write) to an external memory. .

(第4実施形態)
図16は、画像データの入出力制限を例示的に説明する図である。画像領域1601は入力される画像データの全体を示す画像領域である。領域1602は、画像領域1601の中で処理されるべき領域を示している。領域1602の画像を全て処理した結果が、出力画像のデータを保持するバッファの領域1603に格納される。実際には、出力画像のデータを保持するバッファ容量が十分に確保できない等の理由により制限される場合がある。
(Fourth embodiment)
FIG. 16 is a diagram for exemplarily explaining input / output restrictions on image data. An image area 1601 is an image area showing the entire input image data. An area 1602 indicates an area to be processed in the image area 1601. The result of processing all the images in the area 1602 is stored in a buffer area 1603 that holds data of the output image. Actually, there are cases where the buffer capacity for holding output image data is limited due to a reason that a sufficient capacity cannot be secured.

図17は、本実施形態に係る画像処理装置の構成を示す図である。図15の構成に対して、入力領域保持部1710、出力領域保持部1711が設けられている。尚、圧縮画像伸張部1501に代わり画像入力部101を設ける構成としてもよい。   FIG. 17 is a diagram illustrating a configuration of the image processing apparatus according to the present embodiment. An input area holding unit 1710 and an output area holding unit 1711 are provided for the configuration of FIG. Note that the image input unit 101 may be provided instead of the compressed image expansion unit 1501.

入力領域保持部1710は、入力画像の中で、処理すべき座標範囲を保持する。入力領域保持部1710が保持する座標範囲に基づき読み出し用バッファ制御部(第1バッファ制御部)103は入力された画像の座標が、処理すべき領域に含まれるか判定する。読み出し用バッファ制御部103は判定結果に基づいて入力された画像の座標が処理するべき座標範囲に含まれている場合、読み出し用バッファ102への格納と、読み出し用バッファ102から局所データ変換部104への出力を制御する。   The input area holding unit 1710 holds a coordinate range to be processed in the input image. Based on the coordinate range held by the input area holding unit 1710, the read buffer control unit (first buffer control unit) 103 determines whether the coordinates of the input image are included in the area to be processed. When the coordinates of the image input based on the determination result are included in the coordinate range to be processed, the reading buffer control unit 103 stores the data in the reading buffer 102, and reads from the reading buffer 102 to the local data conversion unit 104. Control the output to.

但し、補間演算などが必要となる変倍処理やフィルタ処理においては、入力領域に対してフィルタサイズや補間時に参照する周辺が元の範囲を考慮した上で入力画像(入力画素)の選別を行う処理を読み出し用バッファ制御部103が行う。   However, in scaling processing and filter processing that require interpolation calculations, etc., the input image (input pixel) is selected after considering the filter range and the original range around the input area that is referenced during interpolation. Processing is performed by the read buffer control unit 103.

出力領域保持部1711は、出力すべき領域の座標範囲の情報を保持する。書き込み用バッファ制御部(第2バッファ制御部)108は、座標の位置に変換された部分画像(出力画像)とその出力座標系での位置情報1730とに基づき、部分画像(出力画像)の位置情報が、出力すべき領域の座標範囲に含まれているか判定する。書き込み用バッファ制御部(第2バッファ制御部)108は判定結果により出力画像の位置情報が出力すべき領域の座標範囲に含まれている場合には、出力画像と位置情報とを書き込み用バッファ107に書き込み、画像出力部109に対する出力を制御する。   The output area holding unit 1711 holds information on the coordinate range of the area to be output. The writing buffer control unit (second buffer control unit) 108 determines the position of the partial image (output image) based on the partial image (output image) converted into the coordinate position and the position information 1730 in the output coordinate system. It is determined whether the information is included in the coordinate range of the area to be output. When the position information of the output image is included in the coordinate range of the area to be output based on the determination result, the write buffer control unit (second buffer control unit) 108 displays the output image and the position information in the write buffer 107. And output to the image output unit 109 is controlled.

(他の実施形態)
なお、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録したコンピュータ可読の記憶媒体を、システムあるいは装置に供給することによっても、達成されることは言うまでもない。また、システムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
(Other embodiments)
Needless to say, the object of the present invention can also be achieved by supplying a system or apparatus with a computer-readable storage medium storing software program codes for realizing the functions of the above-described embodiments. Needless to say, this can also be achieved by the computer (or CPU or MPU) of the system or apparatus reading and executing the program code stored in the storage medium.

この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、不揮発性のメモリカード、ROMなどを用いることができる。   As a storage medium for supplying the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a nonvolatile memory card, a ROM, or the like can be used.

また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現される。また、プログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態が実現される場合も含まれることは言うまでもない。   Further, the functions of the above-described embodiment are realized by executing the program code read by the computer. In addition, an OS (operating system) running on a computer performs part or all of actual processing based on an instruction of a program code, and the above-described embodiment is realized by the processing. Needless to say.

第1実施形態に係る画像処理装置が備える構成要素を示す図である。It is a figure which shows the component with which the image processing apparatus which concerns on 1st Embodiment is provided. 順変換による局所データの変換処理を説明する図である。It is a figure explaining conversion processing of local data by forward conversion. ローカルバッファを説明する図である。It is a figure explaining a local buffer. ローカルバッファを説明する図である。It is a figure explaining a local buffer. 画像の回転を行う場合の局所データ変換部104の処理を説明する図である。It is a figure explaining the process of the local data conversion part 104 in the case of rotating an image. 順変換により回転・変形・変倍を行った場合の座標値の求め方を説明する図である。It is a figure explaining how to obtain | require the coordinate value at the time of performing rotation, deformation | transformation, and scaling by forward conversion. アフィン変換による回転・変倍・変形処理を行う場合の設定パラメータについて説明した図である。It is a figure explaining the setting parameter in the case of performing the rotation / magnification / deformation processing by affine transformation. アフィン変換による回転・変倍・変形処理を行う場合の設定パラメータについて説明した図である。It is a figure explaining the setting parameter in the case of performing the rotation / magnification / deformation processing by affine transformation. 出力座標算出処理の流れを説明する図である。It is a figure explaining the flow of an output coordinate calculation process. 第2実施形態に係る画像処理装置が備える構成要素を示す図である。It is a figure which shows the component with which the image processing apparatus which concerns on 2nd Embodiment is provided. 部分画像データと座標情報とを同時に引き渡す場合の好適なデータの入力順序の例を示す図である。It is a figure which shows the example of the suitable data input order in the case of passing over partial image data and coordinate information simultaneously. 2ラスタ単位でのデータ入力を行った場合に、出力側に持つべきローカルメモリの領域を示す図である。It is a figure which shows the area | region of the local memory which should have on the output side when the data input per 2 raster units is performed. 3ラスタをカラム単位1301で入力する状態を示す図であるIt is a figure which shows the state which inputs 3 rasters by the column unit 1301 フィルタサイズと同じライン数のデータを入力として同時に与えた場合の処理を説明する図である。It is a figure explaining the process at the time of giving simultaneously the data of the same number of lines as a filter size as an input. 圧縮画像伸張部1501を備えた画像処理装置の構成を例示する図である。2 is a diagram illustrating a configuration of an image processing apparatus including a compressed image expansion unit 1501. FIG. 画像データの入出力制限を例示的に説明する図である。It is a figure explaining the input / output restriction | limiting of image data exemplarily. 第4実施形態に係る画像処理装置の構成を示す図である。It is a figure which shows the structure of the image processing apparatus which concerns on 4th Embodiment. 画像中の一部分を回転しながら取り出す変換を例示的に説明する図である。It is a figure explaining the conversion which takes out part rotating in an image exemplarily.

Claims (8)

部分画像を格納する第1格納手段を制御する第1バッファ制御手段と、
前記第1格納手段に格納された前記部分画像を、出力座標の位置に順次変換する変換手段と、
前記変換手段により出力座標の位置に変換された部分画像を格納する第2格納手段を制御する第2バッファ制御手段と、
を備えることを特徴とする画像処理装置。
First buffer control means for controlling first storage means for storing partial images;
Conversion means for sequentially converting the partial images stored in the first storage means into positions of output coordinates;
Second buffer control means for controlling second storage means for storing the partial image converted to the position of the output coordinate by the conversion means;
An image processing apparatus comprising:
前記部分画像と、当該部分画像の座標情報とを入力する画像入力手段を更に備え、
前記第1格納手段は、前記画像入力手段により入力された前記部分画像と当該部分画像の座標情報とを、前記第1バッファ制御手段の制御により格納することを特徴とする請求項1に記載の画像処理装置。
An image input means for inputting the partial image and coordinate information of the partial image;
The said 1st storage means stores the said partial image input by the said image input means, and the coordinate information of the said partial image by control of the said 1st buffer control means, The said 1st storage means is characterized by the above-mentioned. Image processing device.
圧縮された画像を伸張して出力する圧縮画像伸張手段を更に備え、
前記第1格納手段は、前記圧縮画像伸張手段により伸張された画像の部分画像と、当該部分画像に関する座標情報とを、前記第1バッファ制御手段の制御により格納することを特徴とする請求項1に記載の画像処理装置。
A compressed image expansion means for expanding and outputting the compressed image;
2. The first storage unit stores a partial image of an image expanded by the compressed image expansion unit and coordinate information related to the partial image under the control of the first buffer control unit. An image processing apparatus according to 1.
入力された部分画像の中で、画像処理すべき部分画像の座標範囲の情報を保持する入力領域保持手段を更に備え、
前記第1バッファ制御手段は、前記座標範囲の情報に基づき、前記入力された部分画像の座標が前記画像処理すべき部分画像の座標範囲に含まれるか判定し、
前記第1バッファ制御手段は、前記判定に基づいて、前記入力された部分画像の座標が前記画像処理するべき部分画像の座標範囲に含まれている場合に、前記第1格納手段に、前記部分画像を書き込むように制御することを特徴とする請求項1に記載の画像処理装置。
An input area holding means for holding information on the coordinate range of the partial image to be processed among the input partial images is further provided.
The first buffer control means determines whether the coordinates of the input partial image are included in the coordinate range of the partial image to be processed based on the information of the coordinate range,
When the coordinates of the input partial image are included in the coordinate range of the partial image to be processed based on the determination, the first buffer control means The image processing apparatus according to claim 1, wherein the image processing apparatus is controlled to write an image.
出力すべき領域の座標範囲の情報を保持する出力領域保持手段を更に備え、
前記第2バッファ制御手段は、前記変換手段により出力される出力画像の位置情報が、前記出力すべき領域の座標範囲に含まれているか判定し、
前記第2バッファ制御手段は、前記判定に基づいて、前記出力画像の位置情報が前記出力すべき領域の座標範囲に含まれている場合に、前記第2格納手段に、前記出力画像を書き込むように制御することを特徴とする請求項1に記載の画像処理装置。
It further comprises output area holding means for holding information on the coordinate range of the area to be output,
The second buffer control unit determines whether the position information of the output image output by the conversion unit is included in the coordinate range of the region to be output,
The second buffer control unit writes the output image in the second storage unit when the position information of the output image is included in the coordinate range of the region to be output based on the determination. The image processing apparatus according to claim 1, wherein the image processing apparatus is controlled as follows.
第1バッファ制御手段が、部分画像を格納する第1格納手段を制御する第1バッファ制御工程と、
変換手段が、前記第1格納手段に格納された前記部分画像を、出力座標の位置に順次変換する変換工程と、
第2バッファ制御手段が、前記変換工程により出力座標の位置に変換された部分画像を格納する第2格納手段を制御する第2バッファ制御工程と、
を備えることを特徴とする画像処理装置の制御方法。
A first buffer control step in which the first buffer control means controls the first storage means for storing the partial image;
A converting step in which the converting means sequentially converts the partial images stored in the first storing means into positions of output coordinates;
A second buffer control step, wherein the second buffer control unit controls a second storage unit that stores the partial image converted into the position of the output coordinate by the conversion step;
An image processing apparatus control method comprising:
請求項6に記載の画像処理装置の制御方法をコンピュータに実行させることを特徴とするプログラム。   A program for causing a computer to execute the control method of the image processing apparatus according to claim 6. 請求項7に記載のプログラムを格納したことを特徴とするコンピュータ可読の記憶媒体。   A computer-readable storage medium storing the program according to claim 7.
JP2007028443A 2007-02-07 2007-02-07 Image processing apparatus, image processing apparatus control method, program, and storage medium Expired - Fee Related JP4971818B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007028443A JP4971818B2 (en) 2007-02-07 2007-02-07 Image processing apparatus, image processing apparatus control method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007028443A JP4971818B2 (en) 2007-02-07 2007-02-07 Image processing apparatus, image processing apparatus control method, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2008192073A true JP2008192073A (en) 2008-08-21
JP4971818B2 JP4971818B2 (en) 2012-07-11

Family

ID=39752093

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007028443A Expired - Fee Related JP4971818B2 (en) 2007-02-07 2007-02-07 Image processing apparatus, image processing apparatus control method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP4971818B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012128805A (en) * 2010-12-17 2012-07-05 Fujitsu Semiconductor Ltd Graphics processor
JP2016095667A (en) * 2014-11-14 2016-05-26 株式会社リコー Image processing device and electronics apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07107267A (en) * 1993-10-06 1995-04-21 Fuji Xerox Co Ltd Slanting processing circuit
JP2001043359A (en) * 2000-01-01 2001-02-16 Fuji Xerox Co Ltd Image processor and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07107267A (en) * 1993-10-06 1995-04-21 Fuji Xerox Co Ltd Slanting processing circuit
JP2001043359A (en) * 2000-01-01 2001-02-16 Fuji Xerox Co Ltd Image processor and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012128805A (en) * 2010-12-17 2012-07-05 Fujitsu Semiconductor Ltd Graphics processor
JP2016095667A (en) * 2014-11-14 2016-05-26 株式会社リコー Image processing device and electronics apparatus

Also Published As

Publication number Publication date
JP4971818B2 (en) 2012-07-11

Similar Documents

Publication Publication Date Title
KR101401336B1 (en) Image processing device and image processing method
JP5468389B2 (en) Digital image processing method
JP4455364B2 (en) Resolution conversion method and apparatus
JP5419822B2 (en) Image processing apparatus, image display apparatus, image processing method, and data structure of image file
JPH10198337A (en) High speed aspect ratio zooming and thumbnail operation using compression and ceiling
KR20100021168A (en) Apparatus and method for decoding image and image data processing unit and method using the same
JP5355449B2 (en) Multi-resolution video decoding method, multi-resolution video decoding device, and program
JPH11261887A (en) Image processor, image processing method and computer readable storage medium
JP4971818B2 (en) Image processing apparatus, image processing apparatus control method, program, and storage medium
WO2009020532A2 (en) Method for checkerboard-based vector to raster conversion
JP2005094212A (en) Image processor and processing method, computer program, and computer readable storage medium
JP5331432B2 (en) Image processing apparatus and image processing method
JP4809412B2 (en) Image processing apparatus and image processing method
JP4109151B2 (en) Image processing device
JP4584115B2 (en) Image encoding apparatus, image encoding method, image encoding program, and computer-readable recording medium recording the image encoding program
JP2011081477A (en) Image restoring device, program therefor, and multi-dimensional image restoring device
JP5522736B2 (en) Image super-resolution apparatus and program thereof
JP2021174404A (en) Data generation device, training device, and data generation method
JP4194472B2 (en) Image processing method and apparatus
JP2020088694A (en) Image processing apparatus and image processing method
JP4274187B2 (en) Display data decompression method, display data compression / decompression method, display data decompression device, and display data compression / decompression device
JP4118030B2 (en) Image compression apparatus / image expansion apparatus, image compression method / image expansion method, and information recording medium for realizing the method
JP2009200545A (en) Image encoding device and image decoding device
JP5194762B2 (en) Data compression device and data decompression device
JP5467083B2 (en) Image processing apparatus, image processing method, and data structure of image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110530

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110704

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110902

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111216

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120210

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120402

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120406

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150413

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4971818

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150413

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees