JPH07110859A - Picture processing method and its device - Google Patents

Picture processing method and its device

Info

Publication number
JPH07110859A
JPH07110859A JP5257271A JP25727193A JPH07110859A JP H07110859 A JPH07110859 A JP H07110859A JP 5257271 A JP5257271 A JP 5257271A JP 25727193 A JP25727193 A JP 25727193A JP H07110859 A JPH07110859 A JP H07110859A
Authority
JP
Japan
Prior art keywords
data
image
axis direction
pixel data
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5257271A
Other languages
Japanese (ja)
Inventor
Hisashi Takayama
山 久 高
Akio Uesugi
杉 明 夫 上
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5257271A priority Critical patent/JPH07110859A/en
Publication of JPH07110859A publication Critical patent/JPH07110859A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To quickly execute magnifying/reducing processing attended with interpolating processing for a color picture. CONSTITUTION:An MPU 1 executes picture magnifying/reducing processing while interpolating a picture in accordance with a program stored in a system memory 2. In the case of magnifying an original picture P times in its X axis direction, the inter-pixcel area of the original picture is virtually divided into 8 areas in the X axis direction and 8 areas also in the Y axis direction, which pixcel data out of four nearby pixcels in a minute area are to be selected is tabulated by the combination of coincidence/noncoincidence relation among the four nearby pixcels in a minute area every minute area and pixcel data are selected from the four nearby pixcels by the combination of the minute area on the position of the original picture corresponding to the pixcels of the picture magnified by P times and the coincidence/noncoincidence relation among the four nearby pixcels in the minute area to generate pixcel data corresponding to a picture magnified by 8 times in the X direction. A picture magnified by P times in the X axis direction is generated by magnifying the resultant pixcel data by P/8 times in the X axis direction.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、PPC、ファクシミ
リ、DTPシステムなどのオフィスオートメーション機
器の分野における、画像データの補間をともなう拡大縮
小処理に適した画像処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus suitable for enlargement / reduction processing accompanied by interpolation of image data in the field of office automation equipment such as PPC, facsimile and DTP system.

【0002】[0002]

【従来の技術】従来、画像データの拡大、縮小における
補間処理の1つ方法として、例えば、拡大縮小後の画像
の画素に対応する原画像における位置を求め、その位置
の周辺画素からの距離をその周辺画素データに重み付け
して、拡大縮小後の画像の画素データを生成する方法が
ある。この場合、距離の演算や、重み付け演算などの膨
大な演算をする必要があり、また、実際には8ビット/
画素の画像を、カラーマップテーブルを用いて、擬似的
にCRTにフルカラー表示するシステムの場合には、一
旦、カラーマップテーブルを参照して、拡大縮小後の画
像の画素データを生成し、さらに新たなカラーマップテ
ーブルを生成してCRTに表示する必要があった。
2. Description of the Related Art Conventionally, as one method of interpolation processing for enlarging and reducing image data, for example, a position in an original image corresponding to a pixel of an image after enlargement / reduction is obtained, and a distance from the peripheral pixel of the position is calculated. There is a method of generating pixel data of an image after scaling by weighting the peripheral pixel data. In this case, it is necessary to perform a huge amount of calculation such as distance calculation and weighting calculation.
In the case of a system in which a pixel image is pseudo-color-displayed on a CRT by using a color map table, the color map table is referred to once to generate pixel data of the scaled image, and a new image is generated. It was necessary to generate a different color map table and display it on the CRT.

【0003】また別の方法として、特開昭63-282886 号
公報において提案されている方法がある。図57は、従
来の補間方法を示すものである。原画像領域の画素間の
領域を細分化して得られる各微小領域ごとに、いずれの
近傍画素を選択するかを指定する情報を記憶した参照テ
ーブルを、2値化された近傍画素情報の組合せに対応し
て複数通りROMに記憶し、拡大縮小処理後の1つ1つ
の画素に対して、対応する原画像領域における微小領域
を算出し、その微小領域の近傍画素データを2値化し
て、その2値化された画素データの組合せに対応する参
照テーブルを選択し、その参照テーブルから対応する微
小領域に応じて、いずれの近傍画素を選択するかを指定
する情報を読みだし、その情報によって選択された近傍
画素データを拡大縮小後の画素データとしてメモリへ書
き込むことによって補間を実現していた。
As another method, there is a method proposed in Japanese Patent Laid-Open No. 63-282886. FIG. 57 shows a conventional interpolation method. A reference table storing information designating which neighboring pixel is selected for each minute region obtained by subdividing the region between pixels of the original image region is converted into a combination of binarized neighboring pixel information. Correspondingly, a plurality of patterns are stored in the ROM, a minute area in the corresponding original image area is calculated for each pixel after the enlargement / reduction processing, and the neighboring pixel data of the minute area is binarized, and A reference table corresponding to a combination of binarized pixel data is selected, and information designating which neighboring pixel is selected is read from the reference table and selected according to the corresponding minute area. Interpolation has been realized by writing the neighborhood pixel data thus created into the memory as pixel data after scaling.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記の
従来技術では、原画像の画素データの2値化演算をする
必要があり、特に、1画素が8ビットで表される画像を
カラーマップテーブルを用いて、疑似的にCRTにフル
カラー表示するシステムにおいては、それぞれの画素に
ついてカラーマップテーブルを参照してから2値化をす
る必要があり、高速な処理が実現できないという課題を
有していた。
However, in the above-mentioned conventional technique, it is necessary to perform the binarization operation of the pixel data of the original image, and in particular, the image in which one pixel is represented by 8 bits is stored in the color map table. In the system for pseudo full-color display on the CRT, it is necessary to refer to the color map table for each pixel before binarization, and there is a problem that high-speed processing cannot be realized.

【0005】本発明は、上記従来技術の課題を解決する
もので、カラー画像の補間処理を含む拡大縮小処理を高
速に行なうことのできる画像処理方法およびその装置を
提供することを目的とする。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned problems of the prior art, and an object of the present invention is to provide an image processing method and apparatus capable of high-speed scaling processing including interpolation processing of color images.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、本発明の画像処理方法は、原画像(1画素がiビッ
ト( iは任意の正の整数) のデータによって表されるデ
ジタル画像)の画素間の領域を仮想的にX軸方向にN
(Nは任意の正の整数)個、Y軸方向にM(Mは任意の
正の整数)個に分割し、得られた微小領域ごとに、K
(Kは任意の正の整数)個の近傍画素データ間の一致・
不一致の関係の組み合わせによってK個の近傍画素デー
タの内どの画素データを選択するかをあらかじめ定めて
おき、拡大縮小後の画像(1画素がiビットのデータに
よって表されるデジタル画像)の画素に対応する原画像
領域における微小領域と、その微小領域のK個の近傍画
素データ間の一致・不一致の関係の組み合わせを求める
ことによって、K個の近傍画素データの内からあらかじ
め定められた画素データを選択して拡大縮小後の画素デ
ータとするようにしたものである。
In order to achieve the above object, the image processing method of the present invention uses a digital image represented by data of an original image (1 pixel is i bits (i is an arbitrary positive integer)). ), The area between pixels is virtually N in the X-axis direction.
(N is an arbitrary positive integer) and M (M is an arbitrary positive integer) in the Y-axis direction, and K is obtained for each of the obtained minute regions.
Match between (K is an arbitrary positive integer) number of neighboring pixel data
It is determined in advance which pixel data of the K neighboring pixel data is selected by the combination of the disagreement relations, and the pixel of the image after scaling (a digital image in which one pixel is represented by i-bit data) is selected. By obtaining a combination of a matching / non-matching relationship between the micro area in the corresponding original image area and the K neighboring pixel data in the micro area, predetermined pixel data is obtained from the K neighboring pixel data. The pixel data is selected and enlarged / reduced.

【0007】また上記画像処理方法を用いた本発明の画
像処理装置は、画像データを蓄積する蓄積手段と、画像
データを処理する中央処理装置と、中央処理装置の動作
を制御する制御データを蓄積する蓄積手段とを備え、原
画像(1画素がiビット( iは任意の正の整数) のデー
タによって表されるデジタル画像)の画素間の領域を仮
想的にX軸方向にN(Nは任意の正の整数)個、Y軸方
向にM(Mは任意の正の整数)個に分割し、得られた微
小領域ごとに、K(Kは任意の正の整数)個の近傍画素
データ間の一致・不一致の関係の組み合わせによってK
個の近傍画素データの内どの画素データを選択するかを
あらかじめ定めておき、拡大縮小後の画像(1画素がi
ビットのデータによって表されるデジタル画像)の画素
に対応する原画像領域における微小領域と、その微小領
域のK個の近傍画素データ間の一致・不一致の関係の組
み合わせを求めることによって、K個の近傍画素データ
の内からあらかじめ定められた画素データを選択して拡
大縮小後の画素データを生成するようにしたものであ
る。
An image processing apparatus of the present invention using the above image processing method stores a storage unit for storing image data, a central processing unit for processing the image data, and control data for controlling the operation of the central processing unit. And a storage unit for storing an original image (a digital image in which one pixel is represented by i-bit data (i is an arbitrary positive integer) data), and an area between pixels is virtually N in the X-axis direction. (N is an arbitrary positive integer), M (M is an arbitrary positive integer) in the Y-axis direction, and K (K is an arbitrary positive integer) number of neighboring pixel data for each minute region obtained. K depending on the combination of match / mismatch between
Which pixel data is selected from the neighboring pixel data is determined in advance, and the scaled image (1 pixel is i
Bit image data (digital image represented by pixels) in the original image area corresponding to the pixel and K neighboring pixel data of the minute area, the matching / non-matching relationship is calculated to obtain K combinations. It is configured such that predetermined pixel data is selected from the neighboring pixel data to generate pixel data after scaling.

【0008】また本発明の画像処理装置は、微小領域の
K(Kは任意の正の整数)個の近傍画素データ間の一致
・不一致の関係の組み合わせによってK個の近傍画素デ
ータの内どの画素データを選択するかをあらかじめ定め
てテーブル化しておき、原画像をX軸方向にN倍した後
の画像の画素に対応する原画像における微小領域で、し
かもK個の近傍画素データが互いに共通で且つ互いにX
軸方向に隣合うN個の微小領域と、その微小領域のK個
の近傍画素データ間の一致・不一致の関係の組み合わせ
を求めることによって、上記テーブルを参照してK個の
近傍画素データの内からあらかじめ定められた画素デー
タを選択してX方向にN倍に拡大された画像に相当する
画素データを生成するようにしたものである。
Further, the image processing apparatus of the present invention is capable of determining which pixel of K neighboring pixel data by combining a match / mismatch relationship between K (K is an arbitrary positive integer) neighboring pixel data in a minute area. Whether or not to select the data is determined in advance and made into a table, and it is a small area in the original image corresponding to the pixels of the image after the original image is multiplied by N in the X-axis direction, and K pieces of neighboring pixel data are common to each other. And X to each other
Among the K neighboring pixel data with reference to the above table, a combination of N minute regions adjacent to each other in the axial direction and K neighboring pixel data of the minute regions is obtained by referring to the above table. From the above, predetermined pixel data is selected to generate pixel data corresponding to an image enlarged N times in the X direction.

【0009】さらに本発明による画像処理装置は、制御
データを蓄積する蓄積手段に、X方向にN倍に拡大され
たデータをX軸方向にP/N倍(Pは0より大きい任意
の有理数)する制御データを加えたものである。
Further, in the image processing apparatus according to the present invention, the data expanded N times in the X direction is P / N times (P is any rational number larger than 0) in the X direction in the storage means for storing the control data. Control data to be added.

【0010】さらに本発明による画像処理装置は、制御
データを蓄積する蓄積手段に、原画像(1画素がiビッ
ト( iは任意の正の整数) のデータによって表されるデ
ジタル画像)をX軸方向にN倍(Nは任意の正の整
数)、Y軸方向にQ倍(Qは0より大きい任意の有理
数)した後の画像の画素に対応する原画像における微小
領域を求める制御データを加えたものである。
Further, in the image processing apparatus according to the present invention, an original image (a digital image in which one pixel is represented by i-bit (i is an arbitrary positive integer) data) is stored in the storage means for storing control data on the X-axis. Control data for obtaining a minute area in the original image corresponding to the pixel of the image after N times (N is an arbitrary positive integer) in the direction and Q times (Q is an arbitrary rational number greater than 0) in the Y axis direction are added. It is a thing.

【0011】さらに本発明による画像処理装置は、中央
処理装置と、画像データを蓄積する蓄積手段と、中央処
理装置の動作を制御する制御データを蓄積する蓄積手段
と、同時に複数の画素データをX軸方向に任意の倍率で
拡大縮小してメモリに書き込む画像処理手段を備え、中
央処理装置が原画像をX軸方向にN倍、Y軸方向にQ倍
した後の画像の画素に対応する原画像における微小領域
で、しかもK個の近傍画素データが互いに共通で且つ互
いにX軸方向に隣合うN個の微小領域と、そのN個の微
小領域のK個の近傍画素データ間の一致・不一致の関係
の組み合わせを求めることによって、テーブルを参照し
てK個の近傍画素データの内からあらかじめ定められた
画素データを選択してX方向にN倍、Y軸方向にQ倍に
された画像に相当する画素データを生成し、さらに、そ
の生成された画素データを、画像処理手段がX軸方向に
P/N倍することによって、X軸方向にP倍、Y軸方向
にQ倍された画像を生成するようにしたものである。
The image processing apparatus according to the present invention further comprises a central processing unit, a storage unit for storing image data, a storage unit for storing control data for controlling the operation of the central processing unit, and a plurality of pixel data at the same time. An image processing means for enlarging / reducing the image in an axial direction at an arbitrary magnification and writing the image in a memory is provided, and the central processing unit corresponds to an original image corresponding to a pixel of an image after the original image is multiplied by N times in the X axis direction and Q times in the Y axis direction. Matching or non-matching between N small areas that are common to each other in the X-axis direction, and K neighboring pixel data of the N minute areas, which are the minute areas in the image and in which the K neighboring pixel data are common to each other. By obtaining the combination of the relations, the predetermined pixel data is selected from the K neighboring pixel data by referring to the table and the image is multiplied by N in the X direction and Q by the Y axis. Considerable Image data is generated, and the image processing means multiplies the generated pixel data by P / N in the X-axis direction to obtain an image that is P-folded in the X-axis direction and Q-folded in the Y-axis direction. It was created.

【0012】さらに本発明による画像処理方法およびそ
の装置は、拡大縮小後または変倍後の画像の画素に対応
する原画像領域における微小領域のK個(Kは任意の正
の整数)の近傍画素データ間の一致・不一致の関係の組
み合わせを求める処理において、処理の冗長性と、近傍
画素データ間の空間的な連続性から、実際的な画像デー
タの処理において、画素データ間の論理演算の回数が最
小になる順序で、画素データ間の論理演算を行なうよう
にしたものである。
Further, the image processing method and the apparatus according to the present invention include K (K is an arbitrary positive integer) neighboring pixels of a minute area in the original image area corresponding to the pixels of the image after scaling or scaling. Due to the redundancy of processing and the spatial continuity between neighboring pixel data in the processing to find the combination of coincidence / non-coincidence relationships between data, the number of logical operations between pixel data in the actual image data processing In this order, the logical operation between pixel data is performed in the order that minimizes.

【0013】さらに本発明の画像処理装置は、中央処理
装置と、画像データを蓄積する蓄積手段と、中央処理装
置の動作を制御する制御データを蓄積する蓄積手段と、
同時に複数の画素データをX軸方向に任意の倍率で拡大
縮小してメモリに書き込む画像処理手段と、複数のテー
ブルデータを格納する格納手段と、K個(Kは任意の正
の整数)の画素データ間の一致・不一致の関係の組み合
わせを同時に求める比較手段と、K個の画素データから
N画素(Nは任意の正の整数)のデータを選択する選択
手段とを備え、格納手段に微小領域のK個の近傍画素デ
ータ間の一致・不一致の関係の組み合わせによってK個
の近傍画素データの内どの画素データを選択するかをあ
らかじめ定めた複数個のテーブルを格納し、原画像をX
軸方向にN倍、Y軸方向にQ倍した後の画像の画素に対
応する原画像における微小領域で、しかもK個の近傍画
素データが互いに共通で且つ互いにX軸方向に隣合うN
個の微小領域のK個の近傍画素データ間の一致・不一致
の関係の組み合わせを比較手段によって求め、選択手段
が格納手段のテーブルを参照してK個の近傍画素データ
からあらかじめ定められたN画素のデータを選択し、X
方向にN倍、Y軸方向にQ倍にされた画像に相当するN
個の画素データを生成し、さらにその生成された画素デ
ータを、画像処理手段がX軸方向にP/N倍することに
よって、X軸方向にP倍、Y軸方向にQ倍された画像を
生成するようにしたものである。
The image processing apparatus of the present invention further comprises a central processing unit, a storage unit for storing image data, and a storage unit for storing control data for controlling the operation of the central processing unit.
At the same time, an image processing means for enlarging / reducing a plurality of pixel data in the X-axis direction at an arbitrary magnification and writing the same in a memory, a storage means for storing a plurality of table data, and K (K is an arbitrary positive integer) pixels. Comparing means for simultaneously obtaining a combination of coincidence / disagreement relations between data and selecting means for selecting N pixel data (N is an arbitrary positive integer) from K pixel data are provided, and the storing means has a very small area. The table stores a plurality of tables that predetermine which pixel data of the K neighboring pixel data is selected based on the combination of the matching / non-matching relationship between the K neighboring pixel data of X.
N is a small area in the original image corresponding to pixels of the image after being multiplied by N times in the axial direction and Q times in the Y axis direction, and in which K pieces of neighboring pixel data are common to each other and are adjacent to each other in the X axis direction.
The comparison means finds the combination of the coincidence / non-coincidence relations between the K neighboring pixel data of the micro areas, and the selecting means refers to the table of the storing means to determine a predetermined N pixel from the K neighboring pixel data. Select the data of X
N times the image and N times the Y-axis direction
The image processing means generates P pixel data, and the generated pixel data is multiplied by P / N in the X-axis direction to obtain an image that is P-folded in the X-axis direction and Q-folded in the Y-axis direction. It was created.

【0014】さらに本発明の画像処理装置は、上記構成
に加え、微小領域のK個の近傍画素データ間の一致・不
一致の関係の組み合わせによってK個の近傍画素データ
の内どの画素データを選択するかをあらかじめ定めた複
数個のテーブルを、L個の格納手段にそれぞれ格納し、
原画像をX軸方向にN倍、Y軸方向にQ倍した後の画像
の画素に対応する原画像における微小領域で、しかもK
個の近傍画素データが互いに共通で且つ互いにX軸方向
に隣合うN個の微小領域のK個の近傍画素データ間の一
致・不一致の関係の組み合わせをL組のK個の近傍画素
データに対してL個の比較手段によって同時に求め、L
個の選択手段がL個の格納手段のテーブルを同時に参照
してL組のK個の近傍画素データからあらかじめ定めら
れたLN画素のデータを選択し、X方向にN倍、Y軸方
向にQ倍にされた画像に相当するLN個の画素データを
同時に生成し、さらにその生成された画素データを、画
像処理手段がX軸方向にP/N倍することによって、X
軸方向にP倍、Y軸方向にQ倍された画像を生成するよ
うにしたものである。
Further, in addition to the above configuration, the image processing apparatus of the present invention selects any pixel data of K neighboring pixel data by combining the matching / non-matching relationship between the K neighboring pixel data of the minute area. A plurality of tables each having a predetermined value are stored in L storage means,
A small area in the original image corresponding to the pixels of the image after the original image is multiplied by N times in the X axis direction and Q times in the Y axis direction, and K
The neighboring pixel data are common to each other and the neighboring neighboring pixel data of the N minute areas adjacent to each other in the X-axis direction are combined with each other in a matching / non-matching relationship with respect to the L neighboring K pixel data. At the same time by L comparison means,
The selection means simultaneously refers to the tables of the L storage means to select predetermined LN pixel data from the L sets of K neighboring pixel data, N times in the X direction and Q in the Y axis direction. At the same time, LN pieces of pixel data corresponding to the doubled image are generated, and the generated pixel data are multiplied by P / N in the X-axis direction to obtain X / X.
This is to generate an image that is P-folded in the axial direction and Q-folded in the Y-axis direction.

【0015】[0015]

【作用】本発明の画像処理方法およびその装置は、上記
構成により、単純な論理演算だけで拡大縮小後の補間処
理された画素データを生成することができ、しかも、8
ビット/画素の画像を、カラーマップテーブルを用いて
疑似的にCRTにフルカラー表示するシステムにおいて
は、画像の拡大縮小における補間処理を、カラーマップ
テーブルを参照することなく、また新たにカラーマップ
テーブルを生成することもなく、高速に、線形補間法と
類似の補間効果を簡易的に得ることができる。特に、斜
め線の拡大時に生じる段差を、目立たなくする効果があ
る。
With the above arrangement, the image processing method and apparatus of the present invention can generate interpolated pixel data after scaling by a simple logical operation.
In a system in which a bit / pixel image is displayed in full color on a CRT in a pseudo manner using a color map table, interpolation processing in image enlargement / reduction can be performed without referring to the color map table and by newly creating a color map table. It is possible to easily obtain an interpolation effect similar to the linear interpolation method at high speed without generating it. In particular, it has an effect of making a step generated when the diagonal line is enlarged inconspicuous.

【0016】[0016]

【実施例】【Example】

(実施例1)以下、本発明の画像処理方法を用いた画像
処理装置の第1の実施例について、図面を参照しながら
説明する。図1はこの実施例1における画像処理装置の
機能ブロック図である。図1において、1はプログラム
に従って画像を処理するMPU(Multi Processing Uni
t) 、2はMPU1が実行するプログラムを格納するシ
ステムメモリ、3は画像データを格納する画像データメ
モリ、4はCRTに表示されるデータを格納する表示メ
モリ、5は表示メモリ4とCRTを制御するCRTコン
トローラ、6は表示メモリ4に格納された画像データを
表示するCRT、7は32ビットのバスである。この画
像処理装置は、画像データメモリ3上または表示メモリ
4上の矩形領域の原画像を、補間処理をしながらX軸方
向、Y軸方向独立に任意の倍率で拡大縮小処理して、表
示メモリ4または画像データメモリ3に書き込むように
構成されている。処理するデータは8ビット/画素のカ
ラー画像データであり、データの8ビットが1画素に相
当する。以下において、微小領域とは、原画像の画素間
の領域をX軸方向に8分割、Y軸方向に8分割した場合
に現れる仮想上の微小な領域を意味し、また、ワードは
32ビット、ショートワードは16ビット、バイトは8
ビットを意味するものとする。
(Embodiment 1) Hereinafter, a first embodiment of an image processing apparatus using the image processing method of the present invention will be described with reference to the drawings. FIG. 1 is a functional block diagram of the image processing apparatus according to the first embodiment. In FIG. 1, reference numeral 1 denotes an MPU (Multi Processing Uni) that processes an image according to a program.
t) 2, system memory for storing programs executed by MPU 1, 3 image data memory for storing image data, 4 display memory for storing data displayed on CRT, 5 control display memory 4 and CRT A CRT controller 6 for displaying the image data stored in the display memory 4 is a CRT for displaying the image data, and a reference numeral 7 is a 32-bit bus. This image processing apparatus enlarges / reduces an original image in a rectangular area on the image data memory 3 or the display memory 4 independently of the X-axis direction and the Y-axis direction at an arbitrary magnification while performing interpolation processing, and displays the original image. 4 or image data memory 3. The data to be processed is 8-bit / pixel color image data, and 8 bits of the data correspond to 1 pixel. In the following, the minute area means a virtual minute area that appears when the area between pixels of the original image is divided into eight in the X-axis direction and eight in the Y-axis direction, and the word is 32 bits, 16 bits for short words, 8 bytes
Shall mean a bit.

【0017】以上のように構成された画像処理装置にお
いて、画像データメモリ3の画像をX軸方向にP倍(P
は任意の正の有理数)、Y軸方向にQ倍(Qは任意の正
の有理数)して、CRT6に表示する場合、システムメ
モリ2のプログラムにしたがって、MPU1が、画像デ
ータメモリ3から画像データを読み出し、補間処理をし
ながらX軸方向にP倍、Y軸方向にQ倍にして、表示メ
モリ4に書き込む。表示メモリ4に書き込まれた画像
は、CRTコントローラ5によってCRT6に表示され
る。MPU1による画像の補間処理を伴う拡大縮小処理
は、メモリ3、4上の画像データに対して、同様に行な
われる。したがって、画像データメモリ3の画像をX軸
方向にP倍、Y軸方向にQ倍して、画像データメモリ3
に格納する場合も、表示メモリ4の画像をX軸方向にP
倍、Y軸方向にQ倍して、画像データメモリ3に格納す
る場合も、表示メモリ4の画像をX軸方向にP倍、Y軸
方向にQ倍して表示メモリ4に書き込む場合も、全てM
PU1がメモリ3、4上の原画像データを読み出し、補
間処理をしながらX軸方向にP倍、Y軸方向にQ倍にし
てメモリ3、4に書き込むことになる。MPU1による
システムメモリ2からのプログラムのロード、およびM
PU1によるメモリ3、4からの画像データの読み出し
と処理したデータのメモリ3、4への書き込みは、全て
バス7を介して行なわれる。
In the image processing apparatus configured as described above, the image in the image data memory 3 is multiplied by P (P
Is an arbitrary positive rational number), Q times in the Y-axis direction (where Q is an arbitrary positive rational number), and is displayed on the CRT 6, the MPU 1 reads the image data from the image data memory 3 according to the program in the system memory 2. Is read out, and is multiplied by P in the X-axis direction and Q times in the Y-axis direction while being interpolated, and written in the display memory 4. The image written in the display memory 4 is displayed on the CRT 6 by the CRT controller 5. The enlargement / reduction processing accompanied by the image interpolation processing by the MPU 1 is similarly performed on the image data on the memories 3 and 4. Therefore, the image in the image data memory 3 is multiplied by P in the X-axis direction and Q times in the Y-axis direction to obtain the image data memory 3
When storing the image in the display memory 4,
Double, Q times in the Y-axis direction and store in the image data memory 3, or when the image in the display memory 4 is written in the display memory 4 by P times in the X-axis direction and Q times in the Y-axis direction. All M
The PU 1 reads the original image data from the memories 3 and 4, and writes the original image data in the memories 3 and 4 with P times in the X axis direction and Q times in the Y axis direction while performing interpolation processing. Load program from system memory 2 by MPU1, and M
The reading of image data from the memories 3 and 4 by the PU 1 and the writing of processed data to the memories 3 and 4 are all performed via the bus 7.

【0018】本実施例におけるMPU1による補間処理
を伴う拡大縮小処理は、基本的に図2に示す手順で行な
われる。図2には、原画像をX軸方向にP倍(Pは0よ
り大きい任意の有理数)にする場合の基本処理が示され
ている。ステップ20で拡大縮小後の画素に対応する原画
像における参照データをメモリから読み出し、ステップ
21で8倍補間拡大処理して、読み出された参照データか
ら補間処理をしながらX軸方向に8倍に拡大されたデー
タを生成する。さらに、X軸方向に8倍に拡大されたデ
ータを、ステップ22でX軸方向にP/8倍してX軸方向
にP倍にされたデータを生成し、ステップ23でメモリに
書き込む。
The enlargement / reduction processing accompanied by the interpolation processing by the MPU 1 in the present embodiment is basically performed by the procedure shown in FIG. FIG. 2 shows basic processing for multiplying the original image by P times in the X-axis direction (P is an arbitrary rational number larger than 0). In step 20, read the reference data in the original image corresponding to the scaled pixel from the memory,
In step S21, the 8-fold interpolation enlargement process is performed, and the 8-fold enlargement data is generated in the X-axis direction while performing the interpolation process from the read reference data. Further, the data enlarged 8 times in the X-axis direction is multiplied by P / 8 in the X-axis direction to generate P-fold data in the X-axis direction in step 22, and is written in the memory in step 23.

