JPH10198338A - Image processing device - Google Patents

Image processing device

Info

Publication number
JPH10198338A
JPH10198338A JP8359132A JP35913296A JPH10198338A JP H10198338 A JPH10198338 A JP H10198338A JP 8359132 A JP8359132 A JP 8359132A JP 35913296 A JP35913296 A JP 35913296A JP H10198338 A JPH10198338 A JP H10198338A
Authority
JP
Japan
Prior art keywords
data
lines
memory
image processing
image
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
JP8359132A
Other languages
Japanese (ja)
Inventor
Kimiyasu Mizuno
公靖 水野
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP8359132A priority Critical patent/JPH10198338A/en
Publication of JPH10198338A publication Critical patent/JPH10198338A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device for converting image data with a less memory capacity. SOLUTION: In such a case that image data having 640×480 dots is converted into image data having 1280×960 dots, a memory 10 for processing 640×16 lines is prepared. Initially, actual data for eight lines are developed in the upper half parts of the memory 10 and are processed, and then the data are developed in the lower half parts of the memory and rare processed. With the repetitions of these steps, four bits from the most significant bits of the coordinate values of four actual data calculated from desired dots on virtual coordinates are used as line numbers ('0' to '15') of the actual data developed in the memory 10.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、少ないメモリ領域
を用いて画像データのサイズ変換を行う画像処理装置に
関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an image processing apparatus for converting the size of image data using a small memory area.

【0002】[0002]

【従来の技術】近年、ディジタルスチルカメラが普及し
ている。このディジタルスチルカメラは、撮影した画像
データをディジタルデータとして記憶装置に格納してい
る。その画像データは、外部の又は内蔵の表示装置に表
示され、あるいはインタフェースを介して接続される印
刷装置で印刷して、随時鑑賞することができる。そし
て、その印刷出力装置としてのプリンタの需要が高まっ
てきている。
2. Description of the Related Art In recent years, digital still cameras have become widespread. In this digital still camera, photographed image data is stored as digital data in a storage device. The image data is displayed on an external or built-in display device, or printed by a printing device connected via an interface, and can be viewed at any time. The demand for a printer as the print output device is increasing.

【0003】プリンタは、データ用メモリ、ワーク用メ
モリ、印刷用メモリ等を有してカメラとの通信制御、画
像処理、印刷制御などプリンタ全体を制御する制御装置
を備えている。プリンタは、印刷の際にはシリアルI/
F(インタフェース)を介してディジタルスチルカメラ
(以下、単にカメラという)に接続される。一般に、カ
メラから送信される画像データはJPEGなどで圧縮さ
れており、この圧縮画像データがそのままの形式でプリ
ンタ側に送信される。プリンタは、その圧縮画像データ
を印刷用データに変換するために一旦データ用メモリに
格納して画像処理を行う。その画像処理技術の一つとし
て、画像サイズ変換がある。画像サイズ変換とは、例え
ば、640×480ドットの画像データを1280×9
60ドットの画像データに変換することである。従来の
画像サイズ変換は、1フレーム分の画像デー夕がメモリ
に展開されていることが前提になっており、メモリから
画像データを読み出し、画像サイズの変換演算を行い、
別のメモリ領域(プリンタなら例えば印刷用メモリな
ど)へ書き込むということを行っている。
The printer has a control device having a data memory, a work memory, a printing memory, etc., and controlling the entire printer such as communication control with a camera, image processing, and printing control. The printer uses a serial I / O
It is connected to a digital still camera (hereinafter simply referred to as a camera) via an F (interface). Generally, image data transmitted from a camera is compressed by JPEG or the like, and the compressed image data is transmitted to the printer in the same format. The printer temporarily stores the compressed image data in the data memory and performs image processing to convert the compressed image data into print data. One of such image processing techniques is image size conversion. The image size conversion means, for example, converting image data of 640 × 480 dots into 1280 × 9
This is to convert the image data into 60 dot image data. The conventional image size conversion is based on the premise that image data for one frame is expanded in a memory, reads image data from the memory, performs an image size conversion operation,
Writing to another memory area (for a printer, for example, a printing memory) is performed.

【0004】図15は、そのような画像処理を行う場合
に画像データが展開される例えば640×480ドット
のフレームメモリの領域を模式的に示す図である。この
図を用いて従来の画像処理について更に説明する。先
ず、フレームメモリ上に存在する任意のドットを表すた
めに、フレームメモリの640ドット方向にX軸を設定
し、480ドット方向にY軸を設定する。以下、この座
標軸による系を実座標ということにする。これによっ
て、フレームメモリ上に存在する任意のドット(画素デ
ータ)は、この実座標系上の1点として表すことができ
る。以下、このフレームメモリ上に存在する画素データ
を実データとよぶことにする。
FIG. 15 is a diagram schematically showing, for example, an area of a frame memory of 640 × 480 dots in which image data is expanded when such image processing is performed. The conventional image processing will be further described with reference to FIG. First, in order to represent an arbitrary dot existing in the frame memory, the X axis is set in the 640 dot direction of the frame memory, and the Y axis is set in the 480 dot direction. Hereinafter, a system based on these coordinate axes will be referred to as real coordinates. As a result, an arbitrary dot (pixel data) existing on the frame memory can be represented as one point on the real coordinate system. Hereinafter, the pixel data existing on the frame memory will be referred to as actual data.

【0005】上述した640×480ドットの画像デー
タを1280×960ドットの画像データのように拡大
した画像サイズに変換する場合、原画像データの実デー
タと実データの間の値を拡大変換後の新データとして補
間によって求めなければならない。換言すれば、任意の
位置のドットの値を補間によって求めるという処理を行
わなければならない。この補間演算は、図15の×印K
1の値の求める場合を例にとると、一般に、×印K1を
囲む4点の実データ、すなわち左上のドットJ1、その
右隣のドットJ2、ドットJ1の1ライン下のドットJ
3、その右隣のドットJ4の夫々の値に基づいて演算す
る。この演算方法は周知である。そして、その補間演算
のためには、先ず、図の×印K1の位置を座標で示さな
ければならない。
When the above-mentioned 640 × 480 dot image data is converted into an enlarged image size like 1280 × 960 dot image data, the value between the actual data of the original image data and the actual data is enlarged. It must be obtained by interpolation as new data. In other words, it is necessary to perform a process of obtaining the value of a dot at an arbitrary position by interpolation. This interpolation operation is performed by the X mark K in FIG.
Taking the case of finding the value of 1 as an example, generally, four points of actual data surrounding the X mark K1, that is, the upper left dot J1, the dot J2 on the right, and the dot J one line below the dot J1
3. Calculate based on the value of each dot J4 on the right. This calculation method is well known. Then, for the interpolation operation, first, the position of the mark K1 in the figure must be indicated by coordinates.

【0006】図16は、補間によって求めるべき新デー
タ(以下、所望ドットという)の位置を座標系上の1点
として表すために新たに導入される座標系を示す図であ
る。同図は、新座標系を図15の実座標系の各実データ
の間をr等分(r=4)して、実座標の場合のX軸方向
(640ドット)を0〜2588まで2559ドットで
表わし、同じくY軸方向(480ドット)を0〜191
8まで1919ドットで表わすようにしたものである。
こうすると、所望ドットを新たな座標系上の1点として
扱えることになる。そして、実データは、この新たな座
標系では実座標系での座標値をr倍した値をとることに
なる。以後、上記の新たな座標系を仮想座標ということ
にする。また、以下の説明では、仮想座標系を<X,Y
>のように<>又は大文字で表し、実座標系を(x ,
y)のように()又は小文字で表すことにする。
FIG. 16 is a diagram showing a coordinate system newly introduced to represent the position of new data (hereinafter referred to as a desired dot) to be obtained by interpolation as one point on the coordinate system. The figure shows that the new coordinate system is divided into r equal parts (r = 4) between the respective real data of the real coordinate system of FIG. 15 and the X-axis direction (640 dots) in the case of the real coordinates is from 2559 to 0 to 2588. In the same manner, dots are represented in the Y-axis direction (480 dots) from 0 to 191.
8 is represented by 1919 dots.
In this case, the desired dot can be handled as one point on a new coordinate system. In the new coordinate system, the actual data takes a value obtained by multiplying the coordinate value in the real coordinate system by r. Hereinafter, the new coordinate system will be referred to as virtual coordinates. In the following description, the virtual coordinate system is defined as <X, Y
> Such as <> or uppercase, and the real coordinate system is (x,
() or lower case like y).

【0007】尚、上記の新座標系はr=4としている
が、このように実座標を4等分しても所望ドットの位置
を表わすことが出来ない場合は、更にrをより大きな値
にし、実ドット間を上記よりも細かく等分して、所望ド
ットを正しく表わすことのできる新座標系を設定するよ
うにすればよい。
In the above new coordinate system, r = 4. However, if the desired coordinates cannot be represented by dividing the actual coordinates into four, r is set to a larger value. It is sufficient to divide the real dots into finer parts than the above and set a new coordinate system that can correctly represent the desired dots.

【0008】このように仮想座標系を設定してから、所
望ドットの周辺4点の実データで補間計算を行い、所望
ドットの値を計算する。所望ドットの仮想座標値<X,
Y>から、その周辺の4点の実データを求めるために
は、仮想座標値<X,Y>の値を夫々rで割った商によ
る座標値を計算する。この計算により求められる座標値
は、所望ドットの左上の実データの実座標値となる。こ
の座標値を(x0 ,y0)とすると、所望ドットの周辺
の残り3点の実座標値は、夫々(x0+1,y0 ),(x
0 ,y0 +1),(x0 +1,y0 +1)として得られ
る。尚、図16の例では、×印位置の仮想座標値は<
3,2>であり、実座標を等分した値はr=4であるか
ら、上記の演算結果は(x0 ,y0 )=(0,0)とな
る。
After setting the virtual coordinate system in this way, interpolation calculation is performed using actual data of four points around the desired dot to calculate the value of the desired dot. Virtual coordinate value of desired dot <X,
In order to obtain the actual data of the four surrounding points from Y>, coordinate values are calculated by quotients obtained by dividing the values of the virtual coordinate values <X, Y> by r. The coordinate values obtained by this calculation are the actual coordinate values of the actual data at the upper left of the desired dot. Assuming that these coordinate values are (x 0 , y 0 ), the actual coordinate values of the remaining three points around the desired dot are (x 0 +1, y 0 ), (x
0, y 0 +1), is obtained as (x 0 + 1, y 0 +1). Incidentally, in the example of FIG. 16, the virtual coordinate value of the x mark position is <
3, 2>, and the value obtained by equally dividing the actual coordinates is r = 4, so the above calculation result is (x 0 , y 0 ) = (0, 0).

【0009】次に、前述の割り算の余りを求める。座標
値xをrで割った余りをmod_x、座標値yをrで割
った余りをmod_yとすると、いまはr=4であるか
ら、mod_x=3,mod_y=2である。この値
は、所望ドットと、所望ドットの左上のドットとのX、
Y軸方向の距離を示している。この距離のスケールは仮
想座標上の値である。これらを用いることで、所望ドッ
トの値は計算できる。
Next, the remainder of the above division is obtained. Assuming that the remainder obtained by dividing the coordinate value x by r is mod_x, and the remainder obtained by dividing the coordinate value y by r is mod_y, since r = 4, mod_x = 3 and mod_y = 2. This value is X, between the desired dot and the upper left dot of the desired dot.
The distance in the Y-axis direction is shown. The scale of this distance is a value on virtual coordinates. By using these, the value of the desired dot can be calculated.

【0010】すなわち、いま(x0 ,y0 )=D0
(x0 +1,y0 )=D1 ,(x0 ,y0 +1)=
2 ,(x0 +1,y0 +1)=D3 (D0 ,D1 ,D
2 ,D3 の位置関係は図16を参照)とすると、まず、 D01=(D1 ×mod_x+D0 ×(r−mod_x))/r …(1) を計第する。次に、 D23=(D3 ×mod_x+D2 ×(r−mod_x))/r …(2) を計算する。そして、D01、D23より所望ドットD0123
は、 D0123=(D23×mod_y+D01×(r−mod_y)/r …(3) を計算することで、求めることができる。
That is, now (x 0 , y 0 ) = D 0 ,
(X 0 +1, y 0 ) = D 1 , (x 0 , y 0 +1) =
D 2 , (x 0 +1, y 0 +1) = D 3 (D 0 , D 1 , D
When the positional relationship of 2, D 3 is reference to FIG. 16) that, first, D 01 = (D 1 × mod_x + D 0 × (r-mod_x)) / r ... (1) a to total first. Then, D 23 = (D 3 × mod_x + D 2 × (r-mod_x)) / r ... compute the (2). Then, the desired dot D 0123 is obtained from D 01 and D 23.
Can be obtained by calculating D 0123 = (D 23 × mod_y + D 01 × (r-mod_y) / r (3)).

【0011】これを必要な全ドットについて行うこと
で、サイズ変換演算が完了する。実際にサイズ変換演算
をする際には、計算を左上のドットから始め、先ず仮想
座標Yの値を固定して、X軸方向へ一定のステップで仮
想座標値を進めながら計算していき、X軸方向が終了し
たら、Y軸方向へ1ステップ仮想座標値を進めて、再び
X軸方向への計算を進めていくということを繰り返して
いく。
By performing this for all necessary dots, the size conversion operation is completed. When actually performing the size conversion operation, the calculation is started from the upper left dot, the value of the virtual coordinate Y is first fixed, and the calculation is performed while the virtual coordinate value is advanced in a certain step in the X-axis direction. When the axial direction ends, the virtual coordinate value is advanced by one step in the Y-axis direction, and the calculation in the X-axis direction is repeated again.

【0012】例えば、図16の仮想座標から1280×
960ドットの画像を求める場合は、X方向のステップ
(以下、補間ステップという)及びY方向のステップ
(以下、Y補間ステップという)を夫々2として、仮想
座標<0,0>からX軸方向へ<2,0>,<4,0
>,・・・,<2558,0>と計算し、次のラインを
<0,2>,<2,2>,<4,2>,・・・,<25
58,2>と計算し、これを順次最後のラインまで、<
0,1918>,<2,1918>,<4,1918
>,・・・,<2558,1918>の順に計算して9
60×1280の画像データが求められる。
For example, from the virtual coordinates in FIG.
When obtaining an image of 960 dots, a step in the X direction (hereinafter, referred to as an interpolation step) and a step in the Y direction (hereinafter, referred to as a Y interpolation step) are each set to 2 and the virtual coordinates <0, 0> are shifted in the X-axis direction. <2,0>, <4,0
, ..., <2558, 0>, and the next line is <0, 2>, <2, 2>, <4, 2>, ..., <25
58, 2>, and sequentially calculate this until the last line <
0,1918>, <2,1918>, <4,1918
, ..., <2558, 1918> in the order of 9
60 × 1280 image data is obtained.

【0013】尚、右端の<2558,0>,<255
8,2>,・・・,<2558,1918>の計算で
は、(x0 +1,y0 ),(x0 ,y0 +1),(x0
+1,y0 +1)の値が(640,0),(640,4
80)のようになり、実データが存在しない。そのとき
は、実データに代えて予め決めた値(例えば0)を代用
して計算する。
Note that the rightmost <2558,0>, <255
, <2558, 1918>, (x 0 +1, y 0 ), (x 0 , y 0 +1), (x 0
+1, y 0 +1) are (640, 0 ), (640, 4
80), and no actual data exists. In that case, the calculation is performed by using a predetermined value (for example, 0) instead of the actual data.

【0014】図17は、従来のプリンタにおける画像処
理の動作を示すフローチャートである。このフローチャ
ートを用いて、画像処理動作を簡単に説明する。先ずユ
ーザによる印刷スタートキー等の操作により印刷指示が
行われると(ステップS1)、プリンタの画像処理装置
は、接続されているカメラと通信を行い(ステップS
2)、印刷する画像(ここでは640×480ドットの
画像とする)のJPEG圧縮データを受信し、この受信
したデータをデータ用メモリに格納する(ステップS
3)。
FIG. 17 is a flowchart showing the operation of image processing in a conventional printer. The image processing operation will be briefly described with reference to this flowchart. First, when a print instruction is issued by a user's operation of a print start key or the like (step S1), the image processing apparatus of the printer communicates with a connected camera (step S1).
2), receive JPEG compressed data of an image to be printed (here, an image of 640 × 480 dots) and store the received data in a data memory (step S)
3).

【0015】そして、まず16ライン分のJPEG伸長
を行う(ッステップS4)。この処理は、一般にJPE
G圧縮データの伸長過程では伸長データが16×16ド
ットのブロック単位で生成されることに合わせて16ラ
イン単位で行う。また、このJPEG伸長処理では、ワ
ークメモリのJPEG伸長データエリアを用いて行わ
れ、16ライン分のY(輝度),Cb,Crデータが生
成される。
Then, JPEG expansion for 16 lines is performed (step S4). This processing is generally performed by JPE
The expansion process of the G compressed data is performed in units of 16 lines in accordance with the generation of the expanded data in units of 16 × 16 dots. The JPEG decompression process is performed using the JPEG decompressed data area of the work memory, and Y (luminance), Cb, and Cr data for 16 lines are generated.

【0016】次に、その16ライン分について、YCb
CrデータからRGBデータへの変換を行い(ステップ
S5)、さらに印字する色がイエロー(Yello
w)、マゼンタ(Magenta)又はシアン(Cya
n)のうち、いずれの色であるかを判断する(ステップ
S6及びS7)。そして、印刷する色がイエローであれ
ば上記16ライン分のRGBデータのイエロー用色変換
を行い(ステップS8)、印刷する色がマゼンタであれ
ば上記16ライン分のRGBデータのマゼンタ用色変換
を行い(ステップS9)、印刷する色がイエローでもマ
ゼンタでもなければ、16ライン分のRGBデータのシ
アン用色変換を行う(ステップS10)。
Next, for the 16 lines, YCb
The conversion from the Cr data to the RGB data is performed (step S5), and the color to be printed is yellow (Yellow).
w), magenta or cyan (Cya)
It is determined which of n) the colors are (steps S6 and S7). If the color to be printed is yellow, color conversion for yellow of the 16 lines of RGB data is performed (step S8). If the color to be printed is magenta, color conversion for magenta of the 16 lines of RGB data is performed. If the color to be printed is neither yellow nor magenta (step S9), color conversion for 16 lines of RGB data for cyan is performed (step S10).

【0017】そして上記の色変換したデータをワークメ
モリのYMCデータエリアに格納する(ステップS1
1)。この後、全ライン(この例では480ライン)の
データ伸長が終了しているか否かを判別し(ステップS
12)、終了していなければ上記ステップS4〜S11
を繰り返す。これにより全ライン即ち480ラインのデ
ータ伸長が終了すると(S12がY)、この1画面分の
全データをワークメモリのYMCデータエリアから順次
読み出し、プリンタの解像度に合わせてサイズ変換を行
い、そのサイズ変換処理後の印刷データを印刷メモリへ
の展開をする(ステップS13)。そして、展開が終わ
ると、いま展開した色の印字を行う(ステップS1
4)。この印字処理は、印刷用メモリから、印刷制御回
路(図示せず)が読み出して行う。印字が終わると同様
な処理を繰り返し、全色の印刷が完了する。
The color-converted data is stored in the YMC data area of the work memory (step S1).
1). Thereafter, it is determined whether or not data expansion of all lines (480 lines in this example) has been completed (step S).
12) If not completed, the above steps S4 to S11
repeat. When the data expansion of all the lines, that is, 480 lines is completed (Y in S12), all the data for one screen is sequentially read from the YMC data area of the work memory, and the size is converted according to the resolution of the printer. The print data after the conversion processing is developed in the print memory (step S13). When the development is completed, printing of the developed color is performed (step S1).
4). This printing process is performed by reading from a printing memory by a print control circuit (not shown). When printing is completed, the same processing is repeated, and printing of all colors is completed.

【0018】[0018]

【発明が解決しようとする課題】ところで、上述した画
像処理の手法では、サイズ変換のためのワークメモリ領
域として、64り×480=307200バイト(1ド
ットを1バイトとして換算)の容量を使用している。こ
のようなワーク用として一時的に用いられるメモリの容
量は、本来は少ないに越したことなない。さもないと、
コスト削減の実現を阻害すると共に装置の小型化の実現
を阻害する。
By the way, in the above-mentioned image processing method, a capacity of 64 bytes × 480 = 307200 bytes (one dot is converted to one byte) is used as a work memory area for size conversion. ing. The capacity of the memory temporarily used for such a work is originally small. Otherwise,
This hinders the realization of cost reduction and the miniaturization of the apparatus.

【0019】本発明の課題は、少ないメモリ容量で画像
データのデータ変換を行う画像処理装置を提供すること
である。
An object of the present invention is to provide an image processing apparatus for performing image data conversion with a small memory capacity.

【0020】[0020]

【課題を解決するための手段】請求項1記載の発明の画
像処理装置は、画像処理に用いるメモリのライン数を2
n (n=1,2,3,・・・)として構成される。上記
メモリは、例えば請求項2記載のように、アドレスの値
が連続する数値で表わされるように構成される。
According to the first aspect of the present invention, there is provided an image processing apparatus, wherein the number of lines of a memory used for image processing is two.
n (n = 1, 2, 3,...). The memory is configured such that the address value is represented by a continuous numerical value, for example.

【0021】請求項3記載の発明の画像処理装置は、原
画像データを二次元平面として扱って画像処理する際に
用いるメモリ上における各画素の座標(x,y)が連続
する座標値(m,n)で表わされ、メモリのライン数が
n (n=1,2,3,・・・)に設定されていると
き、メモリ上のアドレスを計算する際に、座標の下位n
ビットを用いて処理を行うように構成される。
According to the image processing apparatus of the present invention, the coordinates (x, y) of each pixel on the memory used for processing the image by treating the original image data as a two-dimensional plane (m , N), and when the number of lines in the memory is set to 2 n (n = 1, 2, 3,...), When calculating the address on the memory, the lower n of the coordinates
It is configured to perform processing using bits.