【0019】原画像S(X軸方向の画素数がsnx 、Y軸
方向の画素数がsny の矩形の画像(snx,sny は1以上の
整数)をX軸方向にP倍(Pは0より大きい任意の有理
数)、Y軸方向にQ倍(Qは0より大きい任意の有理
数)に拡大縮小処理して画像D(X軸方向の画素数がdn
x 、Y軸方向の画素数がdny の矩形の画像(dnx,dnyは1
以上の整数,dnx= Psnx,dny=Qsny))を生成する場合に
は、図3のフローチャートに示す手順で拡大縮小処理を
行なう。図3において、ステップ30のsは、画像Dの行
番号を表し、0行目は画像Dの上端の行を、(dny - 1)
行目は画像Dの下端の行を表す。ステップ30で、sは0
に初期設定される。ステップ31では、この拡大縮小処理
の終了判定を行ない、s= dny の場合に処理を終了し、
それ以外の場合は処理を続行する。ステップ32のjは、
原画像Sの列番号を表し、0列目は原画像Sの左端の列
を、(snx - 1) 行目は原画像Sの右端の列を表す。ステ
ップ32で、jは0に設定される。ステップ33では、画像
Dのs行目のデータを生成する処理の終了判定を行な
い、j = snx の場合に、ステップ39でsをインクリメン
トし、それ以外の場合は、ステップ33〜38の処理を繰り
返す。ステップ34〜37の処理は、図2に示した基本処理
であり、ここでステップ34の処理の詳細は図5に示して
あり、またステップ35の処理は、図4のステップ406 〜
408 に相当する。図5および図4については後で詳述す
る。ステップ38では、jをインクリメントする。画像D
のs行のデータに対応する原画像Sの0列目から(snx -
1) 列目の参照データに対して、X軸方向に連続して基
本処理を行なうことにより、画像Dのs行のデータが生
成される。この画像Dの1行のデータを生成する処理
を、画像Dの0行目から(dny - 1) 行目に対して、Y軸
方向に連続して実行することにより、結果として、X軸
方向にP倍、Y軸方向にQ倍に拡大縮小された画像Dを
生成する。
An original image S (a rectangular image (snx, sny is an integer of 1 or more) in which the number of pixels in the X axis direction is snx and the number of pixels in the Y axis direction is sny is multiplied by P in the X axis direction (P is greater than 0). The image D (the number of pixels in the X-axis direction is dn) after being subjected to scaling processing in the Y-axis direction by Q times (Q is an arbitrary rational number greater than 0) in the Y-axis direction.
A rectangular image in which the number of pixels in the x and Y axis directions is dny (dnx and dny are 1
In the case of generating the above integer, dnx = Psnx, dny = Qsny)), enlarging / reducing processing is performed by the procedure shown in the flowchart of FIG. In FIG. 3, s in step 30 represents the line number of the image D, the 0th line is the top line of the image D, (dny-1).
The line represents the bottom line of the image D. In step 30, s is 0
Initialized to. In step 31, it is judged whether or not this enlargement / reduction processing is finished, and if s = dny, the processing is finished,
Otherwise, the processing continues. J in step 32 is
The column number of the original image S is represented, the 0th column represents the leftmost column of the original image S, and the (snx-1) th row represents the rightmost column of the original image S. In step 32, j is set to 0. In step 33, the end of the process for generating the s-th row data of the image D is determined. If j = snx, s is incremented in step 39. Otherwise, the processes in steps 33 to 38 are performed. repeat. The processing of steps 34 to 37 is the basic processing shown in FIG. 2, the details of the processing of step 34 are shown in FIG. 5, and the processing of step 35 is the processing of steps 406 to 406 of FIG.
Equivalent to 408. 5 and 4 will be described in detail later. In step 38, j is incremented. Image D
From the 0th column of the original image S corresponding to the s-row data of (snx-
1) The s-row data of the image D is generated by continuously performing the basic processing on the reference data in the column in the X-axis direction. The process of generating the data of one row of the image D is continuously executed in the Y-axis direction from the 0th row to the (dny -1) th row of the image D, resulting in the X-axis direction. To generate an image D scaled P times and Q times in the Y-axis direction.

【0020】図3に示した処理において、ステップ35の
「8倍補間拡大処理」とステップ36の「X軸方向にP/
8倍する」処理は、X軸方向に関する処理をしているだ
けで、Y軸方向の処理には関与していない。原画像Sを
Y軸方向にQ倍に変倍する処理は、ステップ34の「画像
Dのs行に対応する参照データをメモリから読み出す」
処理と、ステップ37の「生成されたデータをメモリに書
き込む」処理との組み合せによって実現される。
In the process shown in FIG. 3, "8 times interpolation enlargement process" in step 35 and "P / X in the X-axis direction" in step 36 are performed.
The "multiply by 8" processing is only processing in the X-axis direction, and is not involved in processing in the Y-axis direction. The process of scaling the original image S by Q times in the Y-axis direction is to read the reference data corresponding to row s of the image D from the memory in step 34.
It is realized by a combination of the process and the process of “writing the generated data to the memory” in step 37.

【0021】8倍補間拡大処理は、補間処理をしながら
X軸方向に8倍に拡大されたデータを生成する処理であ
る。8倍補間拡大処理において実現されているアルゴリ
ズムは、原画像の画素間の領域をX軸方向、Y軸方向そ
れぞれ8個に分割して得られる微小領域ごとに、4個の
近傍画素データ間の一致・不一致の関係の組み合わせよ
って、4個の近傍画素データの内どの画素データを拡大
縮小後の画素データとして選択するかをあらかじめ定め
ておき、拡大縮小後の画像の画素に対応する原画像領域
における微小領域と4個の近傍画素データ間の一致・不
一致の関係の組み合わせによって、4個の近傍画素デー
タの内からあらかじめ定められた画素データを選択して
拡大縮小後の画素データとするものである。
The 8 × interpolation enlargement process is a process for generating data that is enlarged 8 × in the X-axis direction while performing the interpolation process. The algorithm implemented in the 8 × interpolation enlargement processing is such that the area between pixels of the original image is divided into four small pixel areas obtained by dividing the area between pixels of the original image into eight areas in each of the X-axis direction and the Y-axis direction. The original image area corresponding to the pixel of the image after the enlargement / reduction is set in advance by predetermining which pixel data of the four neighboring pixel data is selected as the pixel data after the enlargement / reduction according to the combination of the coincidence / disagreement relations. A predetermined pixel data is selected from the four neighboring pixel data by the combination of the matching / mismatching relationship between the small area and the four neighboring pixel data in the pixel data after scaling. is there.

【0022】以下において、8倍補間拡大処理のアルゴ
リズムについて詳しく説明する。前述したように、従来
の画像の拡大縮小における補間処理の一つの方法とし
て、拡大縮小後の画像の画素に対応する原画像における
位置を求め、その位置の周辺画素からの距離をその周辺
画素データに重み付けして、拡大縮小後の画像の画素デ
ータを生成する方法がある。しかし、この場合、距離の
演算や、重み付け演算などの膨大な演算をする必要があ
る。また、実際には8ビット/画素の画像を、カラーマ
ップテーブルを用いて、疑似的にCRTにフルカラー表
示するシステムの場合には、一旦、カラーマップテーブ
ルを参照して、拡大縮小後の画像の画素データを生成
し、さらに、新たにカラーマップテーブルを生成してC
RTに表示する必要があった。
The algorithm of the 8 × interpolation enlargement processing will be described in detail below. As described above, as one method of interpolation processing in conventional image scaling, the position in the original image corresponding to the pixel of the scaled image is determined, and the distance from that pixel to the surrounding pixel data is calculated. There is a method of generating pixel data of an image after scaling by weighting. However, in this case, it is necessary to perform enormous calculations such as distance calculation and weighting calculation. Further, in the case of a system in which an image of 8 bits / pixel is actually displayed in full color on a CRT in a pseudo manner using a color map table, the color map table is once referred to and the image after enlargement / reduction is displayed. Pixel data is generated, and a color map table is newly generated to generate C
I had to display it on the RT.

【0023】そこで、本実施例では、原画像の画素間の
領域を、仮想的に微小領域に分割して、微小領域ごと
に、4個の近傍画素データ間の一致・不一致の関係の組
み合わせよって、4個の近傍画素データの内どの画素デ
ータを拡大縮小後の画素データとして選択するかをあら
かじめ定めておき、拡大縮小後の画像の画素に対応する
原画像領域における微小領域と4個の近傍画素データ間
の一致・不一致の関係の組み合わせによって、4個の近
傍画素データの内からあらかじめ定められた画素データ
を選択して拡大縮小後の画素データとする。これによ
り、従来の距離の重み付け演算を行なう方法と類似の補
間効果を簡易的に得ることができる。特に、斜め線の拡
大時に生じる段差を、目立たなくする効果がある。ま
た、カラーマップテーブルを参照する必要がなく、また
新たにカラーマップテーブルを生成する必要もなく、単
純な論理演算だけで拡大縮小後の画素データを生成する
ことができる。
Therefore, in this embodiment, the area between the pixels of the original image is virtually divided into minute areas, and the combination of the coincidence / disagreement relationships between the four neighboring pixel data is combined for each minute area. Which pixel data of the four neighboring pixel data is selected as the pixel data after scaling is determined in advance, and a minute region in the original image region corresponding to the pixel of the image after scaling and four neighborhoods. Predetermined pixel data is selected from the four neighboring pixel data by the combination of the matching / non-matching relationship between the pixel data, and the pixel data after scaling is selected. This makes it possible to easily obtain an interpolation effect similar to the conventional method of performing weighted calculation of distance. In particular, it has an effect of making a step generated when the diagonal line is enlarged inconspicuous. Further, it is not necessary to refer to the color map table, and it is not necessary to newly generate a color map table, and the pixel data after scaling can be generated by a simple logical operation.

【0024】ここで、原画像Sを生成する場合を考え
る。原画像Sのi行j列目(i, jは”0”以上の整
数)の画素データSijは格子間隔" 1" の格子点上に存
在し、拡大縮小後の画像Dのs行t列目(s, t は”
0”以上の整数)の画素データDstも格子間隔" 1" の
格子点上に存在する。例えば、図6に示すようにX軸方
向、Y軸方向の画素数が4の矩形領域の画像を原画像S
として、X軸方向に5/4倍(P=5/4)、Y軸方向
に3/4倍(Q=3/4)して、図7に示すようにX軸
方向の画素数が5、Y軸方向の画素数が3の矩形領域の
画像Dを生成する場合、画像データS00の座標が(1/2,1
/2) となる場合の座標(0,0) の点を原点Oとして、拡大
縮小処理を行なったとすると、画像Dの画素データDst
に対応する原画像Sにおける位置は、原点Oを中心とし
て原画像Sの格子間隔をX軸方向に4/5倍(1/P
倍)、Y軸方向4/3倍(1/Q倍)した場合の格子点
の位置に相当する(図6参照)。これは、任意の大きさ
の画像を任意の倍率で拡大縮小する場合にも成り立ち、
画像Dの画素データDstに対応する原画像Sにおける位
置は、原点Oを中心として原画像Sの格子間隔をX軸方
向に1/P倍、Y軸方向に1/Q倍した場合の格子点の
位置に相当する。
Here, consider the case where the original image S is generated. The pixel data Sij at the i-th row and j-th column (i and j are integers of "0" or more) of the original image S are present on the grid points with the grid interval "1", and the s-row and t-column of the image D after scaling Eye (s, t is "
Pixel data Dst of 0 or more) also exists on the grid points with a grid interval of "1". For example, as shown in FIG. 6, an image of a rectangular area having four pixels in the X-axis direction and the Y-axis direction is displayed. Original image S
As shown in FIG. 7, the number of pixels in the X-axis direction is 5/4 (P = 5/4) and the Y-axis direction is 3/4 (Q = 3/4). , When generating an image D of a rectangular area having three pixels in the Y-axis direction, the coordinates of the image data S00 are (1 / 2,1
/ 2), the point of coordinates (0,0) is the origin O, and the scaling process is performed.
The position in the original image S corresponding to is 4/5 times the lattice spacing of the original image S in the X-axis direction (1 / P
Times), and corresponds to the position of the lattice point when the Y axis direction is multiplied by 4/3 (1 / Q times) (see FIG. 6). This also holds true when enlarging or reducing an image of any size at any magnification,
The position in the original image S corresponding to the pixel data Dst of the image D is a grid point when the grid interval of the original image S is 1 / P times in the X-axis direction and 1 / Q times in the Y-axis direction around the origin O. Corresponds to the position.

【0025】ここで図8に示すように、仮想的に、画素
間の領域をX軸方向に8分割、Y軸方向に8分割し、画
素データSijの周囲の64個の微小領域をAijmn(m=
0,1, 2, 3, 4, 5, 6, 7 ,n=0, 1, 2, 3,
4, 5, 6, 7) とすると、微小領域の行はiとmに
よって、列はjとnによって表すことができ、微小領域
をi, j, m, nによって一意的に表すことができる。
画素データDstに対応する原画像Sにおける座標が、微
小領域Aijmnに存在する場合、s, tとi, j,m, n
の間には式(1)、式(2)に示す関係式が成り立つ。
なお、(それぞれの微小領域は、左辺の領域の境界と上
辺の領域の境界を領域に含み、右辺の領域の境界と下辺
の領域の境界を領域に含まないとする。また式(1)、
式(2)の” ”はガウス記号であり、” 8s/Q ”
は”8s/Q”を越えない最大の整数を表す。 [(8t+4)/P]=8j+n ・・・(1) [(8s+4)/Q]=8i+m ・・・(2)
Here, as shown in FIG. 8, a region between pixels is virtually divided into eight in the X-axis direction and eight in the Y-axis direction, and 64 minute regions around the pixel data Sij are divided into Aijmn ( m =
0, 1, 2, 3, 4, 5, 5, 6, 7, n = 0, 1, 2, 3,
4, 5, 6, 7), the rows of the micro area can be represented by i and m, the columns can be represented by j and n, and the micro area can be uniquely represented by i, j, m, n. .
When the coordinates in the original image S corresponding to the pixel data Dst exist in the minute area Aijmn, s, t and i, j, m, n
The relational expressions shown in Expressions (1) and (2) hold between the two.
Note that (each of the small areas includes the boundary of the area on the left side and the boundary of the area on the upper side, and does not include the boundary of the area on the right side and the boundary of the area on the lower side in the area. Equation (1),
“” In equation (2) is a Gauss symbol, and “8s / Q”
Represents the maximum integer not exceeding “8s / Q”. [(8t + 4) / P] = 8j + n (1) [(8s + 4) / Q] = 8i + m (2)

【0026】本実施例の補間処理では、例えば図8にお
いて、画素データDstに対応する原画像Sにおける座標
が、微小領域Aij00, Aij01, Aij02, Aij03, Aij10,
Aij11, Aij12, Aij13, Aij20, Aij21, Aij22, A
ij23, Aij30, Aij31, Aij32, Aij33の何れかにある
場合、画素データDstは、Si-1j-1, Si-1j, Sij,S
ij-1の組合せによって、Si-1j-1, Si-1j, Sij, Sij
-1から選択される。また画素データDstに対応する原画
像Sにおける座標が、微小領域Aij04, Aij05, Aij0
6, Aij07, Aij14, Aij15, Aij16, Aij17, Aij24,
Aij25, Aij26, Aij27, Aij34, Aij35, Aij36,
Aij37の何れかにある場合、画素データDstは、Si-1
j, Si-1j+1, Sij+1, Sijの組合せによって、Si-1j,
Si-1j+1,Sij+1, Sijから選択される。さらに画素デ
ータDstに対応する原画像Sにおける座標が、微小領域
Aij44, Aij45, Aij46, Aij47, Aij54, Aij55, A
ij56, Aij57, Aij64, Aij65, Aij66, Aij67, Aij
74, Aij75, Aij76, Aij77の何れかにある場合、画素
データDstは、Sij, Sij+1, Si+1j, Si+1j+1の組合
せによって、Sij, Sij+1, Si+1j, Si+1j+1から選択
される。さらにまた画素データDstに対応する原画像S
における座標が、微小領域Aij40, Aij41, Aij42, A
ij43, Aij50, Aij51, Aij52, Aij53, Aij60, Aij
61, Aij62, Aij63, Aij70, Aij71, Aij72, Aij73
の何れかにある場合、画素データDstは、Sij-1, Si
j, Si+1j,Si+1j-1の組合せによって、Sij-1, Sij,
Si+1j,Si+1j-1から選択される。
In the interpolation processing of this embodiment, for example, in FIG. 8, the coordinates in the original image S corresponding to the pixel data Dst are the minute areas Aij00, Aij01, Aij02, Aij03, Aij10,
Aij11, Aij12, Aij13, Aij20, Aij21, Aij22, A
If any of ij23, Aij30, Aij31, Aij32, and Aij33 is present, the pixel data Dst is Si-1j-1, Si-1j, Sij, S.
Depending on the combination of ij-1, Si-1j-1, Si-1j, Sij, Sij
-1 is selected. Further, the coordinates in the original image S corresponding to the pixel data Dst are the minute areas Aij04, Aij05, Aij0.
6, Aij07, Aij14, Aij15, Aij16, Aij17, Aij24,
Aij25, Aij26, Aij27, Aij34, Aij35, Aij36,
If it is in any of Aij37, the pixel data Dst is Si-1.
By combining j, Si-1j + 1, Sij + 1, and Sij, Si-1j,
It is selected from Si-1j + 1, Sij + 1, and Sij. Further, the coordinates in the original image S corresponding to the pixel data Dst are small areas Aij44, Aij45, Aij46, Aij47, Aij54, Aij55, A.
ij56, Aij57, Aij64, Aij65, Aij66, Aij67, Aij
If the pixel data Dst is any one of 74, Aij75, Aij76, Aij77, the pixel data Dst is Sij, Sij + 1, Si + 1j, Si + by a combination of Sij, Sij + 1, Si + 1j, Si + 1j + 1. Selected from 1j + 1. Furthermore, the original image S corresponding to the pixel data Dst
The coordinates at are minute areas Aij40, Aij41, Aij42, A
ij43, Aij50, Aij51, Aij52, Aij53, Aij60, Aij
61, Aij62, Aij63, Aij70, Aij71, Aij72, Aij73
Pixel data Dst is Sij-1, Si
By combining j, Si + 1j, and Si + 1j-1, Sij-1, Sij,
It is selected from Si + 1j and Si + 1j-1.

【0027】また、図9において、画素データDstに対
応する原画像Sにおける座標が画素データSij, Sij+
1, Si+1j, Si+1j+1の画素間領域の64個の微小領域
の中に存在する場合、同様に、画素データSij, Sij+
1, Si+1j, Si+1j+1間の一致・不一致の関係の組合せ
と、Sij, Sij+1, Si+1j, Si+1j+1の画素間領域にお
ける微小領域の相対的な位置によって、画素データDst
は、Sij, Sij+1, Si+1j,Si+1j+1の中から選択され
る。
Further, in FIG. 9, the coordinates in the original image S corresponding to the pixel data Dst are the pixel data Sij, Sij +.
In the case where it exists in 64 minute regions of the inter-pixel region of 1, Si + 1j, Si + 1j + 1, similarly, the pixel data Sij, Sij +
Depending on the combination of the matching / non-matching relationship between 1, Si + 1j, Si + 1j + 1 and the relative position of the minute area in the inter-pixel area of Sij, Sij + 1, Si + 1j, Si + 1j + 1 , Pixel data Dst
Is selected from Sij, Sij + 1, Si + 1j, Si + 1j + 1.

【0028】4個の画素データSij, Sij+1, Si+1j,
Si+1j+1間の一致・不一致の関係を数値によって表すた
めに、関数C(Sij, Sij+1, Si+1j, Si+1j+1)を式
(3)に示すように定義する。 C(Sij, Sij;+1, Si+1j, Si+1j+1 )= 2 5 δ(Sij, Si+1j) +2 4 δ(Sij+1, Si+1j+1) +2 3 δ(Sij, Sij+1) +2 2 δ(Si+1j, Si+1j+1) +2 1 δ(Sij, Si+1j+1) +2 0 δ(Sij+1, Si+1j)・・・(3)
Four pixel data Sij, Sij + 1, Si + 1j,
The function C (Sij, Sij + 1, Si + 1j, Si + 1j + 1) is defined as shown in Expression (3) in order to represent the agreement / disagreement relationship between Si + 1j + 1 by a numerical value. C (Sij, Sij; +1, Si + 1j, Si + 1j + 1) = 2 5 δ (Sij, Si + 1j) +2 4 δ (Sij + 1, Si + 1j + 1) +2 3 δ ( Sij, Sij + 1) +2 2 δ (Si + 1j, Si + 1j + 1) +2 1 δ (Sij, Si + 1j + 1) +2 0 δ (Sij + 1, Si + 1j) ... (3)

【0029】ここで、δ( U, V) は、式(4)示すよ
うに、画素データU, Vのビット列が完全に一致してい
る場合に1となり、それ以外の場合は0となる関数であ
る。 δ(U,V)= 1(U=V) 0(U≠V) ・・・・(4)
Here, δ (U, V) is 1 when the bit strings of the pixel data U and V completely match as shown in the equation (4), and is 0 otherwise. Is. δ (U, V) = 1 (U = V) 0 (U ≠ V) (4)

【0030】この関数C(Sij, Sij+1, Si+1j, Si+
1j+1)の数値によって、4個の画素データSij, Sij+
1, Si+1j, Si+1j+1間の一致・不一致の関係の組合せ
は一意的に定まる。画素データSij, Sij+1, Si+1j,
Si+1j+1間の一致・不一致の関係には、15通りの組合
せがあり、したがって、関数C(Sij, Sij+1, Si+1
j,Si+1j+1)は、15通りの値を取り得る。C(Sij,
Sij+1, Si+1j, Si+1j+1)の値と、微小領域ごとの
選択される画素データとの関係を図11〜図25に示
す。図11〜図25において、微小領域の位置に示され
た原画像Sの画素データが、Dstとして選択される画素
データである。また、関数Cの値は、2進数で表してい
る。
This function C (Sij, Sij + 1, Si + 1j, Si +
1j + 1), four pixel data Sij, Sij +
The combination of the coincidence / disagreement relationships among 1, Si + 1j, and Si + 1j + 1 is uniquely determined. Pixel data Sij, Sij + 1, Si + 1j,
There are 15 combinations of agreement / disagreement relationships between Si + 1j + 1. Therefore, the function C (Sij, Sij + 1, Si + 1
j, Si + 1j + 1) can take 15 different values. C (Sij,
11 to 25 show the relationship between the values of (Sij + 1, Si + 1j, Si + 1j + 1) and the pixel data selected for each micro area. 11 to 25, the pixel data of the original image S shown in the position of the minute area is the pixel data selected as Dst. The value of the function C is represented by a binary number.

【0031】ここで、P=8の場合を考えると、図10
に示すとおり、画素データDstに対応する原画像Sにお
ける位置は、原点を点OとするX軸方向の間隔が1/
8、Y軸方向の間隔が1/Qの格子点の位置に相当し、
その格子点が微小領域Aijmnに存在する場合、関係式
(1)から次の関係式(5)が成り立つ。 t=8j+n ・・・(5)
Here, considering the case of P = 8, FIG.
As shown in, the position in the original image S corresponding to the pixel data Dst has an interval of 1 / X in the X-axis direction with the origin as the point O.
8, the distance in the Y-axis direction corresponds to the position of the 1 / Q grid point,
When the lattice point exists in the minute area Aijmn, the following relational expression (5) is established from the relational expression (1). t = 8j + n (5)

【0032】この時、画素データDs8j,Ds8j+1,Ds8j+
2,Ds8j+3,Ds8j+4,Ds8j+5,Ds8j+6,Ds8j+7 に対応す
る原画像Sにおける座標は、それぞれ微小領域Aijm0,
Aijm1, Aijm2, Aijm3, Aijm4, Aijm5, Aijm6, A
ijm7に存在する。つまり、X軸方向に8倍、Y軸方向に
Q倍した場合の画像の隣合う同一行の画素に関して、対
応する微小領域は重複することは無く、1対1に対応
し、しかもそれは隣り合う同一行の微小領域である。こ
のことから、逆にX軸方向に8倍、Y軸方向にQ倍した
場合の画素Ds8j+n に対応する原画像領域の微小領域の
行が求まれば、対応する微小領域Aijmnが求まる。
At this time, the pixel data Ds8j, Ds8j + 1, Ds8j +
The coordinates in the original image S corresponding to 2, Ds8j + 3, Ds8j + 4, Ds8j + 5, Ds8j + 6, Ds8j + 7 are the minute areas Aijm0,
Aijm1, Aijm2, Aijm3, Aijm4, Aijm5, Aijm6, A
It exists in ijm7. That is, with respect to the pixels in the same row that are adjacent to each other in the image when multiplied by 8 in the X-axis direction and Q-fold in the Y-axis direction, the corresponding minute regions do not overlap and correspond to each other in a one-to-one correspondence, and they are adjacent to each other. It is a minute area in the same row. From this, conversely, if the row of the minute area of the original image area corresponding to the pixel Ds8j + n in the case of 8 times in the X axis direction and Q times in the Y axis direction is obtained, the corresponding minute area Aijmn can be obtained.

【0033】同様にして、画素データDs8j+4,Ds8j+5,
Ds8j+6,Ds8j+7,Ds8(j+1),Ds8(j+1)+1, Ds8(j+1)+
2,Ds8(j+1)+3に対応する原画像Sにおける座標は、そ
れぞれ微小領域Aijm4,Aijm5, Aijm6, Aijm7, Ai(j
+1)m0, Ai(j+1)m1, Ai(j+1)m2, Ai(j+1)m3に存在
し、画素データDs8j+4,Ds8j+5,Ds8j+6,Ds8j+7,Ds8
(j+1), Ds8(j+1)+1,Ds8(j+1)+2,Ds8(j+1)+3 は、対
応する微小領域の近傍4画素Sij, Sij+1, Si+1j, S
i+1j+1( (8s + 4)/Q - 8i ≧ 4 の場合) (またはS
i-1j, Si-1j+1, Sij, Sij+1( (8s + 4)/Q - 8i <
4 の場合) )間の一致・不一致の関係の組合せによっ
て、図11〜図25に示したC(Sij, Sij+1, Si+1
j, Si+1j+1)( (8s + 4)/Q - 8i ≧ 4 の場合)
(またはC(Si-1j, Si-1j+1, Sij, Sij+1)( (8s
+ 4)/Q - 8i < 4 の場合) )の値と、微小領域ごと
の選択される画素データとの関係から求めることができ
る。
Similarly, pixel data Ds8j + 4, Ds8j + 5,
Ds8j + 6, Ds8j + 7, Ds8 (j + 1), Ds8 (j + 1) +1, Ds8 (j + 1) +
The coordinates in the original image S corresponding to 2, Ds8 (j + 1) +3 are minute areas Aijm4, Aijm5, Aijm6, Aijm7, Ai (j
+1) m0, Ai (j + 1) m1, Ai (j + 1) m2, Ai (j + 1) m3, and pixel data Ds8j + 4, Ds8j + 5, Ds8j + 6, Ds8j + 7, Ds8
(j + 1), Ds8 (j + 1) +1, Ds8 (j + 1) +2, Ds8 (j + 1) +3 are four pixels Sij, Sij + 1, Si + in the vicinity of the corresponding minute area. 1j, S
i + 1j + 1 (when (8s + 4) / Q-8i ≥ 4) (or S
i-1j, Si-1j + 1, Sij, Sij + 1 ((8s + 4) / Q-8i <
In the case of 4)), the C (Sij, Sij + 1, Si + 1) shown in FIGS.
j, Si + 1j + 1) (when (8s + 4) / Q-8i ≥ 4)
(Or C (Si-1j, Si-1j + 1, Sij, Sij + 1) ((8s
+ 4) / Q-8i <4))) and the pixel data selected for each micro area can be obtained.

【0034】したがって、図11〜図25を、拡大縮小
後の画素として選択される画素の4画素間における相対
的な識別情報を要素とする8×8のサイズの15個のテ
ーブルに変換し、テーブルはC(Sij, Sij+1, Si+1
j, Si+1j+1)の値によって選択され、さらに、微小領
域の行番号mによってテーブルの1行(8要素)の情報
が選択され、その情報をもとにSij, Sij+1, Si+1j,
Si+1j+1の中から画素データを選択する手段を設けるこ
とにより、容易にX軸方向に8倍、Y軸方向にQ倍した
場合の画素データDs8j+n を生成することができる。こ
の場合、式(2)の関係から微小領域の行を表すiとm
を求め、C(Sij, Sij+1, Si+1j, Si+1j+1)の値を
求めるだけで、Ds8j+4,Ds8j+5,Ds8j+6,Ds8j+7,Ds8
(j+1),Ds8(j+1)+1,Ds8(j+1)+2,Ds8(j+1)+3 の8画素
のデータを生成することができる。また、X軸方向に8
倍、Y軸方向にQ倍した場合の画像Dのs行目の画素デ
ータをX軸方向に連続して生成する場合、微小領域の行
を表すiとmの算出は最初に1回するだけで良く、関数
Cの値をC(Sij, Sij+1, Si+1j, Si+1j+1)、C
(Sij+1, Sij+2, Si+1j+1, Si+1j+2)、C(Sij+
2, Sij+3, Si+1j+2, Si+1j+3)、... と算出してい
くだけで、8画素ずつ連続して生成することができる。
つまり、X軸方向に8倍、Y軸方向にQ倍した場合の画
像Dの第s行目の1行の画素データを生成する処理にお
いては、原画像Sのi 行と(i - 1) 行の0列目から(snx
-1)列目の画素データに対して、X軸方向に連続して関
数Cの値を算出することによって(m=0, 1, 2, 3
の場合、iとmは式(2)の関係式を満たす。)、また
は、原画像Sのi 行と(i + 1) 行の0列目から(snx -1)
列目の画素データに対して、X軸方向に連続して関数C
の値を算出することによって(m=0, 1, 2, 3の場
合、iとmは式(2)の関係式を満たす。)、画像Dの
第s行目のデータを生成することできる。以上のように
して、補間処理をしながらX軸方向に8倍に拡大された
データを生成する8倍補間処理が実現される。
Therefore, FIG. 11 to FIG. 25 are converted into 15 tables of 8 × 8 size which have the relative identification information among the four pixels of the pixels selected as the scaled pixels, The table is C (Sij, Sij + 1, Si + 1
j, Si + 1j + 1), and the information of one row (8 elements) of the table is selected by the row number m of the minute area. Based on this information, Sij, Sij + 1, Si + 1j,
By providing means for selecting pixel data from Si + 1j + 1, it is possible to easily generate pixel data Ds8j + n when multiplied by 8 in the X-axis direction and Q times in the Y-axis direction. In this case, i and m representing the row of the minute area are expressed from the relationship of the equation (2).
Ds8j + 4, Ds8j + 5, Ds8j + 6, Ds8j + 7, Ds8
Eight pixel data of (j + 1), Ds8 (j + 1) +1, Ds8 (j + 1) +2, Ds8 (j + 1) +3 can be generated. Also, 8 in the X-axis direction
When the pixel data of the sth row of the image D is doubled in the X-axis direction when multiplied by Q and Q times in the Y-axis direction, i and m representing the row of the micro area are first calculated only once. And the value of the function C is C (Sij, Sij + 1, Si + 1j, Si + 1j + 1), C
(Sij + 1, Sij + 2, Si + 1j + 1, Si + 1j + 2), C (Sij +
2, Sij + 3, Si + 1j + 2, Si + 1j + 3), ..., It is possible to continuously generate every eight pixels.
That is, in the process of generating the pixel data of the 1st row of the sth row of the image D when it is multiplied by 8 in the X-axis direction and Q times in the Y-axis direction, the i row of the original image S and (i-1) From the 0th column of the row (snx
-1) By calculating the value of the function C continuously in the X-axis direction with respect to the pixel data of the column (m = 0, 1, 2, 3
In the case of, i and m satisfy the relational expression of Expression (2). ), Or (snx -1) from the 0th column of the i row and (i + 1) row of the original image S
A function C is continuously applied to the pixel data of the column in the X-axis direction.
The data of the s-th row of the image D can be generated by calculating the value of (when m = 0, 1, 2, 3, i and m satisfy the relational expression of Expression (2)). . As described above, the 8-times interpolation processing for generating the data that has been expanded 8 times in the X-axis direction while performing the interpolation processing is realized.

【0035】また、本実施例の8倍補間拡大処理のアル
ゴリズムでは、拡大縮小後の画像の画素に対応する原画
像における位置の近傍の4画素のデータを参照データと
する。したがって、例えば、図7の画素D14を生成する
場合には、図6の点Aの近傍の4画素、つまり、原画像
の領域外の画素を参照する必要がある。画像データが指
定された原画像の領域外においても、連続的に存在する
場合には問題ないが、画像データが連続的に存在しない
場合には、点Aの近傍の4画素をそのまま参照データに
することはできない。そこで、本実施例では、図7の画
素D14を生成する場合、点Aの近傍の原画像の領域内の
画素S13, S23のそれぞれの右側の領域外に、仮想的に
S13と同じ画素データ、S23と同じ画素データがそれぞ
れ存在するとして、8倍補間拡大処理を行なう。本実施
例では、同様の原画像境界における処理を、原画像の領
域の右端、左端、上端、下端の境界において行なう。図
26に示す4画素×4画素の画像データが原画像である
場合、拡大縮小後の画像の画素に対応する位置が、図2
6の斜線の部分に存在する時、図27に示すように、仮
想的に原画像の領域内の境界の画素データと同じ画素デ
ータが領域外に存在するとして、8倍補間拡大処理を行
なう。X軸方向の画素数がsnx 、Y軸方向の画素数がsn
y の矩形の画像(snx,snyは1以上の整数) が原画像Sで
ある場合、前記の原画像境界における処理は、対応する
原画像Sにおける位置が、次の〜の4つの条件のい
ずれかを満たす微小領域Aijmnに存在する拡大縮小後の
画像の画素を生成する場合に行なう。i=0且つm=
0, 1, 2, 3の場合、i=(sny - 1) 且つm=
4, 5, 6, 7の場合、j=0且つn=0, 1, 2,
3の場合、j=(snx - 1) 且つn=4, 5, 6, 7の
場合である。したがって、8倍補間拡大処理の1行の画
素データを生成する処理において、処理の最初の関数C
の算出で、の条件が成り立ち、C(Si-1 0,Si-1 0,
Si0, Si0)(m=0,1, 2,3の場合)、またはC
(Si0, Si0, Si+1 0,Si+1 0 )(m=4, 5, 6,
7の場合)を算出し、8倍補間拡大処理後の画像の4画
素DS0, S1 , S2, S3を生成し、また最後の関数C
の算出で、の条件が成り立ち、C(Si-1 snx-1, S
i-1 snx-1,Si snx-1,Si snx-1 )(m=0, 1, 2,
3の場合),またはC(Si snx-1,Si snx-1,Si+1 sn
x-1,Si+1 snx-1 )(m=4,5,6,7の場合)を算
出し、8倍補間拡大処理後の画像の4画素DS 8snx-4,
S 8snx-3, S 8snx-2, S 8snx-1を生成する。ま
たはの条件が成り立つ行のデータを生成する場合に
は、原画像Sのi行目のデータを参照データとして2回
ずつリードして、C (Sij, Sij+1, Sij, Sij+1)
を算出して、領域内の境界の画素データと同じ画素デー
タが領域外に存在するとした場合と同様の結果を得る。
Further, in the algorithm of the 8-fold interpolation enlargement processing of this embodiment, the data of 4 pixels near the position in the original image corresponding to the pixels of the image after enlargement / reduction is used as the reference data. Therefore, for example, when the pixel D14 of FIG. 7 is generated, it is necessary to refer to the four pixels near the point A of FIG. 6, that is, the pixels outside the area of the original image. There is no problem if the image data continuously exists even outside the specified original image area, but if the image data does not continuously exist, the four pixels near the point A are directly used as the reference data. You cannot do it. Therefore, in the present embodiment, when the pixel D14 of FIG. 7 is generated, virtually the same pixel data as S13 is generated outside the area on the right side of each of the pixels S13 and S23 in the area of the original image near the point A, Assuming that the same pixel data as in S23 exists, the 8-fold interpolation enlargement processing is performed. In this embodiment, similar processing at the boundary of the original image is performed at the boundaries of the right edge, the left edge, the upper edge and the lower edge of the original image area. When the image data of 4 pixels × 4 pixels shown in FIG. 26 is the original image, the position corresponding to the pixel of the image after scaling is shown in FIG.
When it exists in the shaded area of 6, as shown in FIG. 27, assuming that the same pixel data as the boundary pixel data in the area of the original image exists outside the area, the 8-fold interpolation enlargement processing is performed. The number of pixels in the X-axis direction is snx, and the number of pixels in the Y-axis direction is sn
When the rectangular image of y (snx, sny is an integer equal to or greater than 1) is the original image S, the processing at the original image boundary is such that the position in the corresponding original image S is one of the following four conditions. This is performed when the pixels of the enlarged / reduced image existing in the minute area Aijmn satisfying the above are generated. i = 0 and m =
In the case of 0, 1, 2, 3 i = (sny-1) and m =
In the case of 4, 5, 6, and 7, j = 0 and n = 0, 1, 2,
The case of 3 is the case of j = (snx-1) and n = 4,5,6,7. Therefore, in the process of generating one row of pixel data in the 8 × interpolation enlargement process, the first function C
In the calculation of, the condition of is satisfied, and C (Si-1 0, Si-1 0,
Si0, Si0) (when m = 0, 1, 2, 3), or C
(Si0, Si0, Si + 1 0, Si + 1 0) (m = 4, 5, 6,
7) is calculated to generate 4 pixels D S0, D S1 , D S2, D S3 of the image after the 8 × interpolation enlargement process, and the final function C
In the calculation of, the condition of is satisfied, and C (Si-1 snx-1, S
i-1 snx-1, Si snx-1, Si snx-1) (m = 0, 1, 2,
3) or C (Si snx-1, Si snx-1, Si + 1 sn
x-1, Si + 1 snx-1) (when m = 4,5,6,7) is calculated, and the four pixels D S 8snx-4, of the image after the 8 × interpolation enlargement processing are calculated .
D S 8snx-3, D S 8snx-2, and D S 8snx-1 are generated. When the data of the row satisfying the condition of or is generated, the data of the i-th row of the original image S is read twice as reference data, and C (Sij, Sij + 1, Sij, Sij + 1) is read.
Is calculated to obtain the same result as the case where the same pixel data as the boundary pixel data in the area exists outside the area.

【0036】以上の説明から、図3のフローチャートを
もっと正確に記述すると、図4に示すようになる。原画
像SをX軸方向にP倍、Y軸方向にQ倍に拡大縮小処理
して画像Dを生成する場合、本実施例は、図4のフロー
チャートに示す手順にしたがって、MPU1が画像デー
タを処理する。図4のフローチャートでは、図3のステ
ップ35の「8倍補間拡大処理」がステップ406 〜408 の
3つの処理に展開され、ステップ34の「画像Dのs行に
対応する参照データをメモリ読み出す」処理が、ステッ
プ402 の「iとmの算出する」処理とステップ405 の
「参照データをメモリから読み出す」処理の2つ処理に
分離され、ステップ 402は、画像Dの1行のデータを生
成する時に、最初に1回だけ行なう処理として、画像D
のs行のデータを生成するステップ404 〜411 のループ
の外に出る。
From the above description, the flowchart of FIG. 3 can be described more accurately as shown in FIG. When the original image S is enlarged P times in the X-axis direction and enlarged Q times in the Y-axis direction to generate the image D, the MPU 1 according to the present embodiment follows the procedure shown in the flowchart of FIG. To process. In the flowchart of FIG. 4, the “8 times interpolation enlargement process” of step 35 of FIG. 3 is expanded to the three processes of steps 406 to 408, and “reference data corresponding to row s of image D is read out from memory” of step 34. The process is divided into two processes, that is, “calculate i and m” in step 402 and “read reference data from memory” in step 405. In step 402, data for one line of image D is generated. Occasionally, the image D
To exit the loop of steps 404-411 which generate s rows of data.

【0037】図4において、ステップ400 で画像Dの行
番号sが0に初期設定され、ステップ401 で、この拡大
縮小処理の終了判定が行なわれる。s= dny の場合に処
理を終了し、それ以外の場合は処理を続行する。ステッ
プ402 で関係式(2)にもとづいて、画像Dのs行に対
応する原画像Sにおける微小領域行を表すiとmが求め
られ、ステップ403 でjが0に設定される。ステップ40
4 で、画像Dのs行目のデータの生成の終了判定が行な
われ、画像Dのs行(dnx - 1) 行目の画素が生成される
と、ステップ412 でsをインクリメントし、それ以外の
場合は、ステップ404 〜411 の処理を繰り返す。ステッ
プ405 でステップ402 において算出されたiとmにもと
づいて参照データが読み出され、ステップ406 でその4
画素間の一致・不一致の関係が調べられる。実際には、
式(3)の関数Cの値が、画素どうしの比較を逐次に行
なうことによって求められる。ステップ407 でmと関数
Cの値にもとづいて、図11〜図25の関数Cの値と微
小領域ごとに選択される画素データとの関係を表すテー
ブルが参照され、選択される画素の相対的な識別情報が
得られる。ステップ408 で4画素間の相対的な識別情報
にもとづいてデータが選択され、8倍補間拡大処理され
たデータに相当する8画素のデータが生成される。(原
画像境界における処理をする場合は、8倍補間拡大処理
されたデータに相当する4画素のデータが生成され
る。)ステップ409 で8倍補間拡大処理されたデータ
は、X軸方向にP/8倍され、ステップ410 でメモリに
書き込まれる。ステップ404 〜411 の処理は、画像Dの
s行のデータの生成を0列目のデータから(dnx - 1) 列
目のデータを生成するまで繰り返す。この画像Dの1行
のデータを生成する処理は、画像Dの0行目から(dny -
1) 行目に対して、Y軸方向に連続して実行され、結果
として、X軸方向にP倍、Y軸方向にQ倍に拡大縮小さ
れ、しかも補間処理された画像Dが生成される。ステッ
プ404 〜411 のループの最初と最後の8倍補間拡大処理
では、原画像境界における処理が行なわれ、ループの最
初の関数Cの算出では、C(Si-1 0,Si-1 0,Si0, S
i0)(m=0, 1,2, 3の場合)、またはC(Si0,
Si0, Si+1 0,Si+1 0 )(m=4, 5,6, 7の場
合)を算出され、ループの最後の関数Cの算出では、ま
た最後の関数Cの算出では、C(Si-1 snx-1,Si-1 sn
x-1,Si snx-1,Si snx-1 )(m=0,1, 2, 3の場
合)、またはC(Si snx-1,Si snx-1,Si+1 snx-1,S
i+1 snx-1 )(m=4, 5, 6, 7の場合)が算出さ
れ、それぞれ、8倍補間拡大処理されたデータに相当す
る4画素のデータが生成される。
In FIG. 4, in step 400, the line number s of the image D is initialized to 0, and in step 401, it is judged whether or not the enlarging / reducing process is finished. If s = dny, the process ends, otherwise, the process continues. In step 402, i and m representing a minute region row in the original image S corresponding to the s row of the image D are obtained based on the relational expression (2), and j is set to 0 in step 403. Step 40
In step 4, it is judged whether the generation of the data of the s-th row of the image D has ended, and when the pixel of the s-th row (dnx -1) -th row of the image D is generated, s is incremented in step 412, and otherwise In the case of, the processing of steps 404 to 411 is repeated. In step 405, the reference data is read out based on i and m calculated in step 402, and in step 406, the reference data is read out.
A match / mismatch relationship between pixels is examined. actually,
The value of the function C in Expression (3) is obtained by sequentially comparing pixels. In step 407, based on m and the value of the function C, the table showing the relationship between the value of the function C of FIGS. 11 to 25 and the pixel data selected for each minute area is referred to, and the relative pixel selection is performed. Identification information can be obtained. In step 408, the data is selected based on the relative identification information among the four pixels, and eight-pixel data corresponding to the data subjected to the eightfold interpolation enlargement processing is generated. (When processing is performed at the boundary of the original image, 4-pixel data corresponding to the data subjected to the 8 × interpolation / enlargement processing is generated.) The data subjected to the 8 × interpolation / enlargement processing in step 409 is P in the X-axis direction. It is multiplied by / 8 and written to memory in step 410. The processing of steps 404 to 411 is repeated until the data of the sth row of the image D is generated from the data of the 0th column to the data of the (dnx-1) th column. The process of generating the data of one line of the image D starts from the 0th line of the image D by (dny-
1) It is executed continuously for the line Y in the Y-axis direction, and as a result, an image D that is P-scaled in the X-axis direction and Q-scaled in the Y-axis direction and is interpolated is generated. . In the 8th and 8th interpolation enlargement processing at the beginning and the end of the loop of steps 404 to 411, processing at the original image boundary is performed, and at the calculation of the first function C of the loop, C (Si-1 0, Si-1 0, Si0 , S
i0) (when m = 0, 1, 2, 3) or C (Si0,
S i0, S i + 1 0, S i + 1 0) (when m = 4, 5, 6, 7) is calculated, and C (in the calculation of the last function C in the loop and in the calculation of the last function C is Si-1 snx-1, Si-1 sn
x-1, Si snx-1, Si snx-1) (when m = 0, 1, 2, 3) or C (Si snx-1, Si snx-1, Si + 1 snx-1, S)
i + 1 snx-1) (in the case of m = 4, 5, 6, 7) is calculated, and data of 4 pixels corresponding to the data subjected to the 8-fold interpolation enlargement processing is generated.

【0038】図4において、ステップ409 の「X軸方向
にP/8倍する」処理では、P/8<1の場合には、倍
率P/8にもとづいて、画素の間引き処理が行なわれ、
P/8>1の場合には、倍率P/8にもとづいて、画素
データがコピーされる。また、P/8=1の場合には、
何も処理は行なわれない。また、ステップ405 の「参照
データをメモリから読み出す」処理では、ステップ402
の「iとmの算出する」処理で求められたiとmの値に
もとづいて参照データの読み出しが行なわれる。ステッ
プ405 の「参照データをメモリから読み出す」処理の更
に詳しい手順を図5に示す。
In FIG. 4, in the "multiply by P / 8 in the X-axis direction" process of step 409, when P / 8 <1, the pixel thinning process is performed based on the magnification P / 8.
When P / 8> 1, the pixel data is copied based on the magnification P / 8. When P / 8 = 1,
No processing is done. In addition, in the “read reference data from memory” process in step 405, step 402
The reference data is read out based on the values of i and m obtained by the "calculate i and m" process. FIG. 5 shows a more detailed procedure of the “read reference data from memory” process of step 405.

【0039】図5において、ステップ50と51とで原画像
境界における処理をするか否かの判定をし、原画像境界
における処理をする場合には、ステップ57と58とでi行
j列目の画素データを2回読み出し、原画像境界におけ
る処理をしない場合には、ステップ52でmの値の判定を
行ない、m<4の場合(m=0, 1, 2, 3の場合)に
は、ステップ53と54とでそれぞれi行j列目とi- 1行
j列目の画素データを読み出し、m≧4の場合(m=
4, 5, 6, 7の場合)には、ステップ55と56でそれぞ
れi行j列目とi+ 1行j列目の画素データを読み出
す。したがって、m=0, 1,2, 3の場合には、原画
像Sのi行目と( i- 1) 行目のデータを読み出され
(iは、(数2)を満足する)、m=4, 5, 6, 7の
場合には、原画像Sのi行目と( i+ 1) 行目のデータ
が読み出される。ただし、i=0且つm=0, 1,2,
3の場合とi=(sny - 1) 且つm=4, 5, 6, 7の場
合には、原画像境界における処理を行ない、原画像Sの
i行目のデータが2回ずつ読み出される。
In FIG. 5, it is determined in steps 50 and 51 whether or not the processing at the original image boundary is to be performed. When the pixel data of is read twice and the processing at the boundary of the original image is not performed, the value of m is determined in step 52, and when m <4 (when m = 0, 1, 2, 3), , Steps 53 and 54 read the pixel data of the i-th row and the j-th column and the i-1 row and the j-th column, respectively, and when m ≧ 4 (m =
In the case of 4, 5, 6, and 7), the pixel data of the i-th row and the j-th column and the i + 1-th row and the j-th column are read in steps 55 and 56, respectively. Therefore, when m = 0, 1, 2, 3, the data of the i-th row and the (i-1) -th row of the original image S are read out (i satisfies (Equation 2)), In the case of m = 4,5,6,7, the data of the i-th row and the (i + 1) -th row of the original image S are read. However, i = 0 and m = 0, 1, 2,
In the case of 3 and i = (sny-1) and m = 4, 5, 6, and 7, the processing at the original image boundary is performed and the data of the i-th row of the original image S is read twice.

【0040】(実施例2)本発明の実施例2は、実施例
1の図4におけるステップ406 の「4画素間の一致・不
一致の関係を調べる」処理を、最適化された手順を用い
て行なうようにしたものであり、画像処理装置の構成自
体は図1に示した実施例と同じである。したがって、こ
こでは図4におけるステップ406 についてのみ以下に説
明する。
(Embodiment 2) The embodiment 2 of the present invention uses the optimized procedure for the "check for matching / non-matching relationship between four pixels" process of step 406 in FIG. 4 of the embodiment 1. The configuration itself of the image processing apparatus is the same as that of the embodiment shown in FIG. Therefore, only step 406 in FIG. 4 will be described below.

【0041】本実施例では、ステップ406 の「4画素間
の一致・不一致の関係を調べる」処理を、最適化された
手順を用いて行なうことにより、さらに高速な処理を実
現する。「4画素間の一致・不一致の関係を調べる」処
理、つまり関数Cの値を求める処理は、定義式(3)の
通りに画素どうしの比較を逐次に行なうことによって求
めることができる。例えば、図28の位置関係にある4
画素S0,S1,S2,S3の画素間の一致・不一致の関係を
調べる場合、C(S0,S1,S2,S3 )の値は、図29に
示す手順で求めることができる。
In the present embodiment, the process of "inspecting the matching / non-matching relationship between the four pixels" in step 406 is performed using an optimized procedure, thereby realizing a higher speed process. The process of “checking the matching / non-matching relationship between four pixels”, that is, the process of finding the value of the function C can be found by sequentially comparing pixels as defined by the definition formula (3). For example, 4 in the positional relationship of FIG.
When checking the coincidence / non-coincidence relationship between the pixels S0, S1, S2, S3, the value of C (S0, S1, S2, S3) can be obtained by the procedure shown in FIG.

【0042】図29において、ステップ2900でCに0を
設定し、ステップ2901で画素S0 と画素S2 を比較し
て、S0 =S2 の場合のみ、ステップ2902でCに25
加算する。さらに、ステップ2903で画素S1 と画素S3
を比較して、S1 =S3 の場合のみ、ステップ2904でC
に24 を加算し、ステップ2905で画素S0 と画素S1 を
比較して、S0 =S1 の場合のみ、ステップ2906でCに
3 を加算する。ステップ2907で画素S2 と画素S3 を
比較して、S2 =S3 の場合のみ、ステップ2908でCに
2 を加算し、ステップ2909で画素S0 と画素S3 を比
較して、S0 =S3 場合のみ、ステップ2910でCに21
を加算する。そして、ステップ2911で画素S1 と画素S
2 を比較して、S1 =S2 の場合のみ、ステップ2912で
Cに20 を加算して、C(S0,S1,S2,S3 )の算出を
終了する。ここで、図29の手順にしたがって、C(S
0,S1,S2,S3 )を算出する場合、4画素S0,S1,S2,
S3の値によって、冗長な処理を行なう場合がある。つ
まり、4画素S0,S1,S2,S3 の値によって、図29の
ステップ2900〜2912の手順を完全に実行しなくても、C
(S0,S1,S2,S3 )の値が求まる場合がある。例え
ば、S0=S1=S2=S3 の場合、ステップ2901,2903,2905
の画素どうしの比較をした時点で、それぞれS0=S2,S
1=S3,S0=S1 であることが判明しており、S0=S1=S
2=S3 であることが明らかになっている。したがって、
この場合には、ステップ2912の手順を実行する前に、C
(S0,S1,S2,S3 )=111111(2進数表現)で
あることが判明する。また、画素データS0,S1,S2,S
3 が互いに異なる場合には、ステップ2900〜2911の手順
をふまなければならない。そこで、本実施例では、「4
画素間の一致・不一致の関係を調べる」処理、つまり関
数Cの値を求める処理を、図30に示す手順を基本手順
として行なう。
In FIG. 29, 0 is set in C in step 2900, pixel S0 and pixel S2 are compared in step 2901, and 2 5 is added to C in step 2902 only when S0 = S2. Further, in step 2903, pixel S1 and pixel S3 are
Are compared, and only when S1 = S3, C in step 2904
Is added with 2 4 and the pixel S0 is compared with the pixel S1 in step 2905, and 2 3 is added to C in step 2906 only when S0 = S1. In step 2907, the pixel S2 is compared with the pixel S3. Only when S2 = S3, 2 2 is added to C in step 2908. In step 2909, the pixel S0 is compared with the pixel S3. Only when S0 = S3, 2 1 to C in step 2910
Is added. Then, in step 2911, pixel S1 and pixel S
Compared to 2, only if S1 = S2, by adding 2 0 to C in step 2912, and terminates the calculation of C (S0, S1, S2, S3). Here, according to the procedure of FIG. 29, C (S
0, S1, S2, S3), four pixels S0, S1, S2,
Depending on the value of S3, redundant processing may be performed. That is, even if the procedure of steps 2900 to 2912 in FIG. 29 is not completely executed by the values of the four pixels S0, S1, S2, and S3, C
The value of (S0, S1, S2, S3) may be obtained. For example, when S0 = S1 = S2 = S3, steps 2901, 2903, 2905
When the pixels are compared, S0 = S2, S
It is known that 1 = S3, S0 = S1, and S0 = S1 = S
It is clear that 2 = S3. Therefore,
In this case, before performing the procedure of step 2912, C
It is found that (S0, S1, S2, S3) = 111111 (binary expression). Also, the pixel data S0, S1, S2, S
If 3 are different from each other, then steps 2900 to 2911 must be followed. Therefore, in this embodiment, “4
The process of “checking the matching / non-matching relationship between pixels”, that is, the process of obtaining the value of the function C is performed with the procedure shown in FIG. 30 as a basic procedure.

【0043】図30において、ステップ3000で画素S0
と画素S2 を比較して、S0 =S2の場合は3001の手順
へ、S0 ≠S2 の場合はステップ3010の手順へ進む。ス
テップ3001では、画素S0 と画素S1 を比較し、S0 =
S1 の場合はステップ3002の手順へ、S0 ≠S1 の場合
はステップ3005の手順へ進む。ステップ3002では、画素
S2 と画素S3 を比較して、S2 =S3 の場合はステッ
プ3003でC(S0,S1,S2,S3 )=111111(2進
数表現)を設定して処理を終了し、S2 ≠S3の場合は
ステップ3004でC(S0,S1,S2,S3 )=101001
(2進数表現)を設定して処理を終了する。ステップ30
05では、画素S2 と画素S3 を比較して、S2 =S3 の
場合はステップ3006でC(S0,S1,S2,S3 )=100
110(2進数表現)を設定して処理を終了し、S2 ≠
S3 の場合はステップ3007の手順へ進む。ステップ3007
では、画素S1 と画素S3 を比較して、S1 =S3 の場
合は3008でC(S0,S1,S2,S3 )=110000(2
進数表現)を設定して処理を終了し、S1 ≠S3 の場合
はステップ3009でC(S0,S1,S2,S3 )=10000
0(2進数表現)を設定して処理を終了する。また、ス
テップ3010では、画素S0 と画素S1 を比較し、S0 =
S1 の場合はステップ3011の手順へ、S0 ≠S1 の場合
はステップ3016の手順へ進む。ステップ3011では、画素
S2 と画素S3 を比較して、S2 =S3 の場合はステッ
プ3012でC(S0,S1,S2,S3 )=001100(2進
数表現)を設定して処理を終了し、S2 ≠S3 の場合は
ステップ3013の手順へ進む。ステップ3013では、画素S
1 と画素S3 を比較して、S1=S3 の場合はステップ3
014でC(S0,S1,S2,S3 )=011010(2進数
表現)を設定して処理を終了し、S1 ≠S3 の場合はス
テップ3015でC(S0,S1,S2,S3)=001000
(2進数表現)を設定して処理を終了する。ステップ30
16では、画素S2 と画素S3 を比較して、S2 =S3 の
場合はステップ3017の手順へ、S2 ≠S3 の場合はステ
ップ3020の手順へ進む。ステップ3017では、画素S1 と
画素S3 を比較して、S1 =S3 の場合はステップ3018
でC(S0,S1,S2,S3 )=010101(2進数表
現)を設定して処理を終了し、S1 ≠S3 の場合はステ
ップ3019でC(S0,S1,S2,S3 )=000100(2
進数表現)を設定して処理を終了する。ステップ3020で
は、画素S1 と画素S3 を比較して、S1 =S3 の場合
はステップ3021でC(S0,S1,S2,S3 )=01000
0(2進数表現)を設定して処理を終了し、S1 ≠S3
の場合はステップ3022の手順へ進む。ステップ3022で
は、画素S0 と画素S3 を比較して、S0 =S3 の場合
はステップ3023の手順へ、S0 ≠S3 の場合はステップ
3026の手順へ進む。3023では、画素S1 と画素S2 を比
較して、S1 =S2 の場合はステップ3024でC(S0,S
1,S2,S3 )=000011(2進数表現)を設定して
処理を終了し、S1 ≠S2 の場合はステップ3025でC
(S0,S1,S2,S3 )=000010(2進数表現)を
設定して処理を終了する。ステップ3026では、画素S1
と画素S2を比較して、S1 =S2 の場合はステップ302
7でC(S0,S1,S2,S3 )=000001(2進数表
現)を設定して処理を終了し、S1 ≠S2 の場合はステ
ップ3028でC(S0,S1,S2,S3 )=000000(2
進数表現)を設定して処理を終了する。
In FIG. 30, in step 3000, the pixel S0
And the pixel S2 are compared. If S0 = S2, the procedure proceeds to step 3001. If S0 ≠ S2, the procedure proceeds to step 3010. In step 3001, the pixel S0 and the pixel S1 are compared, and S0 =
If S1, the process proceeds to step 3002, and if S0 ≠ S1, the process proceeds to step 3005. In step 3002, the pixel S2 is compared with the pixel S3. If S2 = S3, in step 3003 C (S0, S1, S2, S3) = 111111 (binary expression) is set, and the process is terminated, and S2 If ≠ S3, C (S0, S1, S2, S3) = 101001 in step 3004
(Binary number expression) is set, and the process ends. Step 30
In 05, the pixel S2 and the pixel S3 are compared, and if S2 = S3, C (S0, S1, S2, S3) = 100 in step 3006.
110 (binary number representation) is set and the process is terminated, and S2 ≠
In the case of S3, the procedure proceeds to step 3007. Step 3007
Then, the pixel S1 and the pixel S3 are compared, and if S1 = S3, then at 3008 C (S0, S1, S2, S3) = 110,000 (2
(Decimal notation) is set and the processing is terminated. If S1 ≠ S3, C (S0, S1, S2, S3) = 10000 in step 3009.
0 (binary number expression) is set, and the process ends. Further, in step 3010, the pixel S0 and the pixel S1 are compared, and S0 =
If S1, the procedure goes to step 3011. If S0 ≠ S1, the procedure goes to step 3016. In step 3011, the pixel S2 is compared with the pixel S3. If S2 = S3, in step 3012 C (S0, S1, S2, S3) = 001100 (binary expression) is set, and the process is terminated, and S2 If ≠ S3, the process proceeds to step 3013. In step 3013, the pixel S
1 and pixel S3 are compared, and if S1 = S3, step 3
In 014, C (S0, S1, S2, S3) = 011010 (binary number expression) is set and the process is terminated. If S1 ≠ S3, in step 3015 C (S0, S1, S2, S3) = 001000.
(Binary number expression) is set, and the process ends. Step 30
In step 16, the pixel S2 and the pixel S3 are compared, and if S2 = S3, the procedure proceeds to step 3017, and if S2 ≠ S3, the procedure proceeds to step 3020. In step 3017, the pixel S1 and pixel S3 are compared, and if S1 = S3, step 3018
Sets C (S0, S1, S2, S3) = 010101 (binary number expression) and terminates the process. If S1 ≠ S3, C (S0, S1, S2, S3) = 000100 (2) in step 3019.
(Decimal notation) is set and the process ends. In step 3020, the pixel S1 is compared with the pixel S3. If S1 = S3, in step 3021 C (S0, S1, S2, S3) = 01000
0 (binary number expression) is set and the processing is terminated, and S1 ≠ S3
In the case of, the procedure proceeds to step 3022. In step 3022, the pixel S0 is compared with the pixel S3. If S0 = S3, the procedure goes to step 3023. If S0 ≠ S3, the step goes to step 3023.
Proceed to step 3026. In 3023, the pixel S1 and the pixel S2 are compared, and if S1 = S2, C (S0, S
1, S2, S3) = 000011 (binary number expression) is set and the processing is terminated. If S1 ≠ S2, C is set in step 3025.
(S0, S1, S2, S3) = 000010 (binary number expression) is set and the process ends. In step 3026, the pixel S1
And pixel S2 are compared, and if S1 = S2, step 302
In step 7, C (S0, S1, S2, S3) = 000001 (binary number expression) is set and the process is terminated. If S1 ≠ S2, in step 3028 C (S0, S1, S2, S3) = 000000 ( Two
(Decimal notation) is set and the process ends.

【0044】図29と図30の手順を比較すると、Cの
値を求めるのに、図29の手順では最大で13、最小で
も7つの手順を実行する必要があるのに対し、図30の
手順では、最大でも7、最小では4つの手順を実行する
だけですむ。また、4画素間の一致・不一致の関係の組
み合せは15通りあり、仮に、その15通りの組み合せ
が同じ確率で現れるとすると、Cの値を求めるのに、図
29の手順では平均9つの手順を実行する必要があるの
に対し、図30の手順では、平均で5. 3の手順で済
む。さらに、写真や、テキスト、図形などの画像データ
は、一般に、左右上下に隣り合う画素どうしが一致する
可能性が高いので、図30の手順では、比較的一致する
画素が多いほど、少ない手順で終了する。したがって、
実際に画像データを処理する場合、図30の基本手順を
用いた方が、高速にCの値を求めることができる。
Comparing the procedures of FIGS. 29 and 30, in order to obtain the value of C, the procedure of FIG. 29 requires 13 procedures at the maximum and 7 procedures at the minimum, whereas the procedure of FIG. 30. Then, you only have to perform 7 steps at the maximum and 4 steps at the minimum. Further, there are 15 combinations of matching / non-matching relationships among the four pixels, and if 15 combinations of them appear with the same probability, in order to obtain the value of C, the procedure of FIG. On the other hand, in the procedure of FIG. 30, the procedure of 5.3 is required on the average. Furthermore, in image data such as photographs, texts, and figures, it is generally highly likely that pixels that are adjacent to each other in the left, right, top, and bottom will match, so in the procedure of FIG. finish. Therefore,
When actually processing the image data, the value of C can be obtained faster by using the basic procedure of FIG.

【0045】しかし、図30の手順が、そのまま、本実
施例の、図4におけるステップ406の「4画素間の一致
・不一致の関係を調べる」処理の手順に相当するわけで
はない。本実施例の、図4におけるステップ406 の「4
画素間の一致・不一致の関係を調べる」処理は、図30
の手順を基本とした図31の手順で行なわれる。本実施
例の画像の補間をともなう拡大縮小処理の手順を表す図
4において、ステップ404 〜411 のループでは、画像D
のs行目のデータを生成する処理を行なう。ここで、ス
テップ405 の「参照データをメモリから読み出す」処理
では、図5に示すように、i行j列目とi- 1行j列目
の画素データ(m=0, 1, 2, 3の場合)または、i
行j列目とi+ 1行j列目の画素データ(m=4, 5,
6, 7の場合)を読み出す(iは、式(2)を満足す
る。)。つまり、ステップ404 〜411 のループにおい
て、ステップ406 の「4画素間の一致・不一致の関係を
調べる」処理は、原画像Sの互いに隣り合う2行2列の
4画素に対し、X軸方向に1画素ずつずらして行なわれ
る。したがって、最初の4画素の一致・不一致の関係を
調べる場合を除いて、画素S0 と画素S2の位置関係に
ある画素どうしの一致・不一致の関係は、一つ前の「4
画素間の一致・不一致の関係を調べる」処理で明らかで
あり、図30のステップ3000に相当する処理は必要なく
なる。
However, the procedure of FIG. 30 does not directly correspond to the procedure of the process of “examining the relationship of coincidence / non-coincidence between four pixels” of step 406 in FIG. 4 of this embodiment. In step 406 of FIG. 4, “4
The process of “checking the matching / non-matching relationship between pixels” is shown in FIG.
The procedure is as shown in FIG. 31, which is based on the procedure of. In FIG. 4 showing the procedure of the enlargement / reduction processing accompanied by the image interpolation of the present embodiment, the image D is executed in the loop of steps 404 to 411.
The process of generating the s-th row data is performed. Here, in the process of “reading reference data from the memory” in step 405, as shown in FIG. 5, pixel data of the i-th row and the j-th column and the i−1-th row and the j-th column (m = 0, 1, 2, 3 If) or i
Pixel data of row j and column i + 1 row 1 and j (m = 4,5,
6 and 7) are read (i satisfies the equation (2)). That is, in the loop of steps 404 to 411, the process of “checking the matching / non-matching relationship between four pixels” in step 406 is performed in the X-axis direction for four pixels in two rows and two columns adjacent to each other in the original image S. It is performed by shifting one pixel at a time. Therefore, except for the case of checking the matching / mismatching relationship of the first four pixels, the matching / mismatching relationship between the pixels in the positional relationship between the pixel S0 and the pixel S2 is "4.
The process corresponding to step 3000 of FIG. 30 is not necessary, as is clear in the process of “checking the match / mismatch relationship between pixels”.

【0046】以下、図31の手順について説明する。図
4のステップ406 の「4画素間の一致・不一致の関係を
調べる」処理は、「スタート」から始まる場合と、「ス
タートA」または「スタートB」から始まる場合とがあ
り、ステップ404 〜411 のループの初回のみ「スター
ト」から始まり、それ以降は、一つ前の「4画素間の一
致・不一致の関係を調べる」処理で求めたCの値によっ
て、「スタートA」または「スタートB]から始まる。
The procedure of FIG. 31 will be described below. The “check for matching / non-matching relationship between four pixels” process in step 406 of FIG. 4 may start from “start” or start from “start A” or “start B”. Only the first time in the loop of “start”, and thereafter, “start A” or “start B” depending on the value of C obtained in the previous “check for matching / non-matching relationship between 4 pixels” processing. start from.

【0047】図31において、ステップ3100で画素S0
と画素S2 を比較して、S0 =S2の場合はステップ310
1の手順へ、S0 ≠S2 の場合はステップ3110の手順へ
進む。ステップ3100は、「スタート」から始まる場合、
つまりステップ404 〜411 のループの初回の時のみ行な
われる。ステップ3101では、画素S0 と画素S1 を比較
し、S0 =S1 の場合はステップ3102の手順へ、S0 ≠
S1 の場合はステップ3105の手順へ進む。ステップ3102
では、画素S2 と画素S3 を比較して、S2 =S3 の場
合はステップ3103でC(S0,S1,S2,S3 )=1111
11(2進数表現)を設定して処理を終了し、S2 ≠S
3 の場合はステップ3104でC(S0,S1,S2,S3 )=1
01001(2進数表現)を設定して処理を終了する。
ステップ3105では、画素S2 と画素S3 を比較して、S
2 =S3 の場合はステップ3106でC(S0,S1,S2,S3
)=100110(2進数表現)を設定して処理を終
了し、S2 ≠S3 の場合はステップ3107の手順へ進む。
ステップ3107では、画素S1と画素S3 を比較して、S1
=S3 の場合はステップ3108でC(S0,S1,S2,S3
)=110000(2進数表現)を設定して処理を終
了し、S1 ≠S3 の場合はステップ3109でC(S0,S1,
S2,S3 )=100000(2進数表現)を設定して処
理を終了する。また、ステップ3110では、画素S0 と画
素S1 を比較し、S0 =S1 の場合はステップ3111の手
順へ、S0 ≠S1 の場合はステップ3116の手順へ進む。
ステップ3111では、画素S2 と画素S3 を比較して、S
2 =S3 の場合はステップ3112でC(S0,S1,S2,S3
)=001100(2進数表現)を設定して処理を終
了し、S2 ≠S3 の場合はステップ3113の手順へ進む。
ステップ3113では、画素S1 と画素S3 を比較して、S
1 =S3 の場合はステップ3114でC(S0,S1,S2,S3
)=011010(2進数表現)を設定して処理を終
了し、S1 ≠S3 の場合はステップ3115でC(S0,S1,
S2,S3 )=001000(2進数表現)を設定して処
理を終了する。ステップ3116では、画素S2 と画素S3
を比較して、S2 =S3 の場合はステップ3117の手順
へ、S2 ≠S3 の場合はステップ3120の手順へ進む。ス
テップ3117では、画素S1 と画素S3 を比較して、S1
=S3 の場合はステップ3118でC(S0,S1,S2,S3 )
=010101(2進数表現)を設定して処理を終了
し、S1 ≠S3 の場合はステップ3119でC(S0,S1,S
2,S3 )=000100(2進数表現)を設定して処理
を終了する。ステップ3120では、画素S1 と画素S3 を
比較して、S1 =S3 の場合はステップ3121でC(S0,
S1,S2,S3 )=010000(2進数表現)を設定し
て処理を終了し、S1 ≠S3 の場合はステップ3122の手
順へ進む。ステップ3122では、画素S0 と画素S3 を比
較して、S0 =S3 の場合はステップ3123の手順へ、S
0 ≠S3 の場合はステップ3126の手順へ進む。ステップ
3123では、画素S1 と画素S2 を比較して、S1 =S2
の場合はステップ3124でC(S0,S1,S2,S3)=00
0011(2進数表現)を設定して処理を終了し、S1
≠S2 の場合はステップ3125でC(S0,S1,S2,S3)
=000010(2進数表現)を設定して処理を終了す
る。ステップ3126では、画素S1 と画素S2 を比較し
て、S1 =S2 の場合はステップ3127でC(S0,S1,S
2,S3 )=000001(2進数表現)を設定して処理
を終了し、S1 ≠S2 の場合はステップ3128でC(S0,
S1,S2,S3 )=000000(2進数表現)を設定し
て処理を終了する。
In FIG. 31, in step 3100, the pixel S0
And pixel S2 are compared, and if S0 = S2, step 310
If S0 ≠ S2, the procedure proceeds to step 3110. If Step 3100 begins with "Start",
That is, it is performed only at the first time of the loop of steps 404 to 411. In step 3101, the pixel S0 is compared with the pixel S1, and if S0 = S1, the procedure of step 3102 is followed by S0 ≠.
In the case of S1, the procedure proceeds to step 3105. Step 3102
Then, the pixel S2 and the pixel S3 are compared, and if S2 = S3, then C (S0, S1, S2, S3) = 1111 in step 3103.
11 (binary number expression) is set and the process is terminated, and S2 ≠ S
In case of 3, C (S0, S1, S2, S3) = 1 in step 3104
01001 (binary number expression) is set, and the process ends.
In step 3105, pixel S2 and pixel S3 are compared and S
When 2 = S3, C (S0, S1, S2, S3) is calculated in step 3106.
) = 100110 (binary notation) is set and the process is terminated. If S2 ≠ S3, the process proceeds to step 3107.
In step 3107, the pixel S1 and the pixel S3 are compared and S1
= S3, C (S0, S1, S2, S3 in step 3108)
) = 110,000 (binary number representation) is set and the processing is terminated. If S1 ≠ S3, C (S0, S1,
S2, S3) = 100000 (binary number expression) is set, and the process ends. In step 3110, the pixel S0 is compared with the pixel S1. If S0 = S1, the procedure goes to step 3111. If S0 ≠ S1, the procedure goes to step 3116.
In step 3111, the pixel S2 and the pixel S3 are compared and S
When 2 = S3, C (S0, S1, S2, S3 in step 3112)
) = 001100 (binary number representation) is set and the process is terminated. If S2 ≠ S3, the process proceeds to step 3113.
In step 3113, the pixel S1 and the pixel S3 are compared and S
If 1 = S3, C (S0, S1, S2, S3 in step 3114)
) = 011010 (binary representation) is set and the process is terminated. If S1 ≠ S3, C (S0, S1,
S2, S3) = 001000 (binary number expression) is set, and the process ends. In step 3116, pixel S2 and pixel S3
And if S2 = S3, the procedure proceeds to step 3117, and if S2 ≠ S3, the procedure proceeds to step 3120. In step 3117, the pixel S1 and the pixel S3 are compared and S1
= S3, C (S0, S1, S2, S3) in step 3118
= 010101 (binary number expression) is set and the processing is terminated. If S1 ≠ S3, C (S0, S1, S
2, S3) = 000100 (binary number expression) is set and the process is terminated. In step 3120, the pixel S1 and the pixel S3 are compared, and if S1 = S3, then in step 3121 C (S0,
S1, S2, S3) = 010,000 (binary expression) is set and the process is terminated. If S1 ≠ S3, the process proceeds to step 3122. In step 3122, the pixel S0 and the pixel S3 are compared, and if S0 = S3, the procedure of step 3123 is followed by S
If 0 ≠ S3, the procedure proceeds to step 3126. Step
In 3123, the pixel S1 and the pixel S2 are compared, and S1 = S2
In the case of, C (S0, S1, S2, S3) = 00 in step 3124
0011 (binary number expression) is set, the process is terminated, and S1
If ≠ S2, C in step 3125 (S0, S1, S2, S3)
= 000010 (binary expression) is set, and the process ends. In step 3126, the pixel S1 and the pixel S2 are compared, and if S1 = S2, in step 3127 C (S0, S1, S
2, S3) = 000001 (binary number expression) is set and the process is terminated. If S1 ≠ S2, C (S0,
S1, S2, S3) = 000000 (binary number expression) is set, and the process ends.

【0048】図4のステップ404 〜411 のループの初回
以降の「4画素間の一致・不一致の関係を調べる」処理
では、一つ前の「4画素間の一致・不一致の関係を調べ
る」処理を、ステップ3103,3108,3114,3118,3121で終了
した場合には、「スタートA」から始まり、ステップ31
01の画素S0 と画素S1 の比較から行なう。一つ前の
「4画素間の一致・不一致の関係を調べる」処理を、ス
テップ3104,3106,3109,3112,3115,3119,3124,3125,312
7,3128 で終了した場合には、「スタートB」から始ま
り、ステップ3110の画素S0 と画素S1 の比較から行な
う。
In the process of "checking the matching / mismatching relationship between four pixels" after the first time of the loop of steps 404 to 411 in FIG. 4, the process of "checking the matching / mismatching relationship between four pixels" is performed. If it is completed in steps 3103, 3108, 3114, 3118, 3121, start from "Start A" and proceed to step 31
It is performed by comparing the pixel S0 of 01 and the pixel S1. The process of "checking the matching / non-matching relationship between four pixels" is performed in steps 3104, 3106, 3109, 3112, 3115, 3119, 3124, 3125, 312.
When the process ends at 7,3128, the process starts from "start B" and is compared with the pixel S0 and the pixel S1 in step 3110.