【0022】上記画像処理は、例えば請求項4記載のよ
うに、画像データのサイズ変換のための補間計算であ
る。また、該補間計算は、例えば請求項5記載のよう
に、予め定めた条件式により補間計算が可能か否かを判
断しながら行うように構成される。そして、上記条件式
は、例えば請求項6記載のように、仮想座標を実座標の
r倍の分解能とし、メモリライン数の1/2ライン数毎
の実データ展開回数をiとしたとき、上記補間計算の対
象ドットの仮想座標値Yが「Y<(2n-1 ×(i+1)
−1)×r」を満たすか又は対象ドットの左上の実デー
タのドットの実座標値yが「y <(i×2n-1 +2
n-1 −1)」を満たすとき補間計算が可能であると判断
するように構成される。そして、例えば請求項7記載の
ように、上記条件式に基づく判断を最終の処理のときに
は行わないように構成される。
The image processing is, for example, an interpolation calculation for converting the size of the image data. In addition, the interpolation calculation is configured to be performed while determining whether or not the interpolation calculation is possible by a predetermined conditional expression, for example, as described in claim 5. For example, the conditional expression is defined as follows: when the virtual coordinates have a resolution r times the real coordinates and the number of times of real data development for each half of the number of memory lines is i, The virtual coordinate value Y of the target dot for the interpolation calculation is “Y <(2 n−1 × (i + 1)”
−1) × r ”or the real coordinate value y of the dot of the real data at the upper left of the target dot is“ y <(i × 2 n−1 +2)
When n-1 -1) is satisfied, it is determined that interpolation calculation is possible. Then, for example, as set forth in claim 7, the determination based on the conditional expression is not performed at the time of the final processing.

【0023】請求項8記載の発明の画像処理装置は、空
間の任意の1点を、その周辺の既知の点から求める補間
処理において、処理の中で行う計算が省略可能か否かを
判断し、省略可能な場合はその計算を行わないように制
御するように構成される。
According to an eighth aspect of the present invention, in the interpolation processing for obtaining an arbitrary point in the space from known points around the space, it is determined whether or not the calculation performed in the processing can be omitted. , When it can be omitted, the calculation is controlled not to be performed.

【0024】[0024]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照しながら説明する。先ず、第1の実施の形態にお
いては、カメラ3から入力されるJPEGなどで圧縮さ
れた入力画像データ(以下、単に入力画像ともいう)を
伸長する際に、伸長計算と並行してサイズ変換のための
補間演算を行う。そして、この補間演算に用いるワーク
メモリの構成を、JPEGのデータ伸長過程で生成され
るデータ構成単位(16×16ドットのブロック単位)
に合わせて、画像データの16ライン分の構成としてい
る。そして16ライン分の画像データ(ソース画像が6
40×480ドットならば、640×16ドット分のデ
ータ)を生成するたびに、サイズ変換のための補間演算
をを行い、これにより、サイズ変換の演算に必要なメモ
リ容量を削減している。
Embodiments of the present invention will be described below with reference to the drawings. First, in the first embodiment, when decompressing input image data (hereinafter, also simply referred to as an input image) input by the camera 3 and compressed by JPEG or the like, size conversion is performed in parallel with decompression calculation. To perform an interpolation operation. The configuration of the work memory used for the interpolation operation is determined by the data configuration unit (block unit of 16 × 16 dots) generated in the data expansion process of JPEG.
, The configuration is for 16 lines of image data. Then, 16 lines of image data (the source image is 6
When 40 × 480 dots are generated, every time 640 × 16 dots of data are generated, an interpolation operation for size conversion is performed, thereby reducing the memory capacity required for the size conversion operation.

【0025】図1は、第1の実施の形態における画像処
理装置の構成を示すブロック図である。同図に示す画像
処理装置1は、例えばプリンタのインタフェースコント
ローラ部であり、印刷制御回路2は、例えばプリンタの
エンジンコントローラ部である。上記の画像処理装置1
には、外部のホスト機器であるディジタルカメラ(以
下、単にカメラという)3がシリアルインタフェース
(I/F)を介して接続される。
FIG. 1 is a block diagram showing the configuration of the image processing apparatus according to the first embodiment. The image processing apparatus 1 shown in FIG. 1 is, for example, an interface controller of a printer, and the print control circuit 2 is, for example, an engine controller of the printer. The above image processing apparatus 1
, A digital camera (hereinafter simply referred to as a camera) 3 as an external host device is connected via a serial interface (I / F).

【0026】画像処理装置1は、CPU4を備え、CP
U4にはユーザが印刷開始を指示するための印刷スター
トキー5、カメラ3から入力される画像データを格納す
るデータ用メモリ6、その画像データのJPEG伸長処
理とその伸長処理と並行してサイズ変換のための補間演
算を際に一時的に使用するワーク用メモリ7、サイズ変
換後の一画面分の印刷画像データを格納する印刷用メモ
リ8、処理プログラムや係数などを格納したROM9等
が接続されている。印刷制御回路2は、印刷用メモリ8
から読み出した印刷画像データに基づきプリンタエンジ
ン部を制御して印刷を実行する。
The image processing apparatus 1 has a CPU 4 and a CP
In U4, a print start key 5 for the user to instruct the start of printing, a data memory 6 for storing image data input from the camera 3, a JPEG decompression process of the image data, and a size conversion in parallel with the decompression process A work memory 7 for temporarily using the interpolation calculation for the operation, a printing memory 8 for storing one screen of print image data after size conversion, a ROM 9 for storing processing programs, coefficients, and the like are connected. ing. The print control circuit 2 includes a print memory 8
The printer engine is controlled based on the print image data read from the printer, and printing is executed.

【0027】図2は、本実施の形態において用いるデー
タ伸長(JPEG伸長)及びサイズ変換に使用するイエ
ロー(マゼンタ,シアン)用のワークメモリ領域(以
下、YMCワークエリアという)のアドレスマップを示
している。同図に示すYMCワークエリア10には、6
40×16ドットの画像データがアドレス0〜アドレス
10239まで線順次に配置される。このYMCワーク
エリア10は、YMCワークエリアA11(以下、単に
エリアA11という)及びYMCワークエリアB12
(以下、単にエリアB12という)の2つの領域に分け
て用いられる。これら2つの領域は、夫々640ドット
×8ライン分の容量を有しており、両エリアの画像デー
タのアドレスは連続している。すなわち、エリアA11
の640×8ドットはアドレス「0」〜アドレス「51
19」まで線順次に連続し、次のアドレス「5120」
からアドレス「10239」までエリアB12の640
×8ドットが線順次に連続している。詳しくは後述する
ように、伸長データは8ライン毎に2つのエリアA11
及びB12に交互に展開される。
FIG. 2 shows an address map of a work memory area (hereinafter, referred to as a YMC work area) for yellow (magenta, cyan) used for data expansion (JPEG expansion) and size conversion used in the present embodiment. I have. The YMC work area 10 shown in FIG.
Image data of 40 × 16 dots are line-sequentially arranged from address 0 to address 10239. The YMC work area 10 includes a YMC work area A11 (hereinafter, simply referred to as area A11) and a YMC work area B12.
(Hereinafter, simply referred to as area B12). Each of these two areas has a capacity of 640 dots × 8 lines, and the addresses of image data in both areas are continuous. That is, the area A11
640 × 8 dots are addresses “0” to “51”.
19 "and the next address" 5120 "
From area B12 to address "10239"
× 8 dots are line-sequentially continuous. As described later in detail, the decompressed data is stored in two areas A11 every eight lines.
And B12 alternately.

【0028】図3は、上記YMCワークエリア10に展
開される実データのアドレスと実座標の関係、及び実デ
ータの展開状態を示す図である。同図の下方1/2に展
開する白丸印は初期状態における不定データ、同図の上
方1/2に展開する黒丸印はいま展開したばかりの実デ
ータである。
FIG. 3 is a diagram showing the relationship between the address of real data and the actual coordinates to be developed in the YMC work area 10 and the state of development of the real data. The white circles developed in the lower half of the figure are indefinite data in the initial state, and the black circles developed in the upper half of the figure are actual data just developed.

【0029】YMCワークエリア10の各ドットは、図
3に示すように、メモリ上ではアドレス「0」〜「10
239」で示され(図では各データの上に[]で示して
いる)、二次平面上では図15の場合と同様に実座標
(0,0)〜(2556,60)で表わされる(図では
各データの下に()で示している)。
As shown in FIG. 3, each dot of the YMC work area 10 has addresses "0" to "10" on the memory.
239 "(in the figure, each data is indicated by []), and on the secondary plane are represented by real coordinates (0, 0) to (2556, 60) as in the case of FIG. In the figure, each data is indicated by ().)

【0030】図4、図5及び図6は、夫々上記図3に続
いてYMCワークエリア10に順次8ライン毎に展開さ
れる実データと仮想座標(夫々の図でデータの下に<>
で示している)の関係、及び実データの展開状態を示す
図である。図4〜図5に示す黒丸印は、図に示す処理タ
イミングにおいて展開されたばかりの実データ、網目丸
印は、前回の処理タイミングで展開された実データであ
る。
FIGS. 4, 5 and 6 show actual data and virtual coordinates (<> in each figure, respectively) that are successively developed every eight lines in the YMC work area 10 following FIG.
(Indicated by ()) and a development state of actual data. The black circles shown in FIGS. 4 and 5 are the actual data just developed at the processing timings shown in the figures, and the mesh circles are the actual data developed at the previous processing timings.

【0031】本実施の形態においては、図16の場合と
同様に実データ間を4等分した仮想座標系を用いて実デ
ータの位置を表わしている。図4は、上述したように、
図3に示すデータ展開の後、次の8ライン分のデータを
エリアB12に展開した直後の状態を示しており、展開
されたばかりの実データの下に示す仮想座標値は、前回
の処理タイミングで上に展開された実データの仮想座標
値に連続している。
In the present embodiment, the position of the real data is represented using a virtual coordinate system in which the real data is divided into four equal parts as in the case of FIG. FIG. 4, as described above,
3 shows a state immediately after the next eight lines of data have been developed in the area B12 after the data development shown in FIG. 3, and the virtual coordinate values shown below the real data just developed are the same as those in the previous processing timing. It is continuous with the virtual coordinate values of the actual data expanded above.

【0032】そして、上記図4に示すデータ展開の後、
次の8ライン分のデータをエリアA11に展開した状態
を示す図5では、展開されたばかりの実データの下に示
す仮想座標値は、前回の図4の処理タイミングで下に展
開された実データの仮想座標値に連続している。これ
は、図16の場合と同様に1フレームのメモリにデータ
を展開したと仮定したときにおける仮想座標系の座標値
である。図6も同様に、下方の領域に展開されたばかり
の実データの下に示す仮想座標値は、前回の図5の処理
タイミングで上に展開された実データの仮想座標値に連
続している。
Then, after the data expansion shown in FIG.
In FIG. 5 showing a state in which the data of the next eight lines has been developed in the area A11, the virtual coordinate values shown below the real data just developed are the actual data developed below in the previous processing timing of FIG. Are continuous with the virtual coordinate values of. This is the coordinate value of the virtual coordinate system when it is assumed that the data has been expanded in the memory of one frame as in the case of FIG. Similarly, in FIG. 6, the virtual coordinate values shown below the real data just developed in the lower area are continuous with the virtual coordinate values of the real data developed above at the previous processing timing in FIG. 5.

【0033】図7は、以下の説明に用いるため、図3の
実データ展開図を、図4乃至図6に示すと同様に仮想座
標で図示し直したものである。このように図7、図4〜
図6に示すように順次8ライン毎にYMCワークエリア
10のエリアA11及びエリアB12に交互に順次展開
されていく画像データの構成において、伸長処理とサイ
ズ変換を並行して行う処理を以下に説明する。
FIG. 7 is a diagram obtained by redrawing the actual data development diagram of FIG. 3 with virtual coordinates as shown in FIGS. 4 to 6 for use in the following description. As described above, FIGS.
As shown in FIG. 6, in the structure of the image data which is sequentially and alternately developed in the area A11 and the area B12 of the YMC work area 10 for every eight lines, the processing of performing the expansion processing and the size conversion in parallel will be described below. I do.

【0034】図8は、上記第1の実施の形態における処
理の動作を示すフローチャートである。同図のフローチ
ャートにおいて、ステップS21〜S24の処理は、図
17に示したステップS1〜S4の処理開始から16ラ
イン分のJPEG伸長までの処理と同一である。
FIG. 8 is a flowchart showing the operation of the processing in the first embodiment. In the flowchart of FIG. 17, the processing of steps S21 to S24 is the same as the processing from the start of the processing of steps S1 to S4 to the JPEG decompression for 16 lines shown in FIG.

【0035】本実施の形態においては、上記に続いて、
先ず16ラインの上位8ライン分について YCbCr
データからRGBデータへの変換を行い(ステップS2
5)、次に、いま印字する色がイエロー(Yello
w)、マゼンタ(Magenta)又はシアン(Cya
n)のうち、いずれの色であるかを判断する(ステップ
S26及びS27)。そして、印刷する色がイエローで
あれば(S26がY)、上記8ライン分のRGBデータ
のイエローへの色変換を行う(ステップS28)。尚、
印刷する色がマゼンタであれば(S26がNで、S27
がY)、上記8ライン分のRGBデータのマゼンタへの
色変換を行い(ステップS29)、また、印刷する色が
イエローでもマゼンタでもない(S26がNで、S27
もN)、すなわちシアンであれば、8ライン分のRGB
データのシアンへの色変換を行う(ステップS30)。
In the present embodiment, following the above,
First, YCbCr for upper 8 lines of 16 lines
Data is converted to RGB data (step S2).
5) Next, the color to be printed is yellow (Yellow).
w), magenta or cyan (Cya)
It is determined which of n) the colors are (steps S26 and S27). If the color to be printed is yellow (Y in S26), the RGB data for the eight lines is converted into yellow (step S28). still,
If the color to be printed is magenta (S26 is N, S27
Y), the color conversion of the RGB data for the eight lines to magenta is performed (step S29), and the color to be printed is neither yellow nor magenta (S26 is N, S27
N), that is, if cyan, eight lines of RGB
The color conversion of the data to cyan is performed (step S30).

【0036】そして、上記の色変換したデータ(実デー
タ)をYMCワークエリア10のエリアA11に格納し
(ステップS31)、詳しくは後述する「演算可能な最
大限の範囲までのサイズ変換処理及び印刷メモリ8への
展開処理を行う(ステップS32)。続くステップS3
3〜S40の処理は下位8ラインのデータについての処
理であり、展開するメモリ領域がエリアB12に変わる
だけであって、上記のステップS25〜S33の上位8
ラインのデータについての処理と夫々同一である。
Then, the color-converted data (actual data) is stored in an area A11 of the YMC work area 10 (step S31). A development process to the memory 8 is performed (step S32), followed by step S3.
The processing of 3 to S40 is processing for the data of the lower 8 lines, and only the memory area to be expanded is changed to the area B12, and the upper 8 of the above-mentioned steps S25 to S33.
The processing is the same as the processing for the line data.

【0037】上記処理に続いて、全ライン(この例では
480ライン)のデータ伸長が終了しているか否かを判
別し(ステップS41)、終了していなければ(S41
がN)、上記ステップS24〜S41を繰り返す。これ
により全ライン即ち480ラインのデータ伸長が終了し
たことを確認すると(S41がY)、この1画面分の全
データを印刷用メモリ8から順次読み出して1色の印字
を行う(ステップS42)。この印字処理は、印刷用メ
モリ8から、印刷制御回路2が印刷データ用を読み出し
て行う。印字が終わると、全色の印刷が完了しているか
否かを判別して(ステップS43)、完了でなければ
(S43がN)、再びステップS24〜S42を繰り返
して、全色の印刷が完了する(S43がY)。
Subsequent to the above processing, it is determined whether or not data expansion of all lines (480 lines in this example) has been completed (step S41).
N), and repeat the above steps S24 to S41. When it is confirmed that the data expansion of all lines, that is, 480 lines is completed (Y in S41), all the data for one screen is sequentially read from the printing memory 8 and one color printing is performed (step S42). The printing process is performed by the print control circuit 2 reading out the print data from the print memory 8. When printing is completed, it is determined whether or not printing of all colors is completed (step S43). If not completed (N in S43), steps S24 to S42 are repeated again to complete printing of all colors. (S43 is Y).

【0038】図9及び図10は、上記のステップS32
(又はS40)における処理を更に詳しく説明するフロ
ーチャートである。尚、ここでは、YMCワークエリア
10の容量を(2n ライン)×(hドット)とし、仮想
座標は、r=2d (dは1以上の正の整数)として実座
標のr倍の分解能を持つように設定する。図3並びに図
7及び図4〜図6に示したYMCワークエリア10の設
定は、上記の係数の設定を、n=4、h=640、d=
2とした場合の構成を示している。以下、図9及び図1
0のフローチャートを用い、図3並びに図7及び図4〜
図6を参照しながら、画像データのサイズを640×4
80ドットから1280×960ドットに変換する場合
を例にとって、サイズ変換の処理動作を更に説明する。
FIGS. 9 and 10 show the above-mentioned step S32.
It is a flowchart explaining the process in (or S40) in more detail. Here, the capacity of the YMC work area 10 is (2 n lines) × (h dots), the virtual coordinates are r = 2 d (d is a positive integer of 1 or more), and the resolution is r times the real coordinates. Set to have. The settings of the YMC work area 10 shown in FIGS. 3 and 7 and FIGS. 4 to 6 are obtained by setting the above coefficients to n = 4, h = 640, d =
2 is shown. Hereinafter, FIGS. 9 and 1
3 and FIGS. 7 and 4 to FIG.
Referring to FIG. 6, the size of the image data is 640 × 4
The size conversion processing operation will be further described, taking as an example the case of converting from 80 dots to 1280 × 960 dots.

【0039】尚、以下の説明において、変数KASO_
Xは、所望ドットの仮想座標値(KASO_X、KAS
O_Y)のX座標値を表すものとし、変数KASO_Y
は、同じくY座標値を表わすものとする。また、変数S
TEP_Xは、X補間ステップを表わすものとし、変数
STEP_Yは、Y補間ステップを表わすものとする。
また、KASO_X>>dはKASO_Xをdビット右
シフトすることを表すものとし、KASO_Y>>d
は、KASO_Yをdビット右シフトすることを表すも
のとする。
In the following description, the variable KASO_
X is the virtual coordinate value (KASO_X, KAS) of the desired dot.
O_Y) and the variable KASO_Y
Represents the Y coordinate value in the same manner. Also, the variable S
TEP_X represents an X interpolation step, and a variable STEP_Y represents a Y interpolation step.
KASO_X >> d indicates that KASO_X is right-shifted by d bits, and KASO_Y >> d
Represents that KASO_Y is shifted right by d bits.

【0040】データ(ビット列)において右シフトは、
割り算を行うことであり、例えばデータa(ビット列
a)を1ビット右シフトすると割り算「a/2」の商が
得られ、2ビット右シフトすると「a/22 」の商、3
ビット右シフトすると「a/23 」の商、・・・、dビ
ット右シフトすると「a/2d 」の商が得られる。
The right shift in the data (bit string)
Is to perform the division, for example, when 1-bit right shift data a (bit string a) obtained quotient of the division "a / 2", when 2-bit right shift "a / 2 2" quotient of, 3
Shifting right by bits gives the quotient of "a / 2 3 ",... Shifting right by d bits gives the quotient of "a / 2 d ".

【0041】図9に示すフローチャートにおいて、先
ず、仮想座標用の変数KASO_Y及びカウンタiを初
期化する(ステップS50)。この処理では、KASO
_X及びKASO_Yに設定する値は、補間計算を最初
に行うドットの仮想座標値である。例えば、図7、図4
〜図6の例では、仮想座標値(0,0)が設定される。
したがって、変数KASO_Yには「0」が設定され
る。またカウンタiには「0」が設定される。
In the flowchart shown in FIG. 9, first, a variable KASO_Y for virtual coordinates and a counter i are initialized (step S50). In this process, KASO
The values set in _X and KASO_Y are the virtual coordinate values of the dot on which the interpolation calculation is performed first. For example, FIGS.
6, virtual coordinate values (0, 0) are set.
Therefore, the variable KASO_Y is set to “0”. “0” is set in the counter i.

【0042】次に、2のn乗ライン分のJPEG伸長を
行ってワーク用メモリ7のJPEGワークエリアにYC
bCrデータを生成する(ステップS51)。この処理
における2のn乗ラインは、例えば、図7、図4〜図6
の例では、n=4であり、したがって、この場合は2n
=24 、つまり16ラインである。
Next, JPEG expansion for 2 n lines is performed to store YC in the JPEG work area of the work memory 7.
The bCr data is generated (step S51). The 2 n -th power line in this processing is, for example, as shown in FIGS.
In the example, n = 4, so in this case 2 n
= 2 4 , that is, 16 lines.

【0043】続いて、2の「n−1」乗ライン分をイエ
ロー(又はマゼンタ、又はシアン)に色変換し、この色
変換したデータをYMCワークエリア10のエリアA1
1に格納する(ステップS52)。これにより、例えば
図7に示すように実データがエリアA11に展開され
る。
Subsequently, the 2 "n-1" -th power lines are color-converted into yellow (or magenta or cyan), and the color-converted data is stored in an area A1 of the YMC work area 10.
1 (step S52). Thereby, the actual data is developed in the area A11 as shown in FIG. 7, for example.

【0044】上記に続いて、KASO_Yのラインの補
間計算が可能か否かを判別する(ステップS53)。こ
の処理は、本実施の形態においては、YMCワークエリ
ア10のデータ領域が、従来例のように1フレーム分の
データ領域ではなく、16ライン分のデータ領域である
ので、仮想座標を導入した場合、X軸方向の演算には支
障がないが、Y軸方向の演算には問題が生じる。これを
避けるための判断処理である。
Subsequently, it is determined whether or not the interpolation calculation of the KASO_Y line is possible (step S53). In this embodiment, since the data area of the YMC work area 10 is not a data area of one frame as in the conventional example but a data area of 16 lines, the virtual coordinates are introduced. , In the X-axis direction, but there is a problem in the Y-axis direction. This is a determination process for avoiding this.