【0049】(実施例3)本発明の実施例3では、実施
例1でMPUが行なっていた画像データの処理の内、図
4のステップ409 の「X軸方向にP/8倍する」処理と
ステップ410 の「生成されたデータをメモリに書き込
む」処理を、専用の回路で行なうようにしたものであ
る。以下、本発明の実施例3について、図面を参照しな
がら説明する。
(Embodiment 3) In Embodiment 3 of the present invention, of the processing of the image data performed by the MPU in Embodiment 1, the "multiply by P / 8 in the X-axis direction" processing of step 409 in FIG. And the step 410 of "writing the generated data in the memory" is performed by a dedicated circuit. Embodiment 3 of the present invention will be described below with reference to the drawings.

【0050】図32は実施例3における画像処理装置の
機能ブロック図である。図32において、3200はMPU
3201から転送されたデータを、X軸方向に任意の倍率で
拡大縮小して、表示メモリ3204または画像データメモリ
3203に書き込む画像処理ユニット、3201は表示メモリ32
04または画像データメモリ3203上の画像データを8倍補
間拡大処理して、画像処理ユニット3200へ転送するMP
U(Multi ProcessingUnit) 、3202はMPU3201が実行
するプログラムを格納するシステムメモリ、3203は画像
データを格納する画像データメモリ、3204はCRT3206
に表示される画像データを格納する表示メモリ、3205は
表示メモリ3204とCRT3206を制御するCRTコントロ
ーラ、3206は表示メモリ3204に格納された画像データを
表示するCRT、3207は32ビットのバスである。この
画像処理装置は、画像データメモリ3203上または表示メ
モリ3204上の矩形領域の原画像を、補間処理をしながら
X軸方向、Y軸方向独立の倍率で拡大縮小処理して、表
示メモリ3204または画像データメモリ3203に書き込むよ
うに構成されている。処理するデータは8ビット/画素
のカラー画像データであり、データの8ビットが1画素
に相当する。以下において、微小領域とは、原画像の画
素間の領域をX軸方向に8分割、Y軸方向に8分割した
場合に現れる仮想上の微小な領域を意味し、また、ワー
ドは32ビット、ショートワードは16ビット、バイト
は8ビットを意味するものとする。
FIG. 32 is a functional block diagram of the image processing apparatus in the third embodiment. In FIG. 32, 3200 is an MPU
The data transferred from the 3201 can be scaled up or down in the X-axis direction at any magnification to display 3204 or image data memory.
Image processing unit to write to 3203, 3201 to display memory 32
04 or MP that performs 8 times interpolation enlargement processing on the image data in the image data memory 3203 and transfers it to the image processing unit 3200
U (Multi Processing Unit) 3202 is a system memory storing a program executed by the MPU 3201, 3203 is an image data memory storing image data, and 3204 is a CRT 3206.
Is a CRT controller that controls the display memory 3204 and the CRT 3206, 3206 is a CRT that displays the image data stored in the display memory 3204, and 3207 is a 32-bit bus. This image processing apparatus performs enlargement / reduction processing on an original image in a rectangular area on the image data memory 3203 or the display memory 3204 by an independent scaling factor in the X-axis direction and the Y-axis direction while performing interpolation processing, and then the display memory 3204 or It is configured to write to the image data memory 3203. The data to be processed is 8-bit / pixel color image data, and 8 bits of the data correspond to 1 pixel. In the following, the minute area means a virtual minute area that appears when the area between pixels of the original image is divided into eight in the X-axis direction and eight in the Y-axis direction, and the word is 32 bits, A short word means 16 bits and a byte means 8 bits.

【0051】以上のように構成された画像処理装置にお
いて、画像データメモリ3203の画像をX軸方向にP倍
(Pは任意の正の有理数)、Y軸方向にQ倍(Qは任意
の正の有理数)して、CRT3206に表示する場合、ま
ず、システムメモリ3202のプログラムにしたがって、M
PU3201が画像処理ユニット3200に初期設定を行なう。
さらに、MPU3201は、画像データメモリ3203から画像
データを読み出し、補間処理をしながらX軸方向に8
倍、Y軸方向にQ倍にして、画像処理ユニット3200へ転
送する。画像処理ユニット3200は、MPU3201から転送
されたデータをP/8倍して、表示メモリ3204に書き込
む。表示メモリ3204に書き込まれた画像は、CRTコン
トローラ3205によってCRT3205に表示される。MPU
3201と、画像処理ユニット3200による画像の補間処理を
伴う拡大縮小処理は、メモリ3203、3204上の画像データ
に対して、同様に行なわれる。したがって、画像データ
メモリ3203の画像をX軸方向にP倍、Y軸方向にQ倍し
て、画像データメモリ3203に格納する場合も、表示メモ
リ3204の画像をX軸方向にP倍、Y軸方向にQ倍して、
画像データメモリ3203に格納する場合も、表示メモリ32
04の画像をX軸方向にP倍、Y軸方向にQ倍して表示メ
モリ4 に書き込む場合も、全てMPU3201がメモリ320
3、3204上の原画像データを読み出し、補間処理をしな
がらX軸方向に8倍、Y軸方向にQ倍にして、画像処理
ユニット3200へ転送する。画像処理ユニット3200は、M
PU3201から転送されたデータをP/8倍して、メモリ
3203、3204に書き込む。MPU3201による画像処理ユニ
ット3200の制御と、メモリ3203、3204からの画像データ
の読み出しと、画像処理ユニット3200へのデータ転送、
および画像処理ユニット3200による処理されたデータの
メモリ3203、3204への書き込みは、全てバス3207を介し
て行なわれる。つまり、画像処理ユニット3200は、実施
例1の図4のステップ409 の「X軸方向にP/8倍す
る」処理と410 の「生成されたデータをメモリに書き込
む」処理を行なう。
In the image processing apparatus configured as described above, the image in the image data memory 3203 is multiplied by P in the X-axis direction (P is an arbitrary positive rational number) and Q-fold in the Y-axis direction (Q is an arbitrary positive rational number). Rational number) and display it on the CRT 3206. First, according to the program in the system memory 3202, M
The PU 3201 initializes the image processing unit 3200.
Further, the MPU 3201 reads out the image data from the image data memory 3203 and performs interpolation processing in the X-axis direction 8
Then, the image is multiplied by Q and multiplied by Q in the Y-axis direction and transferred to the image processing unit 3200. The image processing unit 3200 multiplies the data transferred from the MPU 3201 by P / 8 and writes the data in the display memory 3204. The image written in the display memory 3204 is displayed on the CRT 3205 by the CRT controller 3205. MPU
Enlargement / reduction processing involving image interpolation processing by the image processing unit 3200 and 3201 is similarly performed on the image data on the memories 3203 and 3204. Therefore, even when the image in the image data memory 3203 is stored in the image data memory 3203 after being multiplied by P in the X-axis direction and Q in the Y-axis direction, the image in the display memory 3204 is multiplied by P in the X-axis direction and Y-axis. Q times the direction,
Even when storing in the image data memory 3203, the display memory 32
Even when the image of 04 is multiplied by P in the X-axis direction and Q-fold in the Y-axis direction and written to the display memory 4, the MPU3201 is the memory 320.
The original image data on 3 and 3204 are read out, subjected to interpolation processing, multiplied by 8 in the X axis direction and Q times in the Y axis direction, and transferred to the image processing unit 3200. Image processing unit 3200 is M
The data transferred from the PU3201 is multiplied by P / 8 and the memory
Write to 3203, 3204. Control of the image processing unit 3200 by the MPU 3201, reading of image data from the memories 3203 and 3204, data transfer to the image processing unit 3200,
And the writing of the data processed by the image processing unit 3200 to the memories 3203 and 3204 is all performed via the bus 3207. In other words, the image processing unit 3200 performs the "multiply P / 8 times in the X-axis direction" process of step 409 and the "write generated data in memory" process of step 410 in FIG. 4 of the first embodiment.

【0052】画像処理ユニット3200の内部の機能ブロッ
ク図を図33に示す。3300はMPU3201から転送された
データを格納する参照データファイル、3301は補間処理
をせずにX軸方向に任意の倍率で拡大縮小するX方向拡
大縮小ユニット、3302は実際にメモリに書き込むワード
アライメントされたワードデータを生成する書き込みデ
ータ生成ユニット、3303は補間拡大縮小処理されたデー
タを書き込むメモリ上のワードアドレスを生成し、メモ
リに画像データをワード単位で書き込むデータ書き込み
ユニット、3304はデータ書き込みユニットによって生成
されたワードデータを格納する書き込みデータファイ
ル、3305は参照データファイル3300の動作を制御する制
御ユニットA、3306はX方向拡大縮小ユニット3301の動
作を制御する制御ユニットB、3307は書き込みデータ生
成ユニット3302の動作を制御する制御ユニットC、3308
はデータ書き込みユニット3303と書き込みデータファイ
ル3304の動作を制御する制御ユニットDである。
A functional block diagram of the inside of the image processing unit 3200 is shown in FIG. 3300 is a reference data file that stores the data transferred from the MPU 3201, 3301 is an X-direction scaling unit that scales the image in the X-axis direction at any magnification without interpolation processing, and 3302 is the word alignment that is actually written to memory. A writing data generation unit for generating word data, 3303 generates a word address on the memory for writing the data subjected to the interpolation enlargement / reduction processing, and a data writing unit for writing image data to the memory in word units, 3304 is a data writing unit. A write data file that stores the generated word data, 3305 is a control unit A that controls the operation of the reference data file 3300, 3306 is a control unit B that controls the operation of the X-direction scaling unit 3301, and 3307 is a write data generation unit. Control unit C, 3308 for controlling operation of 3302
Is a control unit D for controlling the operations of the data writing unit 3303 and the writing data file 3304.

【0053】X方向拡大縮小ユニット3301およびデータ
書き込みユニット3303が行なう処理は、図4のそれぞれ
ステップ409,410 の処理に対応する。したがって、画像
データメモリ3203の画像をX軸方向にP倍、Y軸方向に
Q倍して、表示メモリ3204に格納する場合、まず、MP
Uが図4のステップ400 〜408 の手順にしたがって、メ
モリから参照データを読み出し、8倍補間拡大された2
ワード(8画素)のデータを生成する。MPU3201は、
生成したデータを1ワードずつ参照データファイル3300
に転送し、転送されたデータは、参照データファイル33
00に格納される。さらに、参照データファイル3300に格
納されたデータは、X方向拡大縮小ユニット3301に転送
され、X方向拡大縮小ユニット3301によってX軸方向に
P/8倍され、X軸方向にP倍Y軸方向にQ倍されたデ
ータが生成される。X軸方向拡大縮小ユニットによって
生成されたデータは、書き込みデータ生成ユニット3302
によって、バイトシフトとマスク演算が行なわれ、表示
メモリのワード境界にアライメントされたワードデータ
に変換され、書き込みデータファイル3304に格納され
る。データ書き込みユニット3303は、表示メモリ3204上
のアドレスを生成し、書き込みデータファイル3304に格
納されたデータは、データ書き込みユニット3303によっ
て生成された表示メモリ3204上のアドレスに書き込まれ
る。以上の動作は、拡大縮小後の同一行の画素データを
X軸方向に連続して生成するように1行ずつ行なわれ、
さらにこの1行ずつの処理は、Y軸方向に連続して行な
われ、最終的に、補間を伴う拡大縮小処理された画像が
表示メモリ3204に書き込まれる。
The processes performed by the X-direction enlarging / reducing unit 3301 and the data writing unit 3303 correspond to the processes of steps 409 and 410 in FIG. 4, respectively. Therefore, when an image in the image data memory 3203 is multiplied by P in the X-axis direction and Q-fold in the Y-axis direction and stored in the display memory 3204, first, MP
U reads the reference data from the memory according to the procedure of steps 400 to 408 in FIG.
Word (8 pixels) data is generated. The MPU3201 is
Generated data 1 word at a time Reference data file 3300
Transferred to the reference data file 33
Stored in 00. Further, the data stored in the reference data file 3300 is transferred to the X-direction scaling unit 3301 and is multiplied by P / 8 in the X-axis direction by the X-direction scaling unit 3301 and is multiplied by P in the X-axis direction and in the Y-axis direction. Data multiplied by Q is generated. The data generated by the X-axis direction scaling unit is the write data generation unit 3302.
Byte shift and mask operation are performed, and converted into word data aligned to the word boundary of the display memory and stored in the write data file 3304. The data writing unit 3303 generates an address on the display memory 3204, and the data stored in the write data file 3304 is written to the address on the display memory 3204 generated by the data writing unit 3303. The above operation is performed row by row so as to continuously generate pixel data of the same row after scaling in the X-axis direction,
Further, the processing for each row is continuously performed in the Y-axis direction, and finally the image subjected to the enlargement / reduction processing accompanied by the interpolation is written in the display memory 3204.

【0054】以上の画像処理ユニット3200の各機能ブロ
ックの動作は、制御ユニットA3305、制御ユニットB33
06、制御ユニットC3307、制御ユニットD3308によって
制御される。制御ユニットA3305は、参照データファイ
ル3300を制御し、制御ユニットB3306は、X方向拡大縮
小ユニット3301を制御し、制御ユニットC3307は、書き
込みデータ生成ユニット3302を制御し、制御ユニットD
3308はデータ書き込みユニット3303と書き込みデータフ
ァイル3304を制御する。制御ユニットA3305、制御ユニ
ットB3306、制御ユニットC3307、制御ユニットD3308
は、いずれもPLA(Programable Logic Array) 回路と
レジスタとカウンタおよび加減算器とによって構成さ
れ、一部のレジスタは、制御ユニットどうしで共有す
る。制御ユニットによって、PLA回路のサイズ、およ
びレジスタとカウンタの数は異なり、また加減算器を持
たない場合もあるが、基本的にPLA回路とレジスタと
カウンタによってシーケンサを構成し、PLA回路のプ
ログラムにしたがって各機能ブロックを制御する。制御
ユニットA3305、制御ユニットB3306、制御ユニットC
3307、制御ユニットD3308からは、それぞれが制御する
各機能ブロックに対して制御信号が送られ、また各機能
ブロックからはそれぞれの制御ユニットに対してフラグ
信号(演算器のゼロフラグ、レジスタファイルのFullフ
ラグ、Empty フラグなど)が送られる。また、機能ブロ
ックからのフラグ信号の一部(レジスタファイルのFull
フラグ、Empty フラグなど)は、次段、または前段の機
能ブロックを制御する制御ユニットにも送られ、機能ブ
ロック間のデータ転送が制御される。このように4つの
制御ユニットと各機能ブロックとの間で制御信号とフラ
グ信号が交換されることにより処理の並列化が実現され
る。
The operation of each functional block of the image processing unit 3200 described above is performed by the control unit A3305 and the control unit B33.
It is controlled by 06, control unit C3307, and control unit D3308. The control unit A3305 controls the reference data file 3300, the control unit B3306 controls the X-direction scaling unit 3301, the control unit C3307 controls the write data generation unit 3302, and the control unit D.
3308 controls the data writing unit 3303 and the write data file 3304. Control unit A3305, control unit B3306, control unit C3307, control unit D3308
Are each composed of a PLA (Programmable Logic Array) circuit, a register, a counter and an adder / subtractor, and some of the registers are shared by the control units. Depending on the control unit, the size of the PLA circuit and the number of registers and counters may differ, and there may be cases where no adder / subtractor is provided. Control each function block. Control unit A3305, control unit B3306, control unit C
A control signal is sent from the 3307 and the control unit D3308 to each functional block controlled by each, and a flag signal (a zero flag of a computing unit, a full flag of a register file) is sent from each functional block to each control unit. , Empty flag, etc.) is sent. In addition, part of the flag signal from the functional block (Register file Full
The flag, the Empty flag, etc.) are also sent to the control unit that controls the functional block at the next stage or the preceding stage, and the data transfer between the functional blocks is controlled. By exchanging the control signal and the flag signal between the four control units and the respective functional blocks in this way, parallelization of the processing is realized.

【0055】さらに、制御ユニットA3305、制御ユニッ
トB3306、制御ユニットC3307、制御ユニットD3308
は、MPU3201によって制御される。MPU3201は、シ
ステムメモリ3202のプログラムにもとづいて、制御ユニ
ットA3305、制御ユニットB3306、制御ユニットC330
7、制御ユニットD3308のそれぞれのレジスタとカウン
タに、所望の拡大縮小処理のための初期設定を行なう。
参照データファイルにデータが転送されると、各制御ユ
ニットがそれぞれが担当する機能ブロックを制御して、
所望の処理が実行される。
Furthermore, control unit A3305, control unit B3306, control unit C3307, control unit D3308
Are controlled by the MPU 3201. The MPU 3201 controls the control unit A3305, the control unit B3306, and the control unit C330 based on the program in the system memory 3202.
7. Initialize the respective registers and counters of the control unit D3308 for desired enlargement / reduction processing.
When the data is transferred to the reference data file, each control unit controls the functional block that it is in charge of,
The desired processing is executed.

【0056】以下において、各機能ブロックについて説
明する。説明の簡単のため、各機能ブロックの動作の説
明では、上記各実施例と同様に、原画像S(X軸方向の
画素数がsnx 、Y軸方向の画素数がsny の矩形の画像(s
nx,snyは1以上の整数) )をX軸方向にP倍(Pは0よ
り大きい任意の有理数)、Y軸方向にQ倍(Qは0より
大きい任意の有理数)に拡大縮小処理して画像D(X軸
方向の画素数がdnx 、Y軸方向の画素数がdny の矩形の
画像(dnx,dnyは1以上の整数,dnx= Psnx,dny=Qsny))
を生成する場合の動作について述べる。
Each functional block will be described below. For simplification of description, in the description of the operation of each functional block, as in each of the above-described embodiments, the original image S (the rectangular image (s having the number of pixels in the X-axis direction is snx and the number of pixels in the Y-axis direction is sny)
nx, sny is an integer greater than or equal to 1) and is scaled P times in the X axis direction (P is any rational number greater than 0) and Q times in the Y axis direction (Q is any rational number greater than 0). Image D (rectangular image in which the number of pixels in the X axis direction is dnx and the number of pixels in the Y axis direction is dny (dnx, dny is an integer of 1 or more, dnx = Psnx, dny = Qsny))
The operation when generating is described.

【0057】参照データファイル3300は、4個の32ビ
ットレジスタによって構成され、MPU3201から転送さ
れる8倍補間拡大処理されたデータを格納する。参照デ
ータファイル3300は、FIFO(First In First Out)
として動作し、参照データファイル3300に格納された画
像データは、格納された順にX方向拡大縮小ユニット33
01へ転送される。参照データファイル3300に、参照デー
タが4ワード格納されている場合、参照データファイル
3300から制御ユニットA3305に対してFullフラグが送ら
れる。これにより、制御ユニットAは、MPU3201に対
してFullフラグを示し、参照データファイルへ3300のデ
ータ転送を一時的に停止させる。また、参照データファ
イル3300が空の場合、つまり参照データが格納されてい
ない場合、参照データファイル3300から制御ユニットB
に対してEmpty フラグが送られる。これにより、制御ユ
ニットBは、参照データファイル3300からX方向拡大縮
小ユニットへのデータの転送を一時的に停止させる。
The reference data file 3300 is made up of four 32-bit registers, and stores the data that has been subjected to the 8 × interpolation enlargement processing transferred from the MPU 3201. The reference data file 3300 is a FIFO (First In First Out)
The image data stored in the reference data file 3300 operates as the X-direction scaling unit 33 in the order of storage.
Transferred to 01. If the reference data file 3300 stores 4 words of reference data, the reference data file
The Full flag is sent from the 3300 to the control unit A3305. As a result, the control unit A indicates the Full flag to the MPU 3201 and temporarily stops the data transfer of the 3300 to the reference data file. If the reference data file 3300 is empty, that is, if the reference data is not stored, the reference data file 3300 is transferred to the control unit B.
The Empty flag is sent to. As a result, the control unit B temporarily stops the transfer of data from the reference data file 3300 to the X-direction scaling unit.

【0058】次にX方向拡大縮小ユニット3301の内部構
成と動作について説明する。本実施例による画像処理装
置が画像をX軸方向にP倍する場合、X軸方向拡大縮小
ユニット3301は、MPU3201によって8倍補間拡大処理
されたデータをX軸方向にP/8倍にする。
Next, the internal structure and operation of the X-direction scaling unit 3301 will be described. When the image processing apparatus according to the present embodiment multiplies an image by P times in the X-axis direction, the X-axis direction enlarging / reducing unit 3301 multiplies the data subjected to the 8-times interpolation enlarging process by the MPU 3201 by P / 8 times in the X-axis direction.

【0059】X方向拡大縮小ユニット3301は、図34に
示すように、マッピングパターン生成回路3400と、10
24ビットのマッピングパターンを格納するパターンR
AM(Random Access Memory)3401と、参照データファ
イル3300から転送されるデータを格納する32ビットの
レジスタ3402,3403 と、入力データをバイト(8ビッ
ト)単位で0バイト〜3バイト左シフトするバレルシフ
タ3404と、マッピングパターンにしたがって入力データ
をバイト単位でコピーまたは間引いて拡大縮小するバレ
ルセレクタ3405と、バレルセレクタの1回の処理におけ
る入力データのバイト数と、出力データのバイト数をカ
ウントするパターンカウンタ3406によって構成される。
As shown in FIG. 34, the X-direction scaling unit 3301 includes a mapping pattern generation circuit 3400 and a mapping pattern generation circuit 3400.
Pattern R that stores a 24-bit mapping pattern
AM (Random Access Memory) 3401, 32-bit registers 3402 and 3403 that store data transferred from the reference data file 3300, and barrel shifter 3404 that shifts input data to the left by 0 to 3 bytes in byte (8-bit) units. And a barrel selector 3405 that copies or thins out input data in byte units according to a mapping pattern, and a pattern counter 3406 that counts the number of input data bytes in one processing of the barrel selector and the number of output data bytes. Composed by.

【0060】マッピングパターンは、拡大縮小率に応じ
て画素データをマッピングするバイナリのパターンであ
り、あらかじめマッピングパターン生成回路3400によっ
て、X軸方向に連続する画素データに対応して生成さ
れ、パターンRAM3401に格納されている。マッピング
パターンは、バレルセレクタ3405に制御信号として4ビ
ットずつ入力され、X軸方向に連続する入力データが処
理される。X軸方向拡大縮小ユニット3301では、入力デ
ータに対して1行ごとに同一の処理が行われ、次の行の
処理にはパターンRAM3401に格納された同じマッピン
グパターンが使用される。
The mapping pattern is a binary pattern for mapping pixel data according to the enlargement / reduction ratio, and is generated in advance by the mapping pattern generation circuit 3400 corresponding to pixel data continuous in the X-axis direction, and is stored in the pattern RAM 3401. It is stored. The mapping pattern is input to the barrel selector 3405 as a control signal in units of 4 bits, and the input data continuous in the X-axis direction is processed. In the X-axis direction enlarging / reducing unit 3301, the same processing is performed on the input data row by row, and the same mapping pattern stored in the pattern RAM 3401 is used for processing the next row.

【0061】バレルセレクタ3405は、図35に示すよう
に、16個の8ビット3-1 セレクタ3500〜3515と、4ビ
ットのマッピングパターンを8ビット3-1 セレクタ3500
〜3515の制御信号にデコードするパターンデコーダ3516
によって構成される。3ビット3-1 セレクタ3500〜3515
は、4行4列のアレイ状に構成され、パターンデコーダ
3516からの制御信号によって、それぞれが3バイト(3
画素)の入力データから1バイト(1画素)のデータを
選択して出力する。
The barrel selector 3405, as shown in FIG.
Pattern decoder 3516 for decoding control signals up to 3515
Composed by. 3-bit 3-1 selector 3500 to 3515
Are arranged in an array of 4 rows and 4 columns.
Depending on the control signal from the 3516, each 3 bytes (3
One byte (1 pixel) of data is selected from the input data of (pixel) and output.

【0062】バレルセレクタ3405は、P/8<1の場
合、つまりX軸方向拡大縮小ユニット3301が縮小処理を
する場合、1行ごとの処理における右端のデータを処理
する時を除いて、常に4バイト(4画素)のデータを入
力として、パターンデコーダ3516からの制御信号にした
がって画素データを間引いて P/2 バイトまたは( P/2+
1) バイトのデータを出力する。( α は、αを越え
ない最大の整数を表す。) P/2 バイト、( P/2 +1) バ
イトのいずれのバイト数のデータを出力するかは、その
時に入力されるマッピングパターンに依存する。1≦P
/8の場合、つまりX軸方向拡大縮小ユニット3301が拡
大処理をする場合、1行ごとの処理における右端のデー
タを処理する時を除いて、 32/P バイトまたは( 32/P +
1)バイトのデータを入力として(( 32/P +1)≦4 )、パ
ターンデコーダ3516からの制御信号にしたがって画素デ
ータをコピーして、常に4バイトのデータを出力する。
32/P バイト、( 32/P +1)バイトのいずれのバイト数の
データを入力とするかは、その時に入力されるマッピン
グパターンに依存する。バレルセレクタ3405によって生
成されたデータは、書き込みデータ生成ユニット3302へ
転送される。パターンカウンタ3406は、入力データのバ
イト数と生成されたデータのバイト数をカウントし、フ
ラグ信号として、それぞれ制御ユニットB3306と制御ユ
ニットC3307へ送る。このバレルセレクタの並列拡大縮
小処理のアルゴリズムについては、第16回画像工学コ
ンファレンス論文集(昭和60年)「文書画像編集用イ
メージ・プロセッサMN8617」(P.289 からP.292 )およ
び、特開昭60-83182に記載されている。
When P / 8 <1, that is, when the X-axis direction enlarging / reducing unit 3301 performs the reducing process, the barrel selector 3405 is always set to 4 except when processing the rightmost data in the process for each line. Byte (4 pixels) data is input, and pixel data is thinned out according to the control signal from the pattern decoder 3516 to obtain P / 2 bytes or (P / 2 +
1) Output byte data. (Α represents the maximum integer that does not exceed α.) Whether to output P / 2 bytes or (P / 2 +1) bytes of data depends on the mapping pattern input at that time. To do. 1 ≦ P
/ 8, that is, when the X-axis direction enlargement / reduction unit 3301 performs enlargement processing, except when processing the rightmost data in the processing for each line, 32 / P bytes or (32 / P +
1) With byte data as an input ((32 / P +1) ≦ 4), pixel data is copied according to a control signal from the pattern decoder 3516, and 4 byte data is always output.
Whether 32 / P bytes or (32 / P +1) bytes of data is input depends on the mapping pattern input at that time. The data generated by the barrel selector 3405 is transferred to the write data generation unit 3302. The pattern counter 3406 counts the number of bytes of input data and the number of bytes of generated data, and sends them as a flag signal to the control unit B3306 and the control unit C3307, respectively. The algorithm for parallel scaling processing of this barrel selector is described in "Image Processor for Document Image Editing MN8617" (P.289 to P.292) in the 16th Conference on Image Engineering Conference (1985) and Japanese Patent Laid-Open Publication No. Sho. 60-83182.

【0063】バレルセレクタの入力データは、左詰めに
されたX軸方向に連続するデータである必要があり、こ
の左詰めされたX軸方向に連続するデータは、制御ユニ
ットB3306がバレルシフタ3404のシフト量と、レジスタ
3402からレジスタ3403へのデータ転送と、参照データフ
ァイルからレジスタ3402へのデータ転送を制御すること
によって、バレルセレクタへ供給される。
The input data of the barrel selector must be left-justified data continuous in the X-axis direction. This left-justified data continuous in the X-axis direction is shifted by the control unit B3306 to the barrel shifter 3404. Quantity and register
It is supplied to the barrel selector by controlling the data transfer from the 3402 to the register 3403 and the data transfer from the reference data file to the register 3402.

【0064】P/8<1の場合、バレルセレクタ3405は
4バイトのデータを入力とするので、バレルセレクタ34
05がデータを生成する度に、レジスタ3402のデータが、
レジスタ3403に転送され、参照データファイルからデー
タがレジスタ3402に転送され、バレルシフタは0バイト
シフトを行なう。1≦P/8の場合、バレルセレクタ34
05は 32/P バイトまたは( 32/P +1)バイトのデータを入
力とし、入力データは常に4バイト以下となる。したが
って、レジスタ3403のデータがすべて処理されるまで、
レジスタ3402からレジスタ3403へのデータ転送は行なわ
れず、レジスタ3403のデータがすべて処理される度に、
レジスタ3402のデータが、レジスタ3403に転送され、参
照データファイルからデータがレジスタ3402に転送され
る。この場合のバレルシフタ3404のシフト量は、バレル
セレクタ3405が処理した入力データのバイト数を累積加
算した値になる。但し、この累積加算では、結果が4以
上になる度に、結果から4が引かれる。つまり、レジス
タ3403のデータがすべて処理されるまで累積加算され、
レジスタ3403のデータがすべて処理されると(この時、
累積加算の結果はを4以上となる)、レジスタ3402のデ
ータがレジスタ3403に転送され、参照データファイルか
らデータがレジスタ3402に転送され、バレルシフタ3404
のシフト量は、累積加算の結果から4を引いた値にな
る。バレルセレクタ3405が処理した入力データのバイト
数は、パターンカウンタによってカウントされる。これ
により、バレルセレクタ3405には、常に、左詰めにされ
たX軸方向に連続する処理されていないデータが入力さ
れる。
When P / 8 <1, since the barrel selector 3405 receives 4-byte data as input, the barrel selector 34
Each time 05 generates data, the data in register 3402
The data is transferred to the register 3403, the data from the reference data file is transferred to the register 3402, and the barrel shifter performs 0 byte shift. When 1 ≦ P / 8, barrel selector 34
The input of 05 is 32 / P bytes or (32 / P +1) bytes of data, and the input data is always 4 bytes or less. Therefore, until all the data in register 3403 has been processed,
Data transfer from register 3402 to register 3403 is not performed, and every time data in register 3403 is processed,
The data in the register 3402 is transferred to the register 3403, and the data from the reference data file is transferred to the register 3402. The shift amount of the barrel shifter 3404 in this case is a value obtained by cumulatively adding the number of bytes of the input data processed by the barrel selector 3405. However, in this cumulative addition, 4 is subtracted from the result each time the result becomes 4 or more. In other words, the data in register 3403 is cumulatively added until all data is processed,
When all the data in register 3403 is processed (at this time,
The result of the cumulative addition is 4 or more), the data of the register 3402 is transferred to the register 3403, the data from the reference data file is transferred to the register 3402, and the barrel shifter 3404
The shift amount of is a value obtained by subtracting 4 from the result of cumulative addition. The number of bytes of input data processed by the barrel selector 3405 is counted by the pattern counter. As a result, the barrel selector 3405 is always input with unprocessed data that is left-justified and continuous in the X-axis direction.

【0065】書き込みデータ生成ユニット3302は、X軸
方向拡大縮小ユニットによって生成されたデータから、
実際にメモリに書き込むワードデータを生成し、書き込
みデータファイル3304に格納する。X軸方向拡大縮小ユ
ニットは、常に、左詰めされたデータを生成するが、拡
大縮小後の画像Dの左端の画素は、メモリ上のワード内
のバイト0の位置にあるとは限らない。また、データ書
き込みユニット3303は、処理したデータをワード単位で
書き込むので、画像Dの左端と右端の画素データを書き
込む場合は、書き込み先のデータとマスク処理をする必
要があり、X軸方向拡大縮小ユニットによって生成され
たデータを、そのままメモリに書き込むことはできな
い。書き込みデータ生成ユニット3302は、X方向拡大縮
小ユニット3301によって生成されたデータを、バイトシ
フトして、データを書き込むメモリ上のバイト位置に合
わせ込まれたワードデータに変換し、また、X方向拡大
縮小ユニット3301によって生成されたデータに、画像D
の左端または右端の画素データが含まれる場合は、書き
込み先のデータとマスク処理を行なって、書き込みデー
タファイル3304に格納する。
The write data generation unit 3302 uses the data generated by the X-axis direction scaling unit to
Word data to be actually written in the memory is generated and stored in the write data file 3304. The X-axis direction scaling unit always produces left-justified data, but the leftmost pixel of the scaled image D is not necessarily at byte 0 of the word in memory. Further, since the data writing unit 3303 writes the processed data in word units, when writing the pixel data at the left end and the right end of the image D, it is necessary to perform a mask process with the write destination data, and enlargement / reduction in the X-axis direction. The data generated by the unit cannot be written directly to memory. The write data generation unit 3302 byte shifts the data generated by the X-direction scaling unit 3301 to convert it into word data that is aligned with the byte position on the memory where the data is written, and also scales in the X direction. Image D is added to the data generated by unit 3301.
If the pixel data at the left end or the right end is included, it is masked with the write destination data and stored in the write data file 3304.

【0066】書き込みデータファイル3304は、4個の3
2ビットレジスタによって構成され、FIFOとして動
作する。書き込みデータファイルは、制御ユニットD33
08によって制御され、書き込みデータ生成ユニット3302
の出力データは、書き込みデータファイル3304に格納さ
れ、格納された順に、データ書き込みユニット3303が生
成したメモリのアドレスに書き込まれる。
The write data file 3304 has four 3
It is configured by a 2-bit register and operates as a FIFO. The write data file is the control unit D33.
Controlled by 08, write data generation unit 3302
Output data is stored in the write data file 3304, and is written to the addresses of the memory generated by the data writing unit 3303 in the order of storage.

【0067】データ書き込みユニット3303は、書き込み
データファイル3304と共に、制御ユニットD3308によっ
て制御され、拡大縮小後の画像Dのメモリ上のワードア
ドレスを生成し、書き込みデータファイル3304に格納さ
れているデータを、ワード単位でメモリに書き込む。デ
ータ書き込みユニット3303は、まず、拡大縮小後の画像
Dの0行0ワード目のワードアドレスを生成してデータ
を書き込み、次に0行1ワード目、0行2ワード目、0
行3ワード目というようにワードアドレスを生成してデ
ータを書き込む。画像Dの0行目のデータの書き込みを
終了すると、つぎは、画像Dの1行目のデータの書き込
みを0行目と同じように行なう。このような画像Dの1
行ごとのデータの書き込みを、0行目から(dnx - 1) 行
目まで行なう。このように、書き込みデータ生成ユニッ
ト3302によって生成されたデータは、書き込みデータフ
ァイル3304に転送され、データ書き込みユニット3303が
生成した画像データメモリ3203、または、表示メモリ32
04上のアドレスに、書き込みデータファイル3304に格納
されたデータが順次書き込まれる。
The data writing unit 3303, together with the write data file 3304, is controlled by the control unit D3308 to generate a word address on the memory of the image D after enlarging / reducing, and to write the data stored in the write data file 3304. Write to memory in word units. The data writing unit 3303 first generates the word address of the 0th row and 0th word of the scaled image D and writes the data, and then the 0th row and 1st word, the 0th row and 2nd word, and the 0th row and 0th word.
A word address is generated and data is written in the third word of the row. When the writing of the data of the 0th row of the image D is completed, the writing of the data of the 1st row of the image D is performed in the same manner as the 0th row. 1 of such image D
Data writing for each row is performed from the 0th row to the (dnx-1) th row. In this way, the data generated by the write data generation unit 3302 is transferred to the write data file 3304, and the image data memory 3203 generated by the data write unit 3303 or the display memory 32 is displayed.
The data stored in the write data file 3304 is sequentially written to the address on 04.

【0068】書き込みデータファイル3304は、データを
最大4ワードまで格納することができる。書き込みデー
タファイル3304に、4ワードのデータが格納されている
場合、書き込みデータファイル3304から制御ユニットC
3307に対してFullフラグが送られる。これにより、制御
ユニットCは、書き込みデータ生成ユニット3302の書き
込みデータファイル3304へのデータ転送を、一時的に停
止させる。また、書き込みデータファイル3304が空の場
合、つまり書き込みデータファイル3304にデータが格納
されていない場合、書き込みデータファイル3304から制
御ユニットDに対してEmpty フラグが送られる。これに
より、制御ユニットD3308は、書き込みデータファイル
3304のデータのメモリへの書き込みをを一時的に停止さ
せる。
The write data file 3304 can store up to 4 words of data. When 4-word data is stored in the write data file 3304, the write data file 3304 to the control unit C
Full flag is sent to 3307. As a result, the control unit C temporarily stops the data transfer of the write data generation unit 3302 to the write data file 3304. If the write data file 3304 is empty, that is, if no data is stored in the write data file 3304, the write data file 3304 sends an Empty flag to the control unit D. As a result, the control unit D3308 becomes the write data file.
Temporarily stop writing the 3304 data to memory.

【0069】(実施例4)本発明の実施例4では、実施
例1でMPUが行なっていた画像データの処理を、全て
専用の回路で行なうとともに、並列に実行するようにし
たものである。以下、本発明の実施例4について、図面
を参照しながら説明する。
(Fourth Embodiment) In the fourth embodiment of the present invention, the processing of the image data, which is performed by the MPU in the first embodiment, is performed by a dedicated circuit and is executed in parallel. Embodiment 4 of the present invention will be described below with reference to the drawings.

【0070】図36は実施例4における画像処理装置の
機能ブロック図である。図36において、3600は表示メ
モリ3604または画像データメモリ3603上の画像データを
処理して、表示メモリ3604または画像データメモリ3603
に書き込む画像処理ユニット、3601は画像処理ユニット
3600を制御するMPU(Multi Processing Unit) 、3602
はMPU3601が実行するプログラムを格納するシステム
メモリ、3603は画像データを格納する画像データメモ
リ、3604はCRT3606に表示される画像データを格納す
る表示メモリ、3605は表示メモリ3604とCRT3606を制
御するCRTコントローラ、3606は表示メモリ3604に格
納された画像データを表示するCRT、3607は32ビッ
トのバスである。この画像処理装置は、画像データメモ
リ3603上または表示メモリ3604上の矩形領域の原画像
を、補間処理をしながらX軸方向、Y軸方向独立の倍率
で拡大縮小処理して、表示メモリ3604または画像データ
メモリ3603に書き込むように構成されている。処理する
データは8ビット/画素のカラー画像データであり、デ
ータの8ビットが1画素に相当する。以下において、微
小領域とは、原画像の画素間の領域をX軸方向に8分
割、Y軸方向に8分割した場合に現れる仮想上の微小な
領域を意味し、また、ワードは32ビット、ショートワ
ードは16ビット、バイトは8ビットを意味するものと
する。
FIG. 36 is a functional block diagram of the image processing apparatus in the fourth embodiment. In FIG. 36, 3600 processes the image data in the display memory 3604 or the image data memory 3603 to display the display memory 3604 or the image data memory 3603.
Image processing unit to write to, 3601 is an image processing unit
MPU (Multi Processing Unit) controlling 3600, 3602
Is a system memory that stores programs executed by the MPU 3601, 3603 is an image data memory that stores image data, 3604 is a display memory that stores image data displayed on the CRT 3606, and 3605 is a CRT controller that controls the display memories 3604 and CRT 3606. 3606 is a CRT for displaying the image data stored in the display memory 3604, and 3607 is a 32-bit bus. This image processing apparatus performs enlargement / reduction processing on an original image in a rectangular area on the image data memory 3603 or the display memory 3604 at independent magnifications in the X-axis direction and the Y-axis direction while performing interpolation processing, and then the display memory 3604 or It is configured to write to the image data memory 3603. The data to be processed is 8-bit / pixel color image data, and 8 bits of the data correspond to 1 pixel. In the following, the minute area means a virtual minute area that appears when the area between pixels of the original image is divided into eight in the X-axis direction and eight in the Y-axis direction, and the word is 32 bits, A short word means 16 bits and a byte means 8 bits.

【0071】以上のように構成された画像処理装置にお
いて、画像データメモリ3603の画像をX軸方向にP倍
(Pは任意の正の有理数)、Y軸方向にQ倍(Qは任意
の正の有理数)して、CRT3606に表示する場合、ま
ず、システムメモリ3602のプログラムにしたがって、M
PU3601が画像処理ユニット3600に初期設定を行ない、
画像処理ユニット3600に起動をかける。すると画像処理
ユニット3600は、画像データメモリ3603から画像データ
を読み出し、補間処理をしながらX軸方向にP倍、Y軸
方向にQ倍にして、表示メモリ3604に書き込む。表示メ
モリ3604に書き込まれた画像は、CRTコントローラ36
05によってCRT3605に表示される。画像処理ユニット
3600による画像の補間処理を伴う拡大縮小処理は、メモ
リ3603、3604上の画像データに対して、同様に行なわれ
る。したがって、画像データメモリ3603の画像をX軸方
向にP倍、Y軸方向にQ倍して、画像データメモリ3603
に格納する場合も、表示メモリ3604の画像をX軸方向に
P倍、Y軸方向にQ倍して、画像データメモリ3603に格
納する場合も、表示メモリ3604の画像をX軸方向にP
倍、Y軸方向にQ倍して表示メモリ4 に書き込む場合
も、全て画像処理ユニット3600がメモリ上の原画像デー
タを読み出し、補間処理をしながらX軸方向にP倍、Y
軸方向にQ倍にしてメモリに書き込む。MPU3601によ
る画像処理ユニット3600の制御、および画像処理ユニッ
ト3600によるメモリ3603、3604からの画像データの読み
出しと処理されたデータのメモリ3603、3604への書き込
みは、全てバス3607を介して行なわれる。つまり、画像
処理ユニット3600が、実施例1の図4の処理を行なう。
ただし、画像処理ユニット3600は、画像データのメモリ
3603、3604からの読み出し、およびメモリ3603、3604へ
の書き込みを、全てワード単位で行なう。
In the image processing apparatus configured as described above, the image in the image data memory 3603 is multiplied by P in the X-axis direction (P is an arbitrary positive rational number) and Q-fold in the Y-axis direction (Q is an arbitrary positive rational number). Rational number) and display it on the CRT 3606. First, according to the program in the system memory 3602, M
PU3601 makes initial settings to the image processing unit 3600,
Start the image processing unit 3600. Then, the image processing unit 3600 reads out the image data from the image data memory 3603, performs P times in the X-axis direction and Q times in the Y-axis direction while performing interpolation processing, and writes the image data in the display memory 3604. The image written in the display memory 3604 is the CRT controller 36.
Displayed on CRT 3605 by 05. Image processing unit
Enlargement / reduction processing involving image interpolation processing by the 3600 is similarly performed on the image data on the memories 3603 and 3604. Therefore, the image in the image data memory 3603 is multiplied by P in the X-axis direction and Q times in the Y-axis direction to obtain the image data memory 3603.
When storing the image in the display memory 3604 P times in the X axis direction and Q times in the Y axis direction and storing it in the image data memory 3603, the image in the display memory 3604 is P times in the X axis direction.
When the image processing unit 3600 reads the original image data on the memory and performs interpolation processing, P times in the X-axis direction
Write to the memory by multiplying by Q in the axial direction. Control of the image processing unit 3600 by the MPU 3601, reading of image data from the memories 3603 and 3604 by the image processing unit 3600, and writing of processed data to the memories 3603 and 3604 are all performed via the bus 3607. That is, the image processing unit 3600 performs the processing of FIG. 4 of the first embodiment.
However, the image processing unit 3600 is a memory for image data.
Reading from 3603 and 3604 and writing to memories 3603 and 3604 are all performed in word units.

【0072】画像処理ユニット3600の内部の機能ブロッ
ク図を図37に示す。3700は拡大縮小後の画像の1行の
画素に対応する原画像領域における微小領域の行番号を
算出する微小領域行算出ユニット、3701は参照するデー
タのメモリ上のワードアドレスを生成し、メモリから画
像データをワード単位で読み出す参照データ読み出しユ
ニット、3702は参照データとしてメモリから読み出した
データを格納する参照データファイル、3703は参照デー
タをX軸方向に8倍補間拡大処理する8倍補間拡大ユニ
ット、3704は補間処理をせずにX軸方向に任意の倍率で
拡大縮小するX方向拡大縮小ユニット、3705は実際にメ
モリに書き込むワードアライメントされたワードデータ
を生成する書き込みデータ生成ユニット、3706は補間拡
大縮小処理されたデータを書き込むメモリ上のワードア
ドレスを生成し、メモリに画像データをワード単位で書
き込むデータ書き込みユニット、3707はデータ書き込み
ユニット3706によって生成されたデータを格納する書き
込みデータファイル、3708は微小領域行算出ユニット37
00と参照データ読み出しユニット3701と参照データファ
イル3702の動作を制御する制御ユニットA、3709は8倍
補間拡大ユニット3703の動作を制御する制御ユニット
B、3710はX方向拡大縮小ユニット3704の動作を制御す
る制御ユニットC、3711は書き込みデータ生成ユニット
3705の動作を制御する制御ユニットD、3712はデータ書
き込みユニット3706と書き込みデータファイル3707の動
作を制御する制御ユニットEである。
FIG. 37 shows a functional block diagram of the inside of the image processing unit 3600. Reference numeral 3700 denotes a minute area row calculation unit for calculating the row number of a minute area in the original image area corresponding to one row of pixels of the scaled image, and 3701 generates a word address on the memory of the data to be referred, A reference data reading unit that reads image data in word units, 3702 is a reference data file that stores the data read from the memory as reference data, and 3703 is an 8x interpolation enlargement unit that performs 8x interpolation enlargement processing of the reference data in the X-axis direction, 3704 is an X-direction enlargement / reduction unit that enlarges / reduces in the X-axis direction at any magnification without performing interpolation processing, 3705 is a write data generation unit that generates word-aligned word data that is actually written to memory, and 3706 is interpolation enlargement. Generates a word address in the memory to write the reduced data, and stores the image data in the memory in word units. The data writing unit to be written by 3707, the writing data file for storing the data generated by the data writing unit 3706, and the small region row calculation unit 37.
00, the reference data reading unit 3701, and the control unit A that controls the operations of the reference data file 3702; 3709, the control unit B that controls the operation of the 8 × interpolation enlarging unit 3703; and 3710, the operation of the X direction enlarging / reducing unit 3704. Control unit C, 3711 is a write data generation unit
A control unit D, 3712, which controls the operation of the 3705, is a control unit E, which controls the operations of the data writing unit 3706 and the write data file 3707.

【0073】微小領域行算出ユニット3700、参照データ
読み出しユニット3701、8倍補間拡大ユニット3703、X
方向拡大縮小ユニット3704、データ書き込みユニット37
06が行なう処理は、図4のそれぞれステップ402,405,40
6 〜408,409,410 の処理に対応する。したがって、画像
データメモリ3603の画像をX軸方向にP倍、Y軸方向に
Q倍して、表示メモリ3604に格納する場合、まず、Y軸
方向の倍率Qにもとづき、微小領域行算出ユニット3700
によって拡大縮小後の画像の1行の画素に対応する原画
像領域における微小領域の行番号が算出される。算出さ
れた微小領域の行番号にもとづき、参照データ読み出し
ユニット3701によって画像データメモリ3603上の近傍2
行のワードアドレスが生成される。生成されたアドレス
の2ワードのデータは、画像データメモリ3603から読み
出され、参照データファイル3702に格納される。参照デ
ータファイル3702に格納されたデータは、参照データと
して8倍補間拡大ユニット3703に供給され、微小領域行
算出ユニット3700によって算出された行番号にもとづい
て、8倍補間拡大ユニットは8倍補間拡大処理を行な
い、4ワード(16画素)のデータを生成する。この8
倍補間拡大ユニットによって生成された4ワードのデー
タは、X軸方向に8倍、Y軸方向にQ倍されたデータに
相当する。X軸方向に8倍、Y軸方向にQ倍にされた4
ワードのデータは、X方向拡大縮小ユニット3704によっ
てX軸方向にP/8倍され、X軸方向にP倍Y軸方向に
Q倍されたデータが生成される。X軸方向拡大縮小ユニ
ットによって生成されたデータは、書き込みデータ生成
ユニット3705によって、バイトシフトとマスク演算が行
なわれ、表示メモリのワード境界にアライメントされた
ワードデータに変換され、書き込みデータファイル3707
に格納される。データ書き込みユニット3706は、表示メ
モリ3604上のアドレスを生成し、書き込みデータファイ
ル3707に格納されたデータは、データ書き込みユニット
3706によって生成された表示メモリ3604上のアドレスに
書き込まれる。以上の動作は、拡大縮小後の同一行の画
素データをX軸方向に連続して生成するように1行ずつ
行なわれ、さらにこの1行ずつの処理は、Y軸方向に連
続して行なわれて、最終的に、補間を伴う拡大縮小処理
された画像が表示メモリ3604に書き込まれる。
Minute area row calculation unit 3700, reference data reading unit 3701, 8 times interpolation enlargement unit 3703, X
Direction scaling unit 3704, data writing unit 37
The processing performed by 06 is steps 402, 405, and 40 in FIG. 4, respectively.
It corresponds to the processing of 6 to 408,409,410. Therefore, when the image in the image data memory 3603 is multiplied by P in the X axis direction and Q times in the Y axis direction and stored in the display memory 3604, first, the minute area row calculation unit 3700 is calculated based on the magnification Q in the Y axis direction.
Thus, the row number of the minute area in the original image area corresponding to the pixels of one row of the scaled image is calculated. Based on the calculated row number of the minute area, the reference data reading unit 3701 causes the vicinity 2 on the image data memory 3603.
The row word address is generated. The 2-word data of the generated address is read from the image data memory 3603 and stored in the reference data file 3702. The data stored in the reference data file 3702 is supplied to the 8 × interpolation enlargement unit 3703 as reference data, and the 8 × interpolation enlargement unit uses the 8 × interpolation enlargement unit based on the line number calculated by the minute area line calculation unit 3700. Processing is performed to generate 4-word (16 pixel) data. This 8
The 4-word data generated by the double interpolation enlargement unit corresponds to the data multiplied by 8 in the X-axis direction and Q times in the Y-axis direction. 8 times in the X-axis direction and Q times in the Y-axis direction 4
The word data is multiplied by P / 8 in the X-axis direction by the X-direction scaling unit 3704, and is multiplied by P in the X-axis direction and Q in the Y-axis direction to generate data. The data generated by the X-axis direction enlarging / reducing unit is byte-shifted and mask-operated by the write-data generating unit 3705 to be converted into word data aligned on the word boundary of the display memory.
Stored in. The data writing unit 3706 generates an address in the display memory 3604, and the data stored in the write data file 3707 is the data writing unit.
It is written to the address on the display memory 3604 generated by the 3706. The above operation is performed row by row so as to continuously generate pixel data of the same row after scaling in the X axis direction, and the processing for each row is continuously performed in the Y axis direction. Then, finally, the image subjected to the enlargement / reduction processing accompanied by the interpolation is written in the display memory 3604.

【0074】以上の一連の各機能ブロックの動作は、制
御ユニットA3708、制御ユニットB3709、制御ユニット
C3710、制御ユニットD3711、制御ユニットE3712によ
って制御される。制御ユニットA3708は、微小領域行算
出ユニット3700と参照データ読み出しユニット3701と参
照データファイル3702を制御し、制御ユニットB3709
は、8倍補間拡大ユニット3703を制御し、制御ユニット
C3710は、X方向拡大縮小ユニット3704を制御し、制御
ユニットD3711は、書き込みデータ生成ユニット3705を
制御し、制御ユニットE3712はデータ書き込みユニット
3706と書き込みデータファイル3707を制御する。制御ユ
ニットA3708、制御ユニットB3709、制御ユニットC37
10、制御ユニットD3711、制御ユニットE3712は、いず
れもPLA(Programable Logic Array) 回路とレジスタ
とカウンタおよび加減算器とによって構成され、一部の
レジスタは、制御ユニットどうしで共有する。制御ユニ
ットによって、PLA回路のサイズ、およびレジスタと
カウンタの数は異なり、また加減算器を持たない場合も
あるが、基本的にPLA回路とレジスタとカウンタによ
ってシーケンサを構成し、PLA回路のプログラムにし
たがって各機能ブロックを制御する。制御ユニットA37
08、制御ユニットB3709、制御ユニットC3710、制御ユ
ニットD3711、制御ユニットE3712からは、それぞれが
制御する各機能ブロックに対して制御信号が送られ、ま
た各機能ブロックからはそれぞれの制御ユニットに対し
てフラグ信号(演算器のゼロフラグ、レジスタファイル
のFullフラグ、Empty フラグなど)が送られる。また、
機能ブロックからのフラグ信号の一部(レジスタファイ
ルのFullフラグ、Empty フラグなど)は、次段または前
段の機能ブロックを制御する制御ユニットにも送られ、
機能ブロック間のデータ転送が制御される。このように
5つの制御ユニットと各機能ブロックとの間で制御信号
とフラグ信号が交換されることにより処理の並列化が実
現される。
The operations of the above series of functional blocks are controlled by the control unit A3708, the control unit B3709, the control unit C3710, the control unit D3711, and the control unit E3712. The control unit A3708 controls the minute area row calculation unit 3700, the reference data reading unit 3701, and the reference data file 3702, and the control unit B3709.
Controls the 8 × interpolation enlarging unit 3703, the control unit C3710 controls the X direction enlarging / reducing unit 3704, the control unit D3711 controls the write data generating unit 3705, and the control unit E3712 controls the data writing unit.
Controls 3706 and write data file 3707. Control unit A3708, control unit B3709, control unit C37
10. Each of the control unit D3711 and the control unit E3712 is composed of a PLA (Programmable Logic Array) circuit, a register, a counter, and an adder / subtractor, and some of the registers are shared by the control units. Depending on the control unit, the size of the PLA circuit and the number of registers and counters may differ, and there may be cases where no adder / subtractor is provided. Control each function block. Control unit A37
08, the control unit B3709, the control unit C3710, the control unit D3711, and the control unit E3712 send a control signal to each functional block controlled by each, and each functional block sends a flag to each control unit. Signals (zero flag of arithmetic unit, Full flag of register file, Empty flag, etc.) are sent. Also,
Some of the flag signals from the functional blocks (Full flag, Empty flag, etc. in the register file) are also sent to the control unit that controls the functional block in the next or previous stage.
Data transfer between functional blocks is controlled. By exchanging the control signal and the flag signal between the five control units and the respective functional blocks in this way, parallelization of the processing is realized.

【0075】さらに、制御ユニットA3708、制御ユニッ
トB3709、制御ユニットC3710、制御ユニットD3711、
制御ユニットE3712は、MPU3601によって制御され
る。MPU3601は、システムメモリ3602のプログラムに
もとづいて、制御ユニットA3708、制御ユニットB370
9、制御ユニットC3710、制御ユニットD3711、制御ユ
ニットE3712のそれぞれのレジスタとカウンタに、所望
の拡大縮小処理のための初期設定を行ない、各制御ユニ
ットを起動する。すると、各制御ユニットがそれぞれが
担当する機能ブロックを制御して、所望の処理が実行さ
れる。
Further, control unit A3708, control unit B3709, control unit C3710, control unit D3711,
The control unit E3712 is controlled by the MPU 3601. The MPU3601 controls the control unit A3708 and the control unit B370 based on the program in the system memory 3602.
9. Initialize the respective registers and counters of the control unit C3710, the control unit D3711, and the control unit E3712 for desired enlargement / reduction processing, and activate each control unit. Then, each control unit controls the functional block that it is in charge of, and the desired processing is executed.

【0076】以下において、各機能ブロックについて説
明する。説明の簡単のため、各機能ブロックの動作の説
明では、上記各実施例と同様に、原画像S(X軸方向の
画素数がsnx 、Y軸方向の画素数がsny の矩形の画像(s
nx,snyは1以上の整数) )をX軸方向にP倍(Pは0よ
り大きい任意の有理数)、Y軸方向にQ倍(Qは0より
大きい任意の有理数)に拡大縮小処理して画像D(X軸
方向の画素数がdnx 、Y軸方向の画素数がdny の矩形の
画像(dnx,dnyは1以上の整数,dnx= Psnx,dny=Qsny))
を生成する場合の動作について述べる。
Each functional block will be described below. For simplification of description, in the description of the operation of each functional block, as in each of the above-described embodiments, the original image S (the rectangular image (s having the number of pixels in the X-axis direction is snx and the number of pixels in the Y-axis direction is sny)
nx, sny is an integer greater than or equal to 1) and is scaled P times in the X axis direction (P is any rational number greater than 0) and Q times in the Y axis direction (Q is any rational number greater than 0). Image D (rectangular image in which the number of pixels in the X axis direction is dnx and the number of pixels in the Y axis direction is dny (dnx, dny is an integer of 1 or more, dnx = Psnx, dny = Qsny))
The operation when generating is described.

【0077】まず、制御ユニットA3708によって制御さ
れる微小領域行算出ユニット3700、参照データ読み出し
ユニット3701、参照データファイル3702について説明す
る。微小領域行算出ユニット3700は、レジスタとカウン
タと加減算器によって構成され、実施例1の図4のステ
ップ402 およびステップ401,412 に対応する処理を行な
う。まず関係式(2)をもとに、拡大縮小後の画像Dの
画素データDstに対応する原画像Sにおける微小領域の
行を示すiとmを算出する。
First, the minute area row calculation unit 3700, the reference data reading unit 3701, and the reference data file 3702 controlled by the control unit A3708 will be described. The small area row calculation unit 3700 is composed of a register, a counter, and an adder / subtractor, and performs the processing corresponding to step 402 and steps 401, 412 of FIG. 4 of the first embodiment. First, based on the relational expression (2), i and m indicating the row of the minute area in the original image S corresponding to the pixel data Dst of the image D after scaling are calculated.

【0078】参照データ読み出しユニット3701は、加減
算器とバスインターフェイス制御回路によって構成さ
れ、図4のステップ405 に対応する処理を行なう。微小
領域行算出ユニット3700によって算出されたiとmの値
をもとに、m=0, 1, 2, 3の場合には、原画像のi
行j列目とi- 1行j列目のワードアドレスを生成し
て、画像データをワード単位で読み出し、m=4, 5,
6, 7の場合は、原画像のi行j列目とi+ 1行j列目
のワードアドレスを生成して、画像データをワード単位
で読み出す。
The reference data reading unit 3701 is composed of an adder / subtractor and a bus interface control circuit, and performs a process corresponding to step 405 of FIG. Based on the values of i and m calculated by the minute region row calculation unit 3700, when m = 0, 1, 2, 3
The word address of the row j-th column and i-1 row j-th column is generated, and the image data is read in word units, and m = 4, 5,
In the cases of 6 and 7, the word address of the i-th row and j-th column and the i + 1-th row and j-th column of the original image is generated, and the image data is read in word units.