【0045】そして、この処理では、或る条件を設け、
その条件を満たしている範囲までの補間計算をする。す
なわち、いま存在している図7の0〜7ライン目まで、
実データを使ってサイズ変換演算(補間計算)をする
際、計算が可能であるドット位置、すなわち展開された
実ドットの最後のラインよりも上に位置する条件は、仮
想座標値Yが(8−1)×r=7×4=28未満である
ことである。28以上の場合は、8ライン目以降のデー
タを補間計算に用いることになり、このままでは計算は
不可能である。
In this process, a certain condition is set,
The interpolation calculation is performed up to the range satisfying the condition. That is, up to the 0th to 7th lines in FIG.
When a size conversion operation (interpolation calculation) is performed using actual data, the dot position at which the calculation is possible, that is, the condition of being located above the last line of the expanded real dots, is that the virtual coordinate value Y is (8 -1) × r = 7 × 4 = less than 28. In the case of 28 or more, the data of the 8th line and thereafter is used for the interpolation calculation, and the calculation cannot be performed as it is.

【0046】よって、この条件に従って計算すると、X
補問ステップ、Y補間ステップをそれぞれ2として、Y
=28未満の範囲、つまり、仮想座標<0,0>,<
2,0>,<4,0>,・・・,<2558,0>,<
0,2>,<2,2>,・・・,く2558,26>ま
でのドットが求められる。
Therefore, when calculated according to this condition, X
The interpolation step and the Y interpolation step are each set to 2, and Y
= 28, that is, the virtual coordinates <0, 0>, <
2,0>, <4,0>, ..., <2558,0>, <
0, 2>, <2, 2>,..., 2558, 26>.

【0047】上記の計算可能なドットの条件を示す一般
式は、以下に示される。すなわち、YMCワークエリア
10を2n ライン分とし、2n-1 ライン分の展開をした
回数が0から数えてi回目であるとき、この処理におけ
る計算可能な条件は、所望ドットの仮想座標値が、 仮想座標値Y <(2n-1 ×(i+1)−1)×r ・・・(4) を満たすか、または、所望ドットの左上の実データのド
ットの実座標yが、 実座標y <(i×2n-1 +2n-1 −1) ・・・(5) を満たすことである。上述のステップS53における判
別のための計算式は上記の式(4)に拠っている。そし
て、上記の条件式が満たされたときは(ステップS53
がY)、仮想座標変換用の変数KASO_Xを初期化す
る(ステップS54)。この処理では、前述したよう
に、変数KASO_Xに「0」が設定される。
A general formula showing the above-mentioned dot conditions that can be calculated is shown below. In other words, when the YMC work area 10 has 2 n lines and the number of developments for 2 n-1 lines is i-th counting from 0, the condition that can be calculated in this processing is the virtual coordinate value of the desired dot. Satisfies the virtual coordinate value Y <(2 n−1 × (i + 1) −1) × r (4), or the real coordinate y of the upper left real data dot of the desired dot is the real coordinate y <(i × 2 n−1 +2 n−1 −1) (5) The calculation formula for the discrimination in the above step S53 is based on the above formula (4). When the above conditional expression is satisfied (step S53)
Y), a variable KASO_X for virtual coordinate conversion is initialized (step S54). In this process, as described above, “0” is set to the variable KASO_X.

【0048】続いて、YMCワークエリア10上のアド
レスが「(KASO_Yをrで割った商の下位nビッ
ト)×h+(KASO_Xをrで割った商)であるドッ
ト(所望ドットの左上の実データ、図15のドットJ1
参照)と、そのドットの、右隣のドット(図15のドッ
トJ2参照、アドレスは上記のアドレス+1)、下のド
ット(図15のドットJ3参照、アドレスは上記のアド
レス+h)、右斜め下のドット(図15のドットJ4参
照、アドレスは上記のアドレス+h+1)の合計4ドッ
トを用いて補間計算する(ステップS55)。この処理
における左上の実データの位置算出についての説明は後
述する。尚、この補間計算は周知の方法で行う。
Subsequently, a dot whose address on the YMC work area 10 is “(lower n bits of a quotient obtained by dividing KASO_Y by r) × h + (a quotient obtained by dividing KASO_X by r) (real data at the upper left of the desired dot) , Dot J1 in FIG.
15), a dot on the right of the dot (see dot J2 in FIG. 15, address is the above address + 1), a lower dot (see dot J3 in FIG. 15, address is the above address + h), and a diagonally lower right (Refer to dot J4 in FIG. 15, the address is the above address + h + 1) for a total of four dots (step S55). The calculation of the position of the upper left real data in this process will be described later. This interpolation calculation is performed by a known method.

【0049】この後、1ライン分の補間データの作成が
終了しているか否かを判別し(ステップS56)、終了
していなければ(S56がN)、KASO_X=KAS
O_X+STEP_Xの演算を行って仮想座標をX軸方
向に1ステップ進めて(ステップS57)、上記ステッ
プS55、S56を繰り返す。これにより、仮想座標の
X軸方向へ補間演算が進行する。
Thereafter, it is determined whether or not the interpolation data for one line has been created (step S56). If the creation has not been completed (N in S56), KASO_X = KAS
The virtual coordinate is advanced by one step in the X-axis direction by performing the calculation of O_X + STEP_X (step S57), and the above steps S55 and S56 are repeated. Thus, the interpolation calculation proceeds in the X-axis direction of the virtual coordinates.

【0050】そして、1ライン分の補間データの作成が
終了したときは(S56がY)、次に全ラインの補間デ
ータの作成が終了したか否かを判別し(ステップS5
8)、終了していなければ(S58がN)、KASO_
Y=KASO_Y+STEP_Yの演算を行って仮想座
標をY軸方向に1ステップ進めて(ステップS59)、
上記ステップS53、S58を繰り返す。これにより、
図7の例であれば、0〜6ラインまでの補間演算の処理
が進行する。
When the creation of the interpolation data for one line is completed (Y in S56), it is determined whether the creation of the interpolation data for all the lines is completed (step S5).
8) If not completed (N in S58), KASO_
By performing the calculation of Y = KASO_Y + STEP_Y, the virtual coordinates are advanced by one step in the Y-axis direction (step S59),
Steps S53 and S58 are repeated. This allows
In the case of the example of FIG. 7, the processing of the interpolation calculation for the 0 to 6 lines proceeds.

【0051】そして、ステップS53で、次の所望ドッ
トが7ライン目の実データ(展開された実データの最終
ライン)の仮想座標と同じかそれよりも下になり、前述
の式(4)により、補間計算が不可能であることを判別
すると(S53がN)、図10に示すフローチャートの
処理に移る。
Then, in step S53, the next desired dot is equal to or lower than the virtual coordinates of the real data of the seventh line (the last line of the expanded real data). If it is determined that the interpolation calculation is not possible (N in S53), the process moves to the flowchart shown in FIG.

【0052】図10の処理では、先ず、カウンタiを
「1」インクリメントする(ステップS50)。これに
より、YMCワークエリア10の1/2領域毎(本例で
は8ライン分毎)のデータ変換が順次計数される。
In the process of FIG. 10, first, the counter i is incremented by "1" (step S50). Thus, the data conversion for each half area of the YMC work area 10 (in this example, for every eight lines) is sequentially counted.

【0053】次に、2の「n−1」乗ライン分をイエロ
ー(又はマゼンタ、又はシアン)に色変換し、この色変
換したデータをYMCワークエリア10のエリアB12
に格納する(ステップS61)。この処理は、先にステ
ップS51でJPEG伸長された16ライン分の残り半
分の実データを色変換してYMCワークエリア10の下
方に展開する処理である。これにより、例えば図4に示
すように、いま最終ラインの下から2番目のライン(6
ライン目)まで処理の終了した先に上方に展開している
実データに続けて、8ライン目から15ライン目まで新
たな実データが展開される。
Next, the color of the 2 <n-1> power lines is converted to yellow (or magenta or cyan), and the color-converted data is stored in the area B12 of the YMC work area 10.
(Step S61). This process is a process of color-converting the remaining half of the 16 lines of actual data JPEG-decompressed in step S51 and developing the data under the YMC work area 10. Thereby, as shown in FIG. 4, for example, the second line (6
Following the actual data that has been developed upward before the processing is completed up to line (line), new actual data is developed from the eighth line to the fifteenth line.

【0054】続くステップS62〜S68の処理は、処
理対象となるドットがエリアB12に展開された実デー
タによることのみが異なるだけで、処理の内容は図9の
ステップS53〜S59と同一である。更に言えば、ス
テップS62で判別する計算可能な条件は前述した計算
式(4)から、仮想座標値Y=8×r+(8−1)×r
=60(未満)として算出される。以下、上記のステッ
プS62からステップS68を繰り返して、上記の条件
を満たしている範囲まで、すなわち、<0,28>,・
・・,<2558,58>までの所望ドットの補間計算
が行われる(図4の7ライン目から15ライン目までの
実ドットの仮想座標値を参照)。
The subsequent steps S62 to S68 are the same as steps S53 to S59 in FIG. 9 except that the dots to be processed are based on actual data developed in the area B12. More specifically, the conditions that can be calculated in step S62 are as follows: From the above-described formula (4), the virtual coordinate value Y = 8 × r + (8−1) × r
= 60 (less than). Thereafter, the above steps S62 to S68 are repeated until the above condition is satisfied, that is, <0, 28>,.
.., interpolation calculation of desired dots up to <2558, 58> is performed (see virtual coordinate values of real dots on the 7th to 15th lines in FIG. 4).

【0055】ここで、図7及び図4に示すように最初に
8ライン毎に2回に分けて展開される実データは、YM
Cワークエリア10内のライン番号と1フレーム分のラ
イン番号とが一致している。つまり、YMCワークエリ
ア10上の仮想座標上の実データ位置と、1フレーム分
の仮想座標上の実データ位置とは一致している。したが
って、ステップS55又はステップS64において、仮
想座標上の所望データの位置に基づいて実データ位置を
算出する作業には何等の支障もない。
Here, as shown in FIGS. 7 and 4, the actual data which is first developed twice every eight lines is YM
The line number in the C work area 10 matches the line number for one frame. That is, the actual data position on the virtual coordinates on the YMC work area 10 matches the actual data position on the virtual coordinates for one frame. Therefore, there is no problem in the operation of calculating the actual data position based on the position of the desired data on the virtual coordinates in step S55 or step S64.

【0056】ところで、図10のステップS62におい
て、KASO_Yのラインの補間計算が不可能(図4に
おいて最終ライン、15ライン目)となったとき、図9
のステップS51に戻り、新たな16ラインのJPEG
伸長の後、ステップS52で、図5に示すように、エリ
アA11に展開される実データは、所望ドットの1フレ
ーム分の仮想座標上での座標<0,60>,・・・,<
2558,90>に対応して、仮想座標<0、64>,
・・・,<2256,92>で表わされるが、この実デ
ータのYMCワークエリア10上での仮想座標は図7の
場合と同様である。すなわち、実データの座標値KAS
O_Xは常にYMCワークエリア10の仮想座標値と一
致するが、座標値KASO_Yは、15ラインを越えて
からはYMCワークエリア10の仮想座標値と一致しな
い。このようにYMCワークエリア10の仮想座標上の
位置と、1フレーム分の仮想座標上の位置とが一致しな
い。この状態は、この後、図6に示すように次の8ライ
ン分の実データがエリアB12に展開され、<0,92
>,・・・,<2558,122>の所望ドットの値を
求める場合も同様である。また、このことは、以後順次
8ライン毎にエリアA11、エリアB12と繰り返し展
開される実データについても同様である。
When the interpolation calculation of the KASO_Y line becomes impossible (the last line and the fifteenth line in FIG. 4) in step S62 in FIG.
Returning to step S51, a new 16-line JPEG
After the decompression, in step S52, as shown in FIG. 5, the actual data developed in the area A11 includes the coordinates <0, 60>,.
2558, 90>, the virtual coordinates <0, 64>,
, <2256, 92>, the virtual coordinates of this actual data on the YMC work area 10 are the same as those in FIG. That is, the coordinate value KAS of the actual data
O_X always matches the virtual coordinate value of the YMC work area 10, but the coordinate value KASO_Y does not match the virtual coordinate value of the YMC work area 10 after exceeding 15 lines. Thus, the position on the virtual coordinates of the YMC work area 10 does not match the position on the virtual coordinates for one frame. In this state, after that, as shown in FIG. 6, the actual data of the next eight lines is developed in the area B12, and <0,92
,..., <2558, 122>. This also applies to actual data that is repeatedly developed in the area A11 and the area B12 sequentially for every eight lines thereafter.

【0057】ところが、本発明では、このような場合で
も何等の支障を生じない。むしろ極めて容易に所望ドッ
トの仮想座標値(1フレーム分の仮想座標上の位置デー
タ)から、これを取り囲む4個のYMCワークエリア1
0上の実データ位置を算出することができる。以下、こ
れを図6を用いて説明する。
However, the present invention does not cause any trouble even in such a case. Rather, the four YMC work areas 1 surrounding the virtual coordinates of the desired dot (position data on the virtual coordinates for one frame) can be obtained very easily.
The actual data position on 0 can be calculated. Hereinafter, this will be described with reference to FIG.

【0058】いま、所望ドットを図6の×印「仮想座標
<2、106>」であるとする。まず、<X,Y>をr
(この場合はr=4)で割ったときの商を求める。4で
割るということは前述したように右に2ビットシフトす
ることで求められる。上記の所望ドットの仮想座標<
2、106>の座標値「2」及び「106」を2ビット
右シフトすると、(0,26)が得られる。よって、補
間計算は、左上ドットの実座標(0,26),右上ドッ
トの実座標(1,26),左下ドットの実座標(0,2
7),右下ドットの実座標(1,27)により行うこと
になる。
Now, it is assumed that the desired dot is an X mark "virtual coordinates <2, 106>" in FIG. First, <X, Y> is r
The quotient when divided by (in this case, r = 4) is obtained. Dividing by 4 is obtained by shifting right by 2 bits as described above. The virtual coordinates of the desired dot described above <
By shifting the coordinate values “2” and “106” of “2, 106>” to the right by 2 bits, (0, 26) is obtained. Therefore, the interpolation calculation includes the actual coordinates (0, 26) of the upper left dot, the actual coordinates (1, 26) of the upper right dot, and the actual coordinates (0, 2) of the lower left dot.
7), the operation is performed using the actual coordinates (1, 27) of the lower right dot.

【0059】ところで、この実座標値からYMCワーク
エリア10上のアドレスを計算しなければならない。実
座標値xは、YMCワークエリア10上のデータと1対
1に対応しているが、実座標値yが対応していない(つ
まり仮想座標が対応していない)ことは上述した。尚、
図7,図4の場合は、偶然、YMCワークエリア10上
のライン番号と実座標のY軸の値が一致していたもので
ある。
Incidentally, an address on the YMC work area 10 must be calculated from the actual coordinate values. As described above, the real coordinate value x has a one-to-one correspondence with the data on the YMC work area 10, but the real coordinate value y does not correspond (that is, the virtual coordinates do not correspond). still,
7 and 4, the line number on the YMC work area 10 coincides with the value of the Y axis of the actual coordinates.

【0060】そこで、実座標yの下位4ビットに着目し
てみると、実座標値y=26の下位4ビットは、101
0Hつまり10進数で10である。同様にして実座標値
y=27の下位4ビットは10進数で11である。とこ
ろで、これらの値は、実座標値y=26のデータ15及
び16が展開しているYMCワークエリア10上のライ
ン番号及び実座標値y=27のデータ17及び18が展
開しているYMCワークエリア上のライン番号に夫々一
致する。つまり、図6から分かるとおり、実座標値y=
26の実座標データ15、16等は、YMCワークエリ
ア10のライン数を0から数えたときの10ライン目に
存在し、実座標値y=27の実座標データ17、18等
は、YMCワークエリア10の11ライン目に存在して
いる。
Therefore, focusing on the lower 4 bits of the real coordinate y, the lower 4 bits of the real coordinate y = 26
0H, that is, 10 in decimal. Similarly, the lower 4 bits of the real coordinate value y = 27 are 11 in decimal. By the way, these values are the line number on the YMC work area 10 where the data 15 and 16 of the real coordinate value y = 26 are developed and the YMC work where the data 17 and 18 of the real coordinate value y = 27 are developed. Each matches the line number on the area. That is, as can be seen from FIG. 6, the actual coordinate value y =
26 are present on the tenth line when the number of lines in the YMC work area 10 is counted from 0, and the real coordinate data 17, 18 and the like having the actual coordinate value y = 27 are the YMC work area. It is present on the eleventh line of area 10.

【0061】よって、実座標値yの下位4ビットの値を
求めることによって、実座標値yの実データが存在する
YMCワークエリア10上の位置を容易に求めることが
できる。すなわち、「(実座標値yの下位4ビットの
値)×640+(実座標値x)」によって、実座標
(0,26),(1,26),(0,27),(1,2
7)のYMCワークエリア10上の実データを得ること
ができ、これによって補間計算を行うことができる。
Thus, by determining the value of the lower 4 bits of the actual coordinate value y, the position on the YMC work area 10 where the actual data of the actual coordinate value y exists can be easily determined. In other words, the actual coordinates (0, 26), (1, 26), (0, 27), (1, 2)
7) Actual data on the YMC work area 10 can be obtained, and thereby interpolation calculation can be performed.

【0062】ところで、実座標値yの下位4ビットとY
MCワークエリア上のライン数が一致するのは、YMC
ワークエリア10のライン数を2のべき乗としているこ
とによるものである。YHCワークエリア10のライン
数を2n (n=1,2,3,・・・)とすると、実座標
yの下位nビットとYMCワークエリア10上のライン
数を一致させることができる。
By the way, the lower 4 bits of the real coordinate value y and Y
The number of lines on the MC work area is the same
This is because the number of lines in the work area 10 is a power of two. Assuming that the number of lines in the YHC work area 10 is 2 n (n = 1, 2, 3,...), The lower n bits of the real coordinate y and the number of lines in the YMC work area 10 can be matched.

【0063】これにより、YMCワークエリア10から
実データを読み出すためのアドレス計算が単純になる。
つまり、rを2のべき乗の値にすることで、演算が簡単
になる。ただし、これは、YMCワークエリア10に2
n-1 ライン分(本例では8ライン分)の展開を行った
ら、その時点で、計算可能な最大限の範囲までの計算を
するということが条件である。
Thus, the address calculation for reading the actual data from the YMC work area 10 is simplified.
In other words, the calculation is simplified by setting r to a value of a power of two. However, this is 2 in the YMC work area 10.
After developing n-1 lines (8 lines in this example), the condition is that the calculation should be performed to the maximum possible range at that time.

【0064】尚、ある画像における最終の伸長データ
(実データ)による下位2n-1 ライン分の展開時の処理
に限り、この条件による判断は行わず、すべての補間計
算を行う。例えば、YMCワークエリア10を16ライ
ンとし、ソース画像が640×480のときのサイズ変
換処理では、最後の8ライン分の展開時のiは、i=5
9となる。これを(i×2n-1 +2n-1 −1)に入れて
計算すると479となる。つまり、もし、最後の8ライ
ン分の処理時も上記の判断を行ってしまうと、実座標y
=479未満までの計算しかできなくなってしまい、不
都合が生じる。これを回避するために、判断を行わない
ようにするのである。
It should be noted that only interpolation processing for the lower 2 n -1 lines based on the final decompressed data (actual data) in a certain image does not make a judgment based on this condition, but performs all interpolation calculations. For example, in the size conversion processing when the YMC work area 10 has 16 lines and the source image is 640 × 480, i at the time of development of the last 8 lines is i = 5
It becomes 9. When this is put into (i × 2 n-1 +2 n-1 -1) and calculated, it is 479. In other words, if the above determination is made during the processing for the last eight lines, the actual coordinate y
= 479 can only be calculated, causing inconvenience. To avoid this, no decision is made.

【0065】また、初期化時において変数KASO_X
及びKASO_Yに設定する値は補間計算を最初に行う
ドットの仮想座標値を入れることによって演算を行うか
ら、この初期値と補間ステップ及びサイズ変換後の画像
サイズを適宜に設定することによって画像の一部を拡大
することが容易にできる。例えば、図4〜図7の仮想座
標の場合は、初期値をX=1280,Y=960とし
て、X補間ステップを2、Y補間ステップを2とし、サ
イズ変換後の画像サイズを640×480ドットとすれ
ば、補間演算後はソース画像の右下1/4の範囲を拡大
した、ソース画像と同じサイズの画像を得ることができ
る(図11参照)。
At the time of initialization, the variable KASO_X
And the values set in KASO_Y are calculated by inputting the virtual coordinate values of the dots for which the interpolation calculation is performed first. Therefore, by appropriately setting the initial value, the interpolation step, and the image size after the size conversion, the value of the image is calculated. The part can be easily enlarged. For example, in the case of the virtual coordinates in FIGS. 4 to 7, the initial values are X = 1280, Y = 960, the X interpolation step is 2, the Y interpolation step is 2, and the image size after size conversion is 640 × 480 dots. Then, after the interpolation calculation, it is possible to obtain an image of the same size as the source image in which the range of the lower right quarter of the source image is enlarged (see FIG. 11).

【0066】また、X補間ステップ及びY補間ステップ
を、例えば、1対2の割合で設定して計算すると、横に
伸びた画像が得られる。このように、初期値、補間ステ
ップ、およびサイズ変換後の画像サイズの組み合わせに
より、様々な画像加工をすることができる。
Further, if the X interpolation step and the Y interpolation step are set and calculated at a ratio of, for example, 1: 2, a horizontally elongated image is obtained. As described above, various image processing can be performed by combining the initial value, the interpolation step, and the image size after the size conversion.