【0079】参照データファイル3702は、4個の32ビ
ットレジスタによって構成され、参照データ読み出しユ
ニット3701によって読み出された画像データが格納され
る。参照データファイル3702は、FIFO(First In F
irst Out)として動作し、参照データファイル3702に格
納された画像データは、格納された順に8倍補間拡大ユ
ニット3703へ転送される。参照データファイル3702に、
参照データが4ワード格納されている場合、参照データ
ファイル3702から制御ユニットA3708に対してFullフラ
グが送られる。これにより、制御ユニットAは、参照デ
ータ読み出しユニット3701の参照データの読み出しを、
一時的に停止させる(図39参照)。また、参照データ
ファイル3702が空の場合、つまり参照データが格納され
ていない場合、参照データファイル3702から制御ユニッ
トBに対してEmpty フラグが送られる。これにより、制
御ユニットB3709は、参照データファイル3702から8倍
補間拡大ユニットへのデータの転送を一時的に停止させ
る(図48参照)。
The reference data file 3702 is composed of four 32-bit registers and stores the image data read by the reference data reading unit 3701. The reference data file 3702 is a FIFO (First In F
The image data stored in the reference data file 3702 is transferred to the 8-times interpolation enlargement unit 3703 in the order of storage. In the reference data file 3702,
When four words of reference data are stored, the Full flag is sent from the reference data file 3702 to the control unit A3708. As a result, the control unit A causes the reference data reading unit 3701 to read the reference data,
It is temporarily stopped (see FIG. 39). When the reference data file 3702 is empty, that is, when reference data is not stored, the reference data file 3702 sends an Empty flag to the control unit B. This causes the control unit B3709 to temporarily stop the transfer of data from the reference data file 3702 to the 8 × interpolation enlargement unit (see FIG. 48).

【0080】制御ユニットAによる制御によって、微小
領域行算出ユニット3700と参照データ読み出しユニット
3701と参照データファイル3702は、互いに連動して動作
する。微小領域行算出ユニット3700と参照データ読み出
しユニット3701と参照データファイル3702の動作を、図
38、図39に示す。本実施例では、画素Dstに対応す
る原画像Sにおける微小領域の行を表すiとmは、式
(2)の関係から、DDAアルゴリズム(Digital Diffe
rential Analizer algorithm)を用いて、微小領域行算
出ユニット3700の加減算器がDDA演算を行なうことに
よって算出される。DDA演算では、画素Dstに対応す
る原画像Sにおける微小領域の絶対的な行番号を表すsr
ow(srowは正の整数で式(6)のようにiとmによって
定義される。)を算出し、算出したsrowからiとmを求
める。 srow =8i+m ・・・(6)
Under the control of the control unit A, the minute area row calculation unit 3700 and the reference data reading unit
The 3701 and the reference data file 3702 operate in conjunction with each other. The operations of the minute area row calculation unit 3700, the reference data reading unit 3701, and the reference data file 3702 are shown in FIGS. 38 and 39. In the present embodiment, i and m representing the row of the minute area in the original image S corresponding to the pixel Dst are calculated by the DDA algorithm (Digital Diffe
The calculation is performed by the adder / subtractor of the minute area row calculation unit 3700 by performing a DDA operation using a random analyzer algorithm). In the DDA operation, sr which represents the absolute row number of the minute area in the original image S corresponding to the pixel Dst
ow (srow is a positive integer and is defined by i and m as in Expression (6)), and i and m are obtained from the calculated srow. srow = 8i + m (6)

【0081】図38において、ステップ3800と3801は、
MPU3601による初期設定であり、ステップ3800で微小
領域の絶対的な行番号srowが 4sny/dny に設定され、ス
テップ3801で画像Dの列番号sが0に設定される。MP
U3601が制御ユニットAを起動すると、図38の「スタ
ート」から処理が開始される。まず、ステップ3802で、
8snyとdny の比較を行ない、dny ≦ 8sny の場合には、
ステップ3803で変数rに4snyを初期設定し(sny は正の
整数なので、 8sny/2 = 4sny が成り立つ。)、dny >
8sny の場合には、ステップ3813で変数rに dny/2 を
初期設定する。ここで変数rは、DDA演算の条件判定
に用いる変数である。ステップ3804,3805 では、それぞ
れsrowからiとmが求められ、ステップ3806で、メモリ
から参照データがワード単位で読み出される。ここで、
ステップ3805のsrow%8は、srowを8で割った場合の余り
を表す。ステップ3807では終了判定を行ない、srow = 8
sny - 1 の場合は処理を終了し、それ以外の場合は処理
を続行する。ステップ3808でsrowをインクリメントし、
ステップ3809でrからdny を減算する。ステップ3810で
rの値を判定し、r≦0の場合には、ステップ3811でr
に8snyを加算し、ステップ3812でsをインクリメントし
て、ステップ3804のiの算出に戻り、r>0の場合に
は、ステップ3807〜3810を繰り返す。また、ステップ38
14,3815 では、それぞれsrowからiとmが求められ、ス
テップ3816で、メモリから参照データがワード単位で読
み出される。ステップ3814では終了判定を行ない、srow
= dny -1の場合は処理を終了し、それ以外の場合は処
理を続行する。ステップ3818でsをインクリメントし、
ステップ3819でrから8snyを減算する。ステップ3820で
rの値を判定し、r≦0の場合には、ステップ3821でr
にdny を加算し、ステップ3822でsrowをインクリメント
して、ステップ3814のiの算出に戻り、r>0の場合に
は、そのまま、3814に戻る。
In FIG. 38, steps 3800 and 3801 are
This is the initial setting by the MPU 3601, and the absolute row number srow of the minute area is set to 4sny / dny in step 3800, and the column number s of the image D is set to 0 in step 3801. MP
When the U3601 activates the control unit A, the process starts from "start" in FIG. First, in step 3802,
Comparing 8sny and dny, and if dny ≤ 8sny,
In step 3803, the variable r is initialized to 4sny (since sny is a positive integer, 8sny / 2 = 4sny holds), and dny>
In the case of 8sny, the variable r is initialized to dny / 2 in step 3813. Here, the variable r is a variable used for the condition determination of the DDA operation. In steps 3804 and 3805, i and m are obtained from srow, and in step 3806, the reference data is read from the memory in word units. here,
Srow% 8 in step 3805 represents the remainder when srow is divided by 8. In step 3807, the end judgment is performed and srow = 8
sny-If 1, end the process, otherwise continue. Increment srow in step 3808,
In step 3809, dny is subtracted from r. In step 3810, the value of r is judged. If r ≦ 0, then in step 3811 r
Is incremented by 8sny, s is incremented in step 3812, and the process returns to calculation of i in step 3804. If r> 0, steps 3807 to 3810 are repeated. Also, step 38
At 14,3815, i and m are obtained from srow, and in step 3816, the reference data is read from the memory in word units. In step 3814, the end judgment is performed and srow
If = dny -1, the process is terminated, otherwise the process continues. Increment s in step 3818,
At step 3819 8sny is subtracted from r. In step 3820, the value of r is judged. If r ≦ 0, in step 3821 r
Is added to dny, srow is incremented in step 3822, and the process returns to the calculation of i in step 3814. If r> 0, the process directly returns to 3814.

【0082】図38において、ステップ3800と3801は、
MPU3601の動作であり、ステップ3806と3816の「参照
データの読み出し」は、参照データ読み出しユニット37
01と参照データファイル3702の動作であり、それ以外が
微小領域行算出ユニット3700の動作である。また、ステ
ップ3804と3805、またはステップ3814と3815のsrowから
のiとmの算出は、実際には、srowの算出によって自動
的に行なわれる。srowは、微小領域行算出ユニット3700
の内部のカウンタに相当し、そのカウンタの下位3ビッ
トがmに相当し、それ以外のビットがiに相当する。
「参照データの読み出し」では、画像Dのs行目のデー
タに対応する参照データのワードアドレスが生成され、
メモリから参照データがワード単位で読み出される。図
38に示すように、参照データの読み出しは、画像Dの
0行目のデータに対応する参照データの読み出しから行
なわれ、次に1行目のデータ、2行目のデータと、順次
行なわれ、(dny - 1)行目のデータに対応する参照デー
タのアドレス生成を終了するまで行なわれる。
In FIG. 38, steps 3800 and 3801 are
This is the operation of the MPU3601, and the “reading of reference data” in steps 3806 and 3816 is performed by the reference data reading unit 37.
01 and the operation of the reference data file 3702, and the other operations are the operation of the minute area row calculation unit 3700. In addition, calculation of i and m from srow in steps 3804 and 3805 or steps 3814 and 3815 is actually automatically performed by calculation of srow. srow is a small area row calculation unit 3700
Corresponding to the internal counter, the lower 3 bits of the counter correspond to m, and the other bits correspond to i.
In the “read-out of reference data”, the word address of the reference data corresponding to the s-th row data of the image D is generated,
Reference data is read from the memory in units of words. As shown in FIG. 38, the reference data is read from the reference data corresponding to the data of the 0th row of the image D, then the data of the 1st row, the data of the 2nd row, and so on. , (Dny-1) It is performed until the address generation of the reference data corresponding to the data of the line is completed.

【0083】ステップ3806と3816の「参照データの読み
出し」の手順は、図39に詳しく示されている。微小領
域行算出ユニット3700によって算出されたiとmの値を
もとに、m=0, 1, 2, 3の場合には、原画像のi行
j列目とi- 1行j列目のワードアドレスを生成して、
画像データをワード単位で読み出し、m=4, 5, 6,
7の場合は、原画像のi行j列目とi+ 1行j列目のワ
ードアドレスを生成して、画像データをワード単位で読
み出す。図39において、ステップ3900,3901は初期設
定であり、cnt _swx は、「参照データの読み出し」処
理の終了判定をするカウンタである。ステップ3901の
(SBP + snx - 1)/4 のSBP は、原画像Sの左端の画素
のメモリ上のワード内におけるバイト位置を表す値で、
MPU3601によって設定される値である(SBP は、MP
U3601によって初期設定される原画像Sの最上右端の画
素のメモリ上のバイトアドレスの下位2ビットに相当す
る。したがってSBP は、0〜3の整数である。)。ステ
ップ3901でのcnt _swx の設定値は、メモリ上の原画像
SのX軸方向のワード数から1を引いた値に相当する。
ステップ3902,3903 で、原画像境界における処理をする
か否かの判定をし、原画像境界における処理をする場合
には、ステップ3919〜3925で原画像Sのi行目の画素デ
ータが2回ずつ読み出され、原画像境界における処理を
しない場合には、ステップ3904でmの値の判定を行な
う。m<4の場合(m=0, 1, 2, 3の場合)には、
ステップ3905〜3911で原画像Sのi行目と( i- 1) 行
目のデータが読み出され、m≧4の場合(m=4, 5,
6, 7の場合)には、ステップ3912〜3918で原画像Sの
i行目と( i+ 1) 行目のデータが読み出される。ステ
ップ3905で参照データファイルのFullフラグを判定し、
Fullの場合はFullフラグが消えるまで待ち、Fullでない
場合はステップ3906でi行j列目の画素のワードアドレ
スを生成し、データを読み出す。さらに、ステップ3907
で参照データファイルのFullフラグを判定し、Fullの場
合はFullフラグが消えるまで待ち、Fullでない場合はス
テップ3908で( i- 1) 行j列目の画素のワードアドレ
スを生成し、データを読み出す。ステップ3909で「参照
データの読み出し」処理の終了判定を行ない、cnt _sw
x = 0 の場合は、「参照データの読み出し」処理を終了
し、それ以外の場合、ステップ3910でcnt _swx をデク
リメントし、ステップ3911でjに4を加算して、ステッ
プ3905の参照データファイル3702のFullフラグの判定に
戻る。
The procedure of "reading out reference data" in steps 3806 and 3816 is shown in detail in FIG. Based on the values of i and m calculated by the minute region row calculation unit 3700, in the case of m = 0, 1, 2, 3, the i-th row and j-th column and the i-1 row and j-th column of the original image Generate the word address of
Image data is read word by word, m = 4, 5, 6,
In the case of 7, the word address of the i-th row and the j-th column and the i + 1-th row and the j-th column of the original image is generated, and the image data is read in word units. In FIG. 39, steps 3900 and 3901 are initial settings, and cnt_swx is a counter that determines the end of the “reading of reference data” processing. Step 3901
SBP of (SBP + snx-1) / 4 is a value representing the byte position in the word on the memory of the leftmost pixel of the original image S,
It is a value set by MPU3601 (SBP is MP
It corresponds to the lower 2 bits of the byte address on the memory of the uppermost right end pixel of the original image S initialized by U3601. Therefore, SBP is an integer of 0 to 3. ). The setting value of cnt_swx in step 3901 corresponds to the value obtained by subtracting 1 from the number of words in the X-axis direction of the original image S on the memory.
In steps 3902 and 3903, it is determined whether or not the process at the original image boundary is to be performed. If the process at the original image boundary is to be performed, the pixel data of the i-th row of the original image S is determined twice in steps 3919 to 3925. When the original image boundary is not processed, the value of m is determined in step 3904. If m <4 (m = 0, 1, 2, 3),
In steps 3905 to 3911, the data of the i-th row and the (i-1) -th row of the original image S are read, and when m ≧ 4 (m = 4, 5,
6 and 7), the data of the i-th row and the (i + 1) -th row of the original image S are read in steps 3912 to 3918. In step 3905, determine the Full flag of the reference data file,
If it is Full, wait until the Full flag disappears. If it is not Full, in step 3906 the word address of the pixel at the i-th row and the j-th column is generated and the data is read. In addition, step 3907
Determines the Full flag of the reference data file, waits until the Full flag disappears if it is Full, and if not Full, generates the word address of the pixel at the (j-1) th row and jth column in step 3908 and reads the data. . In step 3909, the end of the “read reference data” process is determined, and cnt_sw
If x = 0, the "read reference data" processing is terminated, otherwise, in step 3910, cnt_swx is decremented, 4 is added to j in step 3911, and the reference data file 3702 in step 3905 is added. Return to the judgment of the Full flag of.

【0084】同様に、ステップ3912で参照データファイ
ル3702のFullフラグを判定し、ステップ3913でi行j行
目の画素のワードアドレスを生成し、データを読み出
す。さらに、ステップ3914で参照データファイル3702の
Fullフラグを判定し、ステップ3915でi行( j+ 1) 列
目の画素のワードアドレスを生成し、データを読み出
す。ステップ3916で「参照データの読み出し」処理の終
了判定を行ない、ステップ3917でcnt _swx をデクリメ
ントし、ステップ3918でjに4を加算して、ステップ39
12の参照データファイル3702のFullフラグの判定に戻
る。また、ステップ3919では参照データファイル3702の
Fullフラグを判定し、ステップ3920でi行j列目の画素
のワードアドレスを生成し、データを読み出す。さら
に、ステップ3921で参照データファイル3702のFullフラ
グを判定し、ステップ3922でi行j列目の画素のワード
アドレスを生成し、データを読み出す。ステップ3923で
「参照データの読み出し」処理の終了判定を行ない、ス
テップ3924でcnt _swx をデクリメントし、ステップ39
25でjに4を加算して、ステップ3919の参照データファ
イル3702のFullフラグの判定に戻る。
Similarly, in step 3912, the Full flag of the reference data file 3702 is judged, and in step 3913 the word address of the pixel on the i-th row and the j-th row is generated and the data is read. Further, in step 3914, the reference data file 3702
The Full flag is determined, the word address of the pixel in the i-th row (j + 1) th column is generated in step 3915, and the data is read. In step 3916, it is determined whether or not the “reading of reference data” processing is finished, in step 3917 cnt_swx is decremented, in step 3918 j is incremented by 4, and then step 39
Returning to the determination of the Full flag of the 12 reference data file 3702. In step 3919, the reference data file 3702
The Full flag is determined, and in step 3920, the word address of the pixel at the i-th row and the j-th column is generated, and the data is read. Further, in step 3921, the Full flag of the reference data file 3702 is determined, and in step 3922, the word address of the pixel in the i-th row and the j-th column is generated and the data is read. In step 3923, it is determined whether or not the “reading of reference data” processing has ended, in step 3924 cnt_swx is decremented, and in step 39
In step 25, 4 is added to j, and the flow returns to the determination of the Full flag of the reference data file 3702 in step 3919.

【0085】図39に示すように、原画像境界における
処理を行なう場合、つまり、原画像Sのi行目の画素デ
ータが2回ずつ読み出す場合、i行j列目の画素データ
をメモリからをワード単位で2回読み出し、次に、i行
( j+ 4) 列目の画素データをメモリからワード単位で
2回読み出し、さらにi行( j+ 8) 列目の画素データ
をメモリからワード単位で2回読み出すというように、
参照データの読み出しが行なわれる。原画像境界におけ
る処理をしない場合で、m=0, 1, 2, 3の時は、図
51のように、i行j列目の画素データがワード単位で
読み出され、次に、( i- 1) 行j列目の画素データが
ワード単位で読み出され、i行( j+ 4) 列目の画素デ
ータがワード単位で読み出され、( i- 1) 行( j+
4) 列目の画素データがワード単位で読み出され、i行
( j+ 8) 列目の画素データがワード単位で読み出さ
れ、( i- 1) 行( j+ 8) 列目の画素データがワード
単位で読み出され、というように参照データの読み出し
が行なわれる。m=4, 5, 6,7の時は、図52のよ
うに、i行j列目の画素データがワード単位で読み出さ
れ、次に、( i+ 1) 行j列目の画素データがワード単
位で読み出され、i行(j+ 4) 列目の画素データがワ
ード単位で読み出され、( i+ 1) 行( j+ 4)列目の
画素データがワード単位で読み出され、i行( j+ 8)
列目の画素データがワード単位で読み出され、( i+
1) 行( j+ 8) 列目の画素データがワード単位で読み
出され、というように参照データの読み出しが行なわれ
る。
As shown in FIG. 39, when processing is performed at the boundary of the original image, that is, when the pixel data of the i-th row of the original image S is read twice, the pixel data of the i-th row and the j-th column is read from the memory. Read twice word by word, then i rows
The pixel data of the (j + 4) th column is read from the memory twice in word units, and the pixel data of the i-th row (j + 8) th column is read twice from the memory in word units.
Reference data is read. When the processing at the boundary of the original image is not performed and m = 0, 1, 2, 3, the pixel data of the i-th row and the j-th column is read in word units as shown in FIG. -1) The pixel data in the row j column is read in word units, the pixel data in the i row (j + 4) column is read in word units, and the (i-1) row (j +
4) The pixel data in the column is read word by word, and the i row
The pixel data of the (j + 8) th column is read in word units, the pixel data of the (i-1) th row (j + 8) th column is read in word units, and so on. Done. When m = 4,5,6,7, as shown in FIG. 52, the pixel data in the i-th row and the j-th column is read in word units, and then the pixel data in the (i + 1) -th row and the j-th column. Is read in word units, the pixel data in the i-th row (j + 4) column is read out in word units, and the pixel data in the (i + 1) th row (j + 4) column is read out in word units And i rows (j + 8)
The pixel data of the column is read in word units, and (i +
1) The pixel data in the row (j + 8) th column is read in word units, and the reference data is read in this manner.

【0086】次に、8倍補間拡大ユニット3703について
図40を参照して説明する。8倍補間拡大ユニット3703
は、制御ユニットB3709によって制御され、補間処理を
しながらX軸方向に8倍に拡大されたデータを生成する
8倍補間拡大処理を行なう。つまり、実施例1の図4の
おけるステップ406 〜408 に対応する処理を行なう。た
だし、8倍補間拡大ユニットは、一度に16画素のデー
タを生成する。図40は8倍補間拡大ユニット3703のブ
ロック図を示し、8倍補間拡大ユニット3703は、参照デ
ータ選択部4000、画素データ比較部4001、選択テーブル
格納部4002、8倍拡大データ選択部4003、128ビット
のレジスタ4004によって構成される。
Next, the 8-times interpolation enlargement unit 3703 will be described with reference to FIG. 8x interpolation enlargement unit 3703
Is controlled by the control unit B3709 and performs an 8 × interpolation enlargement process for generating 8 × enlarged data in the X-axis direction while performing an interpolation process. That is, the processing corresponding to steps 406 to 408 in FIG. 4 of the first embodiment is performed. However, the 8 × interpolation enlargement unit generates 16 pixel data at a time. FIG. 40 shows a block diagram of the 8 × interpolation enlargement unit 3703. It is composed of a bit register 4004.

【0087】参照データ選択部4000は、1回の8倍補間
拡大処理で参照される8画素のデータを選択し、画素デ
ータ比較部4001と8倍拡大データ選択部4003へ参照デー
タを供給する。画素データ比較部4001は、選択された8
画素のデータ(( 4画素) ×( 2行) )によって構成さ
れる3組の画素間の領域ごとに、その領域を囲む画素ど
うしの一致・不一致の関係の組み合わせ、つまり関数C
の値を求める。選択テーブル格納部4002には、図11〜
図25の関数Cの値と選択される画素データの関係を、
データ選択情報を要素とするテーブルに変換した選択テ
ーブルが格納されており、関数Cの値と微小領域の行番
号をもとに、選択テーブル格納部4002から選択テーブル
が読み出され、データ選択情報が8倍拡大データ選択部
4003へ送られる。8倍拡大データ選択部4003は、データ
選択情報をもとに、8画素のデータから8倍拡大処理後
の16画素のデータを選択し、レジスタ4004に格納す
る。つまり、画素データ比較部4001、選択テーブル格納
部4002、8倍拡大データ選択部4003は、実施例1の図4
では、それぞれステップ406,407,408 に対応する処理を
行なう。
The reference data selection unit 4000 selects the data of 8 pixels referred to in one 8-time interpolation enlargement process, and supplies the reference data to the pixel data comparison unit 4001 and the 8-fold enlargement data selection unit 4003. The pixel data comparison unit 4001 selects the selected 8
For each region between three sets of pixels composed of pixel data ((4 pixels) x (2 rows)), a combination of matching / mismatching relations between pixels surrounding the region, that is, the function C
Find the value of. The selection table storage unit 4002 is shown in FIG.
The relationship between the value of the function C in FIG. 25 and the selected pixel data is
A selection table converted into a table having data selection information as an element is stored, and the selection table is read from the selection table storage unit 4002 based on the value of the function C and the row number of the minute area, and the data selection information is read. 8 times enlarged data selection section
Sent to 4003. The 8 × enlarged data selection unit 4003 selects 16 pixel data after the 8 × enlargement processing from the 8 pixel data based on the data selection information and stores it in the register 4004. That is, the pixel data comparison unit 4001, the selection table storage unit 4002, and the 8 × enlarged data selection unit 4003 are the same as those in FIG.
Then, the processes corresponding to steps 406, 407 and 408 are performed.

【0088】参照データ選択部4000は、図41に示すよ
うに、2個の32ビットレジスタの主参照データレジス
タ4108、上下参照データレジスタ4109と、2個の24ビ
ットレジスタの前主参照データレジスタ4110、前上下参
照データレジスタ4111と、6個の8ビット5-1 セレクタ
4100,4102,4103,4104,4106,4107 と、2個の8ビット4-
1 セレクタ4101,4105 によって構成される。8ビット5-
1 セレクタは、制御ユニットB3709からの選択信号にし
たがって、5バイト(5画素)の入力から1バイト(1
画素)を選択して出力するセレクタである。8ビット4-
1 セレクタも同様に、制御ユニットB3709からの選択信
号にしたがって、4バイト(4画素)の入力から1バイ
ト(1画素)を選択して出力するセレクタである。主参
照データレジスタ4108のバイトデータ(画素データ)を
MRD0,MRD1,MRD2,MRD3 、上下参照データレジスタ4109の
バイトデータをTBRD0,TBRD1,TBRD2,TBRD3 、前主参照デ
ータレジスタ4110のバイトデータをPMRD1,PMRD2,PMRD3
、前上下参照データレジスタ4111のバイトデータをPTB
RD1,PTBRD2,PTBRD3とすると、セレクタ4100〜4107は、
図41に示すように、主参照データレジスタ4108、上下
参照データレジスタ4109、前主参照データレジスタ411
0、前上下参照データレジスタ4111の出力のバイトデー
タを入力とし、セレクタ4100〜4107の出力は、それぞれ
LMDATA,MDATA,MDATB,RMDATB,LTBDATA,TBDATA,TBDATB,RT
BDATB として、画素データ比較部4001と、8倍拡大デー
タ選択部4003へ出力される。図41では、レジスタとセ
レクタを分けて図示しているが、実際には、同じ名前の
レジスタのバイトデータとセレクタの入力は、物理的に
接続されている。
As shown in FIG. 41, the reference data selector 4000 includes two 32-bit main reference data registers 4108, upper and lower reference data registers 4109, and two 24-bit previous main reference data registers 4110. , Front and lower reference data register 4111 and 6 8-bit 5-1 selectors
4100,4102,4103,4104,4106,4107 and two 8-bit 4-
1 Consists of selectors 4101 and 4105. 8-bit 5-
1 Selector selects 1 byte (1 pixel) from 5 bytes (5 pixels) input according to the selection signal from the control unit B3709.
It is a selector for selecting and outputting (pixel). 8-bit 4-
Similarly, the 1-selector is a selector that selects and outputs 1 byte (1 pixel) from 4 bytes (4 pixels) input in accordance with a selection signal from the control unit B3709. Byte data (pixel data) from the main reference data register 4108
MRD0, MRD1, MRD2, MRD3, upper and lower reference data register 4109 byte data TBRD0, TBRD1, TBRD2, TBRD3, previous main reference data register 4110 byte data PMRD1, PMRD2, PMRD3
, Byte data of the front / bottom reference data register 4111 to PTB
RD1, PTBRD2, PTBRD3, selectors 4100-4107
As shown in FIG. 41, the main reference data register 4108, the upper / lower reference data register 4109, and the previous main reference data register 411.
0, the byte data of the output of the front / bottom reference data register 4111 is input, and the outputs of the selectors 4100-4107 are respectively
LMDATA, MDATA, MDATB, RMDATB, LTBDATA, TBDATA, TBDATB, RT
It is output as BDATB to the pixel data comparison unit 4001 and the 8 × enlarged data selection unit 4003. In FIG. 41, the register and the selector are shown separately, but in reality, the byte data of the register having the same name and the input of the selector are physically connected.

【0089】主参照データレジスタ4108と上下参照デー
タレジスタ4109には、参照データファイル3702に格納さ
れている参照データが交互に転送される。また、主参照
データレジスタ4108のバイトMRD1,MRD2,MRD3の出力は、
それぞれ前主参照データレジスタ4110のバイトPMRD1,PM
RD2,PMRD3 の入力に、上下参照データレジスタ4109のバ
イトTBRD1,TBRD2,TBRD3 の出力は、それぞれ前上下参照
データレジスタ4111のバイトPTBRD1,PTBRD2,PTBRD3の入
力に接続し、制御ユニットB3709からの制御信号にした
がってデータ転送が行なわれる。つまり、制御ユニット
B3709による参照データファイル3702からのデータ転送
の制御と、レジスタ間のデータ転送の制御と、セレクタ
4100〜4107の制御により、参照データ選択部4000は、画
素データ比較部4001と、8倍拡大データ選択部4003へ参
照データを供給する。セレクタ4100〜4107によるバイト
データ(画素データ)の選択パターンは、図53に示す
24種類の選択パターンSEL0,SEL1,SEL2...,SEL22,SEL2
3 に分類される。図53は、それぞれの選択パターンに
おいて、参照データLMDATA,MDATA,MDATB,RMDATB,LTBDAT
A,TBDATA,TBDATB,RTBDATB として選択されるバイトデー
タを示している。制御ユニットB3709は、セレクタ4100
〜4107に対して、SEL0〜SEL23 の選択パターンのバイト
データの選択を行なう制御信号を図47に示す手順で生
成する。図47は、画像Dのs行目のデータの生成にお
ける参照データの選択の手順を示している。図47の手
順で参照データを選択することにより、8倍補間拡大ユ
ニットは、拡大縮小後の画像Dのs行目のデータの生成
における8倍補間拡大処理をX軸方向に連続して行な
う。参照データ選択部が参照データを選択する手順につ
いては、後で、詳しく説明する。
The reference data stored in the reference data file 3702 is alternately transferred to the main reference data register 4108 and the upper and lower reference data register 4109. The output of bytes MRD1, MRD2, MRD3 of the main reference data register 4108 is
Byte PMRD1, PM of previous main reference data register 4110 respectively
RD2, PMRD3 input is connected to the upper / lower reference data register 4109 bytes TBRD1, TBRD2, TBRD3 output respectively connected to the previous upper / lower reference data register 4111 byte PTBRD1, PTBRD2, PTBRD3 input, and control signal from the control unit B3709. Data is transferred in accordance with the above. That is, control of data transfer from the reference data file 3702 by the control unit B3709, control of data transfer between registers, and selector
Under the control of 4100 to 4107, the reference data selection unit 4000 supplies the reference data to the pixel data comparison unit 4001 and the 8 × enlarged data selection unit 4003. The selection patterns of byte data (pixel data) by the selectors 4100 to 4107 are 24 types of selection patterns SEL0, SEL1, SEL2 ..., SEL22, SEL2 shown in FIG.
Classified into 3. FIG. 53 shows reference data LMDATA, MDATA, MDATB, RMDATB, LTBDAT in each selection pattern.
It shows the byte data selected as A, TBDATA, TBDATB, RTBDATB. The control unit B3709 is a selector 4100.
A control signal for selecting byte data of the selection patterns SEL0 to SEL23 is generated in correspondence to 4107 by the procedure shown in FIG. FIG. 47 shows a procedure of selecting reference data in the generation of the s-th row of the image D. By selecting the reference data in the procedure of FIG. 47, the 8 × interpolation / enlargement unit continuously performs the 8 × interpolation / enlargement processing in the generation of the s-th row data of the image D after enlargement / reduction in the X-axis direction. The procedure for the reference data selection unit to select the reference data will be described in detail later.

【0090】画素データ比較部4001は、図42のよう
に、16個の比較回路4200〜4215によって構成される。
比較回路は、図43に示す論理の回路であり、2バイト
の入力のそれぞれのビットが一致する場合のみ" 1" を
出力し、それ以外の場合は" 0" を出力する。各比較回
路には、LMDATA,MDATA,MDATB,RMDATB,LTBDATA,TBDATA,T
BDATB,RTBDATB のバイトデータが図42に示すように入
力され、各入力画素データ間の比較結果が出力される。
比較回路4200〜4215の出力は、LMDATAとMDATA とLTBDAT
A とTBDATAの4画素のデータ間の一致・不一致の関係を
表す6ビットの信号LA(5:0) 、MDATA とMDATB とTBDATA
とTBDATBの4画素のデータ間の一致・不一致を表す6ビ
ットの信号MA(5:0) 、MDATB とRMDATBとTBDATBとRTBDAT
B の4画素のデータ間の一致・不一致を表す6ビットの
信号RA(5:0) に再編成され、選択テーブル格納部4002へ
出力される。ここで、4画素のデータ間の一致・不一致
の関係を表す6ビットの信号LA(5:0),MA(5:0),RA(5:0)
は、それぞれC(LMDATA,MDATA,LTBDATA,TBDATA)、C
(MDATA,MDATB,TBDATA,TBDATB)、C(MDATB,RMDARB,TB
DATB,RTBDATB)(m= 4, 5, 6, 7の場合)またはC
(LTBDATA,TBDATA,LMDATA,MDATA )、C(TBDATA,TBDAT
B,MDATA,MDATB )、C(TBDATB,RTBDATB,MDATB,RMDATB
)(m= 0, 1, 2, 3の場合)に相当する。
The pixel data comparison unit 4001 is composed of 16 comparison circuits 4200 to 4215 as shown in FIG.
The comparison circuit is a circuit having the logic shown in FIG. 43, and outputs "1" only when the respective bits of the 2-byte input match, and outputs "0" otherwise. LMDATA, MDATA, MDATB, RMDATB, LTBDATA, TBDATA, T
The byte data of BDATB and RTBDATB is input as shown in FIG. 42, and the comparison result between each input pixel data is output.
The outputs of the comparator circuits 4200-4215 are LMDATA, MDATA and LTBDAT.
A 6-bit signal LA (5: 0), MDATA, MDATB, and TBDATA that indicates a match / mismatch relationship between the 4 pixel data of A and TBDATA.
6-bit signal MA (5: 0), which indicates the match / mismatch between 4 pixel data of TBDATB and TBDATB, MDATB, RMDATB, TBDATB and RTBDAT
The data is reorganized into a 6-bit signal RA (5: 0) representing the match / mismatch between the data of 4 pixels of B and output to the selection table storage unit 4002. Here, a 6-bit signal LA (5: 0), MA (5: 0), RA (5: 0) that represents a match / mismatch relationship between data of 4 pixels.
Are C (LMDATA, MDATA, LTBDATA, TBDATA) and C respectively
(MDATA, MDATB, TBDATA, TBDATB), C (MDATB, RMDARB, TB
DATB, RTBDATB) (when m = 4,5,6,7) or C
(LTBDATA, TBDATA, LMDATA, MDATA), C (TBDATA, TBDAT
B, MDATA, MDATB), C (TBDATB, RTBDATB, MDATB, RMDATB
) (M = 0, 1, 2, 3).

【0091】選択テーブル格納部4002は、図44のよう
に、3個のエンコーダ4400〜4402と、選択テーブルを格
納した3個のROM(Read Only Memory)4403〜4405によ
って構成される。エンコーダ4400,4401,4402は、LA(5:
0),MA(5:0),RA(5:0) を、それぞれを4ビットにエンコ
ードし、微小領域行算出ユニット3700によって算出され
た行番号を示す3ビットの信号m(2:0)と共に、それぞれ
ROM4403,4404,4405にアドレスとして入力される。選
択テーブルは、データ選択情報を要素とするテーブルで
あり、ROM4403,4404,4405は、データ選択情報を8倍
拡大データ選択部4003を制御する選択信号として出力す
る。ROM4403は、A0SEL(1:0),A1SEL(1:0),A2SEL(1:
0),A3SEL(1:0) の8ビット(2bits×4)の選択信号を出力
し、ROM4404は、A4SEL(1:0),A5SEL(1:0),A6SEL(1:
0),A37SEL(1:0),B0SEL(1:0),B1SEL(1:0),B2SEL(1:0),B3
SEL(1:0)の16ビット(2bits×8)の選択信号を出力し、
ROM4405は、B4SEL(1:0),B5SEL(1:0),B6SEL(1:0),B7S
EL(1:0) の8ビット(2bits×4)の選択信号を出力する。
選択信号は、2ビットで選択する画素データを示し、そ
の値と選択される画素の位置との関係は、図45に示す
通りである。
As shown in FIG. 44, the selection table storage section 4002 is composed of three encoders 4400 to 4402 and three ROMs (Read Only Memory) 4403 to 4405 storing the selection tables. Encoders 4400, 4401, and 4402 have LA (5:
0), MA (5: 0), RA (5: 0) are each encoded into 4 bits, and a 3-bit signal m (2: 0) indicating the row number calculated by the minute area row calculation unit 3700. At the same time, they are input as addresses into the ROMs 4403, 4404, and 4405, respectively. The selection table is a table having data selection information as an element, and the ROMs 4403, 4404, 4405 output the data selection information as a selection signal for controlling the 8-fold enlarged data selection unit 4003. ROM4403 has A0SEL (1: 0), A1SEL (1: 0), A2SEL (1:
0), A3SEL (1: 0) 8-bit (2 bits × 4) selection signal is output, and ROM4404 writes A4SEL (1: 0), A5SEL (1: 0), A6SEL (1:
0), A37SEL (1: 0), B0SEL (1: 0), B1SEL (1: 0), B2SEL (1: 0), B3
Output the 16-bit (2 bits × 8) selection signal of SEL (1: 0),
ROM4405 has B4SEL (1: 0), B5SEL (1: 0), B6SEL (1: 0), B7S
Output the 8-bit (2 bits × 4) selection signal of EL (1: 0).
The selection signal indicates pixel data selected by 2 bits, and the relationship between the value and the position of the selected pixel is as shown in FIG.

【0092】ROM4404に格納されている選択テーブル
は、まさに、図11〜図25を、拡大縮小後の画素とし
て選択される画素の4画素間における相対的な識別情報
を要素とする8×8のサイズの15個のテーブルに変換
したものであり、入力信号MA(5:0),m(2:0)と出力信号A4
SEL(1:0),A5SEL(1:0),A6SEL(1:0),A7SEL(1:0),B0SEL(1:
0),B1SEL(1:0),B2SEL(1:0),B3SEL(1:0) との関係は、図
54のようになる。例えば、MA(5:0)=100110,m(2:0)=5
の場合、MA(5:0)=100110の場合の選択テーブルのm(2:0)
=5の行の選択信号が出力される。また、ROM4403の入
力信号LA(5:0),m(2:0)と出力信号A0SEL(1:0),A1SEL(1:
0),A2SEL(1:0),A3SEL(1:0) との関係は、図55のよう
になり、ROM4405の入力信号RA(5:0),m(2:0)と出力信
号B4SEL(1:0),B5SEL(1:0),B6SEL(1:0),B7SEL(1:0) との
関係は、図56のようになっており、ROM4403に格納
されているテーブルは、ROM4404に格納されているテ
ーブル、の出力信号B0SEL(1:0),B1SEL(1:0),B2SEL(1:
0),B3SEL(1:0) に対応する部分と等しく、ROM4405に
格納されているテーブルは、ROM4404に格納されてい
るテーブルの出力信号A4SEL(1:0),A5SEL(1:0),A6SEL(1:
0),A7SEL(1:0) に対応する部分と等しい。
The selection table stored in the ROM 4404 is exactly the same as that shown in FIGS. 11 to 25, and is an 8 × 8 element having the relative identification information among the four pixels of the pixel selected as the pixel after scaling. It is converted into a table of 15 sizes, and input signals MA (5: 0), m (2: 0) and output signals A4
SEL (1: 0), A5SEL (1: 0), A6SEL (1: 0), A7SEL (1: 0), B0SEL (1:
The relationship with 0), B1SEL (1: 0), B2SEL (1: 0), and B3SEL (1: 0) is as shown in FIG. For example, MA (5: 0) = 100110, m (2: 0) = 5
In case of MA (5: 0) = 100110, m (2: 0) in the selection table
= 5 row selection signal is output. The ROM4403 input signals LA (5: 0), m (2: 0) and output signals A0SEL (1: 0), A1SEL (1:
The relationship between 0), A2SEL (1: 0), A3SEL (1: 0) is as shown in FIG. 55, and the input signals RA (5: 0), m (2: 0) of ROM4405 and the output signal B4SEL ( 1: 0), B5SEL (1: 0), B6SEL (1: 0), B7SEL (1: 0) is as shown in FIG. 56, and the table stored in ROM4403 is stored in ROM4404. Output signal of stored table, B0SEL (1: 0), B1SEL (1: 0), B2SEL (1:
0), B3SEL (1: 0) and the table stored in ROM4405 is the same as the output signal A4SEL (1: 0), A5SEL (1: 0), A6SEL of the table stored in ROM4404. (1:
Equal to the part corresponding to 0), A7SEL (1: 0).

【0093】8倍拡大データ選択部4003は、図46のよ
うに、16個の8ビット4- 1セレクタ4600〜4615によ
って構成される。セレクタ4600〜4603は、LDATA,MDATA,
TBDATA,LTBDATAを入力として、それぞれ、選択信号A0SE
L(1:0),A1SEL(1:0),A2SEL(1:0),A3SEL(1:0) にしたがっ
てデータを選択する。セレクタ4604〜4611は、MDATA,MD
ATB,TBDATB,TBDATA を入力として、それぞれ、選択信号
A4SEL(1:0),A5SEL(1:0),A6SEL(1:0),A7SEL(1:0),B0SEL
(1:0),B1SEL(1:0),B2SEL(1:0),B3SEL(1:0) にしたがっ
てデータを選択する。セレクタ4612〜4615は、MDATB,RD
ATB,RTBDATB,TBDATBを入力として、それぞれ、選択信号
B4SEL(1:0),B5SEL(1:0),B6SEL(1:0),B7SEL(1:0) にした
がってデータを選択する。セレクタ4600〜4615の出力
は、レジスタ4004のそれぞれバイト0〜バイト15に格
納される。レジスタ4004に格納されたデータは、X軸方
向に8倍に拡大され、補間処理されたデータである。
As shown in FIG. 46, the 8 × enlarged data selection section 4003 is composed of 16 8-bit 4-1 selectors 4600-4615. Selectors 4600-4603 are LDATA, MDATA,
TBDATA and LTBDATA as input, select signal A0SE respectively
Select data according to L (1: 0), A1SEL (1: 0), A2SEL (1: 0), A3SEL (1: 0). Selectors 4604 to 4611 are MDATA, MD
Inputs ATB, TBDATB, TBDATA, and select signals respectively
A4SEL (1: 0), A5SEL (1: 0), A6SEL (1: 0), A7SEL (1: 0), B0SEL
Select data according to (1: 0), B1SEL (1: 0), B2SEL (1: 0), B3SEL (1: 0). Selectors 4612-4615 are MDATB, RD
ATB, RTBDATB, TBDATB as input, select signal respectively
Data is selected according to B4SEL (1: 0), B5SEL (1: 0), B6SEL (1: 0), B7SEL (1: 0). The outputs of the selectors 4600 to 4615 are stored in the byte 0 to the byte 15 of the register 4004, respectively. The data stored in the register 4004 is data that has been enlarged eight times in the X-axis direction and subjected to interpolation processing.

【0094】参照データファイル3702に格納されている
データは、メモリからワード単位で読み出されたデータ
である。したがって、原画像の左右両端の画素データを
含むワードデータには、原画像の領域外のデータが含ま
れる場合がある。また、原画像の左右両端の画素データ
を8倍補間拡大処理する場合には、原画像境界における
処理をする必要がある。そこで、本実施例では、図47
に示す手順で、参照データの選択をすることにより、ワ
ードデータから原画像の領域内の画素データだけを選択
し、しかも、画素データ比較部で、原画像境界における
処理が行なわれるように、画素データを選択する。
The data stored in the reference data file 3702 is the data read from the memory in word units. Therefore, the word data including the pixel data at the left and right ends of the original image may include data outside the area of the original image. Further, when the pixel data at the left and right ends of the original image are subjected to the 8-fold interpolation enlargement processing, it is necessary to perform the processing at the original image boundary. Therefore, in the present embodiment, FIG.
By selecting the reference data by the procedure shown in, only the pixel data in the area of the original image is selected from the word data, and the pixel data comparison unit performs processing at the boundary of the original image. Select data.