【0067】上記の第1の実施の形態では、まず16ラ
イン分のJPEG伸長結果をJPEGワークエリア上に
展開し、その後、変換したYMCデータをYMCワーク
エリアに展開するというようにしていた。これに対し、
JPEGワークエリアにおけるY(輝度)信号用の領域
のうちの上位8ライン分と、YMCワークエリアAを共
用するように構成することもできる。つまり、JPEG
伸長時は、上位8ライン分のY(輝度)データはYMC
ワークエリアAに展開し、下位8ライン分はJPEGワ
ークエリアに展開する。そして、YCbCr→RGB→
YMC変換については、上位8ライン分は、YMCワー
クエリアAの上で上書きするように変換し、下位8ライ
ン分は上記実施の形態の場合と同様にする。こうする
と、JPEGワークエリアがY(輝度)データに関して
は、8ライン分で済むことになり、必要なワークメモリ
をさらに少なくすることができる。
In the first embodiment, first, the result of JPEG expansion for 16 lines is expanded on the JPEG work area, and then the converted YMC data is expanded on the YMC work area. In contrast,
The YMC work area A may be shared with the upper eight lines of the Y (luminance) signal area in the JPEG work area. That is, JPEG
At the time of decompression, Y (luminance) data for the upper 8 lines is YMC
The data is expanded to the work area A, and the lower eight lines are expanded to the JPEG work area. And YCbCr → RGB →
As for the YMC conversion, the upper eight lines are converted so as to be overwritten on the YMC work area A, and the lower eight lines are the same as in the above embodiment. In this case, the JPEG work area has only eight lines for the Y (luminance) data, and the required work memory can be further reduced.

【0068】ところで、画像サイズ変換の演算は、すべ
てのドットに対して補間計算を行うため、演算量が非常
に大きい。これをCPUで処理しようとすると、演算に
多大な時間を要してしまう。ところで、上述した第1の
実施の形態において例として取り上げたように、640
×480ドツトを1920×960ドットに変換するよ
うな場合、ソース画像におけるドットと、変換後画像に
おけるドットが重なる(同じ値になる)ところがある。
上記の例の場合では、(0,0)と<0,0>、(1,
0)と<4,0>、・・・、(x,y)と<r×x,r
×y>,・・・、(639,479)と<2556,1
916>がこれに相当する。これらのドットは、補間計
算の際、仮想座標値をrで割った余りmod_x,mo
d_yの値が共に0になる。同様に、式(1)〜(3)
の計算においても、mod_x、またはmod_yが0
であることがある。このような場合、式(1)〜(3)
の計算は不必要になる。しかしながら、一般には、それ
らのデータについても、一つの処理フローを通して補間
計算を行っている。
Incidentally, the calculation of the image size conversion is very large since the interpolation calculation is performed for all the dots. If this is to be processed by the CPU, a great deal of time is required for the calculation. By the way, as described in the first embodiment as an example, 640
In the case of converting × 480 dots into 1920 × 960 dots, dots in the source image and dots in the converted image may overlap (become the same value).
In the case of the above example, (0,0) and <0,0>, (1,
0) and <4,0>,..., (X, y) and <rxx, r
× y>,..., (639,479) and <2556,1
916> corresponds to this. These dots are the remainder mod_x, mo obtained by dividing the virtual coordinate value by r during the interpolation calculation.
Both the values of d_y become 0. Similarly, equations (1) to (3)
Is calculated, mod_x or mod_y is 0.
It may be. In such a case, equations (1) to (3)
Calculation becomes unnecessary. However, in general, interpolation calculation is also performed on such data through one processing flow.

【0069】本発明は、上記のような場合には、補間計
算をしないように制御し、補間計算の高速化を図ってい
る。以下、これを第2の実施の形態として説明する。図
12は、第2の実施の形態における補間計算処理のフロ
ーチャートである。また、以下の図中で使用している変
数などで、第1の実施の形態と同じものは、その変数の
意味なども第1の実施の形態の場合と同じである。尚、
図12は、サブルーチンとしての使用を想定している。
According to the present invention, in such a case, the interpolation calculation is controlled so as not to be performed, and the interpolation calculation is speeded up. Hereinafter, this will be described as a second embodiment. FIG. 12 is a flowchart of the interpolation calculation process according to the second embodiment. Further, among the variables used in the following drawings that are the same as those in the first embodiment, the meanings of the variables and the like are the same as those in the first embodiment. still,
FIG. 12 assumes use as a subroutine.

【0070】図13は、そのサブルーチンの入出力の関
係を示す図である。入力は、所望ドットの左上の実デー
タの実座標値(KASO_X>>d,KASO_Y>>
d)、および所望ドットとこの実座標値との距離の情報
となるmod_x,mod_yである。出力は所望ドッ
トの値である。
FIG. 13 is a diagram showing the input / output relationship of the subroutine. The input is the actual coordinate value (KASO_X >> d, KASO_Y >>) of the upper left actual data of the desired dot.
d), and mod_x and mod_y that are information on the distance between the desired dot and the actual coordinate value. The output is the value of the desired dot.

【0071】図14は、本実施の形態における処理を説
明するためのドット(実データ)D0 ,D1 ,D2 及び
3 の位置関係図である。上記図12〜図14を用い
て、サブルーチンの処理を以下に説明する。
FIG. 14 is a positional relationship diagram of dots (actual data) D 0 , D 1 , D 2 and D 3 for explaining the processing in the present embodiment. The processing of the subroutine will be described below with reference to FIGS.

【0072】サブルーチンをコールすると、まず、所望
ドットの左上のドットを読み出す(ステップS70)。
これにより、図14のデータD0 が読み出される。次
に、mod_xが0か否かを判別する(ステップS7
1)。この判別で、mod_xが0のときは(S71が
Y)、所望ドットがデータD0 とデータD2 の縦ライン
上にある場合であり、したがって、データD0 とデータ
1 の補間計算は不要であるので、次のフローに移り、
mod_yが0か否かを判別する(ステップS72)。
When the subroutine is called, first, the upper left dot of the desired dot is read (step S70).
Thus, data D 0 in FIG. 14 is read. Next, it is determined whether mod_x is 0 (step S7).
1). In this determination, when mod_x is 0 (S71 is Y), a case where the desired dots are on the vertical line of data D 0 and the data D 2, therefore, interpolation data D 0 and the data D 1 is not required So, move on to the next flow,
It is determined whether or not mod_y is 0 (step S72).

【0073】この判別でmod_yも0であれば(S7
2がY)、所望ドットがデータD0とデータD1 の横ラ
イン上にある、すなわち、この場合はデータD0 そのも
のが所望ドットであり、したがって、この場合は補間計
算は全く必要ないのでデータD0 を所望ドットのデータ
としてリターンする。
In this determination, if mod_y is also 0 (S7)
2 is Y), and the desired dot is on the horizontal line of data D 0 and data D 1 , that is, in this case, data D 0 itself is the desired dot, and in this case, no interpolation calculation is required. the D 0 is returned as the data of the desired dot.

【0074】上記ステップS72で、mod_yが0で
なければ(S72がN)、データD2 を読み出し(ステ
ップS74)、データD0 とデータD2 、およびmod
_yを用いて仮想データD02の値の計算を行う(ステッ
プS75)。そして、この仮想データD02を所望ドット
のデータとしてリターンする。
[0074] In step S72, mod_y is not the 0 (S72 is N), reads out the data D 2 (step S74), the data D 0 and the data D 2, and mod
The calculation of the value of the virtual data D 02 by using the _y (step S75). Then, the virtual data D02 is returned as desired dot data.

【0075】また、ステップS71の判別で、mod_
xが0でないときは(S71がN)、データD1 を読み
出し(ステップS77)、データD0 とデータD1 、お
よびmod_xを用いて仮想データD01の値を計算する
(ステップS78)。そして、mod_yの判別を行う
(ステップS79)。
Further, in the determination in step S71, mod_
If x is not 0 (the S71 N), reads out the data D 1 (step S77), to calculate the value of virtual data D 01 by using the data D 0 and the data D 1, and Mod_x (step S78). Then, determination of mod_y is performed (step S79).

【0076】ここで、mod_yが0であれば(S79
がY)、所望ドットがデータD0 とデータD1 の横ライ
ン上にある。すなわち、この場合は、データD01を所望
ドットのデータとしてリターンする。また、mod_y
が0でなければ(S79がN)、データD2 とデータD
3 を読み出し(ステップS81及びS82)、データD
2 とデータD3 及びmod_yを用いて仮想データD23
を計算する(ステップS83)。そして、このデータD
23と、先に求めたデータD01、およびmod_yでデー
タD0123を求め、これを所望ドットの値としてリターン
する。
Here, if mod_y is 0 (S79)
There Y), the desired dot is on the horizontal line of data D 0 and the data D 1. That is, in this case, the data D01 is returned as desired dot data. Also, mod_y
There Otherwise 0 (S79 is N), the data D 2 and the data D
3 is read (steps S81 and S82) and data D
2 and data D 3 and mod_y to use virtual data D 23
Is calculated (step S83). And this data D
23 , data D 0123 is obtained from the previously obtained data D 01 and mod_y, and this is returned as the value of the desired dot.

【0077】これにより、補間計算の必要のない所望ド
ットに対する不必要な補間計算がなくなるので、補間計
算の処理を効率的に行うことができるようになる。その
結果、演算量が軽減され、処理が高速になる。
As a result, unnecessary interpolation calculation for a desired dot which does not require interpolation calculation is eliminated, so that interpolation processing can be performed efficiently. As a result, the amount of calculation is reduced, and the processing speed is increased.

【0078】尚、上記の例では画像のサイズ変換などの
際の補間計算を例にして説明したが、例えば、RGBデ
ータをYMCデータに変換する場合などにおいても、空
間の一点を周辺の既知の点から求めるという補間計算が
必要になるので、そのような場合にも上記の処理を適用
してよい。この場合もデータ変換の処理の高速化が可能
となる。
In the above example, the interpolation calculation at the time of image size conversion and the like has been described as an example. However, for example, even when RGB data is converted to YMC data, one point in the space is converted to a known point in the vicinity. Since the interpolation calculation of obtaining from the point is required, the above processing may be applied to such a case. Also in this case, the speed of the data conversion process can be increased.

【0079】[0079]

【発明の効果】以上説明したように、本発明によれば、
ワークメモリを2n ラインに設定するので、通常ではワ
ークメモリを減らすことによって複雑になる処理フロー
を極めて簡単に構成でき、したがって、メモリ容量が少
なく且つサイズ変換処理が高速な画像処理装置を提供す
ることが可能となる。また、1フレーム分よりも小さい
メモリを用いても補間計算の座標算出が容易であるの
で、JPEGなどで圧縮された画像を伸長する際にこの
伸長計算と並行して補間計算を行うことができ、したが
って、サイズ変換処理を更に高速に行うことが可能とな
る。また、2n ラインの設定条件でワークメモリを任意
に小さく設定できるので、例えばソース画像のデータサ
イズが640×480ドットの場合では従来比で96%
のメモリが削減され、したがって、メモリ容量の節減の
度合が極めて大きく、これにより、コスト低減に貢献す
ることができる。また、演算不要のドットの位置を弁別
しながら補間処理を行うので、画像サイズ変換の際に多
用される計算処理を効率良く行うことができ、してがっ
て、全体としての演算量が軽減されて更に高速な画像処
理が可能となる。
As described above, according to the present invention,
Since the work memory is set to 2 n lines, a processing flow that would normally be complicated by reducing the work memory can be configured extremely easily, and therefore, an image processing apparatus with a small memory capacity and high-speed size conversion processing is provided. It becomes possible. In addition, since the coordinates of the interpolation calculation can be easily calculated even if a memory smaller than one frame is used, the interpolation calculation can be performed in parallel with the expansion calculation when the image compressed by JPEG or the like is expanded. Therefore, the size conversion process can be performed at a higher speed. In addition, since the work memory can be arbitrarily reduced under the setting conditions of 2 n lines, for example, when the data size of the source image is 640 × 480 dots, it is 96% as compared with the conventional case.
, And therefore the degree of saving of the memory capacity is extremely large, which can contribute to cost reduction. In addition, since the interpolation processing is performed while discriminating the positions of the dots that do not require the calculation, the calculation processing frequently used in the image size conversion can be efficiently performed, thereby reducing the amount of calculation as a whole. Thus, higher-speed image processing can be performed.

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

【図1】第1の実施の形態における画像処理装置の構成
を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment.

【図2】第1の実施の形態において用いるデータ伸長及
びサイズ変換に使用するイエロー(マゼンタ,シアン)
用のワークメモリ領域(YMCワークエリア)のアドレ
スマップを示す図である。
FIG. 2 shows yellow (magenta, cyan) used for data expansion and size conversion used in the first embodiment.
FIG. 3 is a diagram showing an address map of a work memory area (YMC work area) for use.

【図3】YMCワークエリアに展開される実データのア
ドレスと実座標の関係及び実データの展開状態を示す図
である。
FIG. 3 is a diagram showing a relationship between an address of real data and a real coordinate to be developed in a YMC work area and a state of development of the real data.

【図4】YMCワークエリアに順次8ライン毎に展開さ
れる実データと仮想座標の関係及び実データの展開状態
を示す図(その1)である。
FIG. 4 is a diagram (part 1) illustrating a relationship between real data and virtual coordinates sequentially developed for every eight lines in a YMC work area and a developed state of the real data.

【図5】YMCワークエリアに順次8ライン毎に展開さ
れる実データと仮想座標の関係及び実データの展開状態
を示す図(その2)である。
FIG. 5 is a diagram (part 2) illustrating a relationship between real data and virtual coordinates sequentially developed every eight lines in a YMC work area and a developed state of the real data.

【図6】YMCワークエリアに順次8ライン毎に展開さ
れる実データと仮想座標の関係及び実データの展開状態
を示す図(その3)である。
FIG. 6 is a diagram (part 3) illustrating a relationship between real data and virtual coordinates sequentially developed every eight lines in a YMC work area and a developed state of the real data.

【図7】図3の実データ展開図を仮想座標で図示し直し
て示す図である。
FIG. 7 is a diagram in which the real data development diagram of FIG. 3 is re-shown in virtual coordinates.

【図8】第1の実施の形態における処理の動作を示すフ
ローチャートである。
FIG. 8 is a flowchart illustrating an operation of a process according to the first embodiment.

【図9】図8のフローチャートの処理を更に詳しく説明
するフローチャート(その1)である。
9 is a flowchart (part 1) for explaining the processing of the flowchart in FIG. 8 in more detail;

【図10】図8のフローチャートの処理を更に詳しく説
明するフローチャート(その2)である。
FIG. 10 is a flowchart (part 2) for explaining the processing of the flowchart in FIG. 8 in more detail;

【図11】補間演算によりソース画像の右下1/4の範
囲を拡大してソース画像と同じサイズの画像を得ること
ができることを説明する図である。
FIG. 11 is a diagram for explaining that an image having the same size as the source image can be obtained by enlarging the lower right quarter of the source image by interpolation.

【図12】第2の実施の形態における補間計算処理のフ
ローチャート(サブルーチン)である。
FIG. 12 is a flowchart (subroutine) of an interpolation calculation process according to the second embodiment.

【図13】サブルーチンの入出力の関係を示す図であ
る。
FIG. 13 is a diagram showing a relationship between input and output of a subroutine.

【図14】第2の実施の形態における処理を説明するた
めのドット(実データ)の位置関係図である。
FIG. 14 is a diagram illustrating a positional relationship of dots (actual data) for describing processing according to the second embodiment.

【図15】画像処理を行う場合に画像データが展開され
る例えば640×480ドットのフレームメモリの領域
を模式的に示す図である。
FIG. 15 is a diagram schematically illustrating a frame memory area of, for example, 640 × 480 dots in which image data is expanded when performing image processing.

【図16】従来の補間によって求めるべき新データの位
置を座標系上の1点として表すために新たに導入される
座標系を示す図である。
FIG. 16 is a diagram showing a coordinate system newly introduced to represent the position of new data to be obtained by conventional interpolation as one point on the coordinate system.

【図17】従来のプリンタにおける画像処理動作を示す
フローチャートである。
FIG. 17 is a flowchart illustrating an image processing operation in a conventional printer.

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

1 画像処理装置 2 印刷制御回路 3 ディジタルカメラ(カメラ) 4 CPU 5 印刷スタートキー 6 データ用メモリ 7 ワーク用メモリ 8 印刷用メモリ 9 ROM 11 YMCワークエリアA 12 YMCワークエリアB Reference Signs List 1 image processing device 2 print control circuit 3 digital camera (camera) 4 CPU 5 print start key 6 data memory 7 work memory 8 print memory 9 ROM 11 YMC work area A 12 YMC work area B

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 画像処理に用いるメモリのライン数を2
n (n=1,2,3,・・・)とすることを特徴とする
画像処理装置。
1. The number of lines of a memory used for image processing is 2
n (n = 1, 2, 3,...).
【請求項2】 前記メモリは、アドレスの値が連続する
数値で表わされることを特徴とする請求項1記載の画像
処理装置。
2. The image processing apparatus according to claim 1, wherein the memory has address values represented by continuous numerical values.
【請求項3】 原画像データを二次元平面として扱って
画像処理する際に用いるメモリ上における各画素の座標
(x,y)が連続する座標値(m,n)で表わされ、メ
モリのライン数が2n (n=1,2,3,・・・)に設
定されているとき、メモリ上のアドレスを計算する際
に、座標の下位nビットを用いることを特徴とする画像
処理装置。
3. The coordinates (x, y) of each pixel on a memory used when performing image processing by treating the original image data as a two-dimensional plane are represented by continuous coordinate values (m, n). When the number of lines is set to 2 n (n = 1, 2, 3,...), The lower n bits of coordinates are used when calculating an address on the memory. .
【請求項4】 前記画像処理は、画像データのサイズ変
換のための補間計算であることを特徴とする請求項3記
載の画像処理装置。
4. The image processing apparatus according to claim 3, wherein the image processing is an interpolation calculation for converting the size of image data.
【請求項5】 前記補間計算は、予め定めた条件式によ
り補間計算が可能か否かを判断しながら行うことを特徴
とする請求項3又は4記載の画像処理装置。
5. The image processing apparatus according to claim 3, wherein the interpolation calculation is performed while determining whether or not the interpolation calculation is possible by a predetermined conditional expression.
【請求項6】 前記条件式は、仮想座標を実座標のr倍
の分解能とし、メモリライン数の1/2ライン数毎の実
データ展開回数をiとしたとき、前記補間計算の対象ド
ットの仮想座標値Yが「Y<(2n-1 ×(i+1)−
1)×r」を満たすか又は対象ドットの左上の実データ
のドットの実座標値yが「y <(i×2n-1 +2n-1
−1)」を満たすとき補間計算が可能であると判断する
ことを特徴とする請求項3、4又は5記載の画像処理装
置。
6. The conditional expression is defined as follows: when the virtual coordinates have a resolution r times the real coordinates, and the number of times of real data development for each half of the number of memory lines is i, If the virtual coordinate value Y is “Y <(2 n−1 × (i + 1) −
1) × r ”or the actual coordinate value y of the dot of the actual data at the upper left of the target dot is“ y <(i × 2 n−1 +2 n−1)
The image processing apparatus according to claim 3, wherein it is determined that interpolation calculation is possible when "-1)" is satisfied.
【請求項7】 前記条件式に基づく判断を最終の処理の
ときには行わないことを特徴とする請求項3、4、5又
は6記載の画像処理装置。
7. The image processing apparatus according to claim 3, wherein the determination based on the conditional expression is not performed at the time of final processing.
【請求項8】 空間の任意の1点を、その周辺の既知の
点から求める補間処理において、処理の中で行う計算が
省略可能か否かを判断し、省略可能な場合は、その計算
を行わないように制御することを特徴とする画像処理装
置。
8. In an interpolation process for obtaining an arbitrary point in space from known points around the space, it is determined whether or not calculation to be performed in the processing can be omitted. An image processing apparatus which controls so as not to perform the processing.
JP8359132A 1996-12-28 1996-12-28 Image processing device Pending JPH10198338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8359132A JPH10198338A (en) 1996-12-28 1996-12-28 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8359132A JPH10198338A (en) 1996-12-28 1996-12-28 Image processing device

Publications (1)

Publication Number Publication Date
JPH10198338A true JPH10198338A (en) 1998-07-31

Family

ID=18462910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8359132A Pending JPH10198338A (en) 1996-12-28 1996-12-28 Image processing device

Country Status (1)

Country Link
JP (1) JPH10198338A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007086432A (en) * 2005-09-22 2007-04-05 Sony Corp Display control device and display control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007086432A (en) * 2005-09-22 2007-04-05 Sony Corp Display control device and display control method
US8284213B2 (en) 2005-09-22 2012-10-09 Sony Corporation Display control apparatus and display control method

Similar Documents

Publication Publication Date Title
EP0369702B1 (en) Image processing apparatus and method
US5021876A (en) Image processing apparatus with real-time texture processing
US5729664A (en) Image processing apparatus and method for converting an input color image signal from one color space to another
WO1983000593A1 (en) Digital facsimiles (fast additive color separation internegatives miles)
JPH07288705A (en) Device and method for processing color image
GB2379149A (en) Display controller including display address generator
JP3285930B2 (en) Image processing device
JPH10198338A (en) Image processing device
JPH0481227B2 (en)
US5878194A (en) Method and device for outputting multicolor document
US5553204A (en) Image output apparatus for gradation image data
JPS5935270A (en) Picture element density converter
US5673120A (en) Image output device
JPH0863140A (en) Image processor
JP2730399B2 (en) Image data reduction device
JP2914400B2 (en) Management information output device
JP2655621B2 (en) Management information output device
JPH07105344A (en) Output device
JPH0779356A (en) Color picture processing method and its device
JPH10285387A (en) Image-processing unit
JP2001351111A (en) Image processing apparatus and drawing processing apparatus
JPH0463063A (en) Error dispersing circuit
JP2006165649A (en) Multi-dimensional data converter and method thereof
JPH1023241A (en) Gradation character output device
JPH09181912A (en) Image processor and print system

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070413

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070904