【0095】図47において、ステップ4700では、cnt
_sbx にsnx が設定される。cnt _sbx は、「画像Dの
s行目のデータの生成における参照データの選択」の終
了判定に用いる制御ユニットB3709の内部のカウンタで
ある。ステップ4701でSBP の値を判定し、SBP=0,1 の場
合は、ステップ4705で「参照データロード」を行ない、
SBP=2,3 の場合は、ステップ4702で「参照データロー
ド」を行なう。「参照データロード」は、参照データフ
ァイル3702から主参照データレジスタ4108と上下参照デ
ータレジスタ4109への参照データの転送であり、その手
順は、図48に詳しく示されている。ステップ4703で
は、主参照データレジスタ4108から前主参照データレジ
スタ4110へ、上下参照データレジスタ4109から前上下参
照データレジスタ4111へデータを転送する。ステップ4704
では、cnt _sbx から(4 - SBP) を減算した場合の値が
1以上かを判定する。1以上の場合は、ステップ4705で
「参照データロード」を行ない、それ以外の場合は、ス
テップ4715へ進む。ステップ4706でcnt _sbx から2を
減算し、ステップ4707でcnt _sbx が1以上かを判定す
る。cnt _sbx が1以上の場合、ステップ4708,4709,47
10でSBP の値を判定し、SBP=0 の場合はステップ4711で
SEL4の選択パターンでデータを選択し、SBP=1 の場合は
ステップ4712でSEL5の選択パターンで、SBP=2 の場合は
ステップ4713でSEL6の選択パターンで、SBP=3 の場合は
ステップ4714でSEL7の選択パターンでデータを選択す
る。ステップ4707でcnt _sbx の値が1より小さい場合
はステップ4720へ進む。ステップ4729でSBP の値を判定
し、SBP=0,1 の場合は、ステップ4730で主参照データレ
ジスタ4108から前主参照データレジスタ4110へ、上下参
照データレジスタ4109から前上下参照データレジスタ41
11へデータを転送し、SBP=2,3の場合は、ステップ4732
へ進む。ステップ4731で「参照データロード」を行な
い、ステップ4732では、SBP に2を加算し4で割った場
合の余りをSBP に設定し、さらにcnt _sbx から2を減
算する。ステップ4733でcnt _sbx が1以上かを判定
し、cnt _sbx が1以上の場合、ステップ4734,4735,47
36でSBP の値を判定し、SBP=0 の場合はステップ4727で
SEL0の選択パターンでデータを選択し、SBP=1の場合は
ステップ4738でSEL1の選択パターンで、SBP=2 の場合は
ステップ4739でSEL2の選択パターンで、SBP=3 の場合は
ステップ4740でSEL3の選択パターンでデータを選択し
て、ステップ4729へ戻る。4733でcnt _sbx が1より小
さい場合は、ステップ4741でcnt _sbx の値が0か判定
する。cnt _sbx = 0 の場合は、ステップ4742,4743,47
44でSBP の値を判定し、SBP=0 の場合はステップ4745で
SEL8の選択パターンでデータを選択し、SBP=1 の場合は
ステップ4746でSEL9の選択パターンで、SBP=2 の場合は
ステップ4747でSEL10 の選択パターンで、SBP=3 の場合
はステップ4748でSEL11 の選択パターンでデータを選択
して、処理を終了する。ステップ4741でcnt _sbx < 0
の場合は、ステップ4749,4750,4751でSBP の値を判定
し、SBP=0 の場合はステップ4752でSEL12 の選択パター
ンでデータを選択し、SBP=1 の場合はステップ4753でSE
L13 の選択パターンで、SBP=2 の場合はステップ4754で
SEL14 の選択パターンで、SBP=3 の場合はステップ4755
でSEL15 の選択パターンでデータを選択して、処理を終
了する。ステップ4715では、cnt _sbx の値が1か、つ
まり、snx = 1 かどうかを判定し、cnt _sbx = 1 の場
合はステップ4716でSBP の値を判定し、SBP=2 の場合は
ステップ4719でSEL22 の選択パターンでデータを選択
し、SBP=3 の場合はステップ4718でSEL23 の選択パター
ンでデータ選択して、処理を終了する。ステップ4715の
判定でcnt _sbx の値が1でない場合、ステップ4717で
SEL18 の選択パターンでデータを選択して、処理を終了
する。ステップ4720では、cnt _sbx の値が0かを判定
する。cnt _sbx= 0 の場合は、ステップ4722,4723 でS
BP の値を判定し、SBP=0 の場合はステップ4726でSEL16
の選択パターンでデータを選択し、SBP=1 の場合は472
7でSEL17の選択パターンで、それ以外の場合はステップ
4728でSEL19 の選択パターンでデータを選択して、処理
を終了する。ステップ4720の判定でcnt _sbx の値が0
ではない場合は、ステップ4721でSBP の値を判定し、SB
P=0 の場合はステップ4724でSEL20 の選択パターンでデ
ータを選択し、SBP=1 の場合はステップ4725でSEL21 の
選択パターンでデータを選択して、処理を終了する。
In FIG. 47, in step 4700, cnt
Snx is set in _sbx. cnt_sbx is a counter inside the control unit B3709 used for determining the end of “selection of reference data in generation of data of sth row of image D”. In step 4701, determine the value of SBP, and if SBP = 0,1, execute "load reference data" in step 4705,
If SBP = 2,3, “reference data load” is performed in step 4702. The “reference data load” is the transfer of reference data from the reference data file 3702 to the main reference data register 4108 and the upper / lower reference data register 4109, and the procedure thereof is shown in detail in FIG. In step 4703, data is transferred from the main reference data register 4108 to the previous main reference data register 4110, and from the up / down reference data register 4109 to the previous up / down reference data register 4111. Step 4704
Then, it is determined whether the value when (4-SBP) is subtracted from cnt_sbx is 1 or more. If it is 1 or more, "reference data load" is performed in step 4705, and if not, the process proceeds to step 4715. In step 4706, 2 is subtracted from cnt_sbx, and in step 4707 it is determined whether cnt_sbx is 1 or more. If cnt_sbx is 1 or more, steps 4708, 4709, 47
The value of SBP is judged at 10, and if SBP = 0, at step 4711.
Select data with the SEL4 selection pattern.If SBP = 1, select the SEL5 selection pattern in step 4712; if SBP = 2, select the SEL6 selection pattern in step 4713; if SBP = 3 select SEL7 in step 4714. Select the data with the selection pattern of. If the value of cnt_sbx is smaller than 1 in step 4707, the operation proceeds to step 4720. In step 4729, the SBP value is determined. If SBP = 0,1, in step 4730 the main reference data register 4108 to the previous main reference data register 4110, and the upper / lower reference data register 4109 to the previous upper / lower reference data register 41
Transfer data to 11 and if SBP = 2,3, step 4732
Go to. In step 4731, "reference data load" is performed. In step 4732, the remainder when SBP is incremented by 2 and divided by 4 is set in SBP, and 2 is further subtracted from cnt_sbx. In step 4733, it is determined whether cnt_sbx is 1 or more, and when cnt_sbx is 1 or more, steps 4734, 4735, 47
The value of SBP is judged at 36, and if SBP = 0, at step 4727.
Select data with the selection pattern of SEL0, select the pattern of SEL1 in step 4738 if SBP = 1, select the pattern of SEL2 in step 4739 if SBP = 2, or select SEL3 in step 4740 if SBP = 3. Select data with the selection pattern of and return to step 4729. If cnt_sbx is smaller than 1 in 4733, it is determined in step 4741 whether the value of cnt_sbx is 0. If cnt_sbx = 0, steps 4742,4743,47
The value of SBP is determined in 44, and if SBP = 0, in step 4745
Select the data with the selection pattern of SEL8, select the pattern of SEL9 in step 4746 if SBP = 1, select the pattern of SEL10 in step 4747 if SBP = 2, or select SEL11 in step 4748 if SBP = 3. The data is selected with the selection pattern of, and the process ends. Cnt_sbx <0 at step 4741
In case of, the value of SBP is judged in steps 4749, 4750, 4751, in case of SBP = 0, data is selected in the selection pattern of SEL12 in step 4752, and in case of SBP = 1, SE is executed in step 4753.
In the selection pattern of L13, if SBP = 2, go to step 4754.
In the selection pattern of SEL14, if SBP = 3, step 4755
Use to select data with the selection pattern of SEL15, and end the process. In step 4715, it is determined whether the value of cnt_sbx is 1, that is, if snx = 1, and if cnt_sbx = 1, the value of SBP is determined in step 4716, and if SBP = 2, the SEL22 in step 4719 is determined. The data is selected by the selection pattern of No. 2, and when SBP = 3, the data is selected by the selection pattern of SEL23 at Step 4718, and the process is ended. If it is determined in step 4715 that the value of cnt_sbx is not 1, then in step 4717
Select the data with the selection pattern of SEL18 and finish the process. In step 4720, it is determined whether the value of cnt_sbx is 0. If cnt_sbx = 0, S in steps 4722 and 4723
Judge the value of BP, and if SBP = 0, select SEL16 in step 4726.
Select data with the selection pattern of and 472 when SBP = 1
Select pattern of SEL17 in 7, otherwise step
The data is selected by the selection pattern of SEL19 in 4728, and the process ends. In step 4720, the value of cnt_sbx is 0.
If not, step 4721 determines the value of SBP and SB
If P = 0, the data is selected in the selection pattern of SEL20 in step 4724, and if SBP = 1, the data is selected in the selection pattern of SEL21 in step 4725, and the process ends.

【0096】図48において、ステップ4800では、参照
データファイル3702のEmpty フラグを判定し、Empty の
場合はEmpty フラグが消えるまで待ち、Empty でない場
合はステップ4801で参照データファイル3702から主参照
データレジスタ4108へデータを転送する。さらに、ステ
ップ4802で参照データファイルのEmpty フラグを判定
し、Empty の場合はEmpty フラグが消えるまで待ち、Em
pty でない場合はステップ4803で参照データファイル37
02から上下参照データレジスタへデータ4109を転送す
る。
In FIG. 48, in Step 4800, the Empty flag of the reference data file 3702 is judged. If it is Empty, wait until the Empty flag disappears. If it is not Empty, in Step 4801 from the reference data file 3702 to the main reference data register 4108. Transfer data to. Further, in Step 4802, the Empty flag of the reference data file is judged, and in the case of Empty, wait until the Empty flag disappears, then Em
If it is not pty, reference data file 37 in step 4803
The data 4109 is transferred from 02 to the upper / lower reference data register.

【0097】例えば、画像Dのs行目のデータを生成す
る場合、m<4の場合には、参照データ読み出しユニッ
ト3701は、i行0列目の画素のワードデータ、( i-
1) 行0列目の画素のワードデータ、i行4列目の画素
のワードデータ、( i- 1) 行4列目の画素のワードデ
ータ、i行8列目の画素のワードデータ、( i- 1) 行
8列目の画素のワードデータというように参照データの
読み出しを行ない、m≧4の場合には、参照データ読み
出しユニット3701は、i行0列目の画素のワードデー
タ、( i+ 1) 行0列目の画素のワードデータ、i行4
列目の画素のワードデータ、( i+ 1) 行4列目の画素
のワードデータ、i行8列目の画素のワードデータ、(
i+ 1) 行8列目の画素のワードデータというように参
照データの読み出しを行なう(sとiとmは式(2)を
満たすものとする。)。参照データファイルは、FIF
Oとして動作するので、m<4の場合には、主参照デー
タレジスタ4108と前主参照データレジスタ4110には、i
行目のX軸方向に連続するデータが、上下参照データレ
ジスタ4109と前上下参照データレジスタ4111には、( i
- 1) 行目のX軸方向に連続するデータが格納される。
また、m≧4の場合には、主参照データレジスタ4108と
前主参照データレジスタ4110には、i行目のX軸方向に
連続するデータが、上下参照データレジスタ4109と前上
下参照データレジスタ4111には、( i+ 1) 行目のX軸
方向に連続するデータが格納される。図47の手順にし
たがって、参照データが選択されることにより、画像D
のs行目のデータの生成における8倍補間拡大処理がX
軸方向に連続して行なわれる。特に、原画像の左端ある
いは右端の画素データを処理する場合には、図47の手
順にしたがってSEL4〜SEL23 のいずれかの選択パターン
で参照データが選択される。選択パターンSEL4〜SEL23
では同一の画素データを、X軸方向に隣合う参照データ
として選択する。これによって、実施例1の原画像境界
における処理と同等の処理が行なわれる。
For example, when the data of the s-th row of the image D is generated and m <4, the reference data reading unit 3701 causes the word data of the pixel of the i-th row and the 0-th column, (i-
1) Word data of pixel in row 0 column, word data of pixel in i row 4 column, (i-1) Word data of pixel in row 4 column, word data of pixel in i row 8 column, ( i-1) Read reference data such as word data of pixel at row 8 column. When m ≧ 4, the reference data reading unit 3701 causes the word data of pixel at row i, column 0, ( i + 1) Word data of pixel in row 0 column, i row 4
Word data of pixel in column, (i + 1) row 4th column of pixel, i row 8th column of word data, (
i + 1) The reference data is read out, such as the word data of the pixel at the 8th row and the 8th row (s, i, and m satisfy the expression (2)). The reference data file is FIF
Since it operates as O, when m <4, the main reference data register 4108 and the previous main reference data register 4110 are
Data continuous in the X-axis direction of the row is stored in the upper and lower reference data registers 4109 and the front and lower reference data registers 4111 ((i
-1) Stores continuous data in the X-axis direction of the line.
When m ≧ 4, the main reference data register 4108 and the previous main reference data register 4110 store the continuous data in the X-axis direction of the i-th row in the vertical reference data register 4109 and the previous vertical reference data register 4111. Stores data continuous in the X-axis direction of the (i + 1) th row. By selecting the reference data according to the procedure of FIG. 47, the image D
8 times interpolation enlargement processing in the generation of the s-th row of
It is performed continuously in the axial direction. In particular, when processing the pixel data at the left end or the right end of the original image, the reference data is selected according to the selection pattern of any of SEL4 to SEL23 according to the procedure of FIG. Selection pattern SEL4 to SEL23
Then, the same pixel data is selected as adjacent reference data in the X-axis direction. As a result, the same processing as the processing at the original image boundary in the first embodiment is performed.

【0098】次にX方向拡大縮小ユニット3704の内部構
成と動作について説明する。X方向拡大縮小ユニット37
04は、8倍補間拡大ユニット3703によって8倍補間拡大
処理されたデータをX軸方向にP/8倍にする。X方向
拡大縮小ユニット3704は、図49に示すように、マッピ
ングパターン生成回路4900と、64ショートワード(1
ショートワードは16ビットを意味する。)のマッピン
グパターンを格納するパターンレジスタファイル4901
と、8倍補間拡大ユニットの出力データを格納する12
8ビットのレジスタ4902,4903 と、入力データをバイト
(8ビット)単位で0バイト〜15バイト左シフトする
バレルシフタ4904と、マッピングパターンにしたがって
入力データをバイト単位でコピーまたは間引いて拡大縮
小するバレルセレクタ4905と、バレルセレクタの1回の
処理における入力データのバイト数と、出力データのバ
イト数をカウントするパターンカウンタ4906によって構
成される。
Next, the internal structure and operation of the X-direction scaling unit 3704 will be described. X direction scaling unit 37
In 04, the data which has been subjected to the 8 × interpolation enlargement processing by the 8 × interpolation enlargement unit 3703 is multiplied by P / 8 in the X-axis direction. As shown in FIG. 49, the X-direction scaling unit 3704 includes a mapping pattern generation circuit 4900 and 64 short words (1
Short word means 16 bits. Pattern register file 4901 that stores the mapping pattern of
And stores the output data of the 8 × interpolation enlargement unit 12
8-bit registers 4902 and 4903, barrel shifter 4904 that shifts input data to the left by 0 to 15 bytes in byte (8-bit) units, and barrel selector that copies or thins input data in byte units according to the mapping pattern 4905, and a pattern counter 4906 that counts the number of bytes of input data and the number of bytes of output data in one process of the barrel selector.

【0099】マッピングパターンは、拡大縮小率に応じ
て画素データをマッピングするバイナリのパターンであ
り、あらかじめマッピングパターン生成回路4900によっ
て、X軸方向に連続する画素データに対応して生成さ
れ、1ショートワードずつパターンレジスタファイル49
01に格納されている。マッピングパターンは、バレルセ
レクタ4905に制御信号として1ショートワードずつ入力
され、X軸方向に連続する入力データが処理される。X
方向拡大縮小ユニット3704では、入力データに対して1
行ごとに同一の処理が行われ、次の行の処理にはパター
ンレジスタファイル4901に格納された同じマッピングパ
ターンが使用される。バレルセレクタ4905は、図50に
示すように、256個の8ビット3-1 セレクタ50000 〜
50255 と、1ショートワードのマッピングパターンを8
ビット3-1 セレクタ50000 〜50255の制御信号にデコー
ドするパターンデコーダ50256 によって構成される。3
ビット3-1 セレクタ50000 〜50255 は、16行16列の
アレイ状に構成され、パターンデコーダ50256 からの制
御信号によって、それぞれが3バイト(3画素)の入力
データから1バイト(1画素)のデータを選択して出力
する。
The mapping pattern is a binary pattern for mapping pixel data according to the enlargement / reduction ratio, and is generated in advance by the mapping pattern generation circuit 4900 in correspondence with pixel data continuous in the X-axis direction. Pattern register file 49 each
Stored in 01. The mapping pattern is input to the barrel selector 4905 as a control signal one short word at a time, and input data continuous in the X-axis direction is processed. X
In the direction scaling unit 3704, 1 for the input data
The same processing is performed for each row, and the same mapping pattern stored in the pattern register file 4901 is used for the processing of the next row. As shown in FIG. 50, the barrel selector 4905 has 256 8-bit 3-1 selectors 50000-.
50255 and 1 shortword mapping pattern 8
Bit 3-1 Selector 50000 to 50255 Consists of a pattern decoder 50256 which decodes the control signal. Three
The bit 3-1 selectors 50000 to 50255 are configured in an array of 16 rows and 16 columns, and each of them is converted from 3 bytes (3 pixels) input data to 1 byte (1 pixel) data by a control signal from the pattern decoder 50256. To output.

【0100】バレルセレクタ4905は、P/8<1の場
合、つまりX方向拡大縮小ユニット3704が縮小処理をす
る場合、1行ごとの処理における右端のデータを処理す
る時を除いて、常に16バイト(16画素)のデータを
入力として、パターンデコーダ50256 からの制御信号に
したがって画素データを間引いて 2P バイトまたは( 2
P +1) バイトのデータを出力する。( α は、αを越
えない最大の整数を表す。) 2P バイト、( 2P +1)バイ
トのいずれのバイト数のデータを出力するかは、その時
に入力されるマッピングパターンに依存する。1≦P/
8の場合、つまりX軸方向拡大縮小ユニット3704が拡大
処理をする場合、1行ごとの処理における右端のデータ
を処理する時を除いて、 128/P バイトまたは( 128/P
+1) バイトのデータを入力として(( 128/P +1) ≦1
6)、パターンデコーダ50256 からの制御信号にしたが
って画素データをコピーして、常に16バイトのデータ
を出力する。 128/P バイト、( 128/P +1) バイトのい
ずれのバイト数のデータを入力とするかは、その時に入
力されるマッピングパターンに依存する。バレルセレク
タ4905によって生成されたデータは、書き込みデータ生
成ユニット3705へ転送される。パターンカウンタ4906
は、入力データのバイト数と生成されたデータのバイト
数をカウントし、フラグ信号として、それぞれ制御ユニ
ットC3710と制御ユニットD3711へ送る。このバレルセ
レクタの並列拡大縮小処理のアルゴリズムについては、
第16回画像工学コンファレンス論文集(昭和60年)
「文書画像編集用イメージ・プロセッサMN8617」(P.28
9 からP.292 )および、特開昭60-83182に記載されてい
る。
When P / 8 <1, that is, when the X-direction enlarging / reducing unit 3704 performs reduction processing, the barrel selector 4905 is always 16 bytes except when processing the rightmost data in the processing for each row. Data of (16 pixels) is input, and pixel data is thinned out according to the control signal from the pattern decoder 50256 to obtain 2P bytes or (2
Outputs P +1) bytes of data. (Α represents the maximum integer that does not exceed α.) Whether 2P bytes or (2P +1) bytes of data is output depends on the mapping pattern input at that time. 1 ≦ P /
In case of 8, that is, when the X-axis direction enlargement / reduction unit 3704 performs enlargement processing, 128 / P bytes or (128 / P bytes
+1) bytes of data as input ((128 / P +1) ≤ 1
6), pixel data is copied according to the control signal from the pattern decoder 50256, and 16-byte data is always output. Whether 128 / P bytes or (128 / P + 1) bytes of data is input depends on the mapping pattern input at that time. The data generated by the barrel selector 4905 is transferred to the write data generation unit 3705. Pattern counter 4906
Counts the number of bytes of input data and the number of bytes of generated data, and sends them as a flag signal to the control unit C3710 and the control unit D3711, respectively. For the parallel scaling algorithm of this barrel selector,
The 16th Conference on Image Engineering Conference (1985)
"Image processor for document image editing MN8617" (P.28)
9 to P.292) and JP-A-60-83182.

【0101】バレルセレクタの入力データは、左詰めに
されたX軸方向に連続するデータである必要があり、こ
の左詰めされたX軸方向に連続するデータは、制御ユニ
ットC3710がバレルシフタ4904のシフト量と、レジスタ
4902からレジスタ4903へのデータ転送と、レジスタ4004
からレジスタ4902へのデータ転送を制御することによっ
て、バレルセレクタへ供給される。P/8<1の場合、
バレルセレクタ4905は16バイトのデータを入力とする
ので、バレルセレクタ4905がデータを生成する度に、レ
ジスタ4902のデータが、レジスタ4903に転送され、8倍
補間拡大ユニット3703のレジスタ4004のデータがレジス
タ4902に転送され、バレルシフタは0バイトシフトを行
なう。1≦P/8の場合、バレルセレクタ4905は 128/P
バイトまたは( 128/P +1) バイトのデータを入力と
し、入力データは常に16バイト以下となる。したがっ
て、レジスタ4903のデータがすべて処理されるまで、レ
ジスタ4902からレジスタ4903へのデータ転送は行なわれ
ず、レジスタ4903のデータがすべて処理される度に、レ
ジスタ4902のデータが、レジスタ4903に転送され、8倍
補間拡大ユニット3703のレジスタ4004のデータがレジス
タ4902に転送される。この場合のバレルシフタ4904のシ
フト量は、バレルセレクタ4905が処理した入力データの
バイト数を累積加算した値になる。但し、この累積加算
では、結果が16以上になる度に、結果から16が引か
れる。つまり、レジスタ4903のデータがすべて処理され
るまで累積加算され、レジスタ4903のデータがすべて処
理されると(この時、累積加算の結果はを16以上とな
る)、レジスタ4902のデータがレジスタ4903に転送さ
れ、8倍補間拡大ユニット3704のレジスタ4004のデータ
がレジスタ4902に転送され、バレルシフタ4904のシフト
量は、累積加算の結果から16を引いた値になる。バレ
ルセレクタ4905が処理した入力データのバイト数は、パ
ターンカウンタによってカウントされる。これにより、
バレルセレクタ4905には、常に、左詰めにされたX軸方
向に連続する処理されていないデータが入力される。
The input data of the barrel selector must be left-justified data that is continuous in the X-axis direction. This left-justified data that is continuous in the X-axis direction is shifted by the control unit C3710 to the barrel shifter 4904. Quantity and register
Data transfer from 4902 to register 4903 and register 4004
To the register 4902 by controlling the data transfer to the barrel selector. If P / 8 <1,
Since the barrel selector 4905 receives 16-byte data as input, the data in the register 4902 is transferred to the register 4903 every time the barrel selector 4905 generates data, and the data in the register 4004 of the 8 × interpolation enlargement unit 3703 is registered. Transferred to 4902, barrel shifter shifts by 0 bytes. When 1 ≦ P / 8, barrel selector 4905 is 128 / P
Inputting byte or (128 / P +1) byte data, the input data is always 16 bytes or less. Therefore, data transfer from the register 4902 to the register 4903 is not performed until all the data in the register 4903 is processed, and the data in the register 4902 is transferred to the register 4903 each time all the data in the register 4903 is processed. The data in the register 4004 of the 8 × interpolation enlargement unit 3703 is transferred to the register 4902. The shift amount of the barrel shifter 4904 in this case is a value obtained by cumulatively adding the number of bytes of the input data processed by the barrel selector 4905. However, in this cumulative addition, 16 is subtracted from the result each time the result becomes 16 or more. That is, cumulative addition is performed until all the data in the register 4903 is processed, and when all the data in the register 4903 is processed (at this time, the cumulative addition result is 16 or more), the data in the register 4902 is stored in the register 4903. The transferred data of the register 4004 of the 8 × interpolation enlargement unit 3704 is transferred to the register 4902, and the shift amount of the barrel shifter 4904 becomes a value obtained by subtracting 16 from the result of the cumulative addition. The number of bytes of input data processed by the barrel selector 4905 is counted by the pattern counter. This allows
The barrel selector 4905 always receives unprocessed data that is left-justified and continuous in the X-axis direction.

【0102】書き込みデータ生成ユニット3705は、X方
向拡大縮小ユニット3704によって生成されたデータか
ら、実際にメモリに書き込むワードデータを生成し、書
き込みデータファイル3707に格納する。X方向拡大縮小
ユニット3704は、常に、左詰めされたデータを生成する
が、拡大縮小後の画像Dの左端の画素は、メモリ上のワ
ード内のバイト0の位置にあるとは限らない。また、デ
ータ書き込みユニット3706は、処理したデータをワード
単位で書き込むので、画像Dの左端と右端の画素データ
を書き込む場合は、書き込み先のデータとマスク処理を
する必要があり、X方向拡大縮小ユニット3704によって
生成されたデータを、そのままメモリに書き込むことは
出来ない。書き込みデータ生成ユニット3705は、X方向
拡大縮小ユニット3704によって生成されたデータを、バ
イトシフトして、データを書き込むメモリ上のバイト位
置に合わせ込まれたワードデータに変換し、また、X方
向拡大縮小ユニット3704によって生成されたデータに、
画像Dの左端または右端の画素データが含まれる場合
は、書き込み先のデータとマスク処理を行なって、書き
込みデータファイル3707に格納する。
The write data generation unit 3705 generates word data to be actually written in the memory from the data generated by the X-direction scaling unit 3704 and stores it in the write data file 3707. The X-direction scaling unit 3704 always produces left-justified data, but the leftmost pixel of the scaled image D is not necessarily at byte 0 of the word in memory. Further, since the data writing unit 3706 writes the processed data in word units, when writing the pixel data at the left end and the right end of the image D, it is necessary to perform mask processing with the write destination data. The data generated by the 3704 cannot be written directly to memory. The write data generation unit 3705 byte-shifts the data generated by the X-direction scaling unit 3704 to convert it into word data that is aligned with the byte position on the memory where the data is written, and also scales in the X-direction. To the data generated by unit 3704,
When the pixel data at the left end or the right end of the image D is included, the data of the writing destination is masked and stored in the writing data file 3707.

【0103】書き込みデータファイル3707は、4個の3
2ビットレジスタによって構成され、FIFOとして動
作する。書き込みデータファイル3707は、制御ユニット
E3712によって制御され、書き込みデータ生成ユニット
3705の出力データは、書き込みデータファイル3707に格
納され、格納された順に、データ書き込みユニット3706
が生成したメモリのアドレスに書き込まれる。
The write data file 3707 consists of four 3
It is configured by a 2-bit register and operates as a FIFO. The write data file 3707 is controlled by the control unit E3712, and the write data generation unit
The output data of the 3705 is stored in the write data file 3707, and the data write unit 3706 is stored in the stored order.
Is written to the address of the generated memory.

【0104】データ書き込みユニット3706は、書き込み
データファイル3707と共に、制御ユニットE3712によっ
て制御され、拡大縮小後の画像Dのメモリ上のワードア
ドレスを生成し、書き込みデータファイル3707データに
格納されているデータを、ワード単位でメモリに書き込
む。データ書き込みユニット3706は、まず、拡大縮小後
の画像Dの0行0ワード目のワードアドレスを生成して
データを書き込み、次に0行1ワード目、0行2ワード
目、0行3ワード目というようにワードアドレスを生成
してデータを書き込む。画像Dの0行目のデータの書き
込みを終了すると、次は、画像Dの1行目のデータの書
き込みを0行目と同じように行なう。このような画像D
の1行ごとのデータの書き込みを、0行目から(dnx -
1) 行目まで行なう。このように、書き込みデータ生成
ユニット3705によって生成されたデータは、書き込みデ
ータファイル3707に転送され、データ書き込みユニット
3706が生成した画像データメモリ3603、または、表示メ
モリ3604上のアドレスに、書き込みデータファイル3707
に格納されたデータが順次書き込まれる。
The data writing unit 3706, together with the write data file 3707, is controlled by the control unit E3712 to generate a word address on the memory of the image D after enlarging / reducing and writing the data stored in the write data file 3707 data. , Write to memory in word units. The data writing unit 3706 first generates the word address of the 0th row and 0th word of the scaled image D and writes the data, and then the 0th row and 1st word, the 0th row and 2nd word, and the 0th row and 3rd word. In this way, the word address is generated and the data is written. When the writing of the data of the 0th row of the image D is completed, next, the writing of the data of the 1st row of the image D is performed in the same manner as the 0th row. Such an image D
Write the data for each line from the 0th line (dnx-
1) Repeat until the line. In this way, the data generated by the write data generation unit 3705 is transferred to the write data file 3707,
The write data file 3707 is stored in the address on the image data memory 3603 generated by the 3706 or the display memory 3604.
The data stored in is sequentially written.

【0105】書き込みデータファイル3707は、データを
最大4ワードまで格納することができる。書き込みデー
タファイル3707に、4ワードのデータが格納されている
場合、書き込みデータファイル3707から制御ユニットD
3711に対してFullフラグが送られる。これにより、制御
ユニットDは、書き込みデータ生成ユニット3705の書き
込みデータファイル3707へのデータ転送を一時的に停止
させる。また、書き込みデータファイル3707が空の場
合、つまり書き込みデータファイル3707にデータが格納
されていない場合、書き込みデータファイル3707から制
御ユニットEに対してEmpty フラグが送られる。これに
より、制御ユニットE3712は、書き込みデータファイル
3707のデータのメモリへの書き込みをを一時的に停止さ
せる。
The write data file 3707 can store up to 4 words of data. When 4-word data is stored in the write data file 3707, the control unit D is changed from the write data file 3707.
The Full flag is sent to 3711. As a result, the control unit D temporarily stops the data transfer of the write data generation unit 3705 to the write data file 3707. If the write data file 3707 is empty, that is, if no data is stored in the write data file 3707, the write data file 3707 sends an Empty flag to the control unit E. This causes the control unit E3712 to write the write data file.
Temporarily stop writing the 3707 data to memory.

【0106】[0106]

【発明の効果】以上のように本発明は、原画像の画素間
の領域を、仮想的に微小領域に分割して、微小領域毎
に、K個の近傍画素データの一致・不一致の関係の組合
わせによってK個の近傍画素データのどの画素データを
拡大縮小後の画素データとして選択するかをあらかじめ
定めておき、拡大縮小後の画像の画素に対応する原画像
領域における微小領域とK個の近傍画素データの一致・
不一致の関係の組合わせによってK個の近傍画素データ
内からあらかじめ定められた画素データを選択して拡大
縮後の画素データとするようにしたので、単純な論理演
算だけで拡大縮小後の補間処理された画素データを生成
することができ、しかも、8ビット/画素の画像を、カ
ラーマップテーブルを用いて疑似的にCRTにフルカラ
ー表示するシステムにおいては、画像の拡大縮小におけ
る補間処理を、カラーマップテーブルを参照することな
く、また新たにカラーマップテーブルを生成することも
なく、高速に、線形補間法と類似の補間効果を簡易的に
得ることができる。特に、斜め線の拡大時に生じる段差
を、目立たなくする効果がある。
As described above, according to the present invention, the area between the pixels of the original image is virtually divided into minute areas, and the relationship of the match / mismatch of K neighboring pixel data is calculated for each minute area. It is determined in advance which pixel data of the K neighboring pixel data is selected as the pixel data after scaling by combination, and a small area in the original image area corresponding to the pixel of the image after scaling and K Matching neighboring pixel data
Since predetermined pixel data is selected from K neighboring pixel data by combining the disagreement relations and used as the pixel data after enlargement / reduction, interpolation processing after enlargement / reduction is performed by a simple logical operation. In a system that can generate the generated pixel data and displays an 8-bit / pixel image in a pseudo full-color on a CRT using a color map table, the interpolation processing in the image scaling is performed by a color map. The interpolation effect similar to the linear interpolation method can be easily obtained at high speed without referring to the table and without newly generating a color map table. In particular, it has an effect of making a step generated when the diagonal line is enlarged inconspicuous.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施例1における画像処理装置のブロ
ック図
FIG. 1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention.

【図2】本発明の実施例1による画像の補間処理をとも
なう拡大縮小処理の基本処理の手順を表すフロー図
FIG. 2 is a flow chart showing a procedure of a basic process of an enlargement / reduction process accompanied by an image interpolation process according to the first embodiment of the present invention.

【図3】本発明の実施例1における画像の補間処理をと
もなう拡大縮小処理のフロー図
FIG. 3 is a flow chart of enlargement / reduction processing accompanied by image interpolation processing according to the first embodiment of the present invention.

【図4】本発明の実施例1における画像の補間処理をと
もなう拡大縮小処理の正確なフロー図
FIG. 4 is an accurate flow chart of an enlargement / reduction process accompanied by an image interpolation process according to the first embodiment of the present invention.

【図5】実施例1における参照データをメモリから読み
出す処理のフロー図
FIG. 5 is a flowchart of a process of reading reference data from a memory according to the first embodiment.

【図6】実施例1における原画像Sを表す模式図FIG. 6 is a schematic diagram showing an original image S in the first embodiment.

【図7】実施例1における拡大縮小後の画像Dを表す模
式図
FIG. 7 is a schematic diagram showing an image D after scaling in Example 1.

【図8】実施例1における原画像の画素間の領域の領域
分割の仕方を表す模式図
FIG. 8 is a schematic diagram showing how to divide a region between pixels of an original image in the first embodiment.

【図9】実施例1における仮想的に領域分割された原画
像の画素間の領域を表す模式図
FIG. 9 is a schematic diagram illustrating an area between pixels of an original image that is virtually area-divided according to the first exemplary embodiment.

【図10】実施例1におけるX軸方向に8倍、Y軸方向
にQ倍した場合の画像の画素に対応する原画像Sにおけ
る位置を表す模式図
FIG. 10 is a schematic diagram showing the position in the original image S corresponding to the pixels of the image in the first embodiment when multiplied by 8 in the X-axis direction and Q-fold in the Y-axis direction.

【図11】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 11 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図12】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 12 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図13】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 13 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図14】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 14 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図15】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 15 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図16】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 16 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図17】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 17 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図18】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 18 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図19】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 19 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図20】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 20 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図21】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 21 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図22】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 22 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図23】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 23 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図24】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 24 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図25】実施例1におけるC(Sij, Sij+1, Si+1
j, Si+1j+1)の値と、微小領域ごとの選択される画素
データとの関係を表す模式図
FIG. 25 shows C (Sij, Sij + 1, Si + 1 in the first embodiment.
j, Si + 1j + 1) value and a schematic diagram showing the relationship between the pixel data selected for each micro area

【図26】実施例1における原画像境界における処理を
する場合を説明するための模式図
FIG. 26 is a schematic diagram for explaining a case where processing is performed at an original image boundary in the first embodiment.

【図27】実施例1における原画像境界における処理の
処理方法を説明するための模式図
FIG. 27 is a schematic diagram for explaining a processing method of processing at an original image boundary in the first embodiment.

【図28】実施例1における画素の位置関係を表す模式
FIG. 28 is a schematic diagram showing the positional relationship of pixels in the first embodiment.

【図29】実施例1におけるC(S0,S1,S2,S3 )の
値を求める手順を表すフロー図
FIG. 29 is a flowchart showing the procedure for obtaining the value of C (S0, S1, S2, S3) in the first embodiment.

【図30】実施例2におけるC(S0,S1,S2,S3 )の
値を求める基本手順を表すフロー図
FIG. 30 is a flowchart showing the basic procedure for obtaining the value of C (S0, S1, S2, S3) in the second embodiment.

【図31】実施例2におけるC(S0,S1,S2,S3 )の
値を求める手順を表すフロー図
FIG. 31 is a flowchart showing the procedure for obtaining the value of C (S0, S1, S2, S3) in the second embodiment.

【図32】本発明の実施例3における画像処理装置のブ
ロック図
FIG. 32 is a block diagram of an image processing apparatus according to a third embodiment of the present invention.

【図33】実施例3における画像処理ユニットのブロッ
ク図
FIG. 33 is a block diagram of an image processing unit according to the third embodiment.

【図34】実施例3におけるX方向拡大縮小ユニットの
ブロック図
FIG. 34 is a block diagram of an X-direction scaling unit in the third embodiment.

【図35】実施例3におけるバレルセレクタのブロック
FIG. 35 is a block diagram of a barrel selector in the third embodiment.

【図36】本発明の実施例4における画像処理装置のブ
ロック図
FIG. 36 is a block diagram of an image processing apparatus according to a fourth embodiment of the present invention.

【図37】実施例4における画像処理ユニットのブロッ
ク図
FIG. 37 is a block diagram of an image processing unit according to the fourth embodiment.

【図38】実施例4における微小領域行算出ユニットと
参照データ読み出しユニットと参照データファイルの動
作を表すフロー図
FIG. 38 is a flowchart showing the operations of the minute area row calculation unit, the reference data read unit, and the reference data file in the fourth embodiment.

【図39】実施例4における参照データ読みだしユニッ
トと参照データファイルの動作を表すフロー図
FIG. 39 is a flowchart showing the operations of the reference data reading unit and the reference data file in the fourth embodiment.

【図40】実施例4における8倍補間拡大ユニットのブ
ロック図
FIG. 40 is a block diagram of an 8 × interpolation enlargement unit according to the fourth embodiment.

【図41】実施例4における参照データ選択部のブロッ
ク図
FIG. 41 is a block diagram of a reference data selection unit according to the fourth embodiment.

【図42】実施例4におけるデータ比較部のブロック図FIG. 42 is a block diagram of a data comparison unit according to the fourth embodiment.

【図43】実施例4におけるデータ比較部の比較回路の
論理回路図
FIG. 43 is a logic circuit diagram of a comparison circuit of a data comparison unit in the fourth embodiment.

【図44】実施例4における選択テーブル格納部のブロ
ック図
FIG. 44 is a block diagram of a selection table storage unit according to the fourth embodiment.

【図45】実施例4において選択信号の値と選択される
画素の位置関係を表す模式図
FIG. 45 is a schematic diagram showing the positional relationship between the value of the selection signal and the selected pixel in the fourth embodiment.

【図46】実施例4における8倍拡大データ選択部とレ
ジスタ4004のブロック図
FIG. 46 is a block diagram of an 8 × enlarged data selection unit and a register 4004 according to the fourth embodiment.

【図47】実施例4における「画像Dのs行目のデータ
の生成における参照データの選択」の手順を表すフロー
FIG. 47 is a flowchart showing the procedure of “selection of reference data in generation of data of sth row of image D” in the fourth embodiment.

【図48】実施例4における「参照データロード」の手
順を表すフロー図
FIG. 48 is a flowchart showing the procedure of “reference data load” in the fourth embodiment.

【図49】実施例4におけるX方向拡大縮小ユニットの
ブロック図
FIG. 49 is a block diagram of an X-direction scaling unit according to the fourth embodiment.

【図50】実施例4におけるバレルセレクタのブロック
FIG. 50 is a block diagram of a barrel selector in the fourth embodiment.

【図51】実施例4における参照データ読み出しユニッ
トの動作を説明するための模式図(m=0, 1, 2, 3
の場合)
FIG. 51 is a schematic diagram for explaining the operation of the reference data read unit according to the fourth embodiment (m = 0, 1, 2, 3).
in the case of)

【図52】実施例4における参照データ読み出しユニッ
トの動作を説明するための模式図(m=4, 5, 6, 7
の場合)
FIG. 52 is a schematic diagram for explaining the operation of the reference data read unit according to the fourth embodiment (m = 4, 5, 6, 7).
in the case of)

【図53】実施例4の参照データ選択部におけるバイト
データの選択パターンの一覧図
FIG. 53 is a list of byte data selection patterns in the reference data selection unit according to the fourth embodiment.

【図54】実施例4における選択テーブル格納部のRO
M4004に格納されている選択テーブルの一覧図
[FIG. 54] RO in the selection table storage unit in the fourth embodiment
List of selection tables stored in M4004

【図55】実施例4における選択テーブル格納部のRO
M4003に格納されている選択テーブルの一覧図
FIG. 55 is an RO in the selection table storage unit according to the fourth embodiment.
List of selection tables stored in M4003

【図56】実施例4における選択テーブル格納部のRO
M4005に格納されている選択テーブルの一覧図
[FIG. 56] RO in the selection table storage unit in the fourth embodiment
List of selection tables stored in M4005

【図57】従来の画像データの拡大縮小における補間処
理の方法を表す模式図
FIG. 57 is a schematic diagram showing a method of interpolation processing in conventional scaling of image data.

【符号の説明】[Explanation of symbols]

5、3205、3605 CRTコントローラ 3500〜3515、50000〜50255 8ビッ
ト3-1 セレクタ 4200〜4215 比較回路 4600〜4615 8ビット4-1 セレクタ
5, 3205, 3605 CRT controller 3500-3515, 50000-50255 8-bit 3-1 selector 4200-4215 Comparison circuit 4600-4615 8-bit 4-1 selector

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 原画像(1画素がiビット( iは任意の
正の整数) のデータによって表されるデジタル画像)の
画素間の領域を、仮想的にX軸方向にN(Nは任意の正
の整数)個、Y軸方向にM(Mは任意の正の整数)個に
分割し、得られた微小領域ごとに、K(Kは任意の正の
整数)個の近傍画素データ間の一致・不一致の関係の組
み合わせによってK個の近傍画素データの内どの画素デ
ータを選択するかをあらかじめ定めておき、拡大縮小後
の画像(1画素がiビットのデータによって表されるデ
ジタル画像)の画素に対応する原画像領域における微小
領域と、その微小領域のK個の近傍画素データ間の一致
・不一致の関係の組み合わせを求めることによって、K
個の近傍画素データの内からあらかじめ定められた画素
データを選択して拡大縮小後の画素データとする画像処
理方法。
1. An area between pixels of an original image (a digital image in which one pixel is represented by i-bit (i is an arbitrary positive integer) data) is virtually N (N is arbitrary) in the X-axis direction. Of positive pixel) and M (M is an arbitrary positive integer) in the Y-axis direction, and between K (K is an arbitrary positive integer) neighboring pixel data for each obtained minute region. Which pixel data is selected from among the K neighboring pixel data depending on the combination of the matching / mismatching relations, and the image after scaling (a digital image in which one pixel is represented by i-bit data) K in the original image area corresponding to the pixel of the pixel and the combination of the matching / non-matching relationship between the K neighboring pixel data of the minute area.
An image processing method in which predetermined pixel data is selected from the pieces of neighboring pixel data and is used as the scaled pixel data.
【請求項2】 画像データを蓄積する蓄積手段と、画像
データを処理する中央処理装置と、前記中央処理装置の
動作を制御する制御データを蓄積する蓄積手段とを備
え、原画像(1画素がiビット( iは任意の正の整数)
のデータによって表されるデジタル画像)の画素間の領
域を仮想的にX軸方向にN(Nは任意の正の整数)個、
Y軸方向にM(Mは任意の正の整数)個に分割し、得ら
れた微小領域ごとに、K(Kは任意の正の整数)個の近
傍画素データ間の一致・不一致の関係の組み合わせによ
ってK個の近傍画素データの内どの画素データを選択す
るかをあらかじめ定めておき、拡大縮小後の画像(1画
素がiビットのデータによって表されるデジタル画像)
の画素に対応する原画像領域における微小領域と、その
微小領域のK個の近傍画素データ間の一致・不一致の関
係の組み合わせを求めることによって、K個の近傍画素
データの内からあらかじめ定められた画素データを選択
して拡大縮小後の画素データを生成する画像処理装置。
2. A storage unit for storing image data, a central processing unit for processing the image data, and a storage unit for storing control data for controlling the operation of the central processing unit. i bits (i is any positive integer)
Of the digital image represented by the data of N) in the X-axis direction are virtually N (N is an arbitrary positive integer) areas between pixels,
It is divided into M (M is an arbitrary positive integer) pieces in the Y-axis direction, and K (K is an arbitrary positive integer) pieces of matching / non-matching relations between neighboring pixel data for each of the obtained minute areas. The pixel data to be selected from the K neighboring pixel data is determined in advance by the combination, and the image after scaling (a digital image in which one pixel is represented by i-bit data)
Is determined in advance from the K neighboring pixel data by obtaining the combination of the matching / non-matching relationship between the minute area in the original image area corresponding to the pixel and the K neighboring pixel data in the minute area. An image processing apparatus that selects pixel data and generates pixel data after scaling.
【請求項3】 画像データを蓄積する蓄積手段と、画像
データを処理する中央処理装置と、前記中央処理装置の
動作を制御する制御データを蓄積する蓄積手段とを備
え、原画像(1画素がiビット( iは任意の正の整数)
のデータによって表されるデジタル画像)の画素間の領
域を仮想的にX軸方向にN(Nは任意の正の整数)個、
Y軸方向にM(Mは任意の正の整数)個に分割し、得ら
れた微小領域ごとに、K(Kは任意の正の整数)個の近
傍画素データ間の一致・不一致の関係の組み合わせによ
ってK個の近傍画素データの内どの画素データを選択す
るかをあらかじめ定めてテーブル化しておき、原画像を
X軸方向にN倍した後の画像の画素に対応する原画像に
おける微小領域で、しかもK個の近傍画素データが互い
に共通で且つ互いに隣合うN個の微小領域と、そのN個
の微小領域のK個の近傍画素データ間の一致・不一致の
関係の組み合わせを求めることによって、前記テーブル
を参照してK個の近傍画素データの内からあらかじめ定
められた画素データを選択してX方向にN倍に拡大され
た画像に相当する画素データを生成する画像処理装置。
3. A storage unit for storing image data, a central processing unit for processing the image data, and a storage unit for storing control data for controlling the operation of the central processing unit. i bits (i is any positive integer)
Of the digital image represented by the data of N) in the X-axis direction are virtually N (N is an arbitrary positive integer) areas between pixels,
It is divided into M (M is an arbitrary positive integer) pieces in the Y-axis direction, and K (K is an arbitrary positive integer) pieces of matching / non-matching relations between neighboring pixel data for each of the obtained minute areas. Which pixel data of the K neighboring pixel data is selected by combination is set in advance and made into a table, and a small area in the original image corresponding to the pixel of the image after the original image is multiplied by N in the X-axis direction is set. Moreover, by obtaining a combination of N minute regions in which K neighboring pixel data are common to each other and are adjacent to each other and a matching / mismatching relationship between the K neighboring pixel data of the N minute regions, An image processing apparatus which refers to the table and selects predetermined pixel data from K neighboring pixel data to generate pixel data corresponding to an image enlarged N times in the X direction.
【請求項4】 画像データを蓄積する蓄積手段と、画像
データを処理する中央処理装置と、前記中央処理装置の
動作を制御する制御データを蓄積する蓄積手段とを備
え、原画像(1画素がiビット( iは任意の正の整数)
のデータによって表されるデジタル画像)をX軸方向に
P倍(Pは0より大きい任意の有理数)に変倍する場合
に、原画像の画素間の領域を仮想的にX軸方向にN(N
は任意の正の整数)個、Y軸方向にM(Mは任意の正の
整数)個に分割し、得られた微小領域ごとに、K(Kは
任意の正の整数)個の近傍画素データ間の一致・不一致
の関係の組み合わせによってK個の近傍画素データの内
どの画素データを選択するかをあらかじめ定めてテーブ
ル化しておき、原画像をX軸方向にN倍した後の画像の
画素に対応する原画像における微小領域で、しかもK個
の近傍画素データが互いに共通で且つ互いに隣合うN個
の微小領域と、そのN個の微小領域のK個の近傍画素デ
ータ間の一致・不一致の関係の組み合わせを求めること
によって、前記テーブルを参照してK個の近傍画素デー
タの内からあらかじめ定められた画素データを選択して
X方向にN倍に拡大された画像に相当する画素データを
生成し、さらにその生成された画素データを、X軸方向
にP/N倍することによって、X軸方向にP倍された画
像を生成する画像処理装置。
4. A storage unit for storing image data, a central processing unit for processing the image data, and a storage unit for storing control data for controlling the operation of the central processing unit. i bits (i is any positive integer)
Digital image represented by the above data) is magnified P times (P is an arbitrary rational number greater than 0) in the X axis direction, the area between pixels of the original image is virtually N (N) in the X axis direction. N
Is an arbitrary positive integer) and M (M is an arbitrary positive integer) in the Y-axis direction, and K (K is an arbitrary positive integer) neighboring pixels for each obtained minute region. The pixel data of the K neighboring pixel data to be selected is set in advance according to the combination of the matching / non-matching relationship between the data, and the table is created. The pixels of the image after the original image is multiplied by N in the X-axis direction In the original image corresponding to the above-mentioned N image areas, in which K pieces of neighboring pixel data are common to each other and are adjacent to each other, and K pieces of neighboring pixel data of the N pieces of minute areas are matched / mismatched. By determining the combination of the relations, the predetermined pixel data is selected from the K neighboring pixel data by referring to the table, and the pixel data corresponding to the image enlarged N times in the X direction is obtained. Generate and then The generated pixel data, by multiplying P / N in the X-axis direction, the image processing apparatus for generating a P times image in the X-axis direction.
【請求項5】 画像データを蓄積する蓄積手段と、画像
データを処理する中央処理装置と、前記中央処理装置の
動作を制御する制御データを蓄積する蓄積手段とを備
え、原画像(1画素がiビット( iは任意の正の整数)
のデータによって表されるデジタル画像)をX軸方向に
P倍(Pは0より大きい任意の有理数)、Y軸方向にQ
倍(Qは0より大きい任意の有理数)に変倍する場合
に、原画像の画素間の領域を仮想的にX軸方向にN(N
は任意の正の整数)個、Y軸方向にM(Mは任意の正の
整数)個に分割し、得られた微小領域ごとに、K(Kは
任意の正の整数)個の近傍画素データ間の一致・不一致
の関係の組み合わせによってK個の近傍画素データの内
どの画素データを選択するかをあらかじめ定めてテーブ
ル化しておき、原画像をX軸方向にN倍、Y軸方向にQ
倍した後の画像の画素に対応する原画像における微小領
域で、しかもK個の近傍画素データが互いに共通で且つ
互いに隣合うN個の微小領域と、そのN個の微小領域の
K個の近傍画素データ間の一致・不一致の関係の組み合
わせを求めることによって、前記テーブルを参照してK
個の近傍画素データの内からあらかじめ定められた画素
データを選択してX方向にN倍、Y軸方向にQ倍にされ
た画像に相当する画素データを生成し、さらにその生成
された画素データをX軸方向にP/N倍することによっ
て、X軸方向にP倍、Y軸方向にQ倍された画像を生成
する画像処理装置。
5. An original image (one pixel corresponds to one pixel is provided with a storage unit for storing image data, a central processing unit for processing the image data, and a storage unit for storing control data for controlling the operation of the central processing unit. i bits (i is any positive integer)
Image in the X-axis direction (P is an arbitrary rational number greater than 0) in the X-axis direction and Q in the Y-axis direction.
When scaling is performed by multiplying (Q is an arbitrary rational number greater than 0), the area between pixels of the original image is virtually N (N
Is an arbitrary positive integer) and M (M is an arbitrary positive integer) in the Y-axis direction, and K (K is an arbitrary positive integer) neighboring pixels for each obtained minute region. Which pixel data of the K neighboring pixel data is selected based on the combination of the coincidence / non-coincidence relations between the data is made into a table, and the original image is multiplied by N in the X-axis direction and Q in the Y-axis direction.
N micro-areas in the original image corresponding to the pixels of the image after being multiplied, and in which K pieces of neighboring pixel data are common to each other and adjacent to each other, and K neighborhoods of the N micro-areas By obtaining a combination of matching / non-matching relationships between pixel data, the table is referred to K
Predetermined pixel data is selected from the neighboring pixel data to generate pixel data corresponding to an image multiplied by N times in the X direction and Q times in the Y axis direction, and the generated pixel data. Is multiplied by P / N in the X-axis direction to generate an image that is P-folded in the X-axis direction and Q-folded in the Y-axis direction.
【請求項6】 中央処理装置と、画像データを蓄積する
蓄積手段と、前記中央処理装置の動作を制御する制御デ
ータを蓄積する蓄積手段と、同時に複数の画素データを
X軸方向に任意の倍率で拡大縮小してメモリに書き込む
画像処理手段とを備え、原画像(1画素がiビット( i
は任意の正の整数) のデータによって表されるデジタル
画像)をX軸方向にP倍(Pは0より大きい任意の有理
数)、Y軸方向にQ倍(Qは0より大きい任意の有理
数)に変倍する場合に、原画像の画素間の領域を仮想的
にX軸方向にN(Nは任意の正の整数)個、Y軸方向に
M(Mは任意の正の整数)個に分割し、得られた微小領
域ごとに、K(Kは任意の正の整数)個の近傍画素デー
タ間の一致・不一致の関係の組み合わせによってK個の
近傍画素データの内どの画素データを選択するかをあら
かじめ定めてテーブル化しておき、前記中央処理装置が
原画像をX軸方向にN倍、Y軸方向にQ倍した後の画像
の画素に対応する原画像における微小領域で、しかもK
個の近傍画素データが互いに共通で且つ互いに隣合うN
個の微小領域と、そのN個の微小領域のK個の近傍画素
データ間の一致・不一致の関係の組み合わせを求めるこ
とによって、前記テーブルを参照してK個の近傍画素デ
ータの内からあらかじめ定められた画素データを選択し
てX方向にN倍、Y軸方向にQ倍にされた画像に相当す
る画素データを生成し、さらにその生成された画素デー
タを前記画像処理手段がX軸方向にP/N倍することに
よって、X軸方向にP倍、Y軸方向にQ倍された画像を
生成する画像処理装置。
6. A central processing unit, an accumulating unit for accumulating image data, an accumulating unit for accumulating control data for controlling the operation of the central processing unit, and a plurality of pixel data at the same time at an arbitrary magnification in the X-axis direction. Image processing means for enlarging / reducing the size of the original image and writing it in the memory.
Is an arbitrary positive integer) digital image represented by P) in the X-axis direction (P is any rational number greater than 0) and Q-times in the Y-axis direction (Q is any rational number greater than 0) In the case of scaling to, the areas between pixels of the original image are virtually divided into N (N is any positive integer) in the X-axis direction and M (M is any positive integer) in the Y-axis direction. For each minute area obtained by division, which pixel data is selected from among K neighboring pixel data by a combination of the matching / non-matching relations between K (K is an arbitrary positive integer) neighboring pixel data. These are determined in advance and made into a table, and the central processing unit is a minute area in the original image corresponding to the pixels of the image after the original image is multiplied by N times in the X-axis direction and Q times in the Y-axis direction, and K
N pieces of neighboring pixel data that are common to each other and are adjacent to each other
Number of minute regions and K number of neighboring pixel data of the N number of minute regions are combined to obtain a combination of coincidence / non-coincidence relations, thereby predetermining from among the K number of neighboring pixel data with reference to the table. The generated pixel data is selected to generate pixel data corresponding to an image multiplied by N times in the X direction and Q times in the Y axis direction, and the generated pixel data is further processed by the image processing means in the X axis direction. An image processing apparatus that generates an image multiplied by P in the X-axis direction and Q times in the Y-axis direction by multiplying by P / N.
【請求項7】 拡大縮小後の画像の画素に対応する原画
像領域における微小領域のK個(Kは任意の正の整数)
の近傍画素データ間の一致・不一致の関係の組み合わせ
を求める処理において、画素データ間の論理演算の回数
が最小になる順序で画素データ間の論理演算を行なうよ
うにした請求項1記載の画像処理方法。
7. K small areas (K is an arbitrary positive integer) in an original image area corresponding to pixels of an image after scaling.
2. The image processing according to claim 1, wherein in the processing for obtaining the combination of the coincidence / non-coincidence relationship between the neighboring pixel data, the logical operation between the pixel data is performed in the order in which the number of logical operations between the pixel data is minimized. Method.
【請求項8】 拡大縮小後または変倍後の画像の画素に
対応する原画像領域における微小領域のK個(Kは任意
の正の整数)の近傍画素データ間の一致・不一致の関係
の組み合わせを求める処理において、画素データ間の論
理演算の回数が最小になる順序で画素データ間の論理演
算を行なうようにした請求項2から6のいずれかに記載
の画像処理装置。
8. A combination of coincidence / non-coincidence relations among K (K is an arbitrary positive integer) neighboring pixel data of a minute area in an original image area corresponding to pixels of an image after scaling or scaling. 7. The image processing apparatus according to claim 2, wherein in the process of obtaining, the logical operation between pixel data is performed in an order in which the number of logical operations between pixel data is minimized.
【請求項9】 中央処理装置と、画像データを蓄積する
蓄積手段と、前記中央処理装置の動作を制御する制御デ
ータを蓄積する蓄積手段と、同時に複数の画素データを
X軸方向に任意の倍率で拡大縮小してメモリに書き込む
画像処理手段と、複数のテーブルデータを格納する格納
手段と、K個(Kは任意の正の整数)の画素データ間の
一致・不一致の関係の組み合わせを求める比較手段と、
K個の画素データからN画素(Nは任意の正の整数)の
データを選択する選択手段とを備え、原画像(1画素が
iビット( iは任意の正の整数) のデータによって表さ
れるデジタル画像)をX軸方向にP倍(Pは0より大き
い任意の有理数)、Y軸方向にQ倍(Qは0より大きい
任意の有理数)に変倍する場合に、原画像の画素間の領
域を仮想的にX軸方向にN個、Y軸方向にM(Mは任意
の正の整数)個に分割し、得られた微小領域ごとに、K
個の近傍画素データ間の一致・不一致の関係の組み合わ
せによってK個の近傍画素データの内どの画素データを
選択するかをあらかじめ定めた複数個のテーブルを前記
格納手段に格納し、原画像をX軸方向にN倍、Y軸方向
にQ倍した後の画像の画素に対応する原画像における微
小領域で、しかもK個の近傍画素データが互いに共通
で、且つ互いに隣合うN個の微小領域のK個の近傍画素
データ間の一致・不一致の関係の組み合わせを前記比較
手段によって求め、前記選択手段が前記格納手段の複数
個のテーブルを参照してK個の近傍画素データからあら
かじめ定められたN画素のデータを選択し、X方向にN
倍、Y軸方向にQ倍にされた画像に相当するN個の画素
データを生成し、さらにその生成された画素データを、
前記画像処理手段がX軸方向にP/N倍することによっ
て、X軸方向にP倍、Y軸方向にQ倍された画像を生成
する画像処理装置。
9. A central processing unit, an accumulating unit for accumulating image data, an accumulating unit for accumulating control data for controlling the operation of the central processing unit, and a plurality of pixel data at the same time at an arbitrary magnification in the X-axis direction. An image processing means for enlarging / reducing with writing in a memory, a storage means for storing a plurality of table data, and a comparison for obtaining a combination of a match / mismatch relationship between K (K is an arbitrary positive integer) pixel data. Means and
A selection means for selecting N pixel data (N is an arbitrary positive integer) from the K pixel data is provided, and the original image (1 pixel is represented by data of i bits (i is an arbitrary positive integer)). Between the pixels of the original image when the digital image is scaled P times in the X axis direction (P is an arbitrary rational number greater than 0) and Q times in the Y axis direction (Q is an arbitrary rational number greater than 0). Area is virtually divided into N pieces in the X-axis direction and M pieces (M is an arbitrary positive integer) in the Y-axis direction, and K is obtained for each obtained minute area.
A plurality of tables that predetermine which pixel data of the K neighboring pixel data are to be selected are stored in the storage means according to the combination of the coincidence / non-coincidence relationships between the neighboring pixel data, and the original image is stored in the X-direction. It is a small area in the original image corresponding to pixels of the image after being multiplied by N times in the axial direction and Q times in the Y axis direction, and K neighboring pixel data are common to each other, and of N minute areas adjacent to each other. The comparison means finds a combination of matching / non-matching relationships between K pieces of neighboring pixel data, and the selecting means refers to a plurality of tables of the storing means to determine a predetermined N from K pieces of neighboring pixel data. Select pixel data and move N in the X direction
N times the pixel data corresponding to the image multiplied by Q times in the Y-axis direction is generated, and the generated pixel data is
An image processing apparatus that generates an image that is P-folded in the X-axis direction and Q-folded in the Y-axis direction by the image processing means multiplying P / N in the X-axis direction.
【請求項10】 中央処理装置と、画像データを蓄積す
る蓄積手段と、前記中央処理装置の動作を制御する制御
データを蓄積する蓄積手段と、同時に複数の画素データ
をX軸方向に任意の倍率で拡大縮小してメモリに書き込
む画像処理手段と、複数のテーブルデータを格納するL
個(Lは任意の正の整数)の格納手段と、L個のK個
(Kは任意の正の整数)の画素データ間の一致・不一致
の関係の組み合わせを求める比較手段と、L個のK個の
画素データからN画素(Nは任意の正の整数)のデータ
を選択する選択手段とを備え、原画像(1画素がiビッ
ト(iは任意の正の整数) のデータによって表されるデ
ジタル画像)をX軸方向にP倍(Pは0より大きい任意
の有理数)、Y軸方向にQ倍(Qは0より大きい任意の
有理数)に変倍する場合に、原画像の画素間の領域を仮
想的にX軸方向にN個、Y軸方向にM(Mは任意の正の
整数)個に分割し、得られた微小領域ごとに、K個の近
傍画素データ間の一致・不一致の関係の組み合わせによ
ってK個の近傍画素データの内どの画素データを選択す
るかをあらかじめ定めた複数個のテーブルを前記L個の
格納手段にそれぞれ格納し、原画像をX軸方向にN倍、
Y軸方向にQ倍した後の画像の画素に対応する原画像に
おける微小領域で、しかもK個の近傍画素データが互い
に共通で、且つ互いに隣合うN個の微小領域のK個の近
傍画素データ間の一致・不一致の関係の組み合わせを、
L組のK個の近傍画素データに対して前記L個の比較手
段によって同時に求め、前記L個の選択手段が前記L個
の格納手段の複数個のテーブルを同時に参照してL組の
K個の近傍画素データからあらかじめ定められたLN画
素のデータを選択し、X方向にN倍、Y軸方向にQ倍に
された画像に相当するLN個の画素データを同時に生成
し、さらにその生成された画素データを、前記画像処理
手段がX軸方向にP/N倍することによって、X軸方向
にP倍、Y軸方向にQ倍された画像を生成する画像処理
装置。
10. A central processing unit, an accumulating unit for accumulating image data, an accumulating unit for accumulating control data for controlling the operation of the central processing unit, and a plurality of pixel data at the same time at an arbitrary magnification in the X-axis direction. Image processing means for enlarging / reducing by writing in memory and L for storing a plurality of table data
Storage means (L is an arbitrary positive integer), comparison means for obtaining a combination of matching / non-matching relationships between L pieces of K (K is an arbitrary positive integer) pixel data, and L pieces of comparing means. A selection unit for selecting N pixel data (N is an arbitrary positive integer) from the K pixel data, and the original image (1 pixel is represented by i-bit data (i is an arbitrary positive integer)) Between the pixels of the original image when the digital image is scaled P times in the X axis direction (P is an arbitrary rational number greater than 0) and Q times in the Y axis direction (Q is an arbitrary rational number greater than 0). Area is virtually divided into N pieces in the X-axis direction and M pieces (M is an arbitrary positive integer) in the Y-axis direction. The pixel data to be selected from the K neighboring pixel data is determined in advance by the combination of the disagreement relationships. N times a plurality of tables respectively stored in the L storing means, the original image in the X-axis direction,
K neighboring pixel data of N minute regions which are small regions in the original image corresponding to the pixels of the image after Q-folding in the Y-axis direction and in which K neighboring pixel data are common to each other and which are adjacent to each other. The combination of matching / mismatching relationships between
L sets of K neighboring pixel data are simultaneously obtained by the L comparison means, and the L selection means simultaneously refer to a plurality of tables of the L storage means to obtain L sets of K pieces. LN pixel data determined in advance from the neighboring pixel data of L are simultaneously generated to generate LN pixel data corresponding to an image multiplied by N times in the X direction and Q times in the Y axis direction, and further generated. An image processing apparatus for generating an image, which is P-folded in the X-axis direction and Q-folded in the Y-axis direction, by the image processing means multiplying the pixel data by P / N in the X-axis direction.
JP5257271A 1993-10-14 1993-10-14 Picture processing method and its device Pending JPH07110859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5257271A JPH07110859A (en) 1993-10-14 1993-10-14 Picture processing method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5257271A JPH07110859A (en) 1993-10-14 1993-10-14 Picture processing method and its device

Publications (1)

Publication Number Publication Date
JPH07110859A true JPH07110859A (en) 1995-04-25

Family

ID=17304068

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5257271A Pending JPH07110859A (en) 1993-10-14 1993-10-14 Picture processing method and its device

Country Status (1)

Country Link
JP (1) JPH07110859A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0895412A2 (en) * 1997-07-31 1999-02-03 Canon Kabushiki Kaisha Apparatus for enlarging or reducing of pictures
US7593017B2 (en) 2006-08-15 2009-09-22 3M Innovative Properties Company Display simulator
JP2011530200A (en) * 2008-08-02 2011-12-15 ヴァントリックス コーポレーション Method and system for predictive scaling of images after color mapping
CN113096045A (en) * 2021-04-14 2021-07-09 深圳市元征科技股份有限公司 Bitmap stretching method, bitmap stretching device and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0895412A2 (en) * 1997-07-31 1999-02-03 Canon Kabushiki Kaisha Apparatus for enlarging or reducing of pictures
EP0895412A3 (en) * 1997-07-31 2000-03-29 Canon Kabushiki Kaisha Apparatus for enlarging or reducing of pictures
US6631216B2 (en) 1997-07-31 2003-10-07 Canon Kabushiki Kaisha Image interpolation apparatus
US7593017B2 (en) 2006-08-15 2009-09-22 3M Innovative Properties Company Display simulator
JP2011530200A (en) * 2008-08-02 2011-12-15 ヴァントリックス コーポレーション Method and system for predictive scaling of images after color mapping
CN113096045A (en) * 2021-04-14 2021-07-09 深圳市元征科技股份有限公司 Bitmap stretching method, bitmap stretching device and electronic equipment

Similar Documents

Publication Publication Date Title
US5454071A (en) Method and apparatus for performing object sorting and edge calculation in a graphic system
US5973705A (en) Geometry pipeline implemented on a SIMD machine
US5335296A (en) Process for high speed rescaling of binary images
US20100214295A1 (en) Drawing processing apparatus, texture processing apparatus, and tessellation method
JPH04287292A (en) Method and device for rendering trimmed parametric surface
US5479525A (en) Method and apparatus for rotating a multivalued picture image 90 degrees
JPH0572626B2 (en)
US4799056A (en) Display system having extended raster operation circuitry
US5237649A (en) Method and system for acquiring interpolation points from straight short vectors representing figure in curve fitting
US4996653A (en) Line generation in a display system
US5020002A (en) Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system
US5157764A (en) Apparatus and method for using a test window in a graphics subsystem which incorporates hardware to perform clipping of images
US6140994A (en) Graphics controller for forming a composite image
JPH07110859A (en) Picture processing method and its device
JP2814860B2 (en) Image scaling device
EP0456394B1 (en) Video memory array having random and serial ports
US6731303B1 (en) Hardware perspective correction of pixel coordinates and texture coordinates
US4945497A (en) Method and apparatus for translating rectilinear information into scan line information for display by a computer system
US5815163A (en) Method and apparatus to draw line slices during calculation
JPH0887596A (en) Method for high-speed 180×-rotation and inversion of image
AU670941B2 (en) Object sorting and edge calculation for graphics systems
US5838297A (en) Method for color image scaling and other geometrical transformations
US6859205B1 (en) Apparatus and method for drawing lines
CA1316263C (en) Apparatus and method for using a test window in a graphics subsystem which incorporates hardware to perform clipping of images
JP2656753B2 (en) Image data processing apparatus and system using the